arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2608.03681cs.CV

保留关键信息,精简冗余:面向高效零样本异常检测的缺陷保留型令牌剪枝

Keep the Needle, Prune the Haystack: Defect-Preserving Token Pruning for Efficient Zero-Shot Anomaly Detection

Yanning Hou, Jingyuan Zhang, Xiaoyun Wang, Qixiang Ma, Sihang Zhou, Ke Xu

中文总结 AI 辅助

针对零样本异常检测中令牌剪枝的不对称风险,提出KeepAD框架,通过分层剪枝策略结合自蒸馏,在大幅减少令牌量的同时保持检测性能,实现7.9倍加速。

中文摘要 AI 辅助

零样本视觉异常检测已取得显著进展,近期仅基于视觉的方法进一步提升了性能同时简化了推理流程。然而,现有方法通常对所有图像和空间令牌执行密集计算,尽管实际场景中正常样本占主导,异常通常仅占据小区域。令牌剪枝提供了一种有前景的解决方案,但在异常检测中引入了不对称剪枝风险:保留正常令牌主要会带来冗余计算,而移除异常令牌可能消除检测和定位的唯一证据。这种风险在早期层尤为严重,该层剪枝能带来最大计算收益但异常语义仍不可靠。我们提出KeepAD,一种缺陷保留型令牌剪枝框架,将令牌选择建模为高召回、异常感知的路由。在浅层,KeepAD结合对局部2×2补丁邻域的覆盖保留型选择与确定性异常救援,以降低丢弃细微缺陷的风险。在深层,冻结的正常和异常原型在图像自适应令牌预算下指导剪枝,积极移除低风险正常令牌同时保留局部异常证据。从密集到稀疏的自蒸馏进一步监督早期令牌路由,且不引入额外推理开销。在6个工业和7个医学零样本异常检测基准上的实验表明,KeepAD将令牌保留率降至20%以下,同时将图像级和像素级AUROC的平均下降限制在2.7个百分点以内。在最激进的操作点,KeepAD实现了比最强的基于CLIP的基线快7.9倍的加速。

英文摘要

Zero-shot visual anomaly detection has achieved remarkable progress, with recent vision-only approaches further improving performance while simplifying the inference pipeline. However, existing methods typically perform dense computation over all images and spatial tokens, despite the fact that normal samples dominate real-world scenarios and anomalies usually occupy only small regions. Token pruning offers a promising solution, but introduces an asymmetric pruning risk in anomaly detection: retaining normal tokens mainly incurs redundant computation, whereas removing anomalous tokens may eliminate the only evidence for detection and localization. This risk is particularly severe in early layers, where pruning provides the greatest computational benefit but anomaly semantics remain unreliable. We propose KeepAD, a defect-preserving token pruning framework that formulates token selection as high-recall, anomaly-aware routing. In shallow layers, KeepAD combines coverage-preserving selection over local $2\times2$ patch neighborhoods with deterministic anomaly rescue to reduce the risk of discarding subtle defects. In deeper layers, frozen normal and abnormal prototypes guide pruning under an image-adaptive token budget, aggressively removing low-risk normal tokens while preserving local anomaly evidence. Dense-to-sparse self-distillation further supervises early token routing without introducing additional inference overhead. Experiments on six industrial and seven medical zero-shot anomaly detection benchmarks show that KeepAD reduces the token retention ratio to below $20\%$, while limiting the average degradation in image-level and pixel-level AUROC to within $2.7$ percentage points. At the most aggressive operating point, KeepAD achieves a $7.9\times$ speedup over the strongest CLIP-based baseline.

↑