acceptodds
Under review as a conference paper at ICLR 2027

One Score Term Too Many: The Apparent Cost of Normalizing Frozen ViT Tokens Is Largely an Anomaly-Score Artifact

Abstract

Detectors that reconstruct frozen vision-transformer tokens usually L2-normalize each patch token first, and on periodic manufacturing texture this convention appears to be expensive: in a strictly paired counterfactual (one recipe, one boolean flipped) normalization costs +15.38, +38.64 and +23.04 mean anomaly-detection points (mAD) on wafer, SEM-circuit and PCB benchmarks. We show that this effect is largely a property of the anomaly score, not of the features or the objective. The family's score adds a scale-sensitive L2 residual to a cosine one, so normalizing or rescaling the reconstruction target reshapes the anomaly map. Rescoring the same checkpoints with the cosine residual alone, without retraining, removes the effect on all six datasets: on wafer the normalized arm moves from 49.39 to 66.77 mAD, level with the un-normalized arm (65.87), and a fixed-constant rescale that appeared to cost -12.16 mAD costs -0.04. A squared-error loss term also carries scale, by 2-4 mAD at every weight tried, with or without a cosine term beside it. Two public cosine-scored detectors are immune to the identical rescale; one of them, scored with an L2 residual instead, loses 25 mAD over three seeds, and the published UniAD checkpoint, scored with L2, collapses under a 50x test-time rescale that a cosine score survives. The rule is one line: score, and compare, reconstruction detectors under a scale-invariant residual; a one-run diagnostic exposes the artifact.

Primary area:
applications to computer vision, audio, language, and other modalities
Keywords:
anomaly detection, vision foundation models, feature magnitude, L2 normalization, industrial inspection, wafer defects, unified multi-class anomaly detection, frozen features

Reviews

Among:
Shape:
1234this paper, Bottom 10%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.67 over 3 reviews, above 10% of the others.
Reviewer_vAtSOpenReview ↗
Rating
1
Confidence
3
Informativeness
1
Presentation
1
Soundness
1
Read review
Paper summary

A reconstruction-based anomaly detection method is built on frozen DINOv3-S tokens. The authors vary two factors. They train the detector on raw tokens or on L2-normalized tokens. They then score each trained model with or without the L2 distance. One score sums the L2 distance and the cosine distance between each reconstructed token and its target. The other score only uses cosine distance. Under the first score (sum the L2 distance and the cosine distance), the anomaly detection model trained on normalized tokens has 12 to 39 points lower mAD than the raw-token model on five of six datasets. Under the cosine distance alone, the anomaly detection models trained on raw tokens or normalized tokens perform about the same. The normalized model therefore loses accuracy only when it is scored with the L2 distance. The authors conclude that normalization itself does not hurt the detector. They explain that the L2 distance depends on the scale of the tokens, which normalization changes, while the cosine distance is scale invariant. They also test Dinomaly, INP-Former and a published UniAD checkpoint. They recommend comparing reconstruction detectors under a scale-invariant score.

Critical strengths
  1. The rescoring design is clean. Each trained model is scored with and without the L2 distance, so training randomness does not affect the comparison between the two scores.
  2. The drop in Table 2 is large, is measured with paired seeds, The drop disappears on all six datasets only under the cosine distance.
  3. The paper openly reports that its first explanation was wrong and retracts a result that did not replicate. The proposed reporting rule is easy to adopt.
Critical weaknesses
  1. The contribution is limited. It is widely known that an L2 distance is sensitive to the scale of its target, while a cosine distance is not. The paper does not show that any published method or benchmark is impacted by this finding. The claim that detectors “usually” L2-normalize each token is also not supported by the references.
  2. The statistics and reporting need work. Seed counts also disagree. Section 3 gives two seeds for MVTec-AD and VisA, while Table 2 and Figure 2 give three for every dataset. Appendix B, which should hold the per-seed values behind Table 2, lists only seed 133 for four datasets and two seeds for wafer. Please give all per-seed values. Section 4.5 also mentions "pre-registered" bands without any registration record.
  3. The related work and references contain errors. Section 2 says HVQ-Trans and UniMMAD work "on a frozen DINOv2 backbone and score with cosine residuals". HVQ-Trans uses a frozen EfficientNet-b4 and an ℓ2 residual with an optimal-transport term, and UniMMAD uses a WideResNet50 prior. The medical benchmark is attributed to Huang et al. (2024), but that benchmark has no ultrasound data and no BUSI. Please state where the four sub-datasets come from. Several reference entries have wrong author lists, for example UniMMAD and Dinomaly2. Table 5 dates Dinomaly to CVPR 2024, while the reference list correctly gives CVPR 2025. The ADer benchmark (Zhang et al.) appears in Section 4.5, Table 4 and the Conclusion but is not cited, and the "few-shot work on DINOv3" in Section 2 has no citation.
