OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Authors: Yaoxuan Feng
Wenchao Chen
Yuxin Li
Bo Chen
Yubiao Wang
Zixuan Zhao
Hongwei Liu
Mingyuan Zhou
Venue: ICML 2025 poster (2025)
Keywords: Anomaly Detection
Diffusion Model
Diffusion Distillation
Primary area: deep_learning->generative_models_and_autoencoders

Abstract: Diffusion models have demonstrated outstanding performance in industrial anomaly detection. However, their iterative denoising nature results in slow inference speed, limiting their practicality for real-time industrial deployment. To address this challenge, we propose OmiAD, a one-step masked diffusion model for multi-class anomaly detection, derived from a well-designed multi-step  **A**daptive  **M**asked  **D**iffusion  **M**odel (AMDM) and compressed using  **A**dversarial  **S**core  **D**istillation (ASD). OmiAD first introduces AMDM, equipped with an adaptive masking strategy that dynamically adjusts masking patterns based on noise levels and encourages the model to reconstruct anomalies as normal counterparts by leveraging broader context, to reduce the pixel-level shortcut reliance. Then, ASD  is developed to compress the multi-step diffusion process into a single-step generator by score distillation and incorporating a shared-weight discriminator effectively reusing parameters while significantly improving both inference efficiency and detection performance. The effectiveness of OmiAD is validated on four diverse datasets, achieving state-of-the-art performance across seven metrics while delivering a remarkable inference speedup.

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Yaoxuan Feng' Wenchao Chen
Yuxin Li
Bo Chen Yubiao Wang' Zixuan Zhao! Hongwei Liu'
Mingyuan Zhou?
Abstract
analysis (Fernando et al., 2021), and video surveillance (Ra- machandra et al., 2020). In industrial environments, due to the scarcity of anomalous samples, unsupervised anomaly
Diffusion models have demonstrated outstand- ing performance in industrial anomaly detection. However, their iterative denoising nature results in slow inference speed, limiting their practicality for real-time industrial deployment. To address this challenge, we propose OmiAD, a One-step masked diffusion model for multi-class Anomaly Detection, derived from a well-designed multi- step adaptive masked diffusion model (AMDM) and compressed using adversarial score distil- lation (ASD). OmiAD first introduces AMDM, equipped with an adaptive masking strategy that dynamically adjusts masking patterns based on noise levels and encourages the model to recon- struct anomalies as normal counterparts by lever- aging broader context, to reduce the pixel-Ievel shortcut reliance. Then, ASD is developed to compress the multi-step diffusion process into single-step generator by score distillation and incorporating shared-weight discriminator ef- fectively reusing parameters while significantly improving both inference efficiency and detec- tion performance. The effectiveness of OmiAD is validated on four diverse datasets, achieving state-of-the-art performance across seven metries while delivering remarkable inference speedup. Code is available at https: / / thub. com/ luo waluuundahuuooan AOiAA
detection has gained significant attention for its capability to learn the normal data distribution and detect deviations indicative of anomalies (You et al., 2022; Lu al., 2023; He et al., 2024b). Furthermore, industrial anomaly detection of- ten involves objects spanning diverse categories with distinct normal patterns. Such scenarios require models capable of generalizing across different classes without necessitating extensive fine-tuning. As such, developing a robust unsuper- vised multi-class anomaly detection framework is crucial to achieving consistent and efficient production workflows in real-world industrial scenarios.
Under the paradigm of unsupervised multi-class anomaly de- tection, diffusion based generative models (Sohl-Dickster et al., 2015; Song et al., 2020; Ho et al., 2020) have gar- nered substantial interest for their ability to handle high- dimensional data and model complex distributions. These models operate by progressively denoising sample from random noise, enabling them reconstruct intricate data patterns that traditional methods often struggle to capture. This generative process makes diffusion models are particu- larly effective at learning the distribution of normal data and identifying deviations that signal anomalies, making them a promising approach for unsupervised multi-class anomaly detection tasks (Yin al., 2023; He et al., 2024b).
Several diffusion-basse approaches have been proposed for anomaly detection, with primary focus generating im- pactful conditional embeddings derived from abnormal in- puts (Mousakhan et al., 2023; Yin et al., 2023; He et al., 2024b; Fučka et al., 2025; Yao et al., 2025). These embed- dings are then fed into the denoising network to guide the reverse process within the diffusion model. For instance, DADD (Mousakhan al., 2023) conditions the denoising process the original input, enabling the model to progres- sively remove noise and accurately reconstruct the normal distribution. Similarly, DiAD (He et al., 2024b) leverages pixel-level semantic information as conditional inputs to guide the denoising process. While these methods enhance reconstruction quality, they often overlook a critical limita- tion in reconstruction-basel anomaly detection, known
1. Introduction
Anomaly detection plays pivotal role in manufacturing defect detection (Bergmann et al., 2019), medical image
'National Key Laboratory of Radar Signal Processing, Xidian University, Xi'an, 710071, China *McCombs School of Business, The University of Texas Austin, Austin, TX 78712, USA. Corre- spondence to: Wenchao Chen <chenwenchao@ andian.ddu.nn>.
Proceedings of the nnnd International Conference Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).

---

