arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2104.08164cs.CLcs.AIcs.LG
收藏

语言模型中事实知识的编辑

Editing Factual Knowledge in Language Models

University of Amsterdam(阿姆斯特丹大学);University of Edinburgh(爱丁堡大学)

Nicola De Cao, Wilker Aziz, Ivan Titov

摘要:

在预训练期间获得并存储在语言模型(LM)的参数中的事实知识可以在下游任务(例如,问答或文本推理)。然而,有些事实可能会被错误地归纳或随着时间的推移而过时。我们提出了KnowledgeEditor,这是一种可用于编辑此知识的方法,从而修复“错误”或意外预测,而无需昂贵的重新训练或微调。除了计算效率高之外,KnowledgeEditor不需要在LM预训练中进行任何修改(例如,使用元学习)。在我们的方法中,我们训练一个超网络与约束优化修改的事实,而不影响其余的知识,训练的超网络,然后用于预测在测试时的权重更新。我们展示了KnowledgeEditor在两种流行架构和知识密集型任务中的功效:i)针对事实检查进行微调的BERT模型,以及ii)针对问答的序列到序列BART模型。使用我们的方法,改变对查询的特定措辞的预测往往会导致对其释义的预测的一致变化。我们表明,这可以进一步鼓励利用(例如,自动生成的)释义。有趣的是,我们的超网络可以被看作是一个“探针”,揭示了哪些组件需要改变来操纵事实知识;我们的分析表明,更新往往集中在一个小的组件子集上。源代码可在https://github.com/nicola-decao/KnowledgeEditor获得

英文摘要:

The factual knowledge acquired during pre-training and stored in the parameters of Language Models (LMs) can be useful in downstream tasks (e.g., question answering or textual inference). However, some facts can be incorrectly induced or become obsolete over time. We present KnowledgeEditor, a method which can be used to edit this knowledge and, thus, fix 'bugs' or unexpected predictions without the need for expensive re-training or fine-tuning. Besides being computationally efficient, KnowledgeEditordoes not require any modifications in LM pre-training (e.g., the use of meta-learning). In our approach, we train a hyper-network with constrained optimization to modify a fact without affecting the rest of the knowledge; the trained hyper-network is then used to predict the weight update at test time. We show KnowledgeEditor's efficacy with two popular architectures and knowledge-intensive tasks: i) a BERT model fine-tuned for fact-checking, and ii) a sequence-to-sequence BART model for question answering. With our method, changing a prediction on the specific wording of a query tends to result in a consistent change in predictions also for its paraphrases. We show that this can be further encouraged by exploiting (e.g., automatically-generated) paraphrases during training. Interestingly, our hyper-network can be regarded as a 'probe' revealing which components need to be changed to manipulate factual knowledge; our analysis shows that the updates tend to be concentrated on a small subset of components. Source code available at https://github.com/nicola-decao/KnowledgeEditor

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

↑