Domain-Blind Judges in Semantic-Entropy Hallucination Detection

A popular way to catch a language model making things up is to ask it the same question many times and check whether its answers agree. If they scatter across many different meanings, the model is probably guessing. Deciding whether two answers "mean the same thing" is itself a language task. It is usually handed to a general-purpose entailment model, a classifier that judges whether one sentence implies another. In medicine and finance, that judge works in exactly the space where general models are known to fail. They can merge "renal failure" with "respiratory failure", or "up 12%" with "up 21%" reported in thousands, because those answers are close in topic. They can also split "MI" from "myocardial infarction". This note proposes to measure how much of the known weakness of agreement-based hallucination detection in specialist domains comes from the judge rather than the model, and to repair it.

The stakes are concrete. In radiology, filtering GPT-4o answers by semantic entropy raised diagnostic accuracy from 51.7% to 76.3%, but only by discarding 53% of questions. It also could not see hallucinations that the model repeated identically across all samples (Hallucination Filtering in Radiology Vision-Language Models Using Discrete Semantic Entropy). We argue that two distinct error sources are tangled together in those numbers. One is real model overconfidence. The other is a domain-blind equivalence judge. Wrongly splitting equivalent answers inflates rejections. Wrongly merging distinct answers manufactures false confidence. Separating the two tells practitioners whether to fix the detector or the model.

Core Claim

Semantic entropy is defined as the Shannon entropy over clusters of sampled answers that a judge deems equivalent. Its reliability is bounded by the judge's agreement with domain experts on what counts as "the same answer." We claim three things. First, in clinical and financial question answering, a general entailment judge makes systematic, direction-specific errors. It over-merges answers that are topically close but differ in attributes such as numbers, units, and organ or role. It over-splits abbreviations and notation variants. These errors measurably distort entropy-based detection. Second, a judge adapted to domain equivalence recovers a substantial share of the gap between the general judge and an expert-labelled oracle clustering. It does so both in detection quality (AUROC) and in accuracy at a fixed fraction of questions answered. Third, conformal guarantees such as those in TRAC: Trustworthy Retrieval Augmented Chatbot hold with respect to the judge's notion of correctness. When the judge is domain-blind, nominal coverage of 90% can correspond to materially lower coverage as experts would score it. That is a gap the guarantee itself cannot reveal.

What is new is treating the equivalence judge as a component that suffers the domain semantic gap, with its own error rate that can be measured and decomposed. Prior work has treated it as fixed plumbing. The work also names what remains after the judge is fixed, namely the truly consistent wrong answers, and shows how large that remainder is.

Grounding in Prior Work

The motivation comes from two literatures that have not been joined. On the domain side, general embedding spaces are documented to blur exact attributes into topical neighbourhoods. Product search shows this (OVERVIEW OF THE TREC 2023 PRODUCT PRODUCT SEARCH TRACK). So do financial documents, where dense retrieval loses dates and monetary values (UDA: A Benchmark Suite for Retrieval Augmented Generation in Real-World Document Analysis). The same blurring affects locally redefined terms such as ICU abbreviations (Exploiting Task-Oriented Resources to Learn Word Embeddings for Clinical Abbreviation Expansion) and finance-specific connotations (Word Embeddings-Based Uncertainty Detection in Financial Disclosures). These papers study retrieval and representation, not the judges inside hallucination detectors. We carry their failure modes over to that new location.

On the hallucination side, there are three families of method. Discrete semantic entropy and TRAC both depend on an equivalence judge. The radiology study clusters with bidirectional entailment. TRAC was validated on open-domain Natural Questions with standard equivalence measures, and the file notes it never tested specialist terminology. SAC³ (SAC3: Reliable Hallucination Detection in Black-Box Language Models via Semantic-aware Cross-check Consistency) perturbs questions and cross-checks against a second model, but it also compares answers semantically. These papers supply the methods we stress-test.

