betaFeedback

WorksComputer Science

Reproducing INP-Former: Reconstructing Intrinsic Normal Prototypes for Industrial Anomaly Detection

Abstract

We reproduce the central claims of INP-Former, a reconstruction-based method for multi-class industrial anomaly detection. INP-Former extracts Intrinsic Normal Prototypes (INPs) from each test image and uses them to guide a decoder that reconstructs normal features, without a stored memory bank. Using the authors' released code, we reproduce the reported performance on MVTec AD and VisA and extend the evaluation to MVTec AD 2, where image AUROC with the default settings is 63.4, compared with 99.7 on MVTec AD. On MVTec AD, a five-seed ablation shows that most of the performance comes from the INP mechanism, while the two auxiliary losses add small changes whose direction depends on the metric. A paired comparison with both losses disabled confirms the benefit of INP on MVTec AD 2. The default of six prototypes transfers less well: the plateau beyond four prototypes reproduces on MVTec AD and VisA, but on MVTec AD 2 a single prototype outperforms six in AU-PRO on the public split and on both hidden test splits. We also measure practical trade-offs in resolution, backbone size, training length, and LoRA adaptation, and examine performance by defect size, lighting condition, and a stricter AU-PRO limit. Several conclusions from the original benchmarks, including the default prototype count, do not carry over to harder data. Code: https://github.com/garasnote/Repro-INPFormer

Introduction

Industrial anomaly detection (AD) aims to identify defective products in manufacturing using only normal training samples. Recent reconstruction-based approaches learn to encode and reconstruct normal patterns; at test time, anomalies produce high reconstruction error and are thus detected. A key challenge in multi-class settings where a single model handles all product categories is that the model must capture diverse normal appearances without conflating them.

Luo et al. [6] propose INP-Former, which addresses this by extracting Intrinsic Normal Prototypes (INPs) directly from test images via cross-attention aggregation, rather than relying on stored memory banks or class-specific models. The INPs capture the dominant normal patterns present in each test image and guide a prototype-based decoder to reconstruct features. Anomalous regions, which deviate from the extracted normal prototypes, yield high reconstruction error. The method additionally introduces a soft-mining loss Lsm\mathcal{L}_{sm}, which reweights the gradient contribution of hard-to-reconstruct normal patches, and a coherence loss Lc\mathcal{L}_{c}, which keeps the extracted prototypes close to the encoder features they are drawn from.

In this reproducibility study, we:

  1. Verify the main performance claims on MVTec AD ([2]) and VisA ([10]) using the authors’ released code and pretrained DINOv2 backbone ([7]).

  1. Extend the evaluation to MVTec AD 2 ([4]), a newer and more challenging benchmark.

  1. Extend the loss and module ablation of the original paper with additional configurations and multiple random seeds on MVTec AD.

  1. Conduct additional ablations on the number of INP tokens, input resolution, and backbone size, on MVTec AD, VisA, and MVTec AD 2 as indicated per experiment.

  1. Report analyses beyond the original paper: parameter-efficient adaptation with LoRA ([5]), anomaly area versus detection performance, inference speed benchmarks, convergence behaviour, AU-PRO evaluated at a stricter false-positive-rate limit on AD2, and a lighting-condition analysis on AD2.

We organize our experiments around four questions. We first ask whether the original findings reproduce on the benchmarks the authors used (RQ1), and then whether they hold on the harder MVTec AD 2 dataset (RQ2). The remaining analyses ask what it costs to run the model in practice (RQ3) and under what conditions it is fragile (RQ4). So we first reproduce the experiment with the first question, while the other three test how far the conclusions extend.

Scope and Research Questions

We reproduce the original paper’s multi-class benchmark results on MVTec AD and VisA, together with selected module, loss, and prototype-count analyses. We do not reproduce its Real-IAD, single-class, few-shot, or zero-shot experiments. Our MVTec AD 2 experiments extend the original study.

Claims Under Test

We investigate the following claims from Luo et al. [6]:

Claim 1: INP-Former achieves state-of-the-art multi-class anomaly detection performance, reporting 99.7% image-level AUROC on MVTec AD and 98.9% on VisA with a single unified model.

Claim 2: The INP mechanism is essential: removing prototype aggregation from the decoder substantially degrades performance.

Claim 3: Both the soft-mining loss LsmL_{sm} and coherence loss LcL_c contribute to the final performance. We assess the changes associated with each term for both detection and localization.

Claim 4: The number of INP tokens MM affects performance. The original paper reports that performance stabilizes beyond four prototypes and adopts M=6M = 6 as its default on MVTec AD and VisA.

Research Questions

We group the experiments testing the aforementioned claims and other additional analyses under four questions.

RQ1: Which of the original INP-Former findings can be reproduced?

RQ2: Which findings generalize to the more challenging MVTec AD 2 benchmark?

RQ3: What practical trade-offs affect deployment?

RQ4: Under what conditions is INP-Former fragile?

ClaimQuestionEvidence in this study
Claim 1RQ1Main reproduction on MVTec AD and VisA (§ 4.1).
Claim 2RQ1, RQ2Loss and module ablation on MVTec AD (§ 4.1); paired INP-only versus No-INP comparison on the MVTec AD 2 public split (§ 5.3).
Claim 3RQ1Five-configuration loss ablation on MVTec AD (§ 4.1).
Claim 4RQ1, RQ2Prototype-count sweeps on MVTec AD and VisA (§ 4.2) and on MVTec AD 2 (Section 5).

Table 1. A table showing which of the research questions address which claims.

