One LIF neuron (β = 0.9, θ = 1) receives a constant input of 1 through weight w for 20 steps. Its output is a spike count, so the loss can only change when w crosses a value where one more spike appears.
One LIF neuron (β = 0.9, θ = 1), constant input 1 through weight w, 20 steps, loss = (spike count − target)². Each frame is one gradient-descent step on w (step size capped at 0.02 so the descent is visible). Surrogate: arctan, ∂S/∂U ≈ 1 / (1 + (π(U − θ))²); the reset is detached.
One LIF neuron, starting weight w = 0.7, β = 0.9, θ = 1, input spikes x = (1, 0, 1, 1, 0, 1). Loss L = (spike count − 3)². Surrogate σ′(U − θ) = 1 / (1 + (π(U − θ))²); the reset is detached, so the backward pass follows only the membrane chain. Learning rate η = 0.005, three updates w ← w − η·∂L/∂w.
Through the membrane alone, ∂U[t] / ∂U[t−1] = β, so an input n steps before the loss reaches it scaled by βⁿ (ignoring the surrogate factors of intermediate spikes and other paths).