NEST  2.6.0,not_revisioned_source_dir@0
ginzburg_neuron.h
Go to the documentation of this file.
1 /*
2  * ginzburg_neuron.h
3  *
4  * This file is part of NEST.
5  *
6  * Copyright (C) 2004 The NEST Initiative
7  *
8  * NEST is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * NEST is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef GINZBURG_NEURON_H
24 #define GINZBURG_NEURON_H
25 
26 #include "binary_neuron.h"
27 #include "binary_neuron_impl.h"
28 
29 namespace nest
30 {
31  /* BeginDocumentation
32  Name: ginzburg_neuron - Binary stochastic neuron with sigmoidal activation function.
33 
34  Description:
35  The ginzburg_neuron is an implementation of a binary neuron that
36  is irregularly updated as Poisson time points. At each update
37  point the total synaptic input h into the neuron is summed up,
38  passed through a gain function g whose output is interpreted as
39  the probability of the neuron to be in the active (1) state.
40 
41  The gain function g used here is g(h) = c1*h + c2 * 0.5*(1 +
42  tanh(c3*(h-theta))) (output clipped to [0,1]). This allows to
43  obtain affin-linear (c1!=0, c2!=0, c3=0) or sigmoidal (c1=0,
44  c2=1, c3!=0) shaped gain functions. The latter choice
45  corresponds to the definition in [1], giving the name to this
46  neuron model.
47  The choice c1=0, c2=1, c3=beta/2 corresponds to the Glauber
48  dynamics [2], g(h) = 1 / (1 + exp(-beta (h-theta))).
49  The time constant tau_m is defined as the mean
50  inter-update-interval that is drawn from an exponential
51  distribution with this parameter. Using this neuron to reprodce
52  simulations with asynchronous update [1], the time constant needs
53  to be chosen as tau_m = dt*N, where dt is the simulation time
54  step and N the number of neurons in the original simulation with
55  asynchronous update. This ensures that a neuron is updated on
56  average every tau_m ms. Since in the original paper [1] neurons
57  are coupled with zero delay, this implementation follows this
58  definition. It uses the update scheme described in [3] to
59  maintain causality: The incoming events in time step t_i are
60  taken into account at the beginning of the time step to calculate
61  the gain function and to decide upon a transition. In order to
62  obtain delayed coupling with delay d, the user has to specify the
63  delay d+h upon connection, where h is the simulation time step.
64 
65  Remarks:
66  This neuron has a special use for spike events to convey the
67  binary state of the neuron to the target. The neuron model
68  only sends a spike if a transition of its state occurs. If the
69  state makes an up-transition it sends a spike with multiplicity 2,
70  if a down transition occurs, it sends a spike with multiplicity 1.
71  The neuron accepts several sources of currents, e.g. from a
72  noise_generator.
73 
74  Parameters:
75  tau_m double - Membrane time constant (mean inter-update-interval) in ms.
76  theta double - threshold for sigmoidal activation function mV
77  c1 double - linear gain factor (probability/mV)
78  c2 double - prefactor of sigmoidal gain (probability)
79  c3 double - slope factor of sigmoidal gain (1/mV)
80 
81  References:
82  [1] Iris Ginzburg, Haim Sompolinsky. Theory of correlations in stochastic neural networks (1994). PRE 50(4) p. 3171
83  [2] Hertz Krogh, Palmer. Introduction to the theory of neural computation. Westview (1991).
84  [3] Abigail Morrison, Markus Diesmann. Maintaining Causality in Discrete Time Neuronal Simulations.
85  In: Lectures in Supercomputational Neuroscience, p. 267. Peter beim Graben, Changsong Zhou, Marco Thiel, Juergen Kurths (Eds.), Springer 2008.
86 
87  Sends: SpikeEvent
88  Receives: SpikeEvent, PotentialRequest
89  FirstVersion: February 2010
90  Author: Moritz Helias
91  SeeAlso: pp_psc_delta
92  */
93 
95  {
96  private:
97 
100 
103 
106 
109 
110  public:
114  theta_ ( 0.0 ), // mV
115  c1_ ( 0.0 ), // (mV)^-1
116  c2_ ( 1.0 ), // dimensionless
117  c3_ ( 1.0 ) // (mV)^-1
118  {}
119 
120  void get(DictionaryDatum&) const;
121  void set(const DictionaryDatum&);
122 
124  };
125 
126  inline
128  {
129  return rng->drand() < c1_ * h + c2_ * 0.5 * (1.0 + tanh( c3_ * (h - theta_) ));
130  }
131 
133 
134  template <>
136 
137 } // namespace nest
138 
139 
140 
141 #endif /* #ifndef GINZBURG_NEURON_H */
Binary stochastic neuron with linear or sigmoidal gain function.
Definition: binary_neuron.h:48
Definition: lockptrdatum.h:40
gainfunction_ginzburg()
sets default parameters
Definition: ginzburg_neuron.h:113
binary_neuron< nest::gainfunction_ginzburg > ginzburg_neuron
Definition: ginzburg_neuron.h:132
const Name h("h")
Summed input to a neuron (Ginzburg neuron)
Definition: nest_names.h:158
void set(const DictionaryDatum &)
Set values from dicitonary.
Definition: ginzburg_neuron.cpp:36
double_t theta_
threshold of sigmoidal activation function
Definition: ginzburg_neuron.h:99
double_t c3_
gain factor of sigmoidal gain function
Definition: ginzburg_neuron.h:108
Definition: ginzburg_neuron.h:94
double_t c2_
prefactor of sigmoidal gain function
Definition: ginzburg_neuron.h:105
bool operator()(librandom::RngPtr rng, double_t h)
Definition: ginzburg_neuron.h:127
double double_t
Double precision floating point numbers.
Definition: nest.h:93
double_t c1_
linear gain factor of gain function
Definition: ginzburg_neuron.h:102
void create()
Create the map.
Definition: recordables_map.h:118