All models

snn_vit_saccadic

A spiking vision transformer whose saccade-inspired attention runs in linear time.

Spiking networks · 338 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (16 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
79.6K
Operations
338
Framework
PyTorch
Recurrent
No
Published
2025
Cited by
51 (as of 17 November 2026)
Authors
Shuai Wang, Malu Zhang, Dehao Zhang and others
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m12133
Graph hash
7d47bf566d7e306da816f5a6e6f1144dea34f45546327944205e826cac9c880b
Skeleton hash
2e70868d993be4b4b8d772c9bc16992cf58bd2bc38f280b10a7381f1b7f88c9e
Architecture hash
cbebd2ca53a599c65e98862f617503e4a6634e1b53148e73603f30e4707fd9ed
Diagram SHA-256
0958be796275a23105b8cb2c48dac4fb3eeb7a14884eb74bb011a3a732c47615
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

menagerie.classics.snn_vit_saccadic:build_snn_vit_saccadic: build({})

What it is

SNN-ViT is a vision transformer whose attention runs on spikes, aimed at edge devices where a standard transformer's energy budget is out of reach. The paper starts from a diagnosis: ordinary self-attention is mismatched to spike trains, which weakens its spatial relevance and leaves its temporal interactions limited. Spatially, the trouble is that binary, sparse spikes give queries and keys very different magnitudes, so a dot product no longer measures how related they are.

The answer is Saccadic Spike Self-Attention, which takes its cue from how biological vision jumps between parts of a scene rather than taking everything in at once. Instead of a dot product it scores query-key relevance with a cross-entropy between their spike distributions, which does not care about magnitude. Over time, a saccadic interaction module attends to only a selected subset of patches at each timestep and builds up the whole scene across timesteps. That module lives in a plug-and-play saccadic spiking neuron whose learnable lower-triangular matrix weights each timestep's contribution, sidestepping the forgetting caused by the reset and decay of ordinary leaky neurons. A second version, SSSA-V2, folds the key-side term into the neuron's threshold so the whole attention becomes linear in cost and fully spike-driven.

The network itself is a pyramid of GL-SPS embedding blocks, which mix standard and dilated convolutions to gather multi-scale context, followed by SSSA-based transformer blocks. The architecture adopts the linear SSSA-V2 form for its attention and ends in global average pooling and a classification head. It is evaluated on CIFAR10, CIFAR100, ImageNet and the event-camera dataset CIFAR10-DVS, and as a YOLO-v3 backbone on two remote-sensing detection sets. In the CIFAR100 ablation, swapping in SSSA alone is worth about 2.65 points over a Spikformer baseline. Replacing both SSSA and GL-SPS together brings about 3.15 points.

Key idea. A spike self-attention that measures query-key relevance from spike distributions and attends to a saccade-like subset of patches per timestep, giving a spiking vision transformer with linear complexity.

  • SNN-ViT
  • Spiking Vision Transformer
  • Saccadic Spike Self-Attention
  • SSSA
  • SSSA-V2
  • GL-SPS
  • spiking neural network
  • image classification
  • CIFAR
  • ImageNet

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{wang2025spikingvisiontransformersaccadic,
      title={Spiking Vision Transformer with Saccadic Attention}, 
      author={Shuai Wang and Malu Zhang and Dehao Zhang and Ammar Belatreche and Yichen Xiao and Yu Liang and Yimeng Shan and Qian Sun and Enqi Zhang and Yang Yang},
      year={2025},
      eprint={2502.12677},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2502.12677}, 
}