acceptodds
Under review as a conference paper at ICLR 2027

Which Normal Samples Matter? Query-Relevant Reference Selection for Industrial Anomaly Detection

Abstract

Recent few-shot methods have achieved strong performance in industrial anomaly detection with only a few normal samples as references. However, in practical industrial scenarios, normal data is often abundant and can be continuously collected over time. This raises a practical problem: when a large pool of normal samples is available, which samples are most suitable to serve as references for a given query image? We find that normal references do not contribute equally, and their relevance to the query can substantially affect anomaly detection performance. Based on this observation, we propose a training-free anomaly detection framework built on a foundation visual encoder. For each query image, our method first retrieves a small set of normal samples with the highest relevance to the query. We then use the retrieved references to model anomalies at the patch level by jointly considering how well each query patch matches normal features, and how well it can be explained by the normal variations across references. The resulting anomaly evidence is aggregated across multi-level features for anomaly detection. Experimental results show that our method achieves competitive performance across multi-class and single-class settings, with particularly strong results on pixel-level anomaly localization. Moreover, applying our reference retrieval strategy to existing few-shot methods consistently improves their performance, further demonstrating the importance of query-relevant normal references.

Primary area:
applications to computer vision, audio, language, and other modalities
Keywords:
Industrial Anomaly Detection, Computer Vision

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_9msfOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper proposes a training-free method for industrial anomaly detection that retrieves a small set of references for each query image from the full normal image pool. It combines CLS-based retrieval with coarse patch-similarity reranking, then scores anomalies using spatially constrained nearest-neighbor distances and local subspace reconstruction residuals. Experiments cover single-class and multi-class detection on MVTec AD and VisA, with additional evaluations on 3CAD and mixed reference pools. Component ablations and experiments integrating the retrieval strategy into other detectors examine the individual designs and the strategy’s applicability across methods.

Critical strengths
  1. Combining global and patch-level similarity makes reference selection less dependent on either signal alone. The two-stage design uses global similarity to identify relevant candidates and patch similarity to distinguish references with similar overall appearances but different local content. The ranking ablation supports this design.
  2. The retrieval strategy is useful beyond the proposed detector: it improves AnomalyDINO and SubspaceAD without changes to their scoring procedures. Its benefits across MVTec AD, VisA, and 3CAD provide evidence of practical value across different detectors and datasets.
Critical weaknesses

The main pipeline closely resembles RAD, which already retrieves query-relevant normal images and performs spatially constrained patch matching across multiple layers. The paper discusses RAD, but emphasizing reference selection as a separate stage does not clearly explain the distinction. The ranking and subspace ablations support parts of the proposed design, yet the overall advance over this existing approach remains insufficiently demonstrated.

The evaluation leaves several important questions unresolved. Several score adjustments and the one-sided refinement are not separately evaluated, so their contributions to the localization gains remain unclear. The authors report their own inference times but provide no matched comparison with other methods or full-reference scoring. The paper also does not explain how α = 0.25 and β = 0.1 were selected or whether independent validation data were used.

Questions for authors
  1. The paper discusses its differences from RAD, but the main retrieval and matching pipeline remains similar. Could the authors explain more clearly what the proposed changes improve and compare the methods using the same reference budgets, such as 4, 8, and 16 images, with the same backbone and input resolution?

  2. Can the authors compare inference time and memory usage with representative methods under the same conditions? This would help assess the computational cost alongside the reported accuracy.

  3. How much does the one-sided refinement contribute to PRO? Please report the localization results without this operation.

  4. How were α = 0.25 and β = 0.1 selected? Please describe the validation data and selection procedure, and clarify their relationship to the results in Figures 4 and 5.

7 comments

Thank you for the questions.

1. Although our method and RAD retrieve normal references before scoring anomalies, they differ in how they select the references, what the retrieval module passes to the detector, and how the detector scores each query patch.

First, our retrieval has two stages. We use CLS-token similarity to retrieve the top TT normal images as candidates, then compare each candidate’s patch tokens with patch tokens from the query image. We combine the CLS and patch rankings to select the final KK references. RAD selects its KK reference images directly from CLS-token similarity alone.

Second, our retrieval module returns a set of normal images. Any few-shot detector that accepts reference images can use these normal images with its own scoring procedure, as we demonstrate with AnomalyDINO and SubspaceAD. In RAD’s pipeline, retrieval gives the scorer direct access to stored patch tokens from the selected images for feature matching. Reusing that pipeline with a detector that expects images as input would require adapting what it passes to the detector. Therefore, our plug-and-play module offers greater flexibility.

Finally, RAD scores each query patch by its similarity to the closest reference patch within a local spatial neighborhood. Our similarity score also considers matches elsewhere in the retrieved images. A better global patch match reduces the local nearest-neighbor distance according to the similarity gap. In addition, we use the locally matched patches from the KK references to fit a low-rank subspace. The query patch’s reconstruction residual provides a second anomaly score that captures deviations from the local normal variation (Eqs. 8–15).

We evaluated both methods at the requested budgets, using DINOv2-B/14 with 518×518518\times518 input resolution and DINOv3-B/16 with 512×512512\times512 input resolution. Each entry is RAD / ours (%).

