All models

spikezip_tf_vit

A vision Transformer converted into an equivalent spiking neural network with SpikeZIP-TF.

Spiking networks · 167 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 (29 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
171K
Operations
167
Framework
PyTorch
Recurrent
No
Published
2024
Cited by
42 (as of 17 November 2026)
Authors
Kang You, Zekai Xu, Chen Nie 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
m12139
Graph hash
1b0a5b8202b6bed35d450f541bc65016b1fbc61887d974464cb3e064acbc6478
Skeleton hash
40e8c4357e80918473b2dbb43207b91ed6387fab74f74c0939b7a2ad09e4b87a
Architecture hash
d219dd1213bc52f3a97bc385577e25ec5ccee1041af84a8bed9c7fb7fa4ef443
Diagram SHA-256
dba8ee2440e5da54bd457c34fdb05535c85fef20250ac214f4967c9a2ae652d6
TorchLens version
2.35.3
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.spikezip_tf_vit:build_spikezip_tf_vit: build({})

What it is

SpikeZIP-TF is a method for converting a trained Transformer into a spiking neural network (SNN) so that the two are exactly equivalent and no accuracy is lost in the conversion. Spiking networks pass discrete spikes between neurons instead of continuous activation values. The paper applies the method to vision by converting a quantized vision Transformer (ViT), and to language by converting Roberta.

The conversion begins by replacing activation functions so that only ReLUs are present, and quantization-aware training and the swap to spiking neurons follow. The obstacle for Transformers was that earlier conversion methods had not handled self-attention, softmax and layer normalization. SpikeZIP-TF supplies spiking versions of each: a spike-equivalent self-attention (SESA), Spike-Softmax and Spike-LayerNorm. It also introduces a neuron called ST-BIF+ to match the quantized function used in the Transformer.

The paper reports 83.82% accuracy on ImageNet and 93.79% on SST-2, both higher than the Transformer-based SNNs it compares against. For CIFAR10/100 and CIFAR10-DVS the source network in the paper is a pre-trained Vision Transformer-Small (ViT-S).

Key idea. SpikeZIP-TF converts a quantized Transformer into an equivalent spiking neural network by introducing spike-equivalent self-attention, Spike-Softmax and Spike-LayerNorm operators.

  • spikezip-tf
  • spikezip
  • spikezip transformer
  • spiking neural network
  • snn
  • ann-to-snn conversion
  • spiking transformer
  • spiking vit
  • image classification

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

Cite the paper

@misc{you2024spikeziptfconversionneedtransformerbased,
      title={SpikeZIP-TF: Conversion is All You Need for Transformer-based SNN}, 
      author={Kang You and Zekai Xu and Chen Nie and Zhijie Deng and Qinghai Guo and Xiang Wang and Zhezhi He},
      year={2024},
      eprint={2406.03470},
      archivePrefix={arXiv},
      primaryClass={cs.NE},
      url={https://arxiv.org/abs/2406.03470}, 
}