All models

SpikeLM encoder

A BERT-base encoder rebuilt as a spiking neural network with bidirectional, elastic-amplitude spikes.

Spiking networks · 7,202 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

This diagram has 7,202 operations (32 KB) and is drawn when you ask.

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
110.1M
Operations
7,202
Framework
PyTorch
Recurrent
No
Published
ICML 2024 (PMLR 235)
Cited by
4 (as of 28 October 2026)
Authors
Xingrun Xing, Zheng Zhang, Ziyi Ni 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
m20566
Graph hash
066058c900a59fa4005d45113b32b5b9515217364d13b28b246999de6ce48810
Skeleton hash
904eb2c7c88e3e6228a00e6e4744c639af5c7893f07770ecfda95ac3c6e966e4
Architecture hash
bc117e0f322e546442df6d742cf45a73fe5938942a640409478ad0b08ad54446
Diagram SHA-256
1a73a8f7519aeaecf73d34ada6a1edd86fb4a3707e930c66d9331b29623b3528
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

What it is

SpikeLM is a language model built from spiking neural networks (SNNs), the brain-inspired networks whose binary spikes give event-driven sparsity. Its paper argues that the binary spikes of existing SNNs fail to encode adequate semantic information, which makes it hard for them to generalize. The paper describes SpikeLM as the first fully spiking mechanism for general language tasks, covering both discriminative and generative ones.

In place of spikes with levels {0, 1}, SpikeLM uses bidirectional spikes with ternary levels {−1, 0, 1}, considering both positive and negative membrane potentials. It adds elastic amplitude and elastic frequency encoding while keeping what the paper calls the addition nature of SNNs. Spike frequency is encoded according to the input distribution, which gives a controllable firing rate for trading performance against energy.

The paper builds SpikeLM on BERT for discriminative tasks and on BART for generative ones. The model on this page is the BERT version, which the repository pretrains on Wikipedia and BookCorpus before finetuning on GLUE. For comparison, the paper notes that an earlier spiking model, SpikeBERT, drops to 59.7% on GLUE. The repository adds that SpikeLLM, spiking large language models with 7 to 70 billion parameters, follows SpikeLM.

Key idea. SpikeLM makes language models fully spike-driven by replacing binary spikes with bidirectional spikes of elastic amplitude and frequency.

  • spikelm
  • spikelm encoder
  • spikelm-bert
  • spiking neural network
  • snn
  • spiking language model
  • spike-driven language modeling
  • elastic bi-spiking
  • bert

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

Cite the paper

@misc{xing2024spikelmgeneralspikedrivenlanguage,
      title={SpikeLM: Towards General Spike-Driven Language Modeling via Elastic Bi-Spiking Mechanisms}, 
      author={Xingrun Xing and Zheng Zhang and Ziyi Ni and Shitao Xiao and Yiming Ju and Siqi Fan and Yequan Wang and Jiajun Zhang and Guoqi Li},
      year={2024},
      eprint={2406.03287},
      archivePrefix={arXiv},
      primaryClass={cs.NE},
      url={https://arxiv.org/abs/2406.03287}, 
}