arXiv cs.AI· Andrei Volodichev, Maksim Savichev, Nikita Sviridov, Artem Yuliy, Dmitry Simakov, Alexey Zaytsev·· 2 天前AI 评分24
带统计量的 FlashAttention:面向紧凑幻觉检测器的低开销注意力特征
FlashAttention with Statistics: Low-Overhead Attention Features for Compact Hallucination Detectors
AI 导读
研究者提出在 FlashAttention 前向过程中直接累积注意力权重统计量,无需物化注意力矩阵,即可为幻觉检测器提供特征。在 H100 上,五个已发表检测器的统计量使 Qwen3-8B 在 2K token 时的前向延迟增加 16%,35K token 时降至 1.4%,每响应 token 仅存 22.5 KiB。
正文 · 原文
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.
| Subjects: | Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2610.21483 [cs.AI] |
| (or arXiv:2610.21483v1 [cs.AI] for this version) | |
| https://doi.org/10.48550/arXiv.2610.21483 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Andrei Volodichev [view email]
[v1]
Thu, 15 Oct 2026 08:23:42 UTC (427 KB)
来源:arXiv cs.AI · arxiv.org