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.
Reviewing Editor
- Frances K Skinner, Krembil Research Institute, University Health Network, Canada
Version history
- Received: April 1, 2019
- Accepted: August 19, 2019
- Accepted Manuscript published: August 20, 2019 (version 1)
- Version of Record published: October 10, 2019 (version 2)
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
-
- 12,919
- views
-
- 1,313
- downloads
-
- 348
- 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
Subpopulations of neurons in the subthalamic nucleus have distinct activity patterns that relate to the three hypotheses of the Drift Diffusion Model.
-
- Neuroscience
The placebo and nocebo effects highlight the importance of expectations in modulating pain perception, but in everyday life we don’t need an external source of information to form expectations about pain. The brain can learn to predict pain in a more fundamental way, simply by experiencing fluctuating, non-random streams of noxious inputs, and extracting their temporal regularities. This process is called statistical learning. Here, we address a key open question: does statistical learning modulate pain perception? We asked 27 participants to both rate and predict pain intensity levels in sequences of fluctuating heat pain. Using a computational approach, we show that probabilistic expectations and confidence were used to weigh pain perception and prediction. As such, this study goes beyond well-established conditioning paradigms associating non-pain cues with pain outcomes, and shows that statistical learning itself shapes pain experience. This finding opens a new path of research into the brain mechanisms of pain regulation, with relevance to chronic pain where it may be dysfunctional.