Source-linked AI summary

SpikeQ: Spike-Guided Post-Training Quantization for Spiking Neural Networks

Kai Sun, Peibo Duan, Zhanglu Yan, Guowei Zhang, Yongsheng Huang, Levin Kuhlmann

arXiv:2610.23046v1cs.NEcs.AIcs.CV

TL;DR

Low-bit weights and membrane potentials are needed to fit SNNs in neuromorphic-chip memory, but numerical-error objectives can overlook which spikes quantization changes. SpikeQ guides weight and membrane PTQ by spike errors and threshold-aligned, reset-aware grids; across seven benchmarks it outperforms existing methods in most settings, with 4-bit models retaining accuracy while reducing memory and energy use.

  • Problem

    Neuromorphic chips have limited memory for weights and membrane potentials, while existing PTQ objectives minimize numerical error even though equal-MSE errors can cause different SNN accuracy losses.

    Source: §1 · pp. 1–2
  • Method

    SpikeQ selects weight levels by minimizing downstream spike errors and uses a reset-aware pre-fire membrane grid that places the threshold on a rounding boundary.

    Source: §4 · p. 3, §4.2 · p. 5
  • Results

    4-bit models lose at most 2.59 points, shrink memory 7.8–7.9×, and use 6.4–6.9× less energy; across classification, segmentation, and detection, SpikeQ outperforms existing methods in most settings.

    Source: §1 · p. 2, §6 · p. 8
  • Takeaways & Limitations

    At 2-bit pre-fire membrane precision, every existing grid collapses on all seven benchmarks, whereas SpikeQ retains most full-precision accuracy.

    Source: §5.3 · p. 7

Abstract

from arXiv · show

On neuromorphic chips, spiking neural networks (SNNs) consume far less energy than artificial neural networks (ANNs), but the limited memory of these chips requires low-bit synaptic weights and membrane potentials. Existing post-training quantization (PTQ) methods provide them without retraining and, like those for ANNs, minimize numerical errors such as the mean squared error (MSE). In an SNN, however, a quantization error reaches later layers only through the spikes it flips. We find that errors of equal MSE can cause very different accuracy losses, whereas errors that flip the same fraction of spikes cause the same loss. We therefore propose SpikeQ, a spike-guided PTQ framework. For weights, we select the level of each weight by simulating the downstream neurons and minimizing their spike errors. For membrane potentials, most existing methods quantize the state after the reset, whereas neuromorphic chips compare the threshold with the membrane potential stored at a fixed bit width. We target this pre-fire quantization and build a reset-aware grid that places the threshold on a rounding boundary, so rounding never flips the spike at the current time step. We evaluate SpikeQ on seven benchmarks of image classification, semantic segmentation, and object detection. With 2-bit pre-fire membrane potentials, every existing grid collapses, whereas SpikeQ retains most of the full-precision accuracy. With both at 4 bits, the models stay within 2.59 points of full precision, shrink their memory footprint 7.8--7.9 times, and use 6.4--6.9 times less energy.

1. Introduction

Low-bit weights and membrane potentials are needed to fit growing SNNs in limited neuromorphic-chip memory. SpikeQ uses spike errors rather than numerical error magnitude to guide PTQ.

1. Introduction

  • Neuromorphic chips have limited on-chip memory for weights and repeatedly read and update membrane potentials, making quantization necessary for large SNN deployment.The paper frames quantization as necessary to preserve the energy advantage of neuromorphic chips.Source: §1 · p. 1
  • QAT retrains for each bit width using original data, whereas PTQ calibrates a pretrained SNN on a small unlabeled set without retraining.Existing PTQ methods largely adapt ANN objectives that minimize numerical errors.Source: §1 · pp. 1–2
  • Errors with equal MSE can cause different accuracy losses, while the fraction of flipped spikes tracks accuracy loss with Spearman correlation −0.99.The injected-error experiments find that errors flipping the same fraction of spikes cause the same accuracy loss.Source: §1 · p. 2
  • 4-bit SpikeQ models lose at most 2.59 points, shrink memory 7.8–7.9×, and use 6.4–6.9× less energy than full precision.The evaluation covers image classification, semantic segmentation, and object detection.Source: §1 · p. 2

2. Related Work

Related SNN quantization work includes QAT and PTQ, with PTQ adapting methods that align numerical quantities or fit activation-like membrane grids. These approaches do not directly account for how quantization errors change spikes.

2. Related Work

  • QAT simulates quantization during training, while PTQ quantizes pretrained SNNs using a small unlabeled calibration set without retraining.QAT training must be repeated on original data for every bit width and backpropagates through all time steps.Source: §2 · p. 2
  • Weight PTQ aligns input-current or pre-fire membrane-potential values, but these objectives can miss spike changes propagated to later time steps and layers.A large error far from threshold may leave spikes unchanged, while a small near-threshold error can flip one.Source: §2 · p. 2
  • Most membrane PTQ quantizes the post-reset state using grids whose scale is fitted to membrane range or derived from weight scale.On-chip comparison uses the stored, pre-fire membrane potential, where these grids can leave the threshold inside a rounding interval and flip spikes.Source: §2 · p. 2

