Introduction
Modern Automatic Speech Recognition (ASR) has seen a paradigm shift toward Attention-based Encoder-Decoder (AED) models, such as Transformers and Listen-Attend-and-Spell (LAS). While these architectures are highly effective, they often suffer from "overconfidence." Because they are typically trained using cross-entropy loss, they tend to produce extremely sharp probability distributions, becoming nearly 100% certain of a specific character or word based solely on acoustic features. This overconfidence creates a significant bottleneck during decoding, particularly when integrating external Language Models (LMs). If the acoustic model is too certain, the LM's contextual knowledge cannot effectively nudge the system toward more sensible alternatives in noisy or ambiguous scenarios.
Researchers have introduced "Relaxed Attention," a remarkably simple regularization technique designed to mitigate this issue. By injecting a uniform distribution into the attention weights during training, this method prevents models from becoming overconfident in their acoustic predictions, allowing for significantly better integration with external language models.
Methodology: Smoothing the Attention Mechanism
The core idea of Relaxed Attention is to "smooth" the attention mechanism during the training phase. In a standard AED model, the attention mechanism calculates weights ($G_i$) that dictate which parts of the input audio the decoder should focus on. Relaxed attention modifies these weights by mixing them with a uniform distribution ($1/T$, where $T$ is the input length):
$$\tilde{G}_i = (1 - \gamma)G_i + \gamma \frac{1}{T}$$
Here, $\gamma$ (gamma) represents the "relaxation coefficient." When $\gamma = 0$, the system defaults to standard attention. As $\gamma$ increases, the model is forced to spread its focus more broadly across the input sequence rather than hyper-focusing on a single frame.
Crucially, this modification is only applied during training. During inference, the model reverts to standard attention, but it has "learned" to be less dogmatic, resulting in higher-entropy attention weights that are more robust and cooperative with external LMs.
Experimental Setup
The study validated the approach across two major ASR benchmarks:
- Wall Street Journal (WSJ): An 81-hour dataset of read news articles.
- Librispeech: A 960-hour dataset of English speech from audiobooks, tested at various scales (100h, 460h, and 960h).
The authors evaluated three major architectures: the standard Transformer, the Listen-Attend-and-Spell (LAS) model, and the Conformer.
Key Results and Discussion
The results on the Wall Street Journal (WSJ) task were particularly striking. The Relaxed Attention Transformer achieved a Word Error Rate (WER) of 3.65% on the WSJ eval92 set, setting a new benchmark and outperforming the previous state-of-the-art (4.20%) by 13.1% relative improvement.
As shown in the experimental data, performance is sensitive to the relaxation coefficient $\gamma$. The authors found that values between 0.2 and 0.35 generally yielded the best results. Interestingly, attempts to let the model "learn" $\gamma$ automatically were less successful, as the model tended to drive the coefficient toward zero to minimize training loss, thereby bypassing the regularization benefit.
On the 960h Librispeech "other" (noisy) test set, the method achieved a relative improvement of roughly 4.9% over the baseline. Ablation studies confirmed that these gains are most prominent when an external LM is used, reinforcing the theory that Relaxed Attention's primary benefit is facilitating better model fusion.
Conclusion
Relaxed Attention represents a powerful "less is more" approach to deep learning. By making the acoustic model slightly "humbler" during training, it becomes a much better team player during decoding. This technique requires no new learnable parameters and can be implemented with just two lines of code, making it an easily adoptable standard for improving the robustness of end-to-end speech recognition systems.
Summary updated