Table of Contents
Fetching ...

Exploring the Translation Mechanism of Large Language Models

Hongbin Zhang, Kehai Chen, Xuefeng Bai, Xiucheng Li, Yang Xiang, Min Zhang

TL;DR

This work uncovers the internal translation mechanism of decoder-only LLMs, revealing that a sparse subset of attention heads (less than 5%) drive translation, with MLPs integrating these signals into an English-centric latent intermediate. The authors introduce subspace-intervened path patching to causally identify translation-critical components, demonstrate their transferability across language pairs and tasks, and show that focused fine-tuning of about 64 heads achieves comparable translation performance to full fine-tuning while preserving nontranslation capabilities. They also reveal an English pivot in the latent space and provide a robust framework for analyzing and improving multilingual translation in LLMs. These findings have practical implications for efficient model refinement and for understanding universal translation circuits in multilingual NLP systems.

Abstract

While large language models (LLMs) demonstrate remarkable success in multilingual translation, their internal core translation mechanisms, even at the fundamental word level, remain insufficiently understood. To address this critical gap, this work introduces a systematic framework for interpreting the mechanism behind LLM translation from the perspective of computational components. This paper first proposes subspace-intervened path patching for precise, fine-grained causal analysis, enabling the detection of components crucial to translation tasks and subsequently characterizing their behavioral patterns in human-interpretable terms. Comprehensive experiments reveal that translation is predominantly driven by a sparse subset of components: specialized attention heads serve critical roles in extracting source language, translation indicators, and positional features, which are then integrated and processed by specific multi-layer perceptrons (MLPs) into intermediary English-centric latent representations before ultimately yielding the final translation. The significance of these findings is underscored by the empirical demonstration that targeted fine-tuning a minimal parameter subset ($<5\%$) enhances translation performance while preserving general capabilities. This result further indicates that these crucial components generalize effectively to sentence-level translation and are instrumental in elucidating more intricate translation tasks.

Exploring the Translation Mechanism of Large Language Models

TL;DR

This work uncovers the internal translation mechanism of decoder-only LLMs, revealing that a sparse subset of attention heads (less than 5%) drive translation, with MLPs integrating these signals into an English-centric latent intermediate. The authors introduce subspace-intervened path patching to causally identify translation-critical components, demonstrate their transferability across language pairs and tasks, and show that focused fine-tuning of about 64 heads achieves comparable translation performance to full fine-tuning while preserving nontranslation capabilities. They also reveal an English pivot in the latent space and provide a robust framework for analyzing and improving multilingual translation in LLMs. These findings have practical implications for efficient model refinement and for understanding universal translation circuits in multilingual NLP systems.

Abstract

While large language models (LLMs) demonstrate remarkable success in multilingual translation, their internal core translation mechanisms, even at the fundamental word level, remain insufficiently understood. To address this critical gap, this work introduces a systematic framework for interpreting the mechanism behind LLM translation from the perspective of computational components. This paper first proposes subspace-intervened path patching for precise, fine-grained causal analysis, enabling the detection of components crucial to translation tasks and subsequently characterizing their behavioral patterns in human-interpretable terms. Comprehensive experiments reveal that translation is predominantly driven by a sparse subset of components: specialized attention heads serve critical roles in extracting source language, translation indicators, and positional features, which are then integrated and processed by specific multi-layer perceptrons (MLPs) into intermediary English-centric latent representations before ultimately yielding the final translation. The significance of these findings is underscored by the empirical demonstration that targeted fine-tuning a minimal parameter subset () enhances translation performance while preserving general capabilities. This result further indicates that these crucial components generalize effectively to sentence-level translation and are instrumental in elucidating more intricate translation tasks.

Paper Structure

This paper contains 54 sections, 1 theorem, 4 equations, 20 figures, 21 tables, 2 algorithms.

Key Result

Theorem 1

For any matrix $\boldsymbol{M_c} \in \mathbb{R}^{d \times N}$, Algorithm alg:subspace returns matrices $\boldsymbol{S_c} \in \mathbb{R}^{d \times 1}$, $\boldsymbol{E}_{c} \in \mathbb{R}^{d \times r}$, and $\boldsymbol{\Gamma} \in \mathbb{R}^{N \times r}$ that minimize Equation eq:obj subject to the

Figures (20)

  • Figure 1: Importance of heads related to translation across different directions. Each square at position $(x,y)$ refers to the $x$-th head in the $y$-th layer. Red (Brown) squares denote heads (MLPs) that have a positive impact on predicting the target token, while grey (purple) squares indicate heads (MLPs) with a negative effect. Additional explanations of this figure are available in Apdx. \ref{['apdx:explanation_heatmaps']}.
  • Figure 2: Translation accuracy changes when components are progressively knocked out.
  • Figure 3: Importance of components related to En$\Rightarrow$ Zh translation across LLaMA-2-7B after CPT or SFT.
  • Figure 4: The attention values visualization of the role-classified key heads in Zh $\Rightarrow$ En, which show different characteristics of different crucial heads.
  • Figure 5: Mean and standard deviation of attention values from key head roles across input tokens.
  • ...and 15 more figures

Theorems & Definitions (1)

  • Theorem 1