FlashAttention with Statistics: Low-Overhead Attention Features for Compact Hallucination Detectors
Andrei Volodichev, Maksim Savichev, Nikita Sviridov, Artem Yuliy, Dmitry Simakov, Alexey Zaytsev
Key points
From the paper's conclusion- We compute these statistics without materializing attention, by accumulation in the FlashAttention pass, sparse lookups after it, or a second tiled pass over the scores, and classify them by this path into nearly free and costlier ones.
Abstract
Large language models can produce fluent answers that the supplied context does not support. A compact frozen proxy model can detect such answers by reading the context and another model's response, even from a proprietary generator. Attention-based detectors use summary statistics of the proxy's attention weights, but standard pipelines materialize the attention matrix, whose memory grows quadratically with sequence length. We compute these statistics without materializing attention, by accumulation in the FlashAttention pass, sparse lookups after it, or a second tiled pass over the scores, and classify them by this path into nearly free and costlier ones. On an H100, the statistics of five published detectors add 16% to the latency of a Qwen3-8B forward at 2K tokens, falling to 1.4% at 35K, and store 22.5 KiB per response token. On three benchmarks, probes trained on frozen Qwen3 proxies of 0.6B to 8B parameters prove strong detectors: a 4B proxy outperforms the strongest of nine zero-shot 4-9B LLM judges in F1 on two of the three, the proxies match or outperform specialized grounding checkers of up to 7B parameters, probing each proxy beats prompting it as a judge, and adding attention features significantly improves F1 in half of the 12 benchmark-proxy pairs, never significantly lowering it.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Hallucination Is Linearly Decodable from Mid-Layer Hidden States in Quantized LLMsarXiv · 2026
- What LLMs Do in the Shadows: Reading Context Reliance from the Unembedding Dark SpacearXiv · 2026
- HalluTracer: Hallucination Detection via Depth-Averaging Truth SignalsarXiv · 2026
- Local Entropy Fluctuations for Black-Box LLM-Generated Text DetectionarXiv · 2026
- LampAttention: Look-Ahead Mixed-Precision FlashAttention for Dedicated AcceleratorsarXiv · 2026
- Does the Ranking Hold? A Practitioner-Facing Audit of Hallucination Detectors on Small, Quantized, On-Device LLMsarXiv · 2026