Brian 2, an intuitive and efficient neural simulator
Abstract
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 (https://github.com/brian-team/brian2_paper_examples). Source code to run benchmarks as presented in Figure 8 is provided as a supplementary file together with this submission (benchmark_code.zip)
Article and author information
Author details
Funding
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.
Copyright
© 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.
Metrics
-
- 13,674
- views
-
- 1,413
- downloads
-
- 501
- citations
Views, downloads and citations are aggregated across all versions of this paper published by eLife.
Download links
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)
Further reading
-
- Neuroscience
One of the most fundamental laws of physics is the principle of least action. Motivated by its predictive power, we introduce a neuronal least-action principle for cortical processing of sensory streams to produce appropriate behavioral outputs in real time. The principle postulates that the voltage dynamics of cortical pyramidal neurons prospectively minimizes the local somato-dendritic mismatch error within individual neurons. For output neurons, the principle implies minimizing an instantaneous behavioral error. For deep network neurons, it implies the prospective firing to overcome integration delays and correct for possible output errors right in time. The neuron-specific errors are extracted in the apical dendrites of pyramidal neurons through a cortical microcircuit that tries to explain away the feedback from the periphery, and correct the trajectory on the fly. Any motor output is in a moving equilibrium with the sensory input and the motor feedback during the ongoing sensory-motor transform. Online synaptic plasticity reduces the somatodendritic mismatch error within each cortical neuron and performs gradient descent on the output cost at any moment in time. The neuronal least-action principle offers an axiomatic framework to derive local neuronal and synaptic laws for global real-time computation and learning in the brain.
-
- Neuroscience
Memory impairment in chronic pain patients is substantial and common, and few therapeutic strategies are available. Chronic pain-related memory impairment has susceptible and unsusceptible features. Therefore, exploring the underlying mechanisms of its vulnerability is essential for developing effective treatments. Here, combining two spatial memory tests (Y-maze test and Morris water maze), we segregated chronic pain mice into memory impairment-susceptible and -unsusceptible subpopulations in a chronic neuropathic pain model induced by chronic constrictive injury of the sciatic nerve. RNA-Seq analysis and gain/loss-of-function study revealed that S1P/S1PR1 signaling is a determinant for vulnerability to chronic pain-related memory impairment. Knockdown of the S1PR1 in the dentate gyrus (DG) promoted a susceptible phenotype and led to structural plasticity changes of reduced excitatory synapse formation and abnormal spine morphology as observed in susceptible mice, while overexpression of the S1PR1 and pharmacological administration of S1PR1 agonist in the DG promoted an unsusceptible phenotype and prevented the occurrence of memory impairment, and rescued the morphological abnormality. Finally, the Gene Ontology (GO) enrichment analysis and biochemical evidence indicated that downregulation of S1PR1 in susceptible mice may impair DG structural plasticity via interaction with actin cytoskeleton rearrangement-related signaling pathways including Itga2 and its downstream Rac1/Cdc42 signaling and Arp2/3 cascade. These results reveal a novel mechanism and provide a promising preventive and therapeutic molecular target for vulnerability to chronic pain-related memory impairment.