一种用于大语言模型幻觉检测的图信号处理框架
A Graph Signal Processing Framework for Hallucination Detection in Large Language Models
AI总结:
针对大语言模型幻觉检测难题,提出基于注意力动态图的图信号处理谱分析框架,定义多种谱诊断指标,在GPT架构上验证了不同幻觉的谱特征差异,检测器准确率优于困惑度基线。
摘要:
大语言模型取得了令人瞩目的成果,但区分事实推理与幻觉仍然具有挑战性。我们提出了一种谱分析框架,将Transformer层建模为由注意力机制诱导的动态图,其中令牌嵌入作为这些图上的信号。通过图信号处理,我们定义了包括Dirichlet能量、谱熵和高频能量比在内的诊断指标,并建立了其与计算稳定性的理论关联。在GPT架构上开展的实验表明存在通用的谱模式:事实性陈述呈现出一致的“能量山”行为,伴随低频收敛;而不同类型的幻觉表现出截然不同的特征。逻辑矛盾会使谱失稳,效应量较大($g>1.0$);语义错误保持稳定但出现连通性漂移;替换类幻觉则表现出中等程度的扰动。一个利用谱特征的简单检测器达到了88.75%的准确率,而基于困惑度的基线仅为75%,证明了其实用价值。这些发现表明,谱几何或许能够捕捉推理模式和错误行为,有望为大语言模型的幻觉检测提供一个框架。
英文摘要:
Large language models achieve impressive results but distinguishing factual reasoning from hallucinations remains challenging. We propose a spectral analysis framework that models transformer layers as dynamic graphs induced by attention, with token embeddings as signals on these graphs. Through graph signal processing, we define diagnostics including Dirichlet energy, spectral entropy, and high-frequency energy ratios, with theoretical connections to computational stability. Experiments across GPT architectures suggest universal spectral patterns: factual statements exhibit consistent "energy mountain" behavior with low-frequency convergence, while different hallucination types show distinct signatures. Logical contradictions destabilize spectra with large effect sizes ($g>1.0$), semantic errors remain stable but show connectivity drift, and substitution hallucinations display intermediate perturbations. A simple detector using spectral signatures achieves 88.75% accuracy versus 75% for perplexity-based baselines, demonstrating practical utility. These findings indicate that spectral geometry may capture reasoning patterns and error behaviors, potentially offering a framework for hallucination detection in large language models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。