urbanczik_synapse#
- class brainpy.state.urbanczik_synapse(*args, **kwargs)#
Dendritic prediction-error plasticity synapse spec (NEST
urbanczik_synapse).Implements the Urbanczik-Senn rule: with \(\bar{s}_L\), \(\bar{s}_s\) the presynaptic traces at the dendritic membrane (
tau_L) and synaptic (tau_s) time constants, and \(\delta\Pi\) the post neuron’s dendritic prediction error read per edge each step,\[\begin{split}\mathrm{PI}(t) &= (\bar{s}_L(t) - \bar{s}_s(t))\,\delta\Pi(t) \\ \mathrm{PI_{int}}(t) &= \textstyle\sum_{s \le t} \mathrm{PI}(s) \\ \mathrm{PI_{exp}}(t) &= \textstyle\sum_{s \le t} e^{-(t-s)/\tau_\Delta}\,\mathrm{PI}(s) \\ w(t) &= \mathrm{clip}\big(w_0 + (\mathrm{PI_{int}} - \mathrm{PI_{exp}})\, P,\; W_{\min},\, W_{\max}\big)\end{split}\]with the NEST prefactor \(P = 15\,C_m\,\tau_s\,\eta / (g_L (\tau_L - \tau_s))\) (dendritic
C_m[pF],g_L[nS],tau_L = C_m/g_L[ms],tau_s[ms]) and \(w_0\) the spec’s initial weight. The two sums are carried per edge (edge_state_init); the presynaptic traces are the substrate’s two-column per-pre trace seam (pre_trace_tau = (tau_L, tau_s)).- Parameters:
weight (
ArrayLikeorQuantity, optional) – Initial per-edge weight; bare numbers default to pA (the dendritic current port). Its sign selectstau_sand must agree withWmin/Wmaxunder NEST’s sign tests. Default1.0 pA.delay (
Quantity, optional) – Axonal/dendritic delay (> 0). Default1.0 ms. For live-NEST parity the drive setsdelay = dt(one grid step) to align the online reader’s one-step lag to NEST’s minimal dendritic-delay window.eta (
float, optional) – Learning rate \(\eta\). Default0.07.tau_Delta (
Quantity, optional) – Plasticity low-pass time constant \(\tau_\Delta\) (> 0). Default100.0 ms.Wmin (
float, optional) – Lower / upper weight clamp. Defaults0.0/100.0.Wmax (
float, optional) – Lower / upper weight clamp. Defaults0.0/100.0.receptor_type (
int, optional) – Informational default target port (3= dendritic excitatory). The actual routing is driven byconnect(..., receptor_type=...); the post neuron resolves it to a delta-input channel label. Default3.dend_C_m (
Quantity, optional) – Dendritic compartment capacitance / leak conductance for the prefactor andtau_L = C_m/g_L. Defaults300.0 pF/30.0 nS(pp_cond_exp_mc_urbanczikdendrite).dend_g_L (
Quantity, optional) – Dendritic compartment capacitance / leak conductance for the prefactor andtau_L = C_m/g_L. Defaults300.0 pF/30.0 nS(pp_cond_exp_mc_urbanczikdendrite).dend_tau_syn_ex (
Quantity, optional) – Dendritic excitatory / inhibitory synaptic time constants;tau_sis the one selected by the initial weight sign. Defaults3.0 ms/3.0 ms.dend_tau_syn_in (
Quantity, optional) – Dendritic excitatory / inhibitory synaptic time constants;tau_sis the one selected by the initial weight sign. Defaults3.0 ms/3.0 ms.
Notes
See the module docstring for the online-vs-event-driven equivalence, the dendritic-parameter-location divergence, and the parity posture.
Examples
>>> import brainunit as u >>> from brainpy.state import urbanczik_synapse >>> s = urbanczik_synapse(weight=1.0 * u.pA) >>> s.is_homogeneous_weight, s.post_state_reads (False, ('delta_Pi',)) >>> s.post_trace_tau, s.edge_state_init() (None, {'PI_integral': 0.0, 'PI_exp_integral': 0.0}) >>> [float(u.Quantity(t).to_decimal(u.ms)) for t in s.pre_trace_tau] [10.0, 3.0]