Skip to content

Real-time hallucination detection and intervention in medical LLMs via calibrated hidden-state probes

Jul 2026 · Journal of Biomedical Informatics · Vol 181, pp. 105081 · 0 citations · 23 references
Computer Science Medicine

TL;DR

A calibrated hidden-state probing pipeline that enables token-time hallucination detection under explicit false-positive-rate (FPR) constraints, making it suitable for streaming clinical deployment.

Abstract

Objective

Most hallucination mitigation for large language models (LLMs) operates post-hoc, leaving safety-critical clinical deployment without real-time warning capability. We present a calibrated hidden-state probing pipeline that enables token-time hallucination detection under explicit false-positive-rate (FPR) constraints, making it suitable for streaming clinical deployment.

Methods

We formulate token-time hallucination detection as a constrained sequential decision problem separating non-circular supervision construction (using ROUGE-L, exact-choice, and exploratory NLI verifiers), FPR-constrained operating-point selection, and downstream intervention evaluation into a modular, reusable protocol. A lightweight two-layer hidden-state probe classifies each generated token into one of three risk states (Safe, AtRisk, or Hallucinating), where the intermediate AtRisk state captures pre-error instability. We validate across four medical QA benchmarks (Endoscopy, PubMedQA, MedHallu, MedQA-USMLE) spanning approximately 44,500 generation trajectories and three backbone LLMs (Qwen3-8B, Llama-3.1-8B-Instruct, BioMistral-7B).

Results

On the public biomedical QA benchmarks the probe yields viable detection across all backbone-dataset combinations: EDR@5 up to 0.390 (PubMedQA) and 0.352 (MedHallu) at the strict cap γ≤0.10, rising to 0.587 with 29%-59% hallucination reduction at the monitoring cap γ≤0.20. The trigger fires roughly 10-35 tokens before error onset, whereas a post-hoc check has zero lead time by construction. A single-institution Endoscopy corpus serves as a case study (EDR@5 0.613, Llama-3.1), treated as illustrative because its small confirmed-correct denominator (26-52 per backbone) yields wide confidence intervals. Probe latency is ∼10ms per answer versus ∼10s for multi-sample baselines.

Conclusion

Hidden-state probing with FPR-constrained calibration provides a practical, low-latency solution for real-time hallucination monitoring in clinical LLM deployments. The modular pipeline separating supervision construction, probe training, and trigger calibration is directly reusable with alternative detectors or verifiers.

View source

Similar papers

Preprint Aug 2026

Test-Time Hallucination Control in Large Vision-Language Models

Object Hallucination in large vision-language models (LVLMs), where models generate non-factual content about input images, remains a critical barrier to their reliability in real-world applications. Existing mitigation strategies can be categorized into training-based and training-free methods. Training-based methods often achieve strong performance but are costly, requiring extensive computational resources, large-scale data, and time-consuming fine-tuning. Training-free approaches are particularly appealing due to their efficiency. However, existing training-free methods either require multiple decoding rounds, which adds computational overhead, or modify internal states in a model-specific way that risks degrading pretrained knowledge. We propose Test-Time Hallucination Mitigation (TTH) method, a novel training-free method that addresses both limitations. TTH introduces a token-validator module, implemented as a zero-shot Multi-Modal Classifier (MMC), to generate auxiliary logits grounded in the input image. These logits are fused with the original LVLM outputs at the token level for object tokens selected from a candidate pool. An entropy-based weighting scheme is then applied to enable robust and accurate predictions. Extensive experiments across multiple LVLM families and diverse benchmarks demonstrate that TTH consistently improves accuracy and robustness, underscoring its generalizability and practical effectiveness. Code is released at https://github.com/Mehran-TAM/TTH

Mehran Tamjidi, Hamidreza Dastmalchi, Ali Cheraghian et al. · 0 citations
Preprint Aug 2026

Prompting is not enough: supervised baselines and leakage control for measuring shared decision-making with LLMs in pediatric encounters

