COBA and PING Dynamics, Discretisation, and Learning

A textbook derivation of the conductance-based COBA and PING equations, their discrete simulation, and their training by surrogate-gradient BPTT, voltage-gradient damping, gradient clipping, AdamW, and Dale projection.

Abstract

COBA and PING classifiers share conductance-based leaky integrate-and-fire dynamics but differ in whether excitatory and inhibitory populations form a reciprocal feedback loop. We derive their event-driven synapses, exponential-Euler membrane update, spike and readout rules, and complete training calculation. We then explain why long recurrent gradient paths can amplify in this model and how voltage-gradient damping stabilizes selected backward sensitivities without changing the forward simulation.

Model family and notation

The COBA and PING classifiers use the same conductance-based leaky integrate-and-fire neuron. Their distinction is architectural. The COBA condition disables the recurrent excitatory-to-inhibitory-to-excitatory pathway, whereas PING enables the loop 𝐸→𝐼→𝐸.[1]

Physical time is 𝑑, the simulation-step index is π‘˜, and π‘‘π‘˜=π‘˜Ξ”π‘‘sim, where Δ𝑑sim is the integration timestep. A presentation contains 𝑁𝑑 timesteps and has duration 𝑇present=𝑁𝑑Δ𝑑sim. Superscripts on conductances identify AMPA or GABA polarity, while subscripts identify the receiving population.

Continuous membrane dynamics

For neuron 𝑗 in population π‘‹βˆˆ{𝐸,𝐼}, the membrane equation is

πΆπ‘š,π‘‹π‘‘π‘‰π‘š,𝑋,𝑗𝑑𝑑=βˆ’π‘”πΏ,𝑋(π‘‰π‘š,𝑋,π‘—βˆ’πΈπΏ)βˆ’π‘”π‘‹,𝑗𝐸(π‘‰π‘š,𝑋,π‘—βˆ’πΈπΈ)βˆ’π‘”π‘‹,𝑗𝐼(π‘‰π‘š,𝑋,π‘—βˆ’πΈπΌ).
(1)

In Equation 1, π‘‰π‘š is membrane voltage, πΆπ‘š is capacitance, 𝑔𝐿 is leak conductance, and 𝑔𝐸 and 𝑔𝐼 are total AMPA and GABA conductances. The reversal potentials are

𝐸𝐿=βˆ’65mV,𝐸𝐸=0mV,𝐸𝐼=βˆ’80mV.
(2)

A conductance 𝑔 with reversal potential 𝐸 supplies current 𝐼=𝑔(πΈβˆ’π‘‰π‘š). Equation 2 therefore makes AMPA normally depolarizing and GABA normally hyperpolarizing. The fixed membrane parameters are

πΆπ‘š,𝐸=1nF,𝑔𝐿,𝐸=0.05Β΅S,πΆπ‘š,𝐼=0.5nF,𝑔𝐿,𝐼=0.1Β΅S.
(3)

The corresponding passive membrane time constants follow from πœπ‘š=πΆπ‘šπ‘”πΏ:

πœπ‘š,𝐸=20ms,πœπ‘š,𝐼=5ms.
(4)

Continuous synaptic dynamics

The continuous spike train emitted by presynaptic neuron 𝑖 is

𝑠𝑖(𝑑)=βˆ‘π‘—π›Ώ(π‘‘βˆ’π‘‘π‘–,𝑗),
(5)

where 𝑑𝑖,𝑗 is event time 𝑗 and 𝛿 is the Dirac impulse. A postsynaptic conductance 𝑔𝑗 with decay constant 𝜏 satisfies

𝑑𝑔𝑗𝑑𝑑=βˆ’π‘”π‘—πœ+βˆ‘π‘–π‘€event,𝑖,𝑗𝑠𝑖(𝑑).
(6)

Here 𝑀event,𝑖,𝑗 is the conductance increment produced by one presynaptic event. AMPA and GABA use separate copies of Equation 6 with 𝜏AMPA=2ms and the canonical 𝜏GABA=6ms.

Discretising the synaptic equations

Between events, Equation 6 reduces to

𝑑𝑔𝑑𝑑=βˆ’π‘”πœ,𝑑𝑔𝑔=βˆ’π‘‘π‘‘πœ.
(7)

Integrating Equation 7 from π‘‘π‘˜ to π‘‘π‘˜+1=π‘‘π‘˜+Δ𝑑sim gives