Single-pass probes form the third family, and they constrain the design. Semantic Entropy Probes: Robust and Cheap Hallucination Detection in LLMs trains linear probes on hidden states to predict semantic entropy. Its training target therefore inherits whatever errors the judge makes, a point our study tests directly. The Hallucination Signal Is a Mean Shift: Why Simple Probes Suffice shows that a regularized logistic probe reaches 0.952 mean AUROC on general benchmarks. It also reports that hallucination directions are nearly orthogonal across datasets, so probes need some labelled in-domain data. That finding is a real alternative to our approach, and we address it below rather than ignore it. Semantic Self-Distillation for Language Model Uncertainty distils sample dispersion into a single-pass predictor and likewise inherits its teacher's notion of semantic distance.

For building the domain judge, we reuse the recipe from Edinburgh Clinical NLP at SemEval-2024 Task 2: Fine-tune your model unless you have access to GPT-4. That work merged a clinical language-modelling adapter with a triplet-loss adapter that pulls entailing statements together and pushes contradicting ones apart. It gained 0.0346 F1 and 0.152 consistency over the language-modelling adapter alone on clinical trial inference. We also use its released code (EdinburghClinicalNLP/semeval_nli4ct). The difficulty of numeric and negation statements, reported by Saama Technologies at SemEval-2024 Task 2: Three-module System for NLI4CT Enhanced by LLM-generated Intermediate Labels, indicates where the judge's errors are likely to concentrate.

Research Program

The first component is an equivalence audit. We sample 10 to 15 answers per question at temperature 1.0 from open-weight models (Llama-3.1 8B and 70B, Qwen-2.5, Mistral) and, for the radiology setting, from GPT-4o. The questions come from four sources. Two are financial: FinQA (FinQA: A Dataset of Numerical Reasoning over Financial Data) and the UDA FinHybrid and TatHybrid subsets. One is radiology: VQA-Med 2019 and RadDataset. The fourth is a set of clinical questions built around ambiguous abbreviations from the abbreviation-expansion resource. TriviaQA and the HaluEval QA subset (HaluEval: A Large-Scale Hallucination Evaluation Benchmark for Large Language Models) serve as general-domain controls, where we predict the judge gap will be small. From the sampled answers we draw several thousand answer pairs, stratified by judge confidence. Domain annotators with clinical or accounting training label each pair equivalent or not. Each disagreement with the general judge is tagged as an over-merge or an over-split and assigned a cause: number or unit, abbreviation, role or entity swap, or hedging versus definite claim.

The second component is the decomposition. For every question we compute entropy three ways: with the general judge, with expert-labelled clustering on the audited subset (the oracle), and with exact or normalized-string matching. The gap between general-judge and oracle entropy, in AUROC and in accuracy at fixed retention, is the share of detection failure attributable to the judge. Questions where even the oracle shows near-zero entropy on a wrong answer are the truly confident hallucinations. We expect these to concentrate on abbreviation and locally redefined terms, where the model's prior favours the general meaning.

The third component is a repaired judge. A small cross-encoder is trained with the Edinburgh merged-adapter recipe. The domain-language adapter is trained on clinical trial reports and financial filings. The contrastive adapter uses NLI4CT statement pairs plus held-out audit pairs. The judge is also given deterministic canonicalization: numeric parsing with scale and unit handling, and abbreviation expansion conditioned on the domain. The repaired judge then drops into discrete semantic entropy, SAC³, TRAC, and as the training target for semantic-entropy probes. This lets us ask whether a better judge improves all of them at once.

Baselines

The naive reference point is answering every question with greedy decoding and no abstention. This gives the raw accuracy floor, for example the 51.7% GPT-4o accuracy reported in the radiology study. A second simple reference abstains using the model's average token log-probability, with no sampling and no judge.

The strongest sampling-based competitor is discrete semantic entropy with a general bidirectional-entailment judge, as in Hallucination Filtering in Radiology Vision-Language Models Using Discrete Semantic Entropy. Its reported result is 76.3% accuracy at 47% retention on combined VQA-Med 2019 and RadDataset, at a threshold of entropy at most 0.3. We replicate it with 15 samples at temperature 1.0 on the same data. Our repaired judge is then substituted holding samples, model, and threshold-search procedure fixed. Beating it means higher accuracy at matched 47% retention, or matched 76.3% accuracy at higher retention. For the financial and clinical sets there is no reported result found on Lacuna for semantic-entropy detection, so we report both judges on identical samples.

