Self-Distillation Learning Based on Temporal-Spatial Consistency for Spiking Neural Networks

Lin Zuo, Yongqi Ding, Mengmeng Jing, Kunshan Yang, Yunqian YuarXiv 2024 · DOI

Abstract

Spiking Neural Networks (SNNs) are energy-efficient, brain-inspired models ideal for edge computing, yet they remain challenging to train. Knowledge Distillation (KD) has emerged as a solution, but standard approaches require resource-intensive pre-trained teacher models and often suffer from architectural mismatches. This paper proposes Temporal-Spatial Self-Distillation (TSSD), a novel framework that allows an SNN to serve as its own teacher. By leveraging temporal and spatial consistency, TSSD enables models to achieve state-of-the-art accuracy at ultra-low latencies without increasing inference-time complexity.

Introduction: The Challenge of Training SNNs

Spiking Neural Networks (SNNs) process information using discrete spikes over time, offering significant energy savings compared to traditional Artificial Neural Networks (ANNs). However, the non-differentiable nature of spike functions complicates gradient-based training.

While Knowledge Distillation (KD)—where a compact "student" model mimics a larger "teacher"—has improved SNN performance, it introduces several drawbacks:

  1. Resource Intensity: Pre-training and storing large teacher models is computationally expensive.
  2. Domain Mismatch: Teachers are often ANNs, which lack the temporal dynamics of SNNs.
  3. Manual Complexity: Selecting and tuning an appropriate teacher architecture is a non-trivial task.
Comparison between traditional teacher-student distillation and the proposed self-distillation approach.

Methodology: Temporal-Spatial Self-Distillation (TSSD)

The TSSD framework eliminates the need for an external teacher by enforcing consistency within the model itself across two dimensions: time and space.

Temporal Self-Distillation (TSD)

In SNNs, accuracy typically improves with more simulation timesteps ($T$). TSD exploits this by using the model's own output at a high temporal resolution ($T_t$) as a "temporal teacher" for its output at a lower resolution ($T_s$). This forces the network to produce high-quality features and decisions much earlier in the simulation process.

Spatial Self-Distillation (SSD)

SSD introduces "weak classifiers" at intermediate layers of the network. During training, the final output of the full network acts as a "spatial teacher," guiding these intermediate stages to extract more discriminative features. This promotes better feature representation in the early layers of the architecture.

The TSSD framework, illustrating Temporal Self-Distillation (TSD) and Spatial Self-Distillation (SSD) mechanisms.

Importantly, the teacher and student share parameters. Once training is complete, the extra timesteps and weak classifiers are discarded, ensuring that inference speed and power consumption remain optimized.

Experimental Results

The authors evaluated TSSD on both static image datasets (CIFAR-10/100, ImageNet) and neuromorphic event-based datasets (CIFAR10-DVS, DVS-Gesture).

  • High-Performance Image Classification: On ImageNet, a ResNet-34 using TSSD achieved 66.13% accuracy with only 2 timesteps. On CIFAR-10, the model reached 94.41% accuracy at $T=2$.
  • Ultra-Low Latency: TSSD demonstrated remarkable efficiency on CIFAR-100, achieving 73.33% accuracy with just 1 timestep, outperforming many models that require 10 timesteps.
  • Neuromorphic Excellence: For event-based data, TSSD set a new benchmark on DVS-Gesture with 97.45% accuracy, highlighting its superior temporal processing.

Conclusion

TSSD provides a powerful, "teacher-free" distillation framework for SNNs. By baking "long-term" temporal wisdom and "deep" spatial features into a compact execution model, it bridges the gap between training complexity and deployment efficiency. This approach is orthogonal to existing SNN optimization techniques, offering a versatile tool for developing high-performance, low-latency neuromorphic systems.

Summary updated

BibTeX
@misc{zuo2024self,
  author = {Lin Zuo and Yongqi Ding and Mengmeng Jing and Kunshan Yang and Yunqian Yu},
  title = {{Self-Distillation Learning Based on Temporal-Spatial Consistency for Spiking Neural Networks}},
  year = {2024},
  eprint = {2406.07862},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.07862},
}
Figure