English

Closing the Theory-Practice Gap in Spiking Transformers via Effective Dimension

Machine Learning 2026-04-20 v1 Artificial Intelligence

Abstract

Spiking transformers achieve competitive accuracy with conventional transformers while offering 3838-57×57\times energy efficiency on neuromorphic hardware, yet no theoretical framework guides their design. This paper establishes the first comprehensive expressivity theory for spiking self-attention. We prove that spiking attention with Leaky Integrate-and-Fire neurons is a universal approximator of continuous permutation-equivariant functions, providing explicit spike circuit constructions including a novel lateral inhibition network for softmax normalization with proven O(1/T)O(1/\sqrt{T}) convergence. We derive tight spike-count lower bounds via rate-distortion theory: ε\varepsilon-approximation requires Ω(Lf2nd/ε2)\Omega(L_f^2 nd/\varepsilon^2) spikes, with rigorous information-theoretic derivation. Our key insight is input-dependent bounds using measured effective dimensions (deff=47d_{\text{eff}}=47--8989 for CIFAR/ImageNet), explaining why T=4T=4 timesteps suffice despite worst-case T10,000T \geq 10{,}000 predictions. We provide concrete design rules with calibrated constants (C=2.3C=2.3, 95\% CI: [1.9,2.7][1.9, 2.7]). Experiments on Spikformer, QKFormer, and SpikingResformer across vision and language benchmarks validate predictions with R2=0.97R^2=0.97 (p<0.001p<0.001). Our framework provides the first principled foundation for neuromorphic transformer design.

Keywords

Cite

@article{arxiv.2604.15769,
  title  = {Closing the Theory-Practice Gap in Spiking Transformers via Effective Dimension},
  author = {Dongxin Guo and Jikun Wu and Siu Ming Yiu},
  journal= {arXiv preprint arXiv:2604.15769},
  year   = {2026}
}

Comments

6 pages, 3 figures, 7 tables

R2 v1 2026-07-01T12:13:55.935Z