arXiv:2609.11878cs.CLSep 2026

Manuscript Offprint

arXiv:2609.11878

Domain-Specific Hallucination Detection in Large Language Models

Varun Teja Chundru, Debasmita Biswas

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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. 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.

1 Introduction

Large language models (LLMs) produce text that is syntactically fluent and contextually plausible but can contain fabricated facts, misattributed claims, and unsupported inferences (Ji et al., 2023). These hallucinations pose a significant barrier to deploying LLMs in high-stakes domains such as medicine, law, and scientific research, where factual accuracy is essential.

The hallucination detection problem can be formulated as a natural language inference (NLI) task: given a knowledge source K, a prompt Q, and a generated response R, determine whether R is faithful to or hallucinated with respect to K. While prior work has explored entailment-based and retrieval-based approaches, two critical gaps remain. First, single-model detectors provide point estimates without conveying prediction confidence, leaving practitioners unable to distinguish high-certainty detections from ambiguous cases. Second, detectors trained on general-domain benchmarks often fail on specialized domains where terminology and reasoning patterns differ substantially.

This paper makes four contributions, organized around three experiments—detection, mitigation, and cross-domain transfer. (1) We develop a multi-signal detection pipeline combining fine-tuned DeBERTa-v3 with MC Dropout uncertainty, achieving F1=0.915 and AUROC=0.977 on HaluEval. (2) We conduct ablation studies—context removal, learning curves, and ensemble analysis—characterizing when and why the detector succeeds. (3) We show that DPO reduces hallucination rates by 55.9% in a generator, evaluated by our detector in a closed-loop setup. (4) We evaluate cross-domain transfer to SciFact and show that PubMedBERT fine-tuning achieves AUROC=0.808, demonstrating that domain-matched pre-training is the most effective adaptation strategy.