arXivDaily arXiv每日学术速递 周一至周五更新
​通知:联邦节假日调休:哥伦布日 / 原住民日(Columbus Day / Indigenous Peoples' Day),今日(13日)无更新。
arXiv 2501.11041cs.CL

通过模型编辑增强大语言模型的语义一致性:一种面向可解释性的方法

Enhancing Semantic Consistency of Large Language Models through Model Editing: An Interpretability-Oriented Approach

College of Intelligence and Computing, Tianjin University(天津大学智能与计算学部);IT Innovation and Research Center, Huawei Technologies(华为技术有限公司IT创新研究中心)

Jingyuan Yang, Dapeng Chen, Yajing Sun, Rongjun Li, Zhiyong Feng, Wei Peng

AI总结:

本文提出一种基于模型编辑的可解释方法,通过识别并调整关键注意力头来增强大语言模型的语义一致性,在NLU和NLG数据集上显著提升性能并展现良好泛化能力。

摘要:

大语言模型(LLM)在面对与原始提示语义等价但表达方式不同的提示时,往往会产生不一致甚至相互矛盾的输出。为了实现LLM的语义一致性,关键方法之一是利用语义等价的提示-输出对来微调模型。尽管这种方法有效,但数据驱动的微调方法在数据准备和模型优化方面会产生大量的计算成本。在这种方式下,LLM被视为一个“黑箱”,限制了我们对其内部机制进行更深入洞察的能力。在本文中,我们旨在通过一种更具可解释性的方法(即模型编辑)来增强LLM的语义一致性。我们首先识别出对LLM语义一致性具有关键影响的模型组件(即注意力头)。随后,我们沿着语义一致性激活方向向这些模型组件的输出注入偏置。值得注意的是,这些修改具有成本效益,无需对原始模型参数进行大规模操作。通过在构建的自然语言理解(NLU)和开源自然语言生成(NLG)数据集上进行全面实验,我们的方法在LLM的语义一致性和任务性能方面表现出显著提升。此外,我们的方法在主要任务之外的任务上也表现良好,展现出良好的泛化能力。

英文摘要:

A Large Language Model (LLM) tends to generate inconsistent and sometimes contradictory outputs when presented with a prompt that has equivalent semantics but is expressed differently from the original prompt. To achieve semantic consistency of an LLM, one of the key approaches is to finetune the model with prompt-output pairs with semantically equivalent meanings. Despite its effectiveness, a data-driven finetuning method incurs substantial computation costs in data preparation and model optimization. In this regime, an LLM is treated as a ``black box'', restricting our ability to gain deeper insights into its internal mechanism. In this paper, we are motivated to enhance the semantic consistency of LLMs through a more interpretable method (i.e., model editing) to this end. We first identify the model components (i.e., attention heads) that have a key impact on the semantic consistency of an LLM. We subsequently inject biases into the output of these model components along the semantic-consistency activation direction. It is noteworthy that these modifications are cost-effective, without reliance on mass manipulations of the original model parameters. Through comprehensive experiments on the constructed NLU and open-source NLG datasets, our method demonstrates significant improvements in the semantic consistency and task performance of LLMs. Additionally, our method exhibits promising generalization capabilities by performing well on tasks beyond the primary tasks.

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

↑