Abstract
An end-to-end (E2E) ASR model implicitly learns a prior Internal Language Model (ILM) from training transcripts. To fuse an external LM using Bayes posterior theory, the log likelihood produced by the ILM must be accurately estimated and subtracted. This paper proposes two novel approaches to estimate the ILM based on the Listen-Attend-Spell (LAS) framework: One-Time Context Learning (OTCL) and Label-Synchronous Context Learning (LSCL). By learning context vectors independent of the encoder output, these methods achieve lower perplexity and significantly outperform shallow fusion and existing ILM estimation (ILME) approaches across various datasets and architectures.
Introduction
End-to-end Automatic Speech Recognition (ASR) models are powerful because they learn to map audio directly to text in a single network. However, they are often limited by the amount of transcribed audio available for training. To improve performance, researchers often "fuse" the ASR model with an external Language Model (ELM) trained on massive amounts of text-only data.
According to Bayesian logic, to do this correctly, one must subtract the ASR model's own implicit "Internal Language Model"—the linguistic patterns it picked up during training—to avoid over-counting those patterns. The challenge is that in Attention-based Encoder-Decoder (AED) models, the language and acoustic components are deeply intertwined. Previous methods to estimate this ILM (like simply zeroing out the audio encoder) often lead to a "mismatch" during inference, especially in modern architectures like Transformers and Conformers, resulting in sub-optimal accuracy.
Proposed Methods
The authors propose two ways to estimate the ILM by focusing on the context vector, which carries information from the audio encoder to the text decoder.
- One-Time Context Learning (OTCL): This is the simpler approach. After the ASR model is trained, its parameters are frozen, and a single, static "global" context vector is learned using only training transcripts. During ILM estimation, this fixed vector replaces the dynamic audio-dependent context vector.
- Label-Synchronous Context Learning (LSCL): Instead of a static vector, this method uses a lightweight Feed-Forward Neural Network (FFNN) to map the decoder’s current hidden state to a context vector at every step. Because the decoder's hidden state already contains historical text information, the FFNN can generate a relevant context vector without ever looking at the audio.
Both methods ensure the ILM estimation is independent of the encoder while remaining "coupled" with the decoder's existing knowledge.
The "Zero-out" Trap
A common existing technique is to set the encoder output to zero to estimate the ILM. The authors discovered why this fails for modern models: in BLSTMs, context vectors are symmetric and centered around zero, but in Transformers and Conformers, the distribution is "messy" and far from zero. Zeroing them out creates a massive mathematical mismatch during inference.
Experimental Results
The researchers evaluated their methods across English (LibriSpeech, Gigaspeech), Japanese, and Mandarin datasets. The LSCL-ILME method achieved up to a 22% relative Word Error Rate (WER) reduction compared to standard "shallow fusion" on LibriSpeech.
As shown in the results, the improvements were consistent across BLSTM, Transformer, and Conformer encoders. For example, on the Mandarin medical test set, LSCL reduced the Character Error Rate (CER) from 5.93% (shallow fusion) to 4.80%. LSCL consistently outperformed both the "Zero-out" method and the more complex "Mini-LSTM" approach across all datasets.
Conclusion
While the results are robust for Attention-based Encoder-Decoder (AED) models, the authors note that they haven't yet applied these specific context-vector learning techniques to RNN-Transducer (RNN-T) models. Additionally, the proposed methods require a secondary training step after the main ASR model is trained. Future work may involve exploring ways to integrate this internal language model learning more tightly into the initial training phase.
Summary updated