Abstract
While Large Language Models (LLMs) demonstrate remarkable proficiency in machine translation (MT), the internal mechanisms driving this capability have largely remained a black box. Mechanistic Interpretability (MI) seeks to reverse-engineer these neural networks, but prior work in MT has been constrained to simple word-level analyses. This paper scales MI to sentence-level translation, revealing that LLMs mechanistically localize translation tasks within a sparse fraction (~1%) of their attention heads. By disentangling "meaning" from "language," the researchers successfully developed steering vectors capable of triggering high-quality translations without explicit instructions or few-shot examples.
Introduction: The Black Box of Machine Translation
Despite the widespread use of LLMs for translation, most research evaluates their performance based on output benchmarks (such as BLEU scores) rather than investigating their internal computations. This leaves critical failure modes—such as "language mismatch" (translating correctly but into the wrong language) or repetition errors—difficult to diagnose and fix.
This study tackles sentence-level MT by asking a fundamental question: How does a model separate the semantic meaning of a source sentence from the target language it needs to generate? To answer this, the authors conceptualize machine translation as two distinct subtasks:
- Target Language Identification: Producing text in the correct output language.
- Sentence Equivalence: Preserving the exact meaning of the input sentence.
Methodology
To map these subtasks to specific neural pathways, the researchers employed activation patching. This technique involves running a "clean" prompt (a correct translation task) alongside a "corrupted" prompt (where either the target language is altered or the meaning is scrambled). By swapping internal activations between these two runs, the authors could isolate which specific attention heads are responsible for each subtask.
Adapting this method to sentence-level MT presented a unique challenge: the "token position problem." Because sentences consist of many tokens, the researchers introduced a KL-divergence-based method to pinpoint the exact sequence position where the model's internal representation of the translation task is most influential.
The experiments were comprehensive, utilizing the FLORES-200 multi-way parallel dataset across 20 translation directions. The study evaluated English to and from high-resource languages (Arabic, Chinese, French, Hindi, Russian) and low-resource languages (Wolof, Swahili). The models tested spanned three major open-source families: Gemma-3, Qwen-3, and Llama-3.2, ranging from 270 million to 27 billion parameters.
Key Discoveries
Extreme Sparsity and Functional Disentanglement
The study reveals that translation is not a distributed, "whole-brain" activity within an LLM. Instead, it is highly localized. Only about 1% of attention heads (roughly 5 to 10 heads in a 12B parameter model) consistently drive the translation process.
Furthermore, these heads are functionally disentangled. The model relies on mostly disjoint sets of heads for its two subtasks: one set acts as the "linguistic steering wheel" (Target Language Identification), while the other serves as the "semantic engine" (Sentence Equivalence).
Language-Agnostic Meaning and the "English Gravity Well"
Interestingly, the internal representation of meaning is language-agnostic. The researchers found that "equivalence vectors" are transferable across languages. For example, a meaning vector derived from an English-to-French translation task can successfully induce translation in an English-to-Chinese context.
The study also highlighted an "English gravity well" in English-centric models. Generating English is the model's default behavior. The dedicated "language heads" are primarily necessary to override this default when translating out of English. If these heads are disabled, the model almost immediately reverts to generating English text.
Experimental Results: Steering and Ablation
By averaging the activations of these identified heads, the authors created steering vectors—internal nudges that force the model to perform specific subtasks during inference.
- Instruction-Free Translation: By steering just 1% of the identified heads, the authors achieved translation quality comparable to using explicit instructions (e.g., "Translate this to French:"). For Gemma-3-12B, steering achieved a 34.9 BLEU score, nearly matching the 37.5 BLEU of a standard 5-shot prompt.
- Causal Evidence via Ablation: Disabling (ablating) these specific heads caused catastrophic, targeted failures. Removing just 1% of the "language heads" dropped target language accuracy to near zero for non-English targets. Conversely, removing the "translation heads" resulted in nonsensical outputs that remained in the correct target language but entirely lost the source sentence's meaning.
- Vector Decoding: When researchers "decoded" the focus of the language heads, they found tokens specific to the target language (e.g., French function words). Decoding the translation heads, however, yielded a "linguistic soup" of multiple languages, confirming their role in processing pure, language-agnostic meaning.
Limitations and Future Work
While groundbreaking, the methodology faces challenges with low-resource languages like Wolof, where limited pre-training data results in noisier, harder-to-isolate internal representations. Additionally, smaller models (under 1B parameters) exhibited higher variance and sensitivity to the specific token positions used for head identification.
Finally, while this paper successfully maps the role of attention heads, the authors note that a complete "translation circuit" likely involves the Multi-Layer Perceptron (MLP) layers as well. Future research will need to map the full, end-to-end path of information from the source input to the final translated output to fully demystify LLM machine translation.
Summary updated