LUMINA: Detecção de Alucinações em Sistemas RAG com Sinais de Conhecimento Contextual
LUMINA: Detecting Hallucinations in RAG System with Context-Knowledge Signals
September 26, 2025
Autores: Min-Hsuan Yeh, Yixuan Li, Tanwi Mallick
cs.AI
Resumo
A Geração Aumentada por Recuperação (RAG, do inglês Retrieval-Augmented Generation) visa mitigar alucinações em modelos de linguagem de grande escala (LLMs, do inglês Large Language Models) ao fundamentar as respostas em documentos recuperados. No entanto, LLMs baseados em RAG ainda apresentam alucinações mesmo quando fornecidos com contexto correto e suficiente. Uma linha crescente de pesquisas sugere que isso decorre de um desequilíbrio entre como os modelos utilizam o contexto externo e seu conhecimento interno, e várias abordagens têm tentado quantificar esses sinais para a detecção de alucinações. No entanto, os métodos existentes exigem um extenso ajuste de hiperparâmetros, limitando sua generalizabilidade. Propomos o LUMINA, uma estrutura inovadora que detecta alucinações em sistemas RAG por meio de sinais de contexto-conhecimento: a utilização do contexto externo é quantificada por meio de distância distribucional, enquanto a utilização do conhecimento interno é medida rastreando como os tokens previstos evoluem através das camadas do transformador. Além disso, introduzimos uma estrutura para validar estatisticamente essas medições. Experimentos em benchmarks comuns de alucinação em RAG e quatro LLMs de código aberto mostram que o LUMINA alcança consistentemente altas pontuações de AUROC e AUPRC, superando métodos anteriores baseados em utilização em até +13% de AUROC no HalluRAG. Adicionalmente, o LUMINA mantém-se robusto sob suposições relaxadas sobre a qualidade da recuperação e correspondência do modelo, oferecendo tanto eficácia quanto praticidade.
English
Retrieval-Augmented Generation (RAG) aims to mitigate hallucinations in large
language models (LLMs) by grounding responses in retrieved documents. Yet,
RAG-based LLMs still hallucinate even when provided with correct and sufficient
context. A growing line of work suggests that this stems from an imbalance
between how models use external context and their internal knowledge, and
several approaches have attempted to quantify these signals for hallucination
detection. However, existing methods require extensive hyperparameter tuning,
limiting their generalizability. We propose LUMINA, a novel framework that
detects hallucinations in RAG systems through context-knowledge signals:
external context utilization is quantified via distributional distance, while
internal knowledge utilization is measured by tracking how predicted tokens
evolve across transformer layers. We further introduce a framework for
statistically validating these measurements. Experiments on common RAG
hallucination benchmarks and four open-source LLMs show that LUMINA achieves
consistently high AUROC and AUPRC scores, outperforming prior utilization-based
methods by up to +13% AUROC on HalluRAG. Moreover, LUMINA remains robust under
relaxed assumptions about retrieval quality and model matching, offering both
effectiveness and practicality.