Sparse by Rule: Probability-Based N:M Pruning for Spiking Neural Networks

Shuhan Ye, Yi Yu, Qixin Zhang, Chenqi Kong, Qiangqiang Wu, Xudong Jiang, Dacheng TaoarXiv 2025 · DOI

Spiking Neural Networks (SNNs) offer a promising path toward energy-efficient artificial intelligence by mimicking the event-driven communication of the biological brain. However, as SNNs scale to match the performance of deep Artificial Neural Networks (ANNs), their parameter counts have ballooned, challenging their deployment on resource-constrained edge devices. This paper presents SpikeNM, the first framework for semi-structured N:M pruning tailored for SNNs. SpikeNM addresses the computational bottleneck of N:M mask searching by linearizing the search complexity and introduces a neuroscience-inspired temporal credit assignment mechanism to stabilize training.

The Challenge of SNN Pruning

The efficiency of SNNs stems from their use of discrete spikes, which allows for sparse, asynchronous computation. Yet, modern high-performance SNNs are increasingly deep and parameter-heavy, leading to significant memory and computational overhead. Network pruning is a common strategy to mitigate this, but existing techniques often force a trade-off between hardware efficiency and model accuracy:

  1. Unstructured pruning results in irregular weight patterns that are difficult to accelerate on standard hardware.
  2. Structured pruning (removing entire neurons or channels) is hardware-friendly but often leads to substantial accuracy degradation.

Semi-structured N:M pruning—where exactly $N$ weights are kept in every contiguous block of $M$—emerges as a compelling middle ground. It is natively supported by modern hardware accelerators like NVIDIA's Ampere architecture. However, applying N:M pruning to SNNs is non-trivial due to the combinatorial explosion of the mask search space ($\binom{M}{N}$) and the complex temporal dynamics of spiking neurons.

The SpikeNM Framework

SpikeNM introduces a three-phase pipeline: search, prune, and finetune. The core innovation lies in how the N:M masks are learned through two primary mechanisms:

  • Mask Search Complexity Linearization: Traditional N:M search involves evaluating an exponential number of combinations. SpikeNM instead assigns a learnable probability distribution to each block of $M$ weights. By employing a differentiable top-$k$ sampler via the Gumbel-Softmax trick, the search complexity is reduced to linear $\mathcal{O}(M)$. This allows for the efficient exploration of high-sparsity regimes, such as 2:16.
  • Eligibility-Inspired Distillation (EID): SNN training can be unstable due to non-differentiable spikes and time-varying activations. SpikeNM draws inspiration from "eligibility traces" in neuroscience to create a temporal credit assignment mechanism. It accumulates weight gradients over all time steps to form a "credit" score, which serves as a soft target for mask learning. A KL-divergence loss ($\mathcal{L}_{EID}$) then aligns the probabilistic mask sampler with these temporal dynamics.
The SpikeNM framework overview, illustrating the linear-complexity mask search and Eligibility-Inspired Distillation (EID) loop.

Experimental Results

The authors evaluated SpikeNM on both static image datasets (CIFAR10, CIFAR100) and neuromorphic event-based datasets (CIFAR10-DVS, DVS-Gestures). SpikeNM consistently achieves superior performance compared to existing structured and unstructured pruning methods.

Notably, at 2:4 sparsity (retaining ~43% of weights), SpikeNM improved accuracy over unpruned dense baselines on CIFAR10 (+0.80% to 93.64%) and CIFAR10-DVS (+1.50% to 83.90%). Even at the more aggressive 2:8 sparsity level, the framework maintained or improved upon dense performance, demonstrating that SNNs are highly compressible and that pruning can act as an effective regularizer.

Comparison of SpikeNM against state-of-the-art structured and unstructured pruning methods across multiple datasets.

Key Insights and Future Work

  • Temporal Importance: The success of the EID module underscores that a weight's importance in an SNN is best captured by its contribution across all time steps, rather than a single snapshot.
  • Extreme Sparsity: Linearizing the search space is essential for reaching extreme sparsity levels. When pairing SpikeNM's 2:16 weight pruning with neuron pruning, the model retained only 1.39% of its original connectivity while maintaining 80.9% accuracy on CIFAR10-DVS.

While SpikeNM shows strong theoretical efficiency, future work will focus on physical benchmarking on specialized neuromorphic hardware and exploring adaptive layer-wise sparsity ratios to further optimize performance.

Summary updated

BibTeX
@misc{ye2025sparse,
  author = {Shuhan Ye and Yi Yu and Qixin Zhang and Chenqi Kong and Qiangqiang Wu and Xudong Jiang and Dacheng Tao},
  title = {{Sparse by Rule: Probability-Based N:M Pruning for Spiking Neural Networks}},
  year = {2025},
  eprint = {2511.12097},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.12097},
}
Figure