arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.10840cs.CL
收藏

通过跨层转码器追踪LLM中的多语言表示

Tracing Multilingual Representations in LLMs with Cross-Layer Transcoders

Max Planck Institute for Intelligent Systems, Tübingen, Germany(马克斯·普朗克智能系统研究所);Mohammed VI Polytechnic University, Morocco(穆莱·伊斯梅尔polytechnic大学);University of Toronto, Canada(多伦多大学);Vector Institute, Canada(向量研究所);ELLIS Institute, Tübingen, Germany(ELLIS研究所)

Abir Harrasse, Florent Draye, Punya Syon Pandey, Zhijing Jin, Bernhard Schölkopf

AI总结:

通过跨层转码器研究LLM中多语言表示的共享机制及语言解码过程。

摘要:

多语言大型语言模型(LLM)可以处理多种语言,但它们如何内部表示这种多样性仍不清楚。它们是否形成具有语言特定解码的共享多语言表示?如果是,为什么性能更倾向于主导训练语言?为了解决这个问题,我们训练了不同多语言混合模型,并使用跨层转码器(CLTs)和归因图分析其内部机制。我们的结果揭示了多语言共享表示:模型在不同语言中使用高度相似的特征,而语言特定的解码出现在后期层中。训练没有英语的模型显示出相同的多语言共享空间结构。解码部分依赖于最终层中一小部分高频特征,这些特征线性编码语言身份。干预这些特征可以抑制一种语言并替换另一种。最后,为了解释非英语失败,我们进行了模型差异实验:表现不佳源于晚期层特征较弱、中期层聚类较弱以及标记器对英语的偏见,迫使早期层专注于词重组。微调加强了这些特征及其联系,提高标记重组和语言特定解码,为多语言差距提供了机制解释。我们的模型和CLTs可在https://huggingface.co/collections/CausalNLP/multilingual-clts和https://huggingface.co/collections/CausalNLP/multilingual-gpt2-models上获取。我们的代码可在https://github.com/abirharrasse/MultilingualCLTs上获取。

英文摘要:

Multilingual Large Language Models (LLMs) can process many languages, yet how they internally represent this diversity remains unclear. Do they form shared multilingual representations with language-specific decoding, and if so, why does performance favor the dominant training language? To address this, we train models on different multilingual mixtures and analyze their internal mechanisms using Cross-Layer Transcoders (CLTs) and Attribution Graphs. Our results reveal multilingual shared representations: the model employs highly similar features across languages, while language-specific decoding emerges in later layers. Training models without English shows identical multilingual shared space structures. Decoding relies partly on a small set of high-frequency features in the final layers, which linearly encode language identity from early layers. Intervening on these features allows one language to be suppressed and another substituted. Finally, to explain non-English failures, we perform a Model-Diffing experiment: underperformance arises from dim late-layer features, weak middle-layer clusters, and tokenizer bias toward English that forces early layers to specialize in word reassembly. Finetuning strengthens these features and their links, improving token assembly and language-specific decoding, providing a mechanistic explanation for multilingual gaps. Our models and CLTs are available at https://huggingface.co/collections/CausalNLP/multilingual-clts and https://huggingface.co/collections/CausalNLP/multilingual-gpt2-models. Our code is available at: https://github.com/abirharrasse/MultilingualCLTs

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