Detecting Hallucination in LLMs: Tracing the Topological Signatures of Impaired Context Sharing
Detecting Hallucination in LLMs: Tracing the Topological Signatures of Impaired Context Sharing
检测大语言模型中的幻觉:追踪上下文共享受损的拓扑特征
Abstract: In this work, we examine the topology of information flow patterns within attention graphs to effectively distinguish hallucinated from non-hallucinated responses. We analyze the Forman-Ricci curvature to identify structural patterns indicating information bottlenecks in attention graphs.
摘要: 在这项工作中,我们研究了注意力图中信息流模式的拓扑结构,以有效区分幻觉响应与非幻觉响应。我们分析了 Forman-Ricci 曲率,以识别注意力图中指示信息瓶颈的结构模式。
We then introduce a method that captures both semi-local and global information-flow characteristics of attention heads associated with hallucinated responses. We evaluate our approach extensively across several LLMs and established benchmarks.
随后,我们引入了一种能够捕捉与幻觉响应相关的注意力头中半局部和全局信息流特征的方法。我们在多个大语言模型和既定基准测试中对我们的方法进行了广泛评估。
Empirical results demonstrate that our proposed single-pass approach provides consistent improvements over existing attention-based and multi-response baselines across two hallucination-detection benchmarks, while achieving competitive performance across diverse LLM architectures.
实证结果表明,我们提出的单次传递(single-pass)方法在两个幻觉检测基准测试中,相较于现有的基于注意力和多响应的基准模型,提供了持续的改进,同时在多种大语言模型架构中实现了具有竞争力的性能。
Further analysis reveals that impaired context sharing among tokens during causal generation is strongly associated with hallucination occurrences in LLMs. In particular, hallucinated responses are consistently characterized by an over-reliance on self-attention, diffused context retrieval from earlier tokens, or information over-squashing, especially in the final transformer layer.
进一步分析表明,因果生成过程中标记(token)之间受损的上下文共享与大语言模型中幻觉的发生密切相关。特别是,幻觉响应通常表现为对自注意力的过度依赖、从早期标记中检索到的上下文分散,或信息过度压缩(information over-squashing),尤其是在 Transformer 的最后一层中表现得尤为明显。