Training Spiking Networks listed three ways to get a spiking network: convert a trained ANN, train on spike times, or use surrogate gradients. The series used the third. This post tries the first, with a tool built for a real neuromorphic chip: BrainChip’s CNN2SNN, which converts a trained, quantized Keras CNN into a model for the Akida processor.

The case study is the same as before: DVS Gesture, 11 hand and arm gestures recorded with an event camera, binned into 60 ms frames of 32 × 32 pixels. A small frame CNN is trained as an ordinary ANN, quantized to 8 and 4 bits, converted, and run in Akida’s software simulator, which computes what the chip would. Everything ran three times (three seeds), on a laptop.

The short version: the conversion works and loses almost nothing. But what comes out is not a spiking network in the sense of the earlier posts, and that difference decides how much work is actually saved. Quantizing the activations to a single bit, on the older Akida 1.0, closes that difference in the counts, at a cost in accuracy.

Try it yourself Download the notebook (in Colab: File → Upload notebook). The notebook downloads DVS Gesture, trains, quantizes, converts and runs the Akida simulator (about 30–45 minutes on a CPU runtime). The trained Akida models can be downloaded.


1. Two Meanings of “Spike”

Classical ANN-to-SNN conversion (Cao et al., 2015; Diehl et al., 2015; Rueckauer et al., 2017) relies on the fact shown in From ReLU to Spikes: the firing rate of an integrate-and-fire neuron approximates a ReLU. Train a ReLU network, copy its weights into integrate-and-fire neurons, run it for many time steps, and the spike counts approximate the ReLU activations. The price is latency (tens to hundreds of steps) and an approximation error that only shrinks with more steps.

Akida does something else:

LIF spiking network (earlier posts)one value, as binary spikes over 30 time stepstime steps (60 ms each) → value ≈ spike rate; most steps carry nothing10 spikes / 30 stepsAkida after CNN2SNNone graded event per frame, or nothing116153912 neurons, one frame → a zero is skipped; a non-zero valueis one event carrying 1–8 bits (here 4 bit: 0–15)Both skip zeros. The LIF network spreads a value over many cheap binary events in time; Akida sends it at once, as onemulti-bit event, with no time steps, no membrane state and no conversion error from rate coding, only quantization error.

Akida computes with integers: weights and activations of 1–8 bits. After quantization and ReLU, many activations are exactly zero, and Akida only processes the non-zero ones, its “events” or “spikes”. A non-zero activation is sent once, as a single event carrying its value. There are no time steps, no membrane potential carried from one frame to the next, and therefore no rate-coding error. The only error is quantization error, which training can compensate for.

So CNN2SNN is better described as quantize and run event-driven than as ANN-to-SNN conversion in the classical sense. Both skip zeros; they differ in what an event carries and in whether time is involved.


2. The Experiment

Before the tools, here is what was done, step by step. The data preparation is done once; everything from training to measuring is repeated with three random seeds:

DVS Gesture1,341 recordings11 gestures, 29 peoplesplit by persontrain: 23 people (1,077)test: 6 people (264)bin the events60 ms frames, 32 × 32ON, OFF, ON+OFF countstrain the ANN116,395 frames15 epochsquantize8-bit; 4-bit + QATQuantizeMLconvert, runCNN2SNN → Akidasimulatormeasureaccuracy, events,NeuroBench counts× 3 seeds0, 1, 2: differentinitial weights,training order andcalibration sampleThe data steps are done once and are the same for every run. Everything from training to measuring is repeated with three seeds;results are reported as mean ± standard deviation over the three. The test set is only used for evaluation, never for training or calibration.

The dataset: DVS Gesture

DVS Gesture (Amir et al., 2017) was recorded by IBM with a DVS128 event camera (128 × 128 pixels). 29 people each performed 11 gestures, from a hand clap to arm rotations in both directions and an “other” class, under up to five lighting conditions. Each recording holds one person performing one gesture repeatedly for a few seconds.

The official split is by person: subjects 1–23 for training (1,077 recordings), subjects 24–29 for testing (264). Nobody in the test set appears in training, so test accuracy measures how well the network handles people it has never seen. The classes are balanced (24 test recordings each), so chance level is 1 in 11, 9.1%.

Here is one test recording of each gesture, as the camera sees it:

An event camera does not record images. Each pixel reports an event (x, y, polarity, time) when its brightness changes: ON (blue) when it gets brighter, OFF (orange) when it gets darker; a still background produces nothing (Seeing in Events explains the sensor). A moving arm leaves one polarity along its leading edge and the other along its trailing edge (which one depends on whether the arm is brighter or darker than the background), so even a single short frame shows the direction of motion. Ten of these eleven recordings are classified correctly; “air drums” is taken for “other”.

From events to frames

The network needs fixed-size arrays, so the events are binned, the same way as in the earlier posts:

StepSetting
Spatial binning4 × 4 sensor pixels summed: 128 × 128 → 32 × 32
Temporal binning60 ms frames (about 16.7 per second)
Valuethe number of events per pixel, frame and polarity, capped at 255 (uint8)
ChannelsON, OFF, and ON + OFF (Akida’s input layer takes 1 or 3 channels, §4)
Training examplesevery frame of every training recording: 116,395 frames, each labelled with its recording’s gesture
Test window30 frames (1.8 s) per test recording, starting 0.6 s in, to skip the start where the gesture is not yet under way

