arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.06349cs.CLcs.AIcs.LG
收藏

RECKONING:通过动态知识编码进行推理

RECKONING: Reasoning through Dynamic Knowledge Encoding

EPFL(洛桑联邦理工学院);Stanford University(斯坦福大学);Meta AI Research(Meta AI研究院)

Zeming Chen, Gail Weiss, Eric Mitchell, Asli Celikyilmaz, Antoine Bosselut

AI总结:

针对语言模型上下文内推理易受干扰事实影响的问题,提出双层学习算法RECKONING,通过反向传播将上下文知识编码进模型参数实现推理,在多跳推理任务上性能、泛化性、鲁棒性和多问效率均优于基线。

摘要:

针对基于Transformer的语言模型的近期研究表明,这类模型可通过对上下文提供的知识进行推理来回答问题(即上下文内推理)。然而,由于可用知识通常未针对特定问题进行筛选,上下文内推理可能会受到干扰事实的影响——这类干扰事实是与当前问题无关、但可能与其他问题相关的额外内容(并非一定是随机噪声)。在这类场景中,模型无法区分回答问题所需的必要知识,导致推理失真、性能下降。这类推理失效的情况,与模型能够区分自身上下文知识和预训练阶段记忆的所有知识的表观能力形成了反差。基于这一观察,我们提出通过在向模型呈现问题前,将提供的上下文知识融入模型参数,来训练模型实现更鲁棒的推理。我们的方法RECKONING是一种双层学习算法,它通过反向传播更新语言模型的参数化知识来教模型推理,使模型随后可使用更新后的参数回答问题。在训练过程中,内循环会快速调整模型权重的副本,将上下文知识编码到其参数中;在外循环中,模型学习使用更新后的权重复现并回答与已记忆知识相关的推理问题。我们在两个多跳推理数据集上开展的实验表明,RECKONING的性能优于上下文内推理基线(最高提升4.5%)。我们还发现,与上下文内推理相比,RECKONING对训练期间未见过的更长推理链泛化能力更好,对上下文中的干扰项鲁棒性更强,且在针对同一知识提出多个问题时计算效率更高。

英文摘要:

Recent studies on transformer-based language models show that they can answer questions by reasoning over knowledge provided as part of the context (i.e., in-context reasoning). However, since the available knowledge is often not filtered for a particular question, in-context reasoning can be sensitive to distractor facts, additional content that is irrelevant to a question but that may be relevant for a different question (i.e., not necessarily random noise). In these situations, the model fails to distinguish the knowledge that is necessary to answer the question, leading to spurious reasoning and degraded performance. This reasoning failure contrasts with the model's apparent ability to distinguish its contextual knowledge from all the knowledge it has memorized during pre-training. Following this observation, we propose teaching the model to reason more robustly by folding the provided contextual knowledge into the model's parameters before presenting it with a question. Our method, RECKONING, is a bi-level learning algorithm that teaches language models to reason by updating their parametric knowledge through back-propagation, allowing them to then answer questions using the updated parameters. During training, the inner loop rapidly adapts a copy of the model weights to encode contextual knowledge into its parameters. In the outer loop, the model learns to use the updated weights to reproduce and answer reasoning questions about the memorized knowledge. Our experiments on two multi-hop reasoning datasets show that RECKONING's performance improves over the in-context reasoning baseline (by up to 4.5%). We also find that compared to in-context reasoning, RECKONING generalizes better to longer reasoning chains unseen during training, is more robust to distractors in the context, and is more computationally efficient when multiple questions are asked about the same knowledge.

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

↑