Introduction
Modern text-to-speech (TTS) synthesis has undergone a significant paradigm shift toward "decoder-only" architectures. Models such as VALL-E and BASE TTS treat speech synthesis as a large-scale language modeling task, producing highly natural and expressive audio. However, this flexibility introduces a critical trade-off: a lack of robustness. Unlike traditional TTS systems (e.g., FastSpeech or Tacotron) that utilize explicit duration models or monotonic alignment constraints, decoder-only models essentially "guess" the next audio token based on the entire text and previous audio context.
This lack of explicit structure often leads to common failure modes, including word skipping, word repeating, and mispronunciation. To address these issues without the need for costly retraining, this paper introduces Attention-Constrained Inference (ACI), a training-free method that enforces monotonic speech generation by leveraging the model's own internal attention mechanisms.
The Challenge of Robustness
In decoder-only systems, the model must learn to align text and speech implicitly during training. When this alignment fails during inference, the model loses its place in the text sequence, resulting in three primary errors:
- Word Skipping: The model jumps ahead in the text, omitting segments of the script.
- Word Repeating: The model gets stuck in a loop, repeating the same phonemes or words.
- Mispronunciation: The model fails to align the correct phoneme with the current audio frame, leading to garbled output.
Existing solutions typically require modifying the model architecture or training process. ACI, however, is designed as a "plug-and-play" solution for pre-trained models.
Methodology: Attention-Constrained Inference
The ACI framework consists of a two-step process to identify and then enforce alignment.
1. Attention Sweeping
The researchers discovered that even without explicit supervision, certain "hero" attention heads within the transformer layers implicitly learn to align text and speech. The authors use an algorithm to "sweep" through all layers and heads of a pre-trained model to identify these Alignment-Emerged Attention Maps (AEAMs). These heads are selected based on two metrics:
- Entropy Cost: A measure of how "focused" the attention is (lower entropy indicates a more precise focus on specific tokens).
- Alignment Cost: A measure of how closely the attention follows a monotonic path, calculated using Dynamic Programming (Viterbi algorithm).
2. Attention Constraining
Once the AEAMs are identified, the authors apply a Constraining Mask (CMask) during the inference process. This mask restricts the model's attention to a small window of text tokens around the estimated "current" position. To maintain stability, a Dynamic Programming (DP) strategy tracks the center of attention, ensuring the model moves forward through the text steadily and preventing it from jumping too far ahead or falling back into a loop.
Key Insights
- Alignment as a Shallow Feature: A surprising finding of the study is that alignment-aware heads consistently appear in the second or third layers of the transformer, regardless of the model's total depth. This suggests that the model treats text-speech alignment as a low-level feature that informs subsequent, more semantic layers.
- Training-Free Robustness: The study demonstrates that global errors like word skipping can be fixed by simply "nudging" the attention of specific heads during generation, rather than retraining the entire system.
- DP vs. Argmax: The authors found that simply picking the highest attention point (argmax) to track the current word is unstable. Utilizing Dynamic Programming to find the globally optimal path through the attention map is significantly more effective for maintaining monotonicity.
Experimental Results
The authors evaluated ACI using various configurations of VALL-E trained on the LibriTTS (585 hours) and LibriLight-6k (5,000 hours) datasets. Testing on a standardized set of 500 utterances revealed:
- Significant Error Reduction: The Word Error Rate (WER) dropped by 13.4% to 20.5% across different model sizes.
- Improved Consistency: Counts of skipped words (deletions) and repeated words (insertions) were consistently lower than the baseline models.
- Preserved Quality: Metrics for naturalness (P-MOS) and speaker similarity (SECS) remained comparable to or slightly better than the original models, proving that enforcing alignment does not compromise the human-like quality of the speech.
Conclusion and Future Work
Attention-Constrained Inference provides a robust, training-free solution to the alignment issues inherent in decoder-only TTS models. While highly effective, the method currently relies on the emergent existence of alignment-aware heads and uses a heuristic "unmasking radius." Future research may focus on dynamically adjusting this window based on model confidence and exploring the potential of ACI for real-time, streaming TTS applications.
Summary updated