We were able to reproduce Claim 1: our MVTec AD scores match the original within 0.1 points, and on VisA the two AUROCs match while our AU-PRO is 0.87 points higher. Removing the INP mechanism lowers performance on both MVTec AD and MVTec AD 2 (both auxiliary losses disabled), which supports Claim 2. Claim 3 holds only in part: the losses change the scores by small amounts whose direction depends on the metric, and the full model tops neither metric in our ablation. We reproduce Claim 4 on MVTec AD and VisA: performance broadly plateaus beyond four prototypes. This pattern does not extend to MVTec AD 2, where a single prototype achieves the highest image AUROC and AU-PRO in our sweep.

Methodology

Model Description

INP-Former uses a frozen DINOv2 encoder with registers [7, 3] (ViT-Base/14 by default) to extract multi-layer patch features from input images. The MM learnable prototype queries aggregate information from the fused encoder features via cross-attention. The fused features also pass through a bottleneck MLP to form the decoder input. The queries run on each image separately, so every image gets its own MM prototypes. The tokens then guide a prototype-guided decoder of eight transformer blocks, in which decoder states act as queries and the aggregated tokens as keys and values. At inference, anomaly maps are computed as the cosine distance between encoder and decoder features, followed by Gaussian smoothing.

We train the model with a cosine-similarity reconstruction objective, using soft mining to reweight its gradients and a coherence term to encourage representative prototypes. The soft-mining loss LsmL_{sm} reweights the gradient contribution of the reconstruction objective through an exponent yy, so that hard-to-reconstruct normal patches carry more weight. The coherence loss LcL_c is the mean nearest-prototype cosine distance over the fused encoder features, so it encourages each image feature to lie close to at least one prototype.

Our No-INP control bypasses the aggregation step and supplies the full pre-bottleneck encoder-feature sequence as decoder keys and values. Decoder cross-attention is retained. The control is therefore not a self-attention decoder, and we do not claim that it is identical to the ablation reported by Luo et al. [6]. Table 2 records the configurations we vary.

Our reproduction is based on the authors’ released implementation, with the experimental controls and evaluation changes described below.

ConfigurationDescription
INP aggregationMM learned queries cross-attend to the fused encoder features of each image, before the decoder bottleneck.
No-INP controlBypasses aggregation and supplies the full pre-bottleneck encoder-feature sequence as decoder keys/values. Cross-attention remains; this is not vanilla self-attention, and equivalence to the original authors’ control is not established.
Soft miningThe exponent yy controls gradient reweighting of the cosine reconstruction objective. At y=0y = 0, reweighting is disabled; reconstruction remains.
Coherence termMean nearest-prototype cosine distance over fused encoder features. λ=0\lambda= 0 removes its contribution to the training objective.

Table 2. Configurations varied in our experiments.

Datasets

DatasetRole in this study
MVTec AD15 categories of industrial products and textures; 3,629 normal training images and 1,725 test images. Original-benchmark reproduction (Bergmann et al., [2]).
VisA12 categories of complex structures; 8,659 training images and 2,162 test images. Original-benchmark reproduction (Zou et al., [10]).
MVTec AD 28 categories, including Fabric; models trained on the AD2 training split and evaluated on the public test split (Heckler-Kram et al., [4]). The M=1M = 1 and M=6M = 6 submissions also have official private scores. Not evaluated in the original paper.
Real-IADNot included among our reproduced training or evaluation benchmarks (Wang et al., [9]) due to training cost limitations.

Table 3. Datasets and evaluation scope. The prototype-count sweep uses the public MVTec AD 2 test split; official private scores are reported for M=1M = 1 and M=6M = 6.

Experimental Setup and Hyperparameters

We follow the hyperparameters of the released code: images are resized to 448 and center-cropped to 392, with batch size 16 and 200 training epochs. We use StableAdamW (learning rate 10−310^{-3}, β=(0.9,0.999)\beta= (0.9, 0.999), weight decay 10−410^{-4}, AMSGrad, ϵ=10−10\epsilon= 10^{-10}) with a warm cosine schedule decaying to 10−410^{-4} after 100 warmup iterations. We clip gradients to a maximum norm of 0.1 at each optimization step. Unless stated otherwise, M=6M = 6, y=3y = 3, and λ=0.2\lambda= 0.2. The DINOv2 encoder is frozen; the bottleneck, learned INP tokens, INP extractor, and decoder are optimized. On MVTec AD 2, each complete test image is resized to 392 and the anomaly map is restored to native size. Experiments used NVIDIA L4 and A100-SXM4-40GB GPUs. The reported FPS measurements used an L4. The resolution and backbone benchmarks used L4 GPUs, including the reported FPS measurements; the paired AD2 runs used A100 GPUs. Table 4 lists the settings specific to the paired AD2 comparison.

SettingValue
Seed1 for both runs.
Loss controlsy=0y = 0 and λ=0\lambda= 0 in both runs; the reconstruction objective remains active. The two training configurations differ only in whether prototype aggregation is used.
PrototypesM=6M = 6 for INP-only; the No-INP control has no aggregation step.
Training hardwareNVIDIA A100-SXM4-40GB for both runs.

Table 4. Settings specific to the paired INP-only and No-INP comparison on MVTec AD 2 (§ 5.3). Unlisted settings follow Section 3.3.

Evaluation Metrics

We report image-level AUROC (I-AUROC) for detection, pixel-level AUROC (P-AUROC) for segmentation, and per-region overlap AU-PRO for localization quality. Benchmark metrics are computed per category and averaged without weighting. For all locally scored AD2 public-split experiments, the image-level anomaly score is the mean of the highest-scoring 1% of pixels in the Gaussian-smoothed 256×256256 \times256 anomaly map. The pooled anomaly-size statistics and the matched-category lighting comparisons are described separately.