\hline \text{Backbone} & \text{Dataset} & \text{References} & \text{I-AUROC (\\%)} & \text{I-AUPR (\\%)} & \text{P-AUROC (\\%)} & \text{PRO (\\%)} \\\\ \hline & & 4 & 98.4 / 99.0 & 99.3 / 99.5 & 98.0 / 98.4 & 95.9 / 96.5 \\\\ & \text{MVTec-AD} & 8 & 98.9 / 99.2 & 99.6 / 99.6 & 98.2 / 98.5 & 96.4 / 96.7 \\\\ & & 16 & 99.2 / 99.3 & 99.7 / 99.7 & 98.4 / 98.5 & 96.7 / 96.7 \\\\ \smash{\raise{0.65em}{\text{DINOv2-B/14}}} & & 4 & 91.1 / 94.0 & 91.0 / 94.4 & 98.4 / 98.8 & 93.1 / 95.5 \\\\ & \text{VisA} & 8 & 92.2 / 95.1 & 92.3 / 95.2 & 98.7 / 98.9 & 94.2 / 96.0 \\\\ & & 16 & 93.7 / 95.7 & 93.3 / 95.6 & 98.9 / 99.0 & 95.0 / 96.2 \\\\ & & 4 & 98.3 / 99.2 & 99.3 / 99.6 & 98.4 / 98.4 & 96.4 / 96.8 \\\\ & \text{MVTec-AD} & 8 & 99.0 / 99.3 & 99.6 / 99.7 & 98.5 / 98.6 & 96.7 / 96.9 \\\\ & & 16 & 99.2 / 99.4 & 99.7 / 99.8 & 98.6 / 98.6 & 96.9 / 97.0 \\\\ \smash{\raise{0.65em}{\text{DINOv3-B/16}}} & & 4 & 93.0 / 94.7 & 93.1 / 94.6 & 98.7 / 99.0 & 93.0 / 95.5 \\\\ & \text{VisA} & 8 & 94.2 / 95.3 & 93.8 / 95.0 & 99.0 / 99.1 & 94.2 / 95.9 \\\\ & & 16 & 94.9 / 95.9 & 94.3 / 95.8 & 99.1 / 99.2 & 95.0 / 96.0 \\\\ \hline \end{array}$$ The largest localization gains occur on VisA at 4-Ref, where PRO increases by 2.4 points with DINOv2 and 2.5 with DINOv3. On MVTec-AD, the gap narrows with more references. At 16-Ref, the two methods tie on PRO with DINOv2 and differ by 0.1 points with DINOv3. We also measured the percentage of retrieved references that belong to the query category. Each entry is **RAD / ours** (%). $$\begin{array}{ccccc} \hline \text{Backbone} & \text{Dataset} & \text{4 references} & \text{8 references} & \text{16 references} \\\\ \hline & \text{MVTec-AD} & 100.00 / 100.00 & 99.98 / 100.00 & 99.99 / 100.00 \\\\ \smash{\raise{0.65em}{\text{DINOv2-B/14}}} & \text{VisA} & 99.94 / 99.95 & 99.93 / 99.95 & 99.92 / 99.93 \\\\ & \text{MVTec-AD} & 100.00 / 100.00 & 100.00 / 100.00 & 100.00 / 100.00 \\\\ \smash{\raise{0.65em}{\text{DINOv3-B/16}}} & \text{VisA} & 100.00 / 100.00 & 100.00 / 100.00 & 100.00 / 100.00 \\\\ \hline \end{array}$$ With DINOv2, our two-stage retrieval improves same-category precision in five of the six settings by 0.01–0.02 percentage points. With DINOv3, both methods reach 100% at every budget. In conclusion, under the same visual encoder backbones, input resolutions and reference budgets, our method outperforms RAD overall in anomaly detection and localization. Across all 12 comparisons, I-AUROC is higher in every case, and each of the other three metrics matches or exceeds RAD at the reported precision. Our retrieval module slightly improves on RAD in same-category retrieval precision across the tested settings.

2. We measured online query latency and peak memory in three runs over all 1,725 MVTec-AD test images using the same RTX 3090 (24 GB), DINOv3-B/16 and 512×512512\times512 inputs. Online latency excludes offline preparation of the normal reference bank. For our method, it includes reference retrieval, access to reference features, and anomaly scoring. The budgets are shown explicitly because RAD uses its default 150 references in this timing experiment.

\hline \text{Method} & \text{Setting} & \begin{array}{c}\text{Online latency} \\\\ \text{(ms/image, mean ± SD)}\end{array} & \begin{array}{c}\text{End-to-end time} \\\\ \text{(ms/image, mean ± SD)}\end{array} & \begin{array}{c}\text{Peak GPU memory} \\\\ \text{(MiB)}\end{array} & \begin{array}{c}\text{Peak memory} \\\\ \text{(MiB)}\end{array} \\\\ \hline & \text{1 retrieved} & 89.32 \pm 6.43 & 89.32 \pm 6.43 & 480.46 & 3298.00 \\\\ \text{Ours} & \text{8 retrieved} & 388.49 \pm 9.51 & 388.49 \pm 9.51 & 1251.06 & 3800.49 \\\\ & \text{16 retrieved} & 773.38 \pm 31.38 & 773.38 \pm 31.38 & 2126.19 & 4011.20 \\\\ & \text{1-shot} & 68.45 \pm 0.63 & 72.50 \pm 0.63 & 395.73 & 1475.17 \\\\ \text{AnomalyDINO} & \text{4-shot} & 75.27 \pm 0.46 & 91.12 \pm 0.46 & 467.82 & 1549.79 \\\\ & \text{full-shot} & 478.08 \pm 1.54 & 1614.92 \pm 1.54 & 9767.91 & 11487.38 \\\\ & \text{1-shot} & 22.38 \pm 0.13 & 34.85 \pm 0.13 & 381.36 & 1836.00 \\\\ \text{SubspaceAD} & \text{4-shot} & 22.42 \pm 0.15 & 71.02 \pm 0.15 & 381.36 & 1926.40 \\\\ & \text{full-shot} & 21.74 \pm 0.12 & 2580.33 \pm 0.12 & 381.36 & 2650.43 \\\\ \text{RAD} & \text{150 retrieved} & 2034.63 \pm 198.30 & 2034.63 \pm 198.30 & 414.63 & 1707.95 \\\\ \hline \end{array}$$ SubspaceAD takes about 22 ms/image online at all three reference budgets. AnomalyDINO’s online latency increases from 68.45 ms/image at 1-shot to 478.08 at full-shot. Our method takes 89.32, 388.49 and 773.38 ms/image at 1-, 8- and 16-Ref, respectively. RAD takes 2,034.63 ms/image at its default budget of 150 references. **3.** We repeated the localization experiment with one-sided refinement disabled, holding all other settings fixed. Each entry gives the pixel-level result with **refinement off / on** (%). $$\begin{array}{cccc} \hline \text{Dataset} & \text{References} & \text{P-AUROC (\\%)} & \text{PRO (\\%)} \\\\ \hline & 4 & 98.32 / 98.45 & 96.81 / 96.78 \\\\ \text{MVTec-AD} & 8 & 98.43 / 98.55 & 96.97 / 96.93 \\\\ & 16 & 98.47 / 98.59 & 97.03 / 96.98 \\\\ & 4 & 99.00 / 99.01 & 95.09 / 95.55 \\\\ \text{VisA} & 8 & 99.11 / 99.12 & 95.46 / 95.86 \\\\ & 16 & 99.19 / 99.19 & 95.69 / 96.03 \\\\ \hline \end{array}$$ Image-level scores are identical because they are computed before this operation. On VisA, which includes scenes with complex backgrounds, refinement improves PRO at all three budgets. On MVTec-AD, it slightly improves P-AUROC but slightly lowers PRO. We therefore view one-sided refinement as a lightweight way to improve regional continuity. It fills locally depressed responses and may help when complex structures or dispersed defect regions produce fragmented anomaly maps. Its overall contribution to localization is modest. The anomaly maps produced by reference retrieval and patch scoring already achieve most of the reported localization performance before refinement.