Step through one recording frame by frame: the camera’s view, the three channels the network receives, how many events each frame holds, and what the Akida model concludes from each single frame:

A single 60 ms frame is often ambiguous: in the hand-clap recording, 9 of the 30 frames on their own look like another gesture. The answer for a recording averages the network’s outputs over all 30 frames, which removes most of these errors. This is why the results report two accuracies: per recording (30 frames averaged) and per single frame.

Training, quantization and measurement

StageSetting
Network3 convolutions (16, 32, 64 filters; 5×5, 5×5, 3×3) with batch norm and ReLU, a dense layer with 11 outputs; 44,155 parameters (§4)
Trainingcross-entropy, Adam, learning rate 0.001 with cosine decay, batch 256, 15 epochs; TensorFlow/Keras on the CPU
8-bit modelpost-training quantization: 8-bit inputs, weights and activations, calibrated on 1,024 random training frames
4-bit model8-bit first-layer weights, 4-bit weights and activations elsewhere; then 3 epochs of quantization-aware training (Adam, learning rate 0.0001)
Conversioncnn2snn.convert, target Akida 2.0; run in the Akida software simulator
Accuracyfrom the Akida model’s own outputs on the 264 test windows
Eventsthe Akida model cut after each layer, counting non-zero outputs (§6)
Operations and energyNeuroBench 2.3.0 on a PyTorch rebuild that reproduces Akida bit for bit (§7)

Seeds and repeatability

Each run uses one random seed, which fixes three things: the initial weights, the order in which training frames are shuffled, and which 1,024 frames are used to calibrate the quantization. Everything else, including the data and the test windows, is identical. I ran seeds 0, 1 and 2 and report the mean ± standard deviation over the three, so a difference smaller than that spread should not be read as a real effect. Running the same seed twice gave the same results to the last digit. Each run took about 13 minutes on a laptop (Apple M1 Pro, in a Linux virtual machine with 6 cores and 8 GB of memory), most of it training.


3. The Workflow

1. trainfloat Keras CNNReLU, BatchNorm2. quantizeQuantizeML8 or 4 bit, PTQ / QAT3. convertCNN2SNNlayer blocks → Akida layers4. runakida.Modelsimulator or chipfloats, any layout Akida allowsintegers: weights, activationssame integers, Akida's format (.fbz)events = non-zero activationsThe network is trained as an ordinary ANN. The "conversion" does not introduce time or spiking neurons: it re-expresses thequantized integer network in Akida's layers, which skip every zero activation. check_model_compatibility runs steps 2–3 on theuntrained model, so layout problems show up before any training.
  1. Train a float CNN in Keras, built from layer blocks that Akida supports.
  2. Quantize it with QuantizeML: post-training quantization (PTQ), calibrated on a sample of training data, and if accuracy drops, quantization-aware training (QAT), which simply keeps training the quantized Keras model.
  3. Convert with cnn2snn.convert, which maps each block (convolution, batch norm, pooling, ReLU) onto an Akida layer and returns an akida.Model.
  4. Run it with model.predict on uint8 inputs, in the software backend or on Akida hardware.

The Akida tools ship only for Linux and Windows on Python 3.10–3.12. On a Mac, I ran them in a Linux container (Docker on an ARM virtual machine with Colima), which is native and fast on Apple silicon. In Google Colab, which now runs Python 3.13, the notebook creates a separate Python 3.12 environment for them.


4. Fitting the Network to Akida

The starting point was the frame CNN of the earlier posts: three convolutions (16, 32, 64 channels; 5×5, 5×5, 3×3), max pooling, ReLU and a linear classifier, applied to every 60 ms frame, with the logits of a recording’s 30 frames averaged. Akida’s rules forced four changes. check_model_compatibility runs the quantization and conversion on the untrained model, so each problem appeared before any training:

RuleWhat changed
Batch normalisation before the activation, max pooling before ReLUconv → BatchNorm → max pool → ReLU in every block
A max-pooling layer must use the same padding as its convolutionpooling with padding="same" (the first check failed on this)
A max-pooling layer must be followed by a convolutionthe third block downsamples with a stride-2 convolution instead of pooling before the dense layer
Inputs are uint8raw event counts (0–255) instead of log(1 + count)

One more problem had no workaround in the model: Akida rejected the 2-channel input (ON and OFF events) with the message “InputData sign incompatible with previous layer”. Its input layer takes 1 or 3 channels, so the input became 3 channels: ON, OFF, and ON + OFF. The final network has 44,155 parameters and needs 4.81 M multiply-accumulates (MACs) per frame when every connection is computed.

The whole network, and what each variant in this post turns it into:

input frame32 × 32 × 3ON, OFF, ON+OFFconv15×5, 16 filtersBN · pool 2 · ReLUconv25×5, 32 filtersBN · pool 2 · ReLUconv33×3, 64, stride 2BN · ReLUdense1,024 → 11scores× 30 framesmean of scores→ gesturethe frame CNN (Keras, trained as an ordinary ANN), applied to every 60 ms frameoutput of each layer, per frame32×32×3 counts16×16×168×8×324×4×64 → 1,024111 classweights (43,696 in total)–1,20012,80018,43211,264–dense MACs per frame (4.81 M in total)–1.23 M3.28 M0.29 M0.01 M× 30 framesAkida 2.0 after CNN2SNN, 8- or 4-bit activations (§4–7)uint8 inputInputConv2DConv2DConv2DDense1Doutside the chipAkida 1.0, ReLU capped at 6, 4-, 2- or 1-bit activations (§8)uint8 inputInputConvolutionalConvolutionalConvolutionalFullyConnectedoutside the chip1-bit model: share of outputs that are non-zero (spikes)27% of pixels8% fire25% fire25% firescores–Dashed boxes: the layers that run on the chip. Batch normalisation is folded into the weights at conversion; Akida 1.0 neurons outputceil((sum − threshold) / step) and keep no state between frames. The LIF network of Counting Energy has the same convolutions and pooling,LIF neurons instead of BN and ReLU, a 2-channel log-count input, and carries membrane potentials across 30 time steps instead of averaging frames.

