arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.00740cs.CL
收藏

检查与编辑语言模型中的知识表示

Inspecting and Editing Knowledge Representations in Language Models

Massachusetts Institute of Technology(麻省理工学院);Computer Science & Artificial Intelligence Laboratory(计算机科学与人工智能实验室)

Evan Hernandez, Belinda Z. Li, Jacob Andreas

AI总结:

本文提出 REMEDI 方法,将自然语言陈述映射为语言模型内部事实编码,既可用于编辑隐藏表示以改变生成,也可作为探针识别模型已有知识及潜在冲突输出。

摘要:

神经语言模型(LM)表示文本所描述的关于世界的事实。有时这些事实来自训练数据(在大多数 LM 中,词语“banana”的表示编码了香蕉是水果这一事实)。有时事实来自输入文本本身(句子“I poured out the bottle”的表示编码了瓶子变空这一事实)。我们描述了 REMEDI,这是一种学习将自然语言中的陈述映射到 LM 内部表示系统中的事实编码的方法。REMEDI 编码可用作知识编辑器:当被添加到 LM 的隐藏表示中时,它们会修改下游生成,使其与新事实保持一致。REMEDI 编码也可用作探针:当与 LM 表示进行比较时,它们揭示 LM 已经将哪些属性归于所提及的实体,在某些情况下使预测 LM 何时会生成与背景知识或输入文本相冲突的输出成为可能。因此,REMEDI 连接了关于探测、提示和 LM 编辑的研究,并为实现细粒度检查和控制 LM 中知识的通用工具提供了步骤。

英文摘要:

Neural language models (LMs) represent facts about the world described by text. Sometimes these facts derive from training data (in most LMs, a representation of the word "banana" encodes the fact that bananas are fruits). Sometimes facts derive from input text itself (a representation of the sentence "I poured out the bottle" encodes the fact that the bottle became empty). We describe REMEDI, a method for learning to map statements in natural language to fact encodings in an LM's internal representation system. REMEDI encodings can be used as knowledge editors: when added to LM hidden representations, they modify downstream generation to be consistent with new facts. REMEDI encodings may also be used as probes: when compared to LM representations, they reveal which properties LMs already attribute to mentioned entities, in some cases making it possible to predict when LMs will generate outputs that conflict with background knowledge or input text. REMEDI thus links work on probing, prompting, and LM editing, and offers steps toward general tools for fine-grained inspection and control of knowledge in LMs.

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

↑