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

Yunfei Liang, Juan Pablo Osorio RiveraarXiv 2026

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:

  1. Frozen Encoder: A DINOv2 backbone (ViT-Base/14) extracts multi-layer patch features from the input.
  2. INP Aggregator: A set of $M$ learnable prototype queries uses cross-attention to aggregate information from the encoder features, creating image-specific prototypes.
  3. 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.

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.

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 = 1 and M = 6.

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).

Table 5: Multi-class anomaly detection on MVTec AD and VisA. “Original” indicates the results reported by Luo et al. (2025); “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.

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.

Table 6: Loss and module ablation on MVTec AD in percentage. “Original” values are from Table 5 of Luo et al. (2025); “Ours” are the means and standard deviations over five seeds. No-INP, INP+Lsm, and Full come from an earlier set of runs than INP-only and INP+Lc, which use seeds 1, 2, 3, 42, and 123.

Limitations and Future Work

The reproduction study notes several caveats:

  1. 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.
  2. Dataset Omissions: The Real-IAD dataset was not included in the reproduction due to high training costs.
  3. 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

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
BibTeX
@misc{liang2026reproducing,
  author = {Yunfei Liang and Juan Pablo Osorio Rivera},
  title = {{Reproducing INP-Former: Reconstructing Intrinsic Normal Prototypes for Industrial Anomaly Detection}},
  year = {2026},
  eprint = {2611.01230},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.01230},
}
Figure