Questions for authors
  1. Is there a published detector or benchmark comparison whose conclusion changes under your rescoring rule?
  2. How many seeds were run per dataset, and what are the per-seed values for every cell of Table 2?
  3. In each arm, how much of the ℓ2 residual comes from the norm of t̂ and how much from its direction?
Reviewer_FP2GOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper studies a UniAD-style feature-reconstruction anomaly detector [1] on frozen DINOv3 tokens, where per-token ℓ2 normalization appears to cost 12–39 mAD on five of six datasets, and argues that this is neither lost feature information nor a training-objective effect but an artifact of an anomaly score that adds a scale-sensitive ℓ2 residual to a scale-invariant cosine residual. Rescoring the same checkpoints with the cosine residual alone removes the effect (|Δ| < 1.5 mAD), and rescale controls plus probes of Dinomaly [2], INP-Former [3] and the published UniAD checkpoint [1] support the paper's reporting rule: compare reconstruction detectors under a scale-invariant residual.

References

  • [1] Zhiyuan You, Lei Cui, Yujun Shen, Kai Yang, Xin Lu, Yu Zheng, Xinyi Le. "A Unified Model for Multi-class Anomaly Detection." NeurIPS 2022 (incl. Supplementary Material).
  • [2] Jia Guo, Shuai Lu, Weihang Zhang, Fang Chen, Huiqi Li, Hongen Liao. "Dinomaly: The Less Is More Philosophy in Multi-Class Unsupervised Anomaly Detection." CVPR 2025.
  • [3] Wei Luo, Yunkang Cao, Haiming Yao, Xiaotian Zhang, Jianan Lou, Yuqi Cheng, Weiming Shen, Wenyong Yu. "Exploring Intrinsic Normal Prototypes within a Single Image for Universal Anomaly Detection." CVPR 2025.
Critical strengths
  • The core experiment is clearly specified: Fig. 1 and Table 2 state exactly what differs between arms, and paired arms share seeds. Rescoring a checkpoint with its own score reproduces the logged value (checked on one arm), so the headline result is easy to verify.
Critical weaknesses
  • The mechanism and remedy are already known: MKD [4] scores with a Euclidean + λ·cosine sum whose λ is "set to make the scale of both constituent terms the same," UniAD's supplement [1, §D.3, Table S4] shows that a per-token-normalized loss costs nothing (96.4/96.9 vs. 96.5/96.8 det./loc. AUROC) once the score is changed to match it, and Dinomaly2 [5, Table 20 (v3)] finds normalized targets on par with raw ones under a cosine score. Significance is also narrow: none of the published detectors the paper surveys combines token normalization with an ℓ2-bearing score (UniAD [1], Dinomaly [2] and PatchCore [6] use un-normalized features), so the debunked "cost" is the authors' own preliminary finding.
  • With r = ‖t̂‖/‖t‖, ‖t̂ − t‖² = ‖t‖²[(r − 1)² + 2r(1 − cos)], so on unit-norm targets the hybrid score is rank-identical to cosine whenever r is constant across tokens; the collapse therefore requires miscalibrated output norms, which normalization induces by shrinking the 0.1‖t̂ − t‖² loss term by ≈2,500×, making this a loss–score interaction rather than an effect "not of … the objective" (and r is never reported). The claim that magnitude carries no evidence is also contradicted by the paper's own data: dropping the ℓ2 term costs the un-normalized arm 2.46/2.22/1.81 mAD on SEM/VisA-PCB/MVTec (Table 2), and ℓ2 beats cosine on the UniAD checkpoint (96.7/96.8 vs. 95.6/94.7 image/pixel AUROC, §4.5).
  • Outside Table 2, most mechanistic and cross-method results are single-seed, with diverged runs excluded, one run unfinished at submission, seed counts that disagree across §3, Table 2 and App. B, and a single backbone (DINOv3-S/16, 224²) for the training-time counterfactual. Related work also misdescribes HVQ-Trans [7] (EfficientNet-b4; ℓ2-plus-OT score) and UniMMAD [8] (WideResNet-50) as frozen-DINOv2, cosine-scored methods, and cites Texture-AD [9] for DINO-feature results although it evaluates no DINO or ViT method.

