Sovereign 8s.is mirror of standardgalactic/critical_init
  • Jupyter Notebook 80.4%
  • Python 19.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-01 05:35:48 -04:00
fig1 updating lyapun 2025-12-20 14:40:43 -05:00
fig2 small changes for median lines 2026-04-01 05:35:48 -04:00
fig3 small changes for median lines 2026-04-01 05:35:48 -04:00
fig4 adding files 2025-02-27 18:59:21 -05:00
fig5 Merge branch 'main' of https://github.com/mouseland/critical_init 2026-03-29 11:21:04 -04:00
.gitignore Initial commit 2025-02-27 18:39:09 -05:00
demo.ipynb adding files 2025-02-27 18:59:21 -05:00
fig_utils.py update for revisions 2025-12-20 10:24:23 -05:00
LICENSE Initial commit 2025-02-27 18:39:09 -05:00
lyapun.py updating lyapun 2025-12-20 14:40:43 -05:00
powerlaw.py update for revisions 2025-12-20 10:24:23 -05:00
README.md update dependencies 2025-02-28 07:16:33 -05:00
requirements.txt adding files 2025-02-27 18:59:21 -05:00
simulations.py update for revisions 2025-12-20 10:24:23 -05:00

critical_init

Code for Pachitariu et al 2025

For Figures 2 and 3, the data will be shared upon publication of the paper (and is shared as a private, confidential link with the reviewers). The demo.ipynb notebook contains code to run an example simulation of linear dynamics with a random symmetric connectivity matrix. This notebook will take < 5 min to run on an A100 GPU. The expected output is included in the notebooks.

If you use any of this code, please cite the paper:

Marius Pachitariu, Lin Zhong, Alexa Gracias, Amanda Minisi, Crystall Lopez, Carsen Stringer. A critical initialization for biological neural networks. bioRxiv, 2025.

This code has been tested on Ubuntu 20.04 and Windows 11 with python=3.10, but python>=3.9 should work.

installation (< 10 min)

Install python, miniforge or anaconda recommended. Check the box to add anaconda to your path. Then open a new terminal or anaconda prompt (on Windows). Create a new environment and activate it:

conda create -n critical_init python=3.10
conda activate critical_init

Now clone the github repo and cd into it and install the requirements:

git clone https://github.com/mouseland/critical_init.git
cd critical_init
pip install -r requirements.txt

If you want to run jupyter notebooks in this environment, you will also need to run:

pip install notebook

If you want to use an Nvidia GPU to accelerate the code you need to first install Nvidia drivers on your machine. We have not tested the code with MPS from pytorch.

dependencies

There are no strict version requirements, but listed below are the versions we used on Ubuntu 20.04:

  • numpy=2.1.3
  • rastermap=1.0
  • scikit-learn=1.6.1
  • torch=2.6.0
  • torchaudio=2.6.0
  • tqdm=4.67.1
  • matplotlib=3.10.0
  • natsort=8.4.0