This repository contains the analysis code supporting the study:
Distributed fMRI patterns coupled to low-frequency cardiorespiratory dynamics provide markers of aging
https://www.biorxiv.org/content/10.64898/2025.12.15.694468v1 (Wang et al. 2025)
This codebase provides an end-to-end pipeline for quantifying fMRI–physiology coupling and using these features to predict chronological age.
It includes two major components:
The MATLAB code implements:
- Generation of synthetic datasets for demonstration and testing
- Preprocessing of fMRI and physiological signals (respiration and heart rate)
- Fitting physiological regressors to fMRI time series
- Extraction of physio–fMRI variability measures at the segment level, including:
- RV-coupled fMRI variability
- HR-coupled fMRI variability
- Joint RVHR-coupled fMRI variability
- Raw and regression-based fALFF/ALFF features
These scripts produce feature matrices saved as .mat files, which are used as inputs to the prediction models.
The Python pipeline performs:
- Loading of extracted MATLAB features
- Subject-level cross-validation using predefined or automatically generated splits
- Support Vector Regression (SVR) modeling with configurable kernels
- Segment-level prediction followed by subject-level averaging
- Performance evaluation using:
- Pearson correlation (PCC)
- Mean Absolute Error (MAE)
- Python 3.9.7
- Packages:
- numpy==1.22.4
- scipy==1.8.0
- pandas==1.4.2
- scikit-learn==1.6.1
pip install -r requirements.txtThis repository is intended to:
- Support reproducibility of the published analyses
- Provide a reference implementation for physio–fMRI coupling methods
- Serve as a template for extending these models to other datasets or phenotypes