TL;DR
Dense vision foundation models like DINOv3 secretly encode an overwhelming amount of spatial coordinate data, causing local anomaly detectors to group image patches by where they sit on the grid rather than what they look like. By surgically projecting out this positional bias when comparing across images—yet keeping it to smooth out defect maps within a single image—the authors unlock fast, training-free, few-shot industrial defect detection. Their lightweight framework outperforms giant 1.1B-parameter baselines at nearly four times the speed using just a single normal reference photo.
What Problem Does This Paper Address?
Imagine running a factory line that switches products every week. To catch scratches or missing solder joints automatically, you cannot wait to collect thousands of defective parts—you might only have one to four "normal" reference photos ($k \in \{1, 2, 4\}$) and zero compute budget for retraining. This is training-free few-shot anomaly detection (FSAD), where engineers extract patch features from frozen Vision Foundation Models (VFMs) and flag anything that deviates from normal.
A compact way to model "normal" without storing massive memory banks is fitting a linear Principal Component Analysis (PCA) subspace to normal patch features. However, complex objects like circuit boards have many distinct parts (chips, pins, fiberglass), making a single flat subspace too coarse. Fitting multiple local subspaces (one per part type) is the natural fix. Yet when the authors tried this on state-of-the-art DINOv3 features, accuracy mysteriously crashed by 2.87 percentage points. Why does a smarter geometric model fail on a stronger vision backbone?
Methods
The authors diagnose the crash—positional features hijacking the clustering—and introduce DPLM-AD (Debiased Piecewise-Linear Manifold Anomaly Detection), a dual-space pipeline that separates cross-image appearance modeling from single-image spatial refinement.
- Offline Positional Debiasing: Once per backbone, the model feeds 12 "semantic-free" probe images (blank grayscales, simple gradients, smoothed noise) through the frozen network. Because these images contain no objects, Singular Value Decomposition (SVD) on their features isolates pure grid-coordinate directions. Projecting real image patches onto the orthogonal complement ($B_\perp$) strips away the top $s=32$ positional dimensions while preserving exact Euclidean geometry.
- Piecewise-Linear Appearance Subspaces: Normal reference patches are grouped into $M=12$ part clusters using spherical $k$-means++ (relying only on vector direction). Crucially, the local PCA subspaces are then fit to unnormalized debiased features—stabilized for small sample sizes via Oracle Approximating Shrinkage (OAS)—preserving feature-norm (magnitude) cues. Test patches are scored by their minimum reconstruction error across candidate subspaces.
- Raw-Feature Graph Diffusion: Instead of blurring noisy anomaly maps with a blind Gaussian filter, DPLM-AD brings back the original, unprojected test features to build a $5 \times 5$ local affinity graph. Three fast random-walk diffusion steps smooth scores across spatially continuous regions while respecting sharp object and defect boundaries.
Datasets
Because DPLM-AD is strictly training-free, no datasets are used for gradient training. It is evaluated across 41 categories (23,700+ images) from five established industrial benchmarks (no new datasets are introduced):
- MVTec-AD (15 categories) & VisA (12 categories): Standard benchmarks covering textures and multi-part assemblies.
- MPDD (6 categories) & BTAD (3 categories): Metal parts with 3D pose shifts and homogeneous industrial surfaces.
- MVTec-LOCO (5 categories): Split into structural anomalies (dents, scratches) vs. logical anomalies (wrong part counts or global layout violations) to test the limits of removing spatial coordinates.
Key Insights and Ideas
- 3.1% of dimensions hoard 81% of the variance: In a 1024-dimensional DINOv3 feature space, just 32 positional dimensions account for 81.2% of the centered feature variance in normal images. Without debiasing, clustering fractures objects into arbitrary spatial quadrants rather than physical parts—meaning a slight shift or rotation causes normal parts to look wildly anomalous.
(Note: See visual verification below showing spatial quadrant fracturing vs. physical part tracking.)

- Position is poison across images, but medicine within an image: Stripping coordinates flips local subspace modeling from a $-2.87\%$ loss to a $+0.77\%$ gain in image-level AUROC ($+3.65\%$ synergy). Yet feeding those same debiased features into the final smoothing graph hurts performance; keeping raw positional features for intra-image graph diffusion sharpens defect boundaries.
- Don't throw away feature norms: Standard cosine-similarity pipelines normalize vectors to unit length. Keeping unnormalized Euclidean vectors during subspace scoring preserves a $2.4\text{--}2.7\times$ squared-norm contrast between foreground parts and background, jumping detection accuracy by $+9.45\%$ on tricky categories like
screw.
Key Results
Efficiency-accuracy Pareto frontier and regional defect localization scaling across k-shot references.
- Faster and lighter than giant backbones: Across MVTec-AD and VisA (1-shot), DPLM-AD with a 304M
DINOv3-L/16backbone achieves a 96.27% composite score and 95.41% Image-AUROC in 41.1 ms/image—beating SubspaceAD running on a 1.1BDINOv2-G/14model (+1.15% I-AUROC, +0.77% Composite) at 3.93$\times$ the inference speed and 59.4% less memory (which further halves to 3.43 MB in lossless FP16). - 4$\times$ Reference Efficiency: In regional defect localization (AUPRO), 1-shot DPLM-AD (95.24%) beats 4-shot SubspaceAD (94.37%) on the exact same features.
- Pose-shift resilience: On multi-pose metal parts (MPDD), DPLM-AD boosts Image-AUROC by +3.78% to +5.03% across 1-to-4-shot regimes.
Limitations and Future Work
- Logical layout blindness: When an anomaly is positional—like a breakfast box with food in the wrong compartment, or a bag with the wrong number of screws (MVTec-LOCO)—throwing away coordinates hurts 1-shot logical detection ($-3.63\%$ I-AUROC).
- Sample starvation & uniform surfaces: Fitting 12 local subspaces requires enough patch diversity and sample count. On unaugmented, single-orientation categories at 1-shot (e.g.,
transistor), clusters become sample-starved until 4-shot data is available; on flat, uniform textures (BTAD), global PCA already suffices. - Future directions: The authors suggest automatically adapting the cluster count and subspace rank using training-reference dispersion statistics, and pairing their appearance branch with a dedicated positional-layout branch to catch logical defects.
Summary updated