arXiv:2610.01450eess.ASOct 2026

Manuscript Offprint

arXiv:2610.01450

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

Shunsuke Mitsumori, Matthew Wiesner, Shigeo Morishima, Shinji Watanabe

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Shunsuke Mitsumori 1^{1}, Matthew Wiesner 2^{2}, Shigeo Morishima 1^{1}, Shinji Watanabe 3^{3}

1^{1}Waseda University, Tokyo, Japan 2^{2}Johns Hopkins University, Baltimore, USA

3^{3}Carnegie Mellon University, Pittsburgh, USA

mitsumori@ruri.waseda.jp

Abstract—Code-switched (CS) speech leaks through the monolingual language identification (LID) filters used to curate massive speech corpora, calling for CS-aware LID (CS-LID). We formulate utterance-level CS-LID as multi-label language-set prediction and propose a set generator that directly outputs the languages in an utterance, comparing it against atomic-pair and score-based classification baselines. Oracle Top-k is the strongest baseline, but thresholding fails because no single threshold separates CS from monolingual speech. Our set generator predicts the correct language count on unseen pairs without assuming the number of languages, but underperforms oracle Top-k in exact set accuracy. Our analysis identifies the key obstacles to robust CS-LID: oracle cardinality, threshold instability, language bias in CS training data, and the synthetic-to-real gap.

Index Terms—Code-Switching Spoken Language Identification, Code-Switching Speech, Spoken Language Identification.

I. INTRODUCTION

In recent years, massive multilingual speech datasets compiled from web-crawled, in-the-wild audio [1]-[3] have significantly advanced speech foundation models [4]-[6]. In the preprocessing pipelines that filter and refine language labels of such uncurated audio, utterance-level spoken language identification (LID) [7], [8] plays a pivotal role. However, even the heavily curated YODAS [1] subset within OWSM v4 [6] still contains code-switched (CS) speech that leaked through monolingual LID filtering [9]. The problem is not the presence of CS speech itself, but the mismatch between monolingual labels and multilingual content, which can bias language-balanced sampling, contaminate language-specific evaluation, and leak unintended languages into language-conditioned ASR training. This motivates CS-aware LID (CS-LID) that identifies the set of languages present in each utterance.

Research on code-switched speech has historically focused on a few specific language pairs (e.g., Mandarin–English or Hindi–English) [10]–[12]. Recently, massively multilingual CS corpora such as CS-YODAS [9] and CS-FLEURS [13] have been introduced in order to explore research questions concerning how models for code-switching scale both in terms of linguistic diversity and volume of data. This scaling changes the nature of the CS-LID task: as the language inventory grows, the number of possible language pairs grows quadratically, and collecting CS training data for every pair is unrealistic.

Amidst this expansion of language coverage, existing utterance-level CS-LID approaches mainly follow one of two output strategies. One treats each code-switched language pair as an atomic class, such as jpn-eng, alongside monolingual classes [9], [14]. This is compatible with standard multi-class LID, but it ignores the compositional nature of code-switched speech and cannot naturally handle language pairs that were not observed during training.

Another approach keeps the output inventory as individual languages and derives a language set from LID scores. Patra et al. evaluate Top-k language predictions, using k = 2 for two-language CS utterances, and also fine-tune LID models with soft language-distribution targets by KL divergence [15]. This avoids introducing atomic pair classes and can in principle represent unseen combinations of known languages. However, Top-k decoding assumes that the number of languages in the utterance is known in advance. Threshold-based decoding removes this explicit cardinality assumption, but its performance depends on the operating point, which can vary across languages, domains, and code-switching densities.

To overcome these limitations, we formulate utterance-level CS-LID as multi-label language-set prediction. Instead of mapping an utterance to an atomic pair label such as jpn-eng, our model predicts the set of individual languages present in the utterance, such as {jpn,eng}. This makes unseen language pairs representable as new combinations of known languages, while avoiding both the oracle language count required by Top-k inference and the operating point required by thresholding.

In this paper, we provide a controlled comparison of four representative strategies for utterance-level CS-LID: (1) hard-target multi-class classification with atomic pair labels, (2) softmax classification over soft targets, (3) sigmoid classification over multi-hot targets, both decoded with Top-k or thresholding, and (4) multi-label language-set generation. We evaluate them on FLEURS, CS-FLEURS, and real-world CS speech datasets. Atomic-pair classification performs well on seen pairs but is structurally unable to predict unseen ones. Score-based classification, (2) and (3), with Top-k is a strong oracle-cardinality baseline, while thresholding does not match Top-k accuracy. Set generation avoids atomic pair labels, oracle cardinality, and hand-designed thresholds, but does not yet outperform the Top-k baseline. Robust language-set prediction for unseen, non-English, and real-world CS speech thus remains an open challenge. Our code is publicly available at https://github.com/espnet/espnet/tree/master/egs2/cs-fleurs.

References (26)