Domain-Specific Hallucination Detection in Large Language Models

Varun Teja Chundru, Debasmita Biswas
9/10/2026
cs.CLcs.AIcs.LG
rlhf-rlvr-dpo

Official code: varunteja99/hallucination-detection-nlp (1 star, Jupyter Notebook, last commit 2026-04-29).

Abstract

Large language models generate fluent text that can contain unfaithful claims -- a phenomenon known as hallucination. We present a multi-signal detection pipeline combining fine-tuned DeBERTa-v3 classification, Monte Carlo (MC) Dropout uncertainty quantification, and temperature-scaled calibration for response-level hallucination detection.

Show full abstract

Evaluated on the HaluEval benchmark, our pipeline achieves F1=0.915 and AUROC=0.977 on general-domain tasks, with per-task F1 scores of 0.97 (QA), 0.96 (Summarization), and 0.82 (Dialogue). MC Dropout inference further improves accuracy to 93.2%. A context ablation study confirms the model performs genuine entailment reasoning rather than exploiting surface patterns, with summarization F1 dropping 24% when knowledge context is removed. Learning curve analysis reveals that 25% of training data captures 77% of full-data performance. Beyond detection, we apply Direct Preference Optimization (DPO) to a Qwen2.5-0.5B generator, reducing its hallucination rate from 85.5% to 37.7% (55.9% relative reduction) as measured by our detector. Cross-domain evaluation on the SciFact biomedical benchmark shows that general-domain training transfers poorly (F1=0.52), motivating domain-specific fine-tuning. PubMedBERT fine-tuned on SciFact achieves F1=0.63 and AUROC=0.81, demonstrating that domain-matched pre-training is the strongest adaptation strategy. Code and models are available at https://github.com/varunteja99/hallucination-detection-nlp

View on arXivView PDF

Code Implementations(1)

Domain-specific hallucination detection in LLM outputs using NLI, retrieval-augmented verification, and uncertainty quantification — CS 59300 NLP, Purdue University (Spring 2026)

10Jupyter Notebook, TeXMar 17, 20267 months ago

Similar Papers

Cite this paper

@article{chundru2026domainspecific,
  title  = {Domain-Specific Hallucination Detection in Large Language Models},
  author = {Varun Teja Chundru and Debasmita Biswas},
  year   = {2026},
  eprint = {2609.11878},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.11878v1}
}

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/2609.11878.svg)](https://codeofpaper.com/paper/2609.11878)

Discussion