Semantic Uncertainty Quantification of Hallucinations in LLMs: A Quantum Tensor Network Based Method
Pragatheeswaran Vipulanandan, Kamal Premaratne, Dilip Sarkar
TL;DR
The paper tackles the challenge of hallucinations in LLMs by introducing a physics-inspired uncertainty framework that treats token-sequence probabilities as a data wave function within a quantum tensor network (QTN). It combines semantic clustering via bidirectional entailment with a kernel-based Rényi entropy (SE_R) and a perturbation-based UQ pipeline to calibrate TS probabilities through a maximum-entropy objective, resulting in an uncertainty-adjusted probability $p_s^{(r)^*}$. The method is validated across TriviaQA, NQ-Open, SVAMP, and SQuAD on diverse models, including quantized variants, with 116 experiments showing robust improvements in AUROC and AURAC without supervised fine-tuning. The approach enables principled, scalable hallucination detection and even informed answer selection under resource constraints, highlighting its practical potential for safer LLM deployment. Limitations include reliance on external entailment predictors and access to token-level probabilities, suggesting avenues for future work with larger models and black-box settings, while maintaining the core idea of uncertainty-aware semantic evaluation.
Abstract
Large language models (LLMs) exhibit strong generative capabilities but remain vulnerable to confabulations, fluent yet unreliable outputs that vary arbitrarily even under identical prompts. Leveraging a quantum tensor network based pipeline, we propose a quantum physics inspired uncertainty quantification framework that accounts for aleatoric uncertainty in token sequence probability for semantic equivalence based clustering of LLM generations. This offers a principled and interpretable scheme for hallucination detection. We further introduce an entropy maximization strategy that prioritizes high certainty, semantically coherent outputs and highlights entropy regions where LLM decisions are likely to be unreliable, offering practical guidelines for when human oversight is warranted. We evaluate the robustness of our scheme under different generation lengths and quantization levels, dimensions overlooked in prior studies, demonstrating that our approach remains reliable even in resource constrained deployments. A total of 116 experiments on TriviaQA, NQ, SVAMP, and SQuAD across multiple architectures including Mistral-7B, Mistral-7B-instruct, Falcon-rw-1b, LLaMA-3.2-1b, LLaMA-2-13b-chat, LLaMA-2-7b-chat, LLaMA-2-13b, and LLaMA-2-7b show consistent improvements in AUROC and AURAC over state of the art baselines.
