通过迭代对比学习,让大模型更少编造内容。
Iter-AHMCL: Alleviate Hallucination for Large Language Model via Iterative Model-level Contrastive Learning
- 用有无幻觉的数据训练正负模型,对比差异修正表示层。
- 在TruthfulQA上平均提升10.1分,显著降低幻觉率。
- 适合需要高真实性的文本生成场景,如科研摘要、知识图谱。
大型语言模型(LLMs)在科学文献摘要、写作辅助和知识图谱构建等商业与科研领域取得了显著进展,但推理过程中存在高风险的幻觉问题,可能导致事实错误、信息矛盾或虚构内容,带来安全隐患。为解决此问题,需在保持模型原有能力的前提下有效减少幻觉。本文提出一种名为迭代模型级对比学习(Iter-AHMCL)的新方法,通过在预训练LLM的表示层引入基于有幻觉与无幻觉数据训练的正负对比模型,利用两者差异构建去幻觉路径。其迭代式对比学习机制进一步提升了性能。在四个预训练基础模型(LLaMA2、Alpaca、LLaMA3、Qwen)上使用自定义数据集微调的实验表明,该方法在TruthfulQA基准测试中平均提升10.1分。全面实验证明Iter-AHMCL能有效抑制幻觉,同时维持LLM的通用能力。
原文摘要 · Abstract (English)
The development of Large Language Models (LLMs) has significantly advanced various AI applications in commercial and scientific research fields, such as scientific literature summarization, writing assistance, and knowledge graph construction. However, a significant challenge is the high risk of hallucination during LLM inference, which can lead to security concerns like factual inaccuracies, inconsistent information, and fabricated content. To tackle this issue, it is essential to develop effective methods for reducing hallucination while maintaining the original capabilities of the LLM. This paper introduces a novel approach called Iterative Model-level Contrastive Learning (Iter-AHMCL) to address hallucination. This method modifies the representation layers of pre-trained LLMs by using contrastive `positive' and `negative' models, trained on data with and without hallucinations. By leveraging the differences between these two models, we create a more straightforward pathway to eliminate hallucinations, and the iterative nature of contrastive learning further enhances performance. Experimental validation on four pre-trained foundation LLMs (LLaMA2, Alpaca, LLaMA3, and Qwen) finetuning with a specially designed dataset shows that our approach achieves an average improvement of 10.1 points on the TruthfulQA benchmark. Comprehensive experiments demonstrate the effectiveness of Iter-AHMCL in reducing hallucination while maintaining the general capabilities of LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。