Spike Driven Self Attention for Energy Efficient Transformers

178 concepts98 papers1 proposal

Standard Transformers rely on self-attention to capture long-range dependencies across sequences. However, calculating the traditional attention matrix—expressed as $\text{Softmax}(QK^T)V$—requires dense floating-point matrix multiplications (Multiply-Accumulate or MAC operations) and scales quadratically ($\mathcal{O}(N^2)$) with the sequence length $N$. This computational overhead makes deployment on energy-constrained edge devices highly impractical.

To solve this, a new paradigm bridges the representational power of Transformers with the extreme energy efficiency of Spiking Neural Networks (SNNs). By replacing continuous, real-valued tensors with sparse, binary spike trains (consisting only of 0s and 1s), spike-driven self-attention eliminates power-hungry multiplications entirely, transforming the attention mechanism into a series of sparse, conditional additions.


From Multiplications to Additions: The Power of Binary Gating

In a standard attention layer, computing the dot product between Query ($Q$) and Key ($K$) matrices requires multiplying continuous floating-point values. Spike-driven attention fundamentally alters this operation by ensuring that at least one of the operands consists of discrete binary spikes.

As pioneered by Zhaokun Zhou et al. in Spikformer: When Spiking Neural Network Meets Transformer, when $Q$, $K$, and $V$ are represented as binary spike tensors, matrix multiplications degrade into simple logical operations and additions.

To understand why this works intuitively, consider the multiplication of a binary Query matrix $Q \in \{0, 1\}^{N \times D}$ with a real-valued Key matrix $K^T$:

$$\text{Attention Score}_{i,j} = \sum_{k} Q_{i,k} \cdot K^T_{k,j}$$

Because $Q_{i,k}$ can only be $0$ or $1$, hardware does not need a multiplier circuit:

  • If $Q_{i,k} = 0$, the operation is skipped entirely.
  • If $Q_{i,k} = 1$, the corresponding value from $K^T$ is simply accumulated.

As highlighted by Yufei Guo et al. in Spiking Transformer: Introducing Accurate Addition-Only Spiking Self-Attention for Transformer, this asymmetric design allows neuromorphic hardware to substitute energy-intensive floating-point multipliers with conditional accumulators that process real-valued weights based on binary spike indices. By leveraging the inherent sparsity of spikes, the network performs sparse additions (ACs) instead of dense MACs, slashing energy consumption while preserving high precision.


Bypassing the Softmax Bottleneck

The traditional Softmax function is another major roadblock for neuromorphic hardware because it requires computing non-linear exponentials and divisions. In spike-driven architectures, Softmax can be completely removed or substituted with hardware-friendly alternatives.

Zhaokun Zhou et al. demonstrated that Softmax is largely redundant when inputs are non-negative binary spikes, as the spike distributions naturally provide the non-negativity and sparsity that Softmax typically enforces. However, completely removing Softmax can sometimes lead to magnitude fluctuations or feature vanishing (where zero-valued queries mask relevant information). To stabilize training without sacrificing multiplication-free execution, researchers have introduced several alternative mechanisms:


Achieving Linear Complexity via Neural Dynamics

Standard attention suffers from quadratic complexity $\mathcal{O}(N^2)$ because it explicitly computes an $N \times N$ attention map matching every token to every other token. Spike-driven attention bypasses this bottleneck to achieve linear complexity $\mathcal{O}(N)$ in both token and channel dimensions by changing the mathematical order of operations.

In Spike-driven Transformer, Man Yao et al. demonstrated that by utilizing spiking neurons as kernel functions, the attention mechanism can compute $K^TV$ before interacting with $Q$. Because the intermediate matrix $K^TV$ scales with the feature dimension $D \times D$ rather than the token count $N \times N$, the subsequent multiplication with $Q$ scales linearly ($\mathcal{O}(N)$) with the number of tokens. This approach uses element-wise Hadamard products and column-wise summations to gate information, a property also leveraged by Wei Hua et al. in MSVIT: Improving Spiking Vision Transformer Using Multi-scale Attention Fusion to efficiently process high-resolution inputs.

Standard Attention (Quadratic):
Q (N×D) × Kᵀ (D×N)  --->  Attention Map (N×N) × V (N×D)  --->  Output (N×D)

Spike-Driven Linear Attention:
Kᵀ (D×N) × V (N×D)  --->  Persistent State (D×D) × Q (N×D) --->  Output (N×D)

Taking this a step further, Dehao Zhang et al. reformulated this mechanism as a dynamical system in Neural Dynamics Self-Attention for Spiking Transformers. Instead of treating attention as a static matrix operation, the computation is mapped to a charge-fire-reset process within a spiking neuron's membrane potential. The accumulated key-value pairs ($K^TV$) serve as a persistent internal state over time.

By treating attention as an evolving state variable rather than a massive spatial matrix, spike-driven attention seamlessly maps the mathematical abstraction of global context onto the temporal physics of neuromorphic hardware.

Key Foundational Work

Spikformer: When Spiking Neural Network Meets Transformer (2023) — contributed 3 concept elements to this direction.
Spikingformer: A Key Foundation Model for Spiking Neural Networks (2023) — contributed 2 concept elements to this direction.
Spikformer: When Spiking Neural Network Meets Transformer (2022) — contributed 2 concept elements to this direction.
History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 101 papers
  2. Version 1 · 2026-10-04 · 164 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_multiplication_free_attention_2bc14a71,
  title = {multiplication-free attention},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/multiplication-free-attention/rdr_2bc14a71195d441b99f02778af24845a},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-25},
}

This exact version (version 2, frozen text):

@misc{lacuna_multiplication_free_attention_2bc14a71_v2,
  title = {multiplication-free attention},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/multiplication-free-attention/rdr_2bc14a71195d441b99f02778af24845a/v/2},
  note = {Version 2, frozen 2026-10-04. Accessed 2026-11-25},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake