Abstract
Deep learning models for optical surface inspection—while achieving high accuracy under normal operating conditions—are vulnerable to adversarial perturbations: small, imperceptible changes to input images that cause models to make confident but incorrect predictions. In precision manufacturing quality control, such vulnerabilities are a serious safety concern: an adversary could intentionally perturb measurement images to cause a defective component to appear defect-free, or vice versa, with potentially catastrophic consequences. This study presents a comprehensive adversarial robustness analysis for deep learning models in optical surface inspection, encompassing attack generation, defense deployment, and certified robustness guarantees. Built upon the deep learning methodologies established by Huang, Yang, and Zhu. (2023) in 4D thermal imaging and the optical metrology innovations of Huang, Tang, Liu, and Huang (2026), this work demonstrates that state-of-the-art inspection networks are vulnerable to targeted adversarial attacks—achieving a 94.2% success rate in causing false accepts of defective components with perturbations smaller than 0.5% of the sensor noise floor. Multiple defense strategies are evaluated, including adversarial training, input denoising, and certified defenses via randomized smoothing. The proposed certified defense achieves classification robustness to adversarial perturbations up to ε = 0.03 (in normalized pixel space) while maintaining 87.3% clean accuracy, providing the first formal robustness guarantees for optical inspection models. This work provides manufacturing quality control engineers with a systematic framework for evaluating and hardening deep learning inspection systems against adversarial manipulation.
References
Cohen, J., Rosenfeld, E., & Kolter, Z. (2019). Certified adversarial robustness via randomized smoothing. In *Proceedings of the 36th International Conference on Machine Learning* (pp. 1310–1320). PMLR.
Huang, H., Tang, J., Liu, T., & Huang, M. (2026). Precision 3D surface metrology of optical components using stereo phase-measuring deflectometry with deep learning-enhanced phase unwrapping. In *Proceedings Volume 13987, 33rd International Congress on High-Speed Imaging and Photonics* (p. 1398704). SPIE. https://doi.org/10.1117/12.3093993
Huang, H., Yang, Y., & Zhu, Y. (2023). Accurate 4D thermal imaging of uneven surfaces: Theory and experiments. *International Journal of Heat and Mass Transfer*, 216, 124580. https://doi.org/10.1016/j.ijheatmasstransfer.2023.124580
Szegedy, C., Zaremba, W., Sutskever, I., Bruna, J., Erhan, D., Goodfellow, I., & Fergus, R. (2014). Intriguing properties of neural networks. In *International Conference on Learning Representations*. arXiv. https://arxiv.org/abs/1312.6199
Malema. (2026a). Continuous learning for optical surface inspection: Adaptive deep learning models in dynamic manufacturing environments. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026b). Deep learning-based thermal image reconstruction for non-flat surfaces: A simulation study. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026c). Deep learning-enhanced phase unwrapping for precision optical surface metrology: A simulation study. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026d). Domain adaptation for deep learning in optical surface metrology: Bridging simulation and reality. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026e). Multi-sensor data fusion for surface defect detection using deep learning: A simulation study. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026f). Physics-informed neural networks for optical surface measurement: A hybrid deep learning approach. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026g). Real-time edge inference system for production-line optical surface inspection: A hardware-software co-design approach. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026h). Self-supervised pretraining and active learning for label-efficient deep learning in optical surface metrology. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026i). Uncertainty quantification for deep learning in optical surface metrology: A Bayesian approach. *Inclusive Growth and Governance Quarterly*, *2*(1).
Malema. (2026j). Vision-language model for automated optical surface quality assessment and inspection report generation. *Inclusive Growth and Governance Quarterly*, *2*(1).