3. Preliminaries

The preliminaries describe quantization grids for weights and membrane potentials, distinguishing membrane rounding after reset from rounding before firing. Figure 2 depicts the resulting types of spike and reset errors.

3. Preliminaries

  • Figure 2 depicts input-current, membrane-potential, and spike mismatch after weight quantization, membrane rounding errors, and hard- versus soft-reset errors.The caption assigns these error types to panels (a), (b), and (c), respectively.Source: Figure 2 · p. 3
  • With b bits, each weight is replaced by one of 2^b evenly spaced levels; each output channel has its own step ∆w and level range.A weight’s selected level q represents the quantized value q∆w.Source: §3 · p. 3
  • Post-reset membrane quantization rounds the state carried to the next time step, while pre-fire quantization rounds the potential used for firing and reset.The membrane grid has K = 2^b evenly spaced levels with step ∆v.Source: §3 · p. 3

4. Method

SpikeQ uses downstream spikes to guide weight rounding and builds membrane grids around the threshold and reset rule.

4.1. Weight Quantization

  • SpikeQ selects weight levels by minimizing downstream spike error rather than input-current or membrane-potential error.Source: §4.1 · p. 3
  • The weight objective compares spike counts with full-precision and local references, then uses per-step margins to prioritize correcting wrong spikes.Source: §4.1 · p. 4
  • A population term balances total layer spike count, while a two-phase search revisits weight levels and restores channels whose held-out loss rises.Source: §4.1 · p. 4

4.2. Membrane Quantization

  • The pre-fire membrane grid places θ on a rounding boundary, preventing rounding from changing current-step spikes, and allocates levels so post-reset states remain on-grid.Source: §4.2 · pp. 4–5
  • For each layer, SpikeQ selects the grid with the fewest spike changes by simulating candidate grids on currents from already-quantized earlier layers.Source: §4.2 · p. 5

5. Experiments

Across seven benchmarks, SpikeQ combines weight and membrane quantization while retaining accuracy and reducing memory and energy costs. The experiments compare weight and membrane grids, reset settings, energy, and component ablations.

5.1. Experimental Setup

  • Experiments use seven benchmarks spanning image classification, semantic segmentation, and object detection, with T = 4 time steps and unlabeled calibration sets.Weights use 1,024 unlabeled training images and membrane grids use 256; most models use hard reset.Source: §5.1 · p. 5

5.2. Weight Quantization

  • At W4, SpikeQ stays within 0.28 points of the best method on every benchmark; at W2, it is best on six of seven and reaches 45.76% vs. 22.21% on SDT.At W2, SpikeQ flips the fewest spikes on every benchmark, and accuracy generally falls as flipped spikes grow.Source: §5.2 · pp. 5–6, Table 1 · p. 6, Table 2 · p. 6

5.3. Membrane Quantization

  • At V2 pre-fire quantization, every existing grid collapses on all seven benchmarks, while SpikeQ retains most full-precision accuracy; threshold anchoring prevents rounding across θ.SpikeQ† improves by up to 0.90 mIoU on segmentation at V2, but falls far behind SpikeQ on SEW-ResNet-18 when some first-layer channels lose 73% of their spikes.Source: §5.3 · p. 7
  • Under post-reset quantization, SpikeQ is more accurate than existing grids on most benchmarks by selecting the step using flipped spikes rather than MSE.MSE can favor a coarse step that rounds potentials just below θ to zero, causing neurons to miss spikes at the next time step.Source: §5.3 · p. 7
  • For soft-reset CIFAR models, pre-fire grids trail post-reset grids at V2 because they span a wider range and are coarser; the gap largely closes at V4.Under hard reset, fixing the number of grid levels above θ loses nothing and reduces the search.Source: §5.3 · p. 7

5.4. Joint Quantization

  • W4V4 stays within 2.59 points of full precision and shrinks memory footprint by 7.8–7.9×; energy consumption falls by 6.4–6.9×.The joint-quantization results report the accuracy and footprint comparison; the energy result is reported separately.Source: §5.4 · p. 7, Table 7 · p. 8, §5.5 · p. 8

5.5. Energy Consumption

  • Weight quantization drives most energy savings: W4V4 reduces energy consumption by 6.4–6.9× and W2V2 by 8.7–10.8×, as weight reads dominate full-precision energy.Membrane-potential bit width affects only the neuron term, a small share of energy consumption.Source: §5.5 · p. 8