The resulting network was trained differently from the frame CNN of the earlier posts (every frame of every training recording as a training example, batch normalisation, Keras), and it is more accurate: 92.9% per recording against 85.1% there. The comparisons below are therefore about conversion (each model against its own float version), not about which architecture is best.


5. Accuracy: Almost Nothing Lost

Model (264 test recordings, 3 seeds)Per recording (30 frames)Per single frame
Float ANN92.9 ± 0.4%82.8 ± 0.2%
8-bit, post-training quantization92.8 ± 0.4%82.6 ± 0.2%
8-bit, on Akida92.7 ± 0.6%81.2 ± 0.3%
4-bit, post-training quantization52.8 ± 28.9% (21–78%)48.0 ± 20.4%
4-bit, after 3 epochs of quantization-aware training92.4 ± 0.0%80.7 ± 0.1%
4-bit, on Akida93.2 ± 0.7%80.2 ± 0.4%

Two results stand out. 8 bits are free: post-training quantization and conversion change the per-recording accuracy by less than the spread between seeds. 4 bits need training: plain post-training quantization was unreliable, between 21% and 78% depending on the seed, while three epochs of quantization-aware training brought every seed back to 92.4%. Averaging 30 frames hides most of the small per-frame losses: a single frame loses 1.6 (8-bit) to 2.6 points (4-bit).

Both models fit on a two-node virtual Akida 2.0 device in the simulator, using 8 neural processors.

The simulation is not the chip

QuantizeML’s quantized Keras model is meant to simulate the integer arithmetic. Compared frame by frame, it predicted the same class as the Akida model for only 92.5% of the test frames (all seeds, 8- and 4-bit alike), and the outputs differed numerically on every frame. In a test on synthetic inputs, cutting both models after each layer showed the difference starting in the first layers. Per recording, the accuracies still agree within noise, but the Keras model is not a bit-exact predictor of the chip here. All the Akida numbers in this post come from the Akida model itself.


6. How Many Events?

Akida skips zero activations, so the share of non-zero values at each layer’s input decides how much work is left. I measured it on the Akida model itself, by cutting it after each layer and counting the non-zero outputs:

The first layer sees the event counts, of which 27% are non-zero. After the first ReLU the activations are dense: 85% of the second layer’s inputs are non-zero at 8 bits, 57% at 4 bits, because a 4-bit ReLU (15 levels) rounds more small values to zero. Of the 4.81 M MACs per frame, 70% (8-bit) or 50% (4-bit) remain.

The trained spiking network of the earlier posts fires in 6–15% of its time steps. The converted ANN is about as sparse as any ReLU network, which is what it is. Lower precision helps, but nothing in the conversion makes the activations sparse; the ANN was never trained to be. The next section counts this precisely and compares it with the spiking network.


7. Counting the Energy with NeuroBench

The estimate above multiplies a non-zero share by a layer’s MACs. To compare with the spiking network on equal terms, the Akida models should be counted exactly like the networks of Counting Energy: with NeuroBench 2.3.0, unmodified, and the same energy constants.

NeuroBench measures PyTorch models, so each Akida model was rebuilt in PyTorch from its own integer parameters, with Akida’s arithmetic: a per-channel input shift, the bias shifted by its own amount, max pooling, ReLU, the accumulator multiplied by an output scale, rounded and shifted, and capped at 127 for 8 bits or 15 for 4 bits. Two details were only found by testing: Akida stores the kernels of its inner convolutions spatially flipped, and it caps 8-bit activations at 127, not 255. With those, the rebuild reproduces Akida’s integer outputs exactly, on all 7,920 test frames and for all six models (3 seeds × 8/4 bit): 0 of 87,120 outputs differ. Only then were they counted.

What NeuroBench measures: neurons and synapses

NeuroBench reports two kinds of sparsity, and they answer different questions. Activation sparsity is about neurons: how many of their outputs are zero. Synaptic operations are about connections (synapses): how many input × weight operations have to be computed. NeuroBench’s source defines activation sparsity as “the number of zero activations over the total number of activations, over all layers, timesteps, samples in data”:

Here the time steps are the 30 frames of each recording, and the hidden layers are the outputs of conv1, conv2 and conv3. One minus the activation sparsity is the share of neurons active during inference, averaged over time.

NeuroBench metricCountsQuestion it answers
Activation sparsityneuron outputs that are 0, over layers, frames and recordingsHow many neurons stay silent?
Dense synaptic operationsevery connection, zeros includedHow much work does a GPU do?
Effective MACsconnections with non-zero input and non-zero weight, where the layer’s input is multi-valuedHow many multiplications are needed?
Effective ACsthe same, where the layer’s input is only 0 or ±1How many weights are just added?
Membrane updates, neuron operationsstate updates of neurons with memory (e.g. LIF)What does the neuron model itself cost?
Connection sparsityweights that are exactly 0How sparse is the model, independent of data?

