arXiv:2606.03628cs.CLcs.AI2026-06中稿 · ICML

通过分段拒收幻觉内容,提升长文本生成的可信度。

Building Reliable Long-Form Generation via Hallucination Rejection Sampling

论文配图:Building Reliable Long-Form Generation via Hallucination Rejection Sampling
图 1 · 摘自论文原文
  • 生成时用检测器识别并剔除幻觉段落,重新采样直至准确
  • 在多个基准上显著减少幻觉,同时保持信息量
  • 无需外部知识库,适合需要高可靠性的长文本场景

大语言模型在开放域文本生成中表现优异,但容易产生错误或无依据的内容,尤其在长文本生成中因幻觉累积而问题加剧。为此,我们提出一种新的推理阶段幻觉缓解框架——分段幻觉拒收采样(SHARS),利用任意幻觉检测器识别并拒绝生成中的幻觉段落,反复采样直至生成忠实内容。通过仅保留高置信度信息并以此为基础构建后续输出,有效抑制幻觉传播,提升事实一致性。为实现该框架,我们采用语义不确定性作为检测器,并引入多项改进以更好适应长文本。方法无需依赖外部资源如网络搜索或知识库,同时兼容未来扩展。实证评估表明,在标准幻觉评测基准上,该方法显著降低长文本生成中的幻觉,同时保持甚至提升生成信息量。代码已开源:https://github.com/TreeLLi/hallucination-rejection-sampling。

原文摘要 · Abstract (English)

Large language models (LLMs) have achieved remarkable progress in open-ended text generation, yet they remain prone to hallucinating incorrect or unsupported content, which undermines their reliability. This issue is exacerbated in long-form generation due to hallucination snowballing, a phenomenon where early errors propagate and compound into subsequent outputs. To address this challenge, we propose a novel inference-time hallucination mitigation framework, named Segment-wise HAllucination Rejection Sampling (SHARS), which uses an arbitrary hallucination detector to identify and reject hallucinated segments during generation and resample until faithful content is produced. By retaining only confident information and building subsequent generations upon it, the framework mitigates hallucination accumulation and enhances factual consistency. To instantiate this framework, we adopt semantic uncertainty as the detector and introduce several vital modifications to address its limitations and better adapt it to long-form text. Our method enables models to self-correct hallucinations without requiring external resources such as web search or knowledge bases, while remaining compatible with them for future extensions. Empirical evaluations on standardized hallucination benchmarks demonstrate that our method substantially reduces hallucinations in long-form generation while preserving or even improving the informativeness of generation. Code is available at: https://github.com/TreeLLi/hallucination-rejection-sampling.

幻觉检测长文本生成推理优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。