This repository provides a computational framework for simulating and analyzing self-excitatory Quadratic Integrate-and-Fire (eQIF) neurons. It includes tools for large-scale Spiking Neural Network (SNN) simulations, mean-field theoretical comparisons, and the exploration of neural robustness through phase-plane and bifurcation analysis. Additionally, the repository also porvide the script to simulate self-excitatory Leaky Integrate-and-Fire (eLIF), which is also shown in the manuscript.
This repository provides a computational framework for simulating and analyzing an extension of the adaptive-QIF in the self-excitatory model case (that we term eQIF), presented in "A minimal model of working memory in neural systems and neuromorphic circuits". It includes tools for large-scale Spiking Neural Network (SNN) simulations, mean-field theoretical comparisons, and the exploration of single-neuron bistability and hysteresis. It allows for the exploration of:
- Dynamical Systems Theory: Visualizing the mathematical foundations of the model through phase-plane trajectories and bifurcation diagrams.
- Robustness and Perturbation: Analyzing how the network responds to distractor stimuli.
- Network-Level Analysis: Comparing SNN simulations (
Brian2) with adjusted mean-field models.
-
Model Simulation: Visualization of the time evolutionof the single-neuron model, subjected to an external current.
-
Phase-Plane Trajectories: Visualization of nullclines and system trajectories in the
$(V, w)$ plane to understand the stability of neural states. -
Hysteresis & Bifurcation Mapping: Analysis of "Up" vs. "Down" frequency responses to identify bistable regions.
-
Distractor Robustness: Evaluation of network stability and response when subjected to external distractor signals.
-
2. Network Simulation & Mean-Field Comparison
-
Spiking Neural Network: Numerical implementation of a network of eQIF neurons with quenched heterogeneity.
-
Synchrony & Variability: Calculation of the time-resolved synchrony measure
$\chi(t)$ and Coefficient of Variation (CV) for firing intervals. -
Validation: Comparative plotting of population firing rates between SNN and derived mean-field equations.
network_analysis.ipynb: Core pipeline for SNN vs. Mean-Field comparison.eQIF_hysteresis.ipynb: Exploration of single-cell dynamics and bistability.eQIF_perturbation.ipynb: Analysis of the single_neuron response and robustness to external distractors.eQIF_3d_bifurcation.ipynb: Bifurcation analysis of eQIF model with respect to the external current.
-
eQIF_PhasePlane.py: Generates phase-space visualizations ($V$ vs$w$ ) including nullclines of the eQIF model. -
eQIF_utils.py: Utility functions for simulation and analysis of the single-neuron eQIF model. -
eQIF.py: Simulation of the eQIF model with a time-variable external current. -
eLIF.py: Simulation of the eLIF model with a time-variable external current. -
Izhikevich.py: Simulation of the Izhikevic model with a time-variable external current. -
AdEx.py: Simulation of the AdEx model with a time-variable external current.
Ensure you have a Python environment (3.8+) with the following dependencies:
pip install numpy matplotlib scipy brian2Run eQIF.py to simulate and plot th time evolution of the eQIF model with a time varying external current.
Run eQIF_hysteresis.ipynb to explore single-neuron dynamics and bistability. With that notebook you can:
- Generate heatmap to show the amplitude and frequency response in the hysteresis region for different values of the parameters
$a$ and$I_{ext}$ (Fig2c and Fig9b) - Generate heatmap to show the amplitude and frequency response in the hysteresis region for different values of the parameters
$b$ and$I_{ext}$ (Fig9a) - Generate hysteresis loop by simulating the neuron with different initial conditions (
$w_0, v_0$ ) (Fig2b)
Use eQIF_PhasePlane.py to observe how the neuron's state evolves relative to its nullclines. This is essential for understanding why certain parameters lead to sustained oscillations versus steady states (Fig3).
Use eQIF_3d_bifurcation.ipynb to perform the bifurcation analysis of eQIF model with respect to the specific current values (
Run eQIF_perturbation.ipynb to simulate the single-neuron model to current perturbations. This demonstrates the stability of the working memory capacity of the single-neuron eQIF model. With that notebook you can:
- Plot the response of the firing rate to the stability of either the persistent and quiescent state in the hysteresis region to external perturbations. Perturbation can be varied in amplitude, duration and strenght of the noise (Fig11)
- Generate heatmap to show the stability of both the persistent and quiescent states to a perturbation for different combination of amplitude and duration (Fig10)
- Generate a plot which highlight the effect of the introduction of white noise to the external perturbation on the stability of the persistent and quiescent states.
Run network_analysis.ipynb to simulate the activity of a network of eQIF neurons and its mean-field reduction (Fig8). With that notebook you can:
- Define the network of all-to-all coupled eQIF neurons and the respective mean-field reduction and run simulation of both.
- Compute distinct measure which characterized the behavior of the dpiking neural network.
- Generate comparison plots showing the behavior of the spiking neural network and its mean-field reduction (Fig8).
Run eLIF.py to simulate and plot th time evolution of the eLIF model with a time varying external current. By running this script is possible to show the appearence of a bistable regime in the self-excitatory Leaky Integrate-and-Fire.
The same can be done with Izhikevich.py and AdEx.py for the respective models.