For MVTec AD and VisA, we used the evaluation code released with INP-Former to reproduce the original protocol, which integrates AU-PRO to a false-positive rate of 0.30. Our initial AD2 analyses used that evaluation code together with a separate script for low-FPR AU-PRO, and their results were not directly comparable across tables. We therefore re-evaluated the AD2 public split with the official MVTec AUPRO implementation recommended for AD2’s local evaluation, using the same prediction maps at false-positive-rate limits of 0.05 and 0.30. Public AD2 benchmark scores use the unweighted mean across all eight categories. Official private and private-mixed scores are obtained separately from the benchmark server. Lighting comparisons use condition-matched images and the same categories on both sides of each comparison.

RQ1: Which original INP-Former findings reproduce?

Main MVTec AD and VisA Reproduction

Table 5 compares our reproduced results with those reported in the original paper. Per-category results are provided in Appendix § 11.

Our MVTec AD results match the original to within 0.1 percentage points across all three metrics, and VisA image and pixel AUROCs differ by 0.00 and 0.07 points, respectively; VisA AU-PRO is 0.87 points higher than the published rounded value. This supports reproduction of the reported benchmark performance. MVTec AD 2 was not evaluated in the original paper, so it has no “Original” row; we report it separately in Section 5.

Table 6 compares our loss and module ablations on MVTec AD with those reported in the original publication.

ConfigurationINPLc\mathcal{L}_cLsm\mathcal{L}_{sm}Original I-AUROCOriginal P-AUPROOurs I-AUROCOurs P-AUPRO
No INP×××98.5992.7398.19 ± 0.6591.55 ± 1.19
INP only✓××99.5394.6999.60 ± 0.0395.14 ± 0.05
INP + Lc\mathcal{L}_c✓✓×99.6195.1099.64 ± 0.0295.23 ± 0.10
INP + Lsm\mathcal{L}_{sm}†✓×✓——99.64 ± 0.0494.85 ± 0.08
Full✓✓✓99.6794.8799.62 ± 0.0194.92 ± 0.07

Table 6. Loss and module ablation on MVTec AD in percentage. “Original” values are from Table 5 of Luo et al. [6]; “Ours” are the means and standard deviations over five seeds. No-INP, INP+Lsm\mathcal{L}_{sm}, and Full come from an earlier set of runs than INP-only and INP+Lc\mathcal{L}_c, which use seeds 1, 2, 3, 42, and 123.

When we disable both auxiliary losses, the reported INP-only configuration exceeds the No-INP control by 1.41 points in image AUROC and 3.59 points in AU-PRO. The INP-enabled configurations also show less variation across seeds in the reported results. These observations are consistent with a benefit from prototype aggregation, and they support Claim 2. Because the No-INP row comes from an earlier set of runs than the new configurations, we examine the contribution of aggregation further in the paired AD2 experiment of § 5.3, where the two training configurations differ only in whether the decoder receives the extracted prototypes or the full image-feature sequence.

Our full configuration closely reproduces the original paper’s MVTec AD results. The original ablation evaluated No-INP, INP-only, INP with coherence loss, and the full model. We add a soft-mining-only configuration, which the original ablation did not include.

The additional runs show that INP-only accounts for most of the final performance. The coherence loss raises mean image AUROC by 0.04 points and AU-PRO by 0.09 points. Among our reported configurations, INP with coherence loss has the highest mean AU-PRO, exceeding the full model by 0.31 points. The soft-mining-only configuration also reaches a high image AUROC, but its AU-PRO is lower than that of INP-only.

The two auxiliary losses therefore do not produce consistent improvement across the reported metrics on MVTec AD. The full configuration performs well, but does not obtain the highest mean on either metric in our table. However, we don’t interpret this to mean that detection and localization are fully separate: the original paper’s VisA results show that adding soft mining to the coherence-loss configuration improves both image AUROC and AU-PRO. The usefulness of each loss has to be assessed for the dataset and metric of interest.

Prototype Count on MVTec AD and VisA

The original paper reports that performance stabilizes beyond four prototypes and selects six as its default. Our MVTec AD and VisA sweeps broadly reproduce this pattern (Table 7): most of the improvement occurs between one and four prototypes, with comparatively small changes thereafter. No single prototype count is optimal across both datasets and all metrics, neither does increasing the count lead to a consistent decline. Our findings indicate a general plateau rather than a unique optimum at six. Our experiments with MVTec AD 2 dataset sweep produces a different pattern reported in Section 5.

MMMVTec ADVisA
I-AUROCP-AUROCAU-PROI-AUROCP-AUROCAU-PRO
198.3796.5492.2197.3497.6693.00
299.3698.1294.3998.1598.5393.80
499.5598.3994.7598.8198.8495.04
699.6798.4594.9598.9098.9795.27
899.6098.4294.9098.8498.9895.23
1299.6798.5195.1298.6798.9495.07
1699.6398.5395.0898.7298.8894.85

Table 7. Prototype-count sweep on MVTec AD and VisA (percent). Results are from one seed. AU-PRO is integrated up to a false-positive rate of 0.30.

RQ2: Which findings generalize to MVTec AD 2?

Motivation and Corrected Public Evaluation

We additionally report results on MVTec AD 2, which was created in response to the saturation of established benchmarks such as MVTec AD and VisA. The dataset includes industrial conditions that were underrepresented in earlier benchmarks, including lighting-induced distribution shifts and defects at image borders, with each of its eight categories captured under at least four lighting conditions. We include MVTec AD 2 to test whether our findings persist after retraining INP-Former under these more challenging conditions. Our corrected evaluation covers all eight categories of the public test split and therefore represents neither zero-shot transfer nor evaluation on the hidden-split private benchmark. Table 8 also reports the official hidden-split scores.

