Code-Switching Spoken Language Identification as Multi-Label Set Prediction

Shunsuke Mitsumori, Matthew Wiesner, Shigeo Morishima, Shinji WatanabearXiv 2026

TL;DR

Researchers have proposed a new way to identify multiple languages in a single audio clip by treating the problem as a multi-label set prediction task. By using a Transformer-based set generator, they move beyond rigid "atomic" language pairs, allowing models to identify new, unseen combinations of languages without needing to know in advance how many languages are present.

What Problem Does This Paper Address?

In our increasingly globalized world, "code-switching" (CS)—the practice of alternating between two or more languages in a single conversation—is incredibly common. However, most Spoken Language Identification (LID) systems are designed with a "one size fits all" monolingual assumption.

When these monolingual filters are used to curate massive speech datasets from the web, code-switched speech often "leaks" through with incorrect labels. This creates a mess for downstream tasks: it biases language-specific models, contaminates evaluations, and causes errors in Automatic Speech Recognition (ASR).

Existing CS-aware LID methods have two major flaws:

  1. The Atomic Trap: They treat a pair like "Japanese-English" as a single, unique class. This doesn't scale; as you add more languages, the number of possible pairs grows quadratically, and the model can never identify a pair it hasn't seen during training.
  2. The Cardinality Problem: Score-based methods (like taking the top $k$ languages) usually require an "oracle" to tell the model exactly how many languages are in the clip, which isn't realistic for real-world applications.

Methods

The authors compare four different strategies for utterance-level CS-LID, all built on top of a shared MMS-1B (Massively Multilingual Speech) frontend:

  1. Hard-target Multi-class (Atomic): The traditional approach where language pairs are treated as distinct labels (e.g., jpn, eng, jpn-eng).
  2. Soft-target Classifier: A model trained to output a probability distribution across all individual languages (e.g., 0.5 for jpn and 0.5 for eng).
  3. Sigmoid Multi-label: Each language is treated as an independent binary classification task.
  4. Multi-label Set Generator (The Novel Approach): Instead of a simple classification head, they use a Transformer decoder to generate a sequence of language tokens (e.g., <jpn> <eng>). This sequence is then treated as an unordered set. This allows the model to naturally decide how many languages are present and which ones they are, without fixed pair labels.

Datasets

The study utilizes a diverse range of benchmarks to test robustness:

  • FLEURS: A standard monolingual dataset covering 102 languages.
  • CS-FLEURS: A massively multilingual CS dataset containing both human-read and synthetic speech. It includes specific subsets for "seen" pairs (observed during training) and "unseen" pairs.
  • CS-YODAS: Real-world CS speech mined from YouTube to test "in-the-wild" performance.
  • Bangor Miami Corpus: A conversational Spanish–English corpus used to test how models handle varying proportions of each language.
  • Multilingual Soap Opera Corpus: A challenging South African dataset featuring three-language code-switching.

Key Insights and Ideas

  • Thresholding is Unstable: One common way to avoid the "oracle $k$" problem is to use a score threshold. However, the authors found that no single threshold works across different datasets. A threshold that works for synthetic speech fails on human-read speech, and vice versa.
Fig. 1. Threshold sensitivity of the soft-target (left) and sigmoid (right) classifiers trained on FLEURS and CS-FLEURS (S1 and M1). Curves show exact set accuracy obtained by thresholding softmax probabilities or sigmoid scores; dotted lines show the corresponding oracle Top-k accuracies. No single threshold recovers Top-k accuracy across subsets.
  • The "Unseen" Breakthrough: The set generator successfully identified unseen language combinations (11.1% accuracy on MMS unseen pairs) where the atomic model failed completely (0%). While 11.1% sounds low, it proves the structural advantage of the set-prediction formulation.
  • The Synthetic-to-Real Gap: Models trained on synthetic CS data (like TTS-generated speech) struggle significantly when moving to human-read or conversational speech. This suggests that the acoustic boundaries and prosody of real code-switching are much harder to model than simple concatenated audio.
  • Language Bias: Models trained primarily on English-embedded CS data (e.g., Spanish-English, Hindi-English) struggle to generalize to pairs that don't include English.

Key Results

The main results, summarized in the table below, show that while the Sigmoid Multi-label model with "Oracle Top-k" decoding is currently the strongest baseline, the Set Generator (G1) is a competitive alternative that doesn't require knowing the language count in advance.

Exact Set Accuracy on FLEURS and CS-FLEURS
  • Monolingual Accuracy: All models maintained high performance on FLEURS (93-97%).
  • CS-FLEURS (Seen): Most models achieved ~73% accuracy.
  • CS-FLEURS (Unseen): The Sigmoid model (M1-Top2) reached 34.2% (with oracle help), while the Set Generator (G1) reached 11.1%. The Atomic model (H2) was stuck at 0%.
  • Cardinality Prediction: The set generator was remarkably good at deciding if an utterance was code-switched, predicting two languages for 96.8% of MMS unseen pairs.

Limitations and Future Work

Despite the promise of set prediction, several hurdles remain:

  • Absolute Accuracy: The set generator still lags behind oracle-aided score-based models. Improving the "which languages" part of the prediction is the next step.
  • Three-Language CS: All models obtained 0% accuracy on the three-language Soap Opera corpus. Moving beyond bilingual mixtures is a major open challenge.
  • Real-World Noise: Naively adding "in-the-wild" data like CS-YODAS didn't consistently help, likely due to the mismatch in audio length and noise levels compared to curated datasets.

The authors conclude that while architectural changes like set prediction are necessary for scaling, the field desperately needs better-matched, real-world training data to bridge the synthetic-to-real gap.

Summary updated

BibTeX
@misc{mitsumori2026code,
  author = {Shunsuke Mitsumori and Matthew Wiesner and Shigeo Morishima and Shinji Watanabe},
  title = {{Code-Switching Spoken Language Identification as Multi-Label Set Prediction}},
  year = {2026},
  eprint = {2610.01450},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.01450},
}
Figure