OmiAD: One-Step Adaptive Masked Diffuusin Model for Multi-class Anomaly Detection via Adversarial Distillation
"identical shortcut" (Gong al., 2019; You et al., 2022), which arises when models over-rely on local, pixel-level features, unintentionally preserving abnormal features dur- ing reconstruction. As result, these models prioritize local patterns to minimize reconstruction errors, unintentionally reproducing anomalies in the output.
cut" problem and enhancing the model's ability cap- ture global context.
We adapt adversarial score distillation for anomaly detection and develop OmiAD, which compresses the multi-step diffusion process into a single inference step, significandly improving efficiency. To further reduce redundancy, OmiAD incorporates a shared-weige dis- criminator that reuses parameters, enabling a more compact and efficient training process.
Moreover, the iterative nature of diffusion models poses a significant challenge for real-time deployment due to their reliance on stepwise denoising process, where each itera- tion gradually removes noise to reconstruct the original data. This process requires multiple forward passes through the network, leading to high computational overhead and slow inference speeds. While methods based on faster solvers for stochastic differential equations (SDE) or ordinary differen- tial equations (ODE) have successfully reduced the number of inference steps to around dozen (Zhang & Chen, 2022; Karras et al., 2022; Lu et al., 2022; Song & Dhariwal, 2023), it still falls short of meeting the stringent real-time require- ments of industrial applications.
OmiAD is validated on four datasets, achieving state- of-the-art performance across seven metries while de- livering remarkable speed-ups.
2. Background
2.1. Multi-class Unsupervised Anomaly Detection
Multi-class unsupervised anomaly detection has garnered increasing attention for its ability to create a unified model that detects anomalies across multiple categories when only normal data is available (Li al., 2021; Pirnay & Chai, 2022; Chen et al., 2022; You al., 2022). It is based on the hypothesis that reconstruction models trained on normal samples excel in normal regions but struggle with anoma- lous ones (Deng & Li, 2022; Liu et al., 2023; Mousakhan et al., 2023; Zhang et al., 2023b; He et al., 2024a). Building upon this hypothesis, recent works have introduced inno- vative methods to enhance anomaly detection performance. UniAD (You et al., 2022) integrates Neighbor Masked Atten- tion and Layer-wise Query Decoder mechanisms, effectively mitigating the "identical shortcut" problem and improving anomaly detection performance. HVQ-Trans (Lu et al., 2023) utilizes vector quantization to prevent the model from learning "identical shorteut," " thereby enhancing the robust- ness of anomaly detection. DiAD (He et al., 2024b) explores anomaly detection framework based on diffusion mod- els, introducing semantic-guie guided network to ensure the consistency of reconstructed image semantics.
These challenges highlight the need for a new approach that can reduce "identical shorteut" and improve inference efficiency in diffusion-based anomaly detection. To this end, propose One-step adaptive masked diffusion model for Anomaly Detection, named OmiAD, which is a novel unsupervised framework that addresses both issues through two key innovations: an Adaptive Masking strategy (AM), which mitigates shortcut reliance by dynamically en- couraging broader contextual understanding based on noise levels, and Adversarial Score Distillation (ASD), which compresses the multi-step diffusion process into single inference step by distilling the knowledge of training data encapsulated within the score-estimation network of a pre- trained diffusion model. During this distillation process, OmiAD synchronously employs the encoder module of the student score network as a shared-weight discriminator to perform adversarial distillation, eliminating the need for additional parameters (Zhou et al., 2024a). This Diffusion GAN-based adversarial loss enables the model to distin- guish between real and generated samples by aligning the noisy distributions at any timestep (Wang et al., 2022), en- suring that the generative distribution closely matches the clean data distribution. By integrating these components, OmiAD achieves more efficient and streamlined training framework, improving anomaly detection accuracy while maintaining computational efficiency and simplicity, mak- ing it highly applicable to real-world scenarios.
2.2. Diffusion Distillation
Diffusion models are celebrated for their ability to generate figh-fideiity and diverse data, but they are often constrained by the large number of sampling steps required for refine- ment. To address this limitation, diffusion distillation tech- niques have emerged as an effective solution, compressing multi-step diffusion processes into single-step or few-step generators (Salimans & Ho, 2022; Song al., 2023).
The main contributions of our work are summarized as follows:
Recent advances in diffusion distillation are primarily driven by distribution matching under noise corruption. These methods aim to align the distribution of generated data- after adding noise at various levels- with that of real data. An early attempt this idea was Diffusion GAN (Wang
We propose a novel Adaptive Masked Diffusson Model (AMDM) that utilizes an AM strategy to guide the model in reconstructing anomalies into their normal counterparts, effectively mitigating the "identical short-
2

---

OmiAD: One-Step Adaptive Masked Diffusson Model for Multi-class Anomaly Detection via Adversarial Distillation
al., 2022), which matched noisy data distributions di- rectly but required access real data samples. In contrast, diffusion distillation can eliminate this requirement by repre- senting the noisy data distribution using the estimated score function from a pretrained diffusion model.
Teacher
soore
Add noise Adversarial
Student score
X
To measure the discrepancy between the noisy data and gen- erated distributions in score space, these methods typically use either the KL divergence- as seen in Score Distilla- tion Sampling (SDS) (Poole al., 2022), Variational Score Distillation (Wang et al., 2023), Diff-Instruct (Luo et al., 2024a), and Distribution Matching Distillation (DMD) (Yin et al., 2024b) or the Fisher divergence, employed in Score identity Distillation (SiD) (Zhou et al., 2024b) and its vari- ants (Zhou et al., 2024a; 2025; Luo et al., 2024b; Huang al., 2024). SiD leverages three score-related identities to construct novel loss function without relying real data, enabling state-of-the-art performance in single-step generation tasks.
moss
D
Discriminator Add noise
O OneStep-Gen
17
X
1
= o Xx+ +
Adde
r01e, (,
Distillation Loss
Student Score
Stop grad
To further improve both generation efficiency and quality particularly by correcting inaccuracies in the teacher dif- fusion model adversarial diffusion distillation methods (Sauer et al., 2025; Yin al., 2024a; Zhou et al., 2024a) have shown great promise by integrating diffusion models with GAN-style training (Goodfellow et al., 2014) or Dif- fusion GAN frameworks (Wang et al., 2022). For example, ADD (Sauer et al., 2025) introduces an adversarial loss into the distillation process, significantly boosting both sample fidelity and inference speed. SiDA (Zhou al., 2024a) fur- ther extends SiD by incorporating adversarial loss across varying noise levels, enabling finer diserimination between real and generated samples during distillation.
Φ
x= x= I-
Teacher Score
Figure I. Overview of the ASD framework. ASD comprises four main components:One Step Generator (OneStep- Gen), Teacher Score, Student Score, and Discriminator, which collaboratively enable accurate single-step generation and robust anomaly detec- tion. The upper-left section illustrates the alignment between the Teacher and Student Scores, where the Student Score progressively adapts to the Teacher Score, thereby optimizing the One Step Gen- erator. For detailed explanation, please refer to Section 3.3.
Gaussian noise vector æy:
3. Methodology
q( xo) = 11 g(F; (z-1)),
To harness the generative capabilities of diffusion models for anomaly detection while mitigating the inefficiencies of their multi-step generation process, we first design the AMDM, which incorporates AM to enhance robustness and efficiency across diverse scenarios. Then, we intro- duce ASD to compress AMDM into single-step model, significantly improving inference speed and detection per- formance. OmiAD seamlessly integrates AMDM with ASD, achieving efficient and high- performin multi-class anomaly detection.
(I)
(x, ax-1) = N( B, 3.I
where 3, represents a positive constant denoting the noise level. In practical applications, directly sample æ, given mo as the following:
( an) -V(ara (1 T.
(2)
where ;= 1- 3r and ā := I ar. The reverse process involves denoising 24, back to 2o
p=( == (xTT) I Po (2) xx), pa pa (x.) := N (H 1), (x
3.1. Preliminaries
(3)
Diffusion models, particularly the widely adopted Denois- ing Diffusion Probabilistic Model (DDPM) (Ho et al., 2020), consist of two key processes: forward diffusion process and reverse diffusion process. The forward diffusion pro- cess incrementally corrupts the input vector 2o by adding noise over T' steps, progressively transforming it into a
In DDPM, po p0 x:)) is defined as:
( 1) = 1
Vac (x: - vI-a, co( 1));
8.
oo( 1) = (3)
(4)
ift 1: B, = 31, else : Be = 1- 3r
1-66
3

---

OmiAD: One-Step Adaptive Masked Diffuusin Model for Multi-class Anomaly Detection via Adversarial Distillation
where the Eg is denoising function and which can be trained by solving the following optimization problem:
where (g ; t) is the noise predicted by the model 0. By using the timestep t for both masking adjustment and noise addition, the model ensures consistency throughout the forward diffusion process, enabling accurate reconstrue- tion of the original feature Zo by estimating and removing the noise component.
min (0)) := (mo (oo.)) (r(()) ||E (z I)
(5)
where y()) is a time-dependent weight that adjusts the con-
tribution of different timesteps during training, ensuring an appropriate balance across noise levels.
The reconstructed feature to is compared with the ground truth To.
3.2. Adaptive Masked Diffusion Model
C C - zoll
(1I)
Existing diffusion-based anomaly detection models often suffer from the "identical shortcut" problem. To address this issue, we propose the AMDMM, which integrates AM to dynamically adjust the masking probability p(t) based on the noise level during the diffusion process. This mechanism adaptively balances preserving local details at low noise levels and modeling broader context at high noise levels. By progressively increasing p(t) with noise, AM enhances global context modeling while retaining critical features, thereby improving robustness and efficiency in anomaly detection across diverse scenarios.
By incorporating AM into the diffusion process, the pro- posed AMDM significantly strengthens global context modeling, effectively mitigating reliance on shorteut fea- tures. This enhancement improves the model's 's accuracy in anomaly detection across diverse scenarios while ensuring robustness and efficiency.
3.3. One-step Adaptive Masked Diffusion Model
As a diffusion-based method, AMDM suffers from slow inference due to its iterative denoising process. To ad- dress this limitation, we adapt the SiD method proposed in Zhou et al. (2024b) and SiDA method proposed in Zhou et al. (2024a) to develop OmiAD, novel one-step adap- tive masked diffusion model. The ASD framework used by OmiAD is illustrated in Fig. 1. ASD comprises four components: One Step Generator (OneStep-Gen) Teacher Score, Student Score, and Discriminator. The Teacher Score Es, derived from AMDM, leverages its global contextual modeling for anomaly detection. The One Step Generator Ze performs single-step generation reconstruct Øg. which, along with the real sample To. is perturbed with the same noise and fed into the Discriminator D to align noisy distri- butions. Additionally, &g is further perturbed with noise and processed through the Teacher Score es and Student Score Eg. The loss is computed by aligning the Student Score with the Teacher Score, thereby facilitating the optimization of the One Step Generator. These four components within ASD integrated into the score distillation and adver- sarial optimization processes, enabling OmiAD to achieve not only efficient single-step generation but also enhanced anomaly detection capabilities.
The original image is first processed by EfficientNet to extract its feature representation, denoted as To, which is situated in the input feature space. Subsequently, a binary mask M(t) is applied to zo. producing the masked feature representation Imm
T = To C M(t),
(6)
where @ denotes element-wiss multiplication. The masking probability p(t) is dynamically adjusted based on the for- ward diffusion timestep 6, ensuring that the masking process is synchronized with the diffusion process. Specifically, p(t) is defined as:
t T
p(t) = Pmin + (Pmax Pmin)
(7)
where Pmii and Praxx represent the minimum and maximum masking probabilities, I' is the total number of diffusion timesteps, and i controls the masking growth rate. The binary mask M(I is sampled as:
M(I) ~ Bernoulli(p()))
(8)
The forward diffusion timestep t is consistent with the mask- ing process, and Gaussian noise is added to the masked feature a. at the same timestep f. At each timestep I, the noisy feature ot is computed as:
3.3. 1. SCORE DISTILLATION
Our distillation process leverages the One Step generator ge to produce data that closely matches the real data dis- tribution. By training the student score G. on this data, it learns to replicate the behavior of the teacher score eg- Once the distillation is complete, go (xx) can perform anomaly detection in a single step, by passing the need for multi-step inference while retaining the teacher model's performance.
Vāx am + vI - ā. e, C(.,I
(9)
where o represents the variance schedule. The noisy feature am t along with the timestep f, is passed through the model 0 to predict the denoised feature Lo:
1 VI- āi Var
to
mm
Von
Eo (x
(10)
The student score 6 trained using data generated by the
4

---

OmiAD: One-Step Adaptive Masked Diffusson Model for Multi-class Anomaly Detection via Adversarial Distillation
single-step generator gø. formulated as:
the generative distribution closely matches the clean data distribution, thereby improving anomaly detection accuracy.
g go (v Ctm To + V
(12)
To train the encoder module of cø, which also functions as the discriminator, we define its role in detail. Specifically, the discriminator corresponds to the encoder component of the network. For an input 2t, which is a noisy sam- ple, the encoder module processes the input and generates the final layer output of the discriminator with dimensions (H, W, C), where H and W represent the spatial dimen- sions, and C denotes the number of channels, we compute the mean along the channel dimension, resulting in feature map of size (H, W).
where Zo represents a normal training sample, and zg is the output reconstructed by the generator. We denote the distribution of 2g as pe (. The timestep finit represents fixed noise level used during the generation of zg. The
reconstructed samples 2g are then used to train the student score cv, defined as:
Og(es) ) || (Vārg + vI C,e,& t) -e[ (13)
Assuming we have access to (8), the optimal student score that minimizes Equation 13, we follow SiD to define a Fisher divergence-based distillation loss to optimize ge. expressed as
This mechanism enables the discriminator to capture sub- tle differences between real and generated (reconstructed) samples. Particularly in noisy scenarios, the discrimina- tor's 's feature map highlights local responses that amplify the anomaly signals between the generated and real samples.
La = (pp
[T0]]] (o)) (wr,, 1) - ex (x 11
(14)
To this end, we define the discriminator loss as:
While Equation 14 is intractable to solve due to the unknown 2b" (f) and its gradient, we follow SiD and adopt an alternat- ing optimization strategy. This approach alternates between optimizing s/ using SGD with Equation 13 and optimizing 0 using SGD with the following loss:
W H'
L W 8= y=
In D(ye
(17)
+ In (1 (2x)) (V',)
La 1og (n(t)) (nn(())) (e-t(A)tt))(--oolla (E t))
allAr (11))))
where at represents the generated (reconstructed) sam- ple, and ye denotes the real sample. D is discriminator. ((ve)(i', and D(xx) [i', j'll denote the responses at the (d', position in the discriminator maps for real and generated samples, respectively. This formulation ensures the discriminator learns to distinguish between real and fake samples by optimizing its responses across the spatial dimensions W' and H'.
(15)
where o represents the discrepancy between the
teacher and student scores:
(16) Through this SiDD-bsedd score distillation process, the multi- step diffusion mechanism of AMDM is compressed into a single inference step. This is accomplished by extracting and distilling the knowledge from the training data encap- sulated within the score-estimation network of a pretrained diffusion model. The derivation of this formulation, which follows the original approach in SiD (Zhou et al., 2024b; 2025) but is adapted to the DDPM-sttle teacher model used in this paper, is provided in Appendix C.
(xs) = (x t) (
Next, we leverage the discriminator to optimize 0, with the adversarial loss defined as:
W
H
Cady
W'H' [t,.1
(18)
3.3.2. ADVERSARIAL OPTIMIZATION IN DISTILLATION
This formulation ensures the discriminator learns to dis- tinguish between real and fake samples by optimizing its responses across the spatial dimensions W" and H'.
Through OmiAD, single-step anomaly detection is achieved via distillation. Following SiDA (Zhou et al., 2024a), we en- hance performance by integrating a Diffusion GAN (Wang et al., 2022) based adversarial loss. As in SiDA, OmiAD re- purposes the encoder module of the student score network as a shared-weigh discriminator, climinating the need for ad- ditional parameters. This adversarial loss enables the model to distinguish between real and generated samples by align- ing the noisy distributions at any timestep 1, ensuring that
In summary, the adversarial distillation process is completed with minimal computational overhead due to the reuse of the encoder module as the discriminator. This efficient design not only ensures that distillation incurs almost no additional computational cost but also enhances the model's sensitivity and capability in anomaly detection. The detailed ASD algorithm is provided in Algorithm 1.
5

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Table Quantitative Results different AD datasets for multi-class setting.
Image-level
Pixel-level
Dateset
Method
mAD
AU-ROC
AP
Fl_max
AU-ROC
AP
Fl_max
AU-PRO
RD4AD
96.5
95.2
53.8
91.1
82.3
UniAD
98.8
96.2
43.4
49.5
90.7
81.7
SimpleNet
95.3
98.4
95.8
96.9
45.9
49.7
86.5
81.2
MVTec-AD
DeSTSeg
89.2
95.5
91.6
54.3
50.9
64.8
77.1
DiAD
97.2
99.0
96.5
96.8
52.6
55.5
90.7
84.0
HVQ-Trans
98.0
99.5
97.5
97.3
48.2
53.3
91.4
83.6
AMDM(Ours)
98.4
99.0
97.4
97.5
51.5
56.1
92.6
84.6
OmiAD (Ours)
98.8
99.7
98.5
97.7
52.6
56.7
93.2
85.3
RD4AD
92.4
92.4
89.6
42.6
77.8
UniAD
90.8
33.7
39.0
SimpleNet
87.0
34.7
37.8
81.4
72.4
VisA
DeSTSeg
88.9
89.0
85.2
39.6
43.4
67.4
72.8
DiAD
86.8
88.3
85.1
26.1
33.0
70.1
HVQ-Trams
93.2
92.8
87.6
98.7
35.0
39.6
86.3
76.2
AMDM(Ours)
94.8
95.6
91.1
98.8
39.8
43.5
88.4
78.9
OmiAD (Ours)
95.3
96.0
91.2
98.9
40.4
44.1
89.2
79.3
RD4AD
84.1
83.2
84.1
98.1
35.2
38.7
93.4
73.8
UniAD
85.1
95.1
18.9
25.0
81.9
67.9
SimpleNet
90.6
94.1
89.7
97.1
33.6
35.7
MPDD
DeSTSeg
95.1
94.1
37.6
71.9
DiAD
74.6
82.1
82.5
15.9
21.2
78.4
64.0
HVQ-Trans
86.5
85.8
31.4
86.9
71.9
AMDM(OUrs)
93.3
94.9
90.7
98.4
36.8
41.6
93.5
78.4
OmiAD (Ours)
93.7
95.5
90.9
98.6
37.6
42.3
94.0
78.9
RD4AD
82.4
79.0
73.9
97.3
25.0
32.7
89.6
68.6
UniAD
83.0
80.9
74.3
97.3
21.1
29.2
86.7
67.5
SimpleNet
57.2
53.4
61.5
75.7
2.8
6.5
39.0
42.3
Real-IAD
DeSTSeg
82.3
79.2
73.2
94.6
37.9
41.7
40.6
DiAD
66.4
88.0
2.9
7.1
58.1
52.6
HVQ-Trans
86.6
84.9
34.4
71.4
AMDM(OUrs)
87.7
98.6
36.5
41.4
75.5
OmiAD (Ours)
90.1
88.6
82.8
98.9
37.7
42.6
93.1
76.3
4. Experiment
sessment of the model's performance, we further calculate the mean value of the above seven metrics, referred as mAD (Zhang et al., 2023a).
4.1. Experiments Setup
Four datasets are utilized in our paper: (1) MVTec- AD (Bergmann et al., 2019) simulates real-world industrial production scenarios with bigh-resolution images specif- ically designed for unsupervised anomaly detection. (2) VisA (Zou al., 2022), large dataset with 9,621 normal and 1,200 anomalous images spanning 12 object types and diverse anomalies.
Dataset:
We extensively compare our model with 6 base- line methods under unsupervised multi-class settings, in- cluding the unified state-of-the-art method HVQ-Trans (Lu et al., 2023) and the diffusion et al., 2024b). More details about the baseline methods can be found in Appendix E.
Baselines:
approach DiAD (He
(3) MPDD (Jezek et al., 2021), focusing on detecting defects in six classes of metal parts during fabri- cation. (4) Real-IAD (Wang et al., 2024) comprises 150,000 images across 30 distinct categories, offering a comprehen- sive large-scale benchmark for anomaly detection. More details about the datasets be found in Appendix D.
Implementation details: For AMDM, the number of timesteps is T 1000, with linear noise schedule (81 = 10 3r = 0.02) as in Ho et al. (2020). The mask probability is controlled by Pmin = 0.1, Pmax = 0.4 and 2, while the weighting factor a adversarial distillation set to More details Appendix F.
Evaluation metrics:
For anomaly detection and segmenta- tion, we report the Area Under the Receiver Operating Char- acteristic Curve (AU-ROC), Average Precision (AP) (Zavr- tanik et al., 2021), and F1 F1-score-max (F1 max) (Zou et al., 2022). Additionally, for anomaly segmentation, we also report the Area Under the Per- Region-Overlay (AU-PRO) (Bergmann al., 2020). To provide comprehensive
4.2. Comparison with SoTAs on Different AD datasets
As shown in Table 1, OmiAD achieves state-of-the-an performance across four widely used anomaly detection datasets, highlighting its robustness and versatility. Built upon its teacher model, AMDM, which leverages global
6

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Normal
Anormaly
Recon
GT
Pred
Normal
Anormaly
Recon
GT
Pred
bozellot
wXXH
traneistor
levahher
Figure Qualitative results for anomaly localization on MVTec-AD, From left right: normal sample the reference, anomaly sample, our reconstruction, ground-truth, and our predicted anomaly map.
Normal
A Anormaly
UnLAD
HVO-Trans
DIAD
Nermal
Anormaly
GT
UnIAD
HVQ-Trans
DIAD
pbh
bay
Tublos
Figure 3. Qualitative comparison of pixel-level anomaly segmentation results across four datasets. From left to right: normal sample the reference, anomaly sample, ground truth (GT), predicted anomaly maps by UniAD, HVQ-Trans, DiAD, and ours.
contextual information to secure the second-highest perfor- mance across four datasets, OmiAD demonstrates its capa- bility to excel in both anomaly detection and segmentation tasks.
Fig. 2. OmiAD effectively reconstructs anomalies into their corresponding normal samples, accurately localizing anoma- lous regions through reconstruction differences. Specifically, it handles both object anomalies (Left) and texture damages (Right) with remarkable precision, thereby showcasing its robustness in capturing subtle and diverse defect patterns across various scenarios.
On the MV dataset, OmiAD achieves impres- sive scores of 98.8/9 for AU-ROC/AP/FLmma Lmax at the image level and 07.7/52.6/56.7/93. for AU- ROC/AP//IL_mxxPRO at the pixel level, surpassing DiAD by 1.5% and HVQ-Trans by 2.0% in the overall mAD met- ric. On the VisA dataset, OmiAD outperforms DiAD by 13.1% and HVQ-Trans by 4.1% 1 in mAD. For the MPDD dataset, which features industrial metal parts with subtle, localized defects, OmiAD achieves significant 23.3% im- provement over DiAD and 9.7% over HVQ-Trans in mAD. On the Real-IAD dataset, large-scale benchmark of 150K images across 30 categories, OmiAD demonstrates excep- tional performance, surpassing DiAD by 45. 15.1% and HVQ- Trans by 6.9% in mAD, further underscoring its scalability and effectiveness in real-world applications. Comprehen- sive per-category results for each dataset are provided in Appendix G.
Furthermore, Fig. highlights OmiAD's superior pixel-level anomaly segmentation capabilities. Compared to UniAD, HVQ-Trans, and DiAD, OmiAD achieves significantly more accurate segmentation with minimal bias. This advantage be attributed to its ability incorporate global con- textual information, which enables it to avoid reliance on localized features. Consequently. OmiAD delivers robust and consistent segmentation performance across a wide range anomaly types. For additional qualitative results and analysis, please refer to Appendix
4.4. Inference Speed Comparison
We evaluate the inference speed of OmiAD against Transformer-based, Reconstruction-based and Diffusion- based methods on four anomaly detection datasets, as shown in Table 2. All evaluations are conducted with batch size of 64 under identical hardware settings.
4.3. Quantitative Results of OmiAD
To demonstrate the capability of modeling normal distribu- tions, we visualize the generated results. As illustrated in
OmiAD achieves unparalleled inference efficiency across all

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Table 2. Average inference time (in seconds) for different models various datasets with batch size 64.
bransformer--ased
Reconstruction-basee
Diffusion-based
Dataset
Ours
HVQ-Trans
UniAD
RD4AD
ReContrast
DDAD
DiAD
TransFusion
MVTec-AD
0.1795
0.1891
0.2075
0.2383
6.0067
15.662
15.904
0.0254
VisA
0.2018
0.2198
0.2063
0.2342
6.0260
16.446
15.975
0.0283
MPDD
0.1620
0.1723
0.2106
0.2314
5.9247
16.327
16.002
0.0201
Real-IAD 0.1732
0.1732
0.2171
0.2288
5.9602
15,567
16.051
0.0192
Table 3. Ablation studies on MVTec-AD: Evaluating the effects of fixed/adaptive masking strategies and distillation methods anomaly detection/llcalizzaioon using AU-ROC. Abhreviations: F- Mask (Fixed Mask). A- A-Mask (Adaptive Mask), ADD(Adversarial Diffusion Distillation), Distill (Score Distillation), Adv. D. (Ad- versarial Score Distillation).
Masking (A-Mask) strategy demonstrates superior perfor- mance compared the Fixed Masking (F-Mask) approach, demonstrating that dynamically adjusting masking patterns based on input characteristics enables the model to better capture global context. This, in turn, improves its ability to reconstruct anomalies as their normal counterparts, leading to superior detection performance.
DDPM
F-Mask
A-Mask
ADD
Distill
Adv.
Results
90.2/91.4
/
/9688
Effect of Distillation and Adversarial Distillation: In- troducing Score Distillation (Distill) allows the student model to closely approximate the performance of the multi- step teacher model while drastically reducing inference time. Furthermore, integrating Adversarial Score Distil- lation (Adv. D.) further enhances model effectiveness, even surpassing the performance of the teacher model. This im- provement is attributed to the thared-weight discriminator embedded within the student network, which refines the alignment between generated and real samples, ensuring better adaptation to the normal data distribution. Notably, the highest AU-ROC scores of 98.8 8/97.7 are achieved when combining Adaptive Masking with Adversarial Score Distil- lation.
98.4/97.5
94.5/95..
/9.2
98.8/97.7
datasets due to its one-step diffusion process. On MVTec-- AD, OmiAD records an inference time of 0.0254s, dramati- cally outperforming DDAD (6.0067s), DiAD (15.662s), and TransFusion (15.904s), achieving nearly 200x speedup DDAD. Similarly, on VisA, MPDD, and Real-IAD, OmiAD maintains its efficiency, with inference times of 0.0283s, 0.0201s, and 0.0192s, respectively. Com- pared to Transformer-base methods, OmiAD delivers a 7x to 8x speedup, significantly surpassing HVQ-Trans (0.1795s) and UniAD 1891)) Additionally, it out- performs Reconstruction-bart
Comparison with Adversarial Diffusion Distillation: To further evaluate the effectiveness of our proposed ASD, developed based on SiD (Zhou al., 2024b) and SiDA (Zhou et al., 2024a), we conducted a direct comparison with ADD (Sauer et al., 2025). ASD achieves substantial per- formance gain, attaining 98. 89..8/977 AU-ROC, significantly outperforming ADD, which achieves 94.5/95.2 AU-ROC. These results highlight the superior robustness of ASD in handling diverse anomaly patterns, further demonstrating its effectiveness in improving anomaly detection and local- ization accuracy.
methods such as RD4AD (0.2075s) and ReContrast (0.2383s). These results under- score OmiAD's ability to balance accuracy and efficiency, making it highly practical solution for real-time anomaly detection.
4.5. A Ablation Studies and Analysis
Table 3 presents the ablation study results on the MVTee-- AD dataset, examining the impact of masking strategies and distillation techniques on anomaly detection and localiza- tion performance. The results, reported using the AU-ROC metric for both image-level detection and pixel-level local- ization, also include a comparison between our proposed ASD and Adversarial Diffusion Distillation (ADD) (Sauer et al., 2025), highlighting the effectiveness of our distillation strategy.
Overall Impact on Performance: The integration of adap- tive masking strategies and adversarial score distillation underscores the critical role of mitigating shorteut learning while enhancing the efficiency of the diffusion process. By facilitating a deeper understanding of global context and ensuring accurate reconstructions, OmiAD achieves state- of- performance across variety of anomaly detection datasets. For further details and additional ablation studies, please refer to Appendix I.
Impact of Masking Strategies: The introduction of mask- ing strategies significantly enhances model performance by reducing shorteut learning- Specifically, the Adaptive
8

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
5. Conclusion
Chen, L., You, Z., Zhang, N., Xi, J., and Le, X. Utrad: Anomaly detection and localization with u-transformer. Neural Networks, 147:53-62, 2022.
In this paper, we proposed OmiAD, a novel one-step Adap- tive Masked Diffusion Models for multi-class anomaly de- tection, addressing two key challenges: shortcut learning and inference efficiency. To reduce shorteut reliance, we introduced an Adaptive Masking strategy, guiding the model to leverage global contextual information and reconstruct anomalies into their normal counterparts, thereby improving robustness across diverse scenarios. Furthermore, we tack- led the efficiency bottleneck of diffusion models by design- ing an adversarial score distillation framework. Experiments on four datasets show that OmiAD achieves state-of of-eeoof-the-rr art performance across seven metries, offering a practical solu- tion for real-time industrial anomaly detection.
Deng, H. and Li, X. Anomaly detection via reverse distil- lation from one-class embedding. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 9737-9746, 2022.
Fernando, T., Gammulle, H., Denman, S., Sridharan, S., and Fookes, C. Deep learning for medical anomaly detection- a survey. ACM Computing Surveys (CSUR), 54(7):1-37, 2021.
Fučka, M., Zavrtanik, V., and Skočaj, D. Transfusion-a transpareney-basee diffusion model for anomaly detec- tion. In European conference on computer vision, pp. 91-108. Springer, 2024.
Acknowledgements
The work of Y. Feng, W. Chen, Y. Li, B. Chen, Y. Wang. Z. Zhao, and H. Liu was supported in part by the National Nat- ural Science Foundation of China under Grant U21 in part by the Fundamental Research Funds for the Central Universities QTZX24003 and QTZX23018 8; in part by the 111 Project under Grant B 8039; and in part by Shaanxi Youth Innovation Team Project. W. Chen acknowledges the support of the stabilization support of National Radar Signal Processing Laboratory under Grant (JKW202XOX, KGJ202401) and National Natural Science Foundation of China (NSFC) (6220010437).
Fučka, M., Zavrtanik, V., and Skočaj. D. Transfusion-a transparency-based diffusion model for anomaly detec- tion. In European conference on computer vision, pp. 91-108. Springer, 2025.
Gong, D., Liu, L., Le, V., Saha, B., Mansour, M. R., Venkatesh, S., and Hengel, A. v. d. Memorizing normality to detect anomaly: for unsupervised anomaly detection. Proceedings of the IEEE/CVF international conference on computer vi- sion, pp. 1705-1714, 2019.
deep autoencoder
Impact Statement
Goodfellow, I., Pouget-Abadie J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. Generative adversarial nets. Advances in nearul informu- tion processing systems, 27, 2014.
This paper presents work whose goal to advance the field of Machine Learning. There are many potential societal consequences of our work, none which feel must be
specifically highlighted here.
Guo, J., Lu, S., Jia, L., Zhang, W., and Li, H. Recontrast: Domain-specific anomaly detection via contrastive recon- struction. Advances in Neural Information Processing Systems, 36:10721-10740, 2023.
References
Bao, F., Nie, S., Xue, K., Cao, Li, C., Su, H., and Zhu, J. All are worth words: A vit backbone for diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 22669-22666 2023.
He, H., Bai, Y., Zhang, J., He, Q., Chen, H., Gan, Z., Wang, C., Li, X., Tian, G., and Xie, L. Mambaad: Exploring state space models for multi-class unsupervised anomaly detection. arXiv preprint XXiv:2404.06564, 2024a.
Bergmann, P., Fauser, M., Sattlegger, D., and Steger, C. Mytec ad-a comprehensive real-world dataset for un- supervised anomaly detection. In Proceedings of the IREE/CVF conference on computer vision and pattern recognition, pp. 9592-9600, 2019.
He, H., Zhang, J., Chen, H., Chen, X., Li, Z., Chen, X., Wang, Y., Wang, C., and Xie, L. A diffusion-based frame- work for multi-class anomaly detection. In Proceedings of the AAAI Conference on Artificial Intelligence, vol- ume 38, pp. 8472-8480, 2024b.
Bergmann, P., Fauser, M., Sattlegger, D., and Steger, C. Uninformed students: Student-teacher anomaly detection with discriminative latent embeddings. In Proceedings of the JEEE/CVF conference on computer vision and pattern recognition, pp.
He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learn- ing for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778, 2016.
2020.
9

---

OmiAD: One-Step Adaptive Masked Diffusson Model for Multi-class Anomaly Detection via Adversarial Distillation
Ho, J., Jain, A., and Abbeel, P. Denoising diffusion proba- bilistic models. Advances in neural information process- ing systems, 33:6840-6851, 2020.
Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z.., Gimelshein, N., Antiga, L., et al. Pytorch: An imperative style, high-performance deep learning library. Advances in neural information processing systems, 32, 2019.
Huang, Z., Geng, Z., Luo, W., and Qi, G-j. Flow generator matching, arXiv preprint ar arXiv:2410. 19310, 2024.
Peebles, W. and Xie, Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF interna- tional conference on computer vision, pp. 4195-4205, 2023.
Jezek, S., Jonak, M., Burget, R., Dvorak, P., and Skotak, M.
Deep learning- baaninggbassed defect detection of metal parts: eval- uating current methods in complex conditions. In 2021 13th International congress ultra modern telecommu- nications and control systems and workshops (ICUMT),
Pirnay, and Chai, K. Inpainting transformer for anomaly detection. In International Conference on Image Analysis and Processing, pp. 394 406. Springer, 2022.
pp. 66-71. IEEE, 2021.
Karras, T., Aittala, M., Aila, T., and Laine, S. Elucidating the design space of diffusion-basee generative models. Advances in neural information processing systems, 35: 26565-26577, 2022.
Poole, B., Jain, A., Barron, J. T., and Mildenhall, B. Dream- fusion: Text-to-3d using 2d diffusion. arXiv preprint arXiv:2209. /4988, 2022.
Kingma, D. P. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.698) 2014.
Ramachandra, B., Jones, M. J., and Vatsavai, R. R. A survey of single-scene video anomaly detection. IEEE transactions on pattern analysis and machine intelligence, 44(5):2293-233 2312, 2020.
Li, C.-L., Sohn, K., Yoon, J., and Pfister, T. Cutpaste: Self-supervised learning for anomaly detection and local- ization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 9664-9674, 2021.
Ronneberger, O., Fischer, P., and Brox, T. U-net: Con- volutional networks for biomedical image segmenta- tion. In Medical image computing and computer-assisted intervention
2015: 18th international confer- ence, Munich, Germany, October 5-9, 2015, proceedings, part III 18, pp. 234 241. Springer, 2015.
Liu, Z., Zhou, Y., Xu, Y., and Wang, Z. Simplenet: A simple network for image anomaly detection and localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Puttern Recognition, pp. 20402-20411 2023.
Salimans, T. and Ho, J. Progressive distillation for fast sampling of diffusion models. arXiv preprint arXi::2202.00512 2022.
Lu, C., Zhou, Y., Bao, F., Chen, J., Li, C., and Zhu, Dpm-solver: A fast ode solver for diffusion probabilistic model sampling in around 10 steps. Advances in Neurul Information Processing Systems, 35:5775-5788 5787, 2022.
Sauer, A., Lorenz, D., Blattmann, A., and Rombach, R. Ad- versarial diffusion distillation. In European Conference Computer Vision, pp. 87-103. Springer, 2025.
Lu, R., Wu, Y., Tian, L., Wang, D., Chen, B., Liu, X., and Hu, R. Hierarchical vector quantized transformer for multi-class unsupervised anomaly detection. Advances in Neural Information Processing Systems, 36:8487-8500, 2023.
Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N., and Ganguli, Deep unsupervised learning using nonequi- librium thermodynamics. In International conference on machine learning, pp. 2256 2266-2265. PMLR, 2015.
Song, Y. and Dhariwal, P. Improved techniques for training consistency models. arXiv preprint AxXiv:3310.14188 2023.
Luo, W. Hu, T., Zhang, S., Sun, J., Li, Z., and Zhang, Z. Diff-instruct: A universal approach for transferring knowledge from pre-trained diffusion models. Advances in Neural Information Processing Systems, 36, 2024a.
Song, Y. Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Er- mon, S., and Poole. B. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.1345 2020.
Luo, W., Huang, Z., Geng, Z., Kolter, J. Z., and Qi, G.- One-step diffusion distillation through score implicit matching. Advances in Neural Information Processing Systems, 37:1 15377-115408, 2024b.
Song, Y., Dhariwal, P., Chen, M., and Sutskever, I. Consis- tency models. arXiv preprint arXiv:2303.014666 2023.
Mousakhan, A., Brox, T., and Tayyub, J. Anomaly detec- tion with conditioned denoising diffusion models. arXiv preprint arvi:22055 15956, 2023.
Tan, M. and Le, Q. Efficientnet: Rethinking model scal- ing for convolutional neural networks. In International
10

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
conference on machine learning, pp. 6105-6114. PMLR, 2019.
Zhang, J., Chen, X., Wang, Y., Wang, C., Liu, Y., Li, X., Yang, M.-H., and Tao, D. Exploring plain vit recon- struction for multi-class unsupervised anomaly detection. 2023a.
Wang, C., Zhu, W., Gao, B.-B., Gan, Z., Zhang, J., Gu, Z., Qian, S., Chen, M., and Ma, L.. Real-iad: real-world multi-view dataset for benchmarking versatile industrial anomaly detection. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pp. 28883222892, 2024.
arXiv preprint
Zhang, Q. and Chen, Y. Fast sampling of diffusion models with exponential integrator. arXiv preprint wrXiv:2204.13940 2022.
Zhang. X., Li, S., Li, X., Huang, P., Shan, J., and Chen, Destseg: Segmentation guided denoising student-teacher for anomaly detection. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pp. 3914-3923, 2023b.
Wang. Z., Zheng, H., He, P. Chen, W. and Zhou, M. Diffusion-gan: Training gans with diffusion. arXiv preprint X2i2:2200600262,, 2022.
Wang, Z., Lu, C., Wang, Y., Bao, F., Li, C., Su, H., and Zhu, Dreame: High-fidelity and diverse text-to-3D generation with variational score distillation. In Thirty- seventh Conference on Neural Information Processing Systems, 2023. URL https: http://ppneeeeeeeeeeeeee net//
Zhou, M., Zheng, H., Gu, Y., Wang, Z.. and Huang, H. Adversarial score identity distillation: Rapidly surpassing the teacher in one step. arXiv preprint arXiv:2410.14911 2024a.
Zhou, M., Zheng, H., Wang. Z., Yin, M., and Huang. H. Score identity distillation: Exponentially fast distillation of pretrained diffusion models for one-step generation. In Forty-first International Conference Machine Learn- ing. 2024b.
Yao, H.. Liu, M., Yin, Z., Yan, Z., Hong. X., and Zuo, W. Glad: Towards better reconstruction with global and local adaptive diffuuion models for unsupervised anomaly detection. In European Conference on Computer Vision, pp. 1-17. Springer, 2025.
Zhou, M., Wang, Z., Zheng, H., and Huang, Guided score identity distillation for data-free one-step text-to-image generation. In ICLR 2025: International Conference on Learning Representations, 2025.
Yin, H., Jiao, G., Wu, Q., Karlsson, B. F., Huang, B., and Lin, C. Y. Lafite: Latent diffusion model with feature editing for unsupervised multi-class anomaly detection. arXiv preprint arXiv:2307.08055 2023.
Zou, Y., Jeong. J., Pemula, L., Zhang, D., and Dabeer, O. spot-the-difference self-supervised pre-training for anomaly detection and segmentation. In European Con- ference on Computer Vision, pp. 392 392-408. Springer, 2022.
Yin, T., Gharbi, M., Park, T., Zhang, R., Shechtman, E., Durand, F,, and Freeman, W. T. Improved distri- bution matching distillation for fast image synthesis. In The eighth Anmual Conference on Neural In- formation Processing Systems, 2024a. URL https: //openreview.com net wtt.:rrmmm-iuuucaaaaaaa
Yin, T., Gharbi, M., Zhang, R., Shechtman, E., Durand, F., Freeman, W. T., and Park, T. One-step diffusion with distribution matching distillation. In Proceedings of the JEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6613-6623, 2024b.
You, Z., Cui, L., Shen, Y., Yang, K., Lu, X., Zheng, Y., and Le, X. A unified model for multi-class anomaly detection. Advances in Neural Information Processing Systems, 35: 4571-4584, 2022.
Zavrtanik, V., Kristan, M., and Skočaj. D. Draem-a discrim- inatively trained reconstruction embedding for surface anomaly detection. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 8330- 8339, 2021.

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
A. Algorithm for Training OmiAD
Algorithm Training for OmiAD
1: Input: One step Generator go- pretrained teacher network c,, student network Egp finit, Ama 990,
A3 1, 1,
0.01, latent discriminator map size (W" I!').
2: Initialization: o, v Φ. (()) encoder(v))
repeat
4: Sample zo from the original dataset.
5:
Compute Fy 9o (v + V mm +), where ~ NO, T).
6:
Sample Uniform(O, fmax) E ~ (00 1), and compute 2t = varzo + /1 ācct y/x = vaizo + v1 ā.ct.
7:
Update & with the loss function:
8:
L 1 W EV= Σn= [In ((ve) FF'' In D(=s)I='.)')
9:
C = (f) (IIE
Eal12 - 2 h
10:
1 = VuL.
Sample Uniform(O...... ...., fm.x), Ea ~ (0, I), and compute ax = vārrgg v ōiEt.
12:
Update 9e with the loss function:
13:
Cade WTl Di=l Σ [t.
14:
Cs = (() - Ev (=t,
- ee) (x t) Ev (oxr;t)) t)ll3 + A 1
15:
8= Volo
until convergence
17:
Output: go
B. Algorithm for Inference with OmiAD
Algorithm 2 OmiAD Inference Stage
1: Input: img: Original input image, Trained one-step generator, F.f ficient.Ne:: Feature extractor, linit-
2: Output:
3: S: Pixel-wise anomaly score map (same resolution as input image)
4: Procedure:
Feature Extraction: 2o Ffiintit/eeeetimmg
6: Noising: 24 - vā, 2 + /1 0t E, linits N I),
7: One-step Reconstruction: to gz(xz)
8: Anomaly Score Computation: S = ||z0 2ol1
C. Derivation of the Optimized Distillation Loss Function
Following Zhou et al. (2024b; 2025), we start with the original Fisher divergence-based loss function:
Lo (x (x.) (2()) (( (2 t) cas (a t) 1|
(19)
where 6o and (0) represent the teacher and optimal student scores, respectively; (t) is weighting function dependent on yax, Fg describes the noisy data distribution conditioned Bg and I; and (3.g) reflects the data distribution tied to 0.
We refer to a naive approximation of this loss obbained by substituting (H) with its approximation e as (()) expressed as
E (1 (700) |l (2t, 1) - E (xt, 1)]
(20)
Using the definition of the student score
G
(It, (
-VI C4 Va, log (2(+)
(21)
12

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
the objective function in Equation 19 can be equivalently reformulated follows:
cΦ (2 (0) t)
(2))) po(o))
= Bylse 2g po (x
c (3'e: 1) cvr t), c c (x2,))
(22)
Es (x t) E0- (E), t), Es (xe, (2)=)))
= Bylre " () po(z,)
( cv. (2,, t), vI as V., log loggo(
+ (o
Furthermore, by using a score-related identity given by
Vx, log 1(g)( =2oop(())=s)) logp(æ xo)
(23)
and more specifically the score-projection identity discussed in SiD, obtain
( (c0(E1 - cs) t), VI - a. V., log (ogoo(x))))
( p)(a,)
( (co( (x: t) v1 āg V.v x, p(ac( xz2)
(24)
( (Eo( t) (0) t).
Vār
-I-ai āe
- (ES (or t),e, t))
Plugging Equation 24 into Equation 22, we obtain an equivalent expression of the objective function in Equation 19 as
Ca o, (tt) (E t) - Ev- (x), (E) t) -e)
(25)
Substituting (0) with its approximation eb, we obtain another approximated Fisher divergence
8 = By(zel2g pa (mo) [7(0) (Ea (2r, t) - e (xx, (E) - -s)
(26)
Compared with C. in Equation 20, the new loss ( leverages the score-projection identity mitigate the intricate dependency of x²(()) on 0.
The final loss, designed by SiD to counteract the effect of ignoring the dependency of 4 (0) 0, is defined
Lg = 2 - aac!
(27)
= Ey(x. (ytesle [T(1) (Gps ( (x (0066-6ppp, - a: al/cx( t) c (2E, t) 1)
D. Dataset:
MVTec-AD dataset:
The MVTec Anomaly Detection (MVTec-AD) dataset (Bergmann et al., 2019) is a widely used benchmark for unsupervised anomaly detection and localization in industrial scenarios. It includes 15 categories of high- resolution images across both texture and object types, covering a variety of real-world defects such as scratches, dents, and cracks. The dataset consists of 3,629 normal images for training and 1,725 test images containing both normal and anomalous samples. Additionally, pixel-level ground truth annotations are provided for anomaly localization, making suitable for evaluating both detection accuracy and localization performance.
The VisA dataset is large-scale anomaly detection benchmark (Zou et al., 2022) that features 10,821 high-resolution images across 12 distinct object categories. Each category contains various types of anomalies, ranging from structural defects to surface irregularities. The dataset is structured into three types of anomaly scenarios: complex structures, multiple instances, and single-ing single-instance instance anomalies. With detailed annotations and a diverse set of defect types, VisA is particularly useful for evaluating the robustness of anomaly detection models under different industrial conditions.
VisA dataset:
13

---

OmiAD: One-Step Adaptive Masked Diffusson Model for Multi-class Anomaly Detection via Adversarial Distillation
The MPDD dataset (Jezek et al., 2021) focuses on anomaly detection in metallic components during the manufacturing process. It contains six categories of painted metal parts with various types of defects, such scratches, dents, and discoloration. The dataset provides 888 normal training images and 458 test images, comprising both normal and defective samples. Unlike other datasets, MPDD introduces challenges such as varying spatial orientations, lighting conditions, and non-homogeneous backgrounds, making it a realistic and challenging benchmark for defect detection.
MPDD dataset:
Real-IAD dataset: The Real-IAD dataset (Wang et al., 2024) one of the largest publicly available datasets for industrial anomaly detection, consisting of over 150,000 high-resolution images across 30 object categories. The dataset includes 99,721 normal images and 51,329 images with various types of anomalies. Real-IAD covers wide range of real-world industrial defects and includes complex, multi-instance, and subtle anomalies, providing comprehensive benchmark for evaluating anomaly detection methods in practical applications.
E. Baselines:
We conduct and analyze variety of qualitative and quantitative comparison experiments on MVTec-AD, VisA, MPDD, and Real-IAD. For the comparison, we select three embedding- methods, DeSTSeg (Zhang et al., 2023b), RD4AD (Deng & Li, 2022), and SimpleNet (Liu al., 2023), along with one reconstruction-based method, UniAD (You al., 2022). Additionally, include the unified SOTA method HVQ-Trans (Lu et al., 2023) and the liffusion-basee method DiAD (He et al., 2024b).
Furthermore, we select ReContrast (Guo et al., 2023), DADD (Mousakhan et al., 2023) and TransFusion (Fučka et al., 2024) to evaluate inference speed.
F. Implementation details:
The input image resolution is set to 224 x 224, and the feature maps resized to 32 x 32. Feature maps from stages 1 to 4 of EfficientNet-bd (Tan & Le, 2019) are resized and concatenated to produce 272-channel feature representation. For the diffusion model, we configure the number of timesteps as T = 1000, employing a linear noise schedule with B1 = -0-- and 87 = 0.02, following the setup in Ho et al. (2020) In our adaptive masking strategy, the mask probability is controlled by the following parameters: Pmin = 0.1, Pmax = 0.4, and = 2. The model is trained using the Adam optimizer (Kingma, 2014) with a learning rate of 0.001 and batch size of 32. All experiments are implemented in PyTorch 2.1.0 (Paszke et al., 2019) and executed on an NVIDIA RTX 4090 GPU with 24GB of VRAM.
G. More Quantitative Results for Each Category on MVTec-AD, VisA, MPDD, and Real-IAD:
To provide a more comprehensive evaluation, we present additional quantitative results for each category across the four benchmark datasets: MVTec-AD, VisA, MPDD, and Real-IAD. The reported evaluation metrics include the Area Under the Receiver Operating Characteristic Curve (AU-ROC), Average Precision (AP). and F1 -i-scor--mas (F1 max). Additionally, for anomaly segmentation, we report the Area Under the Per-Region-Overlap (AU-PRO).
These detailed per-category results provide deeper understanding of the model's performance across different types of anomalies. By analyzing the results on each dataset, we can better observe the robustness and adaptability of the proposed method in various real-world scenarios, demonstrating its effectiveness in both anomaly detection and segmentation tasks.
14

---

OmiAD: One-Step Adaptive Masked Diffusson Model for Multi-class Anomaly Detection via Adversarial Distillation
Table 4. Comparison with SoTA methods on MVTec-AD dataset for multi-class anomaly detection with AU-ROCIAP/II Lmax mmx metrics.
Category
RD4AD
UniAD
SimpleNet
DeSTSeg
DiAD
IIQQ-Trans
Ours
Bottle
99.6/99.9/98 4 99.7/100/1100
100./100//10.
98.7/99.6/96.8
19.7//6.5/91.8
100//100/100,
100//100/100.
Cable
95.2/95.9/88.0 1/8./8255
97.5/98.5/94.77
89.5/94.6/85.9
94.8/98.8/95 8/95.2
99.0/98.8/55.1
98.4/99.4/95.6
Capsule
94.1/96.9/96.
86.9/97.8/94.4
90.7/97.9/93.5
82,8/95.9/92.6
89.0/97.5/95.5
95.4/99.2/96.3
94.7/99.3/96.8
Hazelnut
60.8/69.8/86.4
99. 39.8/900/99..
99.999
98.8/99.2/98.6
3
100//100./9..3
100./100./000.
Object
MetalNut
100/1000/99.5
99.2/99.9/995.
96.9/99.3/6.11
92.9/98. 4/92.2
19.1/96.0/91.6
99.9/99. 9/989 9
Pill
97.5/99.6/96.8
29.7/98.7/95.7
88,2/97.7/92..5
47.1/9../91..7
15.7/98.5/94.5
95. 2/99.
94.2/99.229 2/9554
Screw
97.7/99.3/95.8
87.5/96.
76.7/90.6/87.7
69.9/88.4/88 4/85,4
95.6/97.9/922 90.7/99.7/97.99
96.9/98.8/96
Toothbrush
97. .7/94/9
94.2//7.4/95.
89.7/95.7/92.3
71.7/89.3/84
99.7/99.//99..
93. 93.6/99.9/99 9/9984 .4
99.7/100./100.
Transistor
94.2/95 2/90.0
99. 11..8/98.00 0/93,8
79.29/9.7/77.6
78.2/79.5/0 5/6888 8
99.8/99.6/9
6/97.4
99.7/99.5/96.4 4
99.9/99.9/99 999889
Zipper
99.5/99.9/99
95. 15.88/9.559 5/97.1
99. 99.0/99.7/98.3
88.4//6.3/99 3/93.1
15.9944.1994.44
19.9//9.6/98..
99.8/100./99.6
Carpet
98.5/99.6/97.22
99989999//99.44
95.7/98.7/93.2
95.9//8.8/9499
9/94//9//88.
99.9/100./100.
99.6/100./99.
Texture
Grid
98.0/99.4/96.5 98.2/99.5/97.55
97.6/99.2/96.4
97 9999999999666
98.5/99 8/97.7
97.0/99.5/99
99.8/99.9/99.1
Leather
100./100./100.
100//100/100..
100./100./000.
89.2/99.8/98.9
99.8/99.7/97.
100./100./100.
100./100//00..
Tile
98.3/99.3/96.4
99.3/99.8/98.2
99.3/99.8/98.8
97.0/9
96.8/99.9/98.4
99.2/99.8/98.22
100./99.9/98.8
Wood
99.2/99.8/98.3
98. 6/.6/99.6/96.6
///4
99.9/100./9..2
99.7/100//100.
97.2/99.6/97.4
99.0/99.8/98.
Mean
94.6/96.5/95.2
96.5/98.8/96.2
95.3/98.4/95.88
89.2995.//91.6
97.2/99.0/96.5
98.0/99.5/97.55
98.8/99.7/98.5
Table 5. Comparison with SoTA methods on MVTec-AD datasct for multi-class anomaly localization with AU-ROC/AP/FI _mxx
metrics/AU-PRO metrics.
Calegory
RD4AD
UniAD
SimpleNet
DeSTSeg
DIAD
HVQ-Trans
Ours
Bottle
77.8/6.22/7.6//4
98.1/66.0669.299
0/2253.8/62.4/88..
93.3/61.7/56.006
98.4/52.2/54.80 8/66.
98.3/71.8/70.22
98.6/749//3..89556
Cable
15.1/26.3/33.677
77.339../45.2785.
96.7/42.4/51.222
89.3/37.5/405/499
96.8/50.11
96.8:50.1/57.8888
98.1/52.4/99.083
98.3160.5/62.9/91.
Capsule
98.8/43.4 4/4400444000
78.6542.746../92.11
98.5/05 98.5/05.4444./884
95. (14779/48,9/22..
97.1442.045..8877
(8.88/553//9991
98.9/48.1152..0/92.
Hazelnut
97.9/36.2/5 1.622.7777
98.1/55.2/56.8/94
98.1/55.211
98.4/44.6/51.4/87
98.2/65.8/6 8//616//4.85
98.3/79.2/80.4/91
98.8662.7/33.2992
98.6/59.6/59999944
9/94.3
Object
MetalNut
94.8/55.5/66.44 9/669//999/
62.7/14.6/29.2/81
2/2.8/88
98.0/83.1/79.4/855
44.2/42.0/22.8/53..0
97.3/30.0/38.3999
96.3/67. 1..66.1/75.5//03
96.5166.6/75.69999
Pill
97.5/63.4765
95.0/44.0/53.99955
96.5/72.466..77881
96.2661.7/41.8/777
95.7/46.0/51 4/89.0
97.1/50.1/57 6/69.9
96.6/56.8/60.77955.
Screw
99.4/40.2144.6/99 8/6.6/96686
98.3/28.7337.69955
96.5/15.9/23.2000
93.8/19.9/25.344
3/47.3
97, 97.9/69.6/99.6/55 0
98.9/28.8/36 8/3,88/46...4..
99.5/38.7/43.5/77
Touthrush
72.8/55.6/58.8/92..
98.4/44.9/45.777
98.4/46.9/52.50877
96.2/52../58.88530
99.8/78.7/72.8895
98. /8.6/40.8/51.o 1//89.
98.7/40.5/56.22
Transistor 85. 25.9//2..0 3/442.3/45../74.
97.9/ 77.99/955/44./999
95.8/58.2/56 2/2.
73.6/38. 4/33.2//33///////
95. ///15.//31.//90.0
97.
98.4/73.4772.5%%
Zipper
98.5/52.9600.394.
96.8/00 96.8/40.14999/922. 1/4999/92.6
97. 1../53..//546/900
97.3164.7/59.22 2/66.9
96.2860.7/60.0991
1/9
98.6/52. 7tt.:/5599.9.. 3/95.6
Carpet
73.0/5..5/0.4499
98.5/49.9/51.
97.4/38. 7/43,73333202 2/006
93.
(t..6/999//8899 9/89.3
98.6/42.200 2/4,44944
98.7/57.51577 7/57.79447
98.5/52.9/54
8/946
Textur
Grid
96.5/23.0/28.4/97
63.11/007701.99922
96.8/20.5/27.66 6/88.6
97.0/42.1146.
9/86.8
96. 96.6//6.0/44.1944.0
97.0024.5/30.5/9..
(9.55/554/377 1/V5
Leather
99.3/38.0/45, 1/97.4
98. 08.8/32.//344/966
98.7/28.5/32.00 9/92.7
99.5/71.5/66.5911
98.8/56.
1/62.3/91. 98.8/561162.39911
98.8/33.7/36.6/97
98.9/36.3/22 4/96.9
Tile
95.3/48.5/60.558
91.8/42, 1/50.677844
95,7/60.5/5999/900
93.0/71.0/66.2/877
92. 92.4/5..7/4411 1/997
02.2/41.6/52.998
92.7/44.5/54.777
Wood
95.3/47..851.0000000
93.2/77.244.5/86.7
91.4134
95.977733/113333444
93.344.343.5597.
92.4337.2/22./866 6/866
94.2/44.5/48.0885
Mcan
06.1/48.6/53.8/11
06.8/43.44995/00.7
96.9/45 9/4974499/99788..
93.1/543//0.9/64.8
96.8852.6/55.5000.
97. 2/53.32//533//1.4
97.7/52.6/56.799..2
Table Comparison with SoTA methods on VisA dataset for multi-class anomaly detection with AU-ROC/AP/II metrics.
Category
RD4AD
UniAD
SimpleNet
DeSTSeg
DiAD
HVQ-Traas
Ours
PCB1
962295.5/91.99
91.6/91./86.0 7/
1/86
1/88.
96.7/93.2/87.7
97.8/97.4/95.1
Complex
PCB2
97.9/97.8/94.2
87 8/8777/83.1
92. 3/.44
86.5/85.8/22.
91.4//1.4/84.7
93.4/94.8/88,
97.8/98.5/94.1
structure
PCB3
96.4/96.2/91.0
78.66 78.6/78.6/76.1
89.1/91.1/82.6
93.7/95.1/88 1/87.0
86.2/87.6/774
92.0/87.1/799
96.7/95.1/888 1/87.6
PCB4
99.9/99.9/99.0
8.88//888/4.3.
97.0/7.00/935
97.8/97.8/92.7
99, 99.6/99.5/97.0
99.5/99.0/9.00
100./100//9.00
Macaroni
75.9/61.5/76.8
19.9/79.8/22.7
85.9/82.5/73.1
76.6/69.0/11.0
85.7/85.2/88.8
93.1184.1179.8
97.3/97.5/92.8
Multiple
Macaroni 2
88.3/84.5/83.8
71.6/71.6/69 9
68. 68.975../59.7
68. 08.9/62.1/67 1/67.7
62.5/57. 4/69.6
86.2/84.1/81.5
85. 1/81/99.3779.5
instances
Capsules
82.2/90.4/81.3
55.6/55.67766
87.1/93.0/84.2 84.444
58. 58.2/89.
77.1/83.4/77.5
85.7/89.0/78.8
Candles
92.3/92.9/86.0 94.1/94.0/86.1
84.1/73.3/76.6
94.9/94.8/89.2
92. 8/2.0/////
96. 8/988/9//33
97.4/98.6/93.4
Cashew
92.0/95.8/90.7
8/9.1
88.0/91.30 1/9447
92.0/96. 1/88.1
91.5/9 7/989
94.9/96.8/90.4
93.3//6.4/90.
Single
Chewing gum
94.9/97.5/92.1
26.3/96.2/95.2
96.4/98.2/93.
95.8/98.3/94.7
19.1//9.5/95.9
99.4/99.6/97.5
99.2/99.8/97.5
instance
Fryum
95.3/97.9/91.5
83.088.0085.0
4/.4//3.0/83.3
1/96/
89. 8/95.08878
90.4/94.5/84.9
94. 5/588/
Pipe fryum
97.9/98.9/96.5
94.7/94.7/93.9
5/88/6
94.1/9..1/91.9
96.2/98.1/95
98. 4/999.9.4/94.0
98.9//9.4/97.0
Mean
92.4/92.4/89.6
85.5/85.5/84.4
87.2//8.0/811.8
88.9/89.0/85.2
86, 3/88.
93.2//2../887.6
95.33/66.091.12
15

---

OmiAD: One-Step Adaptive Masked Diffusson Model for Multi-class Anomaly Detection via Adversarial Distillation
Table 7. Comparison with SoTA methods on VisA dataset for multi-class anomaly localization with AU-ROC/AP/FI max/AU-PRO
metrics.
Categary
RD4AD
UniAD
SimpleNet
DeSTSeg
DIAD
IVQ--Trans
Ours
PCBI
99,4/66. 2-1666../62.4/95..
93.3403 S...03../08... 306.1/
99.2/86. 1/7.888666..
95.8/464499.08
0..7499.6/5..8/802
99.446.11/888888 8/77
99.7770.8/66.22 2/93.0
Complex
PCB2
98.00/22.330.0990.3
93,9/04,2199 2/66.
96.6/08.9/18.6/55.
97.3/14.6/28. 2/79.
95.2207.5/16.766
98.0/10.1/18.//88
98.9/16.6/22 2/871
structure
97.9/26.2/5.22933
97.3/13.8/211/770
97.2231.099..1/551
07.3/28.1/33..
96.708.00
8/68,9
98.3/21.1/23.
1/2.111/23.7800.
/9.1/29.7/30.4/57
PCB4
97.8/314/37.0/066
94.9114.7/22.9/722
93.9//3.9/32.966..
95.8/53.053.2//66
97.0/17.627 2/85.0
97.7/21.1/99.88
98..142.00444 1,8664/1166..
Macaroni
99.4002.9/0069999
97.4/03.7/05
7/844
08.9/03.5/08.4992
99.1885 8/13/4/62.44
94.1/10.2/16.76885
99,499.9/199.999
Multiple
Macaromi
99.7/13.2231.897..44
95.2/0099/0443/766
93.2/00.6/033,/00
6/0.7//7.8
98.5806.3/144 4/1.77004
93.66000990228773.
98,5/05.5/11
99.4/088551 5/444444
instances
Capsules
99.41600-46008893.
88,7/03.0077.40 4/4.7
97.1/52.9/55 3/73.7
96,9/33 2/09, 1/76.7
97.3/10.021.0077
99.0/5
99.44/2.7799 9/5///9999////0..
candle
99.1/25.305.8/94.9
98.5/17.6/27.9991
97.6/08.4/16.5/88
96.7/39.9445.88
97.3/12.8/22888555
99.2/20.4/30.6//
99.4/25.7/35. 1/97.1
Cashew
91.7/44.2499.77866
98.6/51.7/58.38877
98. 9166899/6600844
87,9447 6/52, 1/66.3
90.9/53.L/60.900
99.2/58.3/66. 9/89,
97.
97.2/44.3/55.338
Single
Chewing gum
98.7/59. 9/66.7/76.9
98.8/54.9/56. 1/81.3
97.9/26.8/29
0//26.8/99./78.. 8/78.3
98.8/86.9881 018.6/981.0/88... 00668.3
94.7/11 8159.5
08.8/43.7/444 4/81.7
98.8/58.0/55..677
instance
Fryum
97.0447.6/5 1/999
2/335/233..555//3 5/17.7
97.6/58.6/00.1881.
97.7/50.85553//33
97.2/47.7/55 2/877
Pipe fryum
99.1/56 19.1/56.8/58..8 8/5888/955
96.9/50.2/57.7/94 7/915
188.5/65.6/6634411
98, 98.9978.8/7..7/45.9
99.4/727/699 9/89,9
99.4164.6/65 8/93,4
99.2/ 99.2/56.2/60 1/94,5
Meun
08.13380/42.6/911
95.9/21.027.0/75.
0..833..//7.8/81..
96.1/39.6/433 4/33//7/4
96.0/26. 1/33.//55.
98.7/35.0039.6666
98.99/40.4444.11892
Table 8. Comparison with SoTA methods on MPDD dataset for multi-clat class anomaly detection with AU AU-RO//APIFI max metrics.
Normal Indices
RD4AD
UniAD
SimpleNet
DeSTSeg
DIAD
HVQ-Trans
Ours
Bracket Black
81.1/86.5/83.6
92.7/94.2/87.9
78.7/85.3/80.4
82.3/87 9/8112 .22
81.7/87.0/84.6
/0.2/94.5/89.4
92.8/95.4/90.9
Bracket Brown
84.0/85.3/91.1 94.0/92.8/91.9
92.4/95.3/9335
96.9/97.2/98.1
/6.4/87.3/83.22
89.7/88.5/89.3
94.9/94.2/90.3
Bracket White
81.1/79.8/77.1 78.6/81 (.7750
18.4//1.4/83.0
94.3/5..8/9.55
72.6/74.7/75.0
78.0/78.4/7 4/75.0
$7.4/92.7/855.
Connector
59.8/47.8/54.9
90.7/87.2/86.7
99.3/98.5/96.6
97.1/94.5/87.5
94.3/87.1/84.8
89.5/80. 1/80.0
95.7/96.6/90..3
Metal Plate
100//100/1100.
63.4/81.1/86.6
100/1100/100.
100./100/100.
65.3/83.6/85.5
97.3/99.9/98.8
99.7/100/100.
Tubes
98.6/99.5/97.8
73.6/85.7/82.6
84.6/94.1/84 1/84.6
87.4/14.9/85.0
57.5/72.6/81.7
74.3/87.3/82.6
91.4/94.1/88.
Mean
84.1/83.2/84.1
82.2/87.1/85.1
90.6/94. 1/89.7
93.0/95.1/90.
1/90.6
74.6/82.1/82.5
86.5/88.1/855
93.7/95.5/90.99
Table 9. Comparison with SoTA methods on MPDD dataset for multi-class anomaly localization with BAAB:///AAPPILma//AAUPPPP
metrics.
Normal Indices
RD4AD
UniAD
SimpleNet
DeSTSeg
DiAD
HVQ-TTran
Ours
Bracket Black
97.4/09.5/19.992
94.4/00./01 9/82.0 0
94.9003.6000
1/89.3
95. 13.19.///1..//99
91.5/01.1/02.997
1//0111/02.7/8/
Bracket Brown 97.3//33.0/334494
98.7/34.3/41.0m .0990.9
94,9088 8/17.//170000 0177./87.4
83.9/05.4/1..5/22
95.6088. 1/16.7/84.6
98.2/32.3/36.48866
98.9942.8//44999333
Bracket White
98.3/2.6/6.499222
94.8/0.8/0337777
6/86.4 97,8N02.2AU5
05.8/446//1.3363..
90.800.5/01..6 6/77.4
94.1/00.6/2..66 6/79.8
98.3007.3/8.8890..
Connector
97.4/12.5/20.6944 97.6/18.6/26 1/91.4
98.9/56.0/55.2/96
96.2/30.0735.5/61..
98. 08.1/25.1/30.7993..
97.9/18.8/29.7999
98.9/32.3/441 1/22///66
Metal Plate
99..3/95.9/89.79944.
333350.4/63.//1
98,2/88 9/81 1.88881
88.77944.88888/74
93. 01.8/54.9/65.70 7/79
96.6/73.7774.7766.
98.5/87.4/83.889
Tubes 99.1177.8/33.0/6666
91.7/08.3/14.0077
97.9/42.4/46.1992.
94.8/55.2/54.7/85
88. 1.005.909.56600
98.7/52.3/56.66
Mean
98.1/35.2/38.7/95.
95.1/18.9/25.098
97,
94.1/33.2/37.6/99
23.0/15.9/11./788.8
96.7/27.6/31.44
98.6/37.6/453 3/./337.6/42.3/94.00
16

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Table 10, Comparison with SoTA methods on Real-IAD datasct for multi-class anomaly detectio with AU-ROC/AP/FI max metrics.
Normal Indices
RD4AD
UniAD
SimpleNet
DeSTSeg
DiAD
IIVQ-Trans
Ours
audiojack
16.2/63.2/60.8
81.4/76.6/64.9
58.4/44.2/50.9
$1.1/72.6/64.5
76.5/54.3/65.7
81.0/80.1/74.5
84.5/82.0/77.8
bottlecap
89.5/86.3/81.0
92.5/91.7/81..7
54.1/67../
78.1/74.6/68.1
91.6/94.0/87.9
89.0/87.6/77.3
93.7/92.7/85.2
buttonbattery
73.3/78.9/76.1
75.9/81.6/76.3
52.5/60.5/22.4
86.7/89.2/83.5
80.5/7113/70.6
82.2/88.5/78.9
84.9/90.1/80.1
endeap
79.8/84.0/77.8
80.9/86.1/78.0
51.6/60.8/72.9
17.9/81.1/7..1
85.1/83.4/84.8
79.7/85.2/79.4
79.4/80.4/80
eraser
90.0/88.7/79.7
90.3/89.2/80.22
46.4/39. 1/55.8
84.6/82.9/71.
80.0/80.0/77.3
89.2/89.7/81
89.5/90.2/84.22
firehood
78.3/70.1/64.5
80.6/74.8/66.4
9/.55/4
81.7/72.4/67.7
83.3/81.7/80.5
93.1/85.4//8 1
94.1/87.6683.3
mint
65.8/63.1/64.8
67.0/66.6/64.6
52.4/50.3/63.7
58.4/55.8/63.7
76.7/76.7/76.0
63.0/75.7/75.
66.0/77.7/75.0
mounts
88.6/79.9/74.8
87 17.6/77.377..2
18.7/48.1/2244
74.7/56.5/63.1
92.7/88.2/81. 55.3/74.5/82.55
95.2/92.3/85.9
peb
79.5/85.8/79.7
81.0/88.2/79.1
54.5/66.0/75.5
82.0/88. 7/79.6
06.0/85.1/85.4
86. 86.6/92.4782.7
92.2/95.7/87.3
phonebattery
87.5/83.3/77.1
83.6/80.071.6
51.6/43.8/58.
83.3/81
82.3/77.7/55.9
88. 08.0/89.5780.
92.6/93.0/84.5
plasticnut
80.3/68.0/64.4
80.0/69.2/63.7
39.2/40.3/51.8
83. 83.1/75.4/66.5
71.958.2//65
76.2/57.3/53.
84.2/67.5/62.2
plasticplug
81.9/74.3/68.8
81.4/75.9/67.6
48.2/38.4/54.6
71.7/63.1/60.
88. 7/89 2/90.9
92.2/92.1/844
94.1/93.2/86.6
porcelaindoll
86.3/76.3/71.5 1.5
85.1/75.2/69.3
66.3/54.5/52.1
78.7/66.2/64.33
72.6/66.8/655 2
84.7/81
86. 86.1/84.5/76.3
regulator
66.9/48.8/47.
56.9/41.5/44.5
50.5/29.0/43.9
79.2/63.5/56.9
72.1/71.478.22
69.7/27.3/37
39.5/6993/67...
rolledstripbase
97.5/98.7/94.7
98.7/99.3/96.5
59.0/75.7/7.88
96.5/98.2/99
68 0..4555.900 9/56.8
99.3/99.7/98.
99.8/99.9/98.9
simcardset
91.6/91.8/84.8
89.7/90.3/83.2
63. 13.1/69.777..
95.5/96.2/89
72.6/53. 7/61.5
97.2/98.1/92.88
95.9/97.3/91.66
switch
84.3/87.2/77.9
85.5/88.6/78.4
62.2/66.8/66 8/68.6
90. 89.1//928/83.1
73.4/49.4/66 4/612
87.5/93. 1/85.00
94.8/96.9/91.5
tape
96.0/95.1/8766
97.2/96.2/89.4
49.9/41.1/54.5
94.5/93.4/855
73.9/57.8/66.
97.6/97.3/92.8
98.0/98.0/93.7
terminalblock
89.4/89.7/83.1
87.5/89.1/8111
59.8/64.7/68.8
83. 1/86..6./666.6
62. 1/.16/6.//7.88
95.0/96.3/90.5
98.4/99.0/96.1
toothbrush
82.0/83.8/77.2
78.4/80. 1/75.6
65.9/70.0/70.1
83.7/85.3/79.0
91.2/93.7/90.9
87.0/92.6/84.4
90.7/94.8/86.9
toy
69.4/74.2/75.9
68 08.4/75.1/74.8
47.8/64.473.44
70.3/74.8/75.4
66.2/57.3/59.8
14.6382.1/83.1
89.5/93.2/87.6
toybrick
77.0/71.1/66. 63.6/56.1/59.0
58.3/49.7/58.2
73.2/68.7/63.3
68.4/45.3/55.9
82.5/83.7/72.6
85.0/85.5/74.8
transistorl
91.0/94.0/85.11
93.7/95.9/88..
62.2/69.2/72.1
90.2/92.1/84.6
73.1/63.1/66
93.8/97.5/91.8
96.2/98.3/92.9
ublock
89.5/85.0/74.2
88. 8/8.22/75.5
62.4/48.4/51.5
80. 80.1/73.9/64.
75.2/68 4/67.9
88.5/81.1/72.9
90.1/83.4/74.5
usb
84.9/84.3/75.1
78.7/79.4/69,
37.6//5.3/62.9
87.8/88.0 3/788888/78..
18.9//7.4//5.
92.0/91. 2/85.3
95.5/94.1/90.2
usbadaptor
71.1/61.4/62.2
76.8/71.3/64/
47.5/38.4/56.1
80. 1/7777
76.9/60.2/67 2/67.2
77.9/75.00 00/69.3
82.6/82.4/72.6
vepill
1/800.333/72.4
87. 87.1/84.0774.7
59.0/48. 7/56.4
03.8/81.5/69
64. 1/40.4/66..
89.8/88.8/8
8/8116
91.4/90.7/82.8
woodenbeads
81.2/78.970.99
78.4/77.2/67.8
55. 15.1/52.060.22
82.4/78.573300
62. 4/56,
79.7/84.9/76.6
77.0/83.5/74.9
wondstick
76.9/61.2/58.1
80.8/72.6/63.6
58.2/35.6/451
80,4/69.
74. 166...06/62
92.3/65.9/66
zipper
95.3/97.2/91..2
98.2/98.9/95.3
77.2/86.777.66
96.9/98. 1/93.5
86.0/87.0/84.00
08.8/99.7/97.3
99.8/99.9/99.0
Mean
82.4/79.0/73.9
83.0/80.9/74.3
47.2/53.4/61.5
82.3/79.2/73.2
75.6/66.4/69
86.6/84.9/9944
90.1/88.6/82.8
17

---

OmiAD: One-Step Adaptive Masked Diffusson Model for Multi-class Anomaly Detection via Adversarial Distillation
Table 11, Comparison with SoTA methods on Real-TAD datasct for multi-class anomaly localization with TAARRO//APFILaaaAAAAAAA
metrics.
Normal Indices
RD4AD
UniAD
NimpleNet
DeSTSeg
DIAD
HVQ-Trans
Ours
audiojack
96.6/12.8/22. 1/79.6
97.6/20.031.0086
2..4000.9/448/388
95.5/25.4/319//5
91. 91.6/01.00339900
98.5/31.9/41 .V88.0
99.044..1/51.499.
bottlcap
99.5/18.9/29.999
99.5/19.4/29.69999
85.3/02.3/05. 7/451
94.5/25.//31.1/25.5
94.6/04.9/1444733
98.4/13.6/22.888 8/9000
99.4/23.4/29.00
buttonbaltery
97.6/33.8/37.8886
8/86.55
96.7/28.5/3444/77.
75.99033./06.6/400
98.3963.9/60444669999
14.1/014/05..0
99.0/58. 1/59.2/85.3
99,2/61.0660.4//9
99.2/61
0//604//9.99
endcap
96.7/12.5/22.5588 95.8008.8/17.4/855
13.10005//0.8/2555
89.6/14.4/22.7/229.
81.3902.006.991 (9000999688922
25.6/06.0/14.55544
97.2/09 2/119999//44491....
eraser
01.5730.8/36.7/0
99.32244470.9/94.
80.6/02.7/07. 1/42.8
25.8/52.7/53./44.7
91. 197.77715..//67
99.2/31,6/8844999
99.3/39. 99..33995/444 5/44,
lirehood
05.9/27.7/35.2/88
70.5000.302..//25.
2/25,2
97.3/27.1/35.3/344 .334,7
8/.3//3///99.00 2/66.7
98.9/35.0/42.77 7/1.5.0/42..9933..
98../43.3/488666 6/946
mint
15.0/111.7/23.0072..3
94,4/07.7/18.11 1/62.3
19.9/0009/033.6444
84.1/10./22.4100 9
91. 1/0.7/11111..0 .6/64.2
94.8/17
96.6/29.6/38.777 4
mounts
99.3/30.6/37. 1/94,9
99.4728.0332.800
8/955.
80.5/02.2/06. 8/46.
94.2/70.0/44.2443.
84.3/00.4/01. 1148.88
99.6/30.200
99.7/39.2/40.00998
peb
97.5/15. 8/24.3/88.3
97.0/18.5/28
1/81.6
78.001
3/04.3/41.3
97.2/37, 1/2/3,,/4404444 4/488//8888
02.0003.7/07 A/66./66.55
97.7/28. 7/37, 2/84.2/84.
99..0448.8/51.2/92
phonebattery
77.3/22.6/31.722
85.5//11.221
6/88.5
43.4/00.1/000
1.8
79.5/25.6/33.88
5
96. 8/08//5.3/1 L/855
98.0/24. 1/31 .5/87.3
99..244.11444594.00
plasticnut
1../221.1/29.6/9
98.4/20.6/221 1/88.9
77. 4/00 11..//00003..66 6/41.6//115
266.5/44.8/45.7/38. 4
81. 1/00 4/03 4/38. 6
9
9%. 3/.33/27. 2/3 1/90.
plastioplug
99. 99.1/20.5/28.44 4/94.9
28.6//1..4/26.1/99 1/90.3
28.6//0.7/01..1 9/38.8
91.9/20, 1/27.3/21
92.9/08.7/11 5.66..6
99.2/23..0
6/29, 7/95
99.5/37.1144.33977
porcelaindoll
09922/2..8344.6999
08.7711.112245599.
13.13/99//40.//44..
93. 10.11/114//4448 8/70.4
97.9/11.4/1 6/89.9
98. 8/18 3/26.3/9388
segulator
98.0077 8/16, 1/88.6
95.5/09. 1/777
76.6/00.1000
6/0.6888..
88.8/18../22
113.9/92...1111 6/17.5
84.2X00.4/01 .5/44.4
98.0/07.0/
2/89.7
99.7/37.4145 4//42.2/9888
rolledstripbase
99.7/31 1/77311///3.000 9/98.4 4/39.9/9884
2/97.8 8
80,5/01 7005 1/52.1
99.2/48.7/50. 1/501/55
87.7X00.6/03 2/63 4
98.9/10 1/25 9/96.2
99.7/32.4/44 2/2.24/422///9...
simcardset
18.5//4.22/44.2/00
97.931.6999
8/3.888/8/8800 8/85.0
71.006.88 8/14 8/10.3/30.8
99. D0.166.5/62.1/733 1/7.3/3..////
89.9/01.7/05
8/60.4
99. 1/39//9..222 7/43 2/93.9
99.3/48 9/50, 1/95.4
switch
94.4/18. 9/26.//0.99
98.1/33.8/400 013338840.6/990
71.7703.7/09
97.4/57.6/55 6/44.7
90.5/01.4/05 4..00.4/00.//44.22
9/55/5 2/55.2911.5
99.5/63.6/63,44
tape
99.7442.4447.8898
99.7/29.2/36 9/97.5
77.5/01.
17..3/012/03..9 2/033//441..44
99.066.7/57.6/448
77700.44002.74477
99.6/20.5/29. 8/998.3
99,7/29. 8/36.
terminalhlock
99.5/27.4/35..86
19.2/23.1/30../94.
87. 87.0000.8033.66 6/54.8
96.6/40.6/44,
1/344/
75.5/00. 1/01
10000.//111/38.. 1/38.5
99.6/35.5/79
99 48. 48.5 1. .0/98.9
foothbrush
96.9/26.1/34./888 2/38.7
95.7/16.4/25 3/84.3
84,7/07.2/1 2010722/114.0 2/15.8/52.6
94.3/30.037
82.0/00.9/06.667
98.4/37.2/44.44
98.8: 8/47 9/9,8
toy
95,2/05. 1/128/8
93.4/04.6/12.44770
$7.7700.1/00.4/73
86.308 1/1.999666
82. 12.11.0.1/04.2555
94.2/05.4/100 22100..4/10.//2.22
97.8/19 97.8819.8/25.5/90.
8/25.5/99.8
toyhrick
96.4/16.0V24466733
6/
2/..11 1. 3/56..
94.7/24.6/308844
93.5/03. 1/08.1/66.44
97.5/22. 1/2/8/9/77.388..
A..64444.//487//8...
transistorl
99.1/29.6/38 5/951
98.9/25.6 255.6663../944.. 2/94,3
71.7/05.1/11
3/355,3
97.3/44.8/4445/45 4
18.6607.2/115.36 I
98. 1/27, 1/31 8/9 /4
99.1/40.2/45 9/469.//436//559
ublock
99.6/40.5/44
2/96.9 9
99.3/22.3/22
62946/9443
76, (104.8/12 8/12.2/122/3
96.9/57.1/58.777
5
18.8//0.6/05
09.2/19.0/27. 1/94.
99. 99.5//4.2/355 6/97.8
usb
18.1/26.4/35.22 1.0
97.9/20.6/31
3/8553
98.4/42.2/47.7755 7/57.
78.0/01.0033.11
1023.1228.0
99.2/29.0/38. 1/93.6
99.6/443.4/48../999
ushadaptor
94,5/09.8 8/17.9/73.1
96.6/10.5/19
0/78.4
67,9/00.200 2/112///8//99
94.9/25.5/34.///6
04.009..3/066677
94.5/11.8/21 1./3
96.8/18. 1/27.3/84.2
vepill
98.3/43.1/448 1/4.6/88////888.77
99.1/40,7/44 71437773333 1.913
68.2/01. 1/03.3/////
97. 97.1/4.77/2.288 3/42.3
90.2/01.3/55 2/6.8
P9.1/61.9/63.3V .
99.0/58. 01588.4/61.24 1./92.6
woodenbeuds
98.0/27.1/32 7/8577
97.6/16.5/23
6/84.6
68. 102..4//066.
94.7/38.9/42.9939.
96.6/21.5/30.0077 7/45.6
.2
97. V7.3/26.2/31.4488 2/31.//8/.
woodstick
97.8/30.7/38.
4/85.0
94.0/36.2/44.3/77
76. 1/01 1/06 0/3.00/2..0
97 97.9960.V60.0051..
90.9/02 6/08 0/60.7
97.
17.88/4733/00000 3/9
98.4/48. 5/51 1,9/3.11
zipper
99.1/44.7/50.2/6..
058.432..5/36.119 1/95.1
89.9/23.3/11 2/555,5
98.2/35.339..0785.
90.2/12.5/18.88555
98.5/37.3/43.6694
99.0/43.8/49.7999
Mean
97.3/2..032../89.6
1/292/6.79
75.7002.8065//300
94.63779944
88.0092.907./558.
08.00/7.6/3444//8
98.9937..7/2../9311
H. Quantitative Analysis of False Positive Rates on Benchmark Datasets:
To further demonstrate the effectiveness of OmiAD, we calculated the False Positive Rate (FPR) for OmiAD, HVQ-Trrans UniAD, and DiAD across four benchmark datasets: MVTee-ADD, VisA, MPDD, and Real-IAD, as shown in Table 12. In our experiments, the threshold for calculating the FPR was set based the number of anomaly samples. Specifically, we ranked the samples by their anomaly scores and set the threshold to the score at the position corresponding to the number of anomaly samples. This method ensures that false positives are calculated consistently across the different models.
The results consistently show that OmiAD achieves a significantly lower FPR than its counterparts, highlighting its superior anomaly detection capabilities.
For instance, OmiAD achieves an FPR of 2.50% MVTec-AD, outperforming HVQ-Trans (3.54%), UniAD (6.12%), and DiAD (8.7.%). Similar improvements are observed other datasets, with OmiAD achieving 9.50% on VisA, 10.71% % on MPDD, and 18.22% on Real-IAD. These substantial reductions in FPR demonstrate OmiAD's ability to minimize false alarms effectively while maintaining high anomaly detection accuracy.
This performance advantage stems from OmiAD's global modeling strategy, which leverages the adaptive masking (AM) technique to mitigate shortcut learning by reducing reliance on spurious correlations or local patterns- patterns-common common sources of false positives. The adaptive masking dynamically guides the model focus on global contextual information, improving anomaly reconstruction and reducing false alarms. Such capability is critical in real-world industrial applications, where a low FPR ensures model reliability and minimizes unnecessary interventions caused by false alarms.
I. More Ablation Studies:
L.I. Ablation Study on Initial Time Step Eiit:
We conduct an ablation study on the MVTec-AD dataset to assess the effect of the initial diffusion step fnit on the performance of OmiAD. As shown in Table 13, the model maintains stable and high performance across a broad range of
18

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Table 12. False Positive Rate (FPR) four datasets. The values in percentages (%)
Dataset
HVQ-Trans
UniAD
DiAD
Ours
MVTec-AD
3.54
6.12
8.70
2.50
VisA
14.58
14.50
23.67
9.50
MPDD
19.22
19.52
23.07
10.71
Real-IAD
22.67
24.00
34.94
18.22
lint values (from 800 to 960). However, when liiit is set to 1000, a noticeable performance degradation occurs. This drop is attributed to the excessive noise introduced at this step, which hinders effective reconstruction and impairs accurate anomaly localization. Based on our findings, we recommend setting fint = 960, as achieves the best performance at both the image and pixel levels, striking balance between reconstruction quality and anomaly detection accuracy.
Table 13, Ablation study results on different initial diffusion steps Linit-
linit
600
700
800
940
960
980
1000
Image AUROC
97.7
98.1
98.3
98.7
98.8
95.9
73.5
Pixel AUROC
96.9
97.1
97.4
97.7
97.7
97.3
80.0
1.2. Ablation Study on Architecture Robustness in Diffusion Models:
To assess the architectural flexibility of our approach, we conduct experiments on the MVTec-AD dataset, evaluating OmiAD with different architectures for the diffusion model. Specifically, we replace the default U-Net (Ronneberger et al., 2015) with DiT (Peebles & Xie, 2023) and U-ViT (Bao et al., 2023) as the backbone for the diffusion model. As shown in Table 14, OmiAD consistently demonstrates strong and stable performance across all three architectures, with minimal variation in both image-level and pixel-level AUROC metrics. These results underscore the robustness of our method, highlighting its ability to generalize effectively across different architectures used in the diffusion model.
Table 14. Ablation study the diffusion model architccture.
Model
DiT
U-VIT
U-Net
Image AUROC
98.2
98.4
98.8
Pixel AUROC
97.5
97.4
97.7
L.3. Ablation Study on Backbone Feature Extractor:
We conduct ablation experiments on the MVTec-AD dataset to evaluate the impact of different feature extractors on OmiAD's performance. Specifically, we replace the default EfficientNet (Tan & Le, 2019) backbone with ResNet (He et al., 2016) variants of increasing depth: ResNet-18, ResNet-34, ResNet-50, and ResNet-101. For the ResNet-based models, we set the initial diffusion step fiit to 400, in contrast to tiit to 960 for the EfficientNet backbone. As reported in Table 15, all models demonstrate strong performance, highlighting the robustness of our framework across different feature extractors. These results confirm that while OmiAD is flexible backbone selection, EfficientNet achieves the best balance between semantic richness and localization accuracy.
J. More Qualitative Results:
To further enhance the comparative analysis between OmiAD and existing methodologies, we present comprehensive visual exploration of anomaly detection results involving OmiAD, HVQ-Trans, DiAD, and UniAD, as shown in Fig. 4 for MVTec-AD, Fig. 5 for VisA, Fig. 6 for MPDD, Fig. 7 and Fig. 8 for Real-IAD. Benefiting from the global modeling capability of OmiAD's 's masking strategy, the model effectively reduces shortcut learning, thereby achieving more accurate anomaly localization and significantly reducing false positives.
19

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Table 15. Ablation study the impact of different feature extractors.
Backbone
ResNet-18
ResNet-34
ResNet-50
ResNet-101
EfficientNet
Image AUROC
97.3
97.2
95.3
94.2
98.8
Pixel AUROC
97.3
97.5
97.3
97.3
97.7
Additionally, we provide detailed visualizations of OmiAD's anomaly detection results across these datasets. The results, showcased in Fig. 9 for MVTec-AD, Fig. 10 for VisA, Fig. 11 for MPDD, and Fig. 12 and Fig. 13 for Real-IAD, highlight the outstanding performance OmiAD. these visualizations, OmiAD consistently demonstrates the ability to successfully transform anomalous samples into their corresponding normal counterparts. These results not only reflect the model's accuracy in identifying and localizing anomalous regions but also showcase its robustness in handling diverse types of anomalies, including object anomalies and texture damages.
By precisely capturing reconstruction differences, OmiAD effectively identifies and highlights regions that deviate from the normal distribution. These visual insights underscore the model's capability to accurately discern abnormal regions, further validating OmiAD as powerful and versatile solution for anomaly detection and localization across wide range of datasets.
20

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Normal
Anormaly
Ours
HVQ-Trans
DiAD
UniAD
GT
Ours
HVQ-Trams
DiAD
UniA
BOOR
KOOK
Figure 4. Qualitative results for anomaly localization on MVTec-AD. From left to right: normal sample as the reference, anomaly, our reconstruction, HVQ-Trans reconstruction, DiAD reconstruction, UniAD reconstruction, ground-truth, our predicted anomaly map, HVQ-Traas predicted anomaly map, DiAD predicted anomaly map and UniAD predicted anomaly map.
21

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Normal
Anormaly
Ours
HVQ-Trans
DIAD
UniA
GT
Ours
HVQ-Trans
DIAD
UniA
2
Figure 5. Qualitative results for anomaly localization on VisA. From left to right: normal sample as the reference, anomaly, our reconstruction, HVQ-Trans reconstruction, DiAD reconstruction, UniAD reconstruction, ground-truth, truth, our predicted anomaly map. HVQ-Trans Trans predicted anomaly map. DiAD predicted anomaly map and UniAD predicted anomaly map.
22

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Normal
Anormaly
Ours
HVQ-Trans
DiAD
UniA
GT
Ours
HVQ-Trans
DiAD
UniA
19g
19
Figure 6. Qualitative results for anomaly localization on MPDD. From left to right: normal sample as the reference, anomaly, our reconstruction, HVQ-Traas reconstruction, DiAD reconstruction. UniAD reconstruction, ground-truthh, our predicted anomaly map, HIQQ-Tram predicted anomaly map, DiAD predicted anomaly map and UniAD predicted anomaly map.
23

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Normal
Anormaly
Ours
HVQ-Trans
DIAD
UniAD
Ours
HVQ-Irans
DIAD
UniA
Figure Qualitative results for anomaly localization on Real-IAD(Part I). From left to right: normal sample as reference, anomaly, reconstruction, HVQ--Trane reconstruction, DiAD reconstruction, UniAD reconstruction, ground-truth, our predicted anomaly map. HVQ-Trans predicted anomaly map, DiAD predicted anomaly map and UniAD predicted anomaly map.
24

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Normal
Anormaly
Ours
HVQ-Trans
DIAD
UniAD
Ours
HVQ-Irans
DIAD
UniAD
[
200300
Figure Qualitative results for anomaly localization on Real-IAD(Part 2). From left to right: normal sample as reference, anomaly, our reconstruction, HVQ-Trans reconstruction, DiAD reconstruction, UniAD reconstruction, ground-truth, our predicted anomaly map, HVQ-Trans predicted anomaly map, DiAD predicted anomaly map and UniAD predicted anomaly map.
25

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Normal
Anormaly
Recon
GT
Pred
Normal
Anormaly
Recon
GT
500
500
NO99 NOOK
NORD
WOOD
HORD
Figure 9. Qualitative results for anomaly localization on MVTec-AD, From left to right: normal sample as the reference, anomaly, our reconstruction, ground-truth, our predicted anomaly map.
26

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Normal
Anormaly
Recon
GT
Pred
Normal
Anormaly
Recon
GT
Pred
3
3
7
>
)
3
>
Figure 10. Qualitative results for anomaly localization VisA. From left right: normal sample the reference, anomaly, reconstruction, ground-truth, and our predicted anomaly map.
27

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Normal
Anormaly
Recon
GT
Pred
Normal
Anormaly
Recon
GT
Pred
Figure 11. Qualitative results for anomaly localization on MPDD. From left right: normal sample as the reference, anomaly, reconstruction, ground-truth, our predicted anomaly map.
28

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Normal
Anormaly
Recon
GT
Pred
Normal
Anormaly
Recon
Figure 12. Qualitative results for anomaly localization Real-IAD(Part 1). From left right: normal sample the reference, anomaly, our reconstruction, ground-truth, and our predicted anomaly map.
29

---

OmiAD: One-Step Adaptive Masked Diffusion Model for Multi-class Anomaly Detection via Adversarial Distillation
Normal
Anormaly
Recon
GT
Pred
Normal
Anormaly
Recon
Pred
200089
000000
200000
000000
Figure 13, Qualitative results for anomaly localization on Real-IAD(Part 2). From left to right: normal sample as the reference, anomaly, reconstruction, ground-truth, and predicted anomaly map.
30


Reviews:
[{"review_id": "NjjcIQbDE3", "reviewer": "Reviewer_QjD4", "summary": "This paper presents OmiAD, a one-step adaptive masked diffusion model designed for multi-class anomaly detection with enhanced inference efficiency.\n\n## Paper contributions:\n- The paper introduces an innovative Adaptive Masking Diffusion Model (AMDM) strategy that dynamically adjusts masking patterns based on noise levels. AMDM is proposed to strengthen global context modeling and avoid shortcut reconstruction for anomaly pixels.\n- The paper utilizes Adversarial Score Distillation (ASD) to compress multi-step diffusion into single-step inference for test-time efficiency.\n- The experimental results show the proposed OmiAD achieves a speed-up over diffusion-based and transformer-based methods on anomaly detection benchmarks (MVTecAD, VisA, MPDD, Real-IAD).", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We greatly appreciate your thorough review of our paper. Your valuable feedback and constructive suggestions have provided us with a clearer direction for improvement.\n\n**Q1: Inference stage and Anomaly Score Computation**\n\nA1: In the inference stage, we process both normal and anomalous data. The methodology for generating anomaly score maps follows established approaches, such as those outlined in UniAD[1] and HVQ-Trans[2]. The pseudocode below outlines the process for the inference stage, including the generation of anomaly score maps:\n1. **Input**:  $img$: Original input image, $g_θ$: Trained one-step generator, $EfficientNet$: Feature extractor, $t_{init}$: Initial timestep.\n2. **Output**: S: Pixel-wise anomaly score map \n3. **Procedure**:\n   1. **Feature Extraction**: $x_0=EfficientNet(img)$\n   2. **Noising**: $x_t=\\sqrt{\\bar\\alpha_t} \\cdot x_0+\\sqrt{1 - \\bar\\alpha_t}\\cdot\\epsilon,\\quad t=t_{\\text{init}},  \\epsilon\\sim\\mathcal{N}(0, I)$\n   3. **One step Reconstruction**: $\\hat{{x}}_0=g_θ(x_t)$\n   4. **Anomaly Score Computation**: $S=\\|x_0-\\hat{{x}}_0\\|_2^2$\n\n**Q2: Justification for estimating $x_0$ using masked features $x_m^t$**\n\nA2: Anomaly detection requires leveraging global information to reconstruct the anomalous part into the normal modality. We use Equation (10) to predict $x_0$, and apply Equation (11) as a constraint. This formulation allows $\\epsilon_\\theta$ to compensate for the anomalous part and generate the normal part. We conducted experiments where we replaced $x_m^t$ with $x^t$ in Equation (10). The resulting performance, with Image/Pixel AUROC scores of 90.1/92.9, is inferior to that of AMDM, which achieved 98.4/97.5, thereby further validating our conclusions. In addition, some works, such as DiffMAE[3] and MaskDiT[4], utilize unmasked regions to predict $\\hat{{x}}_0$\n\n**Q3: Fixed Mask Strategy**\n\nA3: Unlike A-Mask, where the mask probability varies with each time step, the mask probability in F-Mask remains constant. We set four different mask probabilities [0.1,0.2,0.3,0.4] and conducted experiments, selecting the best-performing combination as the F-Mask strategy for comparison.\n\n**Q4: More ablation study for $p_{min}$, $p_{max}$ and $t_{init}$**\n\nA4: We fixed $p_{min}$=0.1, with varying $p_{max}$, AMDM performance:\n|$p_{max}$|0.3|0.4|0.5|\n|-|-|-|-|\n|Image AUROC|98.1|98.4|98.2|\n|Pixel AUROC|97.4|97.5|97.1|\n\nWe fixed $p_{max}$=0.4, with varying $p_{min}$, AMDM performance:\n|$p_{min}$|0|0.1|0.2|\n|-|-|-|-|\n|Image AUROC|98.2|98.4|98.1|\n|Pixel AUROC|97.5|97.5|97.3|\n\nThe results show that AMDM maintains stable and strong performance across different $p_{\\text{min}}$ and $p_{\\text{max}}$ settings. The best performance is observed when $p_{\\text{min}}=0.1$ and $p_{\\text{max}}=0.4$.\n\n**Ablation study for $t_{init}$**\n\n We conducted ablation experiments on OmiAD at different $t_{init}$. The experimental results show that the model maintains performance robustness within a wide range of initial time steps (800 to 960). However, when $t_{init}$ = 1000, performance drops significantly due to the noisy input resembling pure noise, which hinders image recovery and reduces anomaly detection ability. We recommend using tinit = 960, as it provides optimal performance at both image and pixel levels.\n| $t_{init}$ |600|700|800|940|960|980|1000|\n|-|-|-|-|-|-|-|-|\n|Image AUROC|97.7|98.1|98.3|98.7|98.8|95.9|73.5|\n|Pixel AUROC|96.9|97.1|97.4|97.7|97.7|97.3|80.0|\n\n**Q5: Handling Large Anomalies**\n\nA5:Thanks to its multi-step generation process and global modeling capability, AMDM is capable of progressively reconstructing missing regions. We visualized AMDM's inference process on samples with missing transistors: before step 860, the model focuses on recovering the missing component, while after step 860, it shifts attention to refining fine-grained image details.\n\nSince OmiAD is distilled from AMDM, it inherits this reconstruction ability and achieves normal restoration from anomalous inputs in a single step.\n\nFor pure white or pure black images, where no valid semantic information is available, the model produces meaningless outputs.\n\n**Q6: Essential References Not Discussed**\n\nA6:Thank you for the suggestion. We understand the importance of citing classical anomaly detection methods and will include references to SPADE, Padim, Cflow-AD, and other diffusion-based AD methods in the revised version of the paper.\n\nWe also release our single-class anomaly detection results as a public benchmark. For detailed performance, please refer to **Reviewer 96ub, Question 3.**\n\n**Due to character limitations, we would be happy to discuss and address any remaining questions during the discussion phase.**\n\n[1]You, Z, et al. A unified model for multi-class anomaly detection.\n\n[2]Lu, R, et al. Hierarchical vector quantized transformer for multi-class unsupervised anomaly detection.\n\n[3]Wei C, et al. Diffusion models as masked autoencoders.\n\n[4]Zheng H, et al. Fast training of diffusion models with masked transformers.", "claims_and_evidence": "- Details of F-Mask and effectiveness of A-Mask: In Table 3, the authors conduct an ablation study for F-Mask (Fixed Mask) and A-Mask (Adaptive Mask)  to demonstrate the effectiveness of A-Mask. However, there is no introduction to the fixed mask strategy in the methodology section (3.2). How is the mask fixed? Is it fixed over the diffusion timesteps?  What is the choice of probability $p(t)$ for F-Mask?  Besides, the improvement from A-Mask to F-Mask seems incremental.", "methods_and_evaluation_criteria": "The paper conducts extensive experiments on MVTecAD, VisA, MPDD, Real-IAD. Well-established metrics like Image-level & pixel-level AUROC, F1 max, and AUPRO are used for evaluation.", "theoretical_claims": "I am concerned about the theoretical correctness of the diffusion process since the authors perform two operations i) Gaussian noises and ii) Masking to the features, see eq.(10).  The reconstruction of feature $x_0$ seems okay in the one-step generator, but it is not clear how the diffusion process is affected for the teacher diffusion model(AMDM) training. Especially for eq.(10), why $x_0$ can be estimated by masked features $x_m^t$ with noises? I hope the authors can provide a detailed explanation.", "experimental_designs_or_analyses": "The paper lacks a discussion on some important hyper-parameter tunning, such as the choice of $p_{min}, p_{max}$ for Adaptive Mask, the initial timestep $t_{init}$ for one-step generator. Are they sensitive to different types of anomalies?", "relation_to_broader_scientific_literature": "It addresses key limitations of prior diffusion-based works, such as multi-class AD, slow inference speed, and shortcut learning.\nIt lacks comparisons with some classical AD methods, see the \"Essential References Not Discussed\" section.", "essential_references_not_discussed": "I understand the paper focuses on multi-class AD, but I recommend the authors cite some classical anomaly detection papers: i) training-free methods: SPADE [Niv Cohen, etc], Padim[Thomas Defard, etc], ii) flow-based methods: Cflow-AD[ Denis Gudovskiy], and iii) some diffusion-based AD methods.\nParticularly, the training-free method Padim is efficient(>20 fps) and can be directly applied to multi-class cases.", "other_strengths_and_weaknesses": "- The paper does not distinguish between the training stage and the inference stage. \n- The writing of the adversarial diffusion distillation part is confusing and not friendly to readers who are not familiar with diffusion distillation.", "other_comments_or_suggestions": "Null", "questions_for_authors": "In summary, the most important questions:\n1. Computation of the anomaly score\n2. Eq.(10), why $x_0$ can be estimated by the masked features $x_m^t$? \n3. The paper does not explicitly distinguish between the training stage(only the normal data) and the inference stage(inputs can be normal/abnormal). Most of the method section talks only about how to train the different modules.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "8nT9HRCmcv", "reviewer": "Reviewer_xWcm", "summary": "The paper proposes a new multi-class anomaly detection method named OmiAD based on diffusion models. First, a diffusion model is trained. Different from standard diffusion models, the images are additionally partially masked to enforce the model to learn the global context. The trained diffusion model is then used by the teacher to distil reconstruction knowledge (using a novel adversarial distillation technique) inside a single-step generation model. It is unclear how the anomaly map is produced, but most likely through a reconstruction difference. OmiAD is then evaluated on four different datasets, achieving SOTA results. The proposed method is also exceptionally fast.\n\n## update after rebuttal\n\nThe authors have addressed most of my concerns so I have increased my score to 4.", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely appreciate the time and effort you invested in carefully reviewing our paper. Your insightful and constructive comments are greatly valued and have helped us improve the clarity and rigor of our work.\n\n**Q1: Inference stage and Anomaly Score Computation**\n\nA1:In the inference stage, we process both normal and anomalous data, following established methods like UniAD and HVQ-Trans for generating anomaly score maps. The pseudocode below outlines this process:\n1. **Input**: $img$: Input image, $g_θ$: Trained one-step generator, $EfficientNet$: Feature extractor, $t_{init}$: Initial timestep.\n2. **Output**:  S: Pixel-wise anomaly score map \n3. **Procedure**:\n   1. **Feature Extraction**: $x_0=EfficientNet(img)$\n   2. **Noising**: $x_t=\\sqrt{\\bar\\alpha_t} \\cdot x_0+\\sqrt{1 - \\bar\\alpha_t}\\cdot\\epsilon,  \\quad t=t_{\\text{init}},   \\epsilon\\sim\\mathcal{N}(0, I)$\n   3. **One-step Reconstruction**: $\\hat{{x}}_0=g_θ(x_t)$\n   4. **Anomaly Score Computation**: $S=\\|x_0-\\hat{{x}}_0\\|_2^2$\n\n**Q2: Ablation study for $t_{init}$ and the rationale for choosing $t_{init}$ = 960**\n\nA2: We conducted ablations with different $t_{init}$ values and found the model remains robust between 800 and 960. We recommend $t_{init} = 960$ for the best trade-off between semantic preservation and anomaly detection.\n|$t_{init}$|600|700|800|940|960|980|1000|\n|-|-|-|-|-|-|-|-|\n|Image AUROC|97.7|98.1|98.3|98.7|98.8|95.9|73.5|\n|Pixel AUROC|96.9|97.1|97.4|97.7|97.7|97.3|80|\n\nWe attribute the effective reconstruction at $t_{init} = 960$ to the high similarity among images within the same category. Using a pre-trained EfficientNet for feature extraction improved the model's ability to accurately reconstruct images.\n\n**Q3: Formula 25 derivation**\n\nA3: Thank you very much for your careful derivation. After reviewing it, we found that there was a typographical error. When substituting equation (22) into equation (21), we mistakenly wrote $\\bar\\beta$ as $\\beta$. We have corrected and updated the derivation process, and equation (25) is now as follows:\n$$\\mathbb{E}_{q(x\\_t\\mid x\\_g, t)\\,p\\_\\theta(x\\_0)}\\Big[\\Big\\langle \\epsilon\\_\\phi(x\\_t, t)-\\epsilon\\_\\psi(x\\_t, t),\\bar{\\beta}\\_t \\nabla\\_{x\\_t}\\log p\\_\\theta(x\\_t)\\Big\\rangle\\Big]$$\n\n$$=-\\mathbb{E}_{x\\_g \\sim p\\_\\theta(x\\_0)x\\_t\\sim p(x\\_t \\mid x\\_g)} \\Big[\\Big\\langle \\epsilon\\_\\phi(x\\_t, t)-\\epsilon\\_\\psi(x\\_t, t),\\frac{x\\_t-\\bar{\\alpha}\\_t x\\_g}{\\bar{\\beta}\\_t} \\Big\\rangle\\Big]$$\n\n$$=-\\mathbb{E}_{x\\_g \\sim p\\_\\theta(x\\_0), z,\\boldsymbol\\epsilon \\sim \\mathcal{N}(0,I)} \\Big[\\Big\\langle \\epsilon\\_\\phi(x\\_t, t)-\\epsilon\\_\\psi(x\\_t, t),\\epsilon \\Big\\rangle\\Big]\\$$\n\nThis typographical error does not affect the subsequent loss calculation.\n\n**Q4: Importance of EfficientNet**\n\nA4: ResNet and EfficientNet are commonly used pre-trained feature extractors for anomaly detection. Replacing EfficientNet with ResNet34 on MVTec led to a performance drop (Image/Pixel AUROC: 93.7/96.5). Similar trends were observed in UniAD, where EfficientNet consistently outperformed ResNet. We therefore recommend using EfficientNet for better performance.\n\n**Q5: Input to the One step generator**\n\nA5: The input to the one-step generator is the feature map extracted by EfficientNet.\n\n**Q6: The diffusion model architecture**\n\nA6:  We use a U-Net architecture as the backbone for the diffusion model. To evaluate the generality of our approach, we replaced the U-Net in OmiAD with DiT and U-ViT[1]. The results demonstrate that OmiAD maintains strong performance across different architectures, indicating that our method is architecture-agnostic.\n|Model|DiT|U-ViT|UNet|\n|-|-|-|-|\n|Image AUROC|98.2|98.4|98.8|\n|PIXEL AUROC|97.5|97.4|97.7|\n\n**Q7: Method for Calculating FPR**\n\nA7: In our experiments, the threshold is set based on the number of anomaly samples. We rank the samples by anomaly score and set the threshold to the score ranked at the position matching the number of anomaly samples.\n\n**Q8: More ablation study for $p_{min}$ and $p_{max}$**\n\nA8: We conducted ablation experiments to address this point. For further details, please refer to our response to **reviewer QjD4 Question 4**.\n\n**Q9: Speed of SimpleNet**\n\nA9: We identified that the slow speed was due to the official code transferring data from GPU to CPU and storing it as a numpy array. For further details, please refer to our response to **reviewer 96ub Question 2**.\n\n**Q10: Comparison of speed with Transfusion**\n\nA10: We added a time comparison with TransFusion. Despite fewer steps, TransFusion predicts masks and anomalies at each step and operates at the pixel level rather than in the latent space, both of which limit its inference speed.\n|Dataset|MVTec-ad|VisA|MPDD|Real-IAD|\n|-|-|-|-|-|\n|Inference Time|15.904|15.975|16.002|16.051|\n\n**Due to character limits, we welcome further discussion and are happy to address any remaining questions during the discussion phase.**\n\n[1]Bao F, et al. All are worth words: A vit backbone for diffusion models.", "claims_and_evidence": "The paper makes two claims: \n- Current diffusion-based anomaly detection models overlook the “identical shortcut” problem of reconstruction-based models, meaning the anomalous regions are not reconstructed to a normal look.\n- Current diffusion-based anomaly detection models require multiple steps, which leads to slow inference, which is suboptimal for real-world scenarios.\n\nThe paper hypothesizes that a possible solution to the first claim is adaptive masking during the training of the diffusion model. The masking does indeed significantly improve the performance of their model, suggesting that this problem is partially improved. While I know from experience that this is a problem with diffusion-based models, some evidence verifying this would help. For example, by showing the distribution of anomaly scores for previous diffusion-based methods, some anomalous images should have low scores if that is the case. Something similar could be done to showcase that adaptive masking solves this.\n\nThe second claim is solved by distilling the diffusion model into a single-step model. The achieved speed is small enough for real-world use and is therefore verified.", "methods_and_evaluation_criteria": "The method is mostly clear, with a few minor details missing: how the anomaly masks are produced (this is the biggest missing detail), what is the architecture of the diffusion model (UNet, DiT?), and what is the input to the one-step generation model - the EfficientNet Features or the input image.\n\nThe paper follows the standard evaluation protocol for multi-class anomaly detection methods and uses the standard evaluation metrics. The evaluation protocol, therefore, correctly evaluates anomaly detection performance.", "theoretical_claims": "The paper has derived the distillation loss. I have checked the derivation, and not all of the steps are entirely clear. For example, in Eq. 25, it is not clear how the final step is achieved and where the minus sign comes from, putting into question whether the loss has been correctly derived.\n\nAdditionally, the paper definitions of the $\\alpha$ and $\\bar{\\alpha}$ inside diffusion models are the opposite of the one used in the original paper [1]. I would suggest using the original ones, as this decreases the clarity for readers who are well-versed in diffusion models.\n\n[1] Ho, J., Jain, A., & Abbeel, P. (2020). Denoising diffusion probabilistic models. Advances in neural information processing systems, 33, 6840-6851.", "experimental_designs_or_analyses": "The experiments verifying the performance in anomaly detection are thorough and adequate. The choice of compared methods is sufficient.\n\nHowever, I lack a more detailed ablation of some parameters for the model. More specifically, I am interested in how robust the model is to the choice of $p_{min}$, $p_{max}$ and $t_{init}$. I am especially interested in $t_{init}$, as it is set to 960 (at least this value appears in Algorithm 1), which seems incredibly high, meaning the input to the single-step generator is practically noise and very little signal. Additionally, the choice of the feature extractor (EfficientNet) was not ablated.\n\nOther parameters are sufficiently ablated. The inference speed for SimpleNet, however, looks significantly high. From my experience, the model is quite fast and should get a significantly lower inference speed. Additionally, it would help to have the inference speed of the base diffusion model (AMDM) to see the speed improvement brought by distillation.", "relation_to_broader_scientific_literature": "The paper improves upon previous multi-class diffusion-based models in two aspects: performance and speed. The most important contribution is the speed, making the use of diffusion-based models inside actual industrial scenarios feasible. As shown in Table 2 the model heavily outspeeds current SOTA multiclass diffusion-based methods, DDAD [2] and DiaD [3]. To my knowledge, it is the first method to apply adversarial distillation for diffusion models in the field of anomaly detection. In terms of performance, OmiAD achieves better results than other SOTA methods, such as  HVQ-Trans [4]. \n\n[2] Mousakhan, A., Brox, T., & Tayyub, J. (2023). Anomaly detection with conditioned denoising diffusion models. arXiv preprint arXiv:2305.15956.\n\n[3] He, H., Zhang, J., Chen, H., Chen, X., Li, Z., Chen, X., ... & Xie, L. (2024, March). A diffusion-based framework for multi-class anomaly detection. In Proceedings of the AAAI conference on artificial intelligence (Vol. 38, No. 8, pp. 8472-8480).\n\n[4] Lu, R., Wu, Y., Tian, L., Wang, D., Chen, B., Liu, X., & Hu, R. (2023). Hierarchical vector quantized transformer for multi-class unsupervised anomaly detection. Advances in Neural Information Processing Systems, 36, 8487-8500.", "essential_references_not_discussed": "The paper fails to mention the first approaches to anomaly detection with diffusion models, such as AnoDDPM [5] and DiffAD [6]. While not a big weakness, these methods should at least be mentioned to give a better idea of the development of such methods. \n\nMasking the image has also been done to improve the “identical shortcut” problem. While it has not been as successful, I would at least mention previous methods [7] trying this.\n\n[5] Wyatt, J., Leach, A., Schmon, S. M., & Willcocks, C. G. (2022). Anoddpm: Anomaly detection with denoising diffusion probabilistic models using simplex noise. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition (pp. 650-656).\n\n[6] Zhang, X., Li, N., Li, J., Dai, T., Jiang, Y., & Xia, S. T. (2023). Unsupervised surface anomaly detection with diffusion probabilistic model. In Proceedings of the IEEE/CVF International Conference on Computer Vision (pp. 6782-6791).\n\n[7] Zavrtanik, V., Kristan, M., & Skočaj, D. (2021). Reconstruction by inpainting for visual anomaly detection. Pattern Recognition, 112, 107706.", "other_strengths_and_weaknesses": "The paper is nicely structured and easy to read. The claims are clearly written and discussed in the paper.", "other_comments_or_suggestions": "There are a few typos: Line 358 should probably be Qualitative Results and not Quantitative, Line 257 “distributionclosely” -> “distribution closely”\n\nI would perhaps also add a speed comparison to TransFusion [8] as it requires fewer steps (20) than most diffusion-based models. While I expect the improvement to be 50x or 100x times, it will be a fairer comparison.\n\nExtensive experiment analysis is not a contribution but a scientific standard. I would move it out of the contributions.\n\n[8] Fučka, M., Zavrtanik, V., & Skočaj, D. (2024, September). TransFusion–a transparency-based diffusion model for anomaly detection. In European conference on computer vision (pp. 91-108). Cham: Springer Nature Switzerland.", "questions_for_authors": "I have listed the questions in terms of importance from most important to least important.\n\n- How are the anomaly maps produced?\n- How robust is the model to the choice of $t_{init}$? Is there a reason why it is set to 960?\n- How is the last step made in Eq. 25 the derivation of the adversarial loss?\n- How important is EfficientNet for the model? What happens if you exchange it for some other feature extractor?\n- What is the input to the single-step generation model (EfficientNet features or the image)?\n- What architecture is used for the diffusion model and the single-step generation model? Is it a UNet, DiT, etc.?\n- How is the FPR calculated in the supplementary material?", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "CVMkSXpSQl", "reviewer": "Reviewer_3S6t", "summary": "To address the slow inference speed due to the iterative denoising nature of the diffusion model, this paper proposes a one-step masked diffusion model for multi-class anomaly detection, OmiAD, which uses a multi-step Adaptive Masked Diffusion Model (ADM) with compression using ASD. State-of-the-art performance is achieved on all seven metrics for four different datasets, along with a significant improvement in inference speed.", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We truly value the time and effort you invested in carefully reading our paper. Your thoughtful and constructive feedback is highly appreciated.\n\n**Q1:Effectiveness of Adaptive Masking for Localized Anomalies**\n\nA1: Thank you for raising this important point. We agree that anomalies heavily dependent on local features may pose a challenge for global masking strategies. To address this, our adaptive masking mechanism varies the mask ratio with the diffusion step, which allows the model to preserve fine-grained local information at earlier stages and gradually increases difficulty during training. Furthermore, since our model operates on feature-level inputs extracted by EfficientNet, it benefits from strong localized representations.\n\nAdditionally, the Real-IAD dataset contains many small-scale anomalies. OmiAD demonstrates excellent performance on this dataset, further validating its effectiveness in handling fine-grained, localized anomalies.\n\n**Q2: Computational overhead of the adversarial distillation**\n\nA2: The computational overhead of adversarial distillation during training is comparable to that of training the teacher model once. This efficiency stems from the fact that the One-step Generator $g_θ$ directly inherits the architecture of the AMDM U-Net (as described in Algorithm 1), and the discriminator shares weights with the one-step generator’s encoder, resulting in minimal additional cost. Moreover, the distillation phase trains the One-step Generator for only 150 epochs—substantially fewer than the 1000 epochs required for AMDM.\n\nAt inference time, OmiAD reduces the number of sampling steps from 100 (in AMDM) to just one, leading to a significant speedup.\n\nIn summary, adversarial distillation introduces minimal training overhead while enabling substantial inference acceleration through drastic reduction in sampling steps.", "claims_and_evidence": "The claims made in the submission are well-supported by clear and convincing evidence. The authors provide extensive experimental results on four diverse datasets, demonstrating the effectiveness of OmiAD in terms of both anomaly detection and localization. The proposed method shows significant improvements over existing approaches, which strongly supports the claims of enhanced performance and efficiency. The ablation studies further validate the contributions of individual components like the adaptive masking strategy and the adversarial score distillation.", "methods_and_evaluation_criteria": "The proposed OmiAD method makes sense for the problem of multi-class anomaly detection, where efficiency and accuracy are crucial. The use of a diffusion model with an adaptive masking strategy and adversarial score distillation is appropriate for addressing the challenges of shortcut learning and slow inference. The evaluation criteria, including AU-ROC, AP, F1 max, and AU-PRO, are standard and suitable for assessing the performance of anomaly detection methods.", "theoretical_claims": "The theoretical claims regarding the adaptive masking strategy and adversarial score distillation are plausible and well-founded.", "experimental_designs_or_analyses": "The experimental designs are sound and comprehensive. The authors conducted experiments on four diverse datasets, comparing OmiAD with several baseline methods. The results demonstrate the superiority of OmiAD in terms of both detection performance and inference speed. The ablation studies provide insights into the contributions of different components of the proposed method. The visualizations of reconstruction results and anomaly maps further support the effectiveness of OmiAD in localizing anomalies.", "relation_to_broader_scientific_literature": "The key contributions of the paper are well-related to the broader scientific literature. The authors discuss how OmiAD advances the field of anomaly detection by addressing the limitations of existing diffusion-based methods. They connect their work to previous research on diffusion models, anomaly detection, and distillation techniques, showing how OmiAD builds upon and improves these approaches. The method's emphasis on reducing shortcut learning and improving inference efficiency aligns with current trends in developing more robust and practical machine learning models.", "essential_references_not_discussed": "The paper cites relevant previous work on diffusion models, anomaly detection, and distillation methods.", "other_strengths_and_weaknesses": "Strengths:\nThe proposed OmiAD method effectively addresses the challenges of shortcut learning and slow inference in diffusion-based anomaly detection.\nThe extensive experimental results on multiple datasets demonstrate the robustness and versatility of OmiAD.\nThe adversarial score distillation approach offers a novel way to compress multi-step diffusion processes into a single step, significantly improving inference efficiency.\nWeaknesses:\nThe assumption that the adaptive masking strategy will generalize well to all types of anomalies might be overly optimistic, as some anomalies could still rely on local features.\nThe computational complexity of training the OmiAD model, especially with the adversarial distillation component, could be a limitation for practical applications with limited resources.", "other_comments_or_suggestions": "The paper is well-written and well-structured, making it easy to follow the methodology and experimental results. However, providing more details on the implementation of the adaptive masking strategy and the adversarial distillation process would be beneficial for readers interested in reproducing the results.", "questions_for_authors": "1. How would you address scenarios where anomalies are highly dependent on local features, potentially limiting the effectiveness of the adaptive masking strategy?\n2. Could you provide more details on the computational overhead of the adversarial distillation process during training, and how it compares to the inference speed improvements?\nThis is not my area of expertise, so I will be looking closely at other people's comments to adjust the score.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "g4NFAdVn7T", "reviewer": "Reviewer_96ub", "summary": "The paper introduces OmiAD, a one-step adaptive masked diffusion model for multi-class anomaly detection (MUAD). \n\nThe authors propose Adaptive Masking Diffusion Model (AMDM) to mitigate \"identical shortcut\" issues by dynamically adjusting mask ratios based on noise levels and Adversarial Score Distillation (ASD) to compress multi-step diffusion processes into a single inference step.\n\n## Update after rebuttal\n\nThe authors have addressed most of my concerns. I remain \"weak accept\".\n\nIt is worth pointing out that \"Inference Time\" is decided by the algorithm and GPU, which is irrelevant to dataset. I understant that you run the speed test on several dataset. But you only need to report their average. Report Inference Time for each dataset is wierd.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We are grateful for the time you spent reviewing our paper in detail. Your insightful comments have been extremely helpful, and we deeply appreciate your input.\n\n**Q1: Comparison with Recent Multi-class UAD Methods**\n\nA1：We have compared our results on the MVTEC and VISA datasets with MambaAD, ViTAD, and ReContrast, as summarized in the table below. All results are sourced from the original publications. As shown, OmiAD consistently achieves superior performance across datasets.\n| Method|**MVTec**||**VisA**||\n|-|-|-|-|-|\n||Image AUROC|Pixel AUROC|Image AUROC|Pixel AUROC|\n|ReContrast|98.2|–|95.1|–|\n|MambaAD|98.6|**97.7**|94.3|98.5|\n|ViTAD|98.3|**97.7**|90.5|98.2|\n|**OURS**|**98.8**|**97.7**|**95.3**|**98.9**|\n\n**Q2: Speed of SimpleNet**\n\nA2: We revisited the official SimpleNet implementation and found that it upsamples both the anomaly score map and feature map to a shape of batch × 1536 × 288 × 288. The resulting tensor is then transferred from GPU to CPU and stored as a NumPy array (as seen in line 113 of the source code in common.py). This operation accounts for the majority of the inference time, resulting in significantly slower inference. Since our evaluation was based on the official public code, we observed these slower inference times accordingly.\n\nBased on your valuable suggestion, we optimized the implementation by removing the unnecessary upsampling step and the conversion to NumPy arrays, and streamlined the overall code. This optimization resulted in inference speeds that are consistent with the expected performance of the embedding-based structure and are lower than most methods reported in Table 2 of our paper. The updated inference times on the four datasets are shown below. As observed, the inference time remains longer than that of OmiAD, and thus does not affect the conclusions presented in our paper.\n|Dataset|MVTEC|VISA|MPDD|REALIAD|\n|-|-|-|-|-|\n|Inference Time (s)|0.0292|0.0296|0.0281|0.0277|\n\n**Q3: Overall method**\n\nA3: Should the paper be accepted, we will include a comprehensive illustration of the overall method in the camera-ready version, covering all components of OmiAD, including both AMDM and ASD modules.\n\n**Q4：Single-class UAD results**\n\nA4: We present the single-class anomaly detection performance on the MVTec and MPDD datasets as follows. These results will be detailed in the appendix for further reference. The single-class results on VisA and Real-IAD are currently under evaluation and will be included in the camera-ready version.\n\n**Single class UAD results for MVTec dataset：**\n|Metric|bottle|cable|capsule|hazelnut|metal_nut|pill|screw|toothbrush|transistor|zipper|carpet|grid|leather|tile|wood|**mean**|\n|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|\n|Image AUROC|100.0|99.2|96.8|100.0|99.4|97.0|94.7|99.4|99.9|99.7|100.0|100.0|100.0|100.0|98.6|**99.0**|\n|Pixel AUROC|98.6|98.3|98.9|98.8|97.0|97.2|99.4|98.8|98.9|98.2|98.8|98.6|99.3|92.7|94.2|**97.8**|\n\n**Single-class UAD results for MPDD dataset：**\n|Metric|bracket_black|bracket_brown|bracket_white|connector|metal_plate|tubes|**mean**|\n|-|-|-|-|-|-|-|-|\n|Image AUROC|96.3|99.1|93.2|96.7|100.0|94.8|**96.7**|\n|Pixel AUROC|98.8|98.3|98.6|98.9|98.5|98.8|**98.7**|\n\n**Q5: Application-oriented focus and alignment with ICML's interests**\n\nA5: Thank you for your comment. While this work is focused on multi-class anomaly detection, we did not make innovations in areas like anomaly score calculation or anomaly classification, which are task-specific. Instead, our innovation lies in enhancing generative capabilities and inference speed, which are more general improvements that are highly relevant in the current machine learning field. In the context of anomaly detection, the proposed method improves detection performance by enhancing the completion of anomalies with the powerful generator.\n\nBesides, the core contribution of our work is a novel one-step adaptive masked diffusion model, which integrates a random masking strategy into the one-step diffusion process to enhance generation quality and efficiency. This design offers broader applicability to tasks demanding efficient and high-quality generation. Furthermore, the rapid and efficient generation characteristics of the proposed method are closely aligned with the challenges currently faced in industrial anomaly detection. Thus, we have applied and validated the capabilities of our method in this task. Our work aligns closely with ICML's focus on advancing machine learning techniques with practical applicability. \n\nFinally, anomaly detection is also an important direction of machine learning, and it has strong correlation with unsupervised machine learning, statistical machine learning and so on. In recent years, many related papers have been published at ICML.\n\n**Due to character limitations, we would be happy to discuss and address any remaining questions during the discussion phase.**", "claims_and_evidence": "CV methodology paper. No claims apart from the claim of superiority.", "methods_and_evaluation_criteria": "The proposed method make sense.", "theoretical_claims": "None.", "experimental_designs_or_analyses": "The experiments are sound. The setting follows common MUAD setting.", "relation_to_broader_scientific_literature": "Related to Diffusion-based UAD methods, such as DiAD.", "essential_references_not_discussed": "Some recent MUAD methods are not compared, including MambaAD (NIPS24), ViTAD(Arxiv24), ReContrast (NIPS23), etc.", "other_strengths_and_weaknesses": "Strengths:\n\n1. OmiAD reduces inference time drastically compared to other Diffusion-based UAD methods, making it viable for real-time industrial applications.\n\n2. Extensive experiments, works well across different datasets.\n\nWeaknesses:\n\n1. Several recent Multi-class Unsupervised Anomaly Detection (MUAD) methods appear to be missing from the comparison, including MambaAD (NeurIPS 2024), ViTAD (arXiv 2024), and ReContrast (NeurIPS 2023), etc. Their performances are relatively comparable to the results of this work. \n\n2. In Table 2, why SimpleNet spend 18 seconds for a bach? It is extremely unreasonable. SimpleNet only consists of a CNN backbone and a lightweight head. It should be faster than RD4AD. Furthermore, why do different datasets have different inference speed? They should be the same. It is also not clear whether the time is for one image or one batch.\n\n3. A figure that depicts the overall method is favored. Figure 1 only presents ASD, which is only a part of the proposed method. \n\n4. The results of single-class UAD should be presented as a reference.\n\n5. This article is application-oriented and has a relatively narrow domain. I am not sure if it aligns with ICML's interests.", "other_comments_or_suggestions": "NO", "questions_for_authors": "NO", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Meta-review: This paper introduces a one-step adaptive masked diffusion model (AMDM) for multi-class anomaly detection. The AMDM enhances global context modeling and prevents shortcut reconstruction. The proposed method demonstrates a speed-up over existing diffusion-based and transformer-based approaches across multiple anomaly detection benchmarks.

The paper received positive scores from all four reviewers in the initial review phase. The reviewers acknowledged that the authors' rebuttal effectively addressed their concerns, leading them to maintain or even increase their scores, ultimately recommending acceptance. Therefore, the AC recommends accepting this paper.
Decision: Accept (poster)