The two kinds of sparsity are linked but not equal. A neuron that fires drives many connections in the next layer (a conv1 output feeds a 5×5 window in each of conv2’s 32 channels: up to 800 connections), a zero weight skips a connection even when its input fires, and the first layer is driven by the input pixels, which are not neurons at all. Energy follows the synaptic operations; activation sparsity says how often neurons fire.

Per recording (30 frames), mean of 3 seeds:

Akida 8-bitAkida 4-bit
Accuracy92.7%93.2%
Dense synaptic operations144.4 M144.4 M
Effective MACs84.9 ± 1.1 M (59%)51.1 ± 2.0 M (35%)
Effective ACs, membrane updates00
Activation sparsity (share of zeros)0.220.42
Connection sparsity (zero weights)0.010.22

The counts are lower than the 70% and 50% above for two reasons. NeuroBench counts every connection individually, so the zero padding at image borders is not counted as work. And it skips connections whose weight is zero: 22% of the 4-bit weights are exactly 0, a second saving on top of the zero activations. All operations are MACs, because the activations are multi-bit integers, not 0 or 1.

Why there are no accumulates

NeuroBench decides per layer whether its operations are accumulates (ACs) or multiply-accumulates (MACs), from the layer’s whole input: only if every input value is 0 or ±1 can the weight simply be added, and the operations count as ACs. A single larger value makes the layer multiply, and all its operations count as MACs. Here are the values that actually reach each layer of the Akida models (all 264 test recordings, mean of 3 seeds):

Layer inputNon-zero values · of those, exactly 1Largest value
conv1 (event counts, both models)27% · 35%255
conv2, 8-bit85% · 3%127
conv3, 8-bit78% · 2%127
dense, 8-bit51% · 5%127
conv2, 4-bit57% · 81%15
conv3, 4-bit72% · 22%15
dense, 4-bit34% · 23%15

No layer ever receives only 0s and 1s, so every layer counts as MACs. The first layer gets event counts, up to 255 events per pixel in a 60 ms frame; the inner layers get quantized ReLU activations, and every Akida event carries such a value, which has to be multiplied by the weight. That is the difference between the two meanings of “spike” from §1, in numbers: the LIF spiking network’s inner layers receive pure 0/1 spikes, so NeuroBench counted their 13.8 M operations as ACs and only its first layer as MACs (6.0 M).

One result is worth a closer look. In the 4-bit model, 81% of the non-zero values entering conv2 are exactly 1 (80.7 ± 2.1% over the three seeds; at 8 bits, 3%). A 4-bit ReLU has only 15 levels, and most activations that survive land on the lowest one. For those operations the multiplication is trivial: the weight is just added, as for a spike. NeuroBench’s whole-layer rule still counts all of conv2 as MACs because 19% of its inputs are larger, so for low-bit models the standard count is pessimistic: hardware that treats a 1 specially could do most of conv2’s work as accumulates. Counting real ACs by NeuroBench’s rule would need 1-bit activations, which Akida 1.0 supports but which usually cost accuracy (§8 tries it).

Turning counts into joules needs an energy per operation, as in Counting Energy: 4.6 pJ for a 32-bit floating-point MAC, 1–23.6 pJ (nominal 10) for a spike-triggered accumulate, 5 pJ per neuron operation, and 0.23 pJ for an 8-bit integer MAC (Horowitz, 2014):

Network (accuracy)Effective operations per recordingEnergy: float32 MACs · 8-bit integer MACs
LIF spiking CNN, event-driven (88.5%)6.0 M MACs + 13.8 M accumulates + 0.86 M neuron ops170 µJ · 144 µJ
Frame CNN, dense (85.1%)137 M MACs630 µJ · 31.5 µJ
Frame CNN, zero inputs skipped (85.1%)96 M MACs442 µJ · 22.1 µJ
Akida 8-bit (92.7%)85 M MACs391 µJ · 19.5 µJ
Akida 4-bit (93.2%)51 M MACs235 µJ · ≤ 11.8 µJ
CNN on the summed image, dense (84.5%)4.6 M MACs, once21.0 µJ · 1.0 µJ

(Spiking CNN at ESOP = 10 pJ; its accumulates and neuron updates are not MACs, so only its first layer gets cheaper in the integer column. The 4-bit value uses the 8-bit price, an upper bound.)

What the counts say:

  1. The spiking network does the least work. Counted the same way, it performs 20 M operations per recording, the Akida models 51–85 M. With every MAC priced as a 32-bit float, it is the cheapest of the networks that look at every frame: 170 µJ against 235 µJ (4-bit) and 391 µJ (8-bit).
  2. Precision changes the ranking. Priced as 8-bit integers, the Akida models need 12–20 µJ. The spiking network then costs 144 µJ at the nominal 10 pJ per accumulate; even at the optimistic 1 pJ it needs about 20 µJ, the same as the 8-bit Akida model, which is 4 points more accurate. Whether the spiking network wins depends on what one synaptic event costs on the chip, as in Counting Energy.
  3. 4-bit is better on every axis here: as accurate as 8-bit, 40% fewer operations (more zero activations and zero weights), and cheaper operations.
  4. Running once beats everything. The summed-image CNN, which sees one image per recording instead of 30 frames, stays the cheapest by a wide margin, at lower accuracy.

