stdp_triplet_synapse#
- class brainpy.state.stdp_triplet_synapse(*args, **kwargs)#
Triplet spike-timing-dependent plasticity synapse spec (NEST
stdp_triplet_synapse).Four traces drive the rule — a fast/slow pair on each side, all decay-then-add on the substrate (current spike included):
r1(pre,tau_plus),r2(pre,tau_plus_triplet);o1(post,tau_minus),o2(post,tau_minus_triplet).
The kernel gates its own weight writeback — the online all-to-all scheme equal to NEST’s deferred
send()at every send (pre-spike) time:\[\begin{split}w &\leftarrow \min\!\big(w + r_1 (A_2^+ + A_3^+\, o_2),\ W_{\max}\big) \quad\text{(post spike)} \\ w &\leftarrow \max\!\big(w - o_1 (A_2^- + A_3^-\, r_2),\ 0\big) \quad\text{(pre spike)}\end{split}\]matching NEST
facilitate_/depress_: potentiation reads the fast pre tracer1weighted by the slow post traceo2; depression reads the fast post traceo1weighted by the slow pre tracer2. The slow trace on the triggering side is taken just before the current spike’s own increment (thet-epsilonof the triplet rule), realised by excluding the current step’s spike from every trace (r = pre_traces - pre_spike,o = post_traces - post_spike).- 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) – Fast presynaptic tracer1constant (> 0). Default16.8 ms.tau_plus_triplet (
Quantity, optional) – Slow presynaptic tracer2constant (> 0). Default101.0 ms.tau_minus (
Quantity, optional) – Fast postsynaptic traceo1constant (> 0). Default20.0 ms.tau_minus_triplet (
Quantity, optional) – Slow postsynaptic traceo2constant (> 0). Default110.0 ms.Aplus (
float, optional) – Pair potentiation amplitude \(A_2^+\). Default5e-10.Aplus_triplet (
float, optional) – Triplet potentiation amplitude \(A_3^+\). Default0.0062.Aminus (
float, optional) – Pair depression amplitude \(A_2^-\). Default0.007.Aminus_triplet (
float, optional) – Triplet depression amplitude \(A_3^-\). Default0.00023.Wmax (
float, optional) – Upper weight bound (depression floors at0). Default100.0.Kplus (
float, optional) – Initial fast pre tracer1(the substrate seeds traces at 0, the NEST default). Default0.0.Kplus_triplet (
float, optional) – Initial slow pre tracer2(seeded at 0). Default0.0.
Notes
NEST divergence — ``tau_minus`` / ``tau_minus_triplet`` location. In NEST both postsynaptic trace constants live on the postsynaptic neuron (
ArchivingNode), not the synapse; here they are synapse-spec attributes driving the substrate’s per-posto1/o2trace columns, so the triplet rule 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 trace-storage and parameter-location reference (both post-trace constants move onto the synapse) and the parity-test links are 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_triplet_synapse >>> s = stdp_triplet_synapse(weight=5.0) >>> s.is_homogeneous_weight, s.edge_state_init() (False, {}) >>> len(s.pre_trace_tau), len(s.post_trace_tau) # fast + slow per side (2, 2) >>> float(u.Quantity(s.pre_trace_tau[1]).to_decimal(u.ms)) 101.0