Brian 2, an intuitive and efficient neural simulator

  1. Marcel Stimberg  Is a corresponding author
  2. Romain Brette
  3. Dan FM Goodman
  1. Sorbonne Université, INSERM, CNRS, France
  2. Imperial College London, United Kingdom


Brian 2 allows scientists to simply and efficiently simulate spiking neural network models. These models can feature novel dynamical equations, their interactions with the environment, and experimental protocols. To preserve high performance when defining new models, most simulators offer two options: low-level programming or description languages. The first option requires expertise, is prone to errors, and is problematic for reproducibility. The second option cannot describe all aspects of a computational experiment, such as the potentially complex logic of a stimulation protocol. Brian addresses these issues using runtime code generation. Scientists write code with simple and concise high-level descriptions, and Brian transforms them into efficient low-level code that can run interleaved with their code. We illustrate this with several challenging examples: a plastic model of the pyloric network, a closed-loop sensorimotor model, a programmatic exploration of a neuron model, and an auditory model with real-time input.

Data availability

Source code to replicate Figures 1-7, as well as the simulations shown in Appendix 4, are provided in a github repository ( Source code to run benchmarks as presented in Figure 8 is provided as a supplementary file together with this submission (

Article and author information

Author details

  1. Marcel Stimberg

    Institut de la Vision, Sorbonne Université, INSERM, CNRS, Paris, France
    For correspondence
    Competing interests
    The authors declare that no competing interests exist.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0002-2648-4790
  2. Romain Brette

    Institut de la Vision, Sorbonne Université, INSERM, CNRS, Paris, France
    Competing interests
    The authors declare that no competing interests exist.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0003-0110-1623
  3. Dan FM Goodman

    Department of Electrical and Electronic Engineering, Imperial College London, London, United Kingdom
    Competing interests
    The authors declare that no competing interests exist.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0003-1007-6474


Agence Nationale de la Recherche (Axode ANR-14-CE13-0003)

  • Romain Brette

The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.

Reviewing Editor

  1. Frances K Skinner, Krembil Research Institute, University Health Network, Canada

Publication history

  1. Received: April 1, 2019
  2. Accepted: August 19, 2019
  3. Accepted Manuscript published: August 20, 2019 (version 1)
  4. Version of Record published: October 10, 2019 (version 2)


© 2019, Stimberg et al.

This article is distributed under the terms of the Creative Commons Attribution License permitting unrestricted use and redistribution provided that the original author and source are credited.


  • 10,257
    Page views
  • 1,033
  • 192

Article citation count generated by polling the highest count across the following sources: Scopus, Crossref, PubMed Central.

Download links

A two-part list of links to download the article, or parts of the article, in various formats.

Downloads (link to download the article as PDF)

Open citations (links to open the citations from this article in various online reference manager services)

Cite this article (links to download the citations from this article in formats compatible with various reference manager tools)

  1. Marcel Stimberg
  2. Romain Brette
  3. Dan FM Goodman
Brian 2, an intuitive and efficient neural simulator
eLife 8:e47314.
  1. Further reading

Further reading

    1. Cell Biology
    2. Neuroscience
    Sanja Jasek, Csaba Verasztó ... Gáspár Jékely
    Research Article Updated

    Cells form networks in animal tissues through synaptic, chemical, and adhesive links. Invertebrate muscle cells often connect to other cells through desmosomes, adhesive junctions anchored by intermediate filaments. To study desmosomal networks, we skeletonised 853 muscle cells and their desmosomal partners in volume electron microscopy data covering an entire larva of the annelid Platynereis. Muscle cells adhere to each other, to epithelial, glial, ciliated, and bristle-producing cells and to the basal lamina, forming a desmosomal connectome of over 2000 cells. The aciculae – chitin rods that form an endoskeleton in the segmental appendages – are highly connected hubs in this network. This agrees with the many degrees of freedom of their movement, as revealed by video microscopy. Mapping motoneuron synapses to the desmosomal connectome allowed us to infer the extent of tissue influenced by motoneurons. Our work shows how cellular-level maps of synaptic and adherent force networks can elucidate body mechanics.

    1. Neuroscience
    Javad Karimi Abadchi, Zahra Rezaei ... Majid H Mohajerani
    Research Article Updated

    Coordinated peri-ripple activity in the hippocampal-neocortical network is essential for mnemonic information processing in the brain. Hippocampal ripples likely serve different functions in sleep and awake states. Thus, the corresponding neocortical activity patterns may differ in important ways. We addressed this possibility by conducting voltage and glutamate wide-field imaging of the neocortex with concurrent hippocampal electrophysiology in awake mice. Contrary to our previously published sleep results, deactivation and activation were dominant in post-ripple neocortical voltage and glutamate activity, respectively, especially in the agranular retrosplenial cortex (aRSC). Additionally, the spiking activity of aRSC neurons, estimated by two-photon calcium imaging, revealed the existence of two subpopulations of excitatory neurons with opposite peri-ripple modulation patterns: one increases and the other decreases firing rate. These differences in peri-ripple spatiotemporal patterns of neocortical activity in sleep versus awake states might underlie the reported differences in the function of sleep versus awake ripples.