The gap between the two routes

Counting Energy found effective accumulates in the spiking network; the Akida models have none. Put side by side, counted with the same rule, the two ways of getting a “spiking” network differ in three ways:

LIF spiking CNN, trained with spikesAkida 4-bit, converted with CNN2SNN
Between layersbinary spikes, 0 or 1graded events, 0–15
Inner layers counted asaccumulates: 13.8 Mmultiply-accumulates: all, 0 ACs
First layerMACs: 6.0 M (its input is log counts)MACs (its input is counts)
Total effective operations20 M (15% of dense)51 M (35% of dense)
Neuron updates (membrane state)0.86 M0
Accuracy88.5%93.2%
  1. The kind of operation. The spiking network was trained to compute with binary spikes, so after its first layer every operation only adds a weight. CNN2SNN trains an ordinary ReLU network and quantizes it afterwards, so its activations keep several levels and every operation multiplies. How the network is trained decides which kind of operation the hardware performs.
  2. The number of operations. Training with spikes also made the network far sparser (neurons firing in 6–15% of steps): 20 M operations against 51 M. The converted ANN keeps an ordinary ReLU network’s sparsity.
  3. The price of each operation. An accumulate is not automatically cheaper. Counting Energy priced a spike-triggered accumulate at 1–23.6 pJ (Loihi’s measured synaptic event includes reading the weight and routing the spike) and a MAC at 4.6 pJ in 32-bit floating point or 0.23 pJ as an 8-bit integer. Against float MACs, the spiking network’s fewer and simpler operations win (170 µJ vs. 235 µJ); against 8-bit integer MACs, the converted network’s more numerous but cheap multiplications cost about the same or less (12–20 µJ vs. at least about 20 µJ).

Training with spikes buys fewer, simpler operations at some cost in accuracy; converting buys accuracy and simplicity with more, multiplying operations. Which uses less energy is decided by the chip’s price of an accumulate against a low-precision multiply. Closing the gap from the Akida side means binary activations: quantizing them to 1 bit, which Akida 1.0 supports. The next section tries it.

All energies are counts multiplied by assumed costs per operation, not measurements. On a real Akida chip, reading weights and moving events between cores also costs energy, and only the hardware (or BrainChip’s measurements of it) can say how much.

8. Closing the Gap: 1-Bit Activations

If every activation is 0 or 1, every Akida event is a spike in the strict sense, and NeuroBench’s rule counts the inner layers as accumulates. Akida 2.0, used so far, cannot do this on hardware: it maps only 4- and 8-bit activations (“Output should be 4-bit or 8-bit. 1 given”), so a 1-bit 2.0 model runs only in the simulator. Akida 1.0, the generation of the AKD1000 chip, supports 1, 2 and 4 bits.

Akida 1.0 has its own rules. The ReLU must be bounded (here at 6), activations are quantized with one scale per layer, and a layer’s neurons are threshold units: each sums the integer weights of its non-zero inputs and outputs

with sum , threshold , step and activation bits. At this is a neuron that fires when its input crosses a threshold and stays silent otherwise: a spiking neuron, but without a membrane that carries charge from one frame to the next.

The experiment changed nothing else: same data, split, frames and architecture, with ReLU capped at 6. For each seed, the float network was trained for 15 epochs; then, for 4, 2 and 1 activation bits, it was quantized (8-bit first-layer weights, 4-bit weights), retrained for 10 epochs with quantization-aware training, converted for Akida 1.0, and run in the simulator. All nine models also map onto the AKD1000 with hardware-only layers, so they would run on the physical chip.

Akida 1.0’s maximum is 4 bits; 1 bit is the low end of its range, not beyond it. The two generations support different activation precisions, and the post uses both:

Akida generationActivation bits supportedUsed in this post
Akida 1.0 (AKD1000 chip)1, 2, 4 (at most 4)§8: 4, 2 and 1 bit
Akida 2.04, 8§4–7: 8 and 4 bit

The parameters stored in the converted files confirm it (seed 0; the other seeds are the same):

Model fileconv1 · conv2 · conv3 activationsWeights · maps onto the AKD1000
Akida 1.0, 4-bit4 bit8-bit (conv1), 4-bit · yes
Akida 1.0, 2-bit2 bit8-bit (conv1), 4-bit · yes
Akida 1.0, 1-bit1 bit8-bit (conv1), 4-bit · yes

Only the activations are binary; the weights stay 4-bit (8-bit in the first layer). The final layer has no activation: it outputs its sums as the class scores. All models can be downloaded at the end of the post.

Activations (Akida 1.0)Per recording, mean ± sd (seeds 0, 1, 2)Per single frame
Float, bounded ReLU93.1 ± 1.3% (93.2, 91.7, 94.3)83.6%
4-bit92.6 ± 0.8% (92.8, 91.7, 93.2)82.5%
2-bit91.5 ± 1.5% (91.3, 90.2, 93.2)73.0%
1-bit86.5 ± 4.8% (81.1, 90.2, 88.3)58.4%

Four and two bits cost one to two points. One bit costs 6.6 points on average, and much more on some seeds. A single 1-bit frame is right only 58% of the time; averaging 30 frames recovers most of it. Post-training quantization alone failed completely at 2 and 1 bits (9–18% per recording, near chance), so retraining is not optional here.

