- Poster presentation
- Open Access
Brian: a simulator for spiking neural networks in Python
© Goodman and Brette; licensee BioMed Central Ltd. 2008
- Published: 11 July 2008
- Neuron Model
- High Level Language
- Complete Network
- Interactive Simulation
- Readable Code
We present Brian, a new clock driven simulator for spiking neural networks which is available on almost all platforms. Brian is easy to learn and use, highly flexible and easily extensible. The Brian package itself and simulations using it are all written in the Python programming language, which is very well adapted to these goals. Python is an easy, concise and highly developed language with many advanced features and development tools, excellent documentation and a large community of users providing support and extension packages. Brian allows you to write very concise, natural and readable code for simulations, and makes it quick and efficient to play with these models (for example, changing the differential equations doesn't require a recompile of the code). Figure 1 shows an example of a complete network implemented in Brian, a randomly connected network of integrate and fire neurons with exponential inhibitory and excitatory currents (the CUBA network from ). Defining the model, running the simulation and making a raster plot of the activity takes fifteen lines of code. Amongst Brian's features are:
• Flexible neuron models: these can be defined in many ways, notably by directly providing differential equations (including stochastic DEs), or modularly, using standard components like ion channels and alpha function postsynaptic currents.
• Built in analysis and plotting: using the SciPy and PyLab scientific computing and plotting packages.
• Unit checking: equations and quantities are checked for dimensional consistency, which helps to eliminate scaling errors and incorrect equations which can otherwise be very hard to debug.
• Interactive simulations: Using the Python interactive shell, running simulations, changing aspects of the model, plotting and analysis can all be done interactively rather than requiring the network to be run afresh each time.
• Extensibility: Since Brian is written in the same high level language as simulations using it, it is easy to write extensions to Brian and share them with others.
- Brette R, Rudolph M, Carnevale T, Hines M, Beeman D, Bower JM, Diesmann M, Morrison A, Goodman PH, Harris FC, et al: Simulation of networks of spiking neurons: a review of tools and strategies. J Comput Neurosci. 2007, 23 (3): 349-398. 10.1007/s10827-007-0038-6.PubMed CentralView ArticlePubMedGoogle Scholar
This article is published under license to BioMed Central Ltd.