4. We selected α=0.25\alpha=0.25 and β=0.1\beta=0.1 empirically on MVTec-AD and VisA without an independent validation split. Figures 4 and 5 show the corresponding ablations at 1-Ref and 2-Ref, respectively. We used the same parameter settings across datasets and reference budgets.

The coefficient α\alpha sets the weight of the CLS ranking when reranking the candidate pool. To evaluate the role of patch correspondence where category confusion occurs, we additionally varied α\alpha on 3CAD, a real-world industrial dataset. The table reports same-category retrieval precision (%).

\hline \alpha\text{ in reranking} & \text{1 reference} & \text{2 references} & \text{4 references} \\\\ \hline \text{0.00 (patch only)} & 97.165 & 97.045 & 96.797 \\\\ \textbf{0.25 (default)} & 97.111 & 96.984 & 96.791 \\\\ 0.50 & 97.057 & 96.999 & 96.715 \\\\ 0.75 & 97.027 & 96.942 & 96.690 \\\\ \text{1.00 (CLS only)} & 96.869 & 96.745 & 96.582 \\\\ \hline \end{array}$$ Patch-only reranking gives the highest category precision on 3CAD. The default setting $\alpha=0.25$ also improves on CLS alone at every budget, by 0.21–0.24 percentage points. For the original parameter choice, Figure 4 evaluates detection performance on MVTec-AD and VisA. It shows that emphasizing patch correspondence benefits localization, while retaining some CLS information can help image-level detection. We chose $\alpha=0.25$ to retain global appearance while giving greater weight to patch-level correspondence. Figure 5 examines $\beta$ at 2-Ref. To check whether that setting is representative, we also evaluated the fusion weight at $K \in \lbrace 1, 2, 4, 8, 16 \rbrace$. The table gives mean performance across the five budgets for all seven tested weights (%). $$\begin{array}{cccccc} \hline \text{Dataset} & \beta & \text{I-AUROC (\\%)} & \text{I-AUPR (\\%)} & \text{P-AUROC (\\%)} & \text{PRO (\\%)} \\\\ \hline & 0 & 99.09 & 99.56 & 98.35 & 96.63 \\\\ & \mathbf{0.1} & 99.09 & 99.56 & 98.39 & 96.70 \\\\ & 0.3 & 99.06 & 99.54 & 98.44 & 96.76 \\\\ \text{MVTec-AD} & 0.5 & 99.02 & 99.51 & 98.47 & 96.77 \\\\ & 0.7 & 98.99 & 99.49 & 98.48 & 96.77 \\\\ & 0.9 & 98.97 & 99.47 & 98.48 & 96.76 \\\\ & 1 & 98.95 & 99.46 & 98.49 & 96.75 \\\\ & 0 & 94.88 & 94.90 & 98.93 & 95.10 \\\\ & \mathbf{0.1} & 94.73 & 94.73 & 98.95 & 95.16 \\\\ & 0.3 & 94.43 & 94.37 & 98.97 & 95.18 \\\\ \text{VisA} & 0.5 & 94.10 & 93.97 & 98.97 & 95.15 \\\\ & 0.7 & 93.79 & 93.59 & 98.97 & 95.10 \\\\ & 0.9 & 93.48 & 93.27 & 98.96 & 95.04 \\\\ & 1 & 93.33 & 93.11 & 98.96 & 95.01 \\\\ \hline \end{array}$$ In Eq. (15), $\beta$ balances nearest-neighbor distance (weight $1-\beta$) and the local subspace residual (weight $\beta$). Increasing $\beta$ generally favors pixel-level localization at the expense of image-level discrimination. We chose $\beta=0.1$ as a compromise. In addition, a coefficient of 0.1 still gives the subspace term substantially more than 10% of the mean fused patch score because the two distances have different scales. Across the five reference budgets, the mean raw subspace residual is 4.87–5.34 times the mean corrected NN distance on MVTec-AD and 5.85–6.14 times on VisA. After weighting and the dispersion adjustment in Eq. (15), the subspace term accounts for **35.74–37.25%** of the mean fused patch score on MVTec-AD and **39.94–40.99%** on VisA. We thank the reviewer again and hope these responses address their concerns. We would be glad to clarify anything further and we hope the reviewer will consider raising their score.
Reviewer_6zgfOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper investigates the importance of normal reference selection in industrial anomaly detection, where abundant normal samples are available but existing few-shot methods typically rely on randomly selected references. The authors propose a training-free retrieve-then-score framework using a frozen DINOv3 encoder, which selects query-relevant normal references through global CLS similarity and patch-level reranking. The retrieved references are then used for spatially constrained patch matching and local subspace modeling, combining nearest-neighbor distances and reconstruction residuals for anomaly detection and localization. Experiments on MVTec-AD, VisA, and 3CAD demonstrate competitive performance.