References

  • [4] Mohammadreza Salehi, Niousha Sadjadi, Soroosh Baselizadeh, Mohammad Hossein Rohban, Hamid R. Rabiee. "Multiresolution Knowledge Distillation for Anomaly Detection." CVPR 2021, pp. 14902–14912.
  • [5] Jia Guo, Shuai Lu, Lei Fan, Zelin Li, Donglin Di, Yang Song, Weihang Zhang, Wenbing Zhu, Hong Yan, Fang Chen, Huiqi Li, Hongen Liao. "Dinomaly2: A Unified Framework for Unsupervised Image Anomaly Detection" (v1 title: "One Dinomaly2 Detect Them All: A Unified Framework for Full-Spectrum Unsupervised Anomaly Detection"). arXiv:2510.17611, 2025.
  • [6] Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard Schölkopf, Thomas Brox, Peter Gehler. "Towards Total Recall in Industrial Anomaly Detection." CVPR 2022.
  • [7] Ruiying Lu, YuJie Wu, Long Tian, Dongsheng Wang, Bo Chen, Xiyang Liu, Ruimin Hu. "Hierarchical Vector Quantized Transformer for Multi-class Unsupervised Anomaly Detection." NeurIPS 2023.
  • [8] Yuan Zhao, Youwei Pang, Lihe Zhang, Hanqi Liu, Jiaming Zuo, Huchuan Lu, Xiaoqi Zhao. "UniMMAD: Unified Multi-Modal and Multi-Class Anomaly Detection via MoE-Driven Feature Decompression." CVPR 2026 (arXiv:2509.25934).
  • [9] Tianwu Lei, Bohan Wang, Silin Chen, Shurong Cao, Ningmu Zou. "Texture-AD: An Anomaly Detection Dataset and Benchmark for Real Algorithm Development." arXiv:2409.06367, 2024.
Questions for authors
  • Please report the distribution of r = ‖t̂‖/‖t‖ (normal vs. defective tokens) for each arm, and retrain the on and fixed-constant arms with the MSE weight scaled by c⁻² (≈2,485) under the hybrid score. If the hybrid recovers, will you restate the claim as a loss–score interaction?
  • Does a scale-calibrated hybrid (a λ-balanced sum as in MKD [4], or per-term quantile or z-normalization on held-out normal images as in EfficientAD [10] and Uninformed Students [11]) keep the ~2-mAD magnitude gain on SEM/VisA-PCB/MVTec while staying scale-invariant? How would your "compare under a scale-invariant residual" rule avoid penalizing ℓ2-trained detectors such as UniAD [1]?
  • Can you provide at least three paired seeds (counting diverged runs) for Tables 3, 5 and 7 and the loss-side sweep, and repeat the training-time counterfactual on a second backbone and in a public codebase whose score contains an ℓ2 term (e.g., HVQ-Trans [7])? What decision rule makes the "one-run diagnostic" reliable, given that test-time-only rescaling also collapses cosine-scored Dinomaly by 26–42 mAD (§4.5)?

References

  • [10] Kilian Batzner, Lars Heckler, Rebecca König. "EfficientAD: Accurate Visual Anomaly Detection at Millisecond-Level Latencies." WACV 2024, pp. 128–138.
  • [11] Paul Bergmann, Michael Fauser, David Sattlegger, Carsten Steger. "Uninformed Students: Student–Teacher Anomaly Detection with Discriminative Latent Embeddings." CVPR 2020.
