Efficient Monotonic Multihead Attention

Xutai Ma, Anna Y. Sun, Siqi Ouyang, Hirofumi Inaguma, Paden TomaselloarXiv 2023 · DOI

Introduction

Simultaneous translation—the process of translating speech in real-time before the speaker has finished their sentence—is a critical technology for global communication. However, it presents a significant technical challenge: balancing translation quality (BLEU) with latency (Average Lagging). Most modern systems rely on a "read-write" policy, where the model must decide at each step whether to wait for more audio input or generate a translated word.

The Challenges of Speech-to-Text Translation

While Monotonic Multihead Attention (MMA) has proven effective for text-to-text tasks, its application to speech often suffers from two primary issues:

  1. Numerical Instability: Previous formulations for estimating alignments involved divisions by small probabilities, leading to "vanishing alignments" and training failures.
  2. High Variance: Unlike discrete text tokens, continuous speech signals are noisy. This makes it difficult for models to determine the precise moment to trigger a translation, resulting in erratic timing.

The EMMA Framework

Efficient Monotonic Multihead Attention (EMMA) addresses these issues through three key technical innovations:

1. Numerically Stable Alignment

The authors reformulate alignment estimation ($\alpha$) into a matrix multiplication format. This closed-form solution eliminates the denominator found in previous versions, removing the risk of division-by-zero or numerical overflow when dealing with small probabilities.

2. Alignment Shaping and Variance Reduction

To handle the "fuzzy" nature of speech, EMMA introduces a variance regularization loss. This loss penalizes the model when alignment estimations are overly spread out, forcing the model to be more decisive about its read-write actions.

3. Enhanced Policy Network and Fine-tuning

The policy network is upgraded with multi-layer feedforward projections and a "temperature" factor to encourage binary-like decisions. Furthermore, EMMA leverages pre-trained offline models (e.g., SeamlessM4T, wav2vec 2.0). By freezing the encoder and only training the decoder and policy network, the model gains simultaneous capabilities without the cost of training from scratch.

Experimental Results

The researchers evaluated EMMA on benchmarks including mTedX (Spanish-to-English), MuST-C (English-to-Spanish), and the multilingual FLEURS dataset.

Performance comparison of EMMA vs. Wait-K on Spanish-English and English-Spanish tasks.

As shown in the figure above, EMMA consistently outperforms the standard "Wait-k" rule-based policy across all latency levels. In bilingual tests, EMMA maintains significantly higher BLEU scores for the same Average Lagging (AL) values. For example, at an AL of approximately 1.5 seconds, EMMA provides a substantial quality boost over its competitors.

Alignment visualization showing EMMA's learned monotonic path between speech input and text output.

Visual analysis of the expected alignments confirms that EMMA learns a clean, monotonic diagonal path. This indicates the model has successfully learned to track the progression of speech in real-time, committing to translation paths rather than hedging across multiple timestamps.

Conclusion

EMMA demonstrates that high-quality simultaneous translation can be achieved by refining the mathematical stability of attention mechanisms and encouraging decisiveness in the model's policy. By adapting existing foundation models, EMMA achieves state-of-the-art results with high efficiency. Future work will look toward speech-to-speech translation and more computationally efficient incremental encoding strategies.

Summary updated

BibTeX
@misc{ma2023efficient,
  author = {Xutai Ma and Anna Y. Sun and Siqi Ouyang and Hirofumi Inaguma and Paden Tomasello},
  title = {{Efficient Monotonic Multihead Attention}},
  year = {2023},
  eprint = {2312.04515},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.04515},
}
Figure