Foundation Visual Encoders Are Secretly Few-Shot Anomaly Detectors

Guangyao Zhai, Yue Zhou, Xinyan Deng, Lars Heckler, Nassir Navab +1 more
10/2/2025
cs.CVcs.AIcs.LG

No official code found. Best implementation: ymxlzgy/FoundAD (82 stars, last commit 2026-03-16).

Abstract

Few-shot anomaly detection streamlines and simplifies industrial safety inspection. However, limited samples make accurate differentiation between normal and abnormal features challenging, and even more so under category-agnostic conditions. Large-scale pre-training of foundation visual encoders has advanced many fields, as the enormous quantity of data helps to learn the general distribution of normal images. We observe that the anomaly amount in an image directly correlates with the difference in the learnt embeddings and utilize this to design a few-shot anomaly detector termed FoundAD. This is done by learning a nonlinear projection operator onto the natural image manifold. The simple operator acts as an effective tool for anomaly detection to characterize and identify out-of-distribution regions in an image. Extensive experiments show that our approach supports multi-class detection and achieves competitive performance while using substantially fewer parameters than prior methods. Backed up by evaluations with multiple foundation encoders, including fresh DINOv3, we believe this idea broadens the perspective on foundation features and advances the field of few-shot anomaly detection.

View on arXivView PDF

Code Implementations(1)

ymxlzgy/FoundADCommunity72%

[ICLR 2026] The implementation of the paper Foundation Visual Encoders Are Secretly Few-Shot Anomaly Detectors

829Python, MakefileAug 15, 20257 months ago
anomaly-detectionanomaly-detection-algorithmanomaly-localizationanomaly-segmentationanomalydetection+10 more

Similar Papers

Cite this paper

@article{zhai2025foundation,
  title  = {Foundation Visual Encoders Are Secretly Few-Shot Anomaly Detectors},
  author = {Guangyao Zhai and Yue Zhou and Xinyan Deng and Lars Heckler and Nassir Navab and Benjamin Busam},
  year   = {2025},
  eprint = {2510.01934},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.01934v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.01934.svg)](https://codeofpaper.com/paper/2510.01934)

Discussion