Efficient Patch-Based Anomaly Detection Fused with Diffusion Driven Generative Modeling for Semiconductor Wafer Bin Map Open Set Anomaly Detection
Authors: Limon Bin Hossain, Md Sadib Rahman Ananta
Organizations: Department of Industrial and Production Engineering, Bangladesh University of Engineering and Technology (BUET), Dhaka, 1000, Bangladesh
Spatial defect signatures on wafer bin maps (WBMs) trace yield loss to specific process faults, yet supervised classifiers recognize only the defect types seen during training, and one-class detectors built on a single mechanism tend to capture either local structural deviations or global distributional violations, but rarely both. This work proposes a hybrid one-class framework that couples a patch-based student-teacher detector (EfficientAD) with a denoising diffusion probabilistic model (DDPM) used for partial-diffusion reconstruction, and fuses their percentile-calibrated scores through a fixed convex combination. Trained on only 700 normal wafers from the WM-38K mixed-type dataset and evaluated on 18,658 held-out wafers, the fused detector reached an AUROC of 0.9985 and reduced misclassifications from 852 (DDPM) and 1,412 (EfficientAD) to 618, with all pairwise differences significant at p < 0.001. Beyond aggregate accuracy, the analysis shows that the gain arises from weakly overlapping errors between the two modules, yet fixed-weight fusion recovers only 40-70% of the correction available to an oracle selector. Under the benchmark's inverted class balance, average precision and F1 saturate, while the Matthews correlation coefficient and negative predictive value expose unreliable normal predictions. Pixel-level maps further show that strong image-level separability does not imply spatial localization, and the diffusion module succeeds as a local density prior rather than through global geometric reasoning. These findings motivate sample-adaptive fusion and imbalance-aware evaluation of hybrid wafer anomaly detectors.
Figures & tables
Figure 1 : Training loss curves (raw and smoothed). Dotted lines mark final values.
Model
AUROC
AP
F1
MCC
Bal. Acc.
Params (M)
EfficientAD
0.9799
0.9998
0.9604
0.2781
0.9288
5.21
[0.9728, 0.9866]
[0.9998, 0.9999]
[0.9582, 0.9624]
[0.2541, 0.3033]
[0.9072, 0.9473]
DDPM
0.9931
0.9999
0.9764
0.3620
0.9538
7.83
[0.9907, 0.9952]
[0.9999, 1.0000]
[0.9747, 0.9779]
[0.3310, 0.3920]
[0.9353, 0.9692]
Fusion ( α=0.5 )
0.9985
1.0000
0.9830
0.4321
0.9800
13.04
[0.9978, 0.9991]
[1.0000, 1.0000]
[0.9817, 0.9843]
[0.3996, 0.4645]
[0.9721, 0.9843]
Table 1 : Test-set performance with 95% bootstrap confidence intervals. Best values are in bold. Params count trainable weights only.
Figure 3 : Three-way comparison of EfficientAD, DDPM, and hybrid fusion on the test set.
Model
TP
FN
TN
FP
Errors
TPR
TNR
PPV
NPV
EfficientAD
17,106
1,402
140
10
1,412
0.924
0.933
0.9994
0.091
DDPM
17,663
845
143
7
852
0.954
0.953
0.9996
0.145
Fusion
17,891
617
149
1
618
0.967
0.993
0.9999
0.195
Table 2 : Confusion counts and derived rates at the validation-selected thresholds (test set; 18,508 defective, 150 normal).
Paired bootstrap
DeLong
McNemar
Comparison (A vs. B)
Δ AUROC
95% CI
z
p
A-only
B-only
Both
χ2
Fusion vs. EAD
+0.0184
[ +0.0123 , +0.0256 ]
+5.335
9.6×10−8
101
895
517
631.37***
Fusion vs. DDPM
+0.0054
[ +0.0034 , +0.0078 ]
+5.124
3.0×10−7
248
482
370
74.37***
EAD vs. DDPM
−0.0130
[ −0.0209 , −0.0056 ]
−3.423
6.2×10−4
1,140
580
272
181.68***
Table 3 : Pairwise significance tests on the test set. For McNemar, “A-only” and “B-only” count wafers misclassified by one model alone; “Both” counts shared errors. EAD: EfficientAD. *** denotes p<0.001 .
Figure 4 : Test-set AUROC, AP, and F1 as a function of the fusion weight α ( α=0 : DDPM only; α=1 : EfficientAD only).
Figure 5 : Spatial anomaly map decomposition for one true-positive, true-negative, false-positive, and false-negative test wafer (top to bottom). Columns: original wafer map, EfficientAD map, DDPM reconstruction-error map, and fused map. Scores are fused image-level scores.
Figure 6 : Unconditional DDIM samples (50 steps) from the DDPM trained on 700 normal wafers (broken-die channel shown).
Department of Electrical and Computer Engineering, University of California Santa Barbara, CA, USA · Automotive Processing, NXP Semiconductors, TX, USA
School of Cyber Science and Technology, Shenzhen Campus of Sun Yat-sen University · School of Artificial Intelligence and Robotics, Hunan University · Department of Computer and Information Science, University of Macau +1