The neuron that forgot time
Why the foundations neuron cannot hear time, and how an internal state gives it that ear back.
A barn owl hunts in complete darkness. It does not see the mouse darting through the leaves: it hears it. The sound reaches its nearer ear a few millionths of a second before the other, and that tiny gap is enough for it to strike precisely. Somewhere in its brain, neurons are measuring a time difference on the order of a microsecond.
Now take the neuron from the foundations course, the one that computes . Could it do what the owl does? The answer is no, and the reason is precise. This chapter starts from that impossibility to rebuild a neuron that can, in fact, hear time.
The foundations neuron lives in an eternal present
Go back to the central formula of the foundations course. For an input , the neuron produces
Look carefully at what is in this equation, and above all at what is not. There are the inputs, the weights, the bias, the activation. There is no trace of the moment when the input arrives. You can present today or tomorrow, the result is the same. The neuron has no clock, no memory of what happened just before. We say it is stateless: its output depends only on the present input.
Suppose we feed it a sequence of inputs, one per time step: The stateless neuron processes them one by one, independently:
Each output only looks at its input . The past never enters the computation. An eternal present, with no before and no after.
The owl’s problem: hearing a time gap
Let us formalize the owl’s challenge. Two signals arrive, one per ear. Call them the left input and the right input. What carries the information is neither the intensity of the left sound nor of the right one taken alone: it is the time gap between the two. The brain must fire strongly when the two signals arrive almost together, and stay silent when they are too far apart.
This ability has a name: coincidence detection Coincidence detection The ability of a stateful neuron to fire only when two inputs arrive within a short interval of each other. Its internal integration window makes this computation possible, where a memoryless neuron cannot. Illustrated by the Jeffress model (1948) for sound localization. Source: Jeffress (1948) . It was proposed as early as 1948 by Lloyd Jeffress as a model of sound localization (Jeffress, 1948), and it has since been observed in the brainstem of birds and mammals.
Here is why the stateless neuron fails. Suppose the two inputs never land on exactly the same time step (there is almost always a small gap). Then, at each step, the neuron sees only one active input. Since its output depends only on the present instant, it reacts the same whether the gap is tiny or huge. It cannot measure a distance between two events it never sees together. It is missing a place to hold the trace of the first input while waiting for the second.
Giving the neuron a state
The idea that unlocks everything: add to the neuron an internal variable that remembers, for a brief moment, what just arrived. We call it the membrane potential Membrane potential The internal variable of a stateful neuron measuring its accumulated electric charge. It rises when inputs arrive, slowly leaks back toward rest when no input comes, and triggers a spike once it reaches a threshold, after which it resets. , by analogy with the electric charge that builds up on the membrane of a real neuron. Let us write it .
This variable obeys three simple rules, at each time step:
- It leaks. With no input, slowly falls back toward zero. It keeps only a fraction of its value from one step to the next, with .
- It integrates. When an input of charge arrives at step , it adds to .
- It fires. If reaches a threshold , the neuron emits a spike and resets to zero.
The first two rules fit in a single recurrence:
In compact notation:
This equation reads: the new value of the potential equals the old one times the retention , plus the input received at this step. The factor is the neuron’s memory. At , it forgets everything instantly and becomes stateless again. The closer gets to , the longer it holds the trace of the past.
This three-rule neuron is the simplest spiking neuron. It is called the integrate-and-fire Integrate-and-fire A neuron model that accumulates input current in a membrane potential with a leak (time constant tau) and emits a spike when a threshold is crossed. The first internal state variable of a neuron, introduced by Lapicque in 1907. Source: Lapicque (1907) model, introduced by Louis Lapicque as early as 1907 (Lapicque, 1907). A neuron whose output depends on an internal variable evolving over time is a stateful neuron Stateful neuron A neuron whose output depends on an internal variable that evolves over time (membrane potential, adaptive threshold), and thus on its recent history. As opposed to a stateless neuron, whose output depends only on the instantaneous input. : unlike the stateless neuron of the foundations, its response depends on its recent history.
Play with coincidence detection
A glance at the theory does not replace your hand on the sliders. In the component below, two inputs of fixed charge arrive: the first early, the second shifted by the delay Δ you set. You watch the potential rise at the first, leak, then rise again at the second. If it crosses the threshold, the neuron fires.
Your mission: start from zero delay (both inputs together), watch it fire, then raise Δ step by step until the neuron falls silent. You have just measured its coincidence window. Then play with the retention: a membrane that holds its charge better forgives larger delays.
A neuron that hears time
Three things to observe while playing:
- At zero delay, both charges land on the same step and add up: the potential makes a single jump to . That is the easiest case to fire.
- Raising the retention softens the leak slope and widens the coincidence window. The membrane’s memory sets the neuron’s temporal tolerance.
- Raising the threshold demands a tighter coincidence. Threshold and retention are two independent ways of tuning the same thing: how close the two inputs must be.
The spike, a language in time
The stateful neuron no longer returns a continuous number like the sigmoid of the foundations. It returns a spike, a brief all-or-nothing event: it fires, or it does not. This spike is what a spiking network manipulates: everything is made of spikes spread out in time.
Hence a new question, one that made no sense for the stateless neuron: where does the information hide in a train of spikes? Two answers coexist. In rate coding, what matters is the number of spikes per second, their rate. In temporal coding Temporal coding A way of representing information in the precise instant when a spike is emitted, rather than in the number of spikes per second. The firing time then carries the message, letting a spiking network compute with very few spikes. Contrasts with rate coding. , what matters is the precise instant of each spike. The owl uses the second route: it is the arrival time, not the rate, that carries the position of the prey. Temporal coding lets you compute with very few spikes, hence very little energy. We will come back to it in detail in a dedicated chapter.
In one sentence
The foundations neuron is memoryless and therefore blind to time; giving it a membrane potential that integrates, leaks and fires turns it into a stateful neuron able to detect the coincidence of two signals, and thus to hear time.
On to chapter 2
We spoke of the membrane potential as a variable that rises and leaks, settling for a retention factor set by hand. A convenient caricature, but where does that leak actually come from? In a real neuron it has a physical cause: the cell membrane behaves like a small capacitor discharging through a resistor. Chapter 2 opens the cell to find the concrete origin of , before chapter 3 turns our recurrence into the differential equation of the full integrate-and-fire model.
Exercises
Take a sheet of paper and a pencil. The solutions are right below, to look at only after you have tried.
Exercise 1: integrate by hand
A stateful neuron has retention and threshold . Its potential starts at . Two inputs of charge arrive. For each of the delays , and steps, compute the potential at the moment of the second input and say whether the neuron fires.
Exercise 2: a stateless neuron is blind to shift
Show that the stateless neuron cannot tell two inputs close in time apart from two inputs far apart, as long as the two inputs never land on the same step.
Exercise 3: the coincidence window
From the firing condition , express the largest integer delay that still triggers a spike, then compute it for , and .
Sources
- Jeffress, L. A. (1948). “A place theory of sound localization.” Journal of Comparative and Physiological Psychology 41(1), 35-39. DOI 10.1037/h0061495
- Lapicque, L. (1907). “Recherches quantitatives sur l’excitation électrique des nerfs traitée comme une polarisation.” Journal de Physiologie et de Pathologie Générale 9, 620-635. Annotated translation, Brunel & van Rossum, 2007, DOI 10.1007/s00422-007-0189-6
- Maass, W. (1997). “Networks of spiking neurons: the third generation of neural network models.” Neural Networks 10(9), 1659-1671. DOI 10.1016/S0893-6080(97)00011-7
To go further
- Gerstner, W., Kistler, W. M., Naud, R. & Paninski, L. (2014). Neuronal Dynamics. Cambridge University Press. Chapter 1 on the integrate-and-fire model. neuronaldynamics.epfl.ch
- Carr, C. E. & Konishi, M. (1990). “A circuit for detection of interaural time differences in the brain stem of the barn owl.” Journal of Neuroscience 10(10), 3227-3246. DOI 10.1523/JNEUROSCI.10-10-03227.1990
1. Why can the foundations neuron not measure a time gap between two inputs?
2. What is the membrane potential of a stateful neuron for?
3. In the recurrence v(t+1) = λ·v(t) + I(t), what happens if λ = 0?
4. What is coincidence detection?
5. What is the output of a spiking neuron?