Journal of Applied Science and Engineering

Published by Tamkang University Press

ESCI jase impact factor scopus logo open access rate of Scopus journal

CGAN-KSR: Surface Roughness Prediction in CNC Milling from Small Samples

Thanh-Nhan Nguyen1, Dinh-Khang Bach1, Thai-Viet Dang2, and Anh-Dung Nguyen1

1Department of Mechanical Engineering, School of Mechanical Engineering, Hanoi University of Science and Technology, Hanoi, 10000, Vietnam

2Department of Mechatronics, School of Mechanical Engineering, Hanoi University of Science and Technology, Hanoi, 10000, Vietnam

Received: June 19, 2026
Accepted: August 25, 2026
Publication Date: October 09, 2026

上傳圖片

Architecture and training workflow of the CGAN model for surface roughness prediction.

 Copyright The Author(s). This is an open access article distributed under the terms of the Creative Commons Attribution License (CC BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are cited.

Download Citation: BibTeX | http://dx.doi.org/10.6180/jase.202701_36.014

Download PDF

Surface roughness (Ra) prediction in CNC milling is impeded by small experimental datasets that cover the cutting-parameter space sparsely and unevenly. This paper proposes a hybrid CGAN-KSR framework integrating conditional data augmentation with nonparametric smoothing under a leakage-free evaluation protocol. A Conditional GAN (CGAN) is trained on eight CNC milling experiments on Y8 carbon tool steel to learn the conditional distribution of Ra given the cutting parameters. Within each cross-validation fold the trained CGAN generates 20 condition-consistent synthetic samples at unobserved grid conditions, and a Kernel Smoothing Regression (KSR) model is fitted to the 27 combined samples. KSR is adopted not for predictive superiority but because it delivers a continuous, smooth response surface from which a process window can be read directly. Under Leave-One-Out Cross-Validation, augmentation reduces MSE from 0.363 to 0.142 (60.8%) and RMSE from 0.603 to 0.377 μm (37.4%) relative to a KSR baseline trained solely on experimental data. A percentile bootstrap 95% confidence interval for the paired MSE difference, [0.023, 0.443], is consistent with a directional improvement rather than a strongly powered or definitive statistical result, and the sign test does not reach significance at n = 8 (6 of 8 folds, P = 0.145). Ablation experiments show the gain is specific to conditional generation rather than sample volume, and is reproduced by augmented SVR and Gaussian Process models. Crucially, augmentation degrades uncertainty calibration: the 95% predictive intervals of an augmented Gaussian Process cover only 25% of held-out cases. The study therefore demonstrates feasibility, under the single material, tool and parameter range investigated, rather than general applicability.

Keywords: Surface roughness prediction; CNC milling; Conditional GAN (CGAN); Data augmentation; Kernel smoothing regression; Small-sample learning

  1. [1] J. H. Ko and C. Yin, (2026) “A review of artificial intelligence application for machining surface quality prediction: from key factors to model development” Journal of Intelligent Manufacturing 37: 775-798. DOI: https://doi.org/10.1007/s10845-025-02571-y.
  2. [2] H. Yang, H. Zheng, and T. Zhang, (2024) “A review of artificial intelligent methods for machined surface roughness prediction” Tribology International 199: 109935. DOI: https://doi.org/10.1016/j.triboint.2024.109935.
  3. [3] J. V. Abellán-Nebot, C. Vila Pastor, and H. R. Siller, (2024) “A review of the factors influencing surface roughness in machining and their impact on sustainability” Sustainability 16(5): 1917. DOI: https://doi.org/10.3390/su16051917.
  4. [4] L. Liu, X. Zhang, X. Wan, S. Zhou, and Z. Gao, (2022) “Digital twin-driven surface roughness prediction and process parameter adaptive optimization” Advanced Engineering Informatics 51: 101470. DOI: https://doi.org/10.1016/j.aei.2021.101470.
  5. [5] L. Hu, R. Gao, and Y. B. Guo, (2023) “Transfer learning enhanced Gaussian process model for surface roughness prediction with small data” Manufacturing Letters 35: 1103-1108. DOI: https://doi.org/10.1016/j.mfglet.2023.08.094.
  6. [6] C. Cooper, J. Zhang, Y. B. Guo, and R. X. Gao, (2023) “Surface roughness prediction through GAN-synthesized power signal as a process signature” Journal of Manufacturing Systems 68: 660-669. DOI: https://doi.org/10.1016/j.jmsy.2023.05.016.
  7. [7] J. Wang, T. Chen, and D. Kong, (2023) “Knowledge-based neural network for surface roughness prediction of ball-end milling” Mechanical Systems and Signal Processing 194: 110282. DOI: https://doi.org/10.1016/j.ymssp.2023.110282.
  8. [8] L. Sun, X. Huang, X. Wang, Y. Zhang, M. Li, and Z. Liu, (2026) “Physics-informed deep learning method for surface roughness prediction in milling processes” Advanced Engineering Informatics 69: 103803. DOI: https://doi.org/10.1016/j.aei.2025.103803.
  9. [9] R. Wang, M. N. Cheng, Y. M. K. Loh, C. Wang, and C. F. Cheung, (2022) “Ensemble learning with a genetic algorithm for surface roughness prediction in multi-jet polishing” Expert Systems with Applications 207: 118024. DOI: https://doi.org/10.1016/j.eswa.2022.118024.
  10. [10] S. Pedrammehr, M. Hejazian, M. R. Chalak Qazani, H. Parvaz, S. Pakzad, M. Ettefagh, et al., (2022) “Machine learning-based modelling and meta-heuristic-based optimization of specific tool wear and surface roughness in the milling process” Axioms 11(9): 430. DOI: https://doi.org/10.3390/axioms11090430.
  11. [11] J. Chen, J. Lin, M. Zhang, and Q. Lin, (2024) “Predicting surface roughness in turning complex-structured workpieces using vibration-signal-based Gaussian process regression” Sensors 24(7): 2117. DOI: https://doi.org/10.3390/s24072117.
  12. [12] C. Feng, M. Li, H. Guo, B. Qiu, and J. Zhang, (2024) “Energy efficiency identification and surface roughness prediction using cutting force signal for computer numerical controlled machine systems” Scientific Reports 14(1): 19004. DOI: https://doi.org/10.1038/s41598-024-69979-z.
  13. [13] L. Song, C. Yan, G. Tu, M. Xiang, and Y. Liu, (2023) “Prediction and optimization of surface roughness in high-speed dry milling of 30CrMnSiNiA using GPR and MO-HHO algorithm” International Journal of Advanced Manufacturing Technology 128: 4357-4377. DOI: https://doi.org/10.1007/s00170-023-12167-6.
  14. [14] C. Cooper, J. Zhang, Y. B. Guo, and R. X. Gao, (2025) “Surface roughness prediction in machining using two-stage domain-incremental learning with input dimensionality expansion” Journal of Manufacturing Systems 80: 503-510. DOI: https://doi.org/10.1016/j.jmsy.2025.03.014.
  15. [15] A. Balasuadhakar, S. T. Kumaran, and M. Uthayakumar, (2025) “Machine learning prediction of surface roughness in sustainable machining of AISI H11 tool steel” Smart Materials in Manufacturing 3: 100075. DOI: https://doi.org/10.1016/j.smmf.2025.100075.
  16. [16] J. K. Abbas, S. H. Aghdeab, and A. Al-Habaibeh, (2025) “Investigating the effect of process parameters on surface roughness of AISI M2 steel in EDM using deep learning neural networks” International Journal of Advanced Manufacturing Technology 137: 251-262. DOI: https://doi.org/10.1007/s00170-025-15184-9.
  17. [17] M. Guo, S. Wei, C. Han, W. Xia, C. Luo, and Z. Lin, (2024) “Prediction of surface roughness using deep learning and data augmentation” Journal of Intelligent Manufacturing and Special Equipment 5(1): 221-241. DOI: https://doi.org/10.1108/JIMSE-10-2023-0010.
  18. [18] B. Zhang, X. Liu, C. Yue, S. Liu, X. Li, S. Y. Liang, et al., (2025) “An imbalanced data learning approach for tool wear monitoring based on data augmentation” Journal of Intelligent Manufacturing 36: 399-420. DOI: https://doi.org/10.1007/s10845-023-02235-9.
  19. [19] R. Liu and W. Tian, (2024) “A novel approach to surface roughness virtual sample generation to address the small sample size problem in ultra-precision machining” Sensors 24(11): 3621. DOI: https://doi.org/10.3390/s24113621.
  20. [20] W. Tian, J. Zhang, F. Zhao, X. Feng, X. Mei, G. Chen, and H. Wang, (2024) “Interpolation-based virtual sample generation for surface roughness prediction” Journal of Intelligent Manufacturing 35: 343-353. DOI: https://doi.org/10.1007/s10845-022-02054-4.
  21. [21] Y. Chen, Z. Yan, and Y. Zhu, (2024) “A comprehensive survey for generative data augmentation” Neurocomputing 600: 128167. DOI: https://doi.org/10.1016/j.neucom.2024.128167.
  22. [22] K. Sohn, H. Lee, and X. Yan. “Learning structured output representation using deep conditional generative models”. In: Advances in Neural Information Processing Systems (NeurIPS). 28. Montreal, QC, Canada, 2015, 3483-3491. URL: https://papers.nips.cc/paper_files/paper/2015/hash/8d55a249e6baa5c06772297520da2051-Abstract.html.
  23. [23] I. Gulrajani, F. Ahmed, M. Arjovsky, V. Dumoulin, and A. C. Courville. “Improved training of Wasserstein GANs”. In: Advances in Neural Information Processing Systems (NeurIPS). Long Beach, CA, USA, 2017, 5767-5777. DOI: https://doi.org/10.48550/arXiv.1704.00028.
  24. [24] J. Ho, A. Jain, and P. Abbeel. “Denoising diffusion probabilistic models”. In: Advances in Neural Information Processing Systems (NeurIPS). Virtual, 2020, 6840-6851. DOI: https://doi.org/10.48550/arXiv.2006.11239.
  25. [25] E. A. Nadaraya, (1964) “On estimating regression” Theory of Probability and Its Applications 9(1): 141-142. DOI: https://doi.org/10.1137/1109020.
  26. [26] G. S. Watson, (1964) “Smooth regression analysis” Sankhya: The Indian Journal of Statistics, Series A 26(4): 359-372. URL: https://www.jstor.org/stable/25049340.
  27. [27] L. Wasserman. All of Nonparametric Statistics. New York, NY, USA: Springer, 2006. DOI: https://doi.org/10.1007/0-387-30623-4.
  28. [28] B. W. Silverman. Density Estimation for Statistics and Data Analysis. Boca Raton, FL, USA: Chapman & Hall/CRC, 2018. DOI: https://doi.org/10.1201/9781315140919.
  29. [29] A. Wibowo and M. I. Desa, (2012) “Kernel based regression and genetic algorithms for estimating cutting conditions of surface roughness in end milling machining process” Expert Systems with Applications 39(14): 11634-11641. DOI: https://doi.org/10.1016/j.eswa.2012.04.004.
  30. [30] H. P. Tran. “Study on the influence of technological parameters on the machined surface quality of several steels used to manufacture tooling components in the metal-forming industry, by CNC milling”. In Vietnamese; original title begins “Nghien cuu anh huong cua cac thong so cong nghe toi chat luong be mat gia cong” (diacritics omitted). Source of the experimental measurements reused in the present study. (Master’s thesis). Hanoi, Vietnam: Hanoi University of Science and Technology, 2023. URL: http://dlib.hust.edu.vn/handle/HUST/22858.
  31. [31] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, et al. “Generative adversarial nets”. In: Advances in Neural Information Processing Systems (NeurIPS). Montreal, QC, Canada, 2014, 2672-2680. DOI: https://doi.org/10.48550/arXiv.1406.2661.
  32. [32] M. Mirza and S. Osindero. Conditional generative adversarial nets. arXiv:1411.1784. 2014. DOI: https://doi.org/10.48550/arXiv.1411.1784.
  33. [33] H. Öktem, (2009) “An integrated study of surface roughness for modelling and optimization of cutting parameters during end milling operation” International Journal of Advanced Manufacturing Technology 43: 852-861. DOI: https://doi.org/10.1007/s00170-008-1763-3.
  34. [34] C. Duan and Q. Hao, (2014) “Surface roughness prediction of end milling process based on IPSO-LSSVM” Journal of Advanced Mechanical Design, Systems, and Manufacturing 8(3): JAMDSM0024. DOI: https://doi.org/10.1299/jamdsm.2014jamdsm0024.
  35. [35] G. A. V. B. Vasconcelos, M. B. Francisco, C. H. de Oliveira, E. L. Barbedo, L. G. Paes de Souza, and M. L. Noronha Motta Melo, (2024) “Prediction of surface roughness in duplex stainless steel top milling using machine learning techniques” International Journal of Advanced Manufacturing Technology 134: 2939-2953. DOI: https://doi.org/10.1007/s00170-024-14290-4.
  36. [36] B. Efron and R. J. Tibshirani. An Introduction to the Bootstrap. Boca Raton, FL, USA: Chapman & Hall/CRC, 1994. DOI: https://doi.org/10.1201/9780429246593.