# NEST (software)

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/NEST_(software)
> Markdown URL: https://mediated.wiki/source/NEST_(software).md
> Source: https://en.wikipedia.org/wiki/NEST_(software)
> Source revision: 1296809389
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Confuse|Novell Embedded Systems Technology}}
{{Use dmy dates|date=February 2020|cs1-dates=y}}
{{Infobox software
| name                   = NEST (Neural Simulation Tool)
| logo                   = frameless
| screenshot             = 
| author                 = Markus Diesmann, Marc-Oliver Gewaltig, Abigail Morrison, Hans Ekkehard Plesser
| developer              = [https://www.nest-initiative.org The NEST Initiative]
| released               = {{Start date|2004|08|01|df=yes}}
| latest release version = 3.3
| latest release date    = {{Start date and age|2023|03|22|df=yes}}
| programming language   = [C++](/source/C%2B%2B), [Python](/source/Python_(programming_language)), [Cython](/source/Cython)
| operating system       = [cross-platform](/source/cross-platform)
| language               = English
| genre                  = [Computational Neuroscience](/source/Computational_Neuroscience)
| license                = [GPL](/source/GPL)v2+
| website                = {{url|www.nest-simulator.org}}
| repo                   = {{url|github.com/nest/nest-simulator}}
}}

'''NEST''' is a [simulation software](/source/simulation_software) for [spiking neural network](/source/spiking_neural_network) models, including large-scale neuronal networks. NEST was initially developed by Markus Diesmann and Marc-Oliver Gewaltig and is now developed and maintained by the NEST Initiative.

== Modeling philosophy ==

A NEST [simulation](/source/simulation) tries to follow the logic of an [electrophysiological](/source/Electrophysiology) experiment that takes place inside a computer with the difference, that the [neural system](/source/Biological_neural_network) to be investigated must be defined by the experimenter.

The neural system is defined by a possibly large number of [neurons](/source/Biological_neuron_model) and their [connections](/source/Synapse). In a NEST network, different neuron and synapse models can coexist. Any two neurons can have multiple connections with different properties. Thus, the connectivity can in general not be described by a weight or [connectivity matrix](/source/Adjacency_matrix) but rather as an [adjacency list](/source/adjacency_list).

To manipulate or observe the network dynamics, the experimenter can define so-called devices which represent the various instruments (for measuring and stimulation) found in an experiment. These devices write their data either to [memory](/source/Computer_memory) or to file.

NEST is extensible and new models for neurons, synapses, and devices can be added.

==Example==
thumb|NEST raster

The following example simulates spiking activity in a sparse random network with recurrent excitation and inhibition<ref>{{cite journal | url=https://doi.org/10.1023%2FA%3A1008925309027 | doi=10.1023/A:1008925309027 | date=2000 | last1=Brunel | first1=Nicolas | title=Dynamics of Sparsely Connected Networks of Excitatory and Inhibitory Spiking Neurons | journal=Journal of Computational Neuroscience | volume=8 | issue=3 | pages=183–208 | pmid=10809012 | s2cid=1849650 | url-access=subscription }}</ref>

The figure shows the [spiking activity](/source/Action_potential) of 50 neurons as a [raster plot](/source/raster_plot). Time increases along the horizontal axis, neuron id increases along the vertical axis.  Each dot corresponds to a [spike](/source/Action_potential) of the respective neuron at a given time. The lower part of the figure shows a [histogram](/source/histogram) with the mean firing-rate of the neurons.

<syntaxhighlight lang="python">
import nest
import nest.raster_plot

J_ex = 0.1  # excitatory weight
J_in = -0.5  # inhibitory weight
p_rate = 20000.0  # external Poisson rate

neuron_params= {"C_m": 1.0, "tau_m": 20.0, "t_ref": 2.0,
                "E_L": 0.0, "V_reset": 0.0, "V_m": 0.0, "V_th": 20.0}

# Set parameters of neurons and devices
nest.SetDefaults("iaf_psc_delta", neuron_params)
nest.SetDefaults("poisson_generator", {"rate": p_rate})
nest.SetDefaults("spike_detector", {"withtime": True, "withgid": True})

# Create neurons and devices
nodes_ex = nest.Create("iaf_psc_delta", 10000)
nodes_in = nest.Create("iaf_psc_delta", 2500)
noise = nest.Create("poisson_generator")
espikes = nest.Create("spike_detector")

# Configure synapse models
nest.CopyModel("static_synapse", "excitatory", {"weight": J_ex, "delay": 1.5})
nest.CopyModel("static_synapse", "inhibitory", {"weight": J_in, "delay": 1.5})

# Connect the random net and instrument it with the devices
nest.Connect(nodes_ex, nodes_ex + nodes_in, {"rule": "fixed_indegree", "indegree": 1000}, "excitatory")
nest.Connect(nodes_in, nodes_ex + nodes_in, {"rule": "fixed_indegree", "indegree": 250}, "inhibitory")
nest.Connect(noise, nodes_ex + nodes_in, syn_spec="excitatory")
nest.Connect(nodes_ex[1:51], espikes)

# Simulate for 100. ms
nest.Simulate(100.0)

# Plot results
nest.raster_plot.from_device(espikes, hist=True)
nest.raster_plot.show()
</syntaxhighlight>

==Features==
=== Neuron models ===
* [Integrate-and-fire](/source/Integrate-and-fire) models with different types of synaptic currents or potentials
* [Integrate-and-fire](/source/Integrate-and-fire) models with conductance based synapses
* Single compartment [Hodgkin–Huxley model](/source/Hodgkin%E2%80%93Huxley_model)s
* Adaptive Exponential Integrate and Fire neuron (AdEx)
* MAT2 neuron model

=== Network models ===
* [Random neural network](/source/Random_network)
* [Topological networks](/source/Topographic_map_(Neuroanatomy))
* Data-driven network models

=== Synapse models ===
* Static synapses with homogeneous or heterogeneous weight and delay.
* [Spike-timing-dependent plasticity](/source/Spike-timing-dependent_plasticity)
* Short-term plasticity (Tsodyks & Markram synapses)
* [Neuromodulated synapses](/source/Neuromodulation), using [Dopamine](/source/Dopamine).

=== Device models ===
* Spike detector
* Multimeter for potentials, currents, etc.
* AC, DC, and step current generators
* Noise generators (Poisson, Gauss, Gamma)
* Spike generators for replay of spikes

=== Accuracy ===
* NEST aims at high accuracy and precision of its simulations<ref>{{Cite journal |pmid=21837455 |date=2012 |last1=Henker |first1=S. |last2=Partzsch |first2=J. |last3=Schüffny |first3=R. |title=Accuracy evaluation of numerical methods used in state-of-the-art simulators for spiking neural networks |journal=Journal of Computational Neuroscience |volume=32 |issue=2 |pages=309–326 |doi=10.1007/s10827-011-0353-9 |s2cid=254601151 }}</ref>
* Each neuron model has its appropriate solver and many models have unit tests.
* If possible, exact integration<ref>{{cite journal | url=https://doi.org/10.1007%2Fs004220050570 | doi=10.1007/s004220050570 | title=Exact digital simulation of time-invariant linear systems with applications to neuronal modeling | date=1999 | last1=Rotter | first1=Stefan | last2=Diesmann | first2=Markus | journal=Biological Cybernetics | volume=81 | issue=5–6 | pages=381–402 | pmid=10592015 | s2cid=8124866 | url-access=subscription }}</ref> is used.
* By default, spikes fall onto the grid, defined by the simulation time-step. Some models support spike-exchange in continuous time.<ref>{{cite journal | url=https://dx.doi.org/10.1162/neco.2007.19.1.47 | doi=10.1162/neco.2007.19.1.47 | title=Exact Subthreshold Integration with Continuous Spike Times in Discrete-Time Neural Network Simulations | date=2007 | last1=Morrison | first1=Abigail | last2=Straube | first2=Sirko | last3=Plesser | first3=Hans Ekkehard | last4=Diesmann | first4=Markus | journal=Neural Computation | volume=19 | issue=1 | pages=47–79 | pmid=17134317 | s2cid=8517223 | url-access=subscription }}</ref>

=== Parallel and distributed simulation ===
* Support for multi-threaded simulation, using [OpenMP](/source/OpenMP) or [POSIX Threads](/source/POSIX_Threads).
* Support for hybrid multi-threaded and distributed simulation.
* Parallelization is handled semi-automatically by NEST's simulation kernel.
* Supra-linear to linear scaling for up to 10000 [cores](/source/Multi-core_processor).<ref name="dx">{{cite book | chapter-url=https://dx.doi.org/10.1007/978-3-540-74466-5_71 | doi=10.1007/978-3-540-74466-5_71 | chapter=Efficient Parallel Simulation of Large-Scale Neuronal Networks on Clusters of Multiprocessor Computers | title=Euro-Par 2007 Parallel Processing | series=Lecture Notes in Computer Science | date=2007 | last1=Plesser | first1=Hans E. | last2=Eppler | first2=Jochen M. | last3=Morrison | first3=Abigail | last4=Diesmann | first4=Markus | last5=Gewaltig | first5=Marc-Oliver | volume=4641 | pages=672–681 | isbn=978-3-540-74465-8 }}</ref>

=== Interoperability ===
* Interface to the Multi Simulator Coordinator, developed by the [INCF](/source/INCF).<ref>{{cite journal | url=https://doi.org/10.1007%2Fs12021-010-9064-z | doi=10.1007/s12021-010-9064-z | title=Run-Time Interoperability Between Neuronal Network Simulators Based on the MUSIC Framework | date=2010 | last1=Djurfeldt | first1=Mikael | last2=Hjorth | first2=Johannes | last3=Eppler | first3=Jochen M. | last4=Dudani | first4=Niraj | last5=Helias | first5=Moritz | last6=Potjans | first6=Tobias C. | last7=Bhalla | first7=Upinder S. | last8=Diesmann | first8=Markus | last9=Hellgren Kotaleski | first9=Jeanette | last10=Ekeberg | first10=Örjan | journal=Neuroinformatics | volume=8 | issue=1 | pages=43–60 | pmid=20195795 | pmc=2846392 }}</ref>
* Interface to the simulator independent simulation language [PyNN](/source/PyNN_(software)).

==History==

NEST development was started in 1993 by Markus Diesmann and Marc-Oliver Gewaltig at the [Ruhr University Bochum](/source/Ruhr_University), [Bochum](/source/Bochum), Germany and the [Weizmann Institute of Science](/source/Weizmann_Institute_of_Science) in [Rehovot](/source/Rehovot), [Israel](/source/Israel). At this time, the simulator was called SYNOD and simulations were defined in a stack based simulation language, called SLI.<ref>{{Cite AV media |url=https://www.youtube.com/watch?v=K7KXmIv6ROY |title=NEST - A brain simulator |date=2012-07-11 |type=video |publisher=[Bernstein Network](/source/Bernstein_Network) |via=YouTube}}</ref>

In 2001, the software changed its name from SYNOD to NEST. Until 2004, NEST was exclusively developed and used by the founding members of the NEST Initiative. The first public release appeared in summer 2004. Since then, NEST was released regularly, about once or twice per year.

Since 2007, NEST supports hybrid parallelism, using [POSIX threads](/source/POSIX_threads) and [MPI](/source/Message_Passing_Interface).<ref name="dx" />

In 2008, the stack-based simulation language SLI was superseded by a modern [Python](/source/Python_(programming_language)) interface, however, the old simulation language is still used internally.<ref>{{Cite journal |doi=10.3389/neuro.11.012.2008 |doi-access=free |title=PyNEST: A convenient interface to the NEST simulator |date=2008 |last1=Eppler |first1=Jochen M. |last2=Helias |first2=M. |last3=Muller |first3=E. |last4=Diesmann |first4=M. |last5=Gewaltig |first5=M. O. |journal=Frontiers in Neuroinformatics |volume=2 |page=12 |pmid=19198667 |pmc=2636900 }}</ref>
At the same time, the simulator independent specification language [PyNN](/source/PyNN_(software)) was developed with support for NEST.<ref>{{Cite journal |pmc=2634533 |date=2009 |last1=Davison |first1=A. P. |last2=Brüderle |first2=D. |last3=Eppler |first3=J. |last4=Kremkow |first4=J. |last5=Muller |first5=E. |last6=Pecevski |first6=D. |last7=Perrinet |first7=L. |last8=Yger |first8=P. |title=PyNN: A Common Interface for Neuronal Network Simulators |journal=Frontiers in Neuroinformatics |volume=2 |page=11 |doi=10.3389/neuro.11.011.2008 |pmid=19194529 |doi-access=free }}</ref>
In 2012, the NEST Initiative changed the license from the proprietary NEST License to [GNU GPL](/source/GPL) V2 or later.

== User interfaces ==
* NEST primary user interface is PyNEST, a  [Python](/source/Python_(programming_language)) package that controls the NEST simulation kernel. PyNEST aims at easy usability and seamless interaction with  [Python](/source/Python_(programming_language)) and its libraries.
* [PyNN](/source/PyNN_(software)) is a simulator independent language for neural simulations, which supports NEST as well as [BRIAN](/source/Brian_(software)), [NEURON](/source/Neuron_(software)), as well as neuromorphic hardware.
* NEST also maintains its own simulation language [interpreter](/source/Interpreter_(computing)) (SLI), which understands a simple [Stack-oriented programming language](/source/Stack-oriented_programming_language) that is influenced by [PostScript](/source/PostScript).{{cn|date=November 2018}}

== See also ==
{{Portal|Free and open-source software}}
* [Brian (software)](/source/Brian_(software))
* [Computational Neuroscience](/source/Computational_Neuroscience)
* [GENESIS (software)](/source/GENESIS_(software))
* [MLDesigner](/source/MLDesigner)
* [Neuron (software)](/source/Neuron_(software))
* [OMNeT++](/source/OMNeT%2B%2B)
* [QualNet](/source/QualNet)

==References==
{{Reflist}}

== External links ==
* {{Official website|https://www.nest-initiative.org/}}
* [http://home.earthlink.net/~perlewitz/sftwr.html List of simulation packages]
* {{GitHub|nest/nest-simulator}}

Category:Computational biology
Category:Computational neuroscience
Category:Simulation software
Category:Scientific simulation software
Category:Science software
Category:Free science software

---
Adapted from the Wikipedia article [NEST (software)](https://en.wikipedia.org/wiki/NEST_(software)) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/NEST_(software)?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
