TL;DR
This study successfully reproduces the high-performance claims of INP-Former on standard industrial anomaly detection benchmarks but reveals significant performance degradation on the more challenging MVTec AD 2 dataset. The authors find that while the core "Intrinsic Normal Prototype" mechanism is highly effective, the original paper's recommended settings—specifically the number of prototypes—do not generalize well to harder, real-world industrial scenarios.
What Problem Does This Paper Address?
Industrial Anomaly Detection (AD) typically involves training models on "normal" samples to identify defects during production. A major hurdle in this field is the multi-class setting, where a single model must learn to detect anomalies across diverse product categories (e.g., leather, screws, and fabric) without confusing their distinct normal patterns.
Traditional reconstruction-based methods often struggle with this "conflation" problem. INP-Former, proposed by Luo et al. (2025), attempts to solve this by extracting Intrinsic Normal Prototypes (INPs) directly from each test image. Instead of relying on a static, pre-stored memory bank of normal features, it dynamically identifies the dominant normal patterns in an image to guide the reconstruction process. If a region cannot be reconstructed using these prototypes, it is flagged as an anomaly.
Methods
The INP-Former architecture consists of three main components:
- Frozen Encoder: A DINOv2 backbone (ViT-Base/14) extracts multi-layer patch features from the input.
- INP Aggregator: A set of $M$ learnable prototype queries uses cross-attention to aggregate information from the encoder features, creating image-specific prototypes.
- Prototype-Guided Decoder: A transformer-based decoder uses these prototypes as keys and values to reconstruct "normal" versions of the input features.
The model is trained using a cosine-similarity objective supplemented by two auxiliary losses:
- Soft-mining loss ($L_{sm}$): Reweights gradients to focus on "hard-to-reconstruct" normal patches.
- Coherence loss ($L_c$): Ensures extracted prototypes remain close to the actual encoder features they represent.
The configurations varied in this reproduction study are summarized in Table 2: Table 2: Configurations varied in our experiments.
Datasets
The study evaluates the model across three major benchmarks:
- MVTec AD: The industry standard, featuring 15 categories of products and textures.
- VisA: A dataset with 12 categories of complex structures.
- MVTec AD 2: A newer, significantly more difficult benchmark that introduces lighting-induced distribution shifts and defects located at image borders.
The scope of these datasets is detailed in Table 3: Table 3: Datasets and evaluation scope.
Key Insights and Ideas
- The INP Mechanism is the Heavy Lifter: Ablation studies show that the dynamic prototype aggregation accounts for the vast majority of the model's performance. The auxiliary losses ($L_{sm}$ and $L_c$) provide only marginal, inconsistent improvements depending on the metric used.
- The "Six Prototype" Default is Fragile: The original paper suggests that performance plateaus after four prototypes and recommends $M=6$. While this holds for MVTec AD and VisA, the harder MVTec AD 2 dataset actually performs better with a single prototype ($M=1$). This suggests that on complex data, over-parameterizing the prototype space might lead to the model "explaining away" anomalies as normal variations.
- Lighting Sensitivity: The model's performance fluctuates significantly under different lighting conditions (overexposed vs. underexposed). Interestingly, the $M=6$ configuration is more stable for image-level detection under lighting shifts, even if $M=1$ is better for precise localization.
- Efficiency vs. Accuracy: The study finds that using a smaller backbone (ViT-Small) at full resolution is often a better practical trade-off than using a larger backbone at a lower resolution, as the latter severely hurts localization accuracy.
Key Results
The authors successfully reproduced the state-of-the-art results on the original benchmarks, matching the reported 99.7% AUROC on MVTec AD and 98.9% on VisA (see Table 5).
However, the "stress test" on MVTec AD 2 revealed a stark reality: image-level AUROC plummeted from 99.7% to 63.4% with default settings. The ablation study in Table 6 further confirms that while the INP mechanism is essential (outperforming the "No INP" control by a wide margin), the auxiliary losses are not strictly necessary for achieving high performance on standard benchmarks.
Limitations and Future Work
The reproduction study notes several caveats:
- Single Seed for AD2: Due to computational constraints, MVTec AD 2 experiments were conducted with a single random seed, which may hide variance in results.
- Dataset Omissions: The Real-IAD dataset was not included in the reproduction due to high training costs.
- Small Defect Challenge: The model still struggles with very small anomalies; about a third of the smallest defects in MVTec AD fall below the detection threshold.
Future work should investigate why a single prototype performs better on harder data and explore more robust ways to handle lighting shifts in industrial environments.
Summary updated