SH2:自高亮犹豫机制助力更真实的解码
SH2: Self-Highlighted Hesitation Helps You Decode More Truthfully
AI总结:
针对大语言模型的幻觉问题,本文提出推理阶段的自高亮犹豫(SH2)方法,通过高亮低概率事实token并结合对比解码,无需额外数据或模型即可显著提升多个模型在幻觉任务上的事实生成准确性。
摘要:
大语言模型(LLM)在文本生成方面表现出色,但仍受幻觉问题困扰。本文提出一种推理阶段方法——自高亮犹豫(Self-Highlighted Hesitation,SH2),以帮助LLM更真实地解码。SH2基于信息论中的一个简单事实:对LLM而言,以较低概率预测的token往往比其他token更具信息量。我们的分析表明,LLM分配概率较低的token更可能与事实信息密切相关,例如名词、专有名词和形容词。因此,我们提出通过选择概率最低的token并将其拼接至原始上下文来“高亮”事实信息,从而迫使模型在生成前反复读取这些token并产生犹豫。在解码过程中,我们还采用对比解码来凸显犹豫带来的输出概率差异。实验结果表明,无需额外数据或模型的SH2能有效帮助LLM挖掘事实知识、区分幻觉语境。在多个幻觉任务上,SH2为LLaMA-7b、LLaMA2-7b和Mistral-7b带来了显著且一致的性能提升。
英文摘要:
Large language models (LLMs) demonstrate great performance in text generation. However, LLMs are still suffering from hallucinations. In this work, we propose an inference-time method, Self-Highlighted Hesitation (SH2), to help LLMs decode more truthfully. SH2 is based on a simple fact rooted in information theory that for an LLM, the tokens predicted with lower probabilities are prone to be more informative than others. Our analysis shows that the tokens assigned with lower probabilities by an LLM are more likely to be closely related to factual information, such as nouns, proper nouns, and adjectives. Therefore, we propose to ''highlight'' the factual information by selecting the tokens with the lowest probabilities and concatenating them to the original context, thus forcing the model to repeatedly read and hesitate on these tokens before generation. During decoding, we also adopt contrastive decoding to emphasize the difference in the output probabilities brought by the hesitation. Experimental results demonstrate that our SH2, requiring no additional data or models, can effectively help LLMs elicit factual knowledge and distinguish hallucinated contexts. Significant and consistent improvements are achieved by SH2 for LLaMA-7b, LLaMA2-7b and Mistral-7b on multiple hallucination tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。