SummaryMixing: A Linear-Complexity Alternative to Self-Attention for Speech Recognition and Understanding

Titouan Parcollet, Rogier van Dalen, Shucong Zhang, Sourav Bhattacharya · Submission to ICLR 2024 · Rejected

SummaryMixing is a novel, linear-complexity alternative to self-attention designed specifically for speech processing. By replacing the computationally expensive quadratic operations of standard Transformers with a simple global mean "summary" of the utterance, it reduces memory usage by half and speeds up training by 28%—all while matching or exceeding state-of-the-art accuracy across speech recognition and understanding tasks.

The Problem: The Quadratic Cost of Self-Attention

Modern speech systems, such as the Conformer or Branchformer, rely heavily on Multi-Head Self-Attention (MHSA). While powerful, MHSA has a major flaw: its computational cost grows quadratically ($O(T^2)$) with the length of the input sequence ($T$). Because speech signals are sampled at high frequencies, a single sentence can result in thousands of frames.

This quadratic scaling leads to two main bottlenecks:

  1. Memory: Processing long audio files requires massive amounts of GPU VRAM.
  2. Speed: Training and inference slow down significantly as audio length increases.

While "efficient" attention variants exist (like low-rank or sparse attention), they often struggle to maintain the same accuracy as standard MHSA in speech tasks. The authors set out to find a linear-time ($O(T)$) method that doesn't sacrifice performance.

Methods: Simplifying Information Sharing

The authors introduce SummaryMixing, a method that fundamentally simplifies how information is shared across time steps.

Comparison of standard Multi-Head Self-Attention (left) and the proposed SummaryMixing architecture (right).

In a standard self-attention layer, every frame "looks" at every other frame to calculate a weighted average. SummaryMixing replaces this complex interaction with a two-step process:

  1. Summarization: Every input frame $x_t$ is transformed into a "summary contribution" vector. These vectors are then averaged across the entire utterance to create a single global vector, $\bar{s}$, representing the "gist" of the whole audio.
  2. Mixing: This global summary $\bar{s}$ is passed back to every individual time step and combined with local, frame-specific features.

Because this involves a simple mean and point-wise operations, the complexity is linear—it scales 1:1 with the length of the audio. The authors successfully integrated this block into two leading architectures, the Conformer and the Branchformer, replacing their standard MHSA components.

Key Insights

  • Fine-grained attention isn't always necessary: The core insight is that for acoustic modeling, the network doesn't necessarily need to know exactly how frame A relates to frame B. Knowing the global context (the "summary") is often enough to help the model understand the local signal.
  • Upper layers are simpler than we thought: The authors build on previous observations that in trained Transformers, attention weights often converge to a simple average. SummaryMixing essentially hard-codes this efficiency from the start.

Results: Faster, Lighter, and More Accurate

The researchers evaluated SummaryMixing across a wide variety of languages and tasks, including Automatic Speech Recognition (ASR) on LibriSpeech and CommonVoice, Spoken Language Understanding (SLU), and Keyword Spotting (KWS).

Scaling comparison showing SummaryMixing's linear efficiency in training time, decoding speed, and VRAM usage compared to MHSA's quadratic growth.
  • Efficiency Gains: On a Conformer model, SummaryMixing reduced peak VRAM usage from 46 GB to 21 GB and made training 28% faster. Furthermore, decoding speed remains nearly constant regardless of utterance length, making it ideal for long-form transcription.
  • Superior Accuracy: On LibriSpeech, the SummaryMixing Conformer achieved a Word Error Rate (WER) of 2.1% (test-clean) and 5.1% (test-other), outperforming the standard MHSA Conformer (2.3% / 5.4%).
  • Cross-Language Success: Across five different ASR datasets, SummaryMixing models outperformed the standard Branchformer by an average of 0.5% absolute WER.
  • Versatility: It matched or slightly improved performance on SLU and KWS tasks, proving it is a viable general-purpose speech encoder.

Limitations and Future Work

While SummaryMixing works brilliantly in the encoder (which processes the audio), the authors found that replacing cross-attention in the decoder (which generates text) led to performance drops. The decoder still seems to benefit from the fine-grained mapping between specific audio frames and specific words.

Additionally, the current implementation calculates a mean over the entire utterance. This is perfect for offline processing but would need to be adapted (e.g., using a sliding window or causal summary) for real-time, low-latency streaming applications. Finally, while it excels at speech, it remains to be seen if such a simple global summary is sufficient for tasks requiring extremely precise long-distance dependencies, like complex document reasoning in NLP.

Summary updated

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