Critical strengths

1.Practical problem. Reference selection is an important and relevant problem in industrial anomaly detection, as the choice of normal references can substantially affect detection performance.

2.Training-free approach. The proposed method does not require task-specific training, making it potentially applicable to different categories and datasets.

3.Clear presentation. The paper is generally well organized, with a clear motivation and a logically structured technical approach.

Critical weaknesses

1.The retrieval process relies on the CLS and patch features of the query image itself. When an anomalous region is large or exhibits distinctive textures, it may influence the retrieval results and cause the method to select normal references with similar visual patterns, potentially reducing anomaly detection performance.

2.The paper reports 100% category-level retrieval precision on the mixed normal pools of MVTec-AD and VisA. However, many categories in these datasets have visually distinct appearances, such as bottles, screws, leather, and grids. High category-level retrieval precision in these settings does not necessarily demonstrate the robustness of the proposed method to challenging cross-category confusions. More difficult retrieval scenarios should be investigated.

3.Each query image requires a global similarity search, followed by patch-level matching among the (T) candidate images. Would this lead to additional inference time and computational overhead?

4.The method involves several hyperparameters, such as (δ=0.05\delta=0.05) and (rs=4r_s=4), whose selection is not sufficiently explained. The authors should clarify how these values are determined and provide sensitivity analyses to demonstrate the robustness of the method to different hyperparameter choices.

5.Although the overall results are strong, performance on certain categories remains relatively weak, including Macaroni2 in VisA and Screw and Transistor in MVTec-AD. These failure cases should be discussed in the main experimental analysis to better understand the limitations of the proposed method.

Questions for authors

See Weaknesses: 1.The retrieval process relies on the CLS and patch features of the query image itself. When an anomalous region is large or exhibits distinctive textures, it may influence the retrieval results and cause the method to select normal references with similar visual patterns, potentially reducing anomaly detection performance.

2.The paper reports 100% category-level retrieval precision on the mixed normal pools of MVTec-AD and VisA. However, many categories in these datasets have visually distinct appearances, such as bottles, screws, leather, and grids. High category-level retrieval precision in these settings does not necessarily demonstrate the robustness of the proposed method to challenging cross-category confusions. More difficult retrieval scenarios should be investigated.

3.Each query image requires a global similarity search, followed by patch-level matching among the (T) candidate images. Would this lead to additional inference time and computational overhead?

4.The method involves several hyperparameters, such as (δ=0.05\delta=0.05) and (rs=4r_s=4), whose selection is not sufficiently explained. The authors should clarify how these values are determined and provide sensitivity analyses to demonstrate the robustness of the method to different hyperparameter choices.

5.Although the overall results are strong, performance on certain categories remains relatively weak, including Macaroni2 in VisA and Screw and Transistor in MVTec-AD. These failure cases should be discussed in the main experimental analysis to better understand the limitations of the proposed method.

2 comments

Thank you for the questions.

1. Both the CLS and the coarse patch features are computed from the given query image. A large defect or a distinctive texture could therefore favor a normal reference with a similar local texture and reduce the anomaly score at that location, even when the reference belongs to the correct category.

To examine what our results establish about large defects, we measured defect area as a fraction of image area. Among anomalous test images, 19.32% on MVTec-AD and 3.58% on VisA have defects covering more than 5% of the image. The corresponding fractions above 10% coverage are 9.70% and 3.08%. All selected references belonged to the query category in the mixed-pool experiment (Appendix A.2.5), including for these large-defect queries. This establishes category consistency for the evaluated queries.

Large defects thus had little observable impact on category-level precision in these two benchmarks. On 3CAD, most test images contain multiple defect regions with varied appearances and distinctive textures. Of all defect regions, 53.5% cover less than 0.1% of the image and 92.3% cover less than 1%. At 1-Ref, same-category precision falls to 97.1%, so retrieval still selects the correct category for most queries in this industrial setting. Small, scattered defects and texture variation may make retrieval and anomaly scoring more difficult.

2. We agree that visually distinct categories make the 100% precision on the mixed MVTec-AD/VisA pool easier to achieve. On 3CAD, where all eight product categories share one normal pool, cross-category retrieval errors occur. The comparison below shows what happens to downstream performance when references from other categories become eligible. Each metric pair gives single-class / multi-class performance at the same reference budget (Appendix Tables 6 and 8).

