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

Introduction

Modern Automatic Speech Recognition (ASR) has shifted towards End-to-End (E2E) architectures, such as RNN-Transducers (RNN-T) and Attention-based Encoder-Decoders (AED). While these models offer superior performance by jointly optimizing acoustic and linguistic components, their monolithic nature presents a significant challenge for domain adaptation. Unlike traditional modular systems where the Language Model (LM) can be easily swapped, E2E models implicitly learn an "internal" language model from their training data. When integrating an external, domain-specific LM via techniques like Shallow Fusion, this internal bias often conflicts with the new information, leading to sub-optimal adaptation.

Internal Language Model Estimation (ILME)

To address this, researchers at Microsoft proposed Internal Language Model Estimation (ILME). The core objective is to isolate and quantify the E2E model's internal language bias so it can be effectively subtracted during the decoding process. This subtraction "clears the path" for the external LM to exert its influence more accurately.

The ILME method utilizes Joint Softmax Approximation (JSA) to estimate the internal LM score without requiring additional training or a separate source-domain LM. The implementation varies by architecture:

  • RNN-T: The output of the acoustic encoder is set to zero, forcing the joint network to rely exclusively on the prediction network.
  • AED: The context vector, which represents the acoustic information, is zeroed out, compelling the decoder to generate probabilities based solely on previous token history.
Internal LM perplexity comparison between RNN-T and AED architectures.

As shown in the figure above, the internal LM of the RNN-T model exhibits significantly lower perplexity compared to the AED model. This suggests that the RNN-T architecture maintains a more distinct and "purer" internal language representation, making it particularly well-suited for this estimation technique.

Experimental Evaluation

The proposed method was evaluated using a massive 30,000-hour training corpus of anonymized Microsoft service data. Performance was tested across several domains:

  • Cross-Domain: The LibriSpeech corpus (960 hours of audiobooks).
  • Intra-Domain: Internal Microsoft datasets for Dictation and Meetings.

External LMs were trained on large-scale text corpora, including the 813-million-word LibriSpeech text and a 2-billion-word internal Microsoft corpus.

Key Results

ILME consistently outperformed standard Shallow Fusion (SF) and the more computationally intensive Density Ratio (DR) method across all test sets.

Word Error Rate (WER) results on the LibriSpeech test-clean dataset.

On the LibriSpeech "test-clean" set (see table above), ILME achieved a 15.5% relative reduction in Word Error Rate (WER) compared to Shallow Fusion for the RNN-T model. Furthermore, ILME is highly efficient, utilizing approximately 27% to 30% fewer parameters during inference than the Density Ratio method because it does not require a separate source LM.

In intra-domain tasks, ILME provided a 6.8% relative WER reduction on dictation and showed consistent improvements in meeting scenarios, demonstrating its robustness even when the domain shift is less pronounced.

Conclusion

Internal Language Model Estimation provides a powerful, "zero-shot" approach to domain adaptation for E2E ASR. By effectively "un-learning" internal biases during inference, it allows for more seamless integration of external knowledge without the need for additional model training. Future research will explore the application of ILME to Transformer and Conformer architectures and investigate more sophisticated masking techniques for the acoustic encoder to further refine the internal LM estimation.

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