arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.12137cs.CLcs.AI

Credal Transformer:一种量化并缓解大型语言模型幻觉的原则性方法

Credal Transformer: A Principled Approach for Quantifying and Mitigating Hallucinations in Large Language Models

Zaozhuang No.28 Middle School(邹庄28号中学);Tengzhou No.1 High School(滕州1号高中);Xi’an Jiaotong University(西安交通大学)

Shihao Ji, Zihui Song, Jiajie Huang

AI总结:

针对LLM幻觉问题,本文提出Credal Transformer,用基于证据理论的Credal注意力机制替代Softmax,通过credal集度量不确定性,并在不可回答问题上弃权以减少错误,提升可靠性。

摘要:

大型语言模型(LLM)会产生幻觉,生成事实上不正确却自信满满的断言。我们认为这源于Transformer的Softmax函数,它通过将模糊的注意力分数压缩成单一概率分布,在每一层丢弃不确定性信息,从而制造了“人工确定性”。为解决此问题,我们引入了Credal Transformer,它基于证据理论,用Credal注意力机制(CAM)取代标准注意力。CAM产生一个“credal集”(一组分布)而非单一注意力向量,该集合的大小直接度量模型的不确定性。我们通过将注意力分数重新概念化为狄利克雷分布的证据质量来实现这一点:充足的证据可恢复标准注意力,而证据不足则产生扩散分布,表示模糊性。实验上,Credal Transformer能识别分布外输入,量化模糊性,并通过弃权(不执行)显著减少在不可回答问题上的自信错误。我们的贡献是一种缓解幻觉的新架构,以及一种将不确定性量化直接集成到模型中的设计范式,为更可靠的AI奠定了基础。

英文摘要:

Large Language Models (LLMs) hallucinate, generating factually incorrect yet confident assertions. We argue this stems from the Transformer's Softmax function, which creates "Artificial Certainty" by collapsing ambiguous attention scores into a single probability distribution, discarding uncertainty information at each layer. To fix this, we introduce the Credal Transformer, which replaces standard attention with a Credal Attention Mechanism (CAM) based on evidential theory. CAM produces a "credal set" (a set of distributions) instead of a single attention vector, with the set's size directly measuring model uncertainty. We implement this by re-conceptualizing attention scores as evidence masses for a Dirichlet distribution: sufficient evidence recovers standard attention, while insufficient evidence yields a diffuse distribution, representing ambiguity. Empirically, the Credal Transformer identifies out-of-distribution inputs, quantifies ambiguity, and significantly reduces confident errors on unanswerable questions by abstaining. Our contribution is a new architecture to mitigate hallucinations and a design paradigm that integrates uncertainty quantification directly into the model, providing a foundation for more reliable AI.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