TL;DR
Large Language Models (LLMs) are notoriously English-centric, often performing worse in other languages due to internal representational misalignment. This paper introduces Code-Switching In-Context Learning (CSICL), a training-free method that scaffolds a model's reasoning by gradually transitioning a query from a target language to English, significantly boosting performance across diverse tasks and low-resource languages.
What Problem Does This Paper Address?
While modern LLMs are impressively multilingual, their "thinking" isn't language-agnostic. Research shows these models rely heavily on English-centric latent representations. When faced with a non-English query, a model must internally map that input to its English-centric reasoning space.
Current approaches like Cross-Lingual In-Context Learning (X-ICL) often use an "abrupt pivot"—either providing parallel demonstrations or explicitly asking the model to "translate then answer." The authors argue this creates a translation barrier: if the model fails at the initial, abrupt translation step, that error propagates through the entire reasoning chain. The challenge is to find a smoother way to align non-English inputs with the model's strongest internal reasoning capabilities.
Methods
The authors propose CSICL, an inference-time mechanism that replaces abrupt transitions with a "linguistic bridge."
Instead of a single jump to English, CSICL uses few-shot demonstrations where each query is presented in a sequence of five steps, gradually increasing the proportion of English tokens (e.g., 0% → 25% → 50% → 75% → 100% English). This process follows the Matrix Language Frame (MLF) model, where the target language acts as the grammatical "matrix" and English words are progressively embedded.
To generate these demonstrations, the authors developed a two-step pipeline:
- Generate Code-Switching: Using parallel texts, they create a version of the sentence that mixes both languages.
- Gradual Conversion: They then expand this into a five-step sequence showing the smooth progression.
Datasets
The primary benchmark used is Global MMLU, covering 10 languages across different resource levels (High: Chinese, Spanish; Mid: Korean, Indonesian, Turkish; Low: Yoruba, Swahili, Telugu).
To ensure the method generalizes, they also evaluated on five task-specific datasets:
- FLORES+: Machine translation to English.
- MedExpQA: Domain-specific medical reasoning.
- PolyMath: Mathematical reasoning.
- BLEnD: Cultural knowledge.
- MBBQ: Social bias.
Key Insights and Ideas
- Scaffolding the Latent Space: PCA visualizations of the model's hidden states reveal that CSICL systematically shifts non-English representations toward English "anchor" states as the layers go deeper. This suggests the method isn't just a prompting trick but a way to physically align internal representations.
- Directionality is Crucial: The authors found that transitioning from a target language to English outperforms the reverse. This confirms that LLMs benefit most when demonstrations converge toward their dominant English reasoning space.
- Generalization to Unseen Languages: One of the most striking findings is that CSICL improves performance even for languages not present in the few-shot demonstrations. By teaching the model a pattern of alignment, it becomes better at cross-lingual transfer generally.
- Mitigating the "Wrong Path" Problem: In complex reasoning, models often mistranslate a key entity early on and then reason perfectly—but incorrectly—from that error. CSICL preserves key content across intermediate steps, making the reasoning trajectory more robust.
Key Results
Across four state-of-the-art models (Qwen3-32B, DeepSeek-V3.1, Grok-4, and Gemini 2.5 Flash), CSICL consistently outperformed standard baselines.
- Accuracy Gains: CSICL yielded average gains of 6.0 percentage points (pp) in target languages and 4.8pp in unseen languages compared to monolingual prompting.
- Low-Resource Impact: The benefits were most pronounced in low-resource settings like Yoruba, where performance jumped by 14.7pp.
- Task Performance: The method was particularly effective for reasoning-oriented tasks (+5.4pp) and translation tasks (+6.8pp).
Limitations and Future Work
- Token Budget: CSICL requires more input and output tokens than zero-shot or simple few-shot methods due to the multi-step translation process. While within the context limits of modern models, this increases inference cost and latency.
- Granularity Saturation: The authors noted that while 5-step transitions are beneficial, increasing to 7 steps provides diminishing returns and may exceed the model's controllable generation limits.
- Language Families: While the study covered 10 languages, the authors acknowledge that this does not represent all language families, and further work is needed to see how CSICL performs on even more linguistically distant pairs.
- Demonstration Generation: While self-generated demonstrations work, the best results currently rely on high-quality demonstrations (often generated by an "oracle" model like GPT-5). Future work could focus on making the method entirely self-sufficient for smaller models.
Summary updated