βˆ«π‘”[π‘˜]π‘”βˆ’[π‘˜+1]𝑑𝑔𝑔=βˆ’βˆ«π‘‘π‘˜π‘‘π‘˜+Δ𝑑simπ‘‘π‘‘πœ,lnπ‘”βˆ’[π‘˜+1]𝑔[π‘˜]=βˆ’Ξ”π‘‘sim𝜏.
(8)

Exponentiating Equation 8 yields the event-free decay

π‘”βˆ’[π‘˜+1]=𝑔[π‘˜]exp(βˆ’Ξ”π‘‘sim𝜏).
(9)

Integrating Equation 6 across an infinitesimal interval containing one event gives

𝑔(𝑑𝑖+)βˆ’π‘”(π‘‘π‘–βˆ’)=𝑀event.
(10)

Combining Equation 9 and Equation 10 gives the timestep recurrence

π’ˆ[π‘˜+1]=exp(βˆ’Ξ”π‘‘sim𝜏)π’ˆ[π‘˜]+𝒔[π‘˜]π‘Š+𝒖[π‘˜].
(11)

In Equation 11, 𝒔[π‘˜] is a dimensionless binary presynaptic spike vector, π‘Š has presynaptic neurons on rows and postsynaptic neurons on columns, and 𝒖[π‘˜] is an external conductance increment. The simulator performs exact exponential decay followed by the full, undecayed event increment.[1]

E–I conductance recurrences

Define the dimensionless decay factors

𝛽AMPA=exp(βˆ’Ξ”π‘‘sim𝜏AMPA),𝛽GABA=exp(βˆ’Ξ”π‘‘sim𝜏GABA).
(12)

For one E–I layer, Equation 11 expands to

π’ˆπΈ[π‘˜+1]𝐸=𝛽AMPAπ’ˆπΈ[π‘˜]𝐸+𝒔𝐸[π‘˜]π‘ŠπΈβ†’πΈ+𝒙[π‘˜]π‘Šin+𝒖𝐸[π‘˜]𝐸,
(13)
π’ˆπΈ[π‘˜+1]𝐼=𝛽GABAπ’ˆπΈ[π‘˜]𝐼+𝒔𝐼[π‘˜]π‘ŠπΌβ†’πΈ+𝒖𝐸[π‘˜]𝐼,
(14)
π’ˆπΌ[π‘˜+1]𝐸=𝛽AMPAπ’ˆπΌ[π‘˜]𝐸+𝒔𝐸[π‘˜]π‘ŠπΈβ†’πΌ+𝒙𝐼[π‘˜]π‘Šin,𝐼+𝒖𝐼[π‘˜]𝐸,
(15)
π’ˆπΌ[π‘˜+1]𝐼=𝛽GABAπ’ˆπΌ[π‘˜]𝐼+𝒔𝐼[π‘˜]π‘ŠπΌβ†’πΌ+𝒖𝐼[π‘˜]𝐼.
(16)

The canonical architecture sets π‘ŠπΈβ†’πΈ=π‘ŠπΌβ†’πΌ=0. COBA additionally disables π‘ŠπΈβ†’πΌ and π‘ŠπΌβ†’πΈ. PING enables those two projections: excitatory spikes recruit inhibitory neurons through Equation 15, and inhibitory spikes subsequently produce GABA conductance through Equation 14. A recurrent spike generated in one iteration is consumed in the next, giving each recurrent projection a one-timestep delay.

Exponential-Euler membrane discretisation

The simulator first updates conductances with Equation 13–Equation 16, then holds those new values constant during the membrane step. Expanding Equation 1 for one neuron gives

πΆπ‘šπ‘‘π‘‰π‘šπ‘‘π‘‘=βˆ’(𝑔𝐿+𝑔𝐸+𝑔𝐼)π‘‰π‘š+𝑔𝐿𝐸𝐿+𝑔𝐸𝐸𝐸+𝑔𝐼𝐸𝐼.
(17)

Define the total conductance and its conductance-weighted equilibrium voltage by

𝑔tot=𝑔𝐿+𝑔𝐸+𝑔𝐼,π‘‰βˆž=𝑔𝐿𝐸𝐿+𝑔𝐸𝐸𝐸+𝑔𝐼𝐸𝐼𝑔tot.
(18)

Substituting Equation 18 into Equation 17 gives