Reviewer_YroYOpenReview ↗
Rating
2
Confidence
4
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper examines the apparent cost of L2-normalizing frozen ViT patch tokens in reconstruction-based anomaly detection. In paired experiments on six datasets, much of the loss disappears when the same checkpoints use cosine scoring instead of a hybrid L2-plus-cosine score. Scaling controls and tests with published detectors help separate scoring effects from training effects. The paper proposes scale-invariant scoring as a diagnostic for this confound.

Critical strengths

The strongest part of this paper is the controlled diagnosis of a scoring confound. Table 2 reports normalization penalties of about 12–39 mAD on five datasets under hybrid scoring, then much smaller penalties under cosine scoring. Using the same trained models removes retraining as an explanation for that change.

The additional controls support this diagnosis from different directions. Fixed-constant scaling is invertible, yet produces a large apparent penalty under the hybrid score. Tests with Dinomaly, INP-Former, and UniAD show score sensitivity beyond the authors' decoder. The paper also reports exceptions, including EL and test-time-only scaling failures. The cosine scale-invariance argument is correct, and Figures 1–2 and Tables 2–3 make the central experiment easy to follow.

Critical weaknesses

1. The evaluation protocol and result records need to be reconciled. The AUROC calculation changes the score direction using labels. The supplied utils/eval_helper.py replaces AUROC below 0.5 with 1 − AUROC. This uses ground-truth labels to choose the better direction, but the metric is reported as ordinary AUROC within mAD. I could not determine how often this affects the headline comparisons. The central rescoring result needs to be checked under standard, non-flipped evaluation.

The per-class and aggregate results also disagree. For wafer seed 333, the mean of 14 class values in results/perclass_ext.csv is about 51.48 mAD for the normalized arm, while results/results_ext.csv gives 49.28. The main table matches the aggregate file. This identifies the source of the table but leaves the underlying mismatch unresolved.

2. The conclusions extend beyond the settings that were established. Section 4.5 describes an MSE-loss effect of only 2–4 mAD, nearly independent of its weight. Yet two of three seeds in one tested configuration had training loss blow-ups. Reporting only the stable seed does not establish a generally small training-side effect.

The reported failure of cosine-scored Dinomaly under test-time-only rescaling also matters. A scale-invariant scoring function does not make the full trained detector scale-invariant. Table 4's phrase "immune by construction" needs to state which inputs and operations are fixed. The paper should distinguish these conditions directly instead of mixing them with the history of exploratory tests.

The reach of the finding beyond the hybrid-score setup is also unclear. Published Dinomaly and INP-Former already use cosine scoring. The largest penalties in Table 2 come from the authors' own hybrid-score recipe; some cross-method failures involve changing scoring branches or strong test-time rescaling. These tests are useful, but do not yet show how often the confound changes standard evaluations or earlier scientific conclusions.

Normalized feature discrepancies and cosine scoring also have direct precedents in STFPM and RD4AD, and Schulthess and Konukoglu compare DINO normalization and anomaly metrics. The possible contribution here is the controlled diagnosis of the confound. Its practical and scientific reach needs to be clearer.

Relevant references:

Overall assessment

I lean toward rejection because the AUROC rule, result mismatch, and treatment of failed runs leave the numerical conclusions uncertain. The same-checkpoint experiment could be a useful contribution without a new architecture or more large-scale training. I would consider 3/4 (Weak Accept) if the finding holds under standard evaluation, the records are reconciled, and the conclusions are limited to what the experiments support.

Basis for confidence

I have research experience with reconstruction-based anomaly detection, feature normalization, and anomaly scoring. My concerns refer to specific results and supplied code. I did not rerun every experiment from the checkpoints and predictions, so the effect of the confirmed inconsistencies on the final conclusions is still uncertain.

Questions for authors
  1. How many AUROC values were flipped by the below-0.5 rule? Please give standard AUROC and the resulting mAD differences for all six paired comparisons.

  2. Why do the wafer seed-333 per-class and aggregate files give 51.48 and 49.28? Which records should be used?

  3. How do the failed runs affect the claim of a small MSE-loss effect? Were implementation errors confirmed, or are these failures part of the tested setup? Please separate invariance of fixed score inputs, jointly retrained detectors, and test-time-only scaling. A clear account of the existing runs is enough; I am not requesting more large-scale training.

  4. Which existing detector comparison or scientific conclusion changes because of this confound? Please explain the added insight beyond established normalized-distance and cosine-scoring methods.

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.