Auryn simulator

Simulator for spiking neural networks with synaptic plasticity

User Tools

Site Tools


manual:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
manual:start [2016/05/02 19:54] – Change to spk extension zenkemanual:start [2018/02/07 08:58] (current) – [Connections and plasticity] zenke
Line 1: Line 1:
-======= Manual =======+====== General ======
  
-Auryn is a set of lightweight classes combined with some examples of how to use themThe power of the framework derives from its speed and extensibility if you do not hesitate to write a few lines of C++ code. +  * Compiling Auryn: See [[:quick start]] or [[CompileAuryn]] for instructions. 
 +  * [[Building blocks]] of every simulation 
 +  * [[Simulator structure]] 
 +  * [[Simulation program]] 
  
  
-===== Quick start =====+===== Neuron models and populations =====
  
-First, install cmake, git and some additional packages. Under Ubuntu or Debian simply  +[[Neurons and populations]]
-<code>sudo apt-get install cmake git build-essential libboost-all-dev</code> +
-now download and compile Auryn with the following commands +
-<code> +
-git clone https://github.com/fzenke/auryn.git && cd auryn +
-mkdir build && cd build +
-cmake ../ -DCMAKE_BUILD_TYPE=Release && make +
-</code> +
-This will checkout the ''master'' branch and compile it in the subdirectory ''auryn/build/''. At this point cmake will complain about any missing [[required libraries|libraries]]. For more detailed instructions on where to download and how to compile go to [[manual:compileAuryn|howto compile Auryn]].+
  
