Unsupervised learning of digit recognition using spike-timing-dependent plasticity

Peter U. Diehl, Matthew CookView original
OverviewBalancedjames voice
If your brain uses no backpropagation, no labeled training data, and runs on tiny voltage spikes instead of floating-point arithmetic — and yet you learned to recognize handwritten digits as a child without anyone grading your neurons — then either neuroscience is wrong about how the brain works, or the field of machine learning has been solving the wrong problem. Let that logic sit for a moment. Then consider what Peter Diehl and Matthew Cook decided to build to test it. The mammalian neocortex draws somewhere between 10 and 20 watts and performs world-class pattern recognition. The highest-performing artificial neural networks depend on thirty-two or sixty-four bit precision messages and a training algorithm called backpropagation, where each unit receives a highly specific error signal computed from the top of the network down to the bottom. That kind of neuron-specific, globally coordinated error channel is considered biologically implausible — the brain has no known mechanism for delivering such signals. Biological neurons instead fire brief, all-or-none voltage spikes, and they learn through local rules: what matters is the relative timing of spikes between connected cells, not a gradient arriving from some distant loss function. This is the split. Rate-based artificial neural networks are on one side, and spike-based spiking neural networks, or SNNs, are on the other. The question Diehl and Cook asked was whether a network built entirely from the biological side of that split could match the benchmark performance of the engineering side. The biological toolkit they assembled has four main pieces, and it helps to understand each one before seeing how they combine. The first is the leaky integrate-and-fire neuron — think of it as a bucket with a slow leak. Incoming spikes pour water into the bucket, which leaks continuously. When the water level crosses the rim, the bucket fires and resets. In the model, the rim is the membrane threshold and the reset value drops the voltage back to a resting state, after which the neuron is briefly unable to fire again. Simple, local, and tractable. The second piece is conductance-based synapses, as opposed to the simpler current-based synapses used in many models. When a presynaptic spike arrives, it changes the conductance of the connection rather than injecting a fixed current. Because the resulting change in membrane voltage depends on the neuron's current voltage and on the synapse's reversal potential, the effect is nonlinear and more closely mirrors what real synapses do. Diehl and Cook fix the maximum inhibitory-to-excitatory conductance at 10 nanosiemens. The third piece is spike-timing-dependent plasticity, or STDP — the learning rule. If a presynaptic spike arrives just before a postsynaptic spike, the connection between them is strengthened. If it arrives after, the connection is weakened. The magnitude of that change falls off exponentially with the timing gap: near-zero delay produces the largest update, and the effect decays smoothly as spikes become more separated in time. Diehl and Cook track this efficiently with a presynaptic trace that increments on each presynaptic spike and decays over time, so that when a postsynaptic spike occurs, the current value of that trace determines the weight change. They tested four STDP variants — a power-law weight-dependence rule, an exponential weight-dependence rule, a symmetric pre-and-post rule, and a triplet rule — and found similar results across all four. That robustness is a meaningful finding in itself. The fourth piece is an adaptive spiking threshold. Each excitatory neuron has a dynamic term added to its fixed threshold, and every time that neuron fires, the term increases, making it harder to fire again soon. The threshold then decays slowly back toward baseline. This keeps any single neuron from dominating the population — neurons that fire too often raise their own bar until others get a turn. Lateral inhibition ties these mechanisms together into a competitive system. Each excitatory neuron connects one-to-one to a dedicated inhibitory neuron, and that inhibitory neuron connects back to all excitatory neurons except the one that drove it. So every time an excitatory cell fires, it indirectly suppresses its neighbors. This is a soft winner-take-all: the most active neuron gets to learn, while the rest are quieted. Over time, different neurons specialize for different patterns. Now put it all together as a network. The input layer is a seven hundred eighty-four neuron representation of MNIST's twenty-eight by twenty-eight pixel images. Each input neuron emits a Poisson spike train — a random stream of spikes whose average rate is proportional to pixel intensity. The brightest possible pixel drives firing up to about sixty-four spikes per second; a black pixel drives nothing. Each image is presented for three hundred fifty milliseconds, followed by a one hundred fifty-millisecond blank period to let network state decay. If the excitatory population fires fewer than five spikes during a presentation, the maximum input rate is boosted by thirty-two hertz and the image is presented again — a mechanism that ensures every example produces enough activity to drive learning. The second layer contains a variable number of excitatory neurons — ranging from one hundred to six thousand four hundred in their experiments — and an equal number of inhibitory neurons providing the lateral competition. All feedforward synapses from input to excitatory neurons are modified online by STDP. No class labels are ever shown during this process. No error signal arrives. The network simply adjusts weights based on spike timing, and neurons gradually develop receptive fields that resemble prototypical digit shapes. There is one manual step, but it happens only after training is complete and only for evaluation. Learning is frozen, and each neuron is assigned a digit label based on which class produced its highest average firing rate over a single labeled pass through the training set. During testing, the predicted digit is whichever class has the highest average activity across its assigned neurons. That label assignment is not learning — it's measurement. And what did the network learn? With one hundred excitatory neurons, it reached eighty-two point nine percent accuracy on the MNIST test set. With four hundred neurons, it achieved eighty-seven point zero percent. With one thousand six hundred neurons, it reached ninety-one point nine percent. With six thousand four hundred neurons, it achieved ninety-five point zero percent. That ninety-five percent figure is higher than any previously reported unsupervised spiking neural network — Querlioz and colleagues had reached ninety-three point five percent. It is also comparable to some supervised spiking approaches, such as O'Connor and colleagues at ninety-four point one percent, though it falls below the best rate-conversion spiking systems, which reach ninety-nine point one percent using supervised training. The network is also remarkably sparse. In the six thousand four hundred neuron network, a digit presentation triggers roughly seventeen spikes total. For a correctly classified example, about sixteen of those spikes come from neurons assigned to the right class and just one from neurons assigned to other classes. When the network misclassifies, the pattern flips: roughly three spikes from the correct class and twelve from the wrong one. The confusion analysis is systematic — the digit four was misclassified as nine fifty-seven times, and seven was misclassified as nine about forty times, likely because missing strokes in handwritten examples blur the boundary between those shapes. Learning is also stable over time. For the one thousand six hundred neuron network with the symmetric STDP rule, performance approached convergence after roughly two hundred thousand training examples and remained stable even after one million, with test-set variability across repeated runs showing a standard deviation of only about zero point one percent. Beyond the benchmark, the energy argument is explicit in the paper. Neuromorphic hardware implementations consume on the order of picojoules per spike, and Diehl and Cook estimate that their network would draw less than one milliwatt running on IBM's TrueNorth chip, which itself consumes about seventy-two milliwatts for one million neurons. That is a different regime entirely from the power required to train a deep network with backpropagation. Where does this leave the field? Diehl and Cook used no domain-specific preprocessing, no teaching signal, and no class labels — and still outperformed every prior unsupervised spiking system. The fact that four different STDP rules produced essentially the same performance curves suggests the result isn't an artifact of one particular learning rule, but a property of the full combination of mechanisms. The genuine open question is whether this architecture can be pushed beyond clean, well-curated benchmarks to the messier, higher-dimensional inputs the brain handles routinely. That's not a rhetorical close — it's the actual scientific edge the paper leaves unresolved, and it's where the next round of work has to go. This lecture was created by ennepō. Go to https://ennepo.ai to Discover, Create and Follow the latest research in your field. Read when you can. Listen when you want to.

