NEST main@caf0ae8
 
Loading...
Searching...
No Matches
eprop_iaf_psc_delta.h
Go to the documentation of this file.
1/*
2 * eprop_iaf_psc_delta.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_PSC_DELTA_H
24#define EPROP_IAF_PSC_DELTA_H
25
26// nestkernel
27#include "connection.h"
30#include "eprop_synapse.h"
31#include "event.h"
32#include "nest_types.h"
33#include "ring_buffer.h"
35
36namespace nest
37{
38
39/* BeginUserDocs: neuron, e-prop plasticity, current-based, integrate-and-fire, Bellec
40
41Short description
42+++++++++++++++++
43
44Current-based leaky integrate-and-fire neuron model with delta-shaped
45postsynaptic currents for e-prop plasticity
46
47Description
48+++++++++++
49
50``eprop_iaf_psc_delta`` is an implementation of a leaky integrate-and-fire
51neuron model with delta-shaped postsynaptic currents used for eligibility
52propagation (e-prop) plasticity.
53
54E-prop plasticity was originally introduced and implemented in TensorFlow in :footcite:p:`Bellec2020`.
55
56.. note::
57 The neuron dynamics of the ``eprop_iaf_psc_delta`` model (excluding e-prop
58 plasticity) are similar to the neuron dynamics of the ``iaf_psc_delta`` model,
59 with minor differences, such as the propagator of the post-synaptic current
60 and the voltage reset upon a spike.
61
62The membrane voltage time course :math:`v_j^t` of the neuron :math:`j` is given by:
63
64.. math::
65 v_j^t &= \alpha v_j^{t-1} + \sum_{i \neq j} W_{ji}^\text{rec} z_i^{t-1}
66 + \sum_i W_{ji}^\text{in} x_i^t \,, \\
67 \alpha &= e^{ -\frac{ \Delta t }{ \tau_\text{m} } } \,, \\
68
69where :math:`W_{ji}^\text{rec}` and :math:`W_{ji}^\text{in}` are the recurrent and
70input synaptic weight matrices, and :math:`z_i^{t-1}` is the recurrent presynaptic
71state variable, while :math:`x_i^t` represents the input at time :math:`t`.
72
73Descriptions of further parameters and variables can be found in the table below.
74
75The spike state variable is expressed by a Heaviside function:
76
77.. math::
78 z_j^t = H \left( v_j^t - v_\text{th} \right) \,. \\
79
80If the membrane voltage crosses the threshold voltage :math:`v_\text{th}`, a spike is
81emitted and the membrane voltage is reset to :math:`v_\text{reset}`. After the time step
82of the spike emission, the neuron is not able to spike for an absolute refractory period
83:math:`t_\text{ref}` during which the membrane potential stays clamped to the reset voltage
84:math:`v_\text{reset}`, thus
85
86.. math::
87 v_m = v_\text{reset} \quad \text{for} \quad t_\text{spk} \leq t \leq t_\text{spk} + t_\text{ref} \,.
88
89Spikes arriving while the neuron is refractory are discarded by default. However,
90if ``refractory_input`` is set to ``True`` they are damped for each time step
91until the end of the refractory period and then added to the membrane voltage.
92
93An additional state variable and the corresponding differential equation
94represents a piecewise constant external current.
95
96See the documentation on the :doc:`iaf_psc_delta<../models/iaf_psc_delta/>` neuron model
97for more information on the integration of the subthreshold dynamics.
98
99The change of the synaptic weight is calculated from the gradient :math:`g^t` of
100the loss :math:`E^t` with respect to the synaptic weight :math:`W_{ji}`:
101:math:`\frac{ \text{d} E^t }{ \text{d} W_{ij} }`
102which depends on the presynaptic
103spikes :math:`z_i^{t-2}`, the surrogate gradient or pseudo-derivative
104of the spike state variable with respect to the postsynaptic membrane
105voltage :math:`\psi_j^{t-1}` (the product of which forms the eligibility
106trace :math:`e_{ji}^{t-1}`), and the learning signal :math:`L_j^t` emitted
107by the readout neurons.
108
109Surrogate gradients help overcome the challenge of the spiking function's
110non-differentiability, facilitating the use of gradient-based learning
111techniques such as e-prop. The non-existent derivative of the spiking
112variable with respect to the membrane voltage,
113:math:`\frac{\partial z^t_j}{ \partial v^t_j}`, can be effectively
114replaced with a variety of surrogate gradient functions, as detailed in
115various studies (see, e.g., :footcite:p:`Neftci2019`). NEST currently provides four
116different surrogate gradient functions:
117
1181. A piecewise linear function used among others in :footcite:p:`Bellec2020`:
119
120.. math::
121 \psi_j^t = \frac{ \gamma }{ v_\text{th} } \text{max}
122 \left( 0, 1-\beta \left| \frac{ v_j^t - v_\text{th} }{ v_\text{th} }\right| \right) \,. \\
123
1242. An exponential function used in :footcite:p:`Shrestha2018`:
125
126.. math::
127 \psi_j^t = \gamma \exp \left( -\beta \left| v_j^t - v_\text{th} \right| \right) \,. \\
128
1293. The derivative of a fast sigmoid function used in :footcite:p:`Zenke2018`:
130
131.. math::
132 \psi_j^t = \gamma \left( 1 + \beta \left| v_j^t - v_\text{th} \right| \right)^2 \,. \\
133
1344. The derivative of an arctan function used in :footcite:p:`Fang2021`:
135
136.. math::
137 \psi_j^t = \frac{\gamma}{\pi} \frac{1}{ 1 + \left( \beta \pi \left( v_j^t - v_\text{th} \right) \right)^2 } \,. \\
138
139In the interval between two presynaptic spikes, the gradient is calculated
140at each time step until the cutoff time point. This computation occurs over
141the time range:
142
143:math:`t \in \left[ t_\text{spk,prev}, \min \left( t_\text{spk,prev} + \Delta t_\text{c}, t_\text{spk,curr} \right)
144\right]`.
145
146Here, :math:`t_\text{spk,prev}` represents the time of the previous spike that
147passed the synapse, while :math:`t_\text{spk,curr}` is the time of the
148current spike, which triggers the application of the learning rule and the
149subsequent synaptic weight update. The cutoff :math:`\Delta t_\text{c}`
150defines the maximum allowable interval for integration between spikes.
151The expression for the gradient is given by:
152
153.. math::
154 \frac{ \text{d} E^t }{ \text{d} W_{ji} } &= L_j^t \bar{e}_{ji}^{t-1} \,, \\
155 e_{ji}^{t-1} &= \psi_j^{t-1} \bar{z}_i^{t-2} \,, \\
156
157The eligibility trace and the presynaptic spike trains are low-pass filtered
158with the following exponential kernels:
159
160.. math::
161 \bar{e}_{ji}^t &= \mathcal{F}_\kappa \left( e_{ji}^t \right)
162 = \kappa \bar{e}_{ji}^{t-1} + \left( 1 - \kappa \right) e_{ji}^t \,, \\
163 \bar{z}_i^t &= \mathcal{F}_\alpha \left( z_{i}^t \right)= \alpha \bar{z}_i^{t-1} + z_i^t \,. \\
164
165Furthermore, a firing rate regularization mechanism keeps the exponential moving average of the postsynaptic
166neuron's firing rate :math:`f_j^{\text{ema},t}` close to a target firing rate
167:math:`f^\text{target}`. The gradient :math:`g_\text{reg}^t` of the regularization loss :math:`E_\text{reg}^t`
168with respect to the synaptic weight :math:`W_{ji}` is given by:
169
170.. math::
171 \frac{ \text{d} E_\text{reg}^t }{ \text{d} W_{ji}}
172 &\approx c_\text{reg} \left( f^{\text{ema},t}_j - f^\text{target} \right) \bar{e}_{ji}^t \,, \\
173 f^{\text{ema},t}_j &= \mathcal{F}_{\kappa_\text{reg}} \left( \frac{z_j^t}{\Delta t} \right)
174 = \kappa_\text{reg} f^{\text{ema},t-1}_j + \left( 1 - \kappa_\text{reg} \right) \frac{z_j^t}{\Delta t} \,, \\
175
176where :math:`c_\text{reg}` is a constant scaling factor.
177
178The overall gradient is given by the addition of the two gradients.
179
180As a last step for every round in the loop over the time steps :math:`t`, the new weight is retrieved by feeding the
181current gradient :math:`g^t` to the optimizer (see :doc:`weight_optimizer<../models/weight_optimizer/>`
182for more information on the available optimizers):
183
184.. math::
185 w^t = \text{optimizer} \left( t, g^t, w^{t-1} \right) \,. \\
186
187After the loop has terminated, the filtered dynamic variables of e-prop are propagated from the end of the cutoff until
188the next spike:
189
190.. math::
191 p &= \text{max} \left( 0, t_\text{s}^{t} - \left( t_\text{s}^{t-1} + {\Delta t}_\text{c} \right) \right) \,, \\
192 \bar{e}_{ji}^{t+p} &= \bar{e}_{ji}^t \kappa^p \,, \\
193 \bar{z}_i^{t+p} &= \bar{z}_i^t \alpha^p \,. \\
194
195For more information on the implementation details of the neuron model, see :footcite:p:`Rotter1999` and
196:footcite:p:`Diesmann2001`.
197
198For more information on e-prop plasticity, see the documentation on the other e-prop models:
199
200 * :doc:`eprop_iaf_psc_delta_adapt<../models/eprop_iaf_psc_delta_adapt/>`
201 * :doc:`eprop_readout<../models/eprop_readout/>`
202 * :doc:`eprop_synapse<../models/eprop_synapse/>`
203 * :doc:`eprop_learning_signal_connection<../models/eprop_learning_signal_connection/>`
204
205Details on the event-based NEST implementation of e-prop can be found in :footcite:p:`KorcsakGorzo2025`.
206
207Parameters
208++++++++++
209
210The following parameters can be set in the status dictionary.
211
212=========================== ======= ======================= ================ ===================================
213**Neuron parameters**
214----------------------------------------------------------------------------------------------------------------
215Parameter Unit Math equivalent Default Description
216=========================== ======= ======================= ================ ===================================
217``C_m`` pF :math:`C_\text{m}` 250.0 Capacitance of the membrane
218``E_L`` mV :math:`E_\text{L}` -70.0 Leak / resting membrane potential
219``I_e`` pA :math:`I_\text{e}` 0.0 Constant external input current
220``t_ref`` ms :math:`t_\text{ref}` 2.0 Duration of the refractory period
221``tau_m`` ms :math:`\tau_\text{m}` 10.0 Time constant of the membrane
222``V_min`` mV :math:`v_\text{min}` negative maximum Absolute lower bound of the
223 value membrane voltage
224 representable
225 by ``double``
226 type in C++
227``V_th`` mV :math:`v_\text{th}` -55.0 Spike threshold voltage
228``V_reset`` mV :math:`v_\text{reset}` -70.0 Reset voltage
229``refractory_input`` Boolean ``False`` If ``True``, spikes arriving during
230 the refractory period are damped
231 until it ends and then added to the
232 membrane voltage
233=========================== ======= ======================= ================ ===================================
234
235=============================== ======= =========================== ================== =========================
236**E-prop parameters**
237----------------------------------------------------------------------------------------------------------------
238Parameter Unit Math equivalent Default Description
239=============================== ======= =========================== ================== =========================
240``flush_event_send_interval`` ms maximum value Interval since previous
241 representable by event after which a flush
242 ``double`` type in event is sent
243 C++
244``c_reg`` :math:`c_\text{reg}` 0.0 Coefficient of firing
245 rate regularization
246``eprop_isi_trace_cutoff`` ms :math:`{\Delta t}_\text{c}` maximum value Cutoff for integration of
247 representable e-prop update between two
248 by ``double`` spikes
249 type in C++
250``f_target`` Hz :math:`f^\text{target}` 10.0 Target firing rate of
251 rate regularization
252``kappa`` :math:`\kappa` 0.97 Low-pass filter of the
253 eligibility trace
254``kappa_reg`` :math:`\kappa_\text{reg}` 0.97 Low-pass filter of the
255 firing rate for
256 regularization
257``surrogate_gradient_function`` :math:`\psi` "piecewise_linear" Surrogate gradient /
258 pseudo-derivative
259 function
260 ["piecewise_linear",
261 "exponential",
262 "fast_sigmoid_derivative"
263 , "arctan_derivative"]
264``surrogate_gradient_height`` :math:`\gamma` 0.3 Height scaling of
265 surrogate gradient /
266 pseudo-derivative of
267 membrane voltage
268``surrogate_gradient_width`` :math:`1/\beta` 1.0 Width scaling of
269 surrogate gradient /
270 pseudo-derivative of
271 membrane voltage
272=============================== ======= =========================== ================== =========================
273
274Recordables
275+++++++++++
276
277The following state variables evolve during simulation and can be recorded.
278
279================== ==== =============== ============= ========================
280**Neuron state variables and recordables**
281------------------------------------------------------------------------------
282State variable Unit Math equivalent Initial value Description
283================== ==== =============== ============= ========================
284``V_m`` mV :math:`v_j` -70.0 Membrane voltage
285================== ==== =============== ============= ========================
286
287====================== ==== =============== ============= =========================================
288**E-prop state variables and recordables**
289---------------------------------------------------------------------------------------------------
290State variable Unit Math equivalent Initial value Description
291====================== ==== =============== ============= =========================================
292``learning_signal`` pA :math:`L_j` 0.0 Learning signal
293``surrogate_gradient`` :math:`\psi_j` 0.0 Surrogate gradient / pseudo-derivative of
294 membrane voltage
295====================== ==== =============== ============= =========================================
296
297Usage
298+++++
299
300This model can only be used in combination with the other e-prop models
301and the network architecture requires specific wiring, input, and output.
302The usage is demonstrated in several
303:doc:`supervised regression and classification tasks <../auto_examples/eprop_plasticity/index>`
304reproducing among others the original proof-of-concept tasks in :footcite:p:`Bellec2020`.
305
306References
307++++++++++
308
309.. footbibliography::
310
311Sends
312+++++
313
314SpikeEvent
315
316Receives
317++++++++
318
319SpikeEvent, CurrentEvent, LearningSignalConnectionEvent, DataLoggingRequest
320
321See also
322++++++++
323
324Examples using this model
325+++++++++++++++++++++++++
326
327.. listexamples:: eprop_iaf_psc_delta
328
329EndUserDocs */
330
331void register_eprop_iaf_psc_delta( const std::string& name );
332
341{
342
343public:
346
349
350 using Node::handle;
352
353 size_t send_test_event( Node&, size_t, synindex, bool ) override;
354
355 void handle( SpikeEvent& ) override;
356 void handle( CurrentEvent& ) override;
357 void handle( LearningSignalConnectionEvent& ) override;
358 void handle( DataLoggingRequest& ) override;
359
360 size_t handles_test_event( SpikeEvent&, size_t ) override;
361 size_t handles_test_event( CurrentEvent&, size_t ) override;
362 size_t handles_test_event( LearningSignalConnectionEvent&, size_t ) override;
363 size_t handles_test_event( DataLoggingRequest&, size_t ) override;
364
365 void get_status( Dictionary& ) const override;
366 void set_status( const Dictionary& ) override;
367
368private:
369 void init_buffers_() override;
370 void pre_run_hook() override;
371
372 void update( Time const&, const long, const long ) override;
373
374 void compute_gradient( const long,
375 const long,
376 double&,
377 double&,
378 double&,
379 double&,
380 double&,
381 double&,
384 const bool,
385 const bool,
386 double&,
387 long&,
388 long& ) override;
389
390 long get_shift() const override;
391 bool is_eprop_recurrent_node() const override;
392
394 friend class RecordablesMap< eprop_iaf_psc_delta >;
395
397 friend class UniversalDataLogger< eprop_iaf_psc_delta >;
398
401 {
403 double tau_m_;
404
406 double C_m_;
407
409 double t_ref_;
410
412 double E_L_;
413
415 double I_e_;
416
418 double V_th_;
419
421 double V_min_;
422
424 double V_reset_;
425
428
430 double c_reg_;
431
433 double f_target_;
434
438
441
444
446 double kappa_;
447
450
452 Parameters_();
453
455 void get( Dictionary& ) const;
456
458 double set( const Dictionary&, Node* );
459 };
460
462 struct State_
463 {
465 double i_in_;
466
468 double v_m_;
469
471 long r_;
472
475
478
481
483 State_();
484
486 void get( Dictionary&, const Parameters_& ) const;
487
489 void set( const Dictionary&, const Parameters_&, double, Node* );
490 };
491
510
513 {
515 double P_v_m_;
516
518 double P_i_in_;
519
522 };
523
525 double
526 get_v_m_() const
527 {
528 return S_.v_m_ + P_.E_L_;
529 }
530
532 double
534 {
535 return S_.surrogate_gradient_;
536 }
537
539 double
541 {
542 return S_.learning_signal_;
543 }
544
545 // the order in which the structure instances are defined is important for speed
546
549
552
555
558
561};
562
563inline long
568
569inline bool
571{
572 return true;
573}
574
575inline size_t
576eprop_iaf_psc_delta::send_test_event( Node& target, size_t receptor_type, synindex, bool )
577{
578 SpikeEvent e;
579 e.set_sender( *this );
580 return target.handles_test_event( e, receptor_type );
581}
582
583inline size_t
585{
586 if ( receptor_type != 0 )
587 {
588 throw UnknownReceptorType( receptor_type, get_name() );
589 }
590
591 return 0;
592}
593
594inline size_t
596{
597 if ( receptor_type != 0 )
598 {
599 throw UnknownReceptorType( receptor_type, get_name() );
600 }
601
602 return 0;
603}
604
605inline size_t
607{
608 if ( receptor_type != 0 )
609 {
610 throw UnknownReceptorType( receptor_type, get_name() );
611 }
612
613 return 0;
614}
615
616inline size_t
618{
619 if ( receptor_type != 0 )
620 {
621 throw UnknownReceptorType( receptor_type, get_name() );
622 }
623
624 return B_.logger_.connect_logging_device( dlr, recordablesMap_ );
625}
626
627inline void
629{
631 P_.get( d );
632 S_.get( d, P_ );
633 d[ names::recordables ] = recordablesMap_.get_list();
634}
635
636inline void
638{
640 // temporary copies in case of errors
641 Parameters_ ptmp = P_;
642 State_ stmp = S_;
643
644 // make sure that ptmp and stmp consistent - throw BadProperty if not
645 const double delta_EL = ptmp.set( d, this );
646 stmp.set( d, ptmp, delta_EL, this );
647
648 P_ = ptmp;
649 S_ = stmp;
650}
651
652} // namespace nest
653
654#endif // EPROP_IAF_PSC_DELTA_H
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Class containing the common properties for all connections of a certain type.
Definition common_synapse_properties.h:50
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
Base class implementing a weight optimizer model.
Definition weight_optimizer.h:238
Class implementing a LIF neuron model for e-prop plasticity with additional biological features.
Definition eprop_iaf_psc_delta.h:341
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_psc_delta.h:570
void compute_gradient(const long, const long, double &, double &, double &, double &, double &, double &, const CommonSynapseProperties &, WeightOptimizer *, const bool, const bool, double &, long &, long &) override
Compute gradient change for eprop synapses.
Definition eprop_iaf_psc_delta.cpp:411
double get_surrogate_gradient_() const
Get the current value of the surrogate gradient.
Definition eprop_iaf_psc_delta.h:533
void update(Time const &, const long, const long) override
Advance the state of the node in time through the given interval.
Definition eprop_iaf_psc_delta.cpp:300
void get_status(Dictionary &) const override
Export properties of the node by setting entries in the status dictionary.
Definition eprop_iaf_psc_delta.h:628
eprop_iaf_psc_delta()
Default constructor.
Definition eprop_iaf_psc_delta.cpp:249
size_t handles_test_event(SpikeEvent &, size_t) override
Check if the node can handle a particular event and receptor type.
Definition eprop_iaf_psc_delta.h:584
double get_v_m_() const
Get the current value of the membrane voltage.
Definition eprop_iaf_psc_delta.h:526
friend class UniversalDataLogger< eprop_iaf_psc_delta >
Logger for universal data supporting the data logging request / reply mechanism. Populated with a rec...
Definition eprop_iaf_psc_delta.h:397
Buffers_ B_
Structure of buffers.
Definition eprop_iaf_psc_delta.h:557
void pre_run_hook() override
Re-calculate dependent parameters of the node.
Definition eprop_iaf_psc_delta.cpp:279
double get_learning_signal_() const
Get the current value of the learning signal.
Definition eprop_iaf_psc_delta.h:540
void set_status(const Dictionary &) override
Change properties of the node according to the entries in the dictionary.
Definition eprop_iaf_psc_delta.h:637
Parameters_ P_
Structure of parameters.
Definition eprop_iaf_psc_delta.h:548
void handle(SpikeEvent &) override
Handle incoming spike events.
Definition eprop_iaf_psc_delta.cpp:373
long get_shift() const override
Retrieves the temporal shift of the signal.
Definition eprop_iaf_psc_delta.h:564
static RecordablesMap< eprop_iaf_psc_delta > recordablesMap_
Map storing a static set of recordables.
Definition eprop_iaf_psc_delta.h:560
void init_buffers_() override
Configure persistent internal data structures.
Definition eprop_iaf_psc_delta.cpp:271
State_ S_
Structure of state variables.
Definition eprop_iaf_psc_delta.h:551
Variables_ V_
Structure of internal variables.
Definition eprop_iaf_psc_delta.h:554
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_psc_delta.h:576
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_psc_delta(const std::string &name)
Definition eprop_iaf_psc_delta.cpp:44
size_t synindex
For enumerations of synapse types.
Definition nest_types.h:115
Structure of buffers.
Definition eprop_iaf_psc_delta.h:494
UniversalDataLogger< eprop_iaf_psc_delta > logger_
Logger for universal data.
Definition eprop_iaf_psc_delta.h:508
RingBuffer spikes_
Buffer for incoming spikes.
Definition eprop_iaf_psc_delta.h:502
RingBuffer currents_
Buffer for incoming currents.
Definition eprop_iaf_psc_delta.h:505
Structure of parameters.
Definition eprop_iaf_psc_delta.h:401
double t_ref_
Duration of the refractory period (ms).
Definition eprop_iaf_psc_delta.h:409
double tau_m_
Time constant of the membrane (ms).
Definition eprop_iaf_psc_delta.h:403
std::string surrogate_gradient_function_
Surrogate gradient / pseudo-derivative function of the membrane voltage ["piecewise_linear",...
Definition eprop_iaf_psc_delta.h:437
double kappa_
Low-pass filter of the eligibility trace.
Definition eprop_iaf_psc_delta.h:446
double V_reset_
Reset voltage relative to the leak membrane potential (mV).
Definition eprop_iaf_psc_delta.h:424
bool with_refr_input_
If True, count spikes arriving during the refractory period.
Definition eprop_iaf_psc_delta.h:427
double I_e_
Constant external input current (pA).
Definition eprop_iaf_psc_delta.h:415
double V_th_
Spike threshold voltage relative to the leak membrane potential (mV).
Definition eprop_iaf_psc_delta.h:418
void get(Dictionary &) const
Get the parameters and their values.
Definition eprop_iaf_psc_delta.cpp:114
double C_m_
Capacitance of the membrane (pF).
Definition eprop_iaf_psc_delta.h:406
double V_min_
Absolute lower bound of the membrane voltage relative to the leak membrane potential (mV).
Definition eprop_iaf_psc_delta.h:421
double surrogate_gradient_height_
Height scaling of surrogate gradient / pseudo-derivative of membrane voltage.
Definition eprop_iaf_psc_delta.h:440
double c_reg_
Coefficient of firing rate regularization.
Definition eprop_iaf_psc_delta.h:430
double f_target_
Target firing rate of rate regularization (spikes/s).
Definition eprop_iaf_psc_delta.h:433
double kappa_reg_
Low-pass filter of the firing rate for regularization.
Definition eprop_iaf_psc_delta.h:449
Parameters_()
Default constructor.
Definition eprop_iaf_psc_delta.cpp:69
double set(const Dictionary &, Node *)
Set the parameters and throw errors in case of invalid values.
Definition eprop_iaf_psc_delta.cpp:135
double surrogate_gradient_width_
Width scaling of surrogate gradient / pseudo-derivative of membrane voltage.
Definition eprop_iaf_psc_delta.h:443
double E_L_
Leak / resting membrane potential (mV).
Definition eprop_iaf_psc_delta.h:412
Structure of state variables.
Definition eprop_iaf_psc_delta.h:463
double v_m_
Membrane voltage relative to the leak membrane potential (mV).
Definition eprop_iaf_psc_delta.h:468
double learning_signal_
Learning signal. Sum of weighted error signals coming from the readout neurons.
Definition eprop_iaf_psc_delta.h:477
void get(Dictionary &, const Parameters_ &) const
Get the state variables and their values.
Definition eprop_iaf_psc_delta.cpp:232
long r_
Number of remaining refractory steps.
Definition eprop_iaf_psc_delta.h:471
void set(const Dictionary &, const Parameters_ &, double, Node *)
Set the state variables.
Definition eprop_iaf_psc_delta.cpp:240
double surrogate_gradient_
Surrogate gradient / pseudo-derivative of the membrane voltage.
Definition eprop_iaf_psc_delta.h:480
State_()
Default constructor.
Definition eprop_iaf_psc_delta.cpp:89
double refr_spikes_buffer_
Count of spikes arriving during refractory period discounted for decay until end of refractory period...
Definition eprop_iaf_psc_delta.h:474
double i_in_
Input current (pA).
Definition eprop_iaf_psc_delta.h:465
Structure of internal variables.
Definition eprop_iaf_psc_delta.h:513
double P_v_m_
Propagator matrix entry for evolving the membrane voltage (mathematical symbol "alpha" in user docume...
Definition eprop_iaf_psc_delta.h:515
long RefractoryCounts_
Total refractory steps.
Definition eprop_iaf_psc_delta.h:521
double P_i_in_
Propagator matrix entry for evolving the incoming currents.
Definition eprop_iaf_psc_delta.h:518