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

知识注入解码

Knowledge Infused Decoding

Dartmouth College(达特茅斯学院);Microsoft(微软);Northwestern University(西北大学)

Ruibo Liu, Guoqing Zheng, Shashank Gupta, Radhika Gaonkar, Chongyang Gao, Soroush Vosoughi, Milad Shokouhi, Ahmed Hassan Awadallah

摘要:

预训练的语言模型(LM)已经被证明可以从预训练语料库中记住大量的知识;然而,它们在给定特定上下文的情况下仍然受限于回忆事实上正确的知识。因此,当用于知识密集型自然语言生成(NLG)任务时,它们往往会遭受反事实或幻觉生成。最近的补救措施,这个问题的重点是修改预训练或任务微调目标,以纳入知识,这通常需要额外的昂贵的培训或架构修改LM的实际应用。我们提出了知识注入解码(KID)-一种新的解码算法生成LM,动态注入外部知识到LM解码的每一步。具体来说,我们保持一个本地知识记忆的基础上,当前的背景下,与动态创建的外部知识trie进行交互,并不断更新本地存储器作为知识感知的约束,以指导解码通过强化学习。在六个不同的知识密集型NLG任务上,任务不可知的LM(例如,GPT-2和BART)配备KID的性能优于许多任务优化的最先进的模型,并显示出特别强大的性能在Few-Shot的情况下超过七个相关的知识注入技术。人工评估证实,与多个基线相比,KID能够为输入上下文生成更相关和更真实的语言。最后,KID还消除了曝光偏差,并在生成较长序列时提供稳定的生成质量。KID代码可在https://github.com/microsoft/KID上获得。

英文摘要:

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.

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

↑