\hline \text{References} & \begin{array}{c}\text{Same-category precision,} \\\\ \text{multi-class (\\%)}\end{array} & \text{I-AUROC (\\%)} & \text{I-AUPR (\\%)} & \text{P-AUROC (\\%)} & \text{PRO (\\%)} \\\\ \hline 1 & 97.1 & 84.3 / 84.0 & 89.8 / 89.7 & 94.2 / 94.0 & 85.6 / 85.3 \\\\ 2 & 97.0 & 84.0 / 83.6 & 89.7 / 89.6 & 94.6 / 94.3 & 86.0 / 85.4 \\\\ 4 & 96.8 & 83.8 / 83.5 & 89.6 / 89.6 & 94.8 / 94.6 & 86.2 / 85.9 \\\\ \hline \end{array}$$ On 3CAD, pooling categories introduces occasional cross-category matches and modestly reduces downstream anomaly detection and localization performance. **3.** We timed reference selection on MVTec-AD using an RTX 3090. Given the query features, selecting references from the normal pool takes **2.90 ms per query** at the default candidate count of $T=32$. The following table reports retrieval-stage latency. $$\begin{array}{cccc} \hline \text{Candidates (}T) & \text{CLS search (ms/query)} & \begin{array}{c}\text{Coarse patch reranking} \\\\ \text{(ms/query)}\end{array} & \text{Total retrieval (ms/query)} \\\\ \hline 8 & 0.257 & 1.622 & 1.886 \\\\ 16 & 0.282 & 2.041 & 2.334 \\\\ 32 & 0.262 & 2.629 & 2.897 \\\\ 48 & 0.258 & 3.471 & 3.735 \\\\ 64 & 0.276 & 4.295 & 4.576 \\\\ \hline \end{array}$$ The CLS search scans the same normal pool at every $T$. Most of the additional time as $T$ increases comes from comparing coarse patches for more candidates. Increasing $T$ beyond 32 gave no consistent detection gain in Table 9. These results support choosing $T=32$ in practice to balance retrieval time and detection performance.

4. We used the same parameter settings across datasets and reference budgets. In Eqs. (9)–(10), δ=0.05\delta=0.05 means that a global match receives the full correction once its cosine similarity exceeds the best local similarity by 0.05. Smaller positive differences receive a partial correction. We tested four thresholds at different values of KK. The metrics below are averaged over K∈{1,2,4,8,16}K \in \lbrace 1, 2, 4, 8, 16 \rbrace.

\hline \text{Dataset} & \delta & \text{I-AUROC (\\%)} & \text{I-AUPR (\\%)} & \text{P-AUROC (\\%)} & \text{PRO (\\%)} \\\\ \hline & 0.01 & 99.09 & 99.56 & 98.39 & 96.69 \\\\ & \mathbf{0.05} & 99.09 & 99.56 & 98.39 & 96.70 \\\\ \smash{\raise{0.65em}{\text{MVTec-AD}}} & 0.10 & 99.08 & 99.55 & 98.39 & 96.71 \\\\ & 0.50 & 99.04 & 99.53 & 98.39 & 96.72 \\\\ & 0.01 & 94.76 & 94.75 & 98.96 & 95.17 \\\\ & \mathbf{0.05} & 94.73 & 94.72 & 98.95 & 95.16 \\\\ \smash{\raise{0.65em}{\text{VisA}}} & 0.10 & 94.68 & 94.68 & 98.95 & 95.14 \\\\ & 0.50 & 94.57 & 94.54 & 98.94 & 95.11 \\\\ \hline \end{array}$$ VisA favors a smaller threshold, particularly for image-level detection. Reducing $\delta$ from 0.05 to 0.01 increases mean I-AUROC by 0.03 points on VisA and leaves it unchanged to the reported precision on MVTec-AD. We chose $r_s=4$ to allow several directions of local normal variation while keeping each patch model low-rank. The centered support admits at most $K-1$ directions, so $K=1$ and $K=2$ cannot distinguish any of the tested caps. The most informative comparison is at $K=16$, where caps of 2, 4, 8 and 16 retain up to 2, 4, 8 and 15 directions, respectively. $$\begin{array}{cccccc} \hline \text{Dataset} & r_s & \text{I-AUROC (\\%)} & \text{I-AUPR (\\%)} & \text{P-AUROC (\\%)} & \text{PRO (\\%)} \\\\ \hline & 2 & 99.40 & 99.76 & 98.58 & 96.99 \\\\ & \mathbf{4} & 99.40 & 99.76 & 98.59 & 96.98 \\\\ \smash{\raise{0.65em}{\text{MVTec-AD}}} & 8 & 99.39 & 99.76 & 98.59 & 96.98 \\\\ & 16 & 99.39 & 99.75 & 98.59 & 96.98 \\\\ & 2 & 95.83 & 95.76 & 99.19 & 96.03 \\\\ & \mathbf{4} & 95.87 & 95.80 & 99.19 & 96.03 \\\\ \smash{\raise{0.65em}{\text{VisA}}} & 8 & 95.87 & 95.80 & 99.20 & 96.04 \\\\ & 16 & 95.85 & 95.76 & 99.20 & 96.04 \\\\ \hline \end{array}$$ Across the tested ranks, all four metrics vary by at most 0.04 percentage points on either dataset, indicating little sensitivity to the subspace rank. **5.** On **Macaroni2**, each image contains four pieces whose orientations can vary independently. An image-level reference can match some pieces closely while providing poor spatial correspondences for others. To probe this explanation, we kept the retrieved references fixed and applied the eight-view augmentation used by AnomalyDINO during scoring. At 16-Ref, I-AUROC increased from 78.12 to 81.26, while PRO decreased from 95.88 to 95.28 in the same experiment. The gain in image-level detection is consistent with limited pose coverage. The localization result also shows the trade-off in adding transformed views. On **Screw**, orientation varies, and some examples contain a background region in the upper-left corner that can draw a spurious anomaly response. A high background response can influence the image score because the image score averages the highest patch scores. At 1-Ref, P-AUROC reaches 99.0 while I-AUROC is 94.6. Increasing the budget to 16 raises I-AUROC to 96.2. On **Transistor**, some test images contain a missing transistor component. Detecting an absent component requires sensitivity to what should occupy that position, and a locally ordinary-looking background patch can still find a good match elsewhere in a reference. This is a plausible difficulty for our method. Increasing the budget from 1 to 16 references raises I-AUROC from 94.1 to 99.3 and PRO from 89.3 to 93.5 (Tables 13–14). These gains suggest that using more references from the Transistor class may help mitigate this difficulty. We thank the reviewer again and hope these responses address their concerns. We would be glad to clarify anything further and we hope the reviewer will consider raising their score.
Reviewer_cY7gOpenReview ↗
Rating
3
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper addresses a common practical challenge in Industrial Anomaly Detection (IAD): while "normal" samples are abundant, different reference samples contribute unequally to the analysis of a given query image. The authors explore how to select reference images—from a large pool of normal samples—that are most relevant to a specific query. They propose a training-free, "retrieve-then-score" anomaly detection framework built upon a frozen visual foundation encoder (utilizing DINOv3-B/16 by default). Experiments conducted on MVTec-AD, VisA, and the real-world industrial dataset 3CAD—covering both multi-class and single-class settings—demonstrate that this method achieves competitive results in pixel-level anomaly localization (e.g., a PRO score of 97.0% on MVTec-AD and 96.0% on VisA with 16 reference samples). Furthermore, when this retrieval strategy is applied directly to existing few-shot methods such as AnomalyDINO and SubspaceAD, it consistently enhances their detection performance under a fixed reference budget.

