Sumformer: A Linear-Complexity Alternative to Self-Attention for Speech Recognition

Titouan Parcollet, Rogier van Dalen, Shucong Zhang, Sourav Bhattacharya · DOI

Introduction

Modern Automatic Speech Recognition (ASR) systems predominantly rely on Multi-Head Self-Attention (MHSA) to model long-range dependencies. However, MHSA suffers from a "quadratic bottleneck": processing a sequence of length $T$ requires $O(T^2)$ operations. In speech processing, where high-frequency audio signals result in thousands of tokens per utterance, this computational cost becomes prohibitive for long-form audio and resource-constrained hardware.

SummaryMixing is proposed as a novel, linear-time alternative to self-attention. By replacing expensive pairwise "token mixing" with a simple global average of an utterance, SummaryMixing achieves competitive accuracy while significantly reducing memory overhead and training time.

The SummaryMixing Architecture

The core innovation of SummaryMixing is the simplification of frame interactions. Instead of calculating a full attention matrix, the block processes each time step $t$ through two parallel paths:

  1. Local Path: A function $f(x_t)$ extracts features specific to the current frame.
  2. Summary Path: A function $s(x_t)$ generates a contribution to the global context.
  3. Global Averaging: All contributions from the summary path are averaged across the entire utterance length $T$ to produce a single global summary vector $\bar{s}$.
  4. Integration: This global vector $\bar{s}$ is concatenated with the local features $f(x_t)$ and passed through a final linear layer $c$ to produce the output $h_t$.
Comparison between Multi-Head Self-Attention (left) and the proposed SummaryMixing (right).

Because the interaction between time steps is reduced to a simple average, the computational complexity is reduced from $O(T^2)$ to $O(T)$. This block can be seamlessly integrated into state-of-the-art architectures like the Conformer and Branchformer by replacing their standard MHSA layers.

Experimental Evaluation

The researchers evaluated SummaryMixing across a wide array of tasks, including English ASR (LibriSpeech, Ted-Lium 2), multilingual ASR (CommonVoice, AISHELL-1), Spoken Language Understanding (SLURP), and Keyword Spotting (Google Speech Commands).

Performance and Efficiency

The empirical results demonstrate that fine-grained pairwise attention is often unnecessary for acoustic modeling. A global "gist" of the utterance is frequently sufficient to provide context for local frame-level decisions.

Efficiency metrics comparing SummaryMixing against MHSA and other baselines across different utterance lengths.

Key findings include:

  • Accuracy: On LibriSpeech, a SummaryMixing-based Conformer achieved a 2.1% Word Error Rate (WER) on the test-clean set, outperforming the standard MHSA Conformer (2.3%).
  • Memory Efficiency: For a 100-second audio clip, standard MHSA training requires approximately 52GB of VRAM. In contrast, SummaryMixing requires only 11.6GB—a reduction of over 75%.
  • Training Speed: Training throughput increased by up to 28% compared to MHSA-based models.
  • Decoding Stability: Unlike MHSA, where the Real-Time Factor (RTF) typically increases with utterance length, SummaryMixing maintains a constant RTF, making it highly suitable for long-form transcription.

Discussion and Future Work

While SummaryMixing excels in the encoder for acoustic modeling, its application in the decoder (text generation) remains a challenge. Since text sequences are generally much shorter than audio sequences, the computational gains in the decoder are less pronounced.

Furthermore, the current "global" mean requires the entire utterance to be available, which poses a challenge for real-time streaming ASR. Future research may explore adapting the summary mechanism into a moving average or chunk-based approach to support low-latency applications.

Conclusion

SummaryMixing provides a robust, linear-complexity alternative to self-attention for speech recognition. By leveraging global averaging instead of quadratic pairwise comparisons, it enables the training and deployment of high-performance ASR models on significantly longer sequences and more modest hardware without sacrificing accuracy.

Summary updated

BibTeX
@misc{parcollet2023sumformer,
  author = {Titouan Parcollet and Rogier van Dalen and Shucong Zhang and Sourav Bhattacharya},
  title = {{Sumformer: A Linear-Complexity Alternative to Self-Attention for Speech Recognition}},
  year = {2023},
  eprint = {2307.07421},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.07421},
}
Figure