Seed 0 shows the gap of §5 at its worst. Its quantized Keras model reached 91.3% after retraining, but the Akida model only 81.1%, a 10-point difference. On the other two seeds the two agreed within a point (89.4 vs. 90.2%, 88.3 vs. 88.3%). At 1 bit a small rounding difference flips a neuron from 0 to 1, so the simulation in Keras is least reliable exactly where it matters most.

What reaches each layer is now binary. The values entering conv2, conv3 and the dense layer of every 1-bit model are only 0 or 1, and few of them are 1:

Layer input, 1-bit modelsNon-zero (seeds 0, 1, 2)Largest value
conv1 (event counts)27%255
conv28.0%, 7.2%, 9.4%1
conv327.4%, 28.0%, 20.2%1
dense23.4%, 21.2%, 31.4%1

Counted with NeuroBench

The rebuild for NeuroBench uses Akida 1.0’s arithmetic: threshold, step and ceiling, inner kernels stored flipped as in Akida 2.0, and a final layer that flattens its input in (channel, column, row) order, found by testing. For the three 1-bit models it reproduces Akida’s outputs exactly on all 7,920 test frames, and NeuroBench’s accuracy equals Akida’s for every seed. The 4- and 2-bit rebuilds are not exact: at 4 bits under 0.7% of the values differ, at 2 bits 4% of conv1’s outputs and 25–37% of conv2’s and conv3’s, for reasons I did not find. Their operations were therefore counted with the same rule applied to Akida’s own activations, not to the rebuild.

Per recording, mean of 3 seedsLIF spiking CNNAkida 1.0, 1-bit
Inner layers13.8 M ACs7.7 M ACs
First layer6.0 M MACs9.6 M MACs
Total effective operations20 M (15% of dense)17.3 M (12%)
Neuron updates0.86 M0
Accuracy88.5%86.5%

Compare the Akida 2.0 4-bit model in §7: 51 M MACs and 0 ACs. The 1-bit model is now spiking in NeuroBench’s sense: 7.7 M effective accumulates, and the fewest operations of any network here that processes every frame (only the summed-image CNN, which runs once per recording, does less). Its first layer still multiplies, because its input is event counts, not spikes. For comparison, the Akida 1.0 models with more bits, counted the same way, need 59 M MACs (4-bit) and 19 M MACs (2-bit): two bits already remove most of the work, and one bit only changes how it is counted.

The full NeuroBench output for the three 1-bit models, run unmodified on the exact rebuild:

NeuroBench metric (per recording)Akida 1.0, 1-bit: mean ± sdSeeds 0, 1, 2
Classification accuracy86.5 ± 4.8%81.1, 90.2, 88.3%
Dense synaptic operations144.4 Msame for all
Effective MACs9.59 ± 0.02 M (6.6%)9.60, 9.61, 9.58 M
Effective ACs7.68 ± 0.46 M (5.3%)7.71, 7.21, 8.13 M
Membrane updates00, 0, 0
Neuron operations00, 0, 0
Activation sparsity (share of zeros)0.8450.843, 0.849, 0.844
Connection sparsity (zero weights)0.1930.193, 0.189, 0.197
Parameter count43,696same for all
Footprint349,568 bytessame for all

Against the 4-bit Akida 2.0 model of §7, activation sparsity rises from 0.42 to 0.85: at 1 bit, 85% of all activations are zero. Membrane updates and neuron operations are 0 because the threshold neurons keep no state between frames; the LIF network’s 0.86 M neuron operations have no counterpart here. The footprint is NeuroBench’s count for the rebuild, which stores its 43,696 parameters as 64-bit floats; on Akida the weights are 4-bit (8-bit in the first layer).

Neurons: who fires. NeuroBench’s activation sparsity of 0.845 means that 15.5% of the hidden neurons’ outputs are spikes, over all 30 frames of all 264 recordings. Per layer (mean of 3 seeds):

Hidden layer (neurons per frame)Neurons firing (output 1)Silent (output 0)
conv1 (4,096)8.2%91.8%
conv2 (2,048)25.2%74.8%
conv3 (1,024)25.3%74.7%
All hidden neurons (7,168)15.5%84.5% (NeuroBench: 0.845)

The per-layer rates, weighted by the number of neurons, reproduce NeuroBench’s number. The LIF network of Counting Energy had an activation sparsity of 0.89 (11% of outputs are spikes), so the 1-bit model fires about as rarely as a trained spiking network. Unlike the LIF neurons, Akida 1.0’s threshold neurons keep no charge from one frame to the next: “over time” here means averaged over 30 independent frames.

Synapses: what is computed. Of the 144.4 M dense synaptic operations per recording, 6.6% are effective MACs, 5.3% effective ACs, and 88% are never computed, because the input is 0 (a silent neuron, or an empty pixel), the weight is 0, or the connection reaches into the zero padding. 15.5% of neurons firing and 12% of operations computed are close here, but they are different quantities, and in another network they need not be.

Synapses, layer by layer (mean of 3 seeds; the per-layer counts add up exactly to NeuroBench’s totals):

Layer (dense operations)Input reaching itEffective operations, counted as
conv1 (36.9 M)event counts, up to 2559.59 M MACs (26% of dense)
conv2 (98.3 M)0 or 1, 8% non-zero5.95 ± 0.70 M ACs (6.1%)
conv3 (8.8 M)0 or 1, 25% non-zero1.67 ± 0.28 M ACs (19%)
dense (0.34 M)0 or 1, 25% non-zero0.06 M ACs (19%)

