Versioned model registry
Start from a model. Keep its lineage.
Explore Brian2-first neural models, inspect their scientific scale and execution support, then fork, run and publish a traceable version of your own.
98 official Brian2 examples and 2 supporting modules · Download the complete examples archive
Population model
Adaptive Exponential IF
Inspect exponential spike onset and run the model in-browser or on local CPU/Apple GPU.
- Neurons
- 1K
- Synapses
- —
- Diagram nodes
- 1
Population model
Adaptive LIF Population
A compact adaptive integrate-and-fire population for browser, local CPU and Apple GPU runs.
- Neurons
- 1K
- Synapses
- —
- Diagram nodes
- 1
Official example · adapted
Brian2 IF Curve · LIF
Run an adapted official Brian2 input–frequency example on a local CPU or Apple Metal GPU.
- Neurons
- 1K
- Synapses
- —
- Diagram nodes
- 1
Recurrent spiking network
Brunel Network
A recurrent excitatory–inhibitory network with clearly separated proxy and reference scales.
- Neurons
- 12.5K
- Synapses
- 12.5M
- Diagram nodes
- 2
Dendritic assembly model
Contextual Dendritic Gating
Brian2 assembly-learning model with dendrite-specific inhibitory gating; integration under study.
- Neurons
- 400
- Synapses
- Not reported
- Diagram nodes
- 1
Connected circuit
FlyWire · DM1 Circuit
Stimulate a real FlyWire olfactory subgraph at 240, 1,024 or 4,096 cells.
- Neurons
- 4.1K
- Synapses
- 284.1K
- Diagram nodes
- 6
Connectome-constrained task
FlyWire · MNIST Readout
A full FlyWire-based network with fixed neural dynamics and an external digit classifier.
- Neurons
- 139.3K
- Synapses
- 54.5M
- Diagram nodes
- 1
Population model
Hodgkin–Huxley Neurons
Run sodium, potassium and leak-channel action potentials locally.
- Neurons
- 1K
- Synapses
- —
- Diagram nodes
- 1
Population model
Izhikevich Neurons
Explore regular spiking, bursting and fast-spiking behaviour in the browser.
- Neurons
- 1K
- Synapses
- —
- Diagram nodes
- 1
Multi-area cortical network
Macaque Multi-Area Model
32-area cortical model at roughly 4.13 million neurons; full-scale engineering evidence, scientific equivalence pending.
- Neurons
- 4.1M
- Synapses
- 24.1B
- Diagram nodes
- 1
Recurrent NMDA network
NMDA-LIF Validation
Published nonlinear NMDA benchmark with separate CPU and MPI reproduction evidence.
- Neurons
- 20.5K
- Synapses
- 755M
- Diagram nodes
- 1
Layered cortical network
Potjans–Diesmann 2014
A layered cortical microcircuit with proportional and reference-scale configurations.
- Neurons
- 77.2K
- Synapses
- 300M
- Diagram nodes
- 8
Population model
Quadratic IF
Explore nonlinear threshold dynamics with an editable browser model.
- Neurons
- 1K
- Synapses
- —
- Diagram nodes
- 1
Official Brian2 example
01 using cython
Parallel processes using Cython
Official Brian2 example
02 using standalone
Parallel processes using standalone mode
Official Brian2 example
03 standalone joblib
This example use C++ standalone mode for the simulation and the
Official Brian2 example
Adaptive threshold
Spike-triggered threshold adaptation in a neuron group.
Official Brian2 example
AdEx · Brette & Gerstner
Adaptive exponential integrate-and-fire model.
Official Brian2 example
bipolar cell
A pseudo MSO neuron, with two dendrites and one axon (fake geometry).
Official Brian2 example
bipolar with inputs
A pseudo MSO neuron, with two dendrites (fake geometry).
Official Brian2 example
bipolar with inputs2
A pseudo MSO neuron, with two dendrites (fake geometry).
Official Brian2 example
Brette 2004
Phase locking in leaky integrate-and-fire model
Official Brian2 example
Brette 2012 · Fig1
Brette R (2013). Sharpness of spike initiation in neurons explained by compartmentalization.
Official Brian2 example
Brette 2012 · Fig3AB
Brette R (2013). Sharpness of spike initiation in neurons explained by compartmentalization.
Official Brian2 example
Brette 2012 · Fig3CF
Brette R (2013). Sharpness of spike initiation in neurons explained by compartmentalization.
Official Brian2 example
Brette 2012 · Fig4
Brette R (2013). Sharpness of spike initiation in neurons explained by compartmentalization.
Official Brian2 example
Brette 2012 · Fig5A
Brette R (2013). Sharpness of spike initiation in neurons explained by compartmentalization.
Brian2 supporting module
Brette 2012 · params
Parameters for spike initiation simulations.
Official Brian2 example
Brette Guigon 2003
Reliability of spike timing
Official Brian2 example
Brunel 2000 network
Sparse excitatory/inhibitory network dynamics.
Official Brian2 example
Brunel Hakim 1999
Dynamics of a network of sparsely connected inhibitory current-based
Official Brian2 example
Brunel Wang 2001
Sample-specific persistent activity
Official Brian2 example
Clopath et al 2010 homeostasis
This code contains an adapted version of the voltage-dependent triplet STDP rule from:
Official Brian2 example
Clopath et al 2010 no homeostasis
This code contains an adapted version of the voltage-dependent triplet STDP rule from:
Official Brian2 example
COBAHH approximated
Hodgkin-Huxley neuron simulation with approximations for gating variable steady-states and time constants
Official Brian2 example
COBAHH network
Conductance-based network of Hodgkin–Huxley neurons.
Official Brian2 example
compare GSL to conventional
Example using GSL ODE solvers with a variable time step and comparing it to the
Official Brian2 example
continuous interaction
Synaptic model with continuous interaction
Official Brian2 example
Coupled oscillators
Kuramoto-style phase-coupled oscillator population.
Official Brian2 example
CUBA
This is a Brian script implementing a benchmark described
Official Brian2 example
cuba openmp
Run the ``cuba.py`` example with OpenMP threads.
Official Brian2 example
custom events
Example demonstrating the use of custom events.
Official Brian2 example
cylinder
A short cylinder with constant injection at one end.
Official Brian2 example
Destexhe et al 1998
Reproduces Figure 12 (simplified three-compartment model) from the following
Official Brian2 example
Diehl Cook 2015
Unsupervised learning using STDP
Official Brian2 example
Diesmann et al 1999
Synfire chains
Official Brian2 example
efficient gaussian connectivity
An example of turning an expensive `Synapses.connect` operation into
Official Brian2 example
exprel function
Show the improved numerical accuracy when using the `exprel` function in rate equations.
Official Brian2 example
float 32 64 benchmark
Benchmark showing the performance of float32 versus float64.
Official Brian2 example
Gap junctions
Electrical coupling between neurons through gap currents.
Official Brian2 example
Graupner Brunel 2012
Fig. 2 C, panel DP from:
Official Brian2 example
hh with spikes
Hodgkin-Huxley equations (1952).
Official Brian2 example
Hindmarsh–Rose bursting
Burst generation in the three-variable neuron model.
Official Brian2 example
hodgkin huxley 1952
Hodgkin-Huxley equations (1952).
Official Brian2 example
homeostatic stdp at inhibitory synapes
This script implements a homeostatic STDP rule for inhibitory
Official Brian2 example
IF curve · Hodgkin–Huxley
Input–frequency curve across independent HH neurons.
Official Brian2 example
IF curve LIF
Input-Frequency curve of a IF model.
Official Brian2 example
infinite cable
An (almost) infinite cable with pulse injection in the middle.
Official Brian2 example
Izhikevich 2003 patterns
Spiking patterns from the simple neuron model.
Official Brian2 example
Izhikevich 2007
STDP modulated with reward
Official Brian2 example
Jansen Rit 1995 single column
[Jansen and Rit 1995 model](https://link.springer.com/content/pdf/10.1007/BF00199471.pdf) (Figure 3) in Brian2.
Official Brian2 example
jeffress
Jeffress model, adapted with spiking neuron models.
Official Brian2 example
Kremer et al 2011 barrel cortex
Late Emergence of the Whisker Direction Selectivity Map in the Rat Barrel Cortex.
Official Brian2 example
lfp
Hodgkin-Huxley equations (1952)
Official Brian2 example
licklider
Spike-based adaptation of Licklider's model of pitch processing (autocorrelation with
Official Brian2 example
Maass Natschlaeger Markram 2002
Fig. 2 from:
Official Brian2 example
modelfitting sbi
Model fitting with simulation-based inference
Official Brian2 example
morphotest
Demonstrate the usage of the `Morphology` object.
Official Brian2 example
Morris Lecar 1981
Morris-Lecar model
Official Brian2 example
Naud et al 2008 adex firing patterns
Firing patterns in the adaptive exponential integrate-and-fire model
Official Brian2 example
Nicola Clopath 2017
FORCE training of a Leaky IF model to mimic a sinusoid (5 Hz) oscillator
Official Brian2 example
nonlinear
NMDA synapses.
Official Brian2 example
opencv movie
An example that uses a function from external C library (OpenCV in this case).
Official Brian2 example
Ornstein–Uhlenbeck process
Two stochastic process realizations with different time constants.
Official Brian2 example
Phase locking · official source
Unmodified periodic-drive phase-locking example from Brian2.
Official Brian2 example
Platkiewicz Brette 2011
Slope-threshold relationship with noisy inputs, in the adaptive threshold model
Official Brian2 example
rall
A cylinder plus two branches, with diameters according to Rall's formula
Official Brian2 example
Rossant et al 2011bis
Distributed synchrony example
Official Brian2 example
Rothman Manis 2003
Cochlear neuron model of Rothman & Manis
Official Brian2 example
simple case
The most simple case how to use standalone mode.
Official Brian2 example
simple case build
The most simple case how to use standalone mode with several `run` calls.
Official Brian2 example
spatial connections
A simple example showing how string expressions can be used to implement
Official Brian2 example
spike based homeostasis
Brian2 simulation of spike-based homeostasis
Official Brian2 example
spike initiation
Ball and stick with Na and K channels
Official Brian2 example
Spike-timing reliability
Repeated neuron responses to shared noisy input.
Official Brian2 example
Spike-timing variability
Trial-to-trial spike timing under independent noise.
Official Brian2 example
Spreizer et al 2019 · Spreizer et al 2019
Reproduction of Fig. 2 (b and c) of Spreizer et al. 2019 in Brian:
Official Brian2 example
standalone multiple processes
This example shows how to run several, independent simulations in standalone mode using multiple processes to run the
Official Brian2 example
standalone multiplerun
This example shows how to run several, independent simulations in standalone mode.
Official Brian2 example
STDP plasticity
Spike-timing-dependent plasticity in a feedforward input model.
Official Brian2 example
STDP standalone
Spike-timing dependent plasticity.
Official Brian2 example
Stimberg et al 2018 · example 1 COBA
Modeling neuron-glia interactions with the Brian 2 simulator
Official Brian2 example
Stimberg et al 2018 · example 2 gchi astrocyte
Modeling neuron-glia interactions with the Brian 2 simulator
Official Brian2 example
Stimberg et al 2018 · example 3 io synapse
Modeling neuron-glia interactions with the Brian 2 simulator
Official Brian2 example
Stimberg et al 2018 · example 4 rsmean
Modeling neuron-glia interactions with the Brian 2 simulator
Official Brian2 example
Stimberg et al 2018 · example 4 synrel
Modeling neuron-glia interactions with the Brian 2 simulator
Official Brian2 example
Stimberg et al 2018 · example 5 astro ring
Modeling neuron-glia interactions with the Brian 2 simulator
Official Brian2 example
Stimberg et al 2018 · example 6 COBA with astro
Modeling neuron-glia interactions with the Brian 2 simulator
Brian2 supporting module
Stimberg et al 2018 · plot utils
Module with useful functions for making publication-ready plots.
Official Brian2 example
Stimberg et al 2019 · example 3 bisection
Reproduces Figure 4B from Stimberg et al. (2019).
Official Brian2 example
Stimberg et al 2019 · example 3 bisection standalone
Reproduces Figure 4B from Stimberg et al. (2019).
Official Brian2 example
Stochastic ODEs
Compare numerical methods for multiplicative noise.
Official Brian2 example
Stop on a network condition
Use a network operation to end a simulation after a spike target.
Official Brian2 example
Sturzl et al 2000
Adapted from
Official Brian2 example
Synapse state variables
Initialize and update synaptic state with Brian2 expressions.
Official Brian2 example
Synapses basics
Two neuron groups connected by event-driven synapses.
Official Brian2 example
Tetzlaff 2015
Reproduces Figure 2F of
Official Brian2 example
Touboul Brette 2008
Chaos in the AdEx model
Official Brian2 example
Tsodyks Pawelzik Markram 1998
Fig. 1 from:
Official Brian2 example
Tsodyks Uziel Markram 2000
Fig. 1 from:
Official Brian2 example
Vogels et al 2011
Inhibitory synaptic plasticity in a recurrent network model
Official Brian2 example
Wang 2002
Decision network as in:
Official Brian2 example
Wang Buszaki 1996
Wang-Buszaki model