Critical strengths
  1. The paper identifies a practical compromise between traditional few-shot (randomly sampled KK-shot) and full-shot settings: when a sufficient pool of normal samples is available but inference is constrained by a computational budget, the relevance of reference samples to the query becomes more critical than simply increasing the number of randomly selected samples. As demonstrated in Tables 3, 5, and 6, integrating the proposed retrieval strategy into AnomalyDINO and SubspaceAD—without altering their subsequent scoring logic—yields significant performance gains across the MVTec-AD, VisA, and 3CAD datasets. For instance, on the 3CAD dataset, which features substantial variations in pose and appearance, the "1-Ref" approach outperforms random 1-shot sampling by over 15 percentage points in terms of I-AUROC across all three methods, and it consistently surpasses random 4-shot sampling as well.
  2. In multi-category settings—comprising 15 categories from MVTec-AD and 12 from VisA, combined into an extensive shared pool of 27 categories containing 12,288 normal images (Appendix A.2.5, Table 7)—this method achieves 100% category-level retrieval accuracy without the use of any category labels, demonstrating the reliability of the two-stage retrieval strategy in cross-category scenarios.
  3. In both multi-class and single-class benchmarks (Table 1, Table 2), this method outperforms existing training-free baselines—as well as certain methods that require training (such as Dinomaly and INP-Former)—in terms of pixel-level metrics (notably the PRO metric, achieving 97.0% on MVTec-AD and 96.0%/96.7% on VisA).
Critical weaknesses
  1. Attribution confounding arising from inconsistent visual backbones when comparing against the latest training-free baselines. The method proposed in this paper defaults to using the latest DINOv3-B/16 as the visual encoder, whereas the training-free methods compared in Tables 1 and 2 (such as AnomalyDINO, PatchCore, etc.) are typically based on DINOv2 or earlier backbone networks in their original papers. According to the ablation results presented in Tables 4 and 12 of this paper, under the 1-Ref setting, simply replacing the backbone network from DINOv2-B/14 to DINOv3-B/16 results in a significant improvement in performance on the VisA dataset: the I-AUROC increases from 90.9% to 93.8% (+2.9%), and the I-AUPR rises from 91.7% to 94.3% (+2.6%).
  2. Local low-rank subspace modeling—which encompasses the construction of local support matrices, data centering, eigendecomposition of Gram matrices, and the computation of ridge-regularized projection residuals—constitutes one of the core innovations of the proposed method and occupies a significant portion of the methodology section. However, in the implementation details, the fusion weight is set to β=0.1\beta = 0.1 (meaning the nearest-neighbor term carries 90% of the weight). More critically, as shown in Figure 5 (the "2-Ref" ablation study), setting β=0\beta = 0—effectively removing the subspace branch entirely and relying solely on nearest-neighbor evidence—actually yields the highest I-AUROC and I-AUPR values ​​on the VisA dataset; these metrics then decline monotonically as β\beta increases. On the MVTec-AD dataset, the performance metrics for β=0\beta = 0 and β=0.1\beta = 0.1 are virtually identical (with differences imperceptible to the naked eye). Furthermore, the normalization term 1+σp(l)1 + \sigma_p^{(l)} in the denominator of Equation (15)—representing the dispersion of the local normal support set—as well as the global soft-gating corrections in Equations (8)–(10), are never subjected to dedicated ablation studies anywhere in the paper.
  3. The paper emphasizes—both in the abstract and in Appendix A.2.3—that by scoring only the KK retrieved samples, the proposed method achieves a practical trade-off between the coverage of normal data and inference efficiency. However, according to the data reported in Appendix A.2.3, the average inference latency per image for the methods highlighted in the main experimental tables (Tables 1 & 2)—namely "Ours (8-Ref)" and "Ours (16-Ref)"—reaches 355.19 ms and 716.01 ms, respectively, when run on a single RTX 3090 GPU (with the 16-Ref configuration reaching 803.8 ms on the 3CAD dataset). Furthermore, the paper fails to provide inference times for any baseline methods (such as PatchCore, AnomalyDINO, SubspaceAD, RAD, or the training-based approach Dinomaly) on the same hardware. It also lacks a breakdown of the time spent on the retrieval phase (CLS retrieval + coarse patch reranking) versus the scoring phase (nearest-neighbor search + SVD/eigen-decomposition for each patch).