5.6. Ablation Study

  • Ablations show that removing the margin term costs up to 5.29 points, removing the population term costs about 3.2 mIoU, missing threshold anchoring collapses hard-reset benchmarks, and MSE can cost up to 40.22 points.The margin-term cost is reported on classification and detection; the MSE comparison is for post-reset calibration on hard-reset benchmarks.Source: §5.6 · p. 8

6. Conclusion

SpikeQ guides weight and membrane-potential quantization by the spikes they flip, and its reset-aware membrane grid makes the threshold a rounding boundary. Across image classification, semantic segmentation, and object detection, it outperforms existing methods in most settings.

6. Conclusion

  • Across image classification, semantic segmentation, and object detection, SpikeQ outperforms existing methods in most settings.Its membrane grid also matches its levels to the reset rule, so the post-reset state needs no further rounding.Source: §6 · p. 8
  • SpikeQ selects weight levels that cause the fewest spike errors rather than minimizing quantization-error magnitude.The paper identifies flipped spikes, rather than error magnitude, as the route by which quantization errors reduce SNN accuracy.Source: §6 · p. 8
  • Its membrane grid places the threshold on a rounding boundary, preventing rounding from moving the membrane potential across the threshold before firing.Source: §6 · p. 8

A. Implementation Details

The implementation specifies calibration and simulation settings for weight and membrane quantization. The reset-aware allocation proof shows that post-reset states lie on the membrane grid under both hard and soft reset.

A. Implementation Details

  • Experiments used NVIDIA A100 GPUs; BRECQ, PTQ4SNN, and SpikeQ shared a weight-grid clipping search, and membrane grids were calibrated on 256 images.On COCO, the first layer and detection head remained at 8 bits; simulation sampled spatial positions on large feature maps while retaining all time steps.Source: A. Implementation Details · p. 11

B. Proof of Reset-Aware Level Allocation

  • Under the stated grid and step-size conditions, the post-reset state is a membrane-grid level for both hard and soft reset.The m levels immediately below the threshold are those between 0 and θ.Source: B. Proof of Reset-Aware Level Allocation · p. 12
  • Hard reset returns the state to 0, while soft reset subtracts θ; the chosen grid makes each resulting state an existing level.For hard reset, Δv = θ/(m + 1/2); for soft reset, θ = mΔv, so a level above θ shifts down by m grid steps.Source: B. Proof of Reset-Aware Level Allocation · p. 12

C. Results at 3 Bits

At 3 bits, SpikeQ shows strong weight- and pre-fire membrane-quantization results, extending the trends reported at 2 and 4 bits.

C. Results at 3 Bits

  • Except on SEW-ResNet-18, SpikeQ† reaches within 0.91 points of full precision for pre-fire membrane quantization; on SEW-ResNet-18 it reaches 62.18%.Every baseline remains at least 15 points below full precision at V3.Source: C. Results at 3 Bits · p. 12
  • SpikeQ gives the most accurate weight quantization in six of the eight W3 columns.The 3-bit results follow the trends at 2 and 4 bits.Source: C. Results at 3 Bits · p. 12

D. Flipped Spikes and Accuracy

Across the seven benchmarks, accuracy generally falls as quantization flips more spikes, with a notable exception for existing grids on CIFAR. At 2-bit pre-fire membrane quantization, only SpikeQ retains most full-precision accuracy.

Weight quantization

Membrane quantization

E. Energy Consumption

Weight quantization provides most of the modeled energy savings, while membrane quantization contributes little to energy reduction but can reduce the total memory footprint. The estimates use a three-part energy model and task-specific evaluation measurements.

Measurement

  • Operation counts use task-specific evaluation preprocessing and are averaged over 16 evaluation images; firing rates are measured on the stated task evaluation sets or samples.Layers with non-spiking inputs are costed with firing rate 1, and products of two attention activations are excluded.Source: E. Energy Consumption · pp. 13, 15

Energy savings

  • W4 and W2 alone lower EC by 6.3–6.8× and 8.5–10.2×, respectively, while W4V4 to W2V2 lowers EC by only 1.4–1.6×.At full precision, memory accounts for 79% of EC; spike transmission costs the same at every bit width and takes 42% of a 2-bit synaptic operation's energy.Source: Table S3 · p. 14, E. Energy Consumption · p. 15
  • Membrane quantization alone changes EC by less than 5%, since its bit width affects only the neuron term, at most 0.25% of full-precision EC.The reported model includes compute, memory, and neuron terms; synaptic operations depend on operation count and input firing rate, while spiking neurons update and compare membrane potential each time step.Source: E. Energy Consumption · pp. 13, 15, Table S3 · p. 14

Memory

  • On segmentation and detection, membrane memory exceeds model size at full precision, and after W2 it takes most of the footprint; W2V2 reduces VOC memory from 377 to 37.6 MB.The footprint adds model size to per-image membrane storage, with one potential per neuron held at once.Source: Table S3 · p. 14, E. Energy Consumption · p. 15
Loading 2610.23046v1…