-Now, let's run a first small Auryn simulation: 
-<code> 
-cd examples 
-./sim_poisson 
-</code> 
-This will only take a few milliseconds and generate a bunch of Poisson spikes. If you have gnuplot installed (sudo apt-get install gnuplot) you can visualize them from the command line with 
-<code> 
-echo "plot 'poisson.0.ras' with dots lc rgb 'black'" | gnuplot -p 
-</code> 
-{{ :examples:poisson_output.png?300 |}} 
-For more details on this example go [[examples:sim_poisson|here]].  
-===== Further steps ===== 
- 
-After you have [[manual:compileAuryn|compiled Auryn]], you will probably want to familiarize yourself with the simulator first using the supplied [[examples:start|examples]] provided under ''examples''. As a next step you might want to actually change things in these examples to learn how to use the simulator. To learn how to do that you can read [[compileAndRunAurynSimulations|here]]. 
- 
-**Running in parallel with MPI.** 
-Auryn natively compiles against MPI and most of the time you will want to use in parallel to get good performance. Parallel execution is relatively simple. See [[parallel_execution|how it's done]]. 
- 
- 
-====== Building Blocks of Auryn simulations ====== 
- 
-Auryn was written to simulate networks of spiking neurons. To facilitate the process of building your own network simulation, Auryn handles neurons in populations and synaptic connections between them. For instance, if you were to create a balanced network model you do not have to create individual neurons, but you would create two populations: one for the excitatory neurons and for the inhibitory neurons. You would then connect them using [[Connection]] objects that operate on those populations. This allows to specify network models in a relatively compact notation (see for example [[examples:sim_coba_benchmark#the_important_bits|Vogels COBA network]]). 
- 
-===== Neurons and populations ===== 
- 
-Auryn comes with a bunch of standard integrate-and-fire neuron models already implemented. They are all descendants of [[NeuronGroup]]. A good general purpose neuron model to start which implements conductance based synapses is for instance [[IFGroup]] (or [[TIFGroup]] if you don't want a slow NMDA-like conductance) or the [[AdExGroup|AdEx model]] by Brette and Gerstner (2005). If you are used to delta-current synaptic input you might want to take a look at [[IafPscDeltaGroup]], which was written after the example of a neuron model in NEST with the same name. Finally, in many cases you will ultimately want to write your own neuron model which is straight forward in Auryn (see [[tutorials::neurongroup|creating your own NeuronGroup]]). 
- 
- 
-===== Connections and plasticity  ===== 
- 
-In many cases you will want to connect at least some of your populations with random sparse connectivity. To do so you simply instantiate an object of type [[SparseConnection]] which does exactly that. [[SparseConnection]] comes with a set of tools to directly add Hebbian assemblies or other simple structures into the synaptic weight matrix. However, if you want even more structure [[SparseConnection]] can import MatrixMarket files, which conveniently allows you to build complicated connectivity structures in MATLAB or Python and then load them into your simulation. 
- 
-If you want to simulate plastic synapses simply use a Connection object of type [[STPDConnection]] or for instance [[TripletConnection]] for triplet STDP (after Pfister and Gerstner). You want short-term plasticity instead, then [[STPConnection]] is for you. It implements the Tsodyks-Markram model. You want to define arbitrarily shaped STDP windows and do not care about all-to-all spike interactions? Use [[PairInteractionConnection]]. In man cases you will want to write your own plasticity model -- have a look at this tutorial which will help you to get started [[tutorials:writing_your_own_plasticity_model]]. 
- 
-===== External Input ===== 
- 
-In most cases you will want to give some external input. Auryn has multiple classes which allow you to give spiking or current input to your neurons in a network. The most simple form of external input comes in the form of a homogeneous population of Poisson neurons which fire at constant rate [[PoissonGroup]]. If you want the input population to have a spatial firing rate profile instead use [[ProfilePoissonGroup]]. To give Poisson input with temporally varying firing rates use [[FileModulatedPoissonGroup]]. The latter will read the firing rates from a time series file ([[tiser]]) which you supply in text format. Finally if you want to stimulate your network with time varying Poisson input from multiple sub-populations within the external Poisson neuron population [[StimulusGroup]] might be right pick for you. If you want more control just create a [[ras]] file in your favourite programming language (e.g. Python) and simply load it into the Auryn simulation from an external file using [[FileInputGroup]]. If that's not enough you can write highly specific input groups for different purposes; see for instance [[AuditoryBeepGroup]] for an example. 
- 
- 
- 
-===== Monitoring and Readout ===== 
- 
-Per default Auryn does not record any information. To see what is happening in your network, you will have to define [[Monitor]] objects. Each Monitor specializes on reading out one specific quantity from a network simulation. For instance, a [[SpikeMonitor]] records the spikes generated from one specific [[SpikingGroup]] or [[NeuronGroup]]. Typically you will at least use one of those. If you would like to know about the membrane voltage of one specific neuron in a [[NeuronGroup]] you can use an instance of [[VoltageMonitor]]. If you are interested in other internal states of a Neuron (e.g. conductances, etc...), have a look at [[StateMonitor]]. Think carefully which information you actually need from your simulation, because recording values slows your simulation down and quickly produces enormous amounts of data.  
- 
-Auryn was specifically designed to study synaptic plasticity. To see plasticity in action you can monitor single synaptic weights or groups of them using a [[WeightMonitor]] object. If you are only interested in let's say the mean weight change in one of the plastic [[Connection]] objects your defined (i.e. the mean weight between two neuronal populations in your simulation), you can use [[WeightStatsMonitor]]. You will find other Monitor classes in the Auryn ''src'' directory (see also the [[http://www.fzenke.net/auryn/doxygen/current/annotated.html|Class index]]; Monitor classes should be suffixes with ''Monitor'') or you can write your own for your specific needs.  
- 
-In most cases Auryn [[Monitor]] objects will record data to files on disk on perform a minimum of online analysis. This can be cumbersome if you would for instance like to monitor the activity in your network and stop a simulation if the activity explodes or the network falls quiescent. To tackle this problem, Auryn has a specific class which allows minimalistic online monitoring. They are called [[Checker|Checkers]]. 
- 
-==== What's a Checker? ==== 
- 
-Suppose you are running a simulation of a plastic network, but every now and then the activity in your simulations explodes, because something is wrong with your plasticity parameters. Instead of storing hours and gigabytes of synchronous high frequency spiking from this run you can define a [[RateChecker]] with specific firing rate limits of one specific target population in your simulation. If the firing rate goes out of your predefined bounds the [[Checker]] will terminate the run. You can define multiple Checkers for different populations and you can write your own [[Checker]] with the functionality you need. 
- 
-====== Simulator Structure ====== 
- 
-Most objects in Auryn that have a direct network function can be subdivided into [[SpikingGroup]], [[Connection]] and [[Monitor]]. These three base classes implement the important interfaces that are called consecutively during the Auryn [[duty cycle]]. Instances of their descendants are registered and managed by the [[manual:System]] class, an instance of which is global to each Auryn [[simulation]]. Similarly global is the the [[manual:Logger]] class which takes care of logging output on the console and into log files. 
- 
-===== SpikingGroups ===== 
- 
-  * [[manual:SpikingGroup]] 
-  * [[manual:PoissonGroup]] 
-  * [[manual:FileInputGroup]] 
-  * [[manual:StimulusGroup]] 
   * [[manual:NeuronGroup]]   * [[manual:NeuronGroup]]
     * [[manual:IFGroup]]     * [[manual:IFGroup]]
Line 83: Line 16:
     * [[manual:IF2Group]]     * [[manual:IF2Group]]
     * [[manual:AdExGroup]]     * [[manual:AdExGroup]]
 +    * [[manual:IzhikevichGroup]]
     * [[manual:AIFGroup]]     * [[manual:AIFGroup]]
     * [[manual:AIF2Group]]     * [[manual:AIF2Group]]
  
-===== Connections =====+===== External Input and Stimuli ===== 
 + 
 +[[External Input and Stimuli]] 
 + 
 +  * [[manual:PoissonGroup]] 
 +  * [[manual:FileInputGroup]] 
 +  * [[manual:StimulusGroup]] 
 + 
 + 
 +===== Connections and plasticity ===== 
 + 
 +[[Connections and plasticity]]
  
-  * [[manual:Connection]] 
   * [[manual:SparseConnection]]   * [[manual:SparseConnection]]
-  * [[manual:DuplexConnection]]+  * [[manual:STPConnection]]
   * [[manual:TripletConnection]]   * [[manual:TripletConnection]]
   * [[manual:ZynapseConnection]]   * [[manual:ZynapseConnection]]
  
-===== Monitors =====+===== Monitoring and Readout ===== 
 + 
 +[[Monitoring and Readout]]
  
   * [[manual:Monitor]]   * [[manual:Monitor]]
Line 103: Line 49:
   * [[manual:WeightMonitor]]   * [[manual:WeightMonitor]]
  
-===== IO File Formats ===== +Most monitor instances write their output to an individual file. Many file formats are human readable, while others are binarySee [[IO File Formats]] for a more complete overview of typical file formats. 
- +
-To minimize complicated IO operations Auryn dumps most of its monitor data directly into human readable text files that can be post processes using standard Linux command line software and visualized easily (e.g. with Gnuplot). +
- +
-  * [[manual:ras]] files +
-  * [[manual:spk]] binary raster files +
-  * [[manual:wmat]] files +
-  * [[manual:mem]] and other 1d time series files (such as ampa, gaba, nmda) +
-  * [[manual:syn]] file +
-  * [[manual:prate]] file and [[manual:pact]] file +
-  * [[manual:pat]] files +
-  * [[manual:stim]] stim files+
  
  
manual/start.1462218856.txt.gz · Last modified: 2016/05/02 19:54 by zenke