Questions for authors
  1. If the method proposed in this paper were fixed to use DINOv2-B/14 (consistent with approaches like AnomalyDINO), what would the performance be on the MVTec-AD and VisA datasets under the 8-Ref, 16-Ref, and Full-shot settings? Furthermore, in Table 2, SubspaceAD (which utilizes DINOv3-B/16, as noted in its original paper and in Table 3 of this paper) achieves 98.2% I-AUROC and 96.9% PRO on the VisA dataset—slightly higher than the 97.9% I-AUROC and 96.7% PRO reported for this paper’s method under the Full-shot setting. How do the authors interpret the performance differences (or similarities) between their method and SubspaceAD in the Full-shot, single-category setting?
  2. Regarding the 716.01 ms single-image inference latency for the 16-Ref setting reported in Appendix A.2.3, what is the breakdown of this time (in milliseconds) across the individual steps—namely, the DINOv3 forward pass, CLS retrieval, coarse-grained patch reordering, local/global nearest-neighbor (NN) search, and the eigenvalue decomposition of the local Gram matrices? Are there any straightforward batching or matrix-parallelization techniques that could significantly reduce this latency?
  3. Please confirm whether the "Ours (8-Ref)" and "Ours (16-Ref)" results in Table 2 (single-category setting) were obtained by re-running the retrieval process specifically on a single-category pool. If so, when performing retrieval from a multi-category pool, do the top T=32T=32 candidate samples consistently fall within the same category as the query for all test images (thereby ensuring that the ranking scores in Equation 4 are identical between the single-category and multi-category settings)?
  4. For the 'Macaroni2' category in the VisA dataset, the I-AUROC for the 16-Ref setting is only 78.1%, whereas the Full-shot setting achieves 88.4% (Table 16). Could this be because image-level retrieval (CLS + 8×88\times 8 coarse patches) struggles to simultaneously match the distinct rotation angles of the four separate macaroni pieces present in an image? Do the authors have any ideas for potential improvements to address this?
6 comments

Thank you for the questions.

W1. We agree that the visual encoder can affect performance and that Tables 1 and 2 alone cannot separate its contribution from that of the detector. Our main comparison follows the reporting practice used in prior work. For example, SubspaceAD uses DINOv2-G/14 and FoundAD uses DINOv3-B/16 in their main experiments. Both compare against methods including PatchCore and WinCLIP, with each method retaining its own encoder architecture and parameter count.

To address your concern directly, we also evaluated our method with DINOv2-B/14 at 8-Ref, 16-Ref and full-shot (see Q1 for details). The results in Q1 show that our method remains competitive with DINOv2 as more normal references become available. This supports the conclusion that the method does not depend on representations specific to DINOv3.

W2. We agree that Figure 5 shows a modest gain from the subspace residual. The table compares NN alone / NN plus subspace (β=0\beta=0 / 0.10.1) at all five reference budgets, including the 2-Ref setting in Figure 5.

\hline \text{Dataset} & \text{References} & \text{I-AUROC (\\%)} & \text{I-AUPR (\\%)} & \text{P-AUROC (\\%)} & \text{PRO (\\%)} \\\\ \hline & 1 & 98.60 / 98.59 & 99.27 / 99.25 & 98.07 / 98.08 & 96.16 / 96.20 \\\\ & 2 & 98.90 / 98.89 & 99.41 / 99.39 & 98.27 / 98.30 & 96.53 / 96.58 \\\\ \text{MVTec-AD} & 4 & 99.23 / 99.24 & 99.66 / 99.67 & 98.40 / 98.45 & 96.71 / 96.78 \\\\ & 8 & 99.35 / 99.33 & 99.72 / 99.71 & 98.49 / 98.55 & 96.86 / 96.93 \\\\ & 16 & 99.39 / 99.40 & 99.76 / 99.76 & 98.53 / 98.59 & 96.91 / 96.98 \\\\ & 1 & 93.81 / 93.76 & 94.30 / 94.27 & 98.60 / 98.59 & 93.62 / 93.57 \\\\ & 2 & 94.21 / 93.99 & 94.19 / 93.97 & 98.84 / 98.86 & 94.72 / 94.78 \\\\ \text{VisA} & 4 & 94.95 / 94.73 & 94.80 / 94.57 & 98.98 / 99.01 & 95.46 / 95.55 \\\\ & 8 & 95.45 / 95.31 & 95.29 / 95.03 & 99.08 / 99.12 & 95.75 / 95.86 \\\\ & 16 & 95.98 / 95.87 & 95.92 / 95.80 & 99.16 / 99.19 & 95.93 / 96.03 \\\\ \hline \end{array}$$ Adding the residual slightly improves both localization metrics at 2–16 references on both datasets, while lowering image-level performance on VisA. At 1-Ref on VisA, all four metrics decrease slightly. To explain the role of $\beta$, we also measured each term's magnitude at $\beta=0.1$. The table reports the mean corrected NN distance, the mean subspace residual, their ratio, and their mean weighted contributions in Eq. (15). We compute $C_{\mathrm{NN}}$ and $C_{\mathrm{sub}}$ by averaging $0.9\widetilde d_{\mathrm{NN}}/(1+\sigma_p)$ and $0.1d_{\mathrm{sub}}/(1+\sigma_p)$, respectively. The final column gives $C_{\mathrm{sub}}/(C_{\mathrm{NN}}+C_{\mathrm{sub}})$. $$\begin{array}{cccccccc} \hline \text{Dataset} & \text{References} & \widetilde d_{\mathrm{NN}} & d_{\mathrm{sub}} & d_{\mathrm{sub}}/\widetilde d_{\mathrm{NN}} & C_{\mathrm{NN}} & C_{\mathrm{sub}} & \text{Subspace share} \\\\ \hline & 1 & 0.0573 & 0.3060 & 5.34\\,\times & 0.0515 & 0.0306 & 37.25\\% \\\\ & 2 & 0.0514 & 0.2597 & 5.05\\,\times & 0.0385 & 0.0221 & 36.46\\% \\\\ \text{MVTec-AD} & 4 & 0.0470 & 0.2301 & 4.90\\,\times & 0.0338 & 0.0189 & 35.82\\% \\\\ & 8 & 0.0438 & 0.2135 & 4.87\\,\times & 0.0310 & 0.0172 & 35.74\\% \\\\ & 16 & 0.0415 & 0.2056 & 4.95\\,\times & 0.0290 & 0.0164 & 36.13\\% \\\\ & 1 & 0.0456 & 0.2800 & 6.14\\,\times & 0.0410 & 0.0280 & 40.56\\% \\\\ & 2 & 0.0390 & 0.2313 & 5.94\\,\times & 0.0295 & 0.0199 & 40.23\\% \\\\ \text{VisA} & 4 & 0.0341 & 0.1997 & 5.85\\,\times & 0.0249 & 0.0166 & 39.94\\% \\\\ & 8 & 0.0307 & 0.1813 & 5.91\\,\times & 0.0221 & 0.0148 & 40.20\\% \\\\ & 16 & 0.0282 & 0.1721 & 6.11\\,\times & 0.0201 & 0.0140 & 40.99\\% \\\\ \hline \end{array}$$ The coefficient on the subspace residual is exactly 0.1. Its share of the mean fused patch score is larger because its unweighted magnitude is 4.87–5.34 times the corrected NN distance on MVTec-AD and 5.85–6.14 times on VisA. After weighting, the subspace term accounts for 35.74–37.25% and 39.94–40.99% of the respective mean scores. The $\beta=0$ comparison above measures how much that term changes detection performance.

