stdp_pl_synapse_hom

stdp_pl_synapse_hom#

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

Power-law spike-timing-dependent plasticity synapse spec (NEST stdp_pl_synapse_hom).

The substrate maintains the per-pre K+ trace (pre_trace_tau=tau_plus) and the per-post K- trace (post_trace_tau=tau_minus); this kernel gates its own writeback — potentiation on the post spike, depression on the pre spike — using the online all-to-all scheme equal to NEST’s deferred send() at every send (pre-spike) time:

\[ \begin{align}\begin{aligned}w \leftarrow w + \lambda \, w^{\mu} \, K^+ \quad\text{(post spike)}\\w \leftarrow \max\!\big(w - \alpha \lambda \, w \, K^-,\; 0\big) \quad\text{(pre spike)}\end{aligned}\end{align} \]

There is no Wmax: potentiation’s \(w^{\mu}\) weight dependence (\(\mu \approx 0.4\)) is the only upper soft-bound, and the only hard clip is the lower clip to 0 in depression (matching NEST depress_). Each side excludes the current step’s own spike from the opposite trace (K+ = pre_trace - pre_spike, K- = post_trace - post_spike).

Parameters:
  • weight (ArrayLike or Quantity, optional) – Per-edge weight (pA; bare numbers are pA). Default 1.0 pA.

  • delay (Quantity, optional) – Homogeneous axonal delay (> 0). Default 1.0 ms.

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

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

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

  • lambda (float, optional) – Learning rate \(\lambda\) (>= 0). Default 0.1.

  • alpha (float, optional) – Depression scaling \(\alpha\) (>= 0). Default 1.0.

  • mu (float, optional) – Power-law potentiation exponent \(\mu\). Default 0.4.

  • Kplus (float, optional) – Initial K+ (the substrate seeds traces at 0, the NEST default). Default 0.0.

Notes

NEST divergence — ``tau_minus`` location. In NEST tau_minus is a parameter of the postsynaptic neuron (ArchivingNode), not the synapse; here it is a synapse-spec attribute driving the substrate’s per-post K- trace, so STDP runs standalone.

Online vs deferred: the substrate potentiates eagerly at post-spike steps, whereas NEST defers it to the next pre spike; the two coincide at pre-spike (send) times, so parity is asserted there.

Parity note. The consolidated NEST vs. brainpy.state divergence reference — trace-storage move, the family parameter-location map, and the parity-test links — is in STDP parity: where state lives and how spikes pair (Trace storage: tau_minus is a synapse parameter here, a neuron parameter in NEST).

References

Examples

>>> import brainunit as u
>>> from brainpy.state import stdp_pl_synapse_hom
>>> s = stdp_pl_synapse_hom(weight=5.0, mu=0.4, lambda_=0.1)
>>> s.is_homogeneous_weight, s.edge_state_init()
(False, {})
>>> s.mu, s.alpha
(0.4, 1.0)
>>> float(u.Quantity(s.pre_trace_tau).to_decimal(u.ms))
20.0