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 concentrationn(broadcast from avolume_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
wto[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 byA_plustimes the strictly-prior presynaptic traceKplus(tau_plus,+1per pre spike), a pre spike depresses byA_minustimes the strictly-prior postsynaptic traceKminus(tau_minus, the post-neuronK^-). Thebbaseline’s sign flip (facilitation \(\leftrightarrow\) depression when \(n<b\)) falls out of the(n-b)factor for free.- Parameters:
weight (
ArrayLikeorQuantity, optional) – Per-edge weight (current synapse). Bare numbers default to pA. Default1.0pA.delay (
Quantity, optional) – Axonal/dendritic delay (> 0). Default1.0 ms.receptor_type (
int, optional) – Postsynaptic receptor port (>= 0). Default0.A_plus (
float, optional) – Facilitation / depression amplitudes (per-pairing increment ofc). Defaults1.0/1.5.A_minus (
float, optional) – Facilitation / depression amplitudes (per-pairing increment ofc). Defaults1.0/1.5.tau_plus (
Quantity, optional) – PresynapticKplustrace time constant (> 0). Default20.0 ms.tau_minus (
Quantity, optional) – PostsynapticKminustrace time constant (> 0). Default20.0 ms.tau_c (
Quantity, optional) – Eligibility-trace time constant (> 0). Default1000.0 ms.tau_n (
Quantity, optional) – Dopamine-concentration time constant (> 0). Must equal the boundvolume_transmitter’stau_n. Default200.0 ms.b (
float, optional) – Dopaminergic baseline (concentration units). Default0.0.Wmin (
float, optional) – Lower / upper weight clamp. Defaults0.0/200.0.Wmax (
float, optional) – Lower / upper weight clamp. Defaults0.0/200.0.c (
float, optional) – Initial per-edge eligibility trace. Default0.0.
Notes
NEST divergence — parameter location. In NEST
A_plus/A_minus/tau_plus/tau_c/tau_n/b/Wmin/Wmaxare common properties and thevolume_transmitteris bound there;tau_minuslives on the postsynaptic neuron (read viaget_K_value) andnlives on the synapse (integrated from the relayed dopa train). Here the spec is self-contained:tau_minusis a spec attribute (the cluster-04stdp_synapseconvention — set identically on the NEST neuron for parity) andnis moved onto the broadcastvolume_transmitter(signal_reads=('n',)), sotau_nmust match between spec and transmitter.Online vs deferred. NEST integrates the weight lazily (only at pre
sendand VTtrigger_update_weighttimes); this kernel integrates every step with the broadcastn(one-step lag,O(dt/tau_n)). The trajectories coincide at the send/trigger times where NEST’sweight_recordersamples.Parity note. The
n/tau_n-on-volume_transmittermove, 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