Latency Coding for Efficient and Low-Latency Deep Spiking Neural Networks

Yi Lu, Jianhao Ding, Zhaofei YuarXiv 2026

TL;DR

Spiking Neural Networks (SNNs) using Time-To-First-Spike (TTFS) coding are highly energy-efficient but suffer from high latency and training difficulties in deep architectures. This paper introduces latency coding, a framework that relaxes single-spike constraints in intermediate layers and uses a novel temporal adaptive loss to train deep SNNs via backpropagation. The resulting models achieve state-of-the-art accuracy with ultra-low inference latency—often requiring just 1 to 4 timesteps—while remaining natively compatible with neuromorphic hardware.

What Problem Does This Paper Address?

Spiking Neural Networks (SNNs) are a biologically inspired AI paradigm prized for their energy efficiency, processing information via discrete binary "spikes" rather than continuous activations. Most deep SNNs rely on rate coding, where information is carried by a neuron's firing frequency. However, rate coding requires many timesteps to establish a stable frequency, leading to high latency and energy consumption.

Time-To-First-Spike (TTFS) coding offers an alternative: information is encoded in the precise timing of a single spike (earlier spikes mean stronger signals). While theoretically ultra-efficient, traditional TTFS models face major bottlenecks:

  1. Information Loss: Directly mapping raw pixel intensities to spike latencies discards fine-grained visual details.
  2. Vanishing Gradients: Strict single-spike constraints across deep networks cause severe gradient degradation during training.
  3. Hardware Incompatibility: Traditional TTFS methods communicate continuous floating-point firing times between layers, which contradicts the discrete, binary spike communication native to neuromorphic hardware.

Methods

The authors propose latency coding, an extension of TTFS coding designed to overcome these limitations through three core components:

Fig. 1. Overall training framework for the latency coding. The raw pixels of input images are first processed by the latency encoding module to generate temporal spike trains, which are then propagated through subsequent SNN layers. The TAD loss provides temporally adaptive supervision during training.
  1. Latency Encoding (LE) Module: Instead of directly converting pixels to spikes, raw images pass through a preliminary feature extraction layer (Convolution + Batch Normalization) and a sigmoid function. This maps features to a $[0, 1]$ range before converting them to discrete spike times. To allow end-to-end training, a Straight-Through Estimator (STE) passes gradients backward through this non-differentiable mapping.
  2. Relaxed Intermediate Constraints: While the output layer still adheres to a strict first-spike decision rule, neurons in intermediate layers are permitted to fire multiple times. This restores suppressed gradient paths during Backpropagation Through Time (BPTT), sustaining effective gradient flow through deep networks.
  3. Temporal Adaptive Decision (TAD) Loss: Standard cross-entropy loss treats all timesteps equally, which conflicts with temporal coding. TAD loss dynamically weights the supervision signal based on the model's instantaneous confidence (inverse entropy of the output logits). Easy samples receive strong supervision early on to encourage rapid firing, while hard samples shift supervision to later timesteps, allowing the network to accumulate evidence.
  4. Membrane-Potential Tie-Breaking: In discrete-time simulations, multiple output neurons might fire at the exact same earliest timestep. The authors use the underlying analog membrane potential as a tie-breaker to ensure deterministic and unique classifications.

Datasets

The framework was evaluated across a diverse suite of computer vision benchmarks:

  • Static Image Datasets: CIFAR-10, CIFAR-100, Tiny-ImageNet, and ImageNet.
  • Neuromorphic Dataset: CIFAR10-DVS (an event-stream dataset capturing real-world temporal dynamics).
  • Robustness Benchmarks: CIFAR-10-C and CIFAR-100-C (clean datasets corrupted with 15 different noise, blur, and weather artifacts).

Key Insights and Ideas

  • The Power of Multi-Spike Intermediates: Pure TTFS restricts every neuron to one spike, which chokes information flow in deep networks. Allowing intermediate layers to fire multiple times acts as a regularizer for gradient propagation without sacrificing the first-spike decision speed at the output layer.
  • Binary Over Floating-Point: By propagating actual binary spikes through time rather than continuous floating-point timestamps, latency coding eliminates the need for hardware-level quantization, making it directly deployable on neuromorphic chips like TrueNorth and SpiNNaker.
  • Lower Temporal Redundancy Equals Robustness: Time-resolved similarity analysis revealed that rate-coded SNNs exhibit highly redundant spike patterns across timesteps. Latency-coded SNNs feature a much sparser, decorrelated temporal profile, which naturally filters out transient noise and prevents input perturbations from propagating through the network.

Key Results

The proposed method drastically reduces inference latency compared to prior temporal coding methods while maintaining or improving accuracy:

Comparison of accuracy, inference time, and sparsity across datasets
  • Ultra-Low Latency: On CIFAR-10, a VGG-11 architecture achieves 93.60% accuracy in exactly 1.00 average timesteps (with a spike sparsity of 0.16). This matches or beats baseline methods that require 160 to 4,096 timesteps.
  • Scalability: On the massive ImageNet dataset, a SEW-ResNet-34 model achieves 64.11% accuracy in just 4.00 timesteps.
  • Neuromorphic Speedup: On CIFAR10-DVS, the model achieves 79.54% accuracy in 4 timesteps, outperforming the Transformer-based T-SpikeFormer while running 40× faster.

From an energy perspective, the reduction in timesteps translates directly to massive power savings by minimizing static energy consumption:

Normalized energy evaluation on neuromorphic hardware Theoretical energy consumption comparison

  • On the TrueNorth hardware platform, the model achieves a normalized energy cost of 0.366× relative to traditional TTFS baselines.
  • Theoretical energy estimations show that on CIFAR-10, the latency-coded SNN consumes just 4.1% of the energy required by an equivalent artificial neural network (ANN) and achieves a 3× energy reduction over rate-coded SNNs.

Limitations and Future Work

While latency coding closes the gap significantly, a marginal performance and latency gap still exists when compared against the very latest early-exit rate-coded SNNs. The authors note that future work will focus on refining the encoding modules to prevent any initial information loss, designing loss functions even more tightly coupled with temporal dynamics, and scaling the framework to deeper, modern architectures like Vision Transformers.

Summary updated

BibTeX
@misc{lu2026latency,
  author = {Yi Lu and Jianhao Ding and Zhaofei Yu},
  title = {{Latency Coding for Efficient and Low-Latency Deep Spiking Neural Networks}},
  year = {2026},
  eprint = {2603.23206},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.23206},
}
Figure