Edge-WaferNet: Ultra-Lightweight Depthwise-Separable CNN with Grad-CAM Explainability for Sub-Millisecond Semiconductor Wafer Defect Inspection
Semiconductor wafer inspection must be fast, tiny, and trustworthy enough to run at the fab edge, not only in the cloud. We present Edge-WaferNet, an ultra-lightweight depthwise-separable convolutional neural network (CNN) with only 13,769 parameters and a 34.06 KB FP32 ONNX footprint for 9-class wafer-map defect classification. Trained on 29,519 balanced 64x64 wafer maps (23,615 train / 5,904 test, 80/20 split) derived from the industrial WM-811K dataset, the model achieves 83.18% test accuracy and 0.840 weighted F1-score in our reproduced run (December 2, 2026). On CPU, FP32 inference averages 0.0390 ms per wafer (25,614 wafers/s) over 1,000 runs. Counter-intuitively, dynamic INT8 quantization increases both model size (41.01 KB) and latency (0.2691 ms per wafer) for this sub-50 KB network, showing that quantize/dequantize overhead can dominate weight-compression gains at this scale. Training uses AdamW (learning rate 1.5e-3), CosineAnnealingLR, 25 epochs, batch size 128, and random 90-degree rotational augmentation on a T4 GPU in approximately 2-3 minutes. Grad-CAM heatmaps confirm that model decisions localize on physical defect geometries - center clusters, donut rings, edge rings, and scratches - rather than on background artifacts. We release training code, a C++ ONNX Runtime inference benchmark, a Streamlit fab dashboard, and all figures for full reproducibility.
Authors
- Nayyab Faisal
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-02
- DOI
- https://doi.org/10.5281/zenodo.24754715
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- preprint