This repository contains Python code for simulating a homeostatic dynamic mean field (DMF) model with synaptic plasticity and generating synthetic BOLD signals. The model implements biologically inspired excitatory-inhibitory dynamics using a structural connectivity (SC) matrix derived from human brain data. It supports noise, homeostatic inhibitory plasticity, and simulation of functional connectivity (FC).
DMF_ISP/
โโโ BOLDModel.py # Module for simulating BOLD signals from firing rates
โโโ DMF_ISP_numba.py # Core DMF model with inhibitory synaptic plasticity (Numba-accelerated)
โโโ run_DMF_ISP.py # Example script to run DMF simulation and generate FC matrix
โโโ SCmatrices88healthy.mat # Structural connectivity matrix averaged across 88 healthy participants
ล koch, A., Rehรกk Buฤkovรก, B., Mareลก, J., et al. (2022).
Human brain structural connectivity matricesโready for modelling.
Scientific Data, 9, 486. https://doi.org/10.1038/s41597-022-01596-9
Mindlin, I., Coronel-Oliveros, C., Sitt, J. D., Cofrรฉ, R., Luppi, A., Andrillon, T., & Herzog, R. (in preparation).
A homeostatic dynamic mean field model: enhanced stability and state repertoire.
- Clone the repository:
git clone https://github.com/your-username/DMF_ISP.git
cd DMF_ISP- Install the required Python dependencies:
pip install numpy scipy matplotlib numbaTo run a basic simulation:
python run_DMF_ISP.pyThis will:
- Load the structural connectivity matrix
- Run the DMF model with or without plasticity
- Generate synthetic BOLD signals
- Compute and display a functional connectivity matrix
- Nodes: 90 brain regions
- Inputs: Structural connectivity (SC), noise
- Outputs: Firing rates, BOLD signals, FC matrix
- Plasticity: Homeostatic inhibitory plasticity targeting a fixed mean firing rate
- Numerical Integration: Euler-Maruyama with Gaussian noise
- Optimization: Numba-accelerated for performance
- BOLD signals: simulated low-frequency hemodynamic response
- FC matrix: pairwise Pearson correlations between regions
- Plots: connectivity matrix visualization
numpyscipymatplotlibnumba