HALT: Hallucination Assessment via Log-probs as Time series¶
Conference: EMNLP 2026
Paper: ACL Anthology
Code: https://halt-hallucination-detection.github.io
Area: NLP Understanding
Keywords: Hallucination Detection, Log-probability Time Series, Grey-box Evaluation, Local Uncertainty Features, Recurrent Sequence Modeling
TL;DR¶
HALT formulates an LLM's top-20 log-probability sequence from a single generation as a multivariate time series, combines it with 5 engineered local calibration features, and uses a compact 5M-parameter bidirectional GRU with Top-q pooling to deliver highly accurate, low-cost grey-box hallucination assessment.
Background & Motivation¶
Deploying Large Language Models safely in mission-critical applications requires dependable post-hoc hallucination detection, yet existing detection paradigms encounter prohibitive operational bottlenecks. White-box methods probe deep internal activations or attention maps, demanding uninhibited model access, significant memory overhead, and cumbersome layer-by-layer architectural tuning across distinct tasks. Conversely, black-box multi-sample paradigms like SelfCheckGPT require sampling 10 to 20 candidate responses per prompt and running auxiliary NLI or clustering models, incurring unbearable latency and multiplicative API expense. On the lightweight end, scalar aggregate statisticsโsuch as sequence perplexity or minimum token probabilityโare cheap to compute but aggressively collapse token-level uncertainty dynamics into a single scalar value, completely wiping out temporal signals about how uncertainty manifests during the generation process.
This operational trilemma stems from a fundamental disconnect: hallucinations are typically localized phenomenonโarising at specific factual entity names or faulty deductive stepsโrather than a uniform, sequence-wide haze. Most production inference engines and API endpoints (such as vLLM) natively emit top-K log-probabilities alongside generation without requiring white-box weights. These low-K distributions (\(K \le 20\)) are far more informative than a solitary scalar summary and vastly cheaper than full-vocabulary dumps or iterative sampling. Crucially, in complex mathematical, algorithmic, and symbolic reasoning tasks, language models frequently output structurally coherent and grammatically pristine reasoning traces that mask catastrophic deductive slips. In such settings, conventional surface text classifiers fail miserably because surface fluency deceives the model, whereas local uncertainty dynamics often signal the exact onset of deductive failure.
The authors break away from the false dichotomy of intrusive white-box probing versus expensive multi-sample black-box verification. Core idea: treat the top-20 log-probability sequence from a single generation pass as a multivariate time series, augment it with engineered local calibration metrics, and process it with a 5M-parameter bidirectional GRU and Top-q salient pooling to capture both forward generation uncertainty and retrospective contradiction signals.
Method¶
Overall Architecture¶
HALT operates on top-20 log-probability vectors \(\ell_t \in \mathbb{R}^{20}\) emitted by a target autoregressive language model during a single generation pass or teacher-forced evaluation. Without accessing internal hidden states or relying on external retrieval, the pipeline conducts feature augmentation, temporal sequence encoding, and adaptive saliency aggregation. First, 5 local calibration features are computed per timestep and concatenated with the raw log-probability vector into a 25-dimensional representation \(\tilde{\ell}_t\). Next, a two-layer GELU MLP projects the features to 128 dimensions, followed by a 5-layer bidirectional GRU that models bidirectional context across the sequence. Finally, Top-q pooling selectively aggregates the hidden states of the top 15% most salient timesteps, and a single linear classification head produces the final probability that the response contains a hallucination.
%%{init: {'flowchart': {'rankSpacing': 24, 'nodeSpacing': 28, 'padding': 6, 'wrappingWidth': 400}}}%%
flowchart TD
In["Target LLM Generation<br/>Top-20 Log-prob Sequence โ1:T"] --> D1["Local Calibration Feature Engineering<br/>5 uncertainty metrics + raw log-probs (25-dim)"]
D1 --> D2["Bidirectional GRU Temporal Encoding<br/>2-layer MLP projection + 5-layer Bi-GRU context modeling"]
D2 --> D3["Top-q Salient Sequence Pooling<br/>Hidden state L2-norm ranking to select top 15% bursts"]
D3 --> Out["Linear Head & Decision Policy<br/>Outputs P(hallucinated) and global thresholding"]
Key Designs¶
1. Local Calibration Feature Engineering: Raw vectors obscure probability curvature -> Augmenting 5 complementary uncertainty signals -> Exposing sharp confidence transitions
While raw top-20 log-probabilities retain the raw distribution profile, deep networks struggle to infer non-linear distributional geometry purely from small training sets. HALT augments \(\ell_t\) with 5 targeted features: Average Log-Probability (\(\text{AvgLogP}\)) serves as a direct proxy for overall distributional sharpness; Rank Proxy (\(\text{RankProxy}\)) encodes the rank position of the selected token among the top-20 candidates, explicitly signaling non-greedy choices; Top-K Entropy (\(H_{\text{overall}}\)) computes the entropy across the renormalized top-20 distribution to register overall hesitation among top candidates; Alternatives Entropy (\(Halts\)) calculates the entropy exclusively over competitor alternatives by masking out the selected token, isolating disagreement among runner-up candidates; and Decision-Entropy Delta (\(\Delta H_{\text{dec}}\)) captures the first-order temporal derivative of binary decision entropy between the chosen token and its strongest competitor, pinpointing immediate transitions from certainty to doubt. Concatenating these 5 scalars with raw \(\ell_t\) produces an enriched vector \(\tilde{\ell}_t = [\phi(\ell_t) \,\|\, \ell_t] \in \mathbb{R}^{25}\).
2. Bidirectional GRU Temporal Encoding: Static aggregations discard retrospective context -> Multi-layer bidirectional recurrent modeling -> Reconciling forward assertions with backward contradictions
Uncertainty signatures during generation frequently possess delayed, retrospective clarity: a token generated early in an explanation may exhibit moderate confidence in isolation, yet its factual or logical falsehood only becomes indisputable once subsequent tokens unfold contradictory statements or ungrounded conclusions. HALT rejects causal unidirectional modeling and static aggregations in favor of a 5-layer bidirectional GRU (Bi-GRU) with a hidden size of 256 and inter-layer dropout of 0.4. Variable-length sequences are processed with PyTorch's packed sequences and boolean attention masking to prevent padding from biasing recurrence. By propagating hidden states forwards and backwards, the network effectively links early premise declarations with downstream deductive outcomes.
3. Top-q Salient Sequence Pooling: Mean pooling washes out localized uncertainty -> L2-norm saliency filtering of top 15% steps -> Concentrating on hallucination origin zones
In extended generation traces, the overwhelming majority of tokens comprise standard syntax, conversational filler, or confident trivial assertions. Uniform mean pooling over all timesteps dilutes sharp, localized uncertainty spikes across hundreds of uninformative tokens, whereas max pooling is hypersensitive to single-token outlier noise. HALT introduces Top-q pooling based on hidden-state magnitude: computing the \(L_2\) norm \(s_t = \|H_t\|_2\) of each valid timestep's bidirectional representation, ranking the scores in descending order, and averaging exclusively across the top \(q = 15\%\) highest-scoring timesteps. This focuses the final sequence embedding on localized uncertainty bursts where hallucinations typically originate.
Sequence Modeling and Decision Policy¶
Formally, let an autoregressive model \(M_\theta\) generate tokens \(y_1, \dots, y_T\). At step \(t\), the serving environment returns sorted top-20 log-probabilities: $\(\ell_t = (\log p_t^{(0)}, \log p_t^{(1)}, \dots, \log p_t^{(19)}) \in \mathbb{R}^{20}\)$ where \(\log p_t^{(0)}\) denotes the log-probability of the emitted token. The truncated probability distribution over the top-\(K\) candidates (\(K=20\)) is normalized using Log-Sum-Exp: $\(\tilde{p}_t^{(k)} = \exp\left(\log p_t^{(k)} - \text{LSE}(\ell_t)\right), \quad \text{where} \ \text{LSE}(\ell_t) = \log \sum_{j=0}^{K-1} \exp\left(\log p_t^{(j)}\right)\)$
The engineered features are formally specified as follows: $\(\text{AvgLogP}(\ell_t) = \frac{1}{K} \sum_{k=0}^{K-1} \log p_t^{(k)}, \qquad H_{\text{overall}}(\ell_t) = -\sum_{k=0}^{K-1} \tilde{p}_t^{(k)} \log \tilde{p}_t^{(k)}\)$ $\(H_{\text{alts}}(\ell_t) = -\sum_{k \neq k^*} \tilde{q}_t^{(k)} \log \tilde{q}_t^{(k)}, \quad \text{where} \ \tilde{q}_t^{(k)} = \frac{\exp(\log p_t^{(k)})}{\sum_{j \neq k^*} \exp(\log p_t^{(j)})}\)$ $\(\Delta H_{\text{dec}}(\ell_t) = H_{\text{bin}}(\tilde{p}_t^{(k^*)}) - H_{\text{bin}}(\tilde{p}_{t-1}^{(k^*_{t-1})}), \quad \text{with} \ H_{\text{bin}}(p) = -p \log p - (1-p) \log (1-p)\)$
The concatenated 25-dimensional feature vectors are normalized via LayerNorm, projected to 128 dimensions by a 2-layer GELU MLP, and fed into the 5-layer Bi-GRU to yield hidden representations \(H \in \mathbb{R}^{T \times 512}\). For a response of valid length \(T_{\text{valid}}\), timesteps are ranked by \(s_t = \|H_t\|_2\). The pooled vector is formed by averaging over the top \(\lceil q \cdot T_{\text{valid}} \rceil\) timesteps (with \(q=0.15\)): $\(h_{\text{pool}} = \frac{1}{|\mathcal{S}_q|} \sum_{t \in \mathcal{S}_q} H_t \in \mathbb{R}^{512}\)$
A linear head maps \(h_{\text{pool}}\) to a scalar logit trained via BCEWithLogitsLoss. Optimization uses Adam (learning rate \(4.41 \times 10^{-4}\), weight decay \(2.34 \times 10^{-6}\), batch size 512) over 60K training instances. A single global threshold is tuned on the pooled validation set across all clusters and held fixed across testing, avoiding per-domain threshold cheating.
Key Experimental Results¶
Main Results¶
Evaluation is performed on HUB (Hallucination detection Unified Benchmark), comprising 10 capability clusters where all 5 reasoning clusters and World Knowledge are held out from training. Baselines include token-level uncertainty reduction metrics, Lettuce (a 150M-parameter ModernBERT-base span detector), and Text-ModernBERT (fine-tuned on HUB's own training split).
| Capability Cluster | PPL | \(H_{\text{overall}}\) | \(\Delta H_{\text{dec}}\) | \(Halts\) | Lettuce (150M) | Text-ModernBERT | HALT-L (5M) | HALT-Q (5M) |
|---|---|---|---|---|---|---|---|---|
| Algorithmic* | 24.2 | 24.2 | 26.4 | 24.5 | 24.2 | 43.1 | 76.8 | 32.7 |
| Chat | 35.1 | 34.6 | 37.4 | 36.5 | 41.5 | 60.0 | 60.2 | 58.6 |
| Code Generation* | 43.1 | 38.1 | 62.0 | 66.7 | 38.1 | 46.2 | 47.7 | 39.7 |
| Commonsense* | 33.3 | 32.0 | 35.2 | 34.3 | 41.1 | 53.4 | 56.7 | 41.3 |
| Data-to-Text | 39.2 | 39.2 | 42.2 | 39.2 | 83.4 | 60.1 | 72.9 | 73.0 |
| Mathematical* | 44.1 | 42.0 | 67.0 | 61.6 | 41.8 | 54.1 | 72.7 | 62.9 |
| Question Answering | 28.3 | 25.7 | 49.4 | 43.4 | 77.3 | 71.0 | 74.1 | 68.8 |
| Summarization | 24.5 | 24.5 | 45.0 | 33.0 | 59.7 | 59.6 | 66.9 | 70.8 |
| Symbolic* | 24.6 | 24.6 | 24.9 | 24.6 | 33.4 | 58.6 | 65.4 | 49.8 |
| World Knowledge* | 44.5 | 44.5 | 44.5 | 44.5 | 44.5 | 52.8 | 76.9 | 58.5 |
| Overall F1 | 34.0 | 32.9 | 48.0 | 42.9 | 64.0 | 61.9 | 67.0 | 62.7 |
| Avg. across clusters | 34.1 | 32.9 | 43.4 | 40.8 | 48.5 | 55.9 | 63.0 | 55.6 |
Note: Asterisks () denote capability clusters completely held out from training. Metric is Macro-F1.*
Ablation Study¶
The authors conduct comprehensive architecture and feature ablations on HUB using Llama 3.1-8B log-probabilities to isolate the source of performance gains.
| Architecture / Feature Configuration | Category | Avg. F1 | Overall F1 | Analysis & Mechanism Notes |
|---|---|---|---|---|
| Logistic Regression (Aggregated Stats) | Non-temporal | 0.385 | 0.430 | Collapsing sequences into scalars loses critical temporal nuance |
| XGBoost (Aggregated Stats) | Non-temporal | 0.372 | 0.418 | Non-linear trees fail to compensate for lost sequential dynamics |
| 1D-CNN | Temporal | 0.510 | 0.565 | Local convolutions struggle with long-range logical consistency |
| Bi-RNN | Temporal | 0.507 | 0.551 | Standard recurrence suffers from vanishing gradients over long traces |
| Uni-GRU | Temporal | 0.543 | 0.600 | Unidirectional recurrence loses retrospective contradiction clues (-7.0 F1) |
| Transformer Encoder (5.47M params) | Temporal | 0.560 | 0.618 | Self-attention lacks inductive bias on modest log-prob dataset sizes |
| LOS-Net (Faithful Reimpl., K=20) | Temporal | 0.540 | 0.613 | Rank encoding with CLS pooling underperforms recurrent gating |
| HALT-L (Bi-GRU Full) | Temporal | 0.630 | 0.670 | Optimal temporal modeling with bidirectional gated recurrence |
| Raw log-probs only (\(K=20\)) | Full Arch | 0.557 | 0.616 | Raw sequence alone beats best non-temporal baseline by ~19 points |
| + AvgLogP | Full Arch | 0.562 | 0.618 | Provides distribution-wide calibration sharpness baseline |
| + Halts (Alternatives Entropy) | Full Arch | 0.575 | 0.647 | Yields the largest single feature improvement (+2.9 Overall F1) |
| + RankProxy | Full Arch | 0.600 | 0.657 | Injects non-greedy token selection perturbation signals |
| + \(H_{\text{overall}}\) (Top-K Entropy) | Full Arch | 0.614 | 0.660 | Quantifies competitor indecision across candidate mass |
| Full Model (+ \(\Delta H_{\text{dec}}\)) | Full Arch | 0.630 | 0.670 | Temporal difference isolates rapid confidence shifts |
| Full Model w/o raw log-probs | Full Arch | 0.567 | 0.638 | Demonstrates complementarity between raw values and engineered metrics |
Key Findings¶
- Temporal Modeling is Non-Negotiable: The best non-temporal baseline achieves an Overall F1 of only 0.430, whereas every temporal sequence model exceeds 0.550. This 12 to 24-point performance delta empirically refutes the premise that scalar statistics adequately summarize generation uncertainty.
- Superiority on Reasoning Tasks: On held-out reasoning clusters like Algorithmic and Mathematical reasoning, surface text baselines collapse into majority-class predictions (Lettuce scoring 24.2 and 41.8), while HALT-L achieves 76.8 and 72.7 Macro-F1. Log-prob dynamics expose logic errors that surface fluency completely conceals.
- Saturation at \(K=20\): Sweeping \(K\) from 1 to 20 demonstrates monotonic performance gains from 0.593 to 0.670 Overall F1, plateauing beyond \(K=10\). Across 12 distinct LLMs, top-20 candidates consistently account for 95% to 99.7% of total probability mass, confirming that gathering larger candidate sets introduces overhead with negligible marginal return.
- Cross-Scale Robustness vs. Family Specificity: HALT detectors trained across 8 LLM families ranging from SmolLM-360M to Llama-3.1-70B demonstrate consistent Overall F1 scores between 0.59 and 0.67 without per-model architecture tweaks. However, direct cross-model inference transfer between Llama and Qwen causes performance to drop by over 13 points, demonstrating that individual LLM families maintain idiosyncratic calibration curves requiring model-specific detector training.
Highlights & Insights¶
- Repurposing Free API Side-Channels: Instead of designing costly external judges or probing intrusive white-box weights, HALT utilizes the top-20 log-probabilities already emitted by standard inference frameworks, achieving grey-box evaluation at virtually zero marginal inference cost.
- The Elegance of Competitor Disagreement (\(Halts\)): By actively zeroing out the selected token and calculating entropy solely over the remaining alternatives, \(Halts\) isolates genuine model hesitation between viable alternatives. Gradient attribution confirms it is the single most informative input channel.
- Inductive Bias Triumphs Over Raw Parameter Scale: A focused 5M-parameter recurrent network matches or outperforms 150M-parameter pretrained ModernBERT and multi-sample NLI pipelines, highlighting that proper inductive biases for sequential uncertainty outshine brute-force linguistic pretraining.
Limitations & Future Work¶
- Lack of Zero-Shot Cross-Model Transferability: Due to differences in tokenizer boundaries, vocabulary geometries, and temperature calibration profiles across model families, a dedicated HALT detector must be trained per target LLM family (taking roughly 10โ25 minutes on a single A100 GPU).
- Teacher-Forced Evaluation Gap: Primary benchmark evaluations in HUB utilize teacher-forced log-probabilities to align heterogeneous public datasets. Although free-running generation experiments on CoQA, SQuAD, and XSUM confirm transferability, formal evaluation across completely unconstrained generation distributions remains an area for future benchmark development.
- Unexplored Multilingual and Code Dynamics: Current evaluations remain strictly English-centric. Syntactic and morphological shifts across multilingual vocabularies may yield distinct sequential calibration patterns that require further validation.
Related Work & Insights¶
- vs. Lettuce (รdรกm Kovรกcs & Recski, 2025): Lettuce relies on a 150M-parameter ModernBERT encoder to identify hallucination text spans. While Lettuce excels in source-grounded RAG tasks where reference text is present (83.4 vs. 72.9 in Data-to-Text), it collapses on abstract mathematical and algorithmic reasoning where fluent text masks logical contradictions; HALT uses 30ร fewer parameters and dominates across reasoning domains.
- vs. SelfCheckGPT (Manakul et al., 2023): SelfCheckGPT requires generating 10 to 20 extra stochastic completions and running DeBERTa-based NLI consistency checks per prompt. HALT requires only a single pass, operates with minimal compute overhead, and achieves 0.90 AUROC on SQuAD compared to SelfCheckGPT-NLI's 0.65.
- vs. LOS-Net (Bar-Shalom et al., 2025b): LOS-Net relies on static Transformers and requires top-50 to top-1000 probability horizons. HALT demonstrates that at \(K=20\), explicit temporal modeling via bidirectional recurrent gating captures rich uncertainty dynamics with substantially lower input extraction overhead.
Rating¶
- Novelty: โญโญโญโญโ Reconceptualizes top-K log-probability outputs as multivariate time series and introduces highly effective local calibration features.
- Experimental Thoroughness: โญโญโญโญโญ Comprehensive 10-cluster HUB benchmark, 8 LLM families evaluated from 360M to 70B parameters, and thorough temporal and feature ablations.
- Writing Quality: โญโญโญโญโญ Clear mathematical formalization, compelling architectural justification, and lucid presentation of empirical trade-offs.
- Value: โญโญโญโญโญ Offers an exceptionally practical, computationally trivial safeguard for production-scale LLM serving systems.