In the standard Transformer or RNN-based encoder-decoder architecture, the attention mechanism is designed to be "global." It can look at any part of the input sequence at any time to generate the next token. While this flexibility is a superpower for machine translation—where a verb at the end of a German sentence might correspond to the beginning of an English one—it is a liability for speech.
Speech is inherently linear. When we speak, the audio signal and the corresponding text move forward together in time. Because standard attention lacks this "arrow of time," models often suffer from alignment failures: they skip words, repeat phrases indefinitely, or hallucinate "echographic" transcriptions where the model gets stuck in a loop Phillip Keung.
To solve this, researchers have developed mechanisms to bake monotonicity—the constraint that the model must only move forward through the input—directly into the architecture.
The Problem of Unconstrained Attention
In tasks like speech recognition (ASR) and speech synthesis (TTS), the input and output sequences are monotonically aligned. However, as Jan Chorowski and Dzmitry Bahdanau noted, standard soft attention does not inherently know where it is in the sequence.
Without a sense of linear progression, a model might attend to the same audio frames repeatedly. This leads to "hallucinations" in ASR Shinji Watanabe or high character error rates in TTS Joun Yeop Lee. The challenge is to restrict the model's focus to a local, moving window without losing the benefits of end-to-end learning.
Location-Awareness and Relative Positioning
The first step toward fixing alignment is giving the model a "memory" of where it last looked. Jan Chorowski introduced location-aware attention, which uses convolutional features to track previous attention weights. By knowing the previous focus point, the model can more easily learn to move its attention "cursor" forward.
For long-form tasks, such as synthesizing entire book chapters, even basic location-awareness can fail. Soroosh Mariooryad and Matt Shannon proposed Dynamic Convolution Attention (DCA). Instead of matching text to audio based on content alone, these models use location-relative attention. They calculate the next position based on a fixed offset from the previous one, effectively forcing the model to march forward through the text.
Hybrid Constraints with CTC
Another powerful way to enforce monotonicity is to combine attention with Connectionist Temporal Classification (CTC). CTC is an older algorithm that inherently enforces a strict temporal order.
Suyoun Kim, Shinji Watanabe, and Takaaki Hori proposed a multi-task learning framework where CTC acts as an auxiliary guide for the attention-based encoder. While the attention mechanism handles the complex mapping between audio and characters, the CTC loss ensures the encoder's internal representations follow a chronological path. This "best of both worlds" approach significantly reduces errors in noisy environments and prevents the model from skipping segments of audio.
Hard and Soft Monotonic Alignment
More recent work has moved toward explicit mathematical constraints on the alignment path. Chenfeng Miao and colleagues introduced Soft Monotonic Alignment (SMA) loss, which penalizes the model if its attention jumps backward or skips too far forward.
In synthesis, Weiwei Lin explored stochastic monotonic alignment, which treats the alignment as a latent variable that must strictly increase. By forcing the model to choose a path that only moves forward, these systems achieve much higher stability, ensuring that every word in a sentence is spoken exactly once, in the correct order.
As Albert Zeyer and Hermann Ney argue, the transition from complex pipelines to end-to-end models requires these structural inductive biases. By constraining the "infinite flexibility" of attention to the "strict linearity" of speech, researchers have made end-to-end systems robust enough for real-world use.