Dual Language Models for Code Switched Speech Recognition

Saurabh Garg, Tanmay Parekh, Preethi Jyothi

Abstract

In this work, we present a simple and elegant approach to language modeling for bilingual code-switched text. Since code-switching is a blend of two or more different languages, a standard bilingual language model can be improved upon by using structures of the monolingual language models. We propose a novel technique called dual language models, which involves building two complementary monolingual language models and combining them using a probabilistic model for switching between the two. We evaluate the efficacy of our approach using a conversational Mandarin-English speech corpus. We prove the robustness of our model by showing significant improvements in perplexity measures over the standard bilingual language model without the use of any external information. Similar consistent improvements are also reflected in automatic speech recognition error rates.

Introduction

Code-switching (CS)—the practice of alternating between two or more languages in a single conversation—poses a significant challenge for Automatic Speech Recognition (ASR) systems. Standard language models (LMs) typically struggle with CS due to structural loss, where mixing languages disrupts grammatical rules, and data scarcity, as high-quality code-switched text is far less abundant than monolingual data.

Researchers from IIT Bombay have introduced Dual Language Models (DLMs) to address these issues. By framing a bilingual sentence as a cooperative process between two monolingual "players" rather than a single massive bilingual model, the DLM approach achieves significant improvements in speech recognition accuracy and perplexity, particularly in data-constrained environments.

The Dual Language Model (DLM) Approach

The core innovation of the DLM is treating sentence generation as a two-player game. Each "player" is a monolingual language model ($L_1$ and $L_2$). A player generates a sequence of words in their respective language and then either concludes the sentence or transfers control to the other player via a special "switch" token (<sw>).

The Finite-State Machine (FSM) representation of the Dual Language Model, illustrating the probabilistic switching between monolingual components.

This framework is implemented as a Finite-State Machine (FSM), allowing for seamless integration into existing ASR decoders like Kaldi. Crucially, the monolingual components do not need to maintain the state of the other language; they only manage the transitions. This modularity allows the model to be enhanced by training individual components on large, readily available monolingual corpora.

Experimental Setup

The study utilizes the SEAME corpus, a standard for conversational Mandarin-English code-switching, consisting of approximately 56.6 hours of training data (~54,000 utterances). The data was preprocessed to remove non-speech sounds and "mixed" words (e.g., Mandarin roots with English suffixes) to isolate the language modeling challenge. The DLM was compared against a "Mixed LM"—a standard n-gram model trained on the entire code-switched dataset.

Results and Discussion

The DLM consistently outperformed the Mixed LM across various metrics. In terms of perplexity, the DLM achieved a score of 324.9 compared to the baseline's 329.7 using Kneser-Ney smoothing.

One notable finding was that trigrams (looking back two words) did not provide significant gains over bigrams in the SEAME corpus. This is attributed to the extreme sparsity of three-word sequences in code-switched speech, where transitions often occur frequently enough to disrupt long-range monolingual dependencies.

Data Efficiency and Robustness

A key advantage of the DLM is its superior performance in low-data scenarios. When the training data was reduced to 1/3 of its original size, the performance gap between the DLM and the Mixed LM widened, demonstrating the model's robustness.

Perplexity results comparing Mixed LM and DLM across different training data sizes (Full, 1/2, 1/3).

ASR Accuracy

The improvements in perplexity translated to gains in Token Error Rate (TER). In a setup using TDNN+SAT with RNNLM rescoring, combining the DLM with the Mixed LM reduced the TER from 36.64% to 36.37%. While the numerical change is small, it was found to be statistically significant ($p < 0.001$) across all tested architectures.

Conclusion

The Dual Language Model offers a simplified yet effective "middle path" for code-switched ASR. By leveraging monolingual structures, it handles rare transitions more gracefully than standard n-grams. Future work includes testing the model on different language pairs (e.g., Hindi-English) and extending the framework to handle trilingual or multilingual code-switching.

Summary updated

BibTeX
@inproceedings{garg2018dual,
  author = {Saurabh Garg and Tanmay Parekh and Preethi Jyothi},
  title = {{Dual Language Models for Code Switched Speech Recognition}},
  booktitle = {Interspeech},
  year = {2018},
  url = {https://openreview.net/forum?id=jUjwPEMuXd},
}
Figure