NEST main@caf0ae8
 
Loading...
Searching...
No Matches
eprop_iaf_adapt_bsshslm_2020.h
Go to the documentation of this file.
1/*
2 * eprop_iaf_adapt_bsshslm_2020.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 EPROP_IAF_ADAPT_BSSHSLM_2020_H
24#define EPROP_IAF_ADAPT_BSSHSLM_2020_H
25
26// nestkernel
27#include "connection.h"
30#include "event.h"
31#include "nest_types.h"
32#include "ring_buffer.h"
34
35namespace nest
36{
37
38/* BeginUserDocs: neuron, e-prop plasticity, current-based, integrate-and-fire, adaptation, hard threshold, Bellec
39
40Short description
41+++++++++++++++++
42
43Current-based leaky integrate-and-fire neuron model with delta-shaped or exponentially filtered
44postsynaptic currents and threshold adaptation for e-prop plasticity
45
46Description
47+++++++++++
48
49``eprop_iaf_adapt_bsshslm_2020`` is an implementation of a leaky integrate-and-fire
50neuron model with delta-shaped postsynaptic currents and threshold adaptation
51used for eligibility propagation (e-prop) plasticity.
52
53E-prop plasticity was originally introduced and implemented in TensorFlow in :footcite:p:`Bellec2020`.
54
55The suffix ``_bsshslm_2020`` follows the NEST convention to indicate in the
56model name the paper that introduced it by the first letter of the authors' last
57names and the publication year.
58
59 .. note::
60 The neuron dynamics of the ``eprop_iaf_adapt_bsshslm_2020`` model (excluding
61 e-prop plasticity and the threshold adaptation) are similar to the neuron
62 dynamics of the ``iaf_psc_delta`` model, with minor differences, such as the
63 propagator of the post-synaptic current and the voltage reset upon a spike.
64
65The membrane voltage time course :math:`v_j^t` of the neuron :math:`j` is given by:
66
67.. math::
68 v_j^t &= \alpha v_j^{t-1} + \zeta \sum_{i \neq j} W_{ji}^\text{rec} z_i^{t-1}
69 + \zeta \sum_i W_{ji}^\text{in} x_i^t - z_j^{t-1} v_\text{th} \,, \\
70 \alpha &= e^{ -\frac{ \Delta t }{ \tau_\text{m} } } \,, \\
71 \zeta &=
72 \begin{cases}
73 1 \\
74 1 - \alpha
75 \end{cases} \,, \\
76
77where :math:`W_{ji}^\text{rec}` and :math:`W_{ji}^\text{in}` are the recurrent and
78input synaptic weight matrices, and :math:`z_i^{t-1}` is the recurrent presynaptic
79state variable, while :math:`x_i^t` represents the input at time :math:`t`.
80
81Descriptions of further parameters and variables can be found in the table below.
82
83The threshold adaptation is given by:
84
85.. math::
86 A_j^t &= v_\text{th} + \beta a_j^t \,, \\
87 a_j^t &= \rho a_j^{t-1} + z_j^{t-1} \,, \\
88 \rho &= e^{-\frac{ \Delta t }{ \tau_\text{a} }} \,. \\
89
90The spike state variable is expressed by a Heaviside function:
91
92.. math::
93 z_j^t = H \left( v_j^t - A_j^t \right) \,. \\
94
95If the membrane voltage crosses the adaptive threshold voltage :math:`A_j^t`, a spike is
96emitted and the membrane voltage is reduced by :math:`v_\text{th}` in the next
97time step. After the time step of the spike emission, the neuron is not
98able to spike for an absolute refractory period :math:`t_\text{ref}`.
99
100An additional state variable and the corresponding differential equation
101represents a piecewise constant external current.
102
103See the documentation on the :doc:`iaf_psc_delta<../models/iaf_psc_delta/>` neuron model
104for more information on the integration of the subthreshold dynamics.
105
106The change of the synaptic weight is calculated from the gradient :math:`g` of
107the loss :math:`E` with respect to the synaptic weight :math:`W_{ji}`:
108:math:`\frac{ \text{d}E }{ \text{d} W_{ij} }`
109which depends on the presynaptic
110spikes :math:`z_i^{t-1}`, the surrogate gradient or pseudo-derivative
111of the spike state variable with respect to the postsynaptic membrane
112voltage :math:`\psi_j^t` (the product of which forms the eligibility
113trace :math:`e_{ji}^t`), and the learning signal :math:`L_j^t` emitted
114by the readout neurons.
115
116.. math::
117 \frac{ \text{d} E }{ \text{d} W_{ji} } &= \sum_t L_j^t \bar{e}_{ji}^t \,, \\
118 e_{ji}^t &= \psi_j^t \left( \bar{z}_i^{t-1} - \beta \epsilon_{ji,a}^{t-1} \right) \,, \\
119 \epsilon^{t-1}_{ji,\text{a}} &= \psi_j^{t-1} \bar{z}_i^{t-2} + \left( \rho - \psi_j^{t-1} \beta \right)
120 \epsilon^{t-2}_{ji,a} \,. \\
121
122.. include:: ../models/eprop_iaf.rst
123 :start-after: .. start_surrogate-gradient-functions
124 :end-before: .. end_surrogate-gradient-functions
125
126The eligibility trace and the presynaptic spike trains are low-pass filtered
127with the following exponential kernels:
128
129.. math::
130 \bar{e}_{ji}^t &= \mathcal{F}_\kappa \left( e_{ji}^t \right) \,, \\
131 \kappa &= e^{ -\frac{\Delta t }{ \tau_\text{m,out} }} \,, \\
132 \bar{z}_i^t &= \mathcal{F}_\alpha(z_i^t) \,, \\
133 \mathcal{F}_\alpha \left( z_i^t \right) &= \alpha \mathcal{F}_\alpha \left( z_i^{t-1} \right) + z_i^t \,, \\
134 \mathcal{F}_\alpha \left( z_i^0 \right) &= z_i^0 \,, \\
135
136where :math:`\tau_\text{m,out}` is the membrane time constant of the readout neuron.
137
138Furthermore, a firing rate regularization mechanism keeps the average firing
139rate :math:`f^\text{av}_j` of the postsynaptic neuron close to a target firing rate
140:math:`f^\text{target}`. The gradient :math:`g_\text{reg}` of the regularization loss :math:`E_\text{reg}`
141with respect to the synaptic weight :math:`W_{ji}` is given by:
142
143.. math::
144 \frac{ \text{d} E_\text{reg} }{ \text{d} W_{ji} }
145 = c_\text{reg} \sum_t \frac{ 1 }{ T n_\text{trial} }
146 \left( f^\text{target} - f^\text{av}_j \right) e_{ji}^t \,, \\
147
148where :math:`c_\text{reg}` is a constant scaling factor and the average
149is taken over the time that passed since the previous update, that is, the number of
150trials :math:`n_\text{trial}` times the duration of an update interval :math:`T`.
151
152The overall gradient is given by the addition of the two gradients.
153
154For more information on e-prop plasticity, see the documentation on the other e-prop models:
155
156 * :doc:`eprop_iaf_bsshslm_2020<../models/eprop_iaf_bsshslm_2020/>`
157 * :doc:`eprop_readout_bsshslm_2020<../models/eprop_readout_bsshslm_2020/>`
158 * :doc:`eprop_synapse_bsshslm_2020<../models/eprop_synapse_bsshslm_2020/>`
159 * :doc:`eprop_learning_signal_connection_bsshslm_2020<../models/eprop_learning_signal_connection_bsshslm_2020/>`
160
161Details on the event-based NEST implementation of e-prop can be found in :footcite:p:`KorcsakGorzo2025`.
162
163Parameters
164++++++++++
165
166The following parameters can be set in the status dictionary.
167
168=========================== ======= ======================= ================ ===================================
169**Neuron parameters**
170----------------------------------------------------------------------------------------------------------------
171Parameter Unit Math equivalent Default Description
172=========================== ======= ======================= ================ ===================================
173``adapt_beta`` :math:`\beta` 1.0 Prefactor of the threshold
174 adaptation
175``adapt_tau`` ms :math:`\tau_\text{a}` 10.0 Time constant of the threshold
176 adaptation
177``C_m`` pF :math:`C_\text{m}` 250.0 Capacitance of the membrane
178``E_L`` mV :math:`E_\text{L}` -70.0 Leak / resting membrane potential
179``I_e`` pA :math:`I_\text{e}` 0.0 Constant external input current
180``regular_spike_arrival`` Boolean ``True`` If ``True``, the input spikes
181 arrive at the end of the time step,
182 if ``False`` at the beginning
183 (determines PSC scale)
184``t_ref`` ms :math:`t_\text{ref}` 2.0 Duration of the refractory period
185``tau_m`` ms :math:`\tau_\text{m}` 10.0 Time constant of the membrane
186``V_min`` mV :math:`v_\text{min}` negative maximum Absolute lower bound of the
187 value membrane voltage
188 representable by
189 ``double``
190 type in C++
191``V_th`` mV :math:`v_\text{th}` -55.0 Spike threshold voltage
192=========================== ======= ======================= ================ ===================================
193
194=============================== ======= ======================= ================== =============================
195**E-prop parameters**
196----------------------------------------------------------------------------------------------------------------
197Parameter Unit Math equivalent Default Description
198=============================== ======= ======================= ================== =============================
199``flush_event_send_interval`` ms maximum value Interval since previous event
200 representable by after which a flush event is
201 ``double`` type in sent
202 C++
203``c_reg`` :math:`c_\text{reg}` 0.0 Coefficient of firing rate
204 regularization
205``f_target`` Hz :math:`f^\text{target}` 10.0 Target firing rate of rate
206 regularization
207``surrogate_gradient_function`` :math:`\psi` "piecewise_linear" Surrogate gradient /
208 pseudo-derivative function
209 ["piecewise_linear",
210 "exponential",
211 "fast_sigmoid_derivative",
212 "arctan_derivative"]
213``surrogate_gradient_height`` :math:`\gamma` 0.3 Height scaling of surrogate
214 gradient / pseudo-derivative
215 of membrane voltage
216``surrogate_gradient_width`` :math:`1/\beta` 1.0 Width scaling of surrogate
217 gradient / pseudo-derivative
218 of membrane voltage
219=============================== ======= ======================= ================== =============================
220
221Recordables
222+++++++++++
223
224The following state variables evolve during simulation and can be recorded.
225
226================== ==== =============== ============= ========================
227**Neuron state variables and recordables**
228------------------------------------------------------------------------------
229State variable Unit Math equivalent Initial value Description
230================== ==== =============== ============= ========================
231``adaptation`` :math:`a_j` 0.0 Adaptation variable
232``V_m`` mV :math:`v_j` -70.0 Membrane voltage
233``V_th_adapt`` mV :math:`A_j` -55.0 Adapting spike threshold
234================== ==== =============== ============= ========================
235
236====================== ==== =============== ============= =========================================
237**E-prop state variables and recordables**
238---------------------------------------------------------------------------------------------------
239State variable Unit Math equivalent Initial value Description
240====================== ==== =============== ============= =========================================
241``learning_signal`` pA :math:`L_j` 0.0 Learning signal
242``surrogate_gradient`` :math:`\psi_j` 0.0 Surrogate gradient / pseudo-derivative of
243 membrane voltage
244====================== ==== =============== ============= =========================================
245
246Usage
247+++++
248
249This model can only be used in combination with the other e-prop models
250and the network architecture requires specific wiring, input, and output.
251The usage is demonstrated in several
252:doc:`supervised regression and classification tasks <../auto_examples/eprop_plasticity/index>`
253reproducing among others the original proof-of-concept tasks in :footcite:p:`Bellec2020`.
254
255References
256++++++++++
257
258.. footbibliography::
259
260Sends
261+++++
262
263SpikeEvent
264
265Receives
266++++++++
267
268SpikeEvent, CurrentEvent, LearningSignalConnectionEvent, DataLoggingRequest
269
270See also
271++++++++
272
273Examples using this model
274+++++++++++++++++++++++++
275
276.. listexamples:: eprop_iaf_adapt_bsshslm_2020
277
278EndUserDocs */
279
280void register_eprop_iaf_adapt_bsshslm_2020( const std::string& name );
281
289{
290
291public:
294
297
298 using Node::handle;
300
301 size_t send_test_event( Node&, size_t, synindex, bool ) override;
302
303 void handle( SpikeEvent& ) override;
304 void handle( CurrentEvent& ) override;
305 void handle( LearningSignalConnectionEvent& ) override;
306 void handle( DataLoggingRequest& ) override;
307
308 size_t handles_test_event( SpikeEvent&, size_t ) override;
309 size_t handles_test_event( CurrentEvent&, size_t ) override;
310 size_t handles_test_event( LearningSignalConnectionEvent&, size_t ) override;
311 size_t handles_test_event( DataLoggingRequest&, size_t ) override;
312
313 void get_status( Dictionary& ) const override;
314 void set_status( const Dictionary& ) override;
315
316private:
317 void init_buffers_() override;
318 void pre_run_hook() override;
319
320 void update( Time const&, const long, const long ) override;
321
322 double compute_gradient( std::vector< long >&, const long, const long, const double, const bool ) override;
323
324 long get_shift() const override;
325 bool is_eprop_recurrent_node() const override;
326
329
331 friend class UniversalDataLogger< eprop_iaf_adapt_bsshslm_2020 >;
332
335 {
338
341
343 double C_m_;
344
346 double c_reg_;
347
349 double E_L_;
350
352 double f_target_;
353
355 double I_e_;
356
359
363
366
369
371 double t_ref_;
372
374 double tau_m_;
375
377 double V_min_;
378
380 double V_th_;
381
383 Parameters_();
384
386 void get( Dictionary& ) const;
387
389 double set( const Dictionary&, Node* );
390 };
391
393 struct State_
394 {
396 double adapt_;
397
400
403
405 int r_;
406
409
411 double i_in_;
412
414 double v_m_;
415
417 double z_;
418
420 double z_in_;
421
423 State_();
424
426 void get( Dictionary&, const Parameters_& ) const;
427
429 void set( const Dictionary&, const Parameters_&, double, Node* );
430 };
431
450
453 {
455 double P_v_m_;
456
459 double P_z_in_;
460
462 double P_i_in_;
463
465 double P_adapt_;
466
469 };
470
472 double
473 get_v_m_() const
474 {
475 return S_.v_m_ + P_.E_L_;
476 }
477
479 double
481 {
482 return S_.surrogate_gradient_;
483 }
484
486 double
488 {
489 return S_.learning_signal_;
490 }
491
493 double
495 {
496 return S_.v_th_adapt_ + P_.E_L_;
497 }
498
500 double
502 {
503 return S_.adapt_;
504 }
505
506 // the order in which the structure instances are defined is important for speed
507
510
513
516
519
522};
523
524inline long
529
530inline bool
535
536inline size_t
537eprop_iaf_adapt_bsshslm_2020::send_test_event( Node& target, size_t receptor_type, synindex, bool )
538{
539 SpikeEvent e;
540 e.set_sender( *this );
541 return target.handles_test_event( e, receptor_type );
542}
543
544inline size_t
546{
547 if ( receptor_type != 0 )
548 {
549 throw UnknownReceptorType( receptor_type, get_name() );
550 }
551
552 return 0;
553}
554
555inline size_t
557{
558 if ( receptor_type != 0 )
559 {
560 throw UnknownReceptorType( receptor_type, get_name() );
561 }
562
563 return 0;
564}
565
566inline size_t
568{
569 if ( receptor_type != 0 )
570 {
571 throw UnknownReceptorType( receptor_type, get_name() );
572 }
573
574 return 0;
575}
576
577inline size_t
579{
580 if ( receptor_type != 0 )
581 {
582 throw UnknownReceptorType( receptor_type, get_name() );
583 }
584
585 return B_.logger_.connect_logging_device( dlr, recordablesMap_ );
586}
587
588inline void
596
597inline void
599{
601 // temporary copies in case of errors
602 Parameters_ ptmp = P_;
603 State_ stmp = S_;
604
605 // make sure that ptmp and stmp consistent - throw BadProperty if not
606 const double delta_EL = ptmp.set( d, this );
607 stmp.set( d, ptmp, delta_EL, this );
608
609 P_ = ptmp;
610 S_ = stmp;
611}
612
613} // namespace nest
614
615#endif // EPROP_IAF_ADAPT_BSSHSLM_2020_H
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Event for electrical currents.
Definition event.h:569
Request data to be logged/logged data to be sent.
Definition event.h:636
Class implementing an intermediate archiving node model for recurrent node models supporting e-prop p...
Definition eprop_archiving_node_recurrent.h:43
void set_status(const Dictionary &d) override
Change properties of the node according to the entries in the dictionary.
Definition eprop_archiving_node_recurrent.h:286
void get_status(Dictionary &d) const override
Export properties of the node by setting entries in the status dictionary.
Definition eprop_archiving_node_recurrent.h:273
const long delay_in_rec_
Transmission delay from input to recurrent neurons.
Definition eprop_archiving_node.h:171
const long offset_gen_
Offset since generator signals start from time step 1.
Definition eprop_archiving_node.h:168
Event for learning signal connections.
Definition secondary_event.h:384
Base class for all NEST network objects.
Definition node.h:99
std::string get_name() const
Return class name.
Definition node.cpp:105
Map names of recordables to data access functions.
Definition recordables_map.h:61
Buffer Layout.
Definition ring_buffer.h:83
Event for spike information.
Definition event.h:418
Definition nest_time.h:135
Exception to be thrown if the specified receptor type does not exist in the node.
Definition exceptions.h:417
Class implementing an adaptive LIF neuron model for e-prop plasticity.
Definition eprop_iaf_adapt_bsshslm_2020.h:289
double compute_gradient(std::vector< long > &, const long, const long, const double, const bool) override
Compute gradient change for eprop synapses.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:431
void set_status(const Dictionary &) override
Change properties of the node according to the entries in the dictionary.
Definition eprop_iaf_adapt_bsshslm_2020.h:598
bool is_eprop_recurrent_node() const override
Checks if the node is part of the recurrent network and thus not a readout neuron.
Definition eprop_iaf_adapt_bsshslm_2020.h:531
void get_status(Dictionary &) const override
Export properties of the node by setting entries in the status dictionary.
Definition eprop_iaf_adapt_bsshslm_2020.h:589
friend class UniversalDataLogger< eprop_iaf_adapt_bsshslm_2020 >
Logger for universal data supporting the data logging request / reply mechanism. Populated with a rec...
Definition eprop_iaf_adapt_bsshslm_2020.h:331
long get_shift() const override
Retrieves the temporal shift of the signal.
Definition eprop_iaf_adapt_bsshslm_2020.h:525
double get_adaptation_() const
Get the current value of the adaptation.
Definition eprop_iaf_adapt_bsshslm_2020.h:501
Buffers_ B_
Structure of buffers.
Definition eprop_iaf_adapt_bsshslm_2020.h:518
void pre_run_hook() override
Re-calculate dependent parameters of the node.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:285
eprop_iaf_adapt_bsshslm_2020()
Default constructor.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:255
size_t send_test_event(Node &, size_t, synindex, bool) override
Send an event to the receiving_node passed as an argument.
Definition eprop_iaf_adapt_bsshslm_2020.h:537
double get_v_th_adapt_() const
Get the current value of the adapting threshold.
Definition eprop_iaf_adapt_bsshslm_2020.h:494
void init_buffers_() override
Configure persistent internal data structures.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:277
Variables_ V_
Structure of internal variables.
Definition eprop_iaf_adapt_bsshslm_2020.h:515
Parameters_ P_
Structure of parameters.
Definition eprop_iaf_adapt_bsshslm_2020.h:509
double get_v_m_() const
Get the current value of the membrane voltage.
Definition eprop_iaf_adapt_bsshslm_2020.h:473
void handle(SpikeEvent &) override
Handle incoming spike events.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:393
size_t handles_test_event(SpikeEvent &, size_t) override
Check if the node can handle a particular event and receptor type.
Definition eprop_iaf_adapt_bsshslm_2020.h:545
static RecordablesMap< eprop_iaf_adapt_bsshslm_2020 > recordablesMap_
Map storing a static set of recordables.
Definition eprop_iaf_adapt_bsshslm_2020.h:521
double get_learning_signal_() const
Get the current value of the learning signal.
Definition eprop_iaf_adapt_bsshslm_2020.h:487
State_ S_
Structure of state variables.
Definition eprop_iaf_adapt_bsshslm_2020.h:512
double get_surrogate_gradient_() const
Get the current value of the surrogate gradient.
Definition eprop_iaf_adapt_bsshslm_2020.h:480
void update(Time const &, const long, const long) override
Advance the state of the node in time through the given interval.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:308
virtual size_t handles_test_event(SpikeEvent &, size_t receptor_type)
Check if the node can handle a particular event and receptor type.
Definition node.cpp:271
virtual void handle(SpikeEvent &e)
Handle incoming spike events.
Definition node.cpp:265
const std::string recordables("recordables")
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33
void register_eprop_iaf_adapt_bsshslm_2020(const std::string &name)
Definition eprop_iaf_adapt_bsshslm_2020.cpp:44
size_t synindex
For enumerations of synapse types.
Definition nest_types.h:115
Structure of buffers.
Definition eprop_iaf_adapt_bsshslm_2020.h:434
UniversalDataLogger< eprop_iaf_adapt_bsshslm_2020 > logger_
Logger for universal data.
Definition eprop_iaf_adapt_bsshslm_2020.h:448
RingBuffer currents_
Buffer for incoming currents.
Definition eprop_iaf_adapt_bsshslm_2020.h:445
RingBuffer spikes_
Buffer for incoming spikes.
Definition eprop_iaf_adapt_bsshslm_2020.h:442
Structure of parameters.
Definition eprop_iaf_adapt_bsshslm_2020.h:335
double I_e_
Constant external input current (pA).
Definition eprop_iaf_adapt_bsshslm_2020.h:355
std::string surrogate_gradient_function_
Surrogate gradient / pseudo-derivative function of the membrane voltage ["piecewise_linear",...
Definition eprop_iaf_adapt_bsshslm_2020.h:362
double adapt_tau_
Time constant of the threshold adaptation (ms).
Definition eprop_iaf_adapt_bsshslm_2020.h:340
double surrogate_gradient_width_
Width scaling of surrogate gradient / pseudo-derivative of membrane voltage.
Definition eprop_iaf_adapt_bsshslm_2020.h:368
double t_ref_
Duration of the refractory period (ms).
Definition eprop_iaf_adapt_bsshslm_2020.h:371
double C_m_
Capacitance of the membrane (pF).
Definition eprop_iaf_adapt_bsshslm_2020.h:343
Parameters_()
Default constructor.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:71
double set(const Dictionary &, Node *)
Set the parameters and throw errors in case of invalid values.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:138
double V_min_
Absolute lower bound of the membrane voltage relative to the leak membrane potential (mV).
Definition eprop_iaf_adapt_bsshslm_2020.h:377
double surrogate_gradient_height_
Height scaling of surrogate gradient / pseudo-derivative of membrane voltage.
Definition eprop_iaf_adapt_bsshslm_2020.h:365
double E_L_
Leak / resting membrane potential (mV).
Definition eprop_iaf_adapt_bsshslm_2020.h:349
double adapt_beta_
Prefactor of the threshold adaptation.
Definition eprop_iaf_adapt_bsshslm_2020.h:337
double V_th_
Spike threshold voltage relative to the leak membrane potential (mV).
Definition eprop_iaf_adapt_bsshslm_2020.h:380
void get(Dictionary &) const
Get the parameters and their values.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:118
bool regular_spike_arrival_
If True, the input spikes arrive at the beginning of the time step, if False at the end (determines P...
Definition eprop_iaf_adapt_bsshslm_2020.h:358
double tau_m_
Time constant of the membrane (ms).
Definition eprop_iaf_adapt_bsshslm_2020.h:374
double c_reg_
Coefficient of firing rate regularization.
Definition eprop_iaf_adapt_bsshslm_2020.h:346
double f_target_
Target firing rate of rate regularization (spikes/s).
Definition eprop_iaf_adapt_bsshslm_2020.h:352
Structure of state variables.
Definition eprop_iaf_adapt_bsshslm_2020.h:394
double v_th_adapt_
Adapting spike threshold voltage.
Definition eprop_iaf_adapt_bsshslm_2020.h:399
double z_in_
Binary input spike state variable - 1.0 if the neuron has spiked in the previous time step and 0....
Definition eprop_iaf_adapt_bsshslm_2020.h:420
double z_
Binary spike state variable - 1.0 if the neuron has spiked in the previous time step and 0....
Definition eprop_iaf_adapt_bsshslm_2020.h:417
double v_m_
Membrane voltage relative to the leak membrane potential (mV).
Definition eprop_iaf_adapt_bsshslm_2020.h:414
double surrogate_gradient_
Surrogate gradient / pseudo-derivative of the membrane voltage.
Definition eprop_iaf_adapt_bsshslm_2020.h:408
void set(const Dictionary &, const Parameters_ &, double, Node *)
Set the state variables.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:234
void get(Dictionary &, const Parameters_ &) const
Get the state variables and their values.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:224
int r_
Number of remaining refractory steps.
Definition eprop_iaf_adapt_bsshslm_2020.h:405
double adapt_
Adaptation variable.
Definition eprop_iaf_adapt_bsshslm_2020.h:396
double learning_signal_
Learning signal. Sum of weighted error signals coming from the readout neurons.
Definition eprop_iaf_adapt_bsshslm_2020.h:402
State_()
Default constructor.
Definition eprop_iaf_adapt_bsshslm_2020.cpp:90
double i_in_
Input current (pA).
Definition eprop_iaf_adapt_bsshslm_2020.h:411
Structure of internal variables.
Definition eprop_iaf_adapt_bsshslm_2020.h:453
double P_z_in_
Propagator matrix entry for evolving the incoming spike state variables (mathematical symbol "zeta" i...
Definition eprop_iaf_adapt_bsshslm_2020.h:459
double P_v_m_
Propagator matrix entry for evolving the membrane voltage (mathematical symbol "alpha" in user docume...
Definition eprop_iaf_adapt_bsshslm_2020.h:455
double P_adapt_
Propagator matrix entry for evolving the adaptation (mathematical symbol "rho" in user documentation)...
Definition eprop_iaf_adapt_bsshslm_2020.h:465
int RefractoryCounts_
Total refractory steps.
Definition eprop_iaf_adapt_bsshslm_2020.h:468
double P_i_in_
Propagator matrix entry for evolving the incoming currents.
Definition eprop_iaf_adapt_bsshslm_2020.h:462