stdp_dopamine_synapse

stdp_dopamine_synapse#

class brainpy.state.stdp_dopamine_synapse(*args, **kwargs)#

Dopamine-modulated STDP synapse spec (NEST stdp_dopamine_synapse).

The weight is driven by the product of a slow per-edge eligibility trace c (set by spike-timing pairing) and a global dopamine concentration n (broadcast from a volume_transmitter):

\[\frac{dw}{dt} = c(t)\,\big(n(t) - b\big),\]

integrated analytically each step with NEST’s update_weight_ kernel (minus_dt = -\Delta t):

\[\tau_s = \frac{\tau_c + \tau_n}{\tau_c\,\tau_n}, \qquad \Delta w = -c\left(\frac{n}{\tau_s}\,\mathrm{expm1}(-\tau_s\Delta t) - b\,\tau_c\,\mathrm{expm1}(-\Delta t/\tau_c)\right),\]

followed by clamping w to [Wmin, Wmax]. The eligibility trace then decays (c \leftarrow c\,e^{-\Delta t/\tau_c}) and receives STDP impulses at the grid point: a post spike facilitates by A_plus times the strictly-prior presynaptic trace Kplus (tau_plus, +1 per pre spike), a pre spike depresses by A_minus times the strictly-prior postsynaptic trace Kminus (tau_minus, the post-neuron K^-). The b baseline’s sign flip (facilitation \(\leftrightarrow\) depression when \(n<b\)) falls out of the (n-b) factor for free.

Parameters:
  • weight (ArrayLike or Quantity, optional) – Per-edge weight (current synapse). Bare numbers default to pA. Default 1.0 pA.

  • delay (Quantity, optional) – Axonal/dendritic delay (> 0). Default 1.0 ms.

  • receptor_type (int, optional) – Postsynaptic receptor port (>= 0). Default 0.

  • A_plus (float, optional) – Facilitation / depression amplitudes (per-pairing increment of c). Defaults 1.0 / 1.5.

  • A_minus (float, optional) – Facilitation / depression amplitudes (per-pairing increment of c). Defaults 1.0 / 1.5.

  • tau_plus (Quantity, optional) – Presynaptic Kplus trace time constant (> 0). Default 20.0 ms.

  • tau_minus (Quantity, optional) – Postsynaptic Kminus trace time constant (> 0). Default 20.0 ms.

  • tau_c (Quantity, optional) – Eligibility-trace time constant (> 0). Default 1000.0 ms.

  • tau_n (Quantity, optional) – Dopamine-concentration time constant (> 0). Must equal the bound volume_transmitter’s tau_n. Default 200.0 ms.

  • b (float, optional) – Dopaminergic baseline (concentration units). Default 0.0.

  • Wmin (float, optional) – Lower / upper weight clamp. Defaults 0.0 / 200.0.

  • Wmax (float, optional) – Lower / upper weight clamp. Defaults 0.0 / 200.0.

  • c (float, optional) – Initial per-edge eligibility trace. Default 0.0.

Notes

NEST divergence — parameter location. In NEST A_plus/A_minus/ tau_plus/tau_c/tau_n/b/Wmin/Wmax are common properties and the volume_transmitter is bound there; tau_minus lives on the postsynaptic neuron (read via get_K_value) and n lives on the synapse (integrated from the relayed dopa train). Here the spec is self-contained: tau_minus is a spec attribute (the cluster-04 stdp_synapse convention — set identically on the NEST neuron for parity) and n is moved onto the broadcast volume_transmitter (signal_reads=('n',)), so tau_n must match between spec and transmitter.

Online vs deferred. NEST integrates the weight lazily (only at pre send and VT trigger_update_weight times); this kernel integrates every step with the broadcast n (one-step lag, O(dt/tau_n)). The trajectories coincide at the send/trigger times where NEST’s weight_recorder samples.

Parity note. The n/tau_n-on-volume_transmitter move, the online-vs-deferred band, and the parity test are documented in STDP parity: where state lives and how spikes pair (Dopamine online-vs-deferred integration (~0.2 % band)).

References

Examples

>>> import brainunit as u
>>> from brainpy.state import stdp_dopamine_synapse
>>> s = stdp_dopamine_synapse(weight=1.0, b=0.0)
>>> s.is_homogeneous_weight, s.signal_reads, s.post_state_reads
(False, ('n',), ())
>>> s.edge_state_init()
{'c': 0.0}
>>> float(u.Quantity(s.pre_trace_tau).to_decimal(u.ms))
20.0