πΆπ‘šπ‘‘π‘‰π‘šπ‘‘π‘‘=βˆ’π‘”tot(π‘‰π‘šβˆ’π‘‰βˆž),𝜏eff=πΆπ‘šπ‘”tot.
(19)

Let π‘ž=π‘‰π‘šβˆ’π‘‰βˆž. Because the conductances and π‘‰βˆž are constant within the timestep,

π‘‘π‘žπ‘‘π‘‘=βˆ’π‘žπœeff,π‘‘π‘žπ‘ž=βˆ’π‘‘π‘‘πœeff.
(20)

Integrating Equation 20 over one timestep gives

lnπ‘ž[π‘˜+1]π‘ž[π‘˜]=βˆ’Ξ”π‘‘sim𝜏eff,π‘ž[π‘˜+1]=π‘ž[π‘˜]exp(βˆ’Ξ”π‘‘sim𝜏eff).
(21)

Returning to membrane voltage produces the pre-threshold candidate

𝑉candidate[π‘˜+1]=π‘‰βˆž+(π‘‰π‘š[π‘˜]βˆ’π‘‰βˆž)exp(βˆ’Ξ”π‘‘sim𝑔totπΆπ‘š).
(22)

Equivalently, define

π‘Ž=exp(βˆ’Ξ”π‘‘sim𝑔totπΆπ‘š),Δ𝑉[π‘˜]=(π‘‰βˆžβˆ’π‘‰π‘š[π‘˜])(1βˆ’π‘Ž),𝑉candidate[π‘˜+1]=π‘‰π‘š[π‘˜]+Δ𝑉[π‘˜].
(23)

Equation 22 is the update used by the simulator. It is exact for the linear membrane equation under the stated zero-order hold on conductances; it is not an exact solution of the continuously co-evolving neuron and synapses.

Spike, reset, and refractory dynamics

Let π‘Ÿ[π‘˜] be the non-negative integer refractory counter. It is decremented before the threshold decision:

π‘Ÿβˆ’[π‘˜+1]=max(π‘Ÿ[π‘˜]βˆ’1,0).
(24)

A neuron emits the binary spike

𝑠[π‘˜+1]=𝐻(𝑉candidate[π‘˜+1]βˆ’π‘‰th)𝟏[π‘Ÿβˆ’[π‘˜+1]=0],
(25)

where 𝐻 is the Heaviside step function, 𝑉th=βˆ’50mV, and 𝟏 is an indicator. A neuron that spikes, or remains refractory after Equation 24, is stored at 𝑉reset=βˆ’65mV. A new spike sets the counter to the population’s refractory step count; otherwise it retains π‘Ÿβˆ’[π‘˜+1].

The canonical timestep is Δ𝑑sim=0.1ms. The excitatory and inhibitory refractory durations, 1.2ms and 0.6ms, therefore correspond exactly to 12 and 6 timesteps.

Output readout and classification loss

The canonical classifier uses an output LIF with mean pre-reset voltage. Let 𝒉[π‘˜] be the final hidden E-population spike vector and π‘Šout the hidden-to-output matrix. With output decay π›½π‘œ=exp(βˆ’Ξ”π‘‘simπœπ‘œ), the pre-reset dimensionless output state is

π’‚π‘œ[π‘˜+1]=π›½π‘œπ’–π‘œ[π‘˜]+1βˆ’π›½π‘œΞ”π‘‘sim𝒉[π‘˜+1]π‘Šout.
(26)

The output spike and subtractive reset are

π’”π‘œ[π‘˜+1]=𝐻(π’‚π‘œ[π‘˜+1]βˆ’πœƒπ‘œ),π’–π‘œ[π‘˜+1]=π’‚π‘œ[π‘˜+1]βˆ’πœƒπ‘œπ’”π‘œ[π‘˜+1],
(27)

where πœƒπ‘œ=1. Output state and its evidence accumulator begin at zero for each independent image presentation. Hidden E/I voltages, conductances, spikes and refractory counters likewise initialize anew for every independent presentation. The decoder therefore receives presentation boundaries through these per-forward resets. The class score is the mean pre-reset state over the complete readout window:

𝑧𝑐=1π‘π‘‘βˆ‘π‘˜=1π‘π‘‘π‘Žπ‘œ,𝑐[π‘˜].
(28)

For minibatch member 𝑏, softmax-normalized evidence is

