Organizations: Shenzhen Institute of Advanced Technology, Chinese Academy of Sciences, China · Pengcheng Laboratory, China · University of Chinese Academy of Sciences, China · Shenzhen Graduate School, Peking University, China · School of Computer Science, Peking University, China
Integer-valued leaky integrate-and-fire (I-LIF) neurons and spike firing approximation (SFA) reduce temporal training cost by representing spike trains as firing counts and normalized firing rates, respectively. However, applying spiking self-attention (SSA) directly to these compressed query, key, and value representations introduces cross-time interactions that are absent during spike-driven inference. We term this operator-level discrepancy Temporal Interaction Mismatch (TIM). We propose Parallel Time-Aligned Spiking Self-Attention (PT-SSA), which reconstructs consecutive virtual spike slices from either I-LIF counts or SFA firing rates, computes attention only between time-aligned slices in parallel, and sums the per-step outputs. To accommodate the reduced attention output scale under SFA, we further introduce Adaptive PT-SSA, which learns a positive per-block rescaling before the output SFA neuron to improve firing-level utilization. Experiments on CIFAR-10, CIFAR-100, and ImageNet-1K show that the proposed methods substantially reduce train--inference mismatch. On CIFAR-100 with I-LIF, PT-SSA reduces the mean Top-1 gap from 1.85 to 0.29 percentage points. On ImageNet-1K, Adaptive PT-SSA reduces the Top-1 gap from 27.78 to 0.06 percentage points and achieves 74.53% spike-driven Top-1 accuracy. A Triton-fused PT-SSA training kernel retains a 2.91× throughput advantage over recurrent LIF SSA.
Figures & tables
Figure 1: Temporal interaction mismatch in a two-step I-LIF example ( D=2 , s=1 ). (a) Multiplying compressed spike counts includes cross-time products and yields the highlighted value 4. (b) Summing same-step spike products yields 2 despite the same total spike counts.
Figure 2: PT-SSA within a spiking attention block. (a) Compact queries, keys, and values enter PT-SSA, followed by output rescaling and firing. (b) Reconstructed spike slices are grouped by virtual step, and their time-aligned attention outputs are summed over the virtual time-step dimension. Red spike symbols indicate I-LIF or SFA spiking neurons, and × indicates matrix multiplication. The illustrated SFA path uses s=D and a learned θl ; I-LIF uses s=1 and θl=1 .
Figure 3: Adaptive rescaling and gradient routing for SFA-based PT-SSA. (a) Forward rescaling uses a learned θl , while an identity STE passes the gradient from Ul to the attention output unchanged. (b) Quantized firing count versus unscaled attention output at D=4 for θl=1 and 0.2 ; these curves show rounded SFA responses rather than temporal IF threshold crossings. (c) Local input-gradient gain versus θl for ordinary ( 1/θl ) and decoupled ( 1 ) differentiation.
Dataset
Backbone
Representation
Attention path
Integer Top-1 (%) ↑
Spike-driven Top-1 (%) ↑
∣Δ∣ (pp) ↓
CIFAR-10
E-SpikeFormer-4-384
I-LIF count
SSA
97.26±0.06
96.85±0.33
0.41±0.27
I-LIF count
PT-SSA
97.20±0.07
96.95±0.11
0.25±0.04
SFA rate
SSA
97.08±0.19
91.50±0.00
5.58±0.19
SFA rate
Adaptive PT-SSA
97.23±0.03
97.23±0.09
0.05±0.01
CIFAR-100
E-SpikeFormer-4-384
I-LIF count
SSA
80.69±0.11
78.84±0.03
1.85±0.08
I-LIF count
PT-SSA
80.39±0.14
80.10±0.18
0.29±0.04
Table 1: Train–inference alignment for I-LIF counts and SFA firing rates at D=4 . Integer-valued and spike-driven results in each row come from the same checkpoint. The paired absolute Top-1 gap ∣Δ∣ is reported in percentage points and computed before rounding.
Neuron
Attention implementation
Peak memory (GiB) ↓
Forward (ms) ↓
Backward (ms) ↓
Throughput (sample/s) ↑
LIF
SSA
4.193
12.909
19.197
1993.4
I-LIF
SSA
0.679
4.099
6.348
6126.5
I-LIF
PT-SSA (Torch)
0.761
5.211
7.517
5028.3
I-LIF
PT-SSA (Triton)
0.666
4.522
6.518
5797.1
Table 2: Training efficiency on CIFAR-100 Spikingformer using one RTX 5090 ( B=64 , D=4 , AMP FP16). SSA uses Torch, while recurrent LIF neurons use the SpikingJelly CuPy backend. Timings are averaged over 50 synchronized iterations after 20 warmup iterations and include forward and backward computation; data loading, optimizer updates, and Triton compilation are excluded. Peak memory excludes optimizer state; bold and underlined values indicate the best and second-best results.
Figure 4: Operator-level and end-to-end train–inference alignment at D=4 (logarithmic horizontal axes; lower is better). (a) Relative L2 error against the aligned spike reference on CIFAR-100 (I-LIF) and ImageNet-1K (SFA). (b) Absolute Top-1 gap in percentage points on CIFAR-10 (C10), CIFAR-100 (C100), and ImageNet-1K (IN-1K).
Representation
Attention Impl.
D
Integer Top-1 (%) ↑
Spike-driven Top-1 (%) ↑
∣Δ∣ (pp) ↓
I-LIF count
SSA
1
77.31±0.42
77.31±0.42
0.00±0.00
2
79.88±0.16
79.26±0.04
0.62±0.12
4
80.69±0.11
78.84±0.03
1.85±0.08
8
80.90±0.14
76.57±0.39
4.34±0.53
PT-SSA
1
77.31±0.42
77.31±0.42
0.00±0.00
2
80.12±0.11
79.91±0.12
0.22±0.01
Table 3: CIFAR-100 accuracy and train–inference gap across virtual expansion lengths. Values are means ± sample standard deviations over two runs.
Figure 5: Mean absolute Top-1 train–inference gap versus virtual expansion length D on CIFAR-100. Panels (a) and (b) show I-LIF and SFA, respectively; their vertical axes report percentage points on the same symmetric-log scale with a linear region around zero.
Setting
θl (mean ± std)
Firing rate (%)
Entropy (bits) ↑
Integer Top-1 (%) ↑
Spike-driven Top-1 (%) ↑
∣Δ∣ (pp) ↓
Fixed unit
1.00±0.00
10.94
1.204
80.78±0.09
81.03±0.01
0.25±0.10
Fixed 1/D3
0.02±0.00
97.73
0.367
80.48±0.40
80.61±0.40
0.13±0.01
Adaptive (coupled)
0.21±0.02
16.67
1.487
81.05±0.46
81.46±0.18
0.42±0.28
Adaptive (decoupled)
0.20±0.03
17.97
1.519
82.35±0.42
82.42±0.46
0.07±0.04
Table 4: Adaptive-threshold and gradient-routing analysis for SFA-based PT-SSA on CIFAR-100 ( D=4 ). Top-1 and gap entries are means ± sample standard deviations over two runs. Firing rates and entropies are computed on the complete test set for each block and run, then averaged; θl statistics summarize four blocks and two runs.
Spiking neural networks process information through discrete, time-dependent neural events, aiming for efficient computation and biologically inspired learning.
Self-attention has become central to spiking vision transformers, yet its query-key scoring is still largely inherited from dense networks. Existing spiking variants either simplify dot product scoring or replace it with discrete operators, but spike timing, the native variable of a spiking network, does not directly define how tokens are related. We propose Lapis, a spiking attention mechanism that scores each token pair by the L1 distance between its query and key first-spike latency vectors under time-to-first-spike coding, and maps this distance to an affinity through a Laplacian kernel. The kernel's exponential decay matches the impulse response of a leaky integrate-and-fire membrane, so the accumulated latency difference determines the decay of a membrane trace, while row normalization reduces to a bit shift under power-of-two rounding. Scoring therefore needs only subtraction, absolute value, and accumulation, and removes all multiplication between query and key channels. Under a matched backbone and training schedule, Lapis reaches 96.56% top-1 accuracy on CIFAR-10, within 0.53 points of dot-product scoring. On ImageNet-1K, it reduces the estimated arithmetic energy of the attention path by 14.5x relative to dense dot-product attention. The deployed 6-bit model attains 83.25% top-1 accuracy at an estimated arithmetic energy of 3.28mJ per image.
Kaiwen Tang, Jiaqi Zheng, Zixuan Zhu +3
School of Computing, National University of Singapore · 2Sea AI Lab · 4Shanghai Advanced Research Institute, Chinese Academy of Sciences +2
Although spiking neural networks (SNNs) show promise in energy-efficient computing through event-driven computation and stateful temporal processing, their recurrent membrane dynamics render their training inherently sequential and inefficient for long sequences. Existing methods achieve full-sequence parallelism in SNNs through two main strategies: redesigning or approximating spiking dynamics to avoid reset-coupled temporal dependencies, or relying on iterative relaxed fixed-point solvers that suffer from excessive memory costs and iteration-dependent backward overhead. To address these limitations, we present FidLIF, a novel framework that reconciles the incremental update and hard-reset behavior of standard spiking LIF neurons with parallel forward propagation and BPTT-equivalent backward propagation. FidLIF iteratively recovers the full-sequence membrane-potential trajectory in parallel. By exploiting the lower bidiagonal structure induced by the local recurrence of LIF neurons, FidLIF formulates each forward trajectory correction and backward adjoint propagation as associative scans with an O(logT) temporal depth. This formulation also supports input-dependent neuronal parameters and allows the same neuron to perform full-sequence parallel training and incremental step-by-step inference at deployment. In our numerical convergence evaluation, FidLIF achieves a mean absolute error below 10−7 relative to the matched serial relaxed LIF dynamics, while yielding gradients numerically equivalent to exact BPTT. Our Triton implementation delivers favorable long-sequence latency and memory scaling, while achieving competitive performance on four sequential classification benchmarks. By reconciling parallel training with step-by-step execution, FidLIF enables high-fidelity spiking dynamics to benefit from parallel hardware without compromising incremental inference at deployment.
Kaixiang He, Yujie Wu
Department of Computing, The Hong Kong Polytechnic University
Continuous-time spiking neural networks (SNNs) provide an event-driven framework for temporal computation, computational neuroscience, and neuromorphic hardware. However, training deep continuous-time SNNs is severely constrained by the memory required for exact spike-time computation, which evaluates and retains candidate firing times over intervals determined by presynaptic spike ordering. Here we introduce a memory-efficient training framework based on differentiable spike-time discretization (DSTD) for leaky integrate-and-fire neurons with general membrane and synaptic time constants. DSTD maps irregular presynaptic spikes onto differentiable weighted events at fixed time points, replacing the input-dependent candidate dimension with M fixed time intervals while accurately approximating continuous-time membrane-potential dynamics. This reduces candidate-related activation memory from O(NoutNin) to O(NoutM) in the case of time-to-first-spike (TTFS) coding, where Nin and Nout denote the numbers of presynaptic and postsynaptic neurons, respectively. We further introduce synfire-chain-inspired temporal regularization that organizes layer-wise firing windows, mitigates dead-neuron failures, and enables pipeline-like processing. In dense LIF layers, DSTD reduced peak memory consumption by up to approximately 100-fold and training time by up to approximately 20-fold compared with exact spike-time computation. Together, these methods allowed us to train 9-layer convolutional SNNs on CIFAR-10 and 20-layer convolutional SNNs on Fashion-MNIST on a single GPU.
Yusuke Sakemi, Tomoya Takeuchi, Takeo Hosomi +1
Research Center for Mathematical Engineering, Chiba Institute of Technology, Narashino, Japan · International Research Center for Neurointelligence (WPI-IRCN), The University of Tokyo, Tokyo, Japan · NEC Corporation, Kawasaki, Japan