Code-Switching Reveals Language Anchoring in Multilingual LLMs

· Source: Computation and Language · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Natural Language Processing · Depth: Expert, quick

Summary

Multilingual Large Language Models (MLLMs) often exhibit performance degradation when processing Code-Switched (CS) inputs compared to monolingual counterparts. Researchers introduced grammar-forced CS as a diagnostic setting and developed Anchor Bias, a geometric measure quantifying whether a CS hidden state aligns closer to its source or target language. Across diverse MLLMs, Anchor Bias revealed a consistent grammar-frame effect: source-framed CS remains source-anchored, while target-framed CS shifts target-ward and shows greater Question Answering (QA) degradation. To address this, CANVAS (Contextual Anchor-based Neural Vector Alignment Steering) was proposed. This inference-time intervention extracts a source-side canvas from the input and softly steers target-language hidden states toward the source anchor during prefill, consistently recovering QA F1 across MLLMs and CS conditions.

Key takeaway

For NLP Engineers optimizing Multilingual LLMs for code-switched inputs, understanding language anchoring is crucial. Your models' performance degradation with target-framed code-switching can be directly linked to representational shifts. Implement CANVAS, an inference-time intervention, to steer target-language hidden states towards source anchors during prefill. This approach consistently recovers Question Answering F1 scores, offering a practical method to mitigate code-switching inference failures and improve MLLM robustness.

Key insights

Language anchoring in MLLMs, revealed by code-switching, causes performance degradation, which can be mitigated by steering hidden states.

Principles

Method

CANVAS extracts a source-side canvas from the input and softly steers target-language hidden states toward the source anchor during prefill to mitigate CS inference failures.

In practice

Topics

Best for: Research Scientist, AI Engineer, Machine Learning Engineer, AI Scientist, NLP Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Computation and Language.