发现大模型处理相同语法时用相同内部结构,不同则用不同结构。
The Same But Different: Structural Similarities and Differences in Multilingual Language Modeling
- 用机制可解释性分析模型内部电路,对比英汉语法处理
- 相同语法过程无论语言如何,都用相同内部电路处理
- 多语言模型会为特定语言添加专用组件,保留语言差异
我们运用机制可解释性新工具,探究大型语言模型(LLMs)的内部结构是否与训练语言的底层语言结构相对应。具体问题为:(1) 当两种语言使用相同的形态句法过程时,模型是否使用共享的内部电路?(2) 当两种语言需要不同的形态句法过程时,模型是否使用不同的内部电路?通过分析英语和中文的多语言及单语言模型在两项任务中的内部电路,我们发现模型在处理相同句法过程时,无论语言为何,均采用相同的内部电路,即使这些模型是独立训练的单语言模型也如此。此外,我们表明多语言模型在处理仅存在于某些语言中的语言现象(如形态标记)时,会启用语言特定的组件(注意力头和前馈网络)。结果揭示了模型在同时建模多种语言时,如何权衡利用共性结构与保留语言差异。
原文摘要 · Abstract (English)
We employ new tools from mechanistic interpretability in order to ask whether the internal structure of large language models (LLMs) shows correspondence to the linguistic structures which underlie the languages on which they are trained. In particular, we ask (1) when two languages employ the same morphosyntactic processes, do LLMs handle them using shared internal circuitry? and (2) when two languages require different morphosyntactic processes, do LLMs handle them using different internal circuitry? Using English and Chinese multilingual and monolingual models, we analyze the internal circuitry involved in two tasks. We find evidence that models employ the same circuit to handle the same syntactic process independently of the language in which it occurs, and that this is the case even for monolingual models trained completely independently. Moreover, we show that multilingual models employ language-specific components (attention heads and feed-forward networks) when needed to handle linguistic processes (e.g., morphological marking) that only exist in some languages. Together, our results provide new insights into how LLMs trade off between exploiting common structures and preserving linguistic differences when tasked with modeling multiple languages simultaneously.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。