Accurate, fast, cheap: Choose three. Replacing Multi-Head-Attention with Bidirectional Recurrent Attention for Long-Form ASR

Martin Ratajczak, Jean-Philippe Robichaud, Jennifer Drexler FoxInterspeech 2025

TL;DR

This paper tackles the challenge of efficient long-form Automatic Speech Recognition (ASR) by replacing the computationally expensive Multi-Head Attention (MHA) in Transformer models with Recurrent Attention (RA) layers. They demonstrate that bidirectional RA layers can match MHA's accuracy while offering significant speedups, and introduce "Direction Dropout" (DirDrop) to enable flexible inference modes and further improve the accuracy-throughput trade-off.

What Problem Does This Paper Address?

Long-form ASR, dealing with audio lasting minutes or even hours, is crucial for applications like meeting transcription or lecture summarization. Traditional Transformer-based ASR models, while powerful, struggle with this due to the quadratic complexity of their Multi-Head Attention (MHA) mechanism with respect to sequence length. This means processing longer audio becomes prohibitively slow and memory-intensive. While chunking audio (e.g., processing 30-second segments) is a workaround, it sacrifices valuable global context. Recent research has explored Recurrent Attention (RA) layers that offer linear complexity, but their unidirectional nature means they only process past information, unlike MHA's bidirectional view. This paper aims to bridge this gap by investigating bidirectional RA layers for long-form ASR, seeking to achieve both high accuracy and efficiency.

Methods

The core of this work lies in replacing the MHA layers within the encoder of a Conformer-Transducer ASR architecture with RA layers. Specifically, they experiment with two types of RA layers: Mamba-2 (a state-space model variant) and RWKV (a recurrent neural network architecture).

Key methodological contributions include:

  • Bidirectional RA: To overcome the unidirectional limitation of RA layers, they implement a bidirectional approach. This involves processing the input sequence in both forward and reverse directions and then averaging the results, mimicking MHA's ability to consider future context.
  • Long-Form Training: They employ a two-stage training strategy. First, standard training on short utterances, followed by a "long-form training" phase where utterances are concatenated. To address memory limitations during this phase, they further introduce a "fine-tuning only attention blocks" approach for long-form training.
  • Direction Dropout (DirDrop): This novel regularization technique randomly drops one of the RA directions (forward or backward) during training with a certain probability. This allows a single model to be trained for both bidirectional and unidirectional inference, offering flexibility and control over the accuracy-throughput trade-off.
  • Alternating Direction Decoding: Enabled by DirDrop, this decoding strategy alternates between processing directions within layers, aiming to capture bidirectional context at a lower computational cost than full bidirectional processing.

Datasets

  • GigaSpeech XL: This dataset, containing 10k hours of audio, is used for training and evaluation.
  • Short-form (SF): Segments with an average length of 4.4 seconds.
  • Long-form (LF): Segments with an average length of 11.4 seconds.
  • Long-form Fine-tuning (LFXL): Segments with an average length of 78.6 seconds.

Key Insights and Ideas

  • Bidirectional RA is Competitive: Bidirectional RA layers (specifically RWKV) can achieve accuracy comparable to MHA for both short and long-form ASR.
  • RA Generalizes Better: RWKV-based models show superior generalization to longer utterances compared to MHA, even when trained on shorter segments. This suggests RA's recurrent nature inherently aids in handling varying sequence lengths.
  • DirDrop Unlocks Flexibility: Direction Dropout is a game-changer, allowing a single model to perform well in both unidirectional (streaming) and bidirectional (offline) inference modes. This is a significant step towards unified models for different ASR scenarios.
  • Alternating Decoding is Efficient: The alternating direction decoding strategy, powered by DirDrop, offers a compelling balance between accuracy and throughput, achieving near-bidirectional accuracy at a significantly reduced computational cost. It highlights that processing both directions doesn't necessarily need to happen within every layer.

Key Results

  • Throughput Gains: Bidirectional RWKV-Conformer models achieve significantly higher throughput (e.g., 26 MPS) compared to MHA (7 MPS) and LCA+GT (18 MPS) at similar accuracy levels after long-form fine-tuning. Unidirectional RWKV also offers substantial speedups (31 MPS) with comparable accuracy to LCA+GT.
  • Accuracy Improvements: Long-form training and fine-tuning lead to better accuracy for all models. DirDrop-trained models achieve accuracy in unidirectional inference that is comparable to models trained solely unidirectionally, avoiding the catastrophic performance drop seen in standard bidirectional models.
  • Speed-Accuracy Trade-off: DirDrop allows for fine-grained control over this trade-off. For instance, using DirDrop-Both with alternating direction decoding and a few bidirectional layers, they achieve near-bidirectional accuracy (10.9/10.9 WER) at a higher throughput (29 MPS) than full bidirectional decoding (26 MPS).

Limitations and Future Work

  • Limitations: While bidirectional RA matches MHA accuracy, the paper notes that MHA still holds a slight edge in some short-form scenarios. The throughput advantage of RA is more pronounced on GPUs; CPU throughput is significantly lower, though RA still remains more efficient than LCA.
  • Future Work: The authors propose several exciting avenues:
  • Training long-form models directly with DirDrop and alternating direction decoding.
  • Extending RWKV to the transducer decoder for cross-layer state passing.
  • Applying RA layers to streaming ASR, where speed and long-range context are paramount.

Summary updated

BibTeX
@inproceedings{ratajczak2025accurate,
  author = {Martin Ratajczak and Jean-Philippe Robichaud and Jennifer Drexler Fox},
  title = {{Accurate, fast, cheap: Choose three. Replacing Multi-Head-Attention with Bidirectional Recurrent Attention for Long-Form ASR}},
  booktitle = {Interspeech},
  year = {2025},
}
Figure