Keep the Needle, Prune the Haystack: Defect-Preserving Token Pruning for Efficient Zero-Shot Anomaly Detection
On the map: Efficient LLM inference and serving → Token pruning and merging for ViTs
Abstract (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×2 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× speedup over the strongest CLIP-based baseline.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Token pruning and merging for ViTs, one of 12 directions in Efficient LLM inference and serving. Builds on 22 of its 36 references that are in the map. First posted on arXiv 4 Aug 2026.
Builds on
22 of 36 references.
Closest ancestors · 6
Same direction, newest first
- 2023Dynamic Token Pruning in Plain Vision Transformers for Semantic Segmentation2 Aug
- 2023Revisiting Token Pruning for Object Detection and Instance Segmentation12 Jun
- 2023Zero-TPrune: Zero-Shot Token Pruning through Leveraging of the Attention Graph in Pre-Trained Transformers27 May
- 2022Token Merging: Your ViT But Faster17 Oct
- 2021SPViT: Enabling Faster Vision Transformers via Soft Token Pruning27 Dec
- 2021Evo-ViT: Slow-Fast Token Evolution for Dynamic Vision Transformer3 Aug
Other references · 16
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2021DynamicViT: Efficient Vision Transformers with Dynamic Token Sparsificationcited by 864
- 2021Towards Total Recall in Industrial Anomaly Detectioncited by 776
- 2020PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localizationcited by 594
- 2022Not All Patches are What You Need: Expediting Vision Transformers via Token Reorganizationscited by 363
- 2021AdaViT: Adaptive Tokens for Efficient Vision Transformercited by 362
- 2021VT-ADL: A Vision Transformer Network for Image Anomaly Detection and Localizationcited by 223
- 2025Stop Looking for Important Tokens in Multimodal Language Models: Duplication Matters Morecited by 155
- 2021Patch Slimming for Efficient Vision Transformerscited by 133
- 2021Mixed supervision for surface-defect detection: from weakly to fully supervised learningcited by 101
- 2023SparseViT: Revisiting Activation Sparsity for Efficient High-Resolution Vision Transformercited by 60
- 2025Don't Just Chase "Highlighted Tokens" in MLLMs: Revisiting Visual Holistic Context Retentioncited by 47
4 more
- 2026Prune Redundancy, Preserve Essence: Vision Token Compression in VLMs via Synergistic Importance-Diversitycited by 24
- 2026VisionTrim: Unified Vision Token Compression for Training-Free MLLM Accelerationcited by 18
- 2026VisualAD: Language-Free Zero-Shot Anomaly Detection via Vision Transformercited by 11
- 2026One Language-Free Foundation Model Is Enough for Universal Vision Anomaly Detectioncited by 4
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Defect-aware Hybrid Prompt Optimization via Progressive Tuning for Zero-Shot Multi-type Anomaly Detection and Segmentation
- 2026DCP-Prune: Ultra-Low Token Pruning with Distribution Consistency Preservation
- 2026DevPrompt: Deviation-Based Prompt Learning for One-Normal ShotImage Anomaly Detection
- 2026TIPS Over Tricks: Simple Prompts for Effective Zero-shot Anomaly Detection
- 2024Unseen Visual Anomaly Generation
- 2024AnomalyDINO: Boosting Patch-based Few-shot Anomaly Detection with DINOv2
- 2026MoECLIP: Patch-Specialized Experts for Zero-shot Anomaly Detection
- 2026FB-CLIP: Fine-Grained Zero-Shot Anomaly Detection with Foreground-Background Disentanglement