Giter Club home page Giter Club logo

vogelslab / fsbi Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 112.01 MB

Companion code to Confavreux*, Ramesh*, Goncalves, Macke* & Vogels*, Meta-learning families of plasticity rules in recurrent spiking networks using simulation-based inference, NeurIPS 2023

Home Page: https://openreview.net/forum?id=FLFasCFJNo

Jupyter Notebook 97.63% Python 1.80% C++ 0.56% Makefile 0.01%
meta-learning neuroscience simulation-based-inference synaptic-plasticity spiking-networks

fsbi's Introduction

fSBI

Companion code to Confavreux*, Ramesh*, Gonçalves, Macke* & Vogels*, NeurIPS 2023, Meta-learning families of plasticity rules in recurrent spiking networks using simulation-based inference
https://openreview.net/forum?id=FLFasCFJNo


Checklist before starting the tutorial:

  • Have git lfs installed before cloning the repo (see https://git-lfs.com/)
  • Set-up the repo and dependencies with setup.py (see section below for more details).
  • Install and test Auryn (see section below for more details).
  • Compile the Auryn network simulations (see section below for more details).

Tutorial:

Go through the notebooks:

  • 1_Fit_posterior.ipynb
  • 2_Sample_from_posterior.ipynb
  • 3_Simulate_samples.ipynb
  • 4_Compute_metrics.ipynb
  • 5_Analysis_example.ipynb

Setting up the repository:

  • Create and activate a new conda virtual environment https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html
  • Install python, pip and setuptools: conda install python
    Note: this may install a python version that is too recent for some of the dependencies (e.g. pytorch), in which case force install an earlier version: e.g. conda install python=3.11
  • Install fSBI with setup.py: move to fSBI directory + python3 -m pip install -e .
  • Install jupyter notebook and start the tutorial

Installing Auryn:

All spiking network simulations in this repo use Auryn, a fast, C++ simulator developped by Friedemann Zenke. To install, please refer to https://fzenke.net/auryn/doku.php?id=start
Note that installing Auryn with MPI support is not required for the tutorial.

Compile Auryn simulations:

  • Compile the auryn simulations sim_bg_IF_EEEIIEII_6pPol.cpp and sim_bg_CVAIF_EEIE_T4wvceciMLP.cpp located in synapsbi/simulator/cpp_simulators/. First, edit the Makefile in the same directory, you should only need to change AURYNPATH there.
    For troubleshooting, refer to https://fzenke.net/auryn/doku.php?id=manual:compileandrunaurynsimulations
  • Go to tasks_configs/ and update auryn_sim_dir and workdir inside the 2 yaml files (these variables control where Auryn will write output spike trains).

Structure of data provided:

The main data release alongside this paper are all the plasticity rules we simulated to obtain the posteriors for generally plausible plasticity rules (i.e. rules sampled from all posteriors along the filtering).

  • data_synapsesbi/bg_IF_EEEIIEII_6pPol/bg_IF_EEEIIEII_6pPol_all.npy are all the rules from the polynomial search space (Fig 2).
  • data_synapsesbi/bg_CVAIF_EEIE_T4wvceciMLP/bg_CVAIF_EEIE_T4wvceciMLP_all.npy are all the rules from the MLP search space (Fig 4).

These are numpy structured arrays containing the plasticity parameters and the network metrics computed after a simulation of a spiking network evolving with the rule in question.

Fields:

  • theta: the values of the plasticity parameters.
    For the polynomial rules, this array is: [τpre EE, τpost EE, αEE, βEE, γEE, κEE, τpre EI, etc... same for EI, IE and II].
    For the MLP rules: [ηEE, ηIE, Wpre EE, Wpost EE, Wpre IE, Wpost IE,].
  • seed: unique identifier for each rule
  • metrics: rate, cv_isi, kl_isi', spatial_Fano, temporal_Fano, auto_cov, fft, w_blow, std_rate_temporal', std_rate_spatial, std_cv, w_creep, rate_i, weef, weif, wief, wiif. Refer to the paper for the definition of each metric

fsbi's People

Contributors

basile6 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.