The largest layer, conv2, receives so few spikes (8% of its inputs) that it does only 6% of its dense work, and it accounts for three quarters of the accumulates. The first layer is now the most expensive part of the network: more than half of all operations, and all of its multiplications, are spent on the event counts at the input. A spiking or binarised input would be the next step.

Priced as in Counting Energy (the yellow bar in the energy lab of §7, where ESOP can be varied):

Price of a MAC1-bit Akida 1.0, ESOP = 1 · 10 · 23.6 pJFor comparison
32-bit float, 4.6 pJ52 · 121 · 225 µJLIF 170 µJ, Akida 4-bit 235 µJ
8-bit integer, 0.23 pJ9.9 · 79 · 184 µJAkida 4-bit ≤ 11.8 µJ, 2-bit 4.4 µJ
  1. The counting gap is closed. With 1-bit activations the converted network does fewer operations than the LIF network (17.3 M vs. 20 M), and all of its inner layers count as accumulates.
  2. The energy gap depends on the price, again. With float MACs and a nominal 10 pJ accumulate, the 1-bit model is the cheapest network that looks at every frame (121 µJ). Priced as integers, a 10 pJ accumulate costs over 40 times a 0.23 pJ MAC, so its 7.7 M accumulates cost more than the 4-bit model’s 51 M MACs; it wins only if an accumulate costs less than about 1.2 pJ.
  3. The price was set for a different chip. ESOP comes from Loihi, where a synaptic event includes reading the weight and routing the spike. On Akida 1.0 a 1-bit event adds a 4-bit weight; what that costs on the chip, including memory and routing, is not known from counts.
  4. It costs accuracy. 86.5% against 92.6% at 4 bits, with a spread between seeds six times larger. Two bits keep 91.5% with almost as few operations (19 M), all cheap integer MACs: in this experiment the better trade.

So the two routes can meet: a converted network with binary activations counts like a spiking network, and its accuracy (86.5%) lands close to the LIF network’s (88.5%). Whether its accumulates are actually cheaper than low-precision multiplies is a question for the hardware.

9. Limitations

What this experiment ran into, or what Akida’s documentation states (Akida 2.0 unless noted):

  • Layer layout. Only specific blocks convert: kernel sizes 1, 3, 5, 7 (InputConv2D also 4), stride 2 only with 3×3 kernels, max pooling only 2×2 (or 3×3 with stride 2 at the input), with the same padding as its convolution and followed by a convolution. Dilated and grouped convolutions (except depthwise) are not supported. Akida 1.0 converts only sequential models without skip connections; Akida 2.0 adds Add and Concatenate.
  • Input. uint8 inputs; the input convolution takes 1 or 3 channels. A 2-channel event representation had to become 3 channels.
  • Activations. ReLU; Akida 2.0 adds GeLU, SiLU, LeakyReLU and PReLU through a lookup table, but not together with max pooling.
  • Precision. 4-bit models needed quantization-aware training to recover; post-training quantization alone was unreliable, and at 2 and 1 bits (Akida 1.0) it was near chance. Akida 2.0 maps only 4- and 8-bit activations; 1- and 2-bit activations need Akida 1.0, with a bounded ReLU and one activation scale per layer. One bit cost 6.6 points on average (86.5%) and varied by 9 points between seeds.
  • No time inside the network. Each frame is processed independently. Temporal information needs explicit temporal layers (Akida 2.0’s buffer convolutions over 2–10 frames) or averaging outside the network, as here.
  • Sparsity is not created by conversion. A converted ReLU network keeps its ReLU sparsity: 35–59% of the dense work here (NeuroBench), against 15% for the trained spiking network.
  • Energy is not measured. The simulator reports operations, not joules; energies here are estimates from counts.
  • Simulation fidelity. QuantizeML’s quantized model and the Akida model disagreed on 7.5% of single-frame predictions.
  • Tooling. Keras/TensorFlow 2.19 and Python 3.10–3.12 only, Linux or Windows; models from PyTorch need the ONNX route. A converted model runs only on Akida.

10. Common Claims, Checked

