利用大语言模型内部层进行幻觉检测
Hallucination Detection with the Internal Layers of LLMs
AI总结:
本文提出一种动态加权组合LLM内部层的新架构用于幻觉检测,在TruthfulQA、HaluEval和ReFact三个基准上验证其优于传统探测方法,并证明跨基准训练与参数冻结可缓解泛化局限。
摘要:
大语言模型(LLMs)已在多种自然语言处理任务中取得成功[Zha+25]。然而,它们存在显著局限。LLMs倾向于生成幻觉,即看似合理但缺乏事实依据的输出[Hua+24],这会带来严重的现实后果[Kay23; Rum+24]。近期研究表明,利用LLMs内部表示的基于探测的分类器能够检测幻觉[AM23; Bei+24; Bur+24; DYT24; Ji+24; SMZ24; Su+24]。由于该方法不涉及模型训练,因此可以在不显著增加计算成本的情况下提升可靠性。在此方法基础上,本论文提出了利用LLM内部表示进行幻觉检测的新方法,并在三个基准上进行了评估:TruthfulQA、HaluEval和ReFact。具体而言,本文开发了一种新架构,该架构动态加权并组合LLM内部层,以提高幻觉检测性能。通过大量实验,获得了两个关键发现:第一,与传统探测方法相比,所提方法取得了更优的性能,尽管跨基准和跨LLM的泛化仍然具有挑战性。第二,实验证明这些泛化局限可以通过跨基准训练和参数冻结来缓解。虽然并非持续改进,但两种技术均在单个基准上取得了更好的性能,并在迁移到其他基准时减少了性能下降。这些发现为通过内部表示分析提升LLM可靠性开辟了新途径。
英文摘要:
Large Language Models (LLMs) have succeeded in a variety of natural language processing tasks [Zha+25]. However, they have notable limitations. LLMs tend to generate hallucinations, a seemingly plausible yet factually unsupported output [Hua+24], which have serious real-world consequences [Kay23; Rum+24]. Recent work has shown that probing-based classifiers that utilize LLMs' internal representations can detect hallucinations [AM23; Bei+24; Bur+24; DYT24; Ji+24; SMZ24; Su+24]. This approach, since it does not involve model training, can enhance reliability without significantly increasing computational costs. Building upon this approach, this thesis proposed novel methods for hallucination detection using LLM internal representations and evaluated them across three benchmarks: TruthfulQA, HaluEval, and ReFact. Specifically, a new architecture that dynamically weights and combines internal LLM layers was developed to improve hallucination detection performance. Throughout extensive experiments, two key findings were obtained: First, the proposed approach was shown to achieve superior performance compared to traditional probing methods, though generalization across benchmarks and LLMs remains challenging. Second, these generalization limitations were demonstrated to be mitigated through cross-benchmark training and parameter freezing. While not consistently improving, both techniques yielded better performance on individual benchmarks and reduced performance degradation when transferred to other benchmarks. These findings open new avenues for improving LLM reliability through internal representation analysis.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。