The strongest single-pass competitor is a regularized logistic probe trained on hidden states against gold correctness labels, following The Hallucination Signal Is a Mean Shift: Why Simple Probes Suffice. That paper reports 0.952 mean AUROC on general benchmarks, which are not ours. We give this probe exactly the same number of in-domain labelled examples that our judge consumes from the audit, and the same layer-selection budget. We also run semantic-entropy probes (Semantic Entropy Probes: Robust and Cheap Hallucination Detection in LLMs) trained on general-judge entropy and, separately, on repaired-judge entropy.

For guarantees, TRAC reports 0.90 empirical coverage at α = 0.1 with an average of 20.4 unique answers on Natural Questions. We run it on the financial and clinical sets with each judge, calibrated on identical splits.

Two ablations isolate the key ingredient. One is canonicalization alone, with the general judge plus number and abbreviation normalization. The other is the learned domain judge without canonicalization. The oracle clustering is an upper bound, not a competitor.

Why not just…?

Why not just use GPT-4 as the equivalence judge? This is a genuine threat. GPT-4 scored 0.8328 on the clinical trial inference task versus 0.7862 for the adapted 7B model in the Edinburgh study, so a frontier judge may already close much of the gap. We include a GPT-4-class judge on the same audit pairs and report its over-merge and over-split rates. If it matches the oracle, the contribution narrows to the diagnosis plus a cheaper local judge, and we would say so. Even then, its per-pair cost multiplies the already high cost of sampling, $0.72 per question in the radiology study, by the square of the number of samples.

Why not just train a probe on correctness labels and skip the judge entirely? The mean-shift paper suggests this works well once some in-domain labels exist. If a probe given our label budget beats the repaired-judge pipeline, that is a valid outcome. Our response is a matched-budget comparison, not an argument. The judge still matters in two places. Semantic-entropy probes and TRAC both depend on it. And the gold correctness labels for free-text clinical answers are themselves produced by some equivalence decision against the reference.

Why not just normalize numbers and expand abbreviations with rules? For finance this may capture most of the gain, which is why canonicalization alone is an explicit ablation. Rules cannot handle role swaps such as donor versus recipient, hedged versus definite claims, or context-dependent abbreviations, where "RF" requires reading the surrounding note. The error taxonomy from the audit will show what fraction of judge errors falls into categories that rules cannot reach.

Why not just fix retrieval or fine-tune the generator? These lower the hallucination rate but do not tell you which remaining answers to trust. FinQA reports that financial pretraining gave no substantial advantage, and guideline fine-tuning of GPT-3.5 sometimes hurt consistency (Prompt engineering in consistency and reliability with the evidence-based guideline for LLMs). Detection is complementary to these fixes, not an alternative.

Proposed Experiments

The decisive check is the decomposition itself. If entropy computed from the oracle clustering does not beat general-judge entropy by a meaningful margin in specialist domains, the central hypothesis is false and the field's problem lies with the model. An example would be less than 2 AUROC points, or no retention gain at fixed accuracy, while the general controls show no gap either. We would report that as the finding. Conversely, a large oracle gain in clinical and financial data alongside a negligible gain on TriviaQA would show that the judge's failure is domain-specific.

The second check asks whether the repaired judge recovers at least half the general-to-oracle gap on held-out questions and on a held-out domain. For example, the judge would be trained with clinical pairs and tested on finance. This distinguishes real domain adaptation from memorizing audit pairs.

The third check re-scores TRAC's coverage on the clinical and financial test sets with expert labels and reports the gap between nominal and expert-scored coverage under each judge. A general judge that reports 0.90 while experts score substantially lower would be a concrete warning for anyone deploying conformal question answering in specialist fields.

The fourth check characterizes the remaining confident hallucinations, which are oracle-low-entropy wrong answers. We test whether a hidden-state probe flags them any better than chance. These are the cases that no consistency method can catch, and the probe result tells us whether the model's internal state still carries a usable signal.