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-postK-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 deferredsend()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 atWmax, depression only from below at0. 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 — theWmaxclip 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 (
ArrayLikeorQuantity, optional) – Per-edge weight (pA; bare numbers are pA). Default1.0pA.delay (
Quantity, optional) – Homogeneous axonal delay (> 0). Default1.0 ms.receptor_type (
int, optional) – Postsynaptic receptor port (>= 0). Default0.tau_plus (
Quantity, optional) – PresynapticK+trace constant (> 0). Default20.0 ms.tau_minus (
Quantity, optional) – PostsynapticK-trace constant (> 0). Default20.0 ms.lambda (
float, optional) – Learning rate \(\lambda\). Default0.01.alpha (
float, optional) – Depression amplitude scaling \(\alpha\). Default1.0.mu_plus (
float, optional) – Exponential weight-dependence exponents (inverse weight units). Default0.0(additive).mu_minus (
float, optional) – Exponential weight-dependence exponents (inverse weight units). Default0.0(additive).beta (
float, optional) – Constant offset \(\beta\) applied each update (positive biases toward depression). Default0.0.Wmax (
float, optional) – Upper weight clip in facilitation. Default100.0.Kplus (
float, optional) – InitialK+(the substrate seeds traces at 0, the NEST default). Default0.0.
Notes
NEST divergence — ``tau_minus`` location. In NEST
tau_minusis a parameter of the postsynaptic neuron (ArchivingNode), not the synapse; here it is a synapse-spec attribute driving the substrate’s per-postK-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