If your brain uses no backpropagation, no labeled training data, and runs on tiny voltage spikes instead of floating-point arithmetic — and yet you learned to recognize handwritten digits as a child without anyone grading your neurons — then either neuroscience is wrong about how the brain works, or the field of machine learning has been solving the wrong problem. Let that logic sit for a moment. Then consider what Peter Diehl and Matthew Cook decided to build to test it. The mammalian neocortex draws somewhere between 10 and 20 watts and performs world-class pattern recognition. The highest-performing artificial neural networks depend on thirty-two or sixty-four bit precision messages and a training algorithm called backpropagation, where each unit receives a highly specific error signal computed from the top of the network down to the bottom. That kind of neuron-specific, globally coordinated error channel is considered biologically implausible — the brain has no known mechanism for delivering such signals. Biological neurons instead fire brief, all-or-none voltage spikes, and they learn through local rules: what matters is the relative timing of spikes between connected cells, not a gradient arriving from some distant loss function. This is the split. Rate-based artificial neural networks are on one side, and spike-based spiking neural networks, or SNNs, are on the other.

The question Diehl and Cook asked was whether a network built entirely from the biological side of that split could match the benchmark performance of the engineering side. The biological toolkit they assembled has four main pieces, and it helps to understand each one before seeing how they combine. The first is the leaky integrate-and-fire neuron — think of it as a bucket with a slow leak. Incoming spikes pour water into the bucket, which leaks continuously. When the water level crosses the rim, the bucket fires and resets. In the model, the rim is the membrane threshold and the reset value drops the voltage back to a resting state, after which the neuron is briefly unable to fire again. Simple, local, and tractable. The second piece is conductance-based synapses, as opposed to the simpler current-based synapses used in many models. When a presynaptic spike arrives, it changes the conductance of the connection rather than injecting a fixed current. Because the resulting change in membrane voltage depends on the neuron's current voltage and on the synapse's reversal potential, the effect is nonlinear and more closely mirrors what real synapses do. Diehl and Cook fix the maximum inhibitory-to-excitatory conductance at 10 nanosiemens. The third piece is spike-timing-dependent plasticity, or STDP — the learning rule. If a presynaptic spike arrives just before a postsynaptic spike, the connection between them is strengthened. If it arrives after, the connection is weakened.

