边生成边检测假话,实时修正关键错误词元
Monitoring Decoding: Mitigating Hallucination via Evaluating the Factuality of Partial Response during Generation
- 用监控函数实时识别生成中易出错的词元
- 通过树状解码策略重写错误词元,提升事实准确率
- 比多轮采样更高效,适合对速度敏感的应用
大型语言模型虽在诸多任务上表现优异,但仍易产生幻觉——生成看似合理却事实错误的内容。现有缓解方法多依赖多次完整生成采样,导致响应延迟高,且当模型以高置信度持续输出幻觉内容时效果不佳。为此,本文提出动态监控解码(Monitoring Decoding, MD)框架,通过在生成过程中实时监控并选择性干预,聚焦于修正导致幻觉的关键词元。相比等待多个完整生成结果,MD利用监控函数识别生成过程中的幻觉风险词元,并通过树状解码策略进行重写。实验表明,MD在事实准确性和效率上均优于自洽性方法,显著降低计算开销的同时保持输出连贯性。
原文摘要 · Abstract (English)
While large language models have demonstrated exceptional performance across a wide range of tasks, they remain susceptible to hallucinations -- generating plausible yet factually incorrect contents. Existing methods to mitigating such risk often rely on sampling multiple full-length generations, which introduces significant response latency and becomes ineffective when the model consistently produces hallucinated outputs with high confidence. To address these limitations, we introduce Monitoring Decoding (MD), a novel framework that dynamically monitors the generation process and selectively applies in-process interventions, focusing on revising crucial tokens responsible for hallucinations. Instead of waiting until completion of multiple full-length generations, we identify hallucination-prone tokens during generation using a monitor function, and further refine these tokens through a tree-based decoding strategy. This approach ensures an enhanced factual accuracy and coherence in the generated output while maintaining efficiency. Experimental results demonstrate that MD consistently outperforms self-consistency-based approaches in both effectiveness and efficiency, achieving higher factual accuracy while significantly reducing computational overhead.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。