Pre-Generation Hallucination Detection in Large Language Models via Soft-Target Attention Probing

Amina Miftakhova, Alexey Zaytsev
6/20/2026
cs.CLcs.LG

No confident code implementation found for this paper.

Abstract

Detecting hallucination risk before generation enables abstention, retrieval augmentation, and routing decisions without incurring the cost of decoding. While prior work has shown that such risk can be estimated from a model's internal representations, existing approaches treat this as binary classification over a single decoded output.

Show full abstract

We instead formulate it as a risk-estimation problem. Under this formulation, we introduce soft-target supervision based on the empirical answer error rate over stochastically sampled outputs - an estimator we prove to be the unique unbiased minimum-variance estimator of the model's per-prompt error probability under its sampling distribution. We further adapt attention probing to the pre-generation setting, enabling the detector to selectively aggregate hallucination-relevant prompt representations. Across three question-answering benchmarks and five models, attention probing outperforms linear probing on short-answer tasks. Replacing binary labels with soft-target supervision further and consistently improves detection quality.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{miftakhova2026pregeneration,
  title  = {Pre-Generation Hallucination Detection in Large Language Models via Soft-Target Attention Probing},
  author = {Amina Miftakhova and Alexey Zaytsev},
  year   = {2026},
  eprint = {2606.21917},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.21917v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.21917.svg)](https://codeofpaper.com/paper/2606.21917)

Discussion