Stabilizing Direct Training of Spiking Neural Networks: Membrane Potential Initialization and Threshold-robust Surrogate Gradient

Hyunho Kook, Byeongho Yu, Jeong Min Oh, Eunhyeok Park

TL;DR

This paper introduces two novel techniques, MP-Init and TrSG, to stabilize the direct training of Spiking Neural Networks (SNNs). MP-Init addresses temporal covariate shift by initializing membrane potentials to their stationary distribution, while TrSG ensures stable gradient flow when learning neuron thresholds. These methods significantly improve SNN accuracy and enable state-of-the-art performance on various benchmarks.

What Problem Does This Paper Address?

Spiking Neural Networks (SNNs) offer energy-efficient computation by mimicking biological neurons that communicate via discrete spikes. While direct training methods have improved SNN accuracy, two major challenges persist:

  1. Temporal Covariate Shift (TCS): The internal statistics of SNNs change over time, leading to unstable training. Existing methods often address this by using timestep-specific normalization, which increases model complexity and cost. Crucially, these methods often overlook TCS in the membrane potential, a key factor influencing neuron output and leading to accuracy degradation.
  2. Unstable Gradient Flow with Learnable Thresholds: SNNs often have learnable parameters like the threshold voltage ($V_{thr}$) and leakage term ($\tau$). However, standard gradient descent methods struggle when $V_{thr}$ is trainable, leading to exploding or vanishing gradients. This instability hinders robust convergence.

Methods

The paper proposes two main innovations:

  • MP-Init (Membrane Potential Initialization): This method tackles TCS by initializing the membrane potential of neurons in each layer to match its stationary distribution. This is achieved by using a running average of the membrane potential at the final timestep during training. MP-Init is designed to be lightweight, requiring minimal extra memory and computation, and importantly, it doesn't alter the standard inference pipeline or require modifications to batch normalization layers.
  • TrSG (Threshold-Robust Surrogate Gradient): This is a refined surrogate gradient approach that stabilizes gradient flow with respect to the threshold voltage ($V_{thr}$) during training. It achieves this by:
  • Using a relative-scale argument for the surrogate function, similar to existing methods.
  • Multiplying the spike output by the threshold voltage on the forward pass during training. This effectively cancels out the problematic $1/V_{thr}$ factor that causes gradient explosion or vanishing in previous "relative-scale" methods. TrSG is a training-only modification, and inference reverts to standard binary spikes.

Datasets

The paper evaluates its methods on several standard datasets:

  • Static Image Datasets:
    • CIFAR10
    • CIFAR100
    • ImageNet
  • Dynamic (Event-Based) Datasets:
    • DVS-CIFAR10

Key Insights and Ideas

  • Membrane Potential is Key to TCS: The authors empirically and theoretically demonstrate that TCS in SNNs fundamentally originates from the drift in membrane potentials, not just activations. This insight is crucial because previous methods often focused on activation normalization, leaving the root cause unaddressed.
  • Initialization Matters for Stability: Directly aligning the initial membrane potential with its stationary distribution (MP-Init) is a simple yet effective way to combat TCS, leading to consistent neuron behavior across timesteps.
  • Gradient Scaling is Critical for Trainable Thresholds: The way surrogate gradients are scaled with respect to the threshold voltage ($V_{thr}$) is paramount for stable training. The paper shows how existing methods (AS-SG and RS-SG) suffer from gradient flood/starvation or explosion/vanishing, respectively, when $V_{thr}$ is learned.
  • TrSG Unifies Robustness: TrSG elegantly combines the benefits of relative scaling with a threshold multiplication trick, achieving stable gradients regardless of the initial $V_{thr}$ value. This makes learning $V_{thr}$ much more reliable.
  • Synergistic Effects: MP-Init and TrSG are complementary. MP-Init addresses temporal shifts, while TrSG stabilizes parameter learning. Together, they provide a robust framework for SNN training.

Key Results

  • State-of-the-Art Accuracy: The proposed methods (MP-Init + TrSG) achieve state-of-the-art accuracy on CIFAR10, CIFAR100, and DVS-CIFAR10 datasets.
  • On CIFAR10, they reach 95.50% accuracy at 6 timesteps.
  • On CIFAR100, they achieve 77.91% accuracy at 6 timesteps.
  • On DVS-CIFAR10, they achieve 81.43% accuracy with ResNet-19 at 10 timesteps.
  • Improved Efficiency: The methods enable higher accuracy at fewer timesteps compared to previous baselines, indicating improved computational efficiency.
  • Robustness to Initialization: TrSG demonstrates robust performance across various initial values of $V_{thr}$ and $\tau$, unlike previous SG methods.
  • Reduced Temporal Drift: MP-Init significantly reduces temporal covariate shift, leading to clearer class separation from the first timestep, as visualized by PCA of logits.
  • Energy Efficiency: MP-Init not only improves accuracy but also enables more energy-efficient SNN operation by achieving higher accuracy at similar or even lower firing rates.

Limitations and Future Work

  • Computational Intractability: While MP-Init approximates the stationary distribution, directly computing it is intractable. The paper's approach is a practical approximation.
  • Focus on LIF Neurons: The proposed methods are primarily demonstrated on Leaky Integrate-and-Fire (LIF) neurons. While the paper mentions compatibility with different reset mechanisms, extending these techniques to other neuron models could be a future direction.
  • Further Exploration of Surrogate Functions: The paper uses rectangular and triangular surrogate functions for analysis. Exploring the impact of TrSG with other surrogate function shapes (e.g., Sigmoid) is mentioned as being in the supplementary material.

The authors suggest that their methods contribute to improving the stability, efficiency, and accessibility of SNN training with minimal overhead, paving the way for wider adoption of SNNs.

Summary updated

BibTeX
@inproceedings{kook2026stabilizing,
  author = {Hyunho Kook and Byeongho Yu and Jeong Min Oh and Eunhyeok Park},
  title = {{Stabilizing Direct Training of Spiking Neural Networks: Membrane Potential Initialization and Threshold-robust Surrogate Gradient}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2026},
  url = {https://openreview.net/forum?id=dVe6FUUFZ1},
}
Figure