arXiv:2605.05953cs.CLcs.AI2026-05被引 1

用概率电路检测大模型幻觉,只修正错误内容,保留正确生成。

Hallucination as an Anomaly: Dynamic Intervention via Probabilistic Circuits

论文配图:Hallucination as an Anomaly: Dynamic Intervention via Probabilistic Circuits
图 1 · 摘自论文原文
  • 基于概率电路构建可解析密度估计器,通过负对数似然精准识别幻觉
  • 在多个基准上实现接近完美的幻觉检测,最高AUROC达99%
  • 动态干预机制仅修正异常隐藏状态,有效降低53.7%的错误率

大型语言模型易产生事实性错误(即幻觉)。现有方法虽有一定成效,但常对所有词元统一修正,破坏原本正确的生成。为此,我们提出PCNET,一种训练为大模型残差流上可解析密度估计器的概率电路。该方法将幻觉视为事实流形上的几何异常,通过精确计算负对数似然实现检测,无需采样、外部验证器或权重修改。为验证有效性,我们以PCNET作为动态门控机制,在每一步解码中区分幻觉与真实隐藏状态,并触发第二项贡献:仅当隐空间几何偏离事实区域时启用的PC-LDCD(概率电路潜在密度对比解码)。在四个从1B到8B参数量的模型上,针对对话推理、知识密集型问答、阅读理解及真实性四项任务测试,PCNET在CoQA、SQuAD v2.0和TriviaQA上实现近完美幻觉检测,最高AUROC达99%。同时,PC-LDCD在TruthfulQA上三款模型取得最高True+Info、MC2、MC3得分,平均错误率降低至53.7%,正确内容保留率达79.3%。方法已开源于GitHub。

原文摘要 · Abstract (English)

One of the most critical challenges in Large Language Models is their tendency to hallucinate, i.e., produce factually incorrect responses. Existing approaches show promising results in terms of hallucination correction, but still suffer from a main limitation: they apply corrections indiscriminately to every token, corrupting also the originally correct generations. To overcome this drawback, we propose PCNET, a Probabilistic Circuit trained as a tractable density estimator over the LLM residual stream. The method detects hallucinations as geometric anomalies on the factual manifold, which is done via exact Negative Log-Likelihood computation, hence without the need for sampling, external verifiers, or weight modifications, as in existing techniques. To demonstrate its effectiveness, we exploit PCNET as a dynamic gate that distinguishes hallucinated from factual hidden states at each decoding step. This triggers our second main contribution, PC-LDCD (Probabilistic Circuit Latent Density Contrastive Decoding), only when the latent geometry deviates from factual regions, while leaving correct generations untouched. Across four LLMs, ranging from 1B to 8B models, and four benchmarks covering conversational reasoning, knowledge-intensive QA, reading comprehension, and truthfulness, PCNET achieves near-perfect hallucination detection across CoQA, SQuAD v2.0, and TriviaQA, with AUROC reaching up to 99%. Moreover, PC-LDCD obtains the highest True+Info, MC2, and MC3 scores on TruthfulQA in three out of four models, in comparison with state-of-the-art baselines, while reducing the mean corruption rate to 53.7% and achieving a preservation rate of 79.3%. Our proposed method is publicly available on GitHub.

幻觉检测概率电路动态修正大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。