TAC Turns AI Uncertainty Scores Into Real Hallucination Detectors
A new post-hoc calibration method called Truth AnChoring maps raw LLM uncertainty scores to probabilities grounded in actual correctness.
Takeaways
- Paper formalizes proxy failure: why LLM uncertainty metrics behave unstably across datasets and models.
- Proves AUC of any score is bounded by its mutual information with correctness.
- Truth AnChoring (TAC) maps raw uncertainty scores to truth-aligned probabilities with a small MLP.
- Cuts ECE by 17 to 27 points on TriviaQA, SciQ, PopQA across five open LLMs.
- Works with as few as 32 labels or 30% corrupted supervision, outperforming CUE without extra features.
- Code and pipeline available at github.com/ponhvoan/TruthAnchor under Apache-2.0.
A paper accepted to Findings of EMNLP formalizes why common uncertainty metrics can fail at hallucination detection. Researchers from Nanyang Technological University, KAIST, and Shanghai Jiao Tong University call the mismatch proxy failure and propose Truth AnChoring, or TAC, as a lightweight calibration method.
Hallucination detectors often treat predictive entropy, perplexity, semantic entropy, and similar scores as evidence that an answer is correct. These metrics describe model behavior rather than factual accuracy. TAC uses labeled examples to convert a raw score into an estimated probability of correctness, giving developers a value that can support abstention, retrieval, review, or routing thresholds.
- Input: An uncertainty score produced for a model response.
- Output: An estimated probability that the response is correct.
- Training data: Binary correctness labels paired with uncertainty scores.
- Reported scope: Fact-based question answering with models from 3B to 9B parameters.
Entropy can miss confident errors
Predictive entropy measures how dispersed the model’s next-token distribution is. A low value indicates that the model strongly prefers a continuation, but that continuation can still express a false claim. Semantic entropy broadens the analysis by grouping responses according to meaning, yet it remains a behavioral proxy whose relationship with correctness can shift across models, prompts, and datasets.
The authors formalize proxy failure with two propositions:
- Information limits discrimination. A score’s AUC is bounded by the mutual information between that score and correctness. When the score contains little information about truth, it cannot reliably rank correct answers above incorrect ones.
- Fluent errors can look certain. A model may commit early to an incorrect concept and then continue with low local uncertainty. Correct and incorrect generations can therefore produce nearly identical entropy profiles.
A small network learns the correction
The TAC mapper receives a scalar uncertainty score, denoted S, and estimates P(correct | S). Its multilayer perceptron contains an input layer, three hidden layers with ReLU activations, and a scalar output passed through a sigmoid function.
Training minimizes binary cross-entropy against correctness labels. An optional pairwise ranking loss encourages the mapper to assign higher values to correct responses, which can improve AUC.
Restricting the mapper to the original score isolates the effect of calibration. Improvements after mapping indicate that the proxy contained useful correctness information whose raw scale was poorly aligned with observed accuracy.
Results separate calibration from ranking
The evaluation covers Qwen-3-4B, Llama-3.2-3B, Llama-3.1-8B, Ministral-3-8B, and Gemma-2-9B on TriviaQA, SciQ, and PopQA. The ten baseline families include maximum softmax probability, perplexity, predictive entropy, energy, P(True), verbalized confidence, CoE variants, Eigenscore, and semantic entropy.
Two metrics capture different properties of the detector:
- Expected calibration error, or ECE: Measures the gap between predicted confidence and observed accuracy. Lower values indicate better calibration.
- Area under the ROC curve, or AUC: Measures how well the score ranks correct responses above incorrect ones. Higher values indicate better discrimination.
For the paper’s Ministral 8B instruction-tuned experiments, TAC produced the following changes:
| Dataset | ECE change | AUC change |
|---|---|---|
| TriviaQA | -17.48 points | +3.16 points |
| SciQ | -26.69 points | +5.48 points |
| PopQA | -21.55 points | +2.66 points |
In the reported comparison with CUE, which adds DeBERTa embeddings as auxiliary features, TAC achieved a larger calibration improvement and CUE achieved a larger ranking improvement:
| Method | ECE change | AUC change | Inputs |
|---|---|---|---|
| TAC | -14.03 points | +3.77 points | Scalar uncertainty score |
| CUE | -11.30 points | +7.26 points | Score and DeBERTa features |
Small label sets remain useful
The supervision experiments test TAC with limited, corrupted, and transferred labels. The paper reports:
- Training with 32 labeled examples caused only a small decline relative to the full clean training set.
- Corrupting as much as 30% of the labels produced limited degradation.
- Training on one question-answering dataset and evaluating on another reduced ECE by about 13 points on average.
- A two-score variant concatenated separate uncertainty metrics and recovered discrimination in cases where either score alone carried little useful signal.
The source score sets the ceiling
Proposition 1 places a hard limit on post-hoc calibration. A score that is statistically independent of correctness leaves the mapper without enough information to distinguish correct answers from incorrect ones. Additional signals, including a second uncertainty score or representation-level features, may be required in that setting.
The evidence also comes from a narrow evaluation domain. Most experiments use fact-heavy question answering with models between 3B and 9B parameters. The paper includes only a preliminary GSM8K analysis for mathematical reasoning, and its ethics note cautions against applying TAC to open-ended generation where correctness labels are ambiguous.
Production deployments should fit and evaluate the mapper on data that represents the target model, prompt format, task, and traffic distribution. Changes to those components can alter the relationship between uncertainty and correctness, requiring fresh labels and recalibration.
From repository to deployment
The Apache-2.0-licensed TruthAnchor repository provides a pip-installable implementation and an end-to-end pipeline for generation, uncertainty scoring, mapper training, and evaluation on TriviaQA, SciQ, and PopQA. It also accepts custom CSV files containing scores and labels.
A practical integration follows four steps:
- Generate responses and compute an uncertainty score for each one.
- Collect representative examples with binary correctness labels.
- Train TAC on the resulting score-label pairs.
- Evaluate ECE and AUC on held-out data, then select thresholds according to the costs of false acceptance and unnecessary abstention.
For systems that already calculate confidence or uncertainty, TAC adds a small supervised layer between the raw heuristic and the downstream decision. Its value depends on the source score carrying real correctness information and on the calibration data matching the environment where the estimate will be used.