This repository contains code to reproduce simulations of spiking neural networks stabilized with different inhibitory plasticity rules. The workflow includes generating network connectivity, running spiking simulations, detecting assembly activations, and approximating effective connectivity with linearized neuron sensitivities.
-
Clone this repository:
git clone https://github.com/oist-ncbc/barta_fukai_2025.git cd barta_fukai_2025 -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # on Linux/Mac venv\Scripts\activate # on Windows
-
Install dependencies from
requirements.txt:pip install -r requirements.txt
The following steps reproduce a typical experiment with 1000 memory assemblies and fLHP plasticity rule.
Hebbian terms in excitatory–excitary connections are computed, and the strongest ones are selected. Lognormal weights are assigned to create the base connectivity.
python src/genconn.py --patterns 1000Run training for 2000 s with the fLHP rule.
python src/simulation.py \
--system config/systems/hebb.yml \
--run config/runtypes/default_train.yml \
--patterns 1000Run the network without external training input for 10,000 s to obtain spontaneous replay.
python src/simulation.py \
--system config/systems/hebb.yml \
--run config/runtypes/spontaneous.yml \
--patterns 1000Identify transient replays of assemblies from the spontaneous activity.
python src/get_activations.py \
--patterns 1000 \
--system hebb \
--run spontaneousRun a simulation that records excitatory (g_e) and inhibitory (g_i) synaptic conductances.
python src/simulation.py \
--system config/systems/hebb.yml \
--run config/runtypes/conductances.yml \
--patterns 1000Use the Minimum Covariance Determinant (MCD) estimator to extract robust statistics of synaptic input.
python src/gstats_multiproc.py \
--name hebb_conductances \
--folder lognormal \
--patterns 1000Run the network with isolated neurons and small perturbations to excitatory and inhibitory input.
python src/simulation.py \
--system config/systems/hebb.yml \
--run config/runtypes/perturbation.yml \
--patterns 1000Analyze perturbation results to compute each neuron's sensitivity to external input. Modify parameters directly inside:
python src/linear_sensitivity.py \
--system hebb
--npat 1000- Configurations are organized under
config/systems/(network setup) andconfig/runtypes/(simulation protocols). - The
analysis/folder contains scripts to process the raw data - The
plotting/folder contains scripts to process the generate the figures used in the manuscript from the analyzed data.