𝑝𝑏,𝑐=exp(𝑧𝑏,𝑐)βˆ‘π‘ž=1𝑁outexp(𝑧𝑏,π‘ž).
(29)

It is used for optimization but is not assumed to be a calibrated probability. For true class 𝑦𝑏, the mean cross-entropy training loss is

𝐿CE=βˆ’1π΅βˆ‘π‘=1𝐡ln𝑝𝑏,𝑦𝑏.
(30)

Some conditions add a one-sided firing-rate ceiling. Let 𝐾𝑏,𝑙,𝑗=βˆ‘π‘˜=1𝑁𝑑𝑠𝑏,𝑙,𝑗[π‘˜] be the spike count of hidden E neuron 𝑗 in layer 𝑙 for presentation 𝑏. Its sample-wise population-mean rate is

|π‘Ÿ|𝑏,𝑙=1𝑁𝐸,𝑙𝑇presentβˆ‘π‘—=1𝑁𝐸,𝑙𝐾𝑏,𝑙,𝑗.
(31)

With tested ceiling π‘ŸπΈ,ceil and coefficient πœ†rate, the penalty is

𝐿rate=πœ†rateπ΅πΏβˆ‘π‘=1π΅βˆ‘π‘™=1𝐿max(0,|π‘Ÿ|𝑏,π‘™βˆ’π‘ŸπΈ,ceil)2,𝐿total=𝐿CE+𝐿rate.
(32)

The canonical reference conditions set πœ†rate=0; activity-ceiling conditions use Equation 32 with a positive coefficient.

Backpropagation through time

Collect all differentiable voltages, conductances, spikes, output states and accumulators into the state vector 𝒙[π‘˜]. One complete simulation step has the abstract form

𝒙[π‘˜+1]=πΉπ‘˜(𝒙[π‘˜],𝒖[π‘˜];πœƒ),𝐿total=β„“(𝒙[𝑁𝑑],𝑦).
(33)

πΉπ‘˜ is a bundle rather than one additional simulator equation. It combines the discrete synapse rule in Equation 11 and the decay factors in Equation 12; the population-specific conductance updates from Equation 13 through Equation 16; the implemented membrane update in Equation 23; the refractory, spike and reset operations in Equation 24 and Equation 25; and the output update in Equation 26 and Equation 27. It also advances the accumulators used to construct Equation 28 and Equation 31. The earlier continuous equations and intermediate derivation steps explain these operations but are not extra updates inside πΉπ‘˜.

Here 𝒖[π‘˜] denotes external input, πœƒ is the shared trainable parameter vector, and β„“ includes the readout and objective defined in Equation 28–Equation 32. At Δ𝑑sim=0.1ms, a 200ms presentation applies πΉπ‘˜ 2,000 times. Each copy has a different state but reuses the same parameters.

Define the state sensitivity

𝜹[π‘˜]=βˆ‡π’™[π‘˜]𝐿total,𝐽step[π‘˜]=πœ•πΉπ‘˜πœ•π’™[π‘˜].
(34)

Let π‘₯𝑖[π‘˜] be component 𝑖 of the current state and πΉπ‘˜,𝑗 component 𝑗 of πΉπ‘˜. The project evaluates its loss from the terminal readout and rate accumulators. Consequently, for π‘˜<𝑁𝑑, the current state affects the loss through the next state. Applying the multivariable chain rule component by component gives

𝛿𝑖[π‘˜]=πœ•πΏtotalπœ•π‘₯𝑖[π‘˜]=βˆ‘π‘—πœ•πΏtotalπœ•π‘₯𝑗[π‘˜+1]πœ•π‘₯𝑗[π‘˜+1]πœ•π‘₯𝑖[π‘˜]=βˆ‘π‘—π›Ώπ‘—[π‘˜+1]πœ•πΉπ‘˜,π‘—πœ•π‘₯𝑖[π‘˜],𝜹[π‘˜]=𝐽step[π‘˜]⊀𝜹[π‘˜+1],𝜹[𝑁𝑑]=βˆ‡π’™[𝑁𝑑]β„“(𝒙[𝑁𝑑],𝑦).
(35)

The second line of Equation 35 sums every route from state component π‘₯𝑖[π‘˜] to the later loss through next-state component π‘₯𝑗[π‘˜+1]. The third line substitutes Equation 34 and Equation 33. Stacking the component equations produces the transpose-Jacobian vector product in the fourth line; the final line supplies the terminal condition from Equation 33. Because each parameter is reused, its total gradient is

