cs.CLOct 11, 2025

Language steering in latent space to mitigate unintended code-switching

Authors: Andrey Goncharov, Nikolai Kondusov, Alexey Zaytsev

Abstract

Multilingual Large Language Models (LLMs) often exhibit hallucinations such as unintended code-switching, reducing reliability in downstream tasks. We propose latent-space language steering, a lightweight inference-time method that identifies language directions via Principal Component Analysis (PCA) on parallel translations and steers token embeddings along these axes to control language identity. Our approach mitigates code-switching (reduced next-token distributional divergence by up to 55%, reduced Code-Switching Index by 63--99%) while preserving broad semantic direction with negligible computational overhead and requires only minimal parallel data for calibration. Additionally, we evaluate language classification using a single principal component (96-100% accuracy) and further analyze the layer-wise evolution of language representations.

Figures & tables

Explore similar work

CardsList
  1. Latent Mechanisms of Language Control in Multilingual Language Models

    Aug 31, 2026Ryo Mitsuhashi, Sabri Boughorbel, Majd HawaslyMultilingual Language ModelsMultilingual Language Model Evaluation

  2. Code-Switching Reveals Language Anchoring in Multilingual LLMs

    Jun 18, 2026Jeonghyun Park, Seunghyun Yoon, Yonghyun Jun +1Multilingual Language ModelsCode-Switching

  3. LangFIR: Discovering Sparse Language-Specific Features from Monolingual Data for Language Steering

    Apr 4, 2026Sing Hieng Wong, Hassan Sajjad, A. B. SiddiqueLanguage Model SteeringMultilingual Language Models