MMI-AUROCP-AUROC[email protected] Public[email protected] Private[email protected] Priv.-mixed[email protected]
165.7587.6832.1237.1433.9857.39
264.6887.4527.68——55.09
463.9687.5825.06——53.75
663.3987.9826.6734.5128.4654.86
862.4887.2122.94——52.47
1263.7186.9922.56——52.01
1662.5686.9522.87——52.58

Table 8. Prototype-count sweep on MVTec AD 2 (percent), full model, seed 1. Public-split scores are computed locally. Private and private-mixed scores come from the official benchmark server, to which we submitted M=1M = 1 and M=6M = 6 only due to submission limits.

On MVTec AD 2, image AUROC ranges from 62.48 to 65.75 across the sweep, compared with 99.67 on MVTec AD (Table 5).

DatasetSourceI-AUROCP-AUROCP-AUPRO
MVTec ADOriginal99.798.594.9
MVTec ADOurs99.6798.4594.95
VisAOriginal98.998.994.4
VisAOurs98.9098.9795.27

Table 5. Multi-class anomaly detection on MVTec AD and VisA. “Original” indicates the results reported by Luo et al. [6]; “Ours” gives the reproduced results from our retraining of their models. This run is separate from the five-seed ablation in Table 6. All entries are percentages.

The official private evaluations also favor M=1M = 1 over M=6M = 6 in [email protected] in the hidden splits separate from the public dataset. Appendix § 13 reports the full-model public category scores. The M=1M = 1 model has higher [email protected] in seven of eight categories, whereas image AUROC favors each model in four categories.

Table 18 places our hidden-split results alongside published MVTec AD 2 evaluations of EfficientAD-S [1] and PatchCore [8]. The baseline scores come from Heckler-Kram et al. [4] at 256×256256 \times256 and 512×512512 \times512; our test images are resized to 392×392392 \times392. Differences in training settings and input size limit direct comparisons between methods.

MethodInput sizePrivatePrivate-mixed
EfficientAD-S256×256256 \times25630.819.2
PatchCore256×256256 \times25628.826.0
EfficientAD-S512×512512 \times51240.025.3
PatchCore512×512512 \times51241.935.8
INP-Former, M=1M = 1392×392392 \times39237.1433.98
INP-Former, M=6M = 6392×392392 \times39234.5128.46

Table 18. Hidden-split [email protected] (percent).

Prototype-Count Behavior Across Datasets

On MVTec AD and VisA, performance improves until four to six prototypes and then remains relatively stable, consistent with the plateau reported in the original paper. In contrast, the MVTec AD 2 public sweep achieves its highest I-AUROC and localization scores with a single prototype, while P-AUROC varies within a narrower range and is highest at M=6M = 6. The M value is allocated to each image and is category independent, so the number of categories in each of the datasets does not explain this difference. Although the mechanism behind this difference remains unsolved right now, the practical implication is clear: the prototype count should be validated on the target benchmark rather than treated as a universal default.

Architecture Comparison with Both Auxiliary Losses Disabled

Table 9 compares two runs that differ only in whether the decoder receives aggregated prototypes or the full encoder-feature sequence. We disabled the auxiliary losses in both runs to compare the impact of the INP mechanism directly without the loss terms. Per-category differences are given in Appendix § 12.

ConfigurationI-AUROCP-AUROC[email protected][email protected]
No-INP control59.9086.0818.9848.20
INP-only64.7988.0430.0356.48
Δ\Delta (INP minus control)+4.89+1.96+11.05+8.29

Table 9. Paired INP-only and No-INP results on the eight-category MVTec AD 2 public test split (percent), seed 1. Both runs use 200 training epochs with the auxiliary losses disabled; reconstruction remains active. Training uses 448/392 resize/crop. Whole test images are resized to 392, with prediction maps restored to native size. INP-only uses M=6M = 6; No-INP feeds the full feature sequence to the decoder. The control retains decoder cross-attention, and its equivalence to the original authors’ control is not established. Deltas are calculated before rounding.

When we disable both auxiliary losses, the INP-only model exceeds the No-INP control by 4.89 points in image AUROC and 11.05 points in [email protected] on the AD2 public split. The control allows the decoder to process the full feature sequence, compared to the INP-only model, which aggregates that information into image-specific prototypes. Our comparison supports the usefulness of prototype aggregation under the tested configuration. Exceptions do exist, however. The [email protected] of the INP model drops by 6.02 points for can, and image AUROC falls by 7.83 points for fruit jelly.

RQ3: What practical trade-offs affect deployment?

Resolution and Backbone Ablation

Table 10 shows the effect of input resolution and backbone size on MVTec AD. Higher resolution provides consistent improvements, with P-AUPRO benefiting most (+2.9 points from 224 to 448). ViT-Small/14 loses 0.47 I-AUROC and 0.56 P-AUPRO relative to ViT-Base/14 at the same resolution. The corresponding throughput figures are given in § 6.2.

BackboneInput/CropI-AUROCP-AUROCP-AUPRO
ViT-Base/14224/19699.2197.9792.07
ViT-Base/14336/29499.6398.2894.04
ViT-Base/14448/39299.6798.4594.95
ViT-Small/14448/39299.2098.1894.39
ViT-Base/14448/39299.6798.4594.95

Table 10. Resolution and backbone ablation on MVTec AD (percent). The ViT-Base/14 448/392 row is shown in both comparisons; it is the same run.

On MVTec AD, these results favor a smaller backbone over a lower input resolution when faster inference is needed. ViT-Small at 448/392 runs at 72.6 FPS and loses 0.56 AU-PRO points; ViT-Base at 224/196 runs at 85.3 FPS and loses 2.88.

Inference Speed

