Internal Language Model Estimation for Domain-Adaptive End-to-End Speech Recognition

Zhong Meng, Sarangarajan Parthasarathy, Eric Sun, Yashesh Gaur, Naoyuki Kanda, Liang Lu, Xie Chen, Rui Zhao, Jinyu Li, Yifan Gong

TL;DR

Researchers at Microsoft have developed Internal Language Model Estimation (ILME), a clever way to improve how end-to-end (E2E) speech recognition models adapt to new domains. By "zeroing out" acoustic signals during inference, they can estimate and subtract a model's internal bias, leading to up to a 15.5% reduction in word error rates without any additional model training.

What Problem Does This Paper Address?

Traditional Automatic Speech Recognition (ASR) systems are modular, consisting of separate acoustic, pronunciation, and language models. This modularity makes it easy to swap out the Language Model (LM) when moving from, say, general conversation to medical dictation.

Modern End-to-End (E2E) models—like RNN-Transducers (RNN-T) and Attention-based Encoder-Decoders (AED)—are much more powerful but act as "black boxes." They bake the acoustic and language information into a single neural network. When we try to "fuse" an external LM (trained on domain-specific text) with these models, we run into a problem: the E2E model already has its own "internal" LM bias from its original training data. Simply adding an external LM (Shallow Fusion) often results in the two models clashing or the internal bias drowning out the new information.

Methods

The authors propose Internal Language Model Estimation (ILME). The goal is to isolate the E2E model's internal language bias so it can be subtracted during decoding, making room for the external, domain-specific LM.

The core innovation is how they estimate this internal score without needing to train a separate "source" language model (a requirement for the previous state-of-the-art, the Density Ratio method). They use a technique called Joint Softmax Approximation (JSA):

  1. For RNN-T: They set the output of the acoustic encoder to zero. This forces the "joint network" to rely solely on the "prediction network" (which acts like an internal LM).
  2. For AED: They set the "context vector" (the part that looks at the audio) to zero. This forces the decoder to generate probabilities based only on the previous text tokens.

By subtracting this estimated internal score from the combined E2E and external LM scores during beam search, the system effectively "un-learns" its original domain bias in real-time.

Datasets

  • Training Data: A massive 30,000-hour corpus of anonymized Microsoft service data (voice search, dictation, meetings).
  • Cross-Domain Evaluation: The LibriSpeech corpus (960 hours of audiobooks). This is a "cleaner" and more formal domain than the training data.
  • Intra-Domain Evaluation: Internal Microsoft test sets for Dictation (short messages) and Meetings (conversational speech).
  • External LMs: Trained on the 813-million-word LibriSpeech text corpus and a 2-billion-word internal Microsoft text corpus.

Key Insights and Ideas

  • The "Zero-Shot" Advantage: Unlike the Density Ratio method, ILME requires no additional training. You can take a pre-existing E2E model and apply ILME immediately during inference.
  • Efficiency: Because it doesn't require running a separate source-domain LM alongside the E2E model, it uses roughly 27% to 30% fewer parameters during inference than the Density Ratio method.
  • Architecture Differences: The researchers found that RNN-T models have a "purer" internal LM than AED models. In AED, the decoder is more tightly coupled with the acoustic encoder, making it harder (though still beneficial) to isolate the language component.

Key Results

The results show that ILME consistently outperforms both standard Shallow Fusion and the more complex Density Ratio method:

  • LibriSpeech (Cross-Domain): ILME achieved up to a 15.5% relative reduction in Word Error Rate (WER) compared to Shallow Fusion.
  • Microsoft Production Sets (Intra-Domain): It showed a 6.8% relative WER reduction on dictation tasks.
  • Consistency: Across all tests, ILME provided better accuracy than the Density Ratio method while being computationally lighter.

Limitations and Future Work

The authors acknowledge that ILME relies on an approximation (JSA). While effective, it assumes that the acoustic and language components of the E2E model are somewhat separable.

Future Work could involve:

  • Testing ILME on newer architectures like Transformers or Conformers.
  • Exploring if the internal LM estimation can be improved by partially masking the encoder rather than zeroing it out entirely.
  • Investigating how ILME performs when the domain shift is even more extreme (e.g., highly technical jargon or rare dialects).

Summary updated

BibTeX
@inproceedings{meng2021internal,
  author = {Zhong Meng and Sarangarajan Parthasarathy and Eric Sun and Yashesh Gaur and Naoyuki Kanda and Liang Lu and Xie Chen and Rui Zhao and Jinyu Li and Yifan Gong},
  title = {{Internal Language Model Estimation for Domain-Adaptive End-to-End Speech Recognition}},
  booktitle = {SLT},
  year = {2021},
  doi = {10.1109/slt48900.2021.9383515},
}
Figure