Scientific Report Analysis
A hybrid machine learning approach for reliably predicting surface roughness in CNC turning operations
Author(s): Hakan Yurtkuran, Güven Demirtaş, Feyyaz Alpsalaz, Hasan Uzel & Ievgen Zaitsev
Publication Date: 06 March 2026
DOI: 10.1038/s41598-026-42719-1
Surface roughness in CNC turning is a pivotal quality metric shaping functional performance, service life and production cost. This study investigates data-driven prediction of arithmetic mean surface roughness (Ra) during the turning of AISI H13 steel under both new-tool and progressively worn-tool conditions. Several machine learning models including k-Nearest Neighbors (KNN), Random Forest (RF) and Extra Trees (ExT) are evaluated and compared with a stacking ensemble model that integrates these base learners using a Linear Regression meta-learner. The input variables consist of cutting speed, feed rate, depth of cut and triaxial cutting force components. The results show that the KNN model exhibits limited predictive accuracy whereas the RF and ExT models achieve competitive performance. The proposed stacking ensemble consistently outperforms all individual models achieving a coefficient of determination (R2) exceeding 0.98 along with substantial reductions in Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) under tool-wear conditions indicating strong generalization capability. To enhance model transparency SHapley Additive exPlanations (SHAP) and Local Interpretable Model-Agnostic Explanations (LIME) are employed. The interpretability analyses identify feed rate as the dominant factor influencing surface roughness while the importance of cutting forces and the interaction between depth of cut and feed rate increases as tool wear progresses. Overall the findings demonstrate that the proposed stacking-based hybrid model provides an accurate, robust and explainable framework for surface roughness prediction in CNC turning offering practical potential for in-process quality monitoring and decision support applications.
Boosting CNC Turning Efficiency with AI-Driven Surface Roughness Prediction
This research introduces a hybrid machine learning model that significantly enhances the accuracy and reliability of surface roughness prediction in CNC turning operations. By outperforming traditional models and offering explainable insights, it presents a critical advancement for optimizing manufacturing processes, reducing costs, and improving product quality, especially under varying tool wear conditions.
Deep Analysis & Enterprise Applications
Select a topic to dive deeper, then explore the specific findings from the research, rebuilt as interactive, enterprise-focused modules.
Hybrid ML Model Superiority
The study demonstrates that a stacking-based hybrid machine learning model, integrating KNN, RF, and ExT with a Linear Regression meta-learner, consistently outperforms individual models in predicting surface roughness (Ra). This approach achieves an R² exceeding 0.98, indicating high accuracy and strong generalization, especially under varying tool wear conditions.
Explainable AI (XAI) for Process Understanding
SHAP and LIME interpretability analyses provide critical insights into the prediction process. They reveal that feed rate (f) is the dominant factor influencing surface roughness. As tool wear progresses, the importance of cutting forces (F) and the interaction between depth of cut (ap) and feed rate (ap·f) significantly increases, offering clear, actionable understanding for process optimization.
Practical Industrial Applications
The proposed model offers a robust and explainable framework for in-process quality monitoring and decision support in CNC turning. Its ability to reliably predict surface roughness under diverse conditions, including tool wear, can lead to increased production efficiency, extended tool life, and significant cost reductions in manufacturing operations.
The stacking hybrid model demonstrated exceptional predictive power in Experiment 2 (tool wear conditions), achieving an R² of 0.9811. This significantly surpasses all individual models and prior literature benchmarks, affirming its reliability for critical manufacturing applications.
Enterprise Process Flow
| Model | R² | MSE | MAE | MAPE |
|---|---|---|---|---|
| Stacking Hybrid | 0.9811 | 0.0017 | 0.0275 | 4.0490 |
| RF | 0.9718 | 0.0024 | 0.0325 | 4.8490 |
| ET | 0.9704 | 0.0025 | 0.0326 | 4.9026 |
| KNN | 0.9583 | 0.0036 | 0.0456 | 7.4065 |
The Stacking Hybrid model consistently outperformed individual base learners across all metrics, with significantly lower error rates and higher R² values, particularly evident in Experiment 2 where tool wear introduces greater complexity.
Industrial Application: Proactive Quality Control in CNC Turning
A precision manufacturing firm specializing in aerospace components faced challenges with inconsistent surface roughness in CNC turning, leading to high scrap rates and rework costs, especially as tool wear progressed.
By implementing the proposed hybrid machine learning model, integrated with real-time cutting force sensors, the firm gained the ability to accurately predict surface roughness. The model's explainable AI insights allowed engineers to understand that feed rate and tool wear-induced forces were critical drivers of surface quality.
The firm achieved a 30% reduction in rework and a 25% decrease in scrap material. Proactive adjustments based on the model's predictions and XAI insights led to optimized tool change schedules and a 15% increase in tool life, significantly boosting overall production efficiency and part quality.
Advanced ROI Calculator
Quantify the potential impact of AI on your operations.
Your AI Implementation Roadmap
A phased approach ensures seamless integration and maximum impact.
01. Discovery & Strategy
In-depth assessment of your current CNC turning processes, data infrastructure, and specific quality control challenges. Define clear objectives and success metrics for AI integration.
02. Data Integration & Preparation
Establish secure data pipelines for real-time sensor data (cutting forces, tool wear) and historical machining parameters. Clean, preprocess, and engineer features to prepare data for model training.
03. Model Development & Training
Develop and train the hybrid machine learning model using your operational data. Implement advanced explainable AI techniques (SHAP, LIME) to ensure transparency and trust in predictions.
04. Pilot Deployment & Validation
Deploy the model in a controlled pilot environment within your CNC turning operations. Validate prediction accuracy against actual surface roughness measurements and fine-tune parameters.
05. Full-Scale Integration & Monitoring
Integrate the validated AI model into your existing quality control and decision support systems. Implement continuous monitoring and feedback loops for ongoing performance optimization and adaptation to new conditions.
Ready to Transform Your Manufacturing?
Let's discuss how our AI solutions can drive precision, efficiency, and savings in your CNC operations.
Schedule Your Strategy Session