arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.10588cs.CLcs.CY
收藏

羊驼用英语工作吗?论多语言 Transformer 的潜在语言

Do Llamas Work in English? On the Latent Language of Multilingual Transformers

EPFL(洛桑联邦理工学院)

Chris Wendler, Veniamin Veselovsky, Giovanni Monea, Robert West

AI总结:

本文以 Llama-2 为对象,通过追踪多语言 Transformer 中间嵌入,发现其推理经历输入空间、概念空间和输出空间三阶段,且概念空间更接近英语,揭示其以英语为内部枢轴语言的倾向及潜在偏见来源。

摘要:

我们探究在非平衡、以英语为主的语料上训练的多语言语言模型是否将英语作为内部枢轴语言——这一问题对于理解语言模型的工作机制及语言偏见的来源至关重要。本研究聚焦 Llama-2 系列 Transformer 模型,使用精心构造的非英语提示,这些提示具有唯一正确的单 token 续接。从一层到下一层,Transformer 逐步将最终提示 token 的输入嵌入映射到输出嵌入,并据此计算下一 token 概率。在高维空间中追踪中间嵌入,揭示了三个不同阶段:中间嵌入(1)起初远离输出 token 嵌入;(2)在中间层已经能够解码出语义正确的下一 token,但赋予其英语版本的概率高于输入语言版本;(3)最终进入嵌入空间中输入语言特定的区域。我们将这些结果归纳为一个概念模型,其中三个阶段分别在“输入空间”、“概念空间”和“输出空间”中运作。关键的是,我们的证据表明,抽象的“概念空间”比其它语言更接近英语,这可能对多语言语言模型所持有的偏见产生重要影响。

英文摘要:

We ask whether multilingual language models trained on unbalanced, English-dominated corpora use English as an internal pivot language -- a question of key importance for understanding how language models function and the origins of linguistic bias. Focusing on the Llama-2 family of transformer models, our study uses carefully constructed non-English prompts with a unique correct single-token continuation. From layer to layer, transformers gradually map an input embedding of the final prompt token to an output embedding from which next-token probabilities are computed. Tracking intermediate embeddings through their high-dimensional space reveals three distinct phases, whereby intermediate embeddings (1) start far away from output token embeddings; (2) already allow for decoding a semantically correct next token in the middle layers, but give higher probability to its version in English than in the input language; (3) finally move into an input-language-specific region of the embedding space. We cast these results into a conceptual model where the three phases operate in "input space", "concept space", and "output space", respectively. Crucially, our evidence suggests that the abstract "concept space" lies closer to English than to other languages, which may have important consequences regarding the biases held by multilingual language models.

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

↑