Credal Transformer: A Principled Approach for Quantifying and Mitigating Hallucinations in Large Language Models
Ji, Song, Huang
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.
academic
Credal Transformer: 대규모 언어 모델의 환각 현상 정량화 및 완화를 위한 원칙적 접근법
대규모 언어 모델(LLMs)은 사실상 오류이지만 높은 신뢰도를 가진 주장을 생성하는 환각 현상을 겪고 있습니다. 본 논문은 이 문제가 Transformer의 Softmax 함수에서 비롯된다고 주장합니다. Softmax는 모호한 주의력 점수를 단일 확률 분포로 축약하여 "인공적 확실성"을 만들고, 각 계층의 불확실성 정보를 버립니다. 이 문제를 해결하기 위해 본 논문은 Credal Transformer를 제안합니다. 이는 표준 주의력을 증거 이론 기반의 Credal 주의력 메커니즘(CAM)으로 대체합니다. CAM은 단일 주의력 벡터가 아닌 "credal 집합"(분포 집합)을 생성하며, 집합의 크기는 모델의 불확실성을 직접 측정합니다. 주의력 점수를 Dirichlet 분포의 증거 품질로 재개념화하여 구현됩니다: 충분한 증거는 표준 주의력을 복구하고, 불충분한 증거는 모호성을 나타내는 확산 분포를 생성합니다. 실험 결과 Credal Transformer는 분포 외 입력을 식별하고, 모호성을 정량화하며, 기권을 통해 답변할 수 없는 질문에 대한 신뢰 오류를 크게 감소시킬 수 있음을 보여줍니다.
Vaswani et al. 2017: Attention is All You Need (Transformer 원본 논문)
Sensoy et al. 2018: Evidential Deep Learning (증거 심층학습 이론 기초)
Brown et al. 2020: GPT-3 논문 (대규모 언어 모델 기초)
Lewis et al. 2020: RAG 검색 증강 생성
Huang et al. 2025: 환각 현상 종합 검토
종합 평가: 이는 이론적 통찰과 기술 혁신 측면에서 모두 우수한 논문입니다. 저자들은 LLM 환각 문제의 아키텍처적 근본 원인을 식별하고 우아한 해결책을 제시했습니다. 대규모 검증과 이론 분석 측면에서 개선의 여지가 있지만, 핵심 아이디어와 방법은 중요한 학술적 가치와 실용적 잠재력을 가지고 있으며, 더욱 신뢰할 수 있는 AI 시스템 구축을 위한 중요한 기술적 기초를 제공합니다.