Skip to main content
QUICK REVIEW

[论文解读] Knowledge Infused Decoding

Ruibo Liu, Guo‐qing Zheng|arXiv (Cornell University)|Apr 6, 2022
Topic Modeling被引用 11
一句话总结

知识注入解码(KID)是一种任务和模型无关的解码算法,通过强化学习优化的局部知识记忆和动态构建的知识字典树,动态地将外部知识注入自回归语言模型生成过程中。它在六个知识密集型自然语言生成(NLG)任务中显著提升了事实一致性与性能,优于多种强基线模型和任务优化模型,尤其在少样本设置下表现突出,且无需微调或架构修改。

ABSTRACT

Pre-trained language models (LMs) have been shown to memorize a substantial amount of knowledge from the pre-training corpora; however, they are still limited in recalling factually correct knowledge given a certain context. Hence, they tend to suffer from counterfactual or hallucinatory generation when used in knowledge-intensive natural language generation (NLG) tasks. Recent remedies to this problem focus on modifying either the pre-training or task fine-tuning objectives to incorporate knowledge, which normally require additional costly training or architecture modification of LMs for practical applications. We present Knowledge Infused Decoding (KID) -- a novel decoding algorithm for generative LMs, which dynamically infuses external knowledge into each step of the LM decoding. Specifically, we maintain a local knowledge memory based on the current context, interacting with a dynamically created external knowledge trie, and continuously update the local memory as a knowledge-aware constraint to guide decoding via reinforcement learning. On six diverse knowledge-intensive NLG tasks, task-agnostic LMs (e.g., GPT-2 and BART) armed with KID outperform many task-optimized state-of-the-art models, and show particularly strong performance in few-shot scenarios over seven related knowledge-infusion techniques. Human evaluation confirms KID's ability to generate more relevant and factual language for the input context when compared with multiple baselines. Finally, KID also alleviates exposure bias and provides stable generation quality when generating longer sequences. Code for KID is available at https://github.com/microsoft/KID.

研究动机与目标

  • 解决预训练语言模型在知识密集型生成过程中出现的事实幻化问题。
  • 克服类似RAG等模型中静态知识检索的局限性,这些模型在长序列生成过程中难以适应上下文的动态演变。
  • 开发一种轻量级、推理时可用的解决方案,提升事实一致性,且无需模型微调或架构修改。
  • 改善少样本泛化能力,并缓解长序列生成中的暴露偏差问题。
  • 通过可学习的、上下文感知的知识记忆,实现可解释且可控的知识注入。

提出的方法

  • KID维护一个局部知识记忆,作为有限的先进先出(FIFO)列表,用于存储从检索文档中获得的相关实体和事实。
  • 在每个解码步骤,KID从检索到的支持性文档中构建一个动态知识字典树,以高效检索相关知识。
  • 通过强化学习更新局部知识记忆,以引导解码过程,使下一个词的概率分布更倾向于与知识相关的实体。
  • 知识注入仅在推理阶段进行,使KID能够兼容任何预训练语言模型,无需微调或架构修改。
  • 该方法基于实体一致性与相关性的奖励信号,优化知识感知的解码策略。
  • KID可与标准解码策略(如束搜索或核采样)集成,通过实时知识约束增强其性能。

实验结果

研究问题

  • RQ1一种轻量级、推理时可用的解码方法是否能显著提升预训练语言模型的事实一致性,而无需微调或架构修改?
  • RQ2在长序列和多轮生成任务中,解码过程中的动态知识注入与静态检索方法相比有何差异?
  • RQ3与任务优化模型相比,KID在少样本和低资源设置下的泛化能力如何?
  • RQ4KID是否能有效缓解长序列生成中的暴露偏差?
  • RQ5通过强化学习实现的知识感知解码,是否能同时提升生成内容的相关性与事实性?

主要发现

  • KID在六个多样化的知识密集型NLG任务中显著优于传统的束搜索和采样方法,包括抽象摘要生成、对话生成和开放式故事生成。
  • 在ELI5和WoW基准测试中,与RAG及其他基线模型相比,KID生成的输出在事实性和相关性方面获得人类标注者1.5–2.0分的评分提升。
  • 在少样本设置下,KID超越了七种强基线的知识注入方法,展现出在低资源场景下更优的泛化能力与鲁棒性。
  • KID有效缓解了暴露偏差,在长序列生成中保持了稳定的事实质量,而RAG等模型常因上下文漂移导致偏离主题。
  • 仅使用GPT-2和BART模型,无需任何微调,KID在所有评估任务中均达到最先进性能,凸显其作为即插即用增强方法的有效性。
  • 知识字典树和局部记忆组件引入的推理开销极低,KID的内存占用保持在可管理范围(知识字典树小于10MB),每步推理成本约为O(1)。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。