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

大型语言模型如何处理多语言现象?

How do Large Language Models Handle Multilingualism?

National University of Singapore(新加坡国立大学);DAMO Academy, Alibaba Group(阿里巴巴集团达摩院);Nanyang Technological University(南洋理工大学);Hupan Lab(湖畔实验室)

Yiran Zhao, Wenxuan Zhang, Guizhen Chen, Kenji Kawaguchi, Lidong Bing

AI总结:

本研究提出LLM的多语言工作流假设,通过引入并行特定语言神经元检测方法验证该流程,并利用小数据集微调特定语言神经元,在不损害其他语言的情况下显著提升了高、低资源语言的多语言能力。

摘要:

大型语言模型(LLMs)在多种语言上展现出了令人印象深刻的能力。本研究探讨了LLMs如何处理多语言现象。基于观察到的各层间语言比例的变化以及网络结构与特定能力之间的关系,我们假设了LLM的多语言工作流($\ exttt{MWork}$):LLMs首先理解查询,将多语言输入转换为英语以解决任务。在中间层,它们使用英语进行思考,并分别通过自注意力和前馈结构整合多语言知识。在最后几层,LLMs生成与查询原始语言一致的响应。为了验证$\ exttt{MWork}$,我们引入了并行特定语言神经元检测($\ exttt{PLND}$),以在没有任何标注数据的情况下识别不同语言输入所激活的神经元。利用$\ exttt{PLND}$,我们通过涉及跨各种层和结构停用特定语言神经元的大量实验验证了$\ exttt{MWork}$。此外,$\ exttt{MWork}$允许使用小型数据集对特定语言神经元进行微调,在不损害其他语言的情况下增强特定语言的多语言能力。这种方法仅使用$400$篇文档,就使所有任务中的高资源语言平均提升了$3.6\%$,低资源语言平均提升了$2.3\%$。

英文摘要:

Large language models (LLMs) have demonstrated impressive capabilities across diverse languages. This study explores how LLMs handle multilingualism. Based on observed language ratio shifts among layers and the relationships between network structures and certain capabilities, we hypothesize the LLM's multilingual workflow ($\texttt{MWork}$): LLMs initially understand the query, converting multilingual inputs into English for task-solving. In the intermediate layers, they employ English for thinking and incorporate multilingual knowledge with self-attention and feed-forward structures, respectively. In the final layers, LLMs generate responses aligned with the original language of the query. To verify $\texttt{MWork}$, we introduce Parallel Language-specific Neuron Detection ($\texttt{PLND}$) to identify activated neurons for inputs in different languages without any labeled data. Using $\texttt{PLND}$, we validate $\texttt{MWork}$ through extensive experiments involving the deactivation of language-specific neurons across various layers and structures. Moreover, $\texttt{MWork}$ allows fine-tuning of language-specific neurons with a small dataset, enhancing multilingual abilities in a specific language without compromising others. This approach results in an average improvement of $3.6\%$ for high-resource languages and $2.3\%$ for low-resource languages across all tasks with just $400$ documents.

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

↑