TL;DR
By modifying just a single Sparse Autoencoder (SAE) feature at a single transformer layer, researchers can reliably steer a large language model's generation from English into Chinese, Japanese, Spanish, or French. This lightweight inference-time intervention preserves semantic meaning while achieving up to ~98% language control accuracy—outperforming standard prompt-based instructions without requiring any retraining or fine-tuning.
What Problem Does This Paper Address?
Modern multilingual large language models (LLMs) learn shared representations where concepts and languages are deeply entangled in internal residual streams (a phenomenon related to superposition). Consequently, deterministically controlling which language an LLM generates in remains surprisingly difficult, especially in zero-shot settings where users do not provide explicit language prompts or where prompt-following is unreliable.
While recent work has identified language-specific neurons or applied vector steering, these approaches often lack interpretability or test only a single arbitrary layer. This paper investigates whether monosemantic directions extracted by Sparse Autoencoders (SAEs) can causally control output language identity across layers, and how the underlying transformer architecture constructs and routes these linguistic signals.
Methods
The authors adopt a lightweight feature-steering intervention across Gemma-2-2B and Gemma-2-9B, leveraging pretrained residual-stream SAEs from Gemma-Scope:
- Identifying Language-Specific Features: The model processes parallel sentence pairs in English and a target language (Chinese, Japanese, Spanish, or French). By computing contrastive activation differences across the SAE latent space (both across token averages and at the final token), the authors isolate features that show the highest differential activation for each target language.
- Inference-Time Steering: During generation on an English prompt, the residual activation $h^l$ at layer $l$ is encoded into sparse latents $z^l$. The target language feature is boosted by adding the precomputed activation offset ($\Delta^l$). The modified latent code is decoded back into the residual stream via the SAE decoder, and generation resumes as normal.
- Mechanistic Circuit Analysis: To inspect why certain layers steer better, the authors perform:
- Attention head attribution: Measuring the dot product between each head's output and the SAE feature direction.
- Residual stream decomposition: Tracing upstream layer contributions (previous attention and MLP outputs) to determine whether language features are generated locally or inherited.
Datasets
- Tatoeba Project (via ManyThings.org): 1,000 parallel translated sentence pairs per language pair used to contrast English against Chinese, Japanese, Spanish, and French to identify language-divergent SAE features. A subset of 50 sentences per language was used for architectural attribution.
- Dolly-15k (curated subset): 500 diverse, open-ended English prompts used to evaluate post-steering generation across science, personal interest, food, and other topics.
Key Insights and Ideas
- Steering a Single Feature is Sufficient: Clamping or shifting a single language-aligned feature can cleanly pivot model generation from English to the target language without degrading sentence coherence or task context.
- Mid-to-Late Layer Criticality: Language steering is virtually ineffective in early transformer layers. Steerability sharply emerges and peaks in mid-to-late layers (particularly layers 23 and 29–36 in Gemma-2-9B).
- Dedicated Language Amplifier Heads: At specific transition layers, individual attention heads disproportionately align with language features. In Gemma-2-9B, Head 1 at Layer 23 and Head 12 at Layer 29 act as strong amplifiers across all evaluated target languages when the corresponding language feature is active.
- Local Emergence vs. Residual Inheritance: While Layers 23 and 29 actively construct and amplify language directions using localized attention heads, subsequent layers (Layers 30–33) maintain high steerability by inheriting accumulated representations directly through the residual stream rather than relying on local head contributions.
Key Results
- Linguistic Steering Success (FastText Classification): In Gemma-2-9B, top-feature steering achieved target language accuracy of:
- Chinese (CMN): 97.8% (vs. 35.6% for an instruction-tuned
Gemma-2-9B-ITprompt baseline) - Japanese (JPN): 93.8% (vs. 59.8% prompt baseline)
- Spanish (SPA): 88.8% (vs. 78.6% prompt baseline)
- French (FRA): 85.2% (vs. 62.6% prompt baseline)
- Semantic Fidelity (LaBSE Cosine Similarity): Steered outputs preserved the prompt's semantic meaning comparable to natural stochastic variation between repeated English generations (baseline: $0.456 \pm 0.019$), scoring $0.509$ (Chinese), $0.458$ (Spanish), $0.435$ (Japanese), and $0.395$ (French).
- Feature Selection: Selecting features based on the difference at the final token ($\Delta_{\text{final}}^l$) consistently outperformed sequence-averaged differences.
Limitations and Future Work
- Architecture Scope: Experiments were conducted exclusively on the Gemma family (Gemma-2-2B and Gemma-2-9B); generalizability across other LLM architectures (e.g., Llama, encoder-decoder models) remains to be demonstrated.
- Correlational Decomposition: Residual decomposition assumes linear additive contributions, leaving open whether identified attention heads actively trigger language shifts or merely respond to earlier signals.
- Automatic vs. Human Metrics: Evaluations relied on automated classifiers (FastText and LaBSE embeddings), which do not capture nuances in native fluency or subtle grammatical correctness.
- Computational Overhead: Running SAE encodings and decodings across all layers during inference is computationally heavy compared to standard forward passes. Future work aims to generalize this approach to non-language attributes (tone, persona, dialect) and investigate training-time sparse interventions.
Summary updated