The reliability of large language models remains a critical challenge, particularly due to their susceptibility to hallucinations and factual inaccuracies during text generation. Existing solutions either underutilize models' self-correction with preemptive strategies or use costly post-hoc verification. To further explore the potential of real-time self-verification and correction, we present Dynamic Self-Verify Decoding (DSVD), a novel decoding framework that enhances generation reliability through real-time hallucination detection and efficient error correction. DSVD integrates two key components: (1) parallel self-verification architecture for continuous quality assessment, (2) dynamic rollback mechanism for targeted error recovery. Extensive experiments across five benchmarks demonstrate DSVD's effectiveness, achieving significant improvement in truthfulness (Quesetion-Answering) and factual accuracy (FActScore). Results show the DSVD can be further incorporated with existing faithful decoding methods to achieve stronger performance. Our work establishes that real-time self-verification during generation offers a viable path toward more trustworthy language models without sacrificing practical deployability.
翻译:大语言模型的可靠性仍然是一个关键挑战,这主要源于其在文本生成过程中容易产生幻觉和事实性错误。现有解决方案要么采用预防性策略而未能充分利用模型的自我纠正能力,要么依赖于成本高昂的事后验证。为了进一步探索实时自验证与纠正的潜力,我们提出了动态自验证解码(DSVD),这是一种新颖的解码框架,通过实时幻觉检测和高效错误纠正来提升生成可靠性。DSVD集成了两个关键组件:(1)用于持续质量评估的并行自验证架构,(2)用于针对性错误恢复的动态回滚机制。在五个基准测试上的广泛实验证明了DSVD的有效性,其在真实性(问答任务)和事实准确性(FActScore)方面均取得了显著提升。结果表明,DSVD可以进一步与现有的忠实解码方法结合,以实现更强的性能。我们的工作证实,在生成过程中进行实时自验证为构建更可信的语言模型提供了一条可行路径,且无需牺牲实际部署的可行性。