All models

nemo_squeezeformer_encoder

Conformer rebuilt with a temporal U-Net and plain transformer blocks to spend less attention on redundant frames.

Audio and speech · 1,655 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 (100 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
125M
Operations
1,655
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2022
Cited by
105 (as of 18 October 2026)
Authors
Sehoon Kim, Amir Gholami, Albert Shaw and others
License
Apache-2.0
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
m7622
Graph hash
9f13baa8745ac20842f23e86a6fd2f10b5fab0a5fccd11f9291bbaed74b3d085
Skeleton hash
69b4ac0007cded5f21df709fc41c9ba3df8d61610821a819eb9811c7051e2a71
Architecture hash
b9f1714656f82f32199afd4f93799932e4542bf7f787d6d2f387893aedaa07b2
Diagram SHA-256
3ed855a09daead627eca28857161d4b4062558e1ad16b8f920cb1c7a756892cd
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

Squeezeformer is a hybrid attention-convolution encoder for automatic speech recognition, arrived at by re-examining the design choices of Conformer. Conformer had become the de facto backbone for speech tasks thanks to a hybrid attention-convolution architecture that captures both local and global features.

At the macro level, Squeezeformer adopts a Temporal U-Net structure, which reduces the cost of multi-head attention on long sequences. The motivation was redundancy: neighbouring speech frames at the top layer had an average cosine similarity of 95%, and frames 4 apart still exceeded 80%. So the sample rate is held at 40ms up to the 7th block and then subsampled to 80ms. The pooling layer is a depthwise separable convolution with stride 2 and kernel size 3, which cuts attention complexity by 4× and reduces feature redundancy. Downsampling alone, though, led to unstable and diverging training. The fix is an upsampling block at the end that adds the 40ms and 80ms streams through a skip connection to restore a 40ms rate. The block itself is simplified too: instead of Conformer's Macaron structure, each multi-head attention or convolution module is directly followed by a single feed-forward module.

At the micro level, activation unification replaces the GLU activations with Swish throughout the model. Redundant pre-Layer Normalization is replaced by a learned scaling that can be merged into the next linear layer, so it costs nothing at inference. Removing LayerNorm naively did not work: without the learned scaling, training failed to converge. The first subsampling block also gets a depthwise separable convolution, since that block alone accounted for up to 28% of FLOPs in Conformer-CTC-M.

Squeezeformer reports 7.5%, 6.5% and 6.0% word-error-rate on LibriSpeech test-other without external language models, 3.1%, 1.4% and 0.6% better than Conformer-CTC at the same FLOPs. The authors' repository notes that Squeezeformer is also supported in NVIDIA's NeMo library, with training recipes and scripts. The member captured here is the NeMo port's encoder, from the Squeezeformer-CTC-BPE config with 18 layers and d_model 512. That config's own table lists this d_model 512, 18-layer, 8-head shape as the Medium-Large variant, with time_reduce_idx 8. One quirk of the NeMo recipe: it adds one extra layer to the medium and large variants, relative to the paper, to compensate for replacing the LSTM decoder with a linear one.

Key idea. Squeezeformer's Temporal U-Net halves the sampling rate in the middle of the network and recovers it at the end, cutting attention cost while beating Conformer-CTC at equal FLOPs.

  • squeezeformer
  • squeezeformer-ctc
  • squeezeformer encoder
  • speech recognition
  • asr
  • conformer
  • temporal u-net
  • nemo
  • librispeech
  • efficient transformer

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

Cite the paper

@misc{kim2022squeezeformerefficienttransformerautomatic,
      title={Squeezeformer: An Efficient Transformer for Automatic Speech Recognition}, 
      author={Sehoon Kim and Amir Gholami and Albert Shaw and Nicholas Lee and Karttikeya Mangalam and Jitendra Malik and Michael W. Mahoney and Kurt Keutzer},
      year={2022},
      eprint={2206.00888},
      archivePrefix={arXiv},
      primaryClass={eess.AS},
      url={https://arxiv.org/abs/2206.00888}, 
}