βˆ‡πœƒπΏtotal=βˆ‡πœƒdirect𝐿total+βˆ‘π‘˜=0π‘π‘‘βˆ’1πœ•πΉπ‘˜πœ•πœƒβŠ€πœΉ[π‘˜+1].
(36)

Equation 35 and Equation 36 define backpropagation through time (BPTT). PyTorch autograd evaluates these vector–Jacobian products and accumulates parameter gradients when backward propagation is requested; it need not construct the full Jacobian matrices explicitly.[4]

For example, the local recurrence π’ˆ[π‘˜+1]=π›½π’ˆ[π‘˜]+𝒔[π‘˜]π‘Š gives

βˆ‡π‘ŠπΏtotal=βˆ‘π‘˜π’”[π‘˜]βŠ€βˆ‡π’ˆ[π‘˜+1]𝐿total.
(37)

Equation 37 shows temporal credit assignment directly: every use of the shared weight contributes according to the later loss sensitivity of the conductance it created.

Surrogate spike derivatives

BPTT requires derivatives of the update operations, but the hard spike in Equation 25 has derivative zero away from threshold and is undefined at threshold. Direct use of that derivative would block useful learning signals.

Surrogate-gradient learning retains the binary forward spike while assigning a smooth backward derivative.[2] For πœ‰=𝑉candidateβˆ’π‘‰th, the chosen proxy is

𝑝(πœ‰)=π›½πœ‰1+𝛽|πœ‰|,πœ•π‘ πœ•πœ‰β‰ˆπ›½(1+𝛽|πœ‰|)2.
(38)

The approximate equality in Equation 38 denotes an assigned backward rule rather than the true derivative of the Heaviside function. For hidden neurons, πœ‰ is measured in millivolts and 𝛽 in reciprocal millivolts. The standard classifiers use 𝛽=1.

Let sg(𝑧) denote stop-gradient: it returns 𝑧 forward but has zero derivative. The simulator constructs

𝑠=sg(𝐻(πœ‰))+𝑝(πœ‰)βˆ’sg(𝑝(πœ‰)).
(39)

Equation 39 equals 𝐻(πœ‰) numerically, while autograd differentiates only 𝑝(πœ‰).[5] Boolean reset and refractory decisions remain non-differentiable. Resetting hidden voltage to a constant cuts that voltage-state path, while the floating spike value carries the surrogate derivative into downstream synapses and the readout.

Why voltage gradients can explode

Expanding Equation 35 across many steps produces repeated Jacobian products:

𝜹[π‘˜]=𝐽step[π‘˜]⊀𝐽step[π‘˜+1]βŠ€β€¦π½step[π‘π‘‘βˆ’1]⊀𝜹[𝑁𝑑]+direct terms.
(40)

Products in Equation 40 can shrink useful sensitivities or amplify them. This project combines a 2,000-step graph with voltage, conductance, spike and output-state memory. PING adds a closed route by which a voltage perturbation can return to the population from which it began:

π›Ώπ‘½πΈβ†’π›Ώπ’”πΈβ†’π›Ώπ’ˆπΈβ†’πΌβ†’π›Ώπ‘½πΌβ†’π›Ώπ’”πΌβ†’π›Ώπ’ˆπΌβ†’πΈβ†’π›Ώπ‘½πΈ.
(41)

The local gain of this route follows from the membrane equations rather than from an extra model quantity. Choose 𝑋=𝐸 for excitatory conductance or 𝑋=𝐼 for inhibitory conductance. Differentiating Equation 18 and the decay π‘Ž in Equation 23 gives

πœ•π‘‰βˆžπœ•π‘”π‘‹=πΈπ‘‹βˆ’π‘‰βˆžπ‘”tot,πœ•π‘Žπœ•π‘”π‘‹=βˆ’Ξ”π‘‘simπΆπ‘šπ‘Ž.
(42)

Applying the product rule to Δ𝑉=(π‘‰βˆžβˆ’π‘‰π‘š)(1βˆ’π‘Ž) gives the conductance-to-voltage response

π‘…π‘‹β‰”πœ•Ξ”π‘‰πœ•π‘”π‘‹=(πΈπ‘‹βˆ’π‘‰βˆž)(1βˆ’π‘Ž)𝑔tot+(π‘‰βˆžβˆ’π‘‰π‘š)Δ𝑑simπΆπ‘šπ‘Ž.
(43)