Objectives: To determine whether zero-shot prompting of a large language model (LLM) is sufficient to detect shared decision-making (SDM) behaviors in real clinical encounters, and whether supervised learning adds value under patient-grouped, nested evaluation. Methods: We analyzed 21 audio-recorded outpatient surgical decision encounters (19 unique patients; 7,566 utterance segments; ~6.1 hours) between families of children with multiple long-term conditions and their surgical providers. Trained coders labeled segments for 12 SDM behaviors (human-human macro Cohen's kappa = 0.695). We compared a zero-shot local LLM (Qwen 2.5 32B), a supervised classifier over frozen sentence embeddings, and their logistic stack, under patient-grouped outer folds with inner cross-fitted thresholds and patient-resampled confidence intervals. Results: The zero-shot LLM reached macro kappa = 0.139 (95% CI 0.111-0.164). The supervised classifier reached kappa = 0.227 (0.186-0.262), a paired improvement of 0.088 (0.051-0.119). A logistic stack of the two reached kappa = 0.242 (0.198-0.284). We identified multiple corpus-specific leakage paths, including grouping sibling recordings separately and allowing labels from an outer held-out patient to enter few-shot exemplars used while fitting downstream models. Conclusion: Zero-shot prompting alone is not sufficient to measure SDM behavior as reliably as a small supervised model, and patient-level grouping alone does not prevent leakage when labeled prompt exemplars are precomputed outside the outer evaluation loop. Reported performance is sensitive to the unit of data splitting and to where labeled exemplars enter the pipeline. External validation is needed before these findings generalize beyond this population, model, prompt, and codebook.

Bernardo Modenesi, Jody L. Lin, Kimberly A. Kaphingst et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Domain-Specific Hallucination Detection in Large Language Models

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

Varun Teja Chundru, Debasmita Biswas · 0 citations
Jul 2026

Measure Twice, Locate Once: Mitigating Hallucinations in LLM-based Agents for Repository-Scale Fault Localization

Fault Localization (FL) is a critical yet inherently complex phase in the software debugging process. Over the years, numerous automated FL techniques have been developed to alleviate the time and effort involved. More recently, the emergence of Large Language Models (LLMs) has marked a new era for FL. However, existing LLM-based approaches often arrive at premature conclusions due to both extrinsic and intrinsic hallucinations. To address these challenges, we propose FaultLens, a novel FL technique that equips an LLM-based agent with a fine-grained feedback mechanism for repository-scale fault localization. Specifically, the decision-making stage of our approach starts with identifying FL candidates through an LLMbased agent. Here, location extraction validation detects extrinsic hallucinations, triggering further investigation. A defined rule determines investigation completion, while a self-check mechanism mitigates intrinsic hallucinations arising from incomplete investigation. The advanced location identification stage further minimizes intrinsic hallucinations caused by faulty reasoning. We demonstrate the effectiveness of our approach through a comprehensive evaluation on the Defects4J benchmark. Our results show that FaultLens outperforms several fault localization techniques across multiple categories, including spectrum-based methods, mutation analysis, machine learning approaches, and LLM-based systems. Specifically, FaultLens achieves a 43.35% improvement over SoapFL and a 24.24% improvement over AutoFL in the Top-1 metric, surpassing state-of-the-art LLM-based agent methods. Additional experiments further indicate that FaultLens generalizes across different programming languages and LLM backends, and that its hallucination-mitigation mechanisms are transferable to an external localization workflow.

Feiyu Chen, Guowei Yang, Cheryl Lee et al. · 0 citations
Preprint Aug 2026

Decomposed Entailment for Factuality Checking and Hallucination Detection

HallDetect, a lightweight, reference-free, and black-box framework for hallucination detection, is presented, a lightweight, reference-free, and black-box framework for hallucination detection that is evaluated not only on summarization but across a broader range of source-grounded generation settings.

Achir Oukelmoun, N. Semmar, Gäel de Chalendar · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.