Internal Language Model Estimation based Language Model Fusion for Cross-Domain Code-Switching Speech Recognition

Yizhou Peng, Yufei Liu, Jicheng Zhang, Haihua Xu, Yi He, Hao Huang, Eng Siong ChngarXiv 2022 · DOI

Introduction

Automatic Speech Recognition (ASR) has seen significant advancements, yet code-switching (CS)—the practice of alternating between languages within a single conversation—remains a formidable challenge. The primary obstacles are data sparsity and the high domain-dependence of CS behaviors. For instance, English-Mandarin code-switching in Singapore (as seen in the SEAME dataset) differs markedly from that in Mainland China (ASRU dataset) in terms of accents, vocabulary, and grammar. This paper proposes a solution using Internal Language Model Estimation (ILME) to improve ASR performance in these complex, cross-domain scenarios.

System Architecture

The researchers employ an End-to-End (E2E) Conformer-based ASR architecture. This model consists of a Conformer encoder and a Transformer-based decoder. The encoder utilizes convolution subsampling followed by a series of Conformer blocks, which combine the benefits of Transformers (capturing global context) and Convolutional Neural Networks (capturing local features). The decoder then processes these features to generate the final output sequence.

The Conformer-based E2E ASR architecture, illustrating the encoder with Conformer blocks and the decoder structure.

Internal Language Model Estimation (ILME)

A significant issue with E2E ASR models is that they implicitly learn a language model from their training transcripts. In traditional "Shallow Fusion," an external Language Model (LM) is added during decoding, but the ASR model's internal bias can interfere with the external LM's guidance. ILME addresses this by estimating the ASR model's "Internal LM" and subtracting its score from the total during decoding. This effectively "neutralizes" the training data's linguistic bias, allowing the external LM to be more effective.

The authors explore two estimation techniques within the decoder:

  1. One-time Context-vector Learning (OTCL): Uses a learnable bias to replace acoustic context.
  2. Label Synchronous Context-vector Learning (LSCL): Employs a dynamic Feed-Forward Network (FFN) to estimate the internal state, which generally yields superior results.

Stability and Robustness: CTC vs. Attention

A key finding of the study is the difference in robustness between Connectionist Temporal Classification (CTC) and Attention mechanisms. In cross-domain or zero-shot scenarios where the model encounters unfamiliar language patterns, the Attention mechanism often struggles to converge or begins to diverge, as evidenced by rising validation loss. In contrast, the non-auto-regressive nature of CTC loss proves more stable and adaptable to unseen code-switching data.

Comparison of training and validation loss for CTC (left) and Attention (right) mechanisms, showing the divergence of attention loss in challenging scenarios.

Experimental Results and Discussion

The system was evaluated using Mixed Error Rate (MER), which combines character error rates for Chinese and word error rates for English. The results demonstrate the power of ILME across various scenarios:

  • Intra-domain: On the SEAME dataset, ILME (LSCL) reduced MER from 16.4% to 15.4% compared to the baseline.
  • Cross-domain: When testing a SEAME-trained model on the ASRU dataset, MER dropped from 58.4% to 54.7%.
  • Zero-Shot CS: Most impressively, a model trained only on monolingual Mandarin and English data saw a massive performance boost when fused with a CS LM via ILME. On the ASRU test set, the MER plummeted from 63.9% to 45.6%, representing a 32.1% relative error reduction (WERR).

Conclusion

This research highlights ILME as a potent tool for bridging the domain gap in code-switching ASR. By neutralizing internal model bias, ILME allows for more effective integration of external linguistic knowledge, even enabling models trained on monolingual data to perform effectively on mixed-language tasks. Future work will focus on reducing decoding latency and exploring broader language pairs beyond English-Mandarin.

Summary updated

BibTeX
@misc{peng2022internal,
  author = {Yizhou Peng and Yufei Liu and Jicheng Zhang and Haihua Xu and Yi He and Hao Huang and Eng Siong Chng},
  title = {{Internal Language Model Estimation based Language Model Fusion for Cross-Domain Code-Switching Speech Recognition}},
  year = {2022},
  eprint = {2207.04176},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2207.04176},
}
Figure