The response 𝑅𝑋 in Equation 43 has units of millivolts per microsiemens. Let 𝑅𝐸→𝐼 and 𝑅𝐼→𝐸 be diagonal matrices of the appropriate responses at I and E neurons. Let 𝑆𝐸 and 𝑆𝐼 be diagonal matrices containing the local surrogate derivatives from Equation 38. One complete backward traversal of Equation 41 then has return Jacobian

𝐽loop=π‘…πΌβ†’πΈπ‘ŠπΌβ†’πΈβŠ€π‘†πΌπ‘…πΈβ†’πΌπ‘ŠπΈβ†’πΌβŠ€π‘†πΈ.
(44)

The transposes in Equation 44 convert the simulator’s presynaptic-row, postsynaptic-column weight storage into maps acting on column perturbations.

At a fixed local linearization, a sensitivity returning through the loop 𝑛 times contains 𝐽loop𝑛𝛿𝑽𝐸. If the spectral radius 𝜌(𝐽loop)>1, some modes grow geometrically. A singular value above one permits amplification over one traversal, while time-varying, non-normal products can amplify transiently even if each instantaneous eigenvalue has magnitude below one.[3] Inhibitory polarity can reverse a perturbation’s sign without making its magnitude small.

Recurrence therefore does not guarantee exploding gradients. It creates the return operator in Equation 44, which BPTT may traverse many times. Loop-disabled COBA lacks that particular operator, but it still carries gradients through membrane, conductance, spike and readout state across the same long presentation.

Global gradient clipping cannot by itself repair this internal propagation. It acts only after BPTT has formed the complete parameter gradient. Internal sensitivities may already be enormous, non-finite, or dominated by the amplifying paths in Equation 40 before clipping occurs.

Voltage-gradient damping

The project therefore intervenes inside the backward recurrence while preserving the physical forward trajectory. For dimensionless divisor 𝑑grad>0, define

𝛼grad=1𝑑grad,π’ŸοΈ€π›Ό(𝑧)=𝛼𝑧+(1βˆ’π›Ό)sg(𝑧).
(45)

Forward evaluation of Equation 45 gives π’ŸοΈ€π›Ό(𝑧)=𝑧, but its backward derivative is

πœ•π’ŸοΈ€π›Ό(𝑧)πœ•π‘§=𝛼.
(46)

The hidden E and I membrane updates replace Equation 23 by

𝑉candidate[π‘˜+1]=π‘‰π‘š[π‘˜]+π’ŸοΈ€π›Όgrad(Δ𝑉[π‘˜]).
(47)

Equation 45 and Equation 47 leave voltages and spikes unchanged forward. Backward, each selected conductance-to-voltage response is multiplied by 𝛼grad. The PING return term in Equation 44 consequently becomes

𝐽loop,damped=𝛼grad2𝐽loop.
(48)

The standard paired classifiers use 𝑑grad=1000, so 𝛼grad=10βˆ’3 and this particular complete loop term is scaled by 10βˆ’6. This does not scale the entire state Jacobian because Equation 45 is inserted only on the Δ𝑉 branch of Equation 47. For one hidden neuron, the three local derivatives entering its candidate voltage are therefore

πœ•π‘‰candidateπœ•(π‘‰π‘š,𝑔𝐸,𝑔𝐼)=1+𝛼gradπœ•Ξ”π‘‰πœ•π‘‰π‘š,𝛼gradπœ•Ξ”π‘‰πœ•π‘”πΈ,𝛼gradπœ•Ξ”π‘‰πœ•π‘”πΌ.
(49)

Thus the conductance-to-voltage blocks are multiplied by 𝛼grad, but the direct identity route from π‘‰π‘š[π‘˜] to 𝑉candidate[π‘˜+1] retains coefficient one. The conductance decay and spike-injection blocks, the refractory-counter update, and the local output recurrence contain no damping operator and are not directly rescaled. Downstream composite derivatives can nevertheless inherit attenuation when their path passes through a damped hidden-voltage increment. There is therefore no scalar 𝛼grad for which the complete step Jacobian is simply 𝛼grad𝐽step.

Holding conductances fixed before bounds and reset, Equation 49 and Equation 23 give

πœ•π‘‰candidate[π‘˜+1]πœ•π‘‰π‘š[π‘˜]=1βˆ’π›Όgrad(1βˆ’π‘Ž).
(50)