We measure inference speed on a single NVIDIA L4 GPU (Table 11). Resolution matters most: going from 224 to 448 makes the model 3.4 times slower. ViT-Small is 2.9 times faster than ViT-Base at the same resolution. The number of prototypes has almost no effect, with speed staying between 25.0 and 25.2 FPS for every MM from 2 to 16.

ConfigSettingFPSLatency (ms)
Resolution (ViT-B, M=6M=6)224/19685.311.7
336/29450.120.0
448/39225.040.0
Backbone (448/392, M=6M=6)ViT-Small/1472.613.8
ViT-Base/1425.040.0
INP count (ViT-B, 448/392)M=2M=2–1625.0–25.239.7–40.0

Table 11. Model-forward inference speed on an NVIDIA L4 GPU at batch size 1 (50 warmup and 200 timed iterations). Timing excludes image preprocessing and output-map postprocessing.

Parameter-Efficient Adaptation

We test whether INP-Former can be adapted to a new dataset by training only a small part of the model. We use LoRA ([5]), which attaches small trainable matrices to existing layers so that the original weights stay fixed. Starting from an INP-Former checkpoint trained on Real-IAD ([9]) released by the authors, we add adapters of rank r∈{2,4,8}r \in\{2, 4, 8\} to the linear layers of the bottleneck and decoder (42 adapters in total). We train these adapters together with the prototype tokens and aggregation module for 50 epochs on MVTec AD and on VisA, and keep all other parameters frozen. Table 12 lists the trainable share of the model for each rank. Most of it is the prototype tokens and aggregation module; the adapters alone account for 0.14% to 0.58%.

Table 12: Parameter-efficient adaptation on MVTec AD and VisA (percent). “Zero-shot” is the Real-IAD checkpoint evaluated on the target dataset without adaptation; “Full train” is the 200-epoch model from Table 5. “Total” counts the adapters, prototype tokens, and aggregation module. The encoder is frozen in all rows.

MethodTotalAdaptersI-AUROCP-AUROCP-AUPROI-AUROCP-AUROCP-AUPRO
Zero-shot——69.1579.9257.1751.4772.6031.60
LoRA r=2r = 24.710.1497.2296.2191.3091.7996.2985.11
LoRA r=4r = 44.850.2997.8196.6291.8793.1796.7987.55
LoRA r=8r = 85.120.5898.1696.9692.4794.4497.2589.91
Full train——99.6798.4594.9598.9098.9795.27

Table 12. Parameter-efficient adaptation on MVTec AD and VisA (percent).

Adaptation recovers most of the full-training performance on both datasets. At rank 8, with 5.12% of the parameters trainable and a quarter of the training epochs, image AUROC is 1.51 points below full training on MVTec AD and 4.46 points below on VisA. Each increase in rank monotonically improves every metric in the table.

Convergence Behavior

We evaluate how quickly INP-Former converges by training the full configuration (y=3y = 3, λ=0.2\lambda= 0.2) on MVTec AD and evaluating at intermediate checkpoints of a single run (Table 13).

Table 13: Training convergence on MVTec AD. All metrics are means across 15 categories. Δ\Delta shows the difference in percentage points from epoch 200 (final), separate from the results in Table 5.

EpochLossI-AUROCP-AUROCP-AUPROΔ\DeltaP-AUPRO
250.16399.2998.0794.57−0.39
500.14599.5098.2694.76−0.20
1000.13399.5598.4094.90−0.06
1500.12899.5998.4594.95−0.01
2000.12699.6198.4894.96—

Table 13. Training convergence on MVTec AD.

Most of the improvement happens early: at epoch 25, all three metrics are already within half a point of their final values. After epoch 100, no metric changes by more than 0.1 points, even though the training loss keeps falling. These scores come from the test set of a single run to illustrate the trend that most of the learning may happen in the earlier epochs.

RQ4: Under what conditions is INP-Former fragile?

Anomaly Size on MVTec AD and VisA

INP-Former assumes that most of a defective image is still normal, so the prototypes extracted from it mostly describe normal content. We therefore expected large anomalies to be harder to detect, since they leave fewer normal patches for the prototypes to draw on. To test this, we compare each anomalous image’s score with the area of its ground-truth defect, pooling all categories within each dataset. Area is measured on the ground-truth mask after resizing to 256×256256 \times256.

Anomaly scores increase with defect area: Spearman ρ≈+0.53\rho\approx+0.53 on MVTec AD (1,258 anomalous images) and ρ≈+0.79\rho\approx+0.79 on VisA (1,200 anomalous images). For MVTec AD, we also count how many anomalous images score above a threshold set at the mean plus two standard deviations of the normal test images’ scores. Among the 250 images with the smallest defects, 63.6% do.

These results do not support our original hypothesis. Since scores rise with area, small defects are the ones most likely to be missed; about a third of the smallest MVTec AD defects fall below the threshold. The correlations pool all categories, however, and categories differ in both typical defect size and difficulty, so part of the trend may reflect category rather than size.

Lighting Conditions on MVTec AD 2

MVTec AD 2 photographs each object under several lighting conditions, and the overall scores mix them together. To see how each condition affects the model, we split the existing public-split predictions of the M=1M = 1 and M=6M = 6 full models by condition and compare each condition with regular lighting. Each comparison uses the same categories on both sides, with normal and anomalous images drawn from the same condition. Fruit jelly has no shift_2 or shift_3 images, and only vial has shift_4.

Each category contributes 15 anomalous and 4 to 12 normal images per condition. The same scenes recur across conditions, and the same condition name can mean a different lighting change in different categories. Appendix § 14 gives the full per-category results.

Splitting by condition shows that the two models respond differently. M=6M = 6 holds image AUROC better than M=1M = 1 under most conditions, while M=1M = 1 holds [email protected] better: under shift_1, for example, M=6M = 6 loses 1.72 points of image AUROC against 5.07 for M=1M = 1, but 9.26 points of [email protected] against 4.28. Underexposure lowers both metrics for both models, while overexposure changes little. With one seed and 4 to 12 normal images per cell, individual differences are noisy but patterns across conditions are more reliable.

