A spiking neuron keeps a membrane potential that leaks at every step, adds the current it receives and, when it crosses a threshold, emits a spike and drops by the threshold, so that its output is a train of zeros and ones. Since the spike is a step of the potential, its derivative is zero almost everywhere, and backpropagation through time applied as it is would move no weight. If, in the backward pass only, the derivative of the step is replaced with that of a smooth function (the surrogate gradient), a small network of such neurons can be trained, and the page trains one with Adam to classify points of the plane coded as trains of spikes; one can then see how few spikes its hidden layer needs to answer.
Un neurone a impulsi tiene un potenziale di membrana che a ogni passo si scarica in parte, somma la corrente che riceve e, quando supera una soglia, emette un impulso e scende della soglia, così che la sua uscita è un treno di zeri e di uni. Poiché l'impulso è un gradino del potenziale, la sua derivata è nulla quasi ovunque, e la backpropagation nel tempo applicata così com'è non sposterebbe alcun peso. Se, nel solo passo all'indietro, la derivata del gradino si sostituisce con quella di una funzione liscia (il gradiente surrogato), una piccola rete di questi neuroni si può addestrare, e la pagina ne addestra una con Adam a classificare punti del piano codificati come treni di impulsi; puoi poi vedere con quanti pochi impulsi lo strato nascosto riesce a rispondere.