This repository contains the multimodal data pipeline and analysis scripts for the study: "Prefrontal brain-to-brain synchrony during human group hunting: Evidence from fNIRS hyperscanning" (bioRxiv, 2026).
- Behavioral Predictors: Success in group hunting is significantly predicted by "speed-matching" and maintaining closer interpersonal distance with co-predators.
- PFC Synchrony: We found significantly greater brain-to-brain synchrony in the medial and lateral Prefrontal Cortex during hunting compared to chance levels.
- Social Coordination: Findings suggest the PFC plays a critical role in real-time social tracking and tactical coordination in dynamic virtual environments.
- Main.java, plugin.yml, pom.xml, & .gitignore: Custom Minecraft plugin infrastructure developed to extract high-fidelity game data for behavioral analysis.
- Preprocessing & Pipeline:
spmfnirsflow.m,PreprocessingfNIRSEmre.m,spm_fnirs_spm.m,spm_fnirs_spatialpreproc_ui.m,spm_fMRI_design.m,Organisefolders.m,getfolders.m, andspm_get_ons.mhandle the core brain data preprocessing workflow. - Synchrony Analysis:
process_dyads.m,Waveletcoherenceanalysis.m,phase_scramble.m, andblock_time_scramble.mfor dyadic coupling and null distribution generation. - Activation Analysis:
Run_GLM_snirf.m(creating design matrices for single-subject brain data) andsinglesubjectanalysis.m(single-subject brain activity analysis). - Quality Control:
Beforepreprocessingcheck.m,Excludetable.m, andConfirmdateoftesting.mensure data integrity and subject inclusion/exclusion.
- Data Preprocessing:
Behaviouralplotsstats.ipynbandPreparingbehaviourdataforfNIRS.ipynbfor cleaning and formatting raw behavioral data. - Statistical Analysis:
fNIRSanalysis.ipynb(Running fNIRS and physiology data stats) andFNIRSDistancemodel.R(Analyzing behavioral stats). - Visualization:
CreatefNIRStemplate.ipynbfor fNIRS-specific data visualizations.
- Multimodal Sensor Fusion: Synchronizing discrete game-engine events (Minecraft) with continuous neural streams (fNIRS) at high temporal resolution.
- Advanced Signal Processing: Implementing Wavelet Coherence and non-parametric permutation testing (Phase/Time scrambling) for dyadic data analysis.
- Full-Stack Research Engineering: Building the data acquisition tools (Java), the analysis engine (MATLAB), and the statistical modeling (R/Python).