paper-with-me

홈 › Papers

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

2026-08-04 · Yanning Hou, Jingyuan Zhang, Xiaoyun Wang, Qixiang Ma, Sihang Zhou, Ke Xu arxiv

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.

📄 PDF Abstract BibTeX arXiv:2608.03681

Code (0)

등록된 구현이 없습니다.

Tasks

Anomaly Detection

Similar Papers 제목 키워드 기반

Fast Bayesian Optimization of Needle-in-a-Haystack Problems using Zooming Memory-Based Initialization (ZoMBI)

2022-08-26 · Alexander E. Siemenn, Zekun Ren, Qianxiao Li, Tonio Buonassisi

Needle-in-a-Haystack problems exist across a wide range of applications including rare disease prediction, ecological resource management, fraud detection, and material property optimization. A Needle-in-a-Haystack probl…

Bayesian OptimizationDisease PredictionFraud DetectionManagement

GOLD PANNING: Strategic Context Shuffling for Needle-in-Haystack Reasoning

2025-10-10 · Adam Byerly, Daniel Khashabi arxiv

Large language models (LLMs) exhibit pronounced position bias in long-context needle-in-haystack problems, systematically prioritizing the location of information over its relevance. While current mitigations rely on whi…

Active Learning

Multimodal Needle in a Haystack: Benchmarking Long-Context Capability of Multimodal Large Language Models

2024-06-17 · Hengyi Wang, Haizhou Shi, Shiwei Tan, Weiyi Qin 외

Multimodal Large Language Models (MLLMs) have shown significant promise in various applications, leading to broad interest from researchers and practitioners alike. However, a comprehensive evaluation of their long-conte…

BenchmarkingHallucinationImage Retrieval+4

NoLiMa: Long-Context Evaluation Beyond Literal Matching

2025-02-07 · Ali Modarressi, Hanieh Deilamsalehy, Franck Dernoncourt, Trung Bui 외

Recent large language models (LLMs) support long contexts ranging from 128K to 1M tokens. A popular method for evaluating these capabilities is the needle-in-a-haystack (NIAH) test, which involves retrieving a "needle" (…

Multilingual Needle in a Haystack: Investigating Long-Context Behavior of Multilingual Large Language Models

2024-08-19 · Amey Hengle, Prasoon Bajpai, Soham Dan, Tanmoy Chakraborty

While recent large language models (LLMs) demonstrate remarkable abilities in responding to queries in diverse languages, their ability to handle long multilingual contexts is unexplored. As such, a systematic evaluation…

8kInformation RetrievalQuestion AnsweringRetrieval