Organizations: School of Aeronautics and Astronautics, Zhejiang University, Hangzhou, 310027, China · School of Computer Science and Technology(), , Hangzhou, 310018, China · Ningbo Innovation Center, Zhejiang University, Ningbo, China · Department of Automation, Tsinghua University, Beijing, 100084, China · College of Information Science & Electronic Engineering, Zhejiang University, Hangzhou, 310027, China
Industrial anomaly detection faces significant challenges due to the scarcity of anomalous samples and the complexity of real-world anomalies. In this paper, we propose a foundation model-based anomaly synthesis pipeline (FMAS) that generates highly realistic anomalous samples without fine-tuning or class-specific training. Motivated by the distinct frequency-domain characteristics of anomalies, we introduce aWavelet Domain Attention Module (WDAM), which exploits adaptive sub-band processing to enhance anomaly feature extraction. The combination of FMAS and WDAM significantly improves anomaly detection sensitivity while maintaining computational efficiency. Comprehensive experiments on MVTec AD and VisA datasets demonstrate that WDAM, as a plug-and-play module, achieves substantial performance gains against existing baselines.
Figures & tables
Figure 1: Qualitative results showing anomaly samples generated by the proposed FMAS on the MVTec AD dataset, with red contours highlighting the anomalous regions.
Figure 2: Visualization of anomaly saliency in the four wavelet sub-bands. The leftmost column presents the original images, the middle columns show the LL, LH, HL, and HH sub-bands, and the rightmost column illustrates the corresponding masks. Red dashed boxes indicate defect locations, and red solid boxes highlight magnified regions. All samples are drawn from the MVTec AD dataset.
Class
bottle
cable
capsule
carpet
grid
hazelnut
leather
metal nut
pill
screw
tile
toothbrush
transistor
wood
zipper
LL
0.69
0.84
0.90
0.72
0.76
0.76
0.69
0.78
0.81
0.75
0.83
0.80
0.81
0.70
0.70
LH
0.10
0.07
0.05
0.12
0.10
0.08
0.14
0.10
0.08
0.10
0.08
0.08
0.07
0.09
0.12
HL
0.10
0.07
0.04
0.13
0.10
0.08
0.13
0.09
0.08
0.10
0.08
0.10
0.08
0.17
0.14
HH
0.10
0.02
0.02
0.03
0.03
0.08
0.04
0.03
0.03
0.04
0.02
0.03
0.04
0.04
0.04
Table 1: Quantitative comparison of anomaly prominence across different wavelet sub-bands on our synthesized dataset based on the MVTec AD dataset. The reported values represent the relative degree of pixel-level change within each sub-band after anomaly synthesis, with higher values indicating greater relative variation.
Figure 3: Illustration of the proposed foundation model-based anomaly synthesis pipeline (FMAS).
Figure 4: The proposed Wavelet Domain Attention Module (WDAM) processes input feature maps through a frequency-aware attention mechanism. First, WDAM decomposes the spatial features into multiple frequency sub-bands using Discrete Wavelet Transform (DWT). An adaptive attention mechanism then selectively enhances or suppresses features in each sub-band based on their relevance to anomaly detection. Finally, the refined frequency components are reconstructed back into the spatial domain via Inverse Discrete Wavelet Transform (IDWT), effectively preserving critical defect-related patterns while suppressing noise.
Metric
GLASS ( Chen et al., 2024 )
RealNet ( Zhang et al., 2024 )
Ours
FID ↓
177.51
69.64
56.99
LPIPS ↓
0.280
0.147
0.130
Table 2: Quantitative results of anomaly image realism between our method and the alternative anomaly synthesis approaches on the MVTec-AD dataset.
Figure 5: (a) The architecture of CutPaste with the proposed WDAM, wherein Bottleneck* denotes a modified bottleneck block incorporating WDAM, as elaborated in (b). The elements enclosed within the red dashed box indicate the additional components introduced in comparison to the original bottleneck configuration.
Category
CutPaste
+FMAS
+FM
+WDAM (Final Model)
Bottle
( 100.0 , 68.06, 39.84)
( 100.0 , 81.18, 66.07)
( 100.0 , 83.73 , 71.35 )
( 100.0 , 86.82 , 71.29 )
Cable
(88.44, 80.39, 43.13)
( 94.10 , 87.80 , 59.77)
(91.55, 85.48, 62.97 )
( 97.91 , 90.79 , 74.14 )
Capsule
( 100.0 , 89.67, 65.91)
(96.38, 92.58 , 74.94)
(96.66, 91.04, 75.15 )
( 97.50 , 93.26 , 77.39 )
Carpet
(81.77, 88.02, 23.36)
( 92.12 , 95.97 , 68.20 )
(91.59, 95.59, 62.93)
( 98.66 , 96.70 , 81.25 )
Grid
(90.64, 77.65, 56.42)
(99.14, 92.08 , 68.69 )
( 99.16 , 90.69 , 63.96)
( 99.89 , 88.78, 66.29 )
Hazelnut
(98.58, 84.77, 69.51)
( 99.48 , 92.31 , 82.12 )
(98.89, 91.40, 73.78)
( 99.73 , 92.54 , 84.02 )
Table 3: Evaluation results of CutPaste and our variants on MVTec AD dataset, with image-level AUROC, pixel-level AUROC, and PRO metrics. FM is short for foreground mask. Bold and underlined indicate the best and second-best results, respectively.
Category
CutPaste
+FMAS
+FM
+WDAM (Final Model)
EawT ( Du et al., 2024 )
AST ( Rudolph et al., 2023 )
candle
(94.7, 93.5)
(93.1, 94.8)
(94.3, 95.8 )
( 98.0 , 93.4)
(86.8, 98.6 )
( 97.1 , 93.6)
capsules
(84.4, 83.9 )
(72.7, 74.7)
(80.7, 79.0)
( 85.2 , 77.7)
( 91.2 , 99.3 )
(81.5, 80.1)
cashew
(94.9, 88.3)
(90.2, 90.5)
( 95.3 , 96.0 )
( 95.6 , 92.7 )
(88.4, 81.8)
(93.0, 86.3)
chewinggum
(97.7, 97.9 )
(97.5, 97.2)
( 99.1 , 93.3)
(99.0, 85.3)
(98, 98.8 )
( 99.3 , 87.7)
fryum
(93.9, 97.0 )
(90.4, 88.1)
(95.8, 93.9)
( 97.1 , 95.4 )
( 97.5 , 95.4 )
(96.8, 79.3)
macaroni1
(85.1, 78.2)
(81.9, 90.2)
( 97.0 , 91.5 )
( 95.6 , 91.0)
(89.4, 99.9 )
(75.0, 89.7)
Table 4: Evaluation results of CutPaste, its variants with different modifications, and the other competitors on VisA dataset, with image-level and pixel-level AUROC metrics
Category
CFLOW-AD ( Gudovskiy et al., 2022 )
MSTUnet ( Jiang et al., 2022 )
MambaAD ( He et al., 2024 )
DRAEM ( Zavrtanik et al., 2021 )
+SSPCAB ( Ristea et al., 2022 )
Final Model
Bottle
(99.0, 96.8)
( 100.0 , 99.0 )
( 100.0 , 98.8 )
( 99.5 , 98.5)
(98.4, 98.8 )
(99.2, 98.4)
Cable
( 97.6 , 93.5)
(91.4, 89.9)
( 98.8 , 95.8)
(95.3, 94.4)
(96.9, 96.0 )
(97.4, 96.5 )
Capsule
( 99.0 , 93.4)
(98.4, 95.7 )
(94.4, 98.4 )
(96.6, 90.8)
( 99.3 , 93.1)
(97.0, 91.6)
Carpet
(99.3, 97.7)
( 99.9 , 98.3 )
( 99.8 , 99.2 )
(97.9, 95.3)
(98.2, 95.0)
(99.6, 95.8)
Grid
( 99.0 , 96.1)
( 100.0 , 99.7 )
( 100.0 , 99.2)
( 100.0 , 99.7 )
( 100.0 , 99.5 )
( 100.0 , 99.7 )
Hazelnut
( 99.0 , 96.7)
( 100.0 , 99.3)
( 100.0 , 99.0)
( 100.0 , 99.7 )
( 100.0 , 99.8 )
( 100.0 , 99.6)
Table 5: Image-level AUROC and pixel-Level AUROC results on the MVTec AD Dataset. Comparison of DRAEM ( Zavrtanik et al., 2021 ) , DRAEM with the proposed WDAM, and other methods, including CFLOW-AD ( Gudovskiy et al., 2022 ) , MSTUnet ( Jiang et al., 2022 ) , MambaAD ( He et al., 2024 ) and DRAEM+SSPCAB ( Ristea et al., 2022 )
Dataset
THFR ( Guo et al., 2023 )
RD++ ( Tien et al., 2023 )
Dinomaly ViT-B ( Guo et al., 2025 )
PatchCore
PatchCore Ensemble
Final Model
MVTec AD
(99.2, 98.2, 95.0)
(99.4, 98.3 , 95.0)
( 99.6 , 98.4 , 94.8)
(99.1, 98.1, 97.4)
( 99.5 , 98.2, 97.6 )
(99.0, 98.3 , 97.7 )
Table 6: Evaluation results of PatchCore, its variants with different modifications, and other methods, including THFR ( Guo et al., 2023 ) , RD++ ( Tien et al., 2023 ) , and Dinomaly ViT-B ( Guo et al., 2025 ) , on the MVTec AD dataset using image-level AUROC, pixel-level AUROC, and PRO metrics.
Figure 6: Qualitative results of CutPaste ( Li et al., 2021 ) and our method on MVTec AD dataset. From top to down, original image, ground-truth mask, detection heatmap of CutPaste, and detection heatmap of our method.
Figure 7: Qualitative results of CutPaste ( Li et al., 2021 ) and our method on VisA dataset. From top to down, original image, ground-truth mask, detection heatmap of CutPaste, and detection heatmap of our method.
Dataset
FMAS
WDAM
Metrics
MVTec AD
(93.23, 82.34, 57.51)
✓
( 96.54 , 86.88 , 67.69 )
✓
(96.20, 84.91, 66.35)
✓
✓
( 98.00 , 88.28 , 72.04 )
VisA
(90.68, 89.68, 65.65)
✓
( 93.86 , 93.37 , 75.82 )
Table 7: Module-level ablation results on MVTec AD and VisA dataset, based on the CutPaste.
Layer1
Layer2
Layer3
Layer4
Metrics
(96.54, 86.88, 67.69)
✓
( 98.00 , 88.28 , 72.04 )
✓
✓
( 97.92 , 87.99 , 71.70)
✓
✓
✓
(97.39, 87.92, 72.09 )
✓
✓
✓
✓
(97.45, 87.70, 71.60)
Table 8: Ablation analysis of WDAM integration within CutPaste on the MVTec AD dataset.
Metrics
WideResNet50-2
+WDAM
Param. (MB)
67.40
67.59
FLOPs (G)
29.92
29.94
Inference Time (ms)
5.71
7.35
I-AUROC (%)
96.54
98.00
Table 9: Comparison of WideResNet50-2 and WideResNet50-2+WDAM in terms of model complexity, efficiency, and accuracy.
Class
bottle
cable
capsule
carpet
grid
hazelnut
leather
metal nut
pill
screw
tile
toothbrush
transistor
wood
zipper
LL
0,0,1
0,1,0
0,1,1
0,1,0
0,1,1
0,1,0
0,1,0
0,1,1
0,0,1
0,1,0
0,1,0
0,1,0
1,1,1
0,1,1
0,1,0
LH
1,1,1
1,0,0
1,0,1
0,0,0
1,0,0
1,0,1
1,0,1
1,0,0
0,0,1
0,0,0
1,0,0
1,0,1
1,0,1
1,0,0
1,0,0
HL
1,1,0
0,0,0
1,1,0
0,1,0
0,1,0
0,0,0
1,1,0
0,1,0
0,1,0
0,0,0
0,0,1
0,0,0
1,1,1
0,0,0
0,0,1
HH
0,0,0
0,0,0
1,0,0
0,0,1
1,0,0
0,0,1
0,0,0.8
0,0,1
0,0,0
0,1,0
1,0,1
1,0,1
0,0,0
0,0,0
1,0,0
Table 10: Average wavelet sub-bands weights learned by the WDAM on the MVTec AD dataset. Each sample is assigned three groups of weights (LL, LH, HL, HH), representing the relative contributions of the four wavelet sub-bands to anomaly detection. For each class, the three comma-separated values correspond to the three WDAM modules integrated sequentially into three bottleneck layers, as illustrated in Figure 5 . Values are averaged across all samples within each module.