Brian (software)
Developer(s) | Romain Brette, Dan Goodman, Marcel Stimberg |
---|---|
Stable release | 1.4.3 / February 16, 2016 |
Preview release | 2.0rc / April 19, 2016 |
Development status | Active |
Written in | Python |
Operating system | Cross-platform |
Type | Neural network software |
License | CeCILL |
Website | http://www.briansimulator.org |
Brian is an open source Python package for developing simulations of networks of spiking neurons. Version 1 was developed by Dan Goodman and Romain Brette, and version 2 is being developed primarily by Marcel Stimberg.
Details
Brian is aimed at researchers developing models based on networks of spiking neurons. The design is aimed at minimizing users' development time, with execution speed a secondary goal.[1] Users specify neuron models by giving their differential equations in standard mathematical form, create groups of neurons and connect them via synapses. The intent is to make the process as flexible as possible, so that researchers are not restricted to using neuron models already built into the simulator. The entire simulator is written in Python, using the NumPy and SciPy numerical and scientific computing packages. Parts of the simulator can optionally be run using C code generated on the fly. Computationally, Brian uses vectorization techniques, so that for large numbers of neurons, execution speed is of the same order of magnitude as C code.[1]
Version 2 of Brian (currently in development) is based around the concept of code generation: users specify the model in Python but behind the scenes Brian generates, compiles and runs code in one of several languages (including Python, Cython and C++). This enables better performance than Brian 1, and additionally allows the new "standalone" mode in which Brian generates an entire C++ source code tree with no dependency on Brian. This allows Brian to be run on platforms where Python is not available (for example, on a robot). The code generation mechanism is extensible, and there are now projects underway to generate code to run on GPGPU and Android.
Example
The following code defines, runs and plots a randomly connected network of leaky integrate and fire neurons with exponential inhibitory and excitatory currents.
from brian 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=-50*mV, reset=-60*mV)
P.v = -60*mV
Pe = P.subgroup(3200)
Pi = P.subgroup(800)
Ce = Connection(Pe, P, 'ge', weight=1.62*mV, sparseness=0.02)
Ci = Connection(Pi, P, 'gi', weight=-9*mV, sparseness=0.02)
M = SpikeMonitor(P)
run(1*second)
raster_plot(M)
show()
Comparison to other simulators
Brian is primarily aimed at single compartmental model neurons. Simulators focused on multi-compartmental models include Neuron, GENESIS, and its derivatives.
Another similar simulator is NEST.[2]
Footnotes
- 1 2 Goodman and Brette 2009
- ↑ http://www.nest-initiative.org/
References
- Goodman, D. and Brette, R. (2008). "Brian: a simulator for spiking neural networks in Python", Front. Neuroinform. 2:5. doi:10.3389/neuro.11.005.2008 PMID 19115011
- Goodman, D.F.M. and Brette, R. (2009). "The Brian simulator", Front. Neurosci. doi:10.3389/neuro.01.026.2009