Spiking conversion
Turning a sensing network into spikes: what it costs and what it saves
We converted a position-sensing network into a spiking network and measured accuracy and arithmetic against how long it runs. Even after 256 time steps it did not match the original, and it never used less arithmetic at equal accuracy.
Every result here comes from simulations of our own simplified models, run with fixed random seeds so they repeat exactly. Nothing has been measured on hardware yet. We report what came out, including where our approach did not win.
The question
Spiking hardware does work only when a neuron fires. The simplest way onto that hardware is to train an ordinary network and convert it: each neuron becomes an integrate-and-fire unit whose firing rate stands in for its activation. We wanted to know what that costs on a real problem from our own designs: reading a levitating puck's position from 36 Hall sensors and 36 coil currents.
What we did
We trained a network with ReLU activations (72 inputs, two hidden layers of 64, two outputs) on 40,000 simulated positions. It reached 0.33 mm rms error on test positions. We then converted it the standard way (Rueckauer et al., 2017): integrate-and-fire neurons that subtract the threshold when they fire, thresholds set from the 99.9th percentile of each layer's activations, the input fed as a steady current, and the output read from the last layer's accumulated potential.
We ran the spiking network for 4 to 256 time steps per estimate and counted every operation: the first layer's multiply-accumulates (done once, because the input current is steady) and one addition per spike per connection after that.
Symbols
- membrane potential of neuron j at time step t
- input current into neuron j
- spike: 1 when the neuron fires
- 99.9th percentile of layer ℓ's ReLU activations (sets the scale)
- the original network's ReLU activation for neuron j
- number of time steps the spiking network runs for
In plain words
Each neuron adds up its input current every step and fires when the total passes 1, keeping any overshoot (reset by subtraction, so nothing is lost). Over many steps its firing rate approaches the original ReLU activation divided by λ, the layer's 99.9th-percentile activation. Scaling each layer's weights by λ keeps rates in range.
Symbols
- an 8-bit multiply-accumulate at 45 nm (Horowitz, 2014)
- a 32-bit integer addition at 45 nm
- first-layer multiply-accumulates, done once per estimate
- all multiply-accumulates in the original network
- fan-out: the number of connections leaving neuron j
In plain words
The energy model counts arithmetic only, using Horowitz's 45 nm figures: an 8-bit multiply-accumulate costs about 0.23 pJ and a 32-bit integer addition about 0.1 pJ. Each spike costs one addition per outgoing connection, so energy grows with how long the network runs.
What we found
Accuracy improves as the network runs longer, because firing rates need time to settle. At 64 steps the error was 1.10 mm; at 256 steps, 0.53 mm, against 0.33 mm for the original. Within 256 steps it never came within 10 % of the original.
Arithmetic energy (a 45 nm estimate from Horowitz's ISSCC 2014 figures, memory not counted) grows with the number of steps, because every step brings more spikes. The spiking network used less arithmetic than the original in 8-bit integers (2.03 nJ) only up to 16 steps, where its error was 3.99 mm, far worse than the original's.
| Steps | Error, rms (mm) | Spikes per estimate | Additions | Energy, int (nJ) |
|---|---|---|---|---|
| 4 | 15.75 | 15 | 729 | 1.13 |
| 8 | 7.81 | 54 | 2,196 | 1.28 |
| 16 | 3.99 | 136 | 5,246 | 1.58 |
| 32 | 2.05 | 302 | 11,400 | 2.20 |
| 64 | 1.10 | 634 | 23,739 | 3.43 |
| 128 | 0.69 | 1299 | 48,424 | 5.90 |
| 256 | 0.53 | 2629 | 97,803 | 10.84 |
Try it: slide through the time steps and watch accuracy and energy move together.
Now at least as costly as the original and still 3.4× less accurate. This is why plain conversion is a poor deal here.
What it means
For this task, plain conversion is not worth it. The result matches what Intel's Loihi survey (Davies et al., 2021) reports: feedforward networks gain little on spiking hardware. The gains come from sparsity in time, recurrence and spike timing. A position estimate made from scratch every cycle uses none of those.
That pointed us to study N2: keep the network's state between samples, and do work only when the inputs change.
Limits: arithmetic-only energy, a simulated sensor model, and conversion without the later refinements (such as burst coding or fine-tuning after conversion) that shorten the settling time.