Individual attention heads strongly influence language choice in large models
One Head Away from Language Confusion: Single Attention Heads Across Model Families
Computation and LanguageArtificial Intelligence
Summary
Large language models sometimes reply in the wrong language, which is called language confusion. The authors found that in many models, just turning off one specific part called an attention head causes the model to switch languages much more often than other parts. Changing the information flowing through these heads can redirect a model's replies into a different language. This helps us understand better how language choice is managed inside the model.
What this means in practice
- •For ai system engineers: Identify and modify specific attention heads to reduce unexpected language switching in deployed language models.
- •For machine translation developers: Use insight on language-specific attention heads to improve control over output language in multilingual translation systems.
Authors
Jiwon Jeong, Anjelo Jann Laroza, Chaewoon Yoon, Arjun Pillai, Pranav Kokati, Christian Hoang, Seunghyeok Hong
Abstract
Large language models sometimes reply in an unexpected language, a failure known as language confusion. We ablate individual attention heads in 12 model checkpoints spanning seven model series, using FLORES-200 continuations in five languages and Language Confusion Benchmark (LCB) chat replies. In ten models, zeroing one head causes substantially more departures from the expected language than zeroing any other head in its layer; its LCB pass-rate drop persists, though reduced, under mean ablation. Seven heads move 8.0 to 51.5 percent of all FLORES continuations out of the prompt's language, versus at most 1.4 percent for other same-layer heads; the other three mainly affect explicitly requested languages. These seven heads matter less in base models given plain text. In two models, replacing the values a head reads at the requested-language name with another language's mean makes replies fail and shifts some into that language, unlike a random change of equal size. Replacing a head's output with another language's mean redirects 84 to 99 percent of scored non-English monolingual LCB replies into that language in five models. Yet the requested language's mean improves crosslingual replies beyond every control head only in the two Gemma models, whose baselines are low. Code and results are available in the public repository at https://github.com/christian-hoang-04/anonymous-release.