jonke_synapse

Contents

jonke_synapse#

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

Exponential-weight-dependence STDP synapse spec (NEST jonke_synapse).

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 — the online all-to-all scheme equal to NEST’s deferred send() at every send (pre-spike) time:

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

The clips are one-sided per side (NEST facilitate_/depress_): facilitation hard-bounds only from above at Wmax, depression only from below at 0. With the default \(\beta = 0\) and \(\mu_\pm = 0\) the rule reduces to additive STDP; \(\mu_+ > 0\) makes potentiation grow with the weight (note: not a soft upper bound — the Wmax clip is). Each side excludes the current step’s own spike from the opposite trace (K+ = pre_trace - pre_spike, K- = post_trace - post_spike). When \(\lambda = 0\) the weight is returned unchanged (learning disabled), skipping the clip — matching NEST.

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\). Default 0.01.

  • alpha (float, optional) – Depression amplitude scaling \(\alpha\). Default 1.0.

  • mu_plus (float, optional) – Exponential weight-dependence exponents (inverse weight units). Default 0.0 (additive).

  • mu_minus (float, optional) – Exponential weight-dependence exponents (inverse weight units). Default 0.0 (additive).

  • beta (float, optional) – Constant offset \(\beta\) applied each update (positive biases toward depression). Default 0.0.

  • Wmax (float, optional) – Upper weight clip in facilitation. Default 100.0.

  • 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.

References

Examples

>>> import brainunit as u
>>> from brainpy.state import jonke_synapse
>>> s = jonke_synapse(weight=10.0, mu_plus=0.1)
>>> s.is_homogeneous_weight, s.edge_state_init()
(False, {})
>>> s.beta, s.mu_plus
(0.0, 0.1)
>>> float(u.Quantity(s.post_trace_tau).to_decimal(u.ms))
20.0