W2. We isolated the dispersion discount by comparing Eq. (15) as written (on) with σp\sigma_p set to zero (off). Each cell reports on / off (%).

\hline \text{Dataset} & \text{References} & \text{I-AUROC (\\%)} & \text{I-AUPR (\\%)} & \text{P-AUROC (\\%)} & \text{PRO (\\%)} \\\\ \hline & 4 & 99.24 / 99.22 & 99.67 / 99.65 & 98.45 / 98.40 & 96.78 / 96.76 \\\\ \text{MVTec-AD} & 8 & 99.33 / 99.36 & 99.71 / 99.71 & 98.55 / 98.49 & 96.93 / 96.92 \\\\ & 16 & 99.40 / 99.41 & 99.76 / 99.74 & 98.59 / 98.54 & 96.98 / 96.97 \\\\ & 4 & 94.73 / 95.12 & 94.55 / 95.09 & 99.01 / 98.99 & 95.55 / 95.49 \\\\ \text{VisA} & 8 & 95.31 / 95.63 & 95.03 / 95.60 & 99.12 / 99.10 & 95.86 / 95.83 \\\\ & 16 & 95.87 / 96.16 & 95.80 / 96.17 & 99.19 / 99.17 & 96.03 / 96.04 \\\\ \hline \end{array}$$ At 4, 8 and 16 references, the discount slightly improves P-AUROC on both datasets. Its effect on MVTec-AD image scores is mixed, while VisA I-AUROC and I-AUPR decrease at all three budgets. For the global correction in Eqs. (8)–(10), the table reports four gate thresholds at 4, 8 and 16 references. Each cell gives **MVTec-AD / VisA** (%). $$\begin{array}{cccccc} \hline \delta & \text{References} & \text{I-AUROC (\\%)} & \text{I-AUPR (\\%)} & \text{P-AUROC (\\%)} & \text{PRO (\\%)} \\\\ \hline & 4 & 99.24 / 94.74 & 99.67 / 94.57 & 98.45 / 99.01 & 96.78 / 95.56 \\\\ 0.01 & 8 & 99.33 / 95.35 & 99.71 / 95.09 & 98.55 / 99.12 & 96.93 / 95.87 \\\\ & 16 & 99.40 / 95.87 & 99.76 / 95.82 & 98.59 / 99.19 & 96.98 / 96.04 \\\\ & 4 & 99.24 / 94.73 & 99.67 / 94.55 & 98.45 / 99.01 & 96.78 / 95.55 \\\\ \mathbf{0.05} & 8 & 99.33 / 95.31 & 99.71 / 95.03 & 98.55 / 99.12 & 96.93 / 95.86 \\\\ & 16 & 99.40 / 95.87 & 99.76 / 95.80 & 98.59 / 99.19 & 96.98 / 96.03 \\\\ & 4 & 99.24 / 94.66 & 99.67 / 94.51 & 98.45 / 99.01 & 96.79 / 95.53 \\\\ 0.10 & 8 & 99.33 / 95.26 & 99.71 / 94.98 & 98.55 / 99.12 & 96.94 / 95.85 \\\\ & 16 & 99.40 / 95.85 & 99.76 / 95.75 & 98.59 / 99.19 & 96.99 / 96.03 \\\\ & 4 & 99.21 / 94.54 & 99.64 / 94.43 & 98.45 / 99.00 & 96.80 / 95.51 \\\\ 0.50 & 8 & 99.33 / 95.21 & 99.71 / 94.92 & 98.55 / 99.12 & 96.95 / 95.84 \\\\ & 16 & 99.40 / 95.76 & 99.77 / 95.66 & 98.59 / 99.19 & 97.00 / 96.02 \\\\ \hline \end{array}$$ The default $\delta=0.05$ lies in a stable range. For example, at 16-Ref on VisA, reducing it to 0.01 leaves I-AUROC at 95.87 and changes PRO from 96.03 to 96.04. Across the three reference budgets, varying $\delta$ from 0.01 to 0.50 changes PRO by at most 0.05 percentage points on either dataset, indicating that localization is insensitive to the precise gate threshold within this range.

Comments on the paper

1 comment
Area_Chair_H3UWOpenReview ↗

A Gentle Reminder: About One Day Left in the Discussion Period

Dear Reviewers,

This is a gentle reminder that approximately one day remains in the discussion period. Please review the authors' responses and other reviewers' comments, and engage in the discussion to clarify which concerns have been addressed and which remain unresolved.

Thank you for your time and effort.

Best,
AC

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.