NEST main@caf0ae8
 
Loading...
Searching...
No Matches
eprop_iaf_adapt.h
Go to the documentation of this file.
1/*
2 * eprop_iaf_adapt.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_H
24#define EPROP_IAF_ADAPT_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, adaptive threshold, Bellec
40
41Short description
42+++++++++++++++++
43
44Current-based leaky integrate-and-fire neuron model with delta-shaped
45postsynaptic currents and threshold adaptation for e-prop plasticity
46
47Description
48+++++++++++
49
50``eprop_iaf_adapt`` is an implementation of a leaky integrate-and-fire
51neuron model with delta-shaped postsynaptic currents and threshold adaptation
52used for eligibility propagation (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_adapt`` model (excluding
58 e-prop plasticity and the threshold adaptation) are similar to the neuron
59 dynamics of the ``iaf_psc_delta`` model, with minor differences, such as the
60 propagator of the post-synaptic current 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} + \zeta \sum_{i \neq j} W_{ji}^\text{rec} z_i^{t-1}
66 + \zeta \sum_i W_{ji}^\text{in} x_i^t - z_j^{t-1} v_\text{th} \,, \\
67 \alpha &= e^{ -\frac{ \Delta t }{ \tau_\text{m} } } \,, \\
68 \zeta &=
69 \begin{cases}
70 1 \\
71 1 - \alpha
72 \end{cases} \,, \\
73
74where :math:`W_{ji}^\text{rec}` and :math:`W_{ji}^\text{in}` are the recurrent and
75input synaptic weight matrices, and :math:`z_i^{t-1}` is the recurrent presynaptic
76state variable, while :math:`x_i^t` represents the input at time :math:`t`.
77
78Descriptions of further parameters and variables can be found in the table below.
79
80The threshold adaptation is given by:
81
82.. math::
83 A_j^t &= v_\text{th} + \beta a_j^t \,, \\
84 a_j^t &= \rho a_j^{t-1} + z_j^{t-1} \,, \\
85 \rho &= e^{-\frac{ \Delta t }{ \tau_\text{a} }} \,. \\
86
87The spike state variable is expressed by a Heaviside function:
88
89.. math::
90 z_j^t = H \left( v_j^t - A_j^t \right) \,. \\
91
92If the membrane voltage crosses the adaptive threshold voltage :math:`A_j^t`, a spike is
93emitted and the membrane voltage is reduced by :math:`v_\text{th}` in the next
94time step. After the time step of the spike emission, the neuron is not
95able to spike for an absolute refractory period :math:`t_\text{ref}`.
96
97An additional state variable and the corresponding differential equation
98represents a piecewise constant external current.
99
100See the documentation on the :doc:`iaf_psc_delta<../models/iaf_psc_delta/>` neuron model
101for more information on the integration of the subthreshold dynamics.
102
103The change of the synaptic weight is calculated from the gradient :math:`g^t` of
104the loss :math:`E^t` with respect to the synaptic weight :math:`W_{ji}`:
105:math:`\frac{ \text{d} E^t }{ \text{d} W_{ij} }`
106which depends on the presynaptic
107spikes :math:`z_i^{t-2}`, the surrogate gradient or pseudo-derivative
108of the spike state variable with respect to the postsynaptic membrane
109voltage :math:`\psi_j^{t-1}` (the product of which forms the eligibility
110trace :math:`e_{ji}^{t-1}`), and the learning signal :math:`L_j^t` emitted
111by the readout neurons.
112
113.. include:: ../models/eprop_iaf.rst
114 :start-after: .. start_surrogate-gradient-functions
115 :end-before: .. end_surrogate-gradient-functions
116
117In the interval between two presynaptic spikes, the gradient is calculated
118at each time step until the cutoff time point. This computation occurs over
119the time range:
120
121:math:`t \in \left[ t_\text{spk,prev}, \min \left( t_\text{spk,prev} + \Delta t_\text{c}, t_\text{spk,curr} \right)
122\right]`.
123
124Here, :math:`t_\text{spk,prev}` represents the time of the previous spike that
125passed the synapse, while :math:`t_\text{spk,curr}` is the time of the
126current spike, which triggers the application of the learning rule and the
127subsequent synaptic weight update. The cutoff :math:`\Delta t_\text{c}`
128defines the maximum allowable interval for integration between spikes.
129The expression for the gradient is given by:
130
131.. math::
132 \frac{ \text{d} E^t }{ \text{d} W_{ji} } &= L_j^t \bar{e}_{ji}^{t-1} \,, \\
133 e_{ji}^{t-1} &= \psi_j^{t-1} \left( \bar{z}_i^{t-2} - \beta \epsilon_{ji,a}^{t-2} \right) \,, \\
134 \epsilon^{t-2}_{ji,\text{a}} &= e_{ji}^{t-1} + \rho \epsilon_{ji,a}^{t-3} \,. \\
135
136The eligibility trace and the presynaptic spike trains are low-pass filtered
137with the following exponential kernels:
138
139.. math::
140 \bar{e}_{ji}^t &= \mathcal{F}_\kappa \left( e_{ji}^t \right)
141 = \kappa \bar{e}_{ji}^{t-1} + \left( 1 - \kappa \right) e_{ji}^t \,, \\
142 \bar{z}_i^t &= \mathcal{F}_\alpha \left( z_{i}^t \right)= \alpha \bar{z}_i^{t-1} + \zeta z_i^t \,. \\
143
144Furthermore, a firing rate regularization mechanism keeps the exponential moving average of the postsynaptic
145neuron's firing rate :math:`f_j^{\text{ema},t}` close to a target firing rate
146:math:`f^\text{target}`. The gradient :math:`g_\text{reg}^t` of the regularization loss :math:`E_\text{reg}^t`
147with respect to the synaptic weight :math:`W_{ji}` is given by:
148
149.. math::
150 \frac{ \text{d} E_\text{reg}^t }{ \text{d} W_{ji}}
151 &\approx c_\text{reg} \left( f^{\text{ema},t}_j - f^\text{target} \right) \bar{e}_{ji}^t \,, \\
152 f^{\text{ema},t}_j &= \mathcal{F}_{\kappa_\text{reg}} \left( \frac{z_j^t}{\Delta t} \right)
153 = \kappa_\text{reg} f^{\text{ema},t-1}_j + \left( 1 - \kappa_\text{reg} \right) \frac{z_j^t}{\Delta t} \,, \\
154
155where :math:`c_\text{reg}` is a constant scaling factor.
156
157The overall gradient is given by the addition of the two gradients.
158
159As a last step for every round in the loop over the time steps :math:`t`, the new weight is retrieved by feeding the
160current gradient :math:`g^t` to the optimizer (see :doc:`weight_optimizer<../models/weight_optimizer/>`
161for more information on the available optimizers):
162
163.. math::
164 w^t = \text{optimizer} \left( t, g^t, w^{t-1} \right) \,. \\
165
166After the loop has terminated, the filtered dynamic variables of e-prop are propagated from the end of the cutoff until
167the next spike:
168
169.. math::
170 p &= \text{max} \left( 0, t_\text{s}^{t} - \left( t_\text{s}^{t-1} + {\Delta t}_\text{c} \right) \right) \,, \\
171 \bar{e}_{ji}^{t+p} &= \bar{e}_{ji}^t \kappa^p \,, \\
172 \bar{z}_i^{t+p} &= \bar{z}_i^t \alpha^p \,, \\
173 \epsilon^{t+p} &= \epsilon^t \rho^p \,. \\
174
175For more information on e-prop plasticity, see the documentation on the other e-prop models:
176
177 * :doc:`eprop_iaf<../models/eprop_iaf/>`
178 * :doc:`eprop_readout<../models/eprop_readout/>`
179 * :doc:`eprop_synapse<../models/eprop_synapse/>`
180 * :doc:`eprop_learning_signal_connection<../models/eprop_learning_signal_connection/>`
181
182Details on the event-based NEST implementation of e-prop can be found in :footcite:p:`KorcsakGorzo2025`.
183
184Parameters
185++++++++++
186
187The following parameters can be set in the status dictionary.
188
189=========================== ======= ======================= ================ ===================================
190**Neuron parameters**
191----------------------------------------------------------------------------------------------------------------
192Parameter Unit Math equivalent Default Description
193=========================== ======= ======================= ================ ===================================
194``adapt_beta`` :math:`\beta` 1.0 Prefactor of the threshold
195 adaptation
196``adapt_tau`` ms :math:`\tau_\text{a}` 10.0 Time constant of the threshold
197 adaptation
198``C_m`` pF :math:`C_\text{m}` 250.0 Capacitance of the membrane
199``E_L`` mV :math:`E_\text{L}` -70.0 Leak / resting membrane potential
200``I_e`` pA :math:`I_\text{e}` 0.0 Constant external input current
201``t_ref`` ms :math:`t_\text{ref}` 2.0 Duration of the refractory period
202``tau_m`` ms :math:`\tau_\text{m}` 10.0 Time constant of the membrane
203``V_min`` mV :math:`v_\text{min}` negative maximum Absolute lower bound of the
204 value membrane voltage
205 representable by
206 ``double``
207 type in C++
208``V_th`` mV :math:`v_\text{th}` -55.0 Spike threshold voltage
209=========================== ======= ======================= ================ ===================================
210
211=============================== ======= =========================== ================== =========================
212**E-prop parameters**
213----------------------------------------------------------------------------------------------------------------
214Parameter Unit Math equivalent Default Description
215=============================== ======= =========================== ================== =========================
216``flush_event_send_interval`` ms maximum value Interval since previous
217 representable by event after which a flush
218 ``double`` type in event is sent
219 C++
220``c_reg`` :math:`c_\text{reg}` 0.0 Coefficient of firing
221 rate regularization
222``eprop_isi_trace_cutoff`` ms :math:`{\Delta t}_\text{c}` maximum value Cutoff for integration of
223 representable e-prop update between two
224 by ``double`` spikes
225 type in C++
226``f_target`` Hz :math:`f^\text{target}` 10.0 Target firing rate of
227 rate regularization
228``kappa`` :math:`\kappa` 0.97 Low-pass filter of the
229 eligibility trace
230``kappa_reg`` :math:`\kappa_\text{reg}` 0.97 Low-pass filter of the
231 firing rate for
232 regularization
233``surrogate_gradient_function`` :math:`\psi` "piecewise_linear" Surrogate gradient /
234 pseudo-derivative
235 function
236 ["piecewise_linear",
237 "exponential",
238 "fast_sigmoid_derivative"
239 , "arctan_derivative"]
240``surrogate_gradient_height`` :math:`\gamma` 0.3 Height scaling of
241 surrogate gradient /
242 pseudo-derivative of
243 membrane voltage
244``surrogate_gradient_width`` :math:`1/\beta` 1.0 Width scaling of
245 surrogate gradient /
246 pseudo-derivative of
247 membrane voltage
248=============================== ======= =========================== ================== =========================
249
250Recordables
251+++++++++++
252
253The following state variables evolve during simulation and can be recorded.
254
255================== ==== =============== ============= ========================
256**Neuron state variables and recordables**
257------------------------------------------------------------------------------
258State variable Unit Math equivalent Initial value Description
259================== ==== =============== ============= ========================
260``adaptation`` :math:`a_j` 0.0 Adaptation variable
261``V_m`` mV :math:`v_j` -70.0 Membrane voltage
262``V_th_adapt`` mV :math:`A_j` -55.0 Adapting spike threshold
263================== ==== =============== ============= ========================
264
265====================== ==== =============== ============= =========================================
266**E-prop state variables and recordables**
267---------------------------------------------------------------------------------------------------
268State variable Unit Math equivalent Initial value Description
269====================== ==== =============== ============= =========================================
270``learning_signal`` pA :math:`L_j` 0.0 Learning signal
271``surrogate_gradient`` :math:`\psi_j` 0.0 Surrogate gradient / pseudo-derivative of
272 membrane voltage
273====================== ==== =============== ============= =========================================
274
275Usage
276+++++
277
278This model can only be used in combination with the other e-prop models
279and the network architecture requires specific wiring, input, and output.
280The usage is demonstrated in several
281:doc:`supervised regression and classification tasks <../auto_examples/eprop_plasticity/index>`
282reproducing among others the original proof-of-concept tasks in :footcite:p:`Bellec2020`.
283
284References
285++++++++++
286
287.. footbibliography::
288
289Sends
290+++++
291
292SpikeEvent
293
294Receives
295++++++++
296
297SpikeEvent, CurrentEvent, LearningSignalConnectionEvent, DataLoggingRequest
298
299See also
300++++++++
301
302Examples using this model
303+++++++++++++++++++++++++
304
305.. listexamples:: eprop_iaf_adapt
306
307EndUserDocs */
308
309void register_eprop_iaf_adapt( const std::string& name );
310
319{
320
321public:
324
327
328 using Node::handle;
330
331 size_t send_test_event( Node&, size_t, synindex, bool ) override;
332
333 void handle( SpikeEvent& ) override;
334 void handle( CurrentEvent& ) override;
335 void handle( LearningSignalConnectionEvent& ) override;
336 void handle( DataLoggingRequest& ) override;
337
338 size_t handles_test_event( SpikeEvent&, size_t ) override;
339 size_t handles_test_event( CurrentEvent&, size_t ) override;
340 size_t handles_test_event( LearningSignalConnectionEvent&, size_t ) override;
341 size_t handles_test_event( DataLoggingRequest&, size_t ) override;
342
343 void get_status( Dictionary& ) const override;
344 void set_status( const Dictionary& ) override;
345
346private:
347 void init_buffers_() override;
348 void pre_run_hook() override;
349
350 void update( Time const&, const long, const long ) override;
351
352 void compute_gradient( const long,
353 const long,
354 double&,
355 double&,
356 double&,
357 double&,
358 double&,
359 double&,
362 const bool,
363 const bool,
364 double&,
365 long&,
366 long& ) override;
367
368 long get_shift() const override;
369 bool is_eprop_recurrent_node() const override;
370
372 friend class RecordablesMap< eprop_iaf_adapt >;
373
375 friend class UniversalDataLogger< eprop_iaf_adapt >;
376
379 {
382
385
387 double C_m_;
388
390 double c_reg_;
391
393 double E_L_;
394
396 double f_target_;
397
399 double I_e_;
400
404
407
410
412 double t_ref_;
413
415 double tau_m_;
416
418 double V_min_;
419
421 double V_th_;
422
424 double kappa_;
425
428
430 Parameters_();
431
433 void get( Dictionary& ) const;
434
436 double set( const Dictionary&, Node* );
437 };
438
440 struct State_
441 {
443 double adapt_;
444
447
450
452 long r_;
453
456
458 double i_in_;
459
461 double v_m_;
462
464 double z_;
465
467 double z_in_;
468
470 State_();
471
473 void get( Dictionary&, const Parameters_& ) const;
474
476 void set( const Dictionary&, const Parameters_&, double, Node* );
477 };
478
497
500 {
502 double P_v_m_;
503
505 double P_i_in_;
506
508 double P_adapt_;
509
512 };
513
515 double
516 get_v_m_() const
517 {
518 return S_.v_m_ + P_.E_L_;
519 }
520
522 double
524 {
525 return S_.surrogate_gradient_;
526 }
527
529 double
531 {
532 return S_.learning_signal_;
533 }
534
536 double
538 {
539 return S_.v_th_adapt_ + P_.E_L_;
540 }
541
543 double
545 {
546 return S_.adapt_;
547 }
548
549 // the order in which the structure instances are defined is important for speed
550
553
556
559
562
565};
566
567inline long
572
573inline bool
575{
576 return true;
577}
578
579inline size_t
580eprop_iaf_adapt::send_test_event( Node& target, size_t receptor_type, synindex, bool )
581{
582 SpikeEvent e;
583 e.set_sender( *this );
584 return target.handles_test_event( e, receptor_type );
585}
586
587inline size_t
589{
590 if ( receptor_type != 0 )
591 {
592 throw UnknownReceptorType( receptor_type, get_name() );
593 }
594
595 return 0;
596}
597
598inline size_t
600{
601 if ( receptor_type != 0 )
602 {
603 throw UnknownReceptorType( receptor_type, get_name() );
604 }
605
606 return 0;
607}
608
609inline size_t
611{
612 if ( receptor_type != 0 )
613 {
614 throw UnknownReceptorType( receptor_type, get_name() );
615 }
616
617 return 0;
618}
619
620inline size_t
622{
623 if ( receptor_type != 0 )
624 {
625 throw UnknownReceptorType( receptor_type, get_name() );
626 }
627
628 return B_.logger_.connect_logging_device( dlr, recordablesMap_ );
629}
630
631inline void
633{
635 P_.get( d );
636 S_.get( d, P_ );
637 d[ names::recordables ] = recordablesMap_.get_list();
638}
639
640inline void
642{
644 // temporary copies in case of errors
645 Parameters_ ptmp = P_;
646 State_ stmp = S_;
647
648 // make sure that ptmp and stmp consistent - throw BadProperty if not
649 const double delta_EL = ptmp.set( d, this );
650 stmp.set( d, ptmp, delta_EL, this );
651
652 P_ = ptmp;
653 S_ = stmp;
654}
655
656} // namespace nest
657
658#endif // EPROP_IAF_ADAPT_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 an adaptive LIF neuron model for e-prop plasticity with additional biological feat...
Definition eprop_iaf_adapt.h:319
static RecordablesMap< eprop_iaf_adapt > recordablesMap_
Map storing a static set of recordables.
Definition eprop_iaf_adapt.h:564
void set_status(const Dictionary &) override
Change properties of the node according to the entries in the dictionary.
Definition eprop_iaf_adapt.h:641
eprop_iaf_adapt()
Default constructor.
Definition eprop_iaf_adapt.cpp:270
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.h:580
Buffers_ B_
Structure of buffers.
Definition eprop_iaf_adapt.h:561
void init_buffers_() override
Configure persistent internal data structures.
Definition eprop_iaf_adapt.cpp:292
friend class UniversalDataLogger< eprop_iaf_adapt >
Logger for universal data supporting the data logging request / reply mechanism. Populated with a rec...
Definition eprop_iaf_adapt.h:375
void get_status(Dictionary &) const override
Export properties of the node by setting entries in the status dictionary.
Definition eprop_iaf_adapt.h:632
double get_learning_signal_() const
Get the current value of the learning signal.
Definition eprop_iaf_adapt.h:530
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.cpp:322
Parameters_ P_
Structure of parameters.
Definition eprop_iaf_adapt.h:552
Variables_ V_
Structure of internal variables.
Definition eprop_iaf_adapt.h:558
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.h:574
void pre_run_hook() override
Re-calculate dependent parameters of the node.
Definition eprop_iaf_adapt.cpp:300
void handle(SpikeEvent &) override
Handle incoming spike events.
Definition eprop_iaf_adapt.cpp:381
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_adapt.cpp:419
double get_surrogate_gradient_() const
Get the current value of the surrogate gradient.
Definition eprop_iaf_adapt.h:523
long get_shift() const override
Retrieves the temporal shift of the signal.
Definition eprop_iaf_adapt.h:568
double get_v_th_adapt_() const
Get the current value of the adapting threshold.
Definition eprop_iaf_adapt.h:537
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.h:588
State_ S_
Structure of state variables.
Definition eprop_iaf_adapt.h:555
double get_v_m_() const
Get the current value of the membrane voltage.
Definition eprop_iaf_adapt.h:516
double get_adaptation_() const
Get the current value of the adaptation.
Definition eprop_iaf_adapt.h:544
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(const std::string &name)
Definition eprop_iaf_adapt.cpp:44
size_t synindex
For enumerations of synapse types.
Definition nest_types.h:115
Structure of buffers.
Definition eprop_iaf_adapt.h:481
RingBuffer spikes_
Buffer for incoming spikes.
Definition eprop_iaf_adapt.h:489
RingBuffer currents_
Buffer for incoming currents.
Definition eprop_iaf_adapt.h:492
UniversalDataLogger< eprop_iaf_adapt > logger_
Logger for universal data.
Definition eprop_iaf_adapt.h:495
Structure of parameters.
Definition eprop_iaf_adapt.h:379
Parameters_()
Default constructor.
Definition eprop_iaf_adapt.cpp:71
double set(const Dictionary &, Node *)
Set the parameters and throw errors in case of invalid values.
Definition eprop_iaf_adapt.cpp:140
double V_th_
Spike threshold voltage relative to the leak membrane potential (mV).
Definition eprop_iaf_adapt.h:421
double kappa_
Low-pass filter of the eligibility trace.
Definition eprop_iaf_adapt.h:424
double surrogate_gradient_width_
Width scaling of surrogate gradient / pseudo-derivative of membrane voltage.
Definition eprop_iaf_adapt.h:409
double tau_m_
Time constant of the membrane (ms).
Definition eprop_iaf_adapt.h:415
std::string surrogate_gradient_function_
Surrogate gradient / pseudo-derivative function of the membrane voltage ["piecewise_linear",...
Definition eprop_iaf_adapt.h:403
double V_min_
Absolute lower bound of the membrane voltage relative to the leak membrane potential (mV).
Definition eprop_iaf_adapt.h:418
double kappa_reg_
Low-pass filter of the firing rate for regularization.
Definition eprop_iaf_adapt.h:427
double t_ref_
Duration of the refractory period (ms).
Definition eprop_iaf_adapt.h:412
double adapt_tau_
Time constant of the threshold adaptation (ms).
Definition eprop_iaf_adapt.h:384
double C_m_
Capacitance of the membrane (pF).
Definition eprop_iaf_adapt.h:387
double surrogate_gradient_height_
Height scaling of surrogate gradient / pseudo-derivative of membrane voltage.
Definition eprop_iaf_adapt.h:406
double c_reg_
Coefficient of firing rate regularization.
Definition eprop_iaf_adapt.h:390
double I_e_
Constant external input current (pA).
Definition eprop_iaf_adapt.h:399
void get(Dictionary &) const
Get the parameters and their values.
Definition eprop_iaf_adapt.cpp:119
double adapt_beta_
Prefactor of the threshold adaptation.
Definition eprop_iaf_adapt.h:381
double E_L_
Leak / resting membrane potential (mV).
Definition eprop_iaf_adapt.h:393
double f_target_
Target firing rate of rate regularization (spikes/s).
Definition eprop_iaf_adapt.h:396
Structure of state variables.
Definition eprop_iaf_adapt.h:441
double i_in_
Input current (pA).
Definition eprop_iaf_adapt.h:458
State_()
Default constructor.
Definition eprop_iaf_adapt.cpp:91
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.h:467
void set(const Dictionary &, const Parameters_ &, double, Node *)
Set the state variables.
Definition eprop_iaf_adapt.cpp:249
double z_
Binary spike state variable - 1.0 if the neuron has spiked in the previous time step and 0....
Definition eprop_iaf_adapt.h:464
void get(Dictionary &, const Parameters_ &) const
Get the state variables and their values.
Definition eprop_iaf_adapt.cpp:239
double v_m_
Membrane voltage relative to the leak membrane potential (mV).
Definition eprop_iaf_adapt.h:461
long r_
Number of remaining refractory steps.
Definition eprop_iaf_adapt.h:452
double surrogate_gradient_
Surrogate gradient / pseudo-derivative of the membrane voltage.
Definition eprop_iaf_adapt.h:455
double adapt_
Adaptation variable.
Definition eprop_iaf_adapt.h:443
double learning_signal_
Learning signal. Sum of weighted error signals coming from the readout neurons.
Definition eprop_iaf_adapt.h:449
double v_th_adapt_
Adapting spike threshold voltage.
Definition eprop_iaf_adapt.h:446
Structure of internal variables.
Definition eprop_iaf_adapt.h:500
double P_adapt_
Propagator matrix entry for evolving the adaptation (mathematical symbol "rho" in user documentation)...
Definition eprop_iaf_adapt.h:508
long RefractoryCounts_
Total refractory steps.
Definition eprop_iaf_adapt.h:511
double P_i_in_
Propagator matrix entry for evolving the incoming currents.
Definition eprop_iaf_adapt.h:505
double P_v_m_
Propagator matrix entry for evolving the membrane voltage (mathematical symbol "alpha" in user docume...
Definition eprop_iaf_adapt.h:502