Localization Under Strict Low-FPR Evaluation

The standard AU-PRO integrates the per-region overlap curve up to a pixel false-positive rate of 0.30. Heckler-Kram et al. [4] argue that this limit tolerates too many false positives for industrial inspection and use 0.05 instead. We report both limits on the MVTec AD 2 public split, computed from the same prediction maps with the official implementation (Table 8 and Table 9).

The stricter limit makes the differences between configurations larger without changing which one is better. Across the prototype sweep, the gap between the best and worst setting grows from 5.38 points at 0.30 to 9.56 points at 0.05, and the ranking stays the same except that M=8M = 8 and M=16M = 16 swap places. The gap between INP-only and the No-INP control grows in the same way, from 8.29 to 11.05 points. Both limits count false-positive pixels, so they measure how precisely the model localizes defects.

Discussion

Our results reproduce INP-Former’s reported performance on MVTec AD and VisA and show that the INP mechanism does most of the work. On MVTec AD, INP-only performs about as well as the full model, and on MVTec AD 2 the paired comparison favors INP by 11.05 points of [email protected]. The two auxiliary losses add small gains whose direction depends on the metric. The prototype count transfers less well: the plateau beyond four prototypes holds on MVTec AD and VisA, but on MVTec AD 2 one prototype beats six in [email protected] on the public split and on both hidden splits. Averages also hide differences in stability: M=1M = 1 scores higher overall, while M=6M = 6 holds image AUROC better under most lighting changes.

The practical analyses point to cheaper settings on MVTec AD. At similar speed, a smaller backbone at full resolution localizes defects better than a larger backbone at low resolution. Training gains mostly settle by epoch 100, and LoRA adaptation recovers most of the full-training performance with about 5% of the model trainable. Small defects remain the hardest case.

Our study has several caveats. The MVTec AD 2 experiments use a single seed, and The MVTec AD loss-ablation rows come from separate batches of runs, so we place more weight on the controlled, paired AD2 comparison when assessing the contribution of INPs. Per-run code snapshots are unavailable for these rows. The loss ablation, resolution and backbone study, and convergence analysis cover MVTec AD only. Our comparison with other methods uses published AD2 results; a comparison under matched training and preprocessing settings remains outside the scope of this study.

Conclusion

We reproduce INP-Former’s benchmark performance on MVTec AD and VisA, and find that prototype aggregation accounts for most of it while the auxiliary losses add little on MVTec AD. Performance drops sharply on MVTec AD 2, where image AUROC with the default settings is 63.4 compared with 99.7 on MVTec AD. There, aggregation still helps, but the default of six prototypes does not carry over: one prototype outperforms six in [email protected] on the public split and on both hidden splits. On MVTec AD, a smaller backbone and LoRA adaptation each lower cost at a small loss of accuracy. The model’s weak points are small defects and some lighting changes, where the better prototype setting depends on the metric, so findings from the original benchmarks need rechecking on harder data before they guide deployment.

Author Contributions

Both authors contributed roughly equally in both writing and coding.

Per-Category Results

CategoryI-AUROCP-AUROCP-AUPRO
carpet99.8899.3597.89
grid99.9299.4297.75
leather100.099.4298.13
tile100.097.6888.36
wood99.9197.5493.84
bottle100.099.0696.90
cable100.098.8094.78
capsule99.0098.7497.02
hazelnut100.099.4196.69
metal_nut100.097.3595.24
pill99.1097.7397.37
screw97.4699.5898.00
toothbrush100.098.9895.75
transistor99.7194.7379.65
zipper100.098.9896.86
Mean99.6798.4594.95

Table 15. Per-category results on MVTec AD (ViT-Base/14, 448/392, M=6M=6).

Paired Public AD2 Category Differences

CategoryI-AUROCP-AUROC[email protected][email protected]
can+2.35+1.32-6.02-0.22
fabric+9.60-2.85+10.83+17.92
fruit_jelly-7.83+4.09+13.54+11.29
rice+3.62-0.56+13.92-1.77
sheet_metal+16.34+3.90+6.23+6.56
vial+3.37-0.11+27.42+14.48
wallplugs+11.04+8.56+6.73+12.77
walnuts+0.67+1.31+15.74+5.26

Table 16. Per-category difference (INP-only minus No-INP) on the MVTec AD 2 public split, in percentage points. Both runs are shown in Table 9; negative values favor No-INP.

Full-Model AD2 Public Category Results

Table 17: Full-model AD2 public scores (percent), seed 1, with both auxiliary losses enabled. Each cell is M=1M = 1 / M=6M = 6. These category scores underlie Table 8; they are distinct from the loss-disabled architecture comparison.

CategoryI-AUROCP-AUROC[email protected][email protected]
can50.65 / 52.4764.97 / 69.362.33 / 1.1722.14 / 24.82
fabric56.65 / 69.1683.47 / 90.7421.91 / 22.8743.88 / 51.98
fruit_jelly74.58 / 61.0094.87 / 95.5739.40 / 30.4475.45 / 74.84
rice70.42 / 68.7693.93 / 93.5145.85 / 37.1167.05 / 60.25
sheet_metal62.50 / 54.7789.04 / 89.1113.25 / 7.7430.98 / 22.82
vial91.65 / 77.3990.14 / 85.7665.40 / 54.7289.39 / 83.30
wallplugs44.07 / 46.0688.34 / 83.8419.54 / 14.7648.74 / 40.48
walnuts75.50 / 77.5296.70 / 95.9549.27 / 44.5881.52 / 80.37
Mean65.75 / 63.3987.68 / 87.9832.12 / 26.6757.39 / 54.86