The magnitude of that change falls off exponentially with the timing gap: near-zero delay produces the largest update, and the effect decays smoothly as spikes become more separated in time. Diehl and Cook track this efficiently with a presynaptic trace that increments on each presynaptic spike and decays over time, so that when a postsynaptic spike occurs, the current value of that trace determines the weight change. They tested four STDP variants — a power-law weight-dependence rule, an exponential weight-dependence rule, a symmetric pre-and-post rule, and a triplet rule — and found similar results across all four. That robustness is a meaningful finding in itself. The fourth piece is an adaptive spiking threshold. Each excitatory neuron has a dynamic term added to its fixed threshold, and every time that neuron fires, the term increases, making it harder to fire again soon. The threshold then decays slowly back toward baseline. This keeps any single neuron from dominating the population — neurons that fire too often raise their own bar until others get a turn. Lateral inhibition ties these mechanisms together into a competitive system. Each excitatory neuron connects one-to-one to a dedicated inhibitory neuron, and that inhibitory neuron connects back to all excitatory neurons except the one that drove it. So every time an excitatory cell fires, it indirectly suppresses its neighbors.

This is a soft winner-take-all: the most active neuron gets to learn, while the rest are quieted. Over time, different neurons specialize for different patterns. Now put it all together as a network. The input layer is a seven hundred eighty-four neuron representation of MNIST's twenty-eight by twenty-eight pixel images. Each input neuron emits a Poisson spike train — a random stream of spikes whose average rate is proportional to pixel intensity. The brightest possible pixel drives firing up to about sixty-four spikes per second; a black pixel drives nothing. Each image is presented for three hundred fifty milliseconds, followed by a one hundred fifty-millisecond blank period to let network state decay. If the excitatory population fires fewer than five spikes during a presentation, the maximum input rate is boosted by thirty-two hertz and the image is presented again — a mechanism that ensures every example produces enough activity to drive learning. The second layer contains a variable number of excitatory neurons — ranging from one hundred to six thousand four hundred in their experiments — and an equal number of inhibitory neurons providing the lateral competition. All feedforward synapses from input to excitatory neurons are modified online by STDP. No class labels are ever shown during this process. No error signal arrives. The network simply adjusts weights based on spike timing, and neurons gradually develop receptive fields that resemble prototypical digit shapes.

There is one manual step, but it happens only after training is complete and only for evaluation. Learning is frozen, and each neuron is assigned a digit label based on which class produced its highest average firing rate over a single labeled pass through the training set. During testing, the predicted digit is whichever class has the highest average activity across its assigned neurons. That label assignment is not learning — it's measurement. And what did the network learn? With one hundred excitatory neurons, it reached eighty-two point nine percent accuracy on the MNIST test set. With four hundred neurons, it achieved eighty-seven point zero percent. With one thousand six hundred neurons, it reached ninety-one point nine percent. With six thousand four hundred neurons, it achieved ninety-five point zero percent. That ninety-five percent figure is higher than any previously reported unsupervised spiking neural network — Querlioz and colleagues had reached ninety-three point five percent. It is also comparable to some supervised spiking approaches, such as O'Connor and colleagues at ninety-four point one percent, though it falls below the best rate-conversion spiking systems, which reach ninety-nine point one percent using supervised training.

The network is also remarkably sparse. In the six thousand four hundred neuron network, a digit presentation triggers roughly seventeen spikes total. For a correctly classified example, about sixteen of those spikes come from neurons assigned to the right class and just one from neurons assigned to other classes. When the network misclassifies, the pattern flips: roughly three spikes from the correct class and twelve from the wrong one. The confusion analysis is systematic — the digit four was misclassified as nine fifty-seven times, and seven was misclassified as nine about forty times, likely because missing strokes in handwritten examples blur the boundary between those shapes. Learning is also stable over time. For the one thousand six hundred neuron network with the symmetric STDP rule, performance approached convergence after roughly two hundred thousand training examples and remained stable even after one million, with test-set variability across repeated runs showing a standard deviation of only about zero point one percent. Beyond the benchmark, the energy argument is explicit in the paper. Neuromorphic hardware implementations consume on the order of picojoules per spike, and Diehl and Cook estimate that their network would draw less than one milliwatt running on IBM's TrueNorth chip, which itself consumes about seventy-two milliwatts for one million neurons. That is a different regime entirely from the power required to train a deep network with backpropagation.

Where does this leave the field? Diehl and Cook used no domain-specific preprocessing, no teaching signal, and no class labels — and still outperformed every prior unsupervised spiking system. The fact that four different STDP rules produced essentially the same performance curves suggests the result isn't an artifact of one particular learning rule, but a property of the full combination of mechanisms. The genuine open question is whether this architecture can be pushed beyond clean, well-curated benchmarks to the messier, higher-dimensional inputs the brain handles routinely. That's not a rhetorical close — it's the actual scientific edge the paper leaves unresolved, and it's where the next round of work has to go. This lecture was created by ennepō. Go to https://ennepo.ai to Discover, Create and Follow the latest research in your field. Read when you can. Listen when you want to.

More in Engineering