ClaimVerdict
”CNN2SNN converts an ANN into a spiking neural network.”Into an event-driven integer network for Akida. Its events are graded multi-bit activations, not binary spikes over time; there are no time steps and no membrane state.
”ANN-to-SNN conversion costs accuracy and latency.”Classical rate-based conversion does. Here, per recording, the Akida models were within a point of the float ANN (92.7% and 93.2% vs. 92.9%), with one pass per frame.
”Quantizing to 4 bits is enough.”Not without retraining: post-training 4-bit quantization gave 21–78% depending on the seed; three epochs of quantization-aware training gave 92.4% every time.
”A converted network is as sparse as a spiking network.”No: NeuroBench counted 51–85 M effective MACs per recording (35–59% of dense), against 20 M operations (15%) for the LIF network trained with surrogate gradients.
”Akida’s events are spikes, so its operations are accumulates.”At 4 and 8 bits its events carry values (up to 15 or 127), so NeuroBench counts every operation as a MAC: 0 ACs. At 4 bits, though, 81% of the non-zero inputs to conv2 are exactly 1, operations that are effectively accumulates.
”A converted network can never compute with binary spikes.”With 1-bit activations on Akida 1.0 it does: 0/1 inputs to every inner layer, 7.7 M effective ACs, 17.3 M operations in total (fewer than the LIF network’s 20 M), and the models map onto the AKD1000. It cost 6.6 points of accuracy (86.5% vs. 92.6% at 4 bits).
”Binary activations save energy.”They save operations. Priced with a 10 pJ accumulate and 8-bit integer MACs, the 1-bit model (79 µJ) costs more than the 4-bit model (≤ 11.8 µJ); it wins only below about 1.2 pJ per accumulate.
”Lower precision only saves memory.”It also created zeros: 42% zero activations and 22% zero weights at 4 bits, against 22% and 1% at 8 bits, so 40% fewer operations.
”The quantized Keras model shows exactly what the chip will do.”It disagreed with the Akida model on 7.5% of single frames. Evaluate on the Akida model.
”Any Keras CNN can be converted.”Only Akida’s layer blocks, in the right order: the first attempt failed on pooling padding, and a 2-channel input was rejected outright. Check compatibility before training.
”Event-driven means energy-efficient.”It depends on how many events there are and what each costs. With float arithmetic the spiking network was cheapest (170 vs. 235–391 µJ); priced as 8-bit integers, the Akida models (12–20 µJ) matched or beat it.
”The spiking network always uses less energy than the converted ANN.”It always does fewer operations (20 M vs. 51–85 M). Energy depends on the price per operation, and the ranking flips when the MACs are 8-bit integers.

Download the Models

All 15 converted models of this post, 55–57 KB each, as Akida .fbz files (3 seeds per variant). Accuracy per recording on the 264 test recordings, measured on the Akida model:

ModelAccuracy (seeds 0, 1, 2)Download
Akida 2.0, 8-bit92.0, 93.2, 92.8%seed 0 · 1 · 2
Akida 2.0, 4-bit92.8, 93.9, 92.8%seed 0 · 1 · 2
Akida 1.0, 4-bit92.8, 91.7, 93.2%seed 0 · 1 · 2
Akida 1.0, 2-bit91.3, 90.2, 93.2%seed 0 · 1 · 2
Akida 1.0, 1-bit81.1, 90.2, 88.3%seed 0 · 1 · 2
All 15 + READMEzip, 475 KB

Each model takes one 60 ms frame as a uint8 array of shape (32, 32, 3) (ON, OFF and ON + OFF event counts at 32 × 32, prepared as in §2) and returns 11 scores. A recording is classified from the mean of its 30 frames’ scores:

# pip install akida==2.19.3   (Python 3.10-3.12, Linux or Windows)
import akida
 
model = akida.Model("akida1_1bit_seed0.fbz")
model.summary()
 
# frames: one recording, (30, 32, 32, 3) uint8
scores = model.predict(frames)
gesture = scores.reshape(30, 11).mean(0).argmax()
 
# the Akida 1.0 models map onto the AKD1000 chip
model.map(akida.AKD1000(), hw_only=True)

The code that trained, converted and counted them is in akida (zip).


Summary

IdeaWhat the experiment showed
CNN2SNN: quantize, convert, run event-drivenA frame CNN for DVS Gesture converted with no loss per recording (92.7% at 8 bits, 93.2% at 4 bits vs. 92.9% float)
Akida’s eventsGraded non-zero activations, one pass per frame, no time steps
4-bit precisionNeeds quantization-aware training; then it is as accurate as 8 bits and needs 40% fewer operations (51 M vs. 85 M)
Sparsity (NeuroBench)Inherited from the ANN: 35–59% of the dense MACs remain; the spiking network does 15%
Energy (estimated)Float arithmetic: spiking 170 µJ vs. Akida 235–391 µJ. 8-bit integer arithmetic: Akida 12–20 µJ, about the same as the spiking network’s best case
1-bit activations (Akida 1.0)Binary events and 7.7 M accumulates: 17.3 M operations, fewer than the LIF network, at 86.5% accuracy. 2 bits keep 91.5% with 19 M cheap MACs
Hardware constraintsLayer blocks, padding, input channels, activations: check compatibility before training

References

Conversion

  • Cao, Y., Chen, Y., & Khosla, D. (2015). Spiking deep convolutional neural networks for energy-efficient object recognition. IJCV, 113(1).
  • Diehl, P. U., Neil, D., Binas, J., Cook, M., Liu, S.-C., & Pfeiffer, M. (2015). Fast-classifying, high-accuracy spiking deep networks through weight and threshold balancing. IJCNN.
  • Rueckauer, B., Lungu, I.-A., Hu, Y., Pfeiffer, M., & Liu, S.-C. (2017). Conversion of continuous-valued deep networks to efficient event-driven networks for image classification. Frontiers in Neuroscience, 11, 682.

Benchmarking

  • Yik, J., Van den Berghe, K., den Blanken, D., et al. (2025). The NeuroBench framework for benchmarking neuromorphic computing algorithms and systems. Nature Communications, 16.

Quantization

  • Jacob, B., Kligys, S., Chen, B., et al. (2018). Quantization and training of neural networks for efficient integer-arithmetic-only inference. CVPR.
  • Krishnamoorthi, R. (2018). Quantizing deep convolutional networks for efficient inference: A whitepaper. arXiv:1806.08342.
  • Horowitz, M. (2014). Computing’s energy problem (and what we can do about it). ISSCC.

Akida and data

The scripts for every result are in akida (zip), including the Docker setup used to run Akida’s tools on a Mac.