HalluShift: Measuring Distribution Shifts towards Hallucination Detection in LLMs

Sharanya Dasgupta, Sujoy Nath, Arkaprabha Basu, Pourya Shamsolmoali, Swagatam Das
4/13/2025
cs.CLcs.AIcs.ET

Official code: sharanya-dasgupta001/hallushift (4 stars, MIT, last commit 2026-01-18).

Abstract

Large Language Models (LLMs) have recently garnered widespread attention due to their adeptness at generating innovative responses to the given prompts across a multitude of domains. However, LLMs often suffer from the inherent limitation of hallucinations and generate incorrect information while maintaining well-structured and coherent responses. In this work, we hypothesize that hallucinations stem from the internal dynamics of LLMs. Our observations indicate that, during passage generation, LLMs tend to deviate from factual accuracy in subtle parts of responses, eventually shifting toward misinformation. This phenomenon bears a resemblance to human cognition, where individuals may hallucinate while maintaining logical coherence, embedding uncertainty within minor segments of their speech. To investigate this further, we introduce an innovative approach, HalluShift, designed to analyze the distribution shifts in the internal state space and token probabilities of the LLM-generated responses. Our method attains superior performance compared to existing baselines across various benchmark datasets. Our codebase is available at https://github.com/sharanya-dasgupta001/hallushift.

View on arXivView PDF

Code Implementations(1)

MIT

Accepted at 2025 International Joint Conference on Neural Networks (IJCNN)

41PythonJan 24, 20259 months agoMIT
distribution-shiftshallucination-detectionllms

Similar Papers

Cite this paper

@article{dasgupta2025hallushift,
  title  = {HalluShift: Measuring Distribution Shifts towards Hallucination Detection in LLMs},
  author = {Sharanya Dasgupta and Sujoy Nath and Arkaprabha Basu and Pourya Shamsolmoali and Swagatam Das},
  year   = {2025},
  eprint = {2504.09482},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.09482v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.09482.svg)](https://codeofpaper.com/paper/2504.09482)

Discussion