Table 17. Full-model AD2 public scores (percent), seed 1, with both auxiliary losses enabled.

Published AD2 Baseline Context

Table 18: Hidden-split [email protected] (percent). Baseline scores are reported by Heckler-Kram et al. [4] for EfficientAD-S (Batzner et al. [1]) and PatchCore (Roth et al. [8]). INP-Former scores are our official server results. Methods use different training settings and input sizes.

Condition-Level AD2 Lighting Results

Table 19: Matched regular / changed-lighting means (percent), with M=1M = 1 and M=6M = 6 adjacent. Each metric cell is regular / changed. Conditions use the same matched categories as Table 14; its deltas were computed before rounding.

ConditionCategories evaluatedI-AUROC change M=1M = 1I-AUROC change M=6M = 6[email protected] change M=1M = 1[email protected] change M=6M = 6
overexposed8+0.73+1.11-0.28+0.49
underexposed8-2.61-4.04-3.05-4.70
shift_18-5.07-1.72-4.28-9.26
shift_27-0.24-0.15+0.46-3.40
shift_37-6.72-2.53-1.43-5.90
shift_41+6.67+12.00-8.88-13.15

Table 14. Change from regular lighting on the AD2 public split (percentage points), full models, seed 1. Negative values mean lower scores under the listed condition. Scores are computed within each condition.

ConditionMMI-AUROCP-AUROC[email protected][email protected]
overexposed169.66 / 70.3988.39 / 88.0834.43 / 34.1558.24 / 58.21
668.21 / 69.3389.98 / 89.6032.75 / 33.2558.16 / 58.01
underexposed169.66 / 67.0588.39 / 87.1434.43 / 31.3858.24 / 56.40
668.21 / 64.1889.98 / 87.4232.75 / 28.0658.16 / 54.46
shift_1169.66 / 64.5988.39 / 88.1934.43 / 30.1558.24 / 57.38
668.21 / 66.4989.98 / 89.0732.75 / 23.5058.16 / 55.89
shift_2167.23 / 66.9987.38 / 85.9333.16 / 33.6255.52 / 56.16
666.15 / 66.0089.09 / 86.5732.32 / 28.9255.40 / 53.18
shift_3167.23 / 60.5287.38 / 87.2633.16 / 31.7355.52 / 57.52
666.15 / 63.6289.09 / 88.3132.32 / 26.4255.40 / 55.36
shift_4188.00 / 94.6790.25 / 92.8770.77 / 61.8990.80 / 89.40
682.67 / 94.6788.27 / 90.8465.95 / 52.8089.35 / 85.49

Table 19. Matched regular / changed-lighting means (percent), with M=1M = 1 and M=6M = 6 adjacent.

CategoryConditionnnI-AUROCP-AUROC[email protected][email protected]
canregular12+1551.11 / 56.1165.52 / 72.000.80 / 1.4520.68 / 28.21
overexposed12+1547.22 / 54.4466.34 / 71.651.54 / 1.6921.98 / 28.48
shift_112+1556.67 / 69.4466.90 / 70.675.60 / 2.1127.29 / 28.54
shift_212+1551.11 / 45.5662.56 / 66.650.80 / 0.3118.41 / 18.57
shift_312+1555.56 / 53.8966.48 / 69.364.33 / 0.7726.54 / 23.90
underexposed12+1542.22 / 66.1162.32 / 68.780.13 / 0.8617.76 / 22.79
fabricregular11+1553.33 / 73.9485.30 / 91.4017.64 / 21.7339.40 / 49.68
overexposed11+1553.33 / 71.5284.89 / 91.2417.35 / 21.8139.94 / 50.00
shift_111+1555.15 / 74.5582.97 / 90.0518.07 / 23.0740.11 / 51.84
shift_211+1566.67 / 69.7081.17 / 91.6830.51 / 27.4352.79 / 58.26
shift_311+1561.21 / 73.9481.55 / 91.9028.02 / 23.1851.11 / 59.35
underexposed11+1554.55 / 74.5585.37 / 91.2317.98 / 21.4740.29 / 50.15
fruit_jellyregular5+1586.67 / 82.6795.45 / 96.2243.28 / 35.7777.33 / 77.45
overexposed5+1590.67 / 96.0095.52 / 96.7347.01 / 46.2277.85 / 80.26
shift_15+1577.33 / 57.3394.32 / 94.8437.70 / 23.9074.24 / 71.43
underexposed5+1568.00 / 65.3394.19 / 94.5131.10 / 19.3872.50 / 70.28
riceregular7+1576.19 / 73.3393.81 / 94.4246.55 / 39.8766.60 / 60.93
overexposed7+1575.24 / 66.6793.72 / 94.3444.70 / 38.0066.32 / 59.89
shift_17+1568.57 / 67.6293.41 / 93.4245.98 / 35.4164.80 / 64.48
shift_27+1570.48 / 79.0595.12 / 93.5144.65 / 34.9071.03 / 64.05
shift_37+1569.52 / 82.8694.97 / 93.9248.34 / 42.2771.22 / 68.28
underexposed7+1573.33 / 71.4393.53 / 94.1646.80 / 40.5666.33 / 60.33
sheet_metalregular4+1573.33 / 41.6789.83 / 89.7616.11 / 9.8132.05 / 22.66
overexposed4+1573.33 / 43.3389.69 / 89.4215.95 / 9.7231.56 / 22.04
shift_14+1558.33 / 58.3388.62 / 89.2112.22 / 6.5729.50 / 22.68
shift_24+1560.00 / 65.0088.38 / 89.0611.69 / 6.2129.52 / 22.42
shift_34+1553.33 / 56.6788.79 / 89.4012.30 / 6.9029.75 / 22.93
underexposed4+1575.00 / 46.6789.89 / 89.9116.20 / 9.3132.54 / 22.88
vialregular5+1588.00 / 82.6790.25 / 88.2770.77 / 65.9590.80 / 89.35
overexposed5+1596.00 / 86.6787.64 / 85.7666.53 / 60.5689.38 / 86.75
shift_15+1594.67 / 94.6792.24 / 89.8865.01 / 54.6590.40 / 85.84
shift_25+1593.33 / 81.3390.33 / 87.8170.29 / 60.1991.11 / 87.25
shift_35+1590.67 / 78.6791.89 / 90.1167.23 / 60.2790.64 / 88.20
shift_45+1594.67 / 94.6792.87 / 90.8461.89 / 52.8089.40 / 85.49
underexposed5+1594.67 / 52.0084.86 / 72.8959.64 / 46.4784.02 / 71.95
wallplugsregular10+1536.00 / 40.6789.47 / 90.5320.24 / 23.4853.22 / 50.59
overexposed10+1534.67 / 41.3389.41 / 90.4719.76 / 23.2852.90 / 50.36
shift_110+1550.67 / 53.3392.06 / 91.2623.46 / 19.9960.23 / 54.21
shift_210+1537.33 / 27.3386.57 / 80.2917.70 / 11.4645.04 / 36.33
shift_310+1534.00 / 28.6791.56 / 89.3824.10 / 22.8857.90 / 52.91
underexposed10+1537.33 / 42.6789.51 / 90.6120.15 / 23.3351.94 / 50.69
walnutsregular10+1592.67 / 94.6797.45 / 97.2660.05 / 63.9985.85 / 86.39
overexposed10+1592.67 / 94.6797.43 / 97.1760.34 / 64.6985.75 / 86.33
shift_110+1555.33 / 56.6794.98 / 93.2133.17 / 22.2972.44 / 68.14
shift_210+1590.00 / 94.0097.36 / 96.9859.72 / 61.9485.21 / 85.42
shift_310+1559.33 / 70.6795.56 / 94.0937.83 / 28.6775.46 / 71.95
underexposed10+1591.33 / 94.6797.46 / 97.2859.04 / 63.0885.78 / 86.57

