Navigating Local Minima in Quantized Spiking Neural Networks

Jason Kamran Eshraghian, Corey Lammie, Mostafa Rahimi Azghadi, Wei D. Lu

Abstract

Training Quantized Spiking Neural Networks (QSNNs) is notoriously difficult due to the combination of discrete spikes and low-precision weights, which creates a "jagged" loss landscape full of local minima and flat surfaces. This paper demonstrates that a periodic, cosine-annealed learning rate schedule allows these networks to "jump" out of suboptimal solutions. Our findings show that 4-bit QSNNs can achieve near state-of-the-art performance on complex neuromorphic datasets while significantly improving training stability.

Introduction

Spiking Neural Networks (SNNs) are ideal for low-power "edge" AI because they mimic biological neurons, communicating via sparse binary pulses. Further compressing these networks using quantization (QSNNs) makes them incredibly efficient for hardware. However, training them is a significant challenge. Standard deep learning relies on gradients, but the hard thresholds used for spikes and weight binning in QSNNs have zero gradients almost everywhere, effectively "blinding" the optimization process. This often results in training getting stuck in local minima or stalling on flat loss surfaces.

The Optimization Landscape in QSNNs

The loss landscape of a QSNN is inherently non-smooth and characterized by numerous suboptimal basins. Standard gradient descent with a decaying learning rate often fails to move weights effectively when the error signal is weak or when the optimizer is trapped.

Mechanism of escaping local minima via learning rate restarts.

As illustrated in Figure 1, the proposed solution involves a periodic learning rate schedule. By periodically boosting the learning rate (e.g., at $\eta_2$), the optimizer gains enough "kinetic energy" to jump out of shallow local minima and cross the flat regions that would otherwise stall a standard decaying learning rate ($\eta_1$).

Methodology

We propose a systematic approach to training QSNNs by focusing on the Learning Rate (LR) schedule and surrogate gradient techniques:

  1. Periodic Cosine Annealing: Instead of standard step decay, the LR follows a half-cosine curve that restarts every 10 epochs. This periodic boost enables the network to escape suboptimal states.
  2. Surrogate Gradients: A "fast sigmoid" function approximates the derivative of the non-differentiable spiking threshold.
  3. Quantization-Aware Training (QAT): We utilize 4-bit uniform weight quantization during the training phase to ensure hardware robustness.
  4. Adaptive Optimization: The LR schedule is paired with the Adam optimizer to handle weight updates effectively.

Experimental Results

The methodology was evaluated on three benchmarks: MNIST, FashionMNIST, and the neuromorphic DVS128 Gesture dataset. The latter is particularly challenging as it contains temporal hand gesture data recorded with event-based cameras.

Performance comparison across datasets and weight precisions.

As shown in Table 1, the periodic cosine schedule yielded significant improvements in both accuracy and consistency. On the DVS128 Gesture dataset, the 4-bit QSNN achieved a best test accuracy of 92.01%, remarkably close to the high-precision (32-bit) baseline. Furthermore, the cosine schedule significantly reduced the variance ($\sigma$) in test accuracy across trials compared to standard "LRStep" schedules, indicating a much more reliable training process.

Key Insights

  • Quantization as Regularization: For simpler tasks like MNIST, 4-bit quantized networks occasionally outperformed 32-bit versions, as quantization error acted as a form of noise preventing overfitting.
  • Dropout Interaction: We observed an inverse relationship between quantization and dropout; as weight precision decreases, the optimal dropout rate also decreases because quantization provides sufficient internal noise.
  • Surrogate Slope: Lower precision weights benefit from a shallower surrogate gradient slope, which promotes signal propagation across the flat loss landscapes typical of quantized systems.

Conclusion

Periodic learning rate schedules are a powerful tool for navigating the complex loss landscapes of quantized spiking neural networks. By enabling the optimizer to escape local minima, this approach allows 4-bit QSNNs to achieve high performance on neuromorphic benchmarks, paving the way for efficient deployment on lightweight hardware.

Summary updated

BibTeX
@inproceedings{eshraghian2022navigating,
  author = {Jason Kamran Eshraghian and Corey Lammie and Mostafa Rahimi Azghadi and Wei D. Lu},
  title = {{Navigating Local Minima in Quantized Spiking Neural Networks}},
  booktitle = {AICAS},
  year = {2022},
  doi = {10.1109/aicas54282.2022.9869966},
}
Figure