Brian is a free, open source simulator for spiking neural networks. It is written in the Python programming language and is available on almost all platforms. We believe that a simulator should not only save the time of processors, but also the time of scientists. Brian is therefore designed to be easy to learn and use, highly flexible and easily extensible.

To get an idea of what writing a simulation in Brian looks like, the following code defines a randomly connected network of integrate and fire neurons with exponential inhibitory and excitatory currents, runs the simulation and makes the raster plot on the right.

from brian2 import *
eqs = '''
dv/dt = (ge+gi-(v+49*mV))/(20*ms) : volt
dge/dt = -ge/(5*ms) : volt
dgi/dt = -gi/(10*ms) : volt
P = NeuronGroup(4000, eqs, threshold='v > -50*mV', reset='v=-60*mV')
P.v = -60*mV
Pe = P[:3200]
Pi = P[3200:]
Ce = Synapses(Pe, P, on_pre='ge+=1.62*mV')
Ci = Synapses(Pi, P, on_pre='gi-=9*mV')
M = SpikeMonitor(P)
plot(M.t/ms, M.i, '.')

Interactive demo

We also have an interactive demo (running on that lets you modify parameters and even change the simulation code, running from the web browser without installing anything.

Getting started

Once you’ve decided you want to use Brian, you can click the links on the left hand side to install Brian, go through the tutorials, look at example code and read the full documentation. If you have problems, we have an email support list.

Other software and tools

We have produced the following tools in addition to the main Brian simulator:

  • brian2tools: for simple plotting and analysis with Brian

You can also download the older version of Brian (1.4) and the toolboxes we designed for it:

How to cite Brian

If you use Brian for your published research, we suggest that you cite our article:

Stimberg M, Brette R, Goodman DFM . “Brian 2, an Intuitive and Efficient Neural Simulator.” eLife 8 (2019): e47314.

You can also download our logo for posters and presentations.

The Brian team

Brian is being developed by:

  • Romain Brette (l’Institut de la Vision, Paris)
  • Dan Goodman (Imperial College, London)
  • Marcel Stimberg (l’Institut de la Vision, Paris)

See the team page for full credits.

Follow Brian on Twitter and Facebook