arXiv:2610.25505cs.CLOct 2026

Manuscript Offprint

arXiv:2610.25505

Where Are Language-Specific Features Represented in Multilingual LLMs? Everywhere

Mikaela Martins, Jonathan Dunn

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Previous work has argued that multilingual LLMs encode language-specific features most strongly in their initial and final layers, implying that intermediate layers support language-agnostic representations. This paper reconsiders this finding by performing four different experiments: three that undertake a fine-grained analysis of representations of Portuguese and Spanish, two closely related languages, and one large-scale language identification experiment that covers over 200 languages. The results of these experiments challenge the strict separation between language-specific and language-agnostic layers in multilingual LLMs, using Llama 3.2 1B as a test case. By analyzing and manipulating contextual sentence embeddings, we demonstrate that language identity remains strongly recoverable throughout the model rather than being restricted to initial and final layers. Moreover, we find that the model tends to classify ambiguous strings as closer to Spanish than to Portuguese, revealing a skew in model behavior that differs from human judgments.

1 Introduction

This paper experiments with how LLMs represent language-specific information in their embeddings by focusing on strings that display language membership ambiguity between closely related languages. We define language membership ambiguity as a condition in which the surface form of a string is compatible with more than one language. We contrast ambiguous strings, which are compatible with both Portuguese and Spanish, with non-ambiguous strings that contain sufficient language-specific cues to be identified as belonging to a specific language. We use this contrast as a means of identifying to what degree embeddings from different layers encode language-specific information. We then extend this investigation to over 200 different languages with a classification experiment.

While there has been much work on multilingual representations, this problem remains only partially understood (Chang et al., 2022; Tang et al., 2024; Lindsey et al., 2025). Contextual embeddings have been shown to combine both language-specific and language-agnostic information (Chen et al., 2023b; Dumas et al., 2024; Ferrando and Costajussà, 2024; Fierro et al., 2025; Tamo et al., 2026). The idea is that, in some layers, embeddings contain more language-specific content (Liang et al., 2021; Tang et al., 2024; Salim et al., 2026): therefore, these embeddings should differ between ambiguous and non-ambiguous strings. But other layers are expected to contain language-agnostic content (Wendler et al., 2024; Dumas et al., 2024; Wu et al., 2025; Dumas et al., 2025), for example, with reasoning processes taking place in English (Zhao et al., 2024; Schut et al., 2025; Lindsey et al., 2025). Thus, ambiguous and non-ambiguous strings should not differ in these layers. Our first three experiments test this contrast. By extending the investigation beyond Portuguese and Spanish in the fourth experiment, we assess whether these observations generalize to sets of languages that are not closely related. Our focus is on the aggregate representation of language-specific information across layers rather than identifying circuits or neurons responsible for these features.

Understanding how multilingual LLMs store and organize linguistic information is important because failures to distinguish between languages have observable consequences in multilingual systems. Chen et al. (2023a) describe the off-target language issue in machine translation, in which a model generates a translation in the wrong language. The authors associate this behavior with a failure to encode sufficiently discriminative target-language signals and with greater lexical similarity between languages. Similarly, Marchisio et al. (2024) use the term language confusion for cases in which LLMs fail to consistently generate text in the contextually appropriate language. Language membership ambiguity is not itself such an error; rather, it provides a controlled setting in which surface form alone does not uniquely determine language identity, allowing us to examine how multilingual models internally represent language membership. Moreover, understanding these properties of multilingual representations is also important for understanding how multilingual LLMs handle interlingual phenomena such as code-switching, code-mixing, and dialectal variation within languages, where language identity itself becomes fuzzy.

This paper has two main goals: (i) to measure how strongly language-specific information is encoded across layers of multilingual LLMs. And (ii) to map how these models represent related languages that display language membership ambiguity in their embeddings. We use Portuguese and Spanish as a test case because their shared roots make them very similar in structure and vocabulary: the number of cognates between Spanish and Portuguese reaches 85% (Ulsh, 1971). Other language pairs that display language membership ambiguity include Indonesian and Malay or Croatian and Serbian (Goutte et al., 2016). Similar languages are thus most likely to contain strings which are ambiguous, being interpretable in multiple languages.

This study is divided into four experiments: the first outlines the multilingual representation space of Llama 3.2 1B using parallel sentences. The second examines how the model represents ambiguous strings, where language identity is not strictly constrained. The third investigates whether language-specific priming can shift these representations and reduce ambiguity. Finally, the fourth trains a language identification classifier on sentence-level embeddings from each layer for over 200 languages. Examples of ambiguous and non-ambiguous strings are found in Table 2 and in Appendix D.

When interpreted together, these experiments provide a fine-grained test case involving two similar languages and a broad analysis of multilingual representations across many languages and layers for the sake of determining what regions of LLMs store language-specific representations. Our results show that language-specific information remains strongly recoverable throughout the model, regardless of layer. We also find that the model tends to classify ambiguous strings as closer to Spanish, showing a default preference. Adding context to ambiguous structures helps assess this skew.

References (13)