Internal Language Model Training for Domain-Adaptive End-To-End Speech Recognition

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

Abstract

End-to-end (E2E) speech recognition models, while powerful, often struggle with domain adaptation because their internal linguistic knowledge is deeply entangled with acoustic processing. This paper introduces Internal Language Model Training (ILMT), a multi-task learning approach that encourages E2E models to develop a more modular, standalone internal language model (ILM) during training. By minimizing an additional ILM loss, the model learns to predict text sequences independently of audio input. This explicit modularity allows for significantly more effective integration of external text-based language models during inference using Internal Language Model Estimation (ILME). Experimental results on a 30,000-hour dataset show that ILMT achieves up to a 40.9% relative word error rate (WER) reduction on cross-domain tasks like LibriSpeech.

Introduction

Traditional automatic speech recognition (ASR) systems were modular by design, consisting of separate acoustic models and language models. Modern End-to-End (E2E) architectures—such as RNN-Transducers (RNN-T) and Attention-based Encoder-Decoders (AED)—have simplified this by combining these components into a single neural network.

However, this integration introduces a "black box" problem: E2E models implicitly learn the language patterns of their source training domain. When deployed in a new target domain (e.g., moving from general conversation to medical dictation), the model's internal, outdated language bias often competes with any external language model (LM) added via standard techniques like "Shallow Fusion." While methods like Internal Language Model Estimation (ILME) attempt to subtract this internal bias during inference, they rely on the assumption that the model possesses a coherent internal LM—an assumption not guaranteed by standard E2E training objectives.

Methodology

The proposed Internal Language Model Training (ILMT) bridges the gap between training and adaptation by enforcing modularity through specialized loss functions.

Multi-Task Learning Objective

Instead of training solely on the standard ASR loss, ILMT introduces a secondary Internal LM loss. During this phase, the algorithm specifically updates components that function as a language model: the prediction and joint networks in an RNN-T, or the decoder in an AED. Crucially, the acoustic encoder remains untouched by this specific loss, forcing the targeted components to learn to predict the next token using only previous text history.

Standalone Behavior and Inference

By training these components to behave as a standalone LM, ILMT significantly reduces the internal LM's perplexity. This makes the subsequent subtraction of the internal bias during inference (via ILME) mathematically more accurate. The resulting model can more effectively "ignore" its training-domain bias and allow a powerful external LM, trained on target-domain text, to guide the recognition process.

Experimental Setup

The models were trained on a massive 30,000-hour internal Microsoft dataset, comprising anonymized and transcribed audio from diverse services such as voice search and dictation. To evaluate domain adaptation, the researchers tested the models on three distinct datasets:

  • LibriSpeech (Cross-domain): Read English audiobooks, representing a significant shift from the conversational training data.
  • Dictation (In-domain): Short, keyboard-style dictation.
  • Conversation (In-domain): Telecommunication-style conversational data.

Key Results and Discussion

ILMT consistently outperformed standard training and traditional adaptation methods like Shallow Fusion and Density Ratio across all tested architectures and domains.

Performance on AED Models

For AED architectures, ILMT combined with ILME provided a 31.5% relative WER reduction on LibriSpeech compared to standard Shallow Fusion. The internal LM perplexity dropped from 796.7 to 46.1, indicating that the model successfully learned a much cleaner representation of language.

WER and WERR for AED models across different datasets and evaluation methods.

Performance on RNN-T Models

The gains were even more pronounced for RNN-T models. On the LibriSpeech test set, the ILMT+ILME approach achieved a 40.9% relative WER reduction compared to the "No LM" baseline. Even in-domain datasets like Dictation and Conversation saw improvements of up to 11.4%.

WER and WERR for RNN-T models across different datasets and evaluation methods.

These results demonstrate that by "untangling" linguistic and acoustic knowledge during training, E2E models become far more flexible and capable of adapting to new linguistic environments.

Conclusion and Future Work

Internal Language Model Training represents a significant step toward making E2E speech recognition models more modular and adaptable. While the method requires retraining or fine-tuning with the additional ILM loss and involves tuning a hyperparameter to balance ASR and LM objectives, the performance gains in cross-domain scenarios are substantial.

Future research may explore how ILMT interacts with other adaptation techniques, such as those utilizing small amounts of target-domain audio, or how it can be applied to even larger-scale foundation models to improve their zero-shot or few-shot adaptation capabilities.

Summary updated

BibTeX
@inproceedings{meng2021internal,
  author = {Zhong Meng and Naoyuki Kanda and Yashesh Gaur and Sarangarajan Parthasarathy and Eric Sun and Liang Lu and Xie Chen and Jinyu Li and Yifan Gong},
  title = {{Internal Language Model Training for Domain-Adaptive End-To-End Speech Recognition}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2021},
  url = {https://openreview.net/forum?id=CIiqjrk7pj4Y},
}
Figure