Think Multilingual, Not Harder: A Framework for Analyzing and Teaching Code-Switched Reasoning
Abstract
Recent developments in reasoning capabilities have enabled large language models (LLMs) to solve increasingly complex tasks. Interestingly, while reasoning models are often trained to generate monolingual text, LLMs have also been observed to code-switch (i.e., mix languages). Prior works have either viewed code-switching as an undesirable error, attempted to control code-switching through modifications to input prompts or the output decoding process, or focus on narrow subsets of languages, domains, tasks, and models. We address these gaps by introducing the first linguistically and behaviorally motivated fine-tuning framework for identifying beneficial code-switched reasoning behaviors in LLMs and teaching these models to code-switch more effectively for reasoning. First, we create the Code-Switched Reasoning (CoRe) corpus, consisting of 14k reasoning traces from 17 models, 23 languages, 12 scripts, and diverse reasoning domains, providing insights into potentially helpful code-switching behaviors. Then, we expand CoRe into the Extended Code-Switched Reasoning corpus (EnCoRe) with 40 carefully curated datasets for training and evaluating six interventions on code-switching in reasoning across three models and seven languages, totaling 120 fine-tuning conditions. Across 80k+ reasoning traces from both language/culture-agnostic and -specific evaluations, English-dominated reasoning, semantically accurate code-switching, and a more even mix of languages are positively associated with correct answers, whereas dense switching is associated with incorrect answers. Moreover, we are able to elicit positive behaviors through fine-tuning tasks that do not directly demonstrate code-switching. Our work suggests that small but well-curated datasets can change how reasoning models code-switch, allowing us to reap the benefits of reasoning in the many languages that lack large-scale reasoning data.
Introduction
When human multilinguals mix multiple languages during communication, they are said to code-switch (Myers-Scotton, 2017). Recently, works including Guo et al. (2025) have observed the parallel phenomenon of code-switching in reasoning—the long chain-of-thought texts produced by large language models (LLMs) when solving complex problems. While mechanisms of human code-switching have been studied extensively, in comparison, the emergent behavior of code-switching in LLM reasoning remains relatively poorly understood. In this work, we are particularly interested in code-switched LLM reasoning as a route to improve reasoning capabilities for lower-resource languages. This issue is of critical importance given that currently available reasoning models are mostly limited to high-resource languages like English.
To understand how state-of-the-art reasoning models code-switch and design interventions that improve code-switching quality, we seek answers to the following questions:
- RQ 1: How do LLMs code-switch during reasoning?
- RQ 2: What types of code-switching are associated with better reasoning task performance?
- RQ 3: What types of fine-tuning interventions can teach reasoning models beneficial forms of code-switching for reasoning?
To address these questions, we first create and analyze a corpus of reasoning examples from diverse models, languages, tasks, and domains. Based on the findings from this initial corpus, we design supervised fine-tuning approaches (including training data and evaluation on parallel and non-parallel language/culture-specific and -agnostic benchmarks) to develop beneficial code-switched reasoning behaviors.
Contributions
- We introduce the Code-Switched Reasoning corpus (CoRe) of 14k reasoning traces from diverse models, languages, tasks, and domains. With this initial corpus, we develop and apply a taxonomy of code-switching behaviors to identify characteristics that benefit reasoning performance.
- We introduce a linguistically and behaviorally motivated fine-tuning framework for teaching reasoning models to code-switch for better reasoning performance. This framework expands CoRe into the Extended Code-Switched Reasoning corpus (EnCoRe) with 1M tokens of training data per task per language, across 6 tasks and 7 languages.
- We systematically analyze code-switching behaviors produced by our framework and their relationship with reasoning performance. We find that fine-tuning for translation tasks most consistently shifts code-switching toward behaviors associated with correct answers. Crucially, this benefit appears to be most pronounced for low-resource languages.
How do LLMs code-switch during reasoning (RQ 1) and what types of code-switching are associated with better reasoning task performance (RQ 2)?
Despite being written in unrelated languages and scripts, prompts in Arabic, Hindi, and Thai often elicit reasoning dominated by Chinese content. Other languages tend to elicit English-dominated reasoning. As illustrated by Burmese (my), code-switching accuracy and codeswitching fluency can diverge substantially for the same language.
To answer RQ 1 on how LLMs code-switch, we create the Code-Switched Reasoning corpus (CoRe) of 14k reasoning traces from 17 models. Then, we create a code-switched reasoning behavior taxonomy grounded in both the linguistics literature on human code-switching and in our analysis of the CoRe corpus. We annotate the resulting Form, Function, and Coherence dimensions from our taxonomy on diverse examples of model reasoning to systematically analyze code-switched reasoning behaviors in current models. Analyzing the form of code-switched reasoning in response to different prompt languages reveals that models’ choices of code-switching languages do not necessarily align with intuitions based on human code-switching or prior work. Also in contrast with prior work, we find that conditioning answers on high-density code-switching is not significantly associated with reasoning task performance. Contrary to intuition, code-switching accuracy and code-switching fluency (characteristics captured by our taxonomy's coherence dimension) can diverge substantially. Code-switching accuracy (but not code-switching fluency) is positively associated with reasoning task performance.
Code-switching accuracy (but not code-switching fluency) is positively associated with reasoning task performance, corresponding to increased log odds of a correct final answer. (Data is the 7k subset of CoRe described in section 3.1. ``Within CSW'' refers to metrics that are only defined when there is code-switching within the reasoning part of a model's response. Bars are 95% CIs.)
RQ 3: What types of fine-tuning interventions can teach reasoning models beneficial forms of code-switching for reasoning?
Based on our observations of code-switched reasoning behaviors, we answer RQ 3 by designing and testing the effect of six fine-tuning interventions on code-switching. By eliciting behavioral changes through these controlled interventions, we move beyond the observational approach in our prior experiments to induce code-switched reasoning behaviors predictive of better reasoning performance.
Relationship of code-switching behaviors and change in log odds of correct final answer for models fine-tuned and evaluated on EnCoRe.
While the results of the previous experiments inform the design of our SFT interventions, we do not expect identical outcomes in the evaluation of our fine-tuned models, due to differences in the models, languages, and datasets covered, as well as the different random effects structures for modeling the effect of interventions on the code-switching behaviors and the association of code-switching behaviors with accuracy. Therefore, we revisit RQ 2 before addressing RQ 3. Overall, our analysis suggests that traits such as code-switching accuracy remain influential predictors of reasoning task performance for our fine-tuned models, partially overlapping with our findings from the prior observational study.
SFT on translation-based tasks has the most significant positive effects on code-switching behaviors associated with final answer accuracy. (Cell labels are effect sizes of interventions; color scale computed within each row.)
Demonstrations of translation, rather than reasoning demonstrations, appear to be the most effective intervention on model code-switching behaviors, consistent with translation being a central function of code-switching in reasoning.
Fine-tuning on open-domain machine translation increases reasoning task accuracy in low-resource languages.
(a) Low-resource languages gain more percentage points (pp) in accuracy (acc) than high- or mid-resource languages under our open-domain MT SFT intervention (p < 0.001). (b) Based on mediation analysis (appendix A.28), the Average Causal Mediation Effects (ACME) on reasoning task accuracy (a measure of how much gains in accuracy are predicted by code-switching behaviors, separate from gains from the SFT tasks alone) are significant and positive for the open-domain MT SFT intervention. (c) When fine-tuned for open-domain MT, models experience reasoning task accuracy gains of 2.26 pp (pooled across the four low-resource languages). (d) Code-switching behaviors predict significant accuracy gains (ACME) in low-resource languages.
Conclusion
We address the gap in work on how LLMs code-switch during reasoning, types of code-switching helpful for reasoning, and fine-tuning interventions to teach code-switched reasoning, by introducing a framework, data, code, and models for code-switched reasoning. We find code-switching characteristics such as the matrix language, semantic accuracy, and density all predict performance. Our framework significantly increases code-switching behaviors predictive of better reasoning task performance, especially for the lowest-resource languages. Our work establishes code-switching as a means for improving reasoning capabilities in languages with limited data resources.
Comparison With Related Work
- Our work aligns with Li et al. (2025), who attempt to harness code-switching as a useful reasoning behavior. The main difference between this work and Li et al. is that while they target the decoding stage, we modify model behavior through supervised fine-tuning.
- While Winata et al. (2026) observe monolingual English reasoning conditioned on synthetic code-switched prompts, we study spontaneous LLM code-switched reasoning conditioned on monolingual prompts.
- Prior work on code-switched reasoning lacks our coverage of diverse models, languages, domains, tasks, and reasoning behaviors. In CoRe and EnCoRe we cover 19 models from 11 families with diverse multilingual capabilities, 26 languages, and reasoning domains/tasks beyond those in prior work. We also introduce a structured taxonomy of code-switching patterns across three dimensions and quantify these patterns through 8 code-switching metrics validated by linguistics and NLP literature.
- Our work combines top-down, theory-driven and bottom-up, data-driven approaches for classifying reasoning behavior.
- Prior work controls reasoning language at test time; we modify behavior with supervised fine-tuning (SFT). Our SFT approach is partially inspired by Muennighoff et al. (2025), who show that reasoning capabilities can be developed with SFT on a small, carefully curated corpus.
BibTeX
@article{lin2026think,
title={Think Multilingual, Not Harder: A Framework for Analyzing and Teaching Code-Switched Reasoning},
author={Lin, Eleanor M. and Jurgens, David},
journal={arXiv preprint arXiv:2604.15490},
year={2026},
url={https://arxiv.org/abs/2604.15490}
}