Table 20. Condition-level AD2 public scores (percent). Each metric cell is M=1M = 1 / M=6M = 6; nn is the normal + anomalous image count shared by both models. Normal images are condition-matched. Conditions absent from a category are unavailable, not zero.

References

  1. [1]Kilian Batzner, Lars Heckler, and Rebecca König. Efficientad: Accurate visual anomaly detection at millisecond-level latencies. In 2024 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pp. 127–137. IEEE, 2024.arxiv.org/abs/2303.14535
  2. [2]Paul Bergmann, Michael Fauser, David Sattlegger, and Carsten Steger. MVTec AD – A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019.DOI
  3. [3]Timothée Darcet, Maxime Oquab, Julien Mairal, and Piotr Bojanowski. Vision Transformers Need Registers. International Conference on Learning Representations (ICLR), 2024.arxiv.org/abs/2309.16588
  4. [4]Lars Heckler-Kram, Jan-Hendrik Neudeck, Ulla Scheler, Rebecca König, and Carsten Steger. The MVTec AD 2 dataset: Advanced scenarios for unsupervised anomaly detection. International Journal of Computer Vision, 134:175, 2026. doi: 10.1007/s11263-026-02743-0. URL https://doi.org/10.1007/s11263-026-02743-0.
  5. [5]Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shanen Wang, Lu Wang, and Weizhu Chen. LoRA: Low-Rank Adaptation of Large Language Models. International Conference on Learning Representations (ICLR), 2022.arxiv.org/abs/2106.09685
  6. [6]Wei Luo, Yunkang Cao, Haiming Yao, Xiaotian Zhang, Jianan Lou, Yuqi Cheng, Weiming Shen, and Weny-ong Yu. Exploring Intrinsic Normal Prototypes within a single image for Universal Anomaly Detection. In 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 9974–9983, 2025. doi: 10.1109/CVPR52734.2025.00932.DOI
  7. [7]Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy V. Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel HazIZA, Francisco Massa, Ala aeldin El-Nouby, Mido Assran, Nicolas Ballas, Wojciech Galuba, Russell Howes, Po-Yao Huang, Shang-Wen Li, Ishan Misra, Michael Rabbat, Vasu Sharma, Gabriel Synnaeve, Hu Xu, Herve Jegou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr Bojanowski. DINOv2: Learning Robust Visual Features without supervision. Transactions on Machine Learning Research, 2024. ISSN 2835-8856. Featured Certification.arxiv.org/abs/2304.07193
  8. [8]Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard Schölkopf, Thomas Brox, and Peter Gehler. Towards total recall in industrial anomaly detection. In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 14298–14308. IEEE, 2022.arxiv.org/abs/2106.08265
  9. [9]Chengjie Wang, Wenbing Zhu, Bin-Bin Gao, Zhenye Gan, Jiangning Zhang, Zhihao Gu, Shuguang Qian, Mingang Chen, and Lizhuang Ma. Real-IAD: A Real-World Multi-View Dataset for Benchmarking Versatile Industrial Anomaly Detection. pp. 22883–22892, 06 2024. doi: 10.1109/CVPR52733.2024.02159.DOI
  10. [10]Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang, and Onkar Dabeer. SPot-the-Difference Self-supervised Pre-training for Anomaly Detection and Segmentation, pp. 392–408. 11 2022. ISBN 978-3-031-20055-7. doi: 10.1007/978-3-031-20056-4_23.DOI

Paper details

vlnc:W_u594wu3b
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents