TL;DR
Spiking Neural Networks (SNNs) offer energy efficiency but lag behind ANNs in performance, especially when using Transformer architectures. This paper introduces AdaS, an adaptive gradient descent optimizer that specifically addresses the "excessive noise" problem in training Spiking Transformers, leading to improved accuracy without sacrificing energy efficiency.
What Problem Does This Paper Address?
Artificial Neural Networks (ANNs) have achieved remarkable success, particularly with the advent of the Transformer architecture, which excels at capturing long-range dependencies. Spiking Neural Networks (SNNs), on the other hand, offer significant energy efficiency due to their event-driven nature and sparse communication. Combining these two, Spiking Transformers, promise the best of both worlds: high performance and low power consumption. However, Spiking Transformers currently underperform their ANN counterparts. A key reason for this gap is the difficulty in training SNNs, which are inherently non-differentiable. Existing methods often rely on surrogate gradient functions, which introduce noise into the training process. When combined with standard adaptive optimizers (like AdamW), this noise can become excessive, leading to training instability, oscillations, and ultimately, reduced performance. This paper aims to tackle this "excessive noise problem" by developing a specialized optimization algorithm for Spiking Transformers.
Methods
The core of this paper is the introduction of AdaS (Adaptive Gradient Descent for Spiking Transformers). AdaS is designed to mitigate the excessive noise in Spiking Transformer training by adaptively balancing two components:
- Adaptive Optimizer Update: This is the standard update from a base optimizer (e.g., AdamW).
- Momentum-Based Gradient Update: This component leverages the first-order momentum stored in the adaptive optimizer as a stable approximation of the gradient-based update.
AdaS adaptively weights these two components to maintain an appropriate level of noise. Instead of simply trying to eliminate noise, AdaS aims to keep it at a beneficial level, preserving its ability to help the model escape sharp local minima and find flatter, more generalizable regions in the loss landscape. The adaptive balancing coefficient is dynamically computed to target a specific noise level. AdaS is designed as a meta-optimizer, meaning it can be integrated with existing adaptive optimizers.
The paper also provides a theoretical framework for understanding and quantifying "parameter-update noise" in the context of gradient descent and surrogate gradients.
Datasets
The authors evaluated AdaS on a variety of datasets across different domains:
- Natural Language Processing (NLP):
- GLUE benchmark (including CoLA, SST-2, MRPC, STS-B, MNLI, QQP, QNLI, RTE)
- Computer Vision (CV):
- ADE20K (semantic segmentation)
- CIFAR10-DVS (event-based vision)
- FE108 (event-based object tracking)
- VisEvent (event-based object tracking)
Key Insights and Ideas
- Quantifying "Excessive Noise": The paper provides a formal definition and theoretical analysis of "parameter-update noise" in Spiking Transformers, specifically linking it to the use of surrogate gradients and adaptive optimizers. This is a crucial step in understanding why Spiking Transformers are hard to train.
- Noise as a Feature, Not a Bug: AdaS doesn't aim to eliminate all noise. Instead, it intelligently balances noise to preserve its beneficial effects (escaping sharp minima) while reducing detrimental excessive noise. This nuanced approach is key to its success.
- Momentum as a Stable Gradient Proxy: The clever use of first-order momentum from existing optimizers as a stable approximation of the gradient update component is an efficient way to incorporate gradient information without significant overhead.
- Meta-Optimizer Versatility: AdaS is designed to be a plug-and-play component, easily integrated with various standard adaptive optimizers, demonstrating its broad applicability.
Key Results
- Consistent Performance Gains: AdaS consistently improved the performance of various Spiking Transformer architectures across multiple NLP and CV tasks. For instance, on the GLUE benchmark, AdaS improved the average score by 1.1% compared to AdamW. On ADE20K, it achieved a 2.0 percentage point gain in mIoU.
- Reduced Noise Levels: Experiments showed that Spiking Transformers optimized with AdaS exhibited lower estimated parameter-update noise compared to those trained with AdamW.
- Comparable Energy Efficiency: AdaS did not negatively impact the energy efficiency of SNN models, maintaining the core advantage of spike-based computation.
- Minimal Overhead: AdaS introduced only minor runtime and memory overhead compared to standard optimizers like AdamW.
- Improved Accuracy on Tracking: On event-based tracking datasets (FE108 and VisEvent), AdaS-trained models showed improvements in AUC and Precision Rate.
Limitations and Future Work
- Noise Level Control: While AdaS aims to maintain noise at an appropriate level, the optimal target noise level ($\gamma$) might require tuning for different tasks or architectures.
- Generalizability of Noise Impact: The paper assumes a weak correlation between optimizer-induced deviation and surrogate-induced discrepancy. While theoretically justified, further empirical validation across a wider range of scenarios could be beneficial.
- Future Work: The authors suggest that AdaS can be readily incorporated into existing adaptive optimization frameworks, implying its potential as a general-purpose meta-optimizer for SNNs. Further exploration of its application to other SNN architectures and tasks is a natural next step.
Summary updated