通过多样化幻觉诱导提升大模型事实性控制能力
DHI: Leveraging Diverse Hallucination Induction for Enhanced Contrastive Factuality Control in Large Language Models
- 设计新损失函数,让恶意模型生成更多样幻觉
- 在多个基准上显著优于现有对比解码方法
- 适合需要高可靠性文本生成的研究与应用
大语言模型常产生不准确或虚构信息,即“幻觉”,影响其可信度。现有方法通过训练一个‘恶意模型’在特定数据集上故意生成幻觉,利用这些幻觉引导对比解码以抑制幻觉。但该策略受限于幻觉类型单一,因恶意模型仅重复特定错误模式。为此,我们提出DHI(多样化幻觉诱导)框架,使恶意模型无需依赖预标注幻觉数据即可生成更广泛类型的幻觉。DHI采用改进损失函数,降低特定事实正确词元的生成概率,鼓励在目标位置生成多样幻觉,同时保持整体事实性;引入因果注意力掩码适应,减轻惩罚对后续词元生成的影响。推理时,采用自适应合理性约束,仅在正向模型置信度高时进行对比解码,避免对正确词元施加不必要的惩罚。大量实验证明,DHI在多个幻觉基准测试中显著优于其他对比解码方法。
原文摘要 · Abstract (English)
Large language models (LLMs) frequently produce inaccurate or fabricated information, known as "hallucinations," which compromises their reliability. Existing approaches often train an "Evil LLM" to deliberately generate hallucinations on curated datasets, using these induced hallucinations to guide contrastive decoding against a reliable "positive model" for hallucination mitigation. However, this strategy is limited by the narrow diversity of hallucinations induced, as Evil LLMs trained on specific error types tend to reproduce only these particular patterns, thereby restricting their overall effectiveness. To address these limitations, we propose DHI (Diverse Hallucination Induction), a novel training framework that enables the Evil LLM to generate a broader range of hallucination types without relying on pre-annotated hallucination data. DHI employs a modified loss function that down-weights the generation of specific factually correct tokens, encouraging the Evil LLM to produce diverse hallucinations at targeted positions while maintaining overall factual content. Additionally, we introduce a causal attention masking adaptation to reduce the impact of this penalization on the generation of subsequent tokens. During inference, we apply an adaptive rationality constraint that restricts contrastive decoding to tokens where the positive model exhibits high confidence, thereby avoiding unnecessary penalties on factually correct tokens. Extensive empirical results show that DHI achieves significant performance gains over other contrastive decoding-based approaches across multiple hallucination benchmarks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。