Without damping, Equation 50 reduces to π‘Ž. Strong damping moves the direct old-voltage derivative toward one while attenuating sensitivities entering through the membrane increment. It can therefore suppress recurrent-drive amplification without simply erasing membrane memory.

Voltage-gradient damping is an altered backward rule, not a biophysical process or the exact derivative of the forward simulator. It deliberately biases temporal credit assignment and may suppress useful sensitivities along with unstable ones. The divisor is therefore an empirical training choice. Standard classifiers apply it to hidden E and I membrane increments, before voltage bounds, spike detection and reset; output-neuron updates are undamped.[1]

Gradient clipping, AdamW, and Dale projection

After BPTT has accumulated the batch gradient π’ˆ=βˆ‡πœƒπΏtotal, the trainer computes its global Euclidean norm

β€–π’ˆβ€–2=βˆ‘π‘βˆ‘π‘–π‘”π‘,𝑖2.
(51)

With clipping threshold 𝑐=1, it replaces the gradient by

π’ˆΜƒ=π’ˆmin(1,π‘β€–π’ˆβ€–2).
(52)

A non-finite norm causes the optimizer step to be skipped. Otherwise AdamW forms first- and second-moment estimates

π’Ž[𝑛]=𝛽1π’Ž[π‘›βˆ’1]+(1βˆ’π›½1)π’ˆΜƒ[𝑛],𝒗[𝑛]=𝛽2𝒗[π‘›βˆ’1]+(1βˆ’π›½2)π’ˆΜƒ[𝑛]2.
(53)

The square in Equation 53 is elementwise. Bias correction gives

π’ŽΜ‚[𝑛]=π’Ž[𝑛]1βˆ’π›½1𝑛,𝒗̂[𝑛]=𝒗[𝑛]1βˆ’π›½2𝑛.
(54)

For learning rate πœ‚, decoupled weight decay πœ†wd, and numerical stabilizer πœ€, AdamW applies

πœƒ[𝑛+12]=(1βˆ’πœ‚πœ†wd)πœƒ[𝑛]βˆ’πœ‚π’ŽΜ‚[𝑛]𝒗̂[𝑛]+πœ€.
(55)

The standard training recipe used πœ‚=0.0004, πœ†wd=0, minibatches of 256 presentations and 50 epochs. With zero weight decay, Equation 55 is numerically the Adam update for the same hyperparameters.

Dale-constrained trainable connection weights are finally projected onto the non-negative orthant:

πœƒ[𝑛+1]=max(0,πœƒ[𝑛+12]).
(56)

The canonical input and readout matrices are trainable, while recurrent E–I matrices are fixed unless an experiment explicitly makes them trainable. Thus one optimization cycle evaluates the forward dynamics, computes Equation 32, applies surrogate-gradient BPTT with the internal rule in Equation 47, clips by Equation 52, updates by Equation 55, and finishes with Equation 56.

Scope and interpretation

The dynamical discretisation is a numerical approximation to the continuous hybrid system, although Equation 9 and Equation 22 exactly solve their respective subproblems under the stated within-step assumptions. Surrogate spike derivatives and voltage-gradient damping introduce additional backward rules: they make learning possible and tractable but do not turn BPTT into the exact derivative of a smooth physical neuron.

The loop derivation isolates one interpretable amplification route rather than the full state Jacobian, and it does not imply that gamma oscillation itself causes gradient explosion. A paired empirical comparison can vary loop engagement and damping independently.

References

  1. Pinglab contributors. SNNsim and the paired COBA/PING training specification. Software snapshot (2026): membrane dynamics and learning rules, training loop and optimizer, and paired training choices.

  2. E. O. Neftci, H. Mostafa and F. Zenke. β€œSurrogate Gradient Learning in Spiking Neural Networks.” arXiv (2019). doi:10.48550/arXiv.1901.09948

  3. R. Pascanu, T. Mikolov and Y. Bengio. β€œOn the Difficulty of Training Recurrent Neural Networks.” Proceedings of the 30th International Conference on Machine Learning, 1310–1318 (2013).

  4. PyTorch contributors. β€œAutograd mechanics”, β€œTensor.backward”, and β€œtorch.optim.” PyTorch documentation (accessed 15 September 2026).

  5. PyTorch contributors. β€œTensor.detach.” PyTorch documentation (accessed 15 September 2026).