Machine Learning Framework for Predicting Mechanical Properties of Heat-Treated Alloys: Computational Approach
Abstract
1. Introduction
2. Background and Theoretical Foundations
2.1. Heat Treatment Fundamentals
2.2. Composition-Property Relationships
2.3. Machine Learning in Materials Science
2.4. Data Leakage and Methodological Challenges
- Correlated Property Features: Using yield strength, hardness, or elongation as features to predict tensile strength, when these properties are measured simultaneously and exhibit strong correlations [2].
- Derived Features: Including features calculated from the target variable or its close proxies [20].
- Temporal Leakage: Using information from future time points to predict past events, though less relevant in materials property prediction [39].
- Dataset Redundancy: Including highly similar samples that artificially improve cross-validation performance without enhancing true generalization [22].
3. Materials and Methods
3.1. Dataset Description
3.2. Data Preparation and Feature Selection
3.3. Machine Learning Models and Evaluation
4. Results and Discussion
4.1. Comparative Model Performance with Complete Data Leakage Elimination
4.2. Detailed Diagnostic Evaluation of the Random Forest Model
4.3. Feature Importance and Metallurgical Consistency
| Rank | Feature | Importance (%) | Cumulative (%) |
|---|---|---|---|
| 1 | Tempering/Aging Temperature | 36.8 | 36.8 |
| 2 | Carbon Content | 18.4 | 55.2 |
| 3 | Manganese Content | 12.3 | 67.5 |
| 4 | Austenitizing/Solution Temperature | 8.7 | 76.2 |
| 5 | Chromium Content | 6.9 | 83.1 |
| 6 | Grain Size | 4.2 | 87.3 |
| 7 | Quench/Cooling Rate | 3.8 | 91.1 |
| 8 | Molybdenum Content | 2.9 | 94.0 |
| 9 | Tempering/Aging Time | 1.8 | 95.8 |
| 10 | Silicon Content | 1.3 | 97.1 |
| 11 | Martensite Fraction | 0.9 | 98.0 |
| 12 | Nickel Content | 0.7 | 98.7 |
| 13 | Austenitizing/Solution Time | 0.5 | 99.2 |
| 14 | Aluminum Content | 0.4 | 99.6 |
| 15 | Magnesium Content | 0.4 | 100.0 |

4.4. Cross-Validation of Feature Selection Robustness

4.5. Algorithmic Performance, Generalization, and Methodological Implications
| Alloy System | n | Mean Strength (MPa) | R2 | RMSE (MPa) | MAE (MPa) | MAPE (%) |
|---|---|---|---|---|---|---|
| AISI 4140 | 8 | 645.3 | 0.9456 | 32.45 | 25.67 | 3.98 |
| AISI 1080 | 6 | 712.8 | 0.9234 | 38.92 | 31.23 | 4.38 |
| AISI 4340 | 7 | 678.4 | 0.9389 | 35.12 | 28.45 | 4.19 |
| AISI 5130 | 5 | 598.7 | 0.9512 | 29.87 | 23.56 | 3.94 |
| AlSi7Mg | 4 | 285.6 | 0.8967 | 45.23 | 38.67 | 13.54 |
| AlSi10Mg | 4 | 298.4 | 0.8834 | 48.56 | 41.23 | 13.82 |
| Al6061 | 5 | 312.5 | 0.9123 | 42.34 | 35.89 | 11.49 |
| Al2618 | 4 | 445.8 | 0.9267 | 38.45 | 32.12 | 7.21 |
| AISI 304 | 4 | 598.2 | 0.9345 | 36.78 | 29.87 | 4.99 |
| AISI 316L | 3 | 612.4 | 0.9289 | 37.92 | 30.45 | 4.97 |
Forward Prediction Without Microstructural Features
5. Conclusions
- •
- Data Leakage Elimination: A systematic feature selection protocol identified and removed all six mechanical property features that would constitute data leakage, retaining 22 independent predictive features comprising composition, heat treatment parameters, and microstructural characteristics. This ensures that the model can be applied in realistic forward prediction scenarios where only composition and processing parameters are known before material synthesis.
- •
- Superior Algorithm Performance: Random Forest regression achieved the best test set performance (R2 = 0.9282, RMSE = 37.24 MPa, MAE = 28.54 MPa, MAPE = 5.39%), outperforming Extra Trees, Gradient Boosting, Ridge, and ElasticNet. The minimal training-to-test R2 gap (0.0647) confirms excellent generalization with limited overfitting.
- •
- Metallurgically Consistent Feature Importance: Feature importance analysis revealed that tempering temperature (36.8%), carbon content (18.4%), and manganese content (12.3%) are the dominant predictors of tensile strength, consistent with established metallurgical principles governing heat treatment response and hardenability. The top five features account for 76.2% of cumulative importance, indicating that tensile strength prediction is dominated by a relatively small subset of critical parameters.
- •
- Multi-Alloy Capability: The framework successfully handles diverse alloy systems (carbon steels, low-alloy steels, aluminum alloys, stainless steels) within a unified model, demonstrating broader applicability than system-specific approaches. Steel alloys showed superior prediction accuracy (R2 = 0.92–0.95, MAPE = 3.9–5.0%) compared to aluminum alloys (R2 = 0.88–0.93, MAPE = 7.2–13.8%).
- •
- The model exhibits excellent computational performance, enabling rapid property prediction for interactive alloy design applications and integration into manufacturing process control systems.
- •
- The achieved performance (R2 = 0.9282, MAPE = 5.39%) with leakage-free features represents authentic predictive capability and provides a realistic benchmark for mechanical property prediction in heat-treated alloys. This framework represents a methodological demonstration with performance metrics serving as benchmarks against the synthetic dataset. Experimental validation with real alloy data is the critical next step and remains mandatory before industrial deployment. The synthetic data approach enabled rigorous control over data leakage while demonstrating the framework’s capability, but real-world performance must be confirmed through systematic experimental validation across diverse alloy systems.
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Liang, J.; Zhao, Z.; Tang, D.; Ye, N.; Yang, S.; Liu, W. Effect of heat treatment on microstructure and mechanical properties of low-alloy wear-resistant steel NM450. Mater. Res. Express 2021, 8, 016502. [Google Scholar] [CrossRef]
- Wagner, N.; Rondinelli, J.M. Theory-Guided Machine Learning in Materials Science. Front. Mater. 2016, 3, 28. [Google Scholar] [CrossRef]
- Sharma, A.; Mukhopadhyay, T.; Rangappa, S.M.; Siengchin, S.; Kushvaha, V. Advances in Computational Intelligence of Polymer Composite Materials: Machine Learning Assisted Modeling, Analysis and Design. Arch. Comput. Methods Eng. 2022, 29, 3341–3385. [Google Scholar] [CrossRef]
- Prates, P.A.; Oliveira, M.C.; Fernandes, J.V. Recent Advances and Applications of Machine Learning in Metal Forming Processes. Metals 2022, 12, 1342. [Google Scholar] [CrossRef]
- Cheng, Y.; Zhao, Y.; Liu, Y.; Wang, H.; Wang, G. Composition design and optimization of Fe-C-Mn-Al steel based on machine learning. Phys. Chem. Chem. Phys. 2024, 26, 6222–6232. [Google Scholar] [CrossRef]
- Pan, X.; Zhang, N.; Fu, M.; Wang, H. Deep Learning Methods Utilization in Mechanical Property of Medium-Mn Steel. Steel Res. Int. 2024, 95, 2400243. [Google Scholar] [CrossRef]
- Wang, C.; Shen, C.; Cui, Q.; Zhang, X.; Xu, W. An optimized machine-learning model for mechanical properties prediction and domain knowledge clarification in quenched and tempered steels. J. Mater. Res. Technol. 2023, 24, 6829–6842. [Google Scholar] [CrossRef]
- Lin, Y.; Luo, S.; Huang, J.; Yin, L.; Jiang, X. Effect of heat treatment process on tensile properties of 2A97 Al−Li alloy: Experiment and BP neural network simulation. Trans. Nonferrous Met. Soc. China 2013, 23, 1728–1736. [Google Scholar] [CrossRef]
- Cao, L.; Li, C.; Wang, Q.; Che, J.; Wang, M. Predicting Mechanical Properties and Corrosion Resistance of Heat-Treated 7N01 Aluminum Alloy by Machine Learning Methods. IOP Conf. Ser. Mater. Sci. Eng. 2020, 774, 012030. [Google Scholar] [CrossRef]
- Long, Y.; Zhang, J.; Chen, Q.; Wu, Q.; Li, C. Prediction of Mechanical Properties of 6061 aluminum Alloy After Heat Treatment Based on GA-BP Neural Network. Int. J. Comput. Sci. Inf. Technol. 2024, 4, 91–97. [Google Scholar] [CrossRef]
- Zhao, Y.; Zhang, J.; Wang, C.; Kitipornchai, S.; Yang, J. An interpretable stacking ensemble model for high-entropy alloy mechanical property prediction. Front. Mater. 2025, 12, 1601874. [Google Scholar] [CrossRef]
- Wang, C.; Fu, H.; Jiang, L.; Xue, D.; Xie, J. A neural network model for high entropy alloy design. npj Comput. Mater. 2023, 9, 60. [Google Scholar] [CrossRef]
- Xiong, J.; Shi, S.Q.; Zhang, T.Y. Machine Learning of Mechanical Properties of Steels. Sci. China Technol. Sci. 2020, 63, 1247–1255. [Google Scholar] [CrossRef]
- Tavares, S.S.M.; Pedroza, P.F.S.; Teodósio, J.R.; Gurova, T. Mechanical properties prediction of dual phase steels using machine learning. Tecnol. Em Metal. Mater. E Mineração 2022, 19, e2595. [Google Scholar] [CrossRef]
- Karande, S.D.; Huan, T.D.; Emery, A.A.; Wolverton, C.; Ramprasad, R. A Strategic Approach to Machine Learning for Material Science: How to Tackle Real-World Challenges and Avoid Pitfalls. Chem. Mater. 2022, 34, 6229–6239. [Google Scholar] [CrossRef]
- Zhang, Y.; Ling, C.; Zhao, J. Prediction of the yield strength of as-cast alloys using the random forest algorithm. Mater. Today Commun. 2024, 39, 108520. [Google Scholar] [CrossRef]
- Kwak, S.; Kim, J.; Ding, H.; Xu, X.; Chen, R.; Guo, J.; Fu, H. Machine learning prediction of the mechanical properties of γ-TiAl alloys produced using random forest regression model. J. Mater. Res. Technol. 2022, 18, 520–530. [Google Scholar] [CrossRef]
- Shimakawa, K.; Aoki, Y.; Ozaki, T. Prevention of Leakage in Machine Learning Prediction for Polymer Composite Properties. J. Chem. Inf. Model. 2024, 64, 1477–1490. [Google Scholar] [CrossRef] [PubMed]
- Hamdan, S.; Kiesow, H.; Schäfer, A.; Wiersch, L.; Eickhoff, S.B.; Patil, K.R. Julearn: An easy-to-use library for leakage-free evaluation and inspection of ML models. GigaByte 2024, 2024, 113. [Google Scholar] [CrossRef]
- Skocik, M.; Collins, A.; Callahan-Flintoft, C.; Bowman, H.; Wyble, B. I tried a bunch of things: The dangers of unexpected overfitting in classification. bioRxiv 2016, 078816. [Google Scholar] [CrossRef]
- Witman, M.; Eremin, R.A.; Aykol, M.; Gorai, P.; Dylla, M.; Legrain, F.; Shyam, B.; Sahu, S.; Bercx, M.; Jain, A.; et al. MatFold: Systematic insights into materials discovery models’ performance through standardized cross-validation protocols. Digit. Discov. 2024, 3, 2233–2246. [Google Scholar] [CrossRef]
- Fu, X.; Qin, M.; Li, X.; Zhong, Y.; Guo, G.C. MD-HIT: Machine learning for materials property prediction with dataset redundancy control. arXiv 2023. [Google Scholar] [CrossRef]
- Hoock, M.; Sauceda, H.E.; Müller, K.R.; Chmiela, S. Advancing descriptor search in materials science: Feature engineering and selection strategies. New J. Phys. 2022, 24, 113003. [Google Scholar] [CrossRef]
- ASTM E8/E8M-24; Standard Test Methods for Tension Testing of Metallic Materials. ASTM International: West Conshohocken, PA, USA, 2024.
- ISO 6892-1:2019; Metallic Materials—Tensile Testing—Part 1: Method of Test at Room Temperature. International Organization for Standardization: Geneva, Switzerland, 2019.
- Kang, M.; Kim, C.; Lee, B. Effect of Heat Treatment on Microstructure and Mechanical Properties of High-Strength Steel for in Hot Forging Products. Metals 2021, 11, 768. [Google Scholar] [CrossRef]
- Liu, F.; Lin, X.; Yang, G.; Song, M.; Chen, J.; Huang, W. Effect of multistage heat treatment on microstructure and mechanical properties of high-strength low-alloy steel. Metall. Mater. Trans. A 2016, 47, 1960–1974. [Google Scholar] [CrossRef]
- Peng, J.; Yamamoto, Y.; Hawk, J.A.; Lara-Curzio, E.; Shin, D. Coupling physics in machine learning to predict properties of high-temperatures alloys. npj Comput. Mater. 2020, 6, 141. [Google Scholar] [CrossRef]
- Zhao, Y.; Zhang, W.; Liu, C.; Gu, Y.; Wang, Q.; Dong, N. Effects of Tempering Temperature on the Microstructure and Mechanical Properties of T92 Heat-Resistant Steel. Metals 2019, 9, 194. [Google Scholar] [CrossRef]
- Yu, H.; Wang, Z.; Fan, Q.; Wang, X.; Dong, H. Microstructural evolution and mechanical properties of 55NiCrMoV7 hot-work die steel during quenching and tempering treatments. Adv. Manuf. 2021, 9, 520–533. [Google Scholar] [CrossRef]
- Wei, S.; Liu, J.; Liang, Y.; Zhou, L. Effect of temper method on the microstructure and mechanical properties of quenched-tempered high strength steel. Mater. Sci. Technol. 2012, 28, 1312–1318. [Google Scholar]
- Apichai, T. Influence of six-step heat treatment on microstructures and mechanical properties of 5160 alloy steel. J. Met. Mater. Miner. 2022, 32, 56–63. [Google Scholar] [CrossRef]
- Maisonnette, D.; Suery, M.; Nelias, D.; Chaudet, P.; Epicier, T. Effects of heat treatments on the microstructure and mechanical properties of a 6061 aluminium alloy. Mater. Sci. Eng. A 2011, 528, 2718–2724. [Google Scholar] [CrossRef]
- Liu, Y.; Liu, D.; Ren, D.; Tang, K.; Xu, L.; Bai, Z.; Shan, A. The Effects of Heat Treatment on Microstructure and Mechanical Properties of Selective Laser Melting 6061 Aluminum Alloy. Micromachines 2022, 13, 1059. [Google Scholar] [CrossRef]
- Çoban, M. Heat treatment of AISI 1040 and AISI 4140 steels: Microstructure-mechanical property relationships for normalization, spheroidization and quenching-tempering. J. Innov. Eng. Nat. Sci. 2025, 5, 556–567. [Google Scholar] [CrossRef]
- Hu, M.; Tan, Q.; Knibbe, R.; Wang, S.; Li, X.; Wu, T.; Jarin, S.; Zhang, M. Prediction of Mechanical Properties of Wrought Aluminium Alloys Using Feature Engineering Assisted Machine Learning Approach. Metall. Mater. Trans. A 2021, 52, 2873–2884. [Google Scholar] [CrossRef]
- Alibeiki, E.; Rajabi, J.; Rajabi, J. Prediction of Mechanical Properties of to Heat Treatment by Artificial Neural Networks. J. Asian Sci. Res. 2012, 2, 742–746. Available online: https://archive.aessweb.com/index.php/5003/article/view/3423/5466 (accessed on 10 March 2026).
- Luukkonen, P.; Kaikkonen, P.; Somani, M.; Kömi, J.; Porter, D. Gradient Boosted Regression Trees for Modelling Onset of Austenite Decomposition During Cooling of Steels. Metall. Mater. Trans. B 2023, 54, 1458–1476. [Google Scholar] [CrossRef]
- Cearns, M.; Hahn, T.; Baune, B.T. Recommendations and future directions for supervised machine learning in psychiatry. Transl. Psychiatry 2019, 9, 271. [Google Scholar] [CrossRef]
- Leni, D. Prediction Modeling of Low Alloy Steel Based on Chemical Composition and Heat Treatment Using Artificial Neural Network. J. Polimesin 2023, 21, 530–537. [Google Scholar] [CrossRef]
- Kaneko, H. Cross-validated permutation feature importance considering correlation between features. Anal. Sci. Adv. 2022, 3, 278–287. [Google Scholar] [CrossRef]
- Leni, D.; Karudin, A.; Abbas, M.R.; Sharma, J.K.; Adriansyah, A. Optimizing stainless steel tensile strength analysis: Through data exploration and machine learning design with Streamlit. Eureka: Phys. Eng. 2024, 2024, 73–88. [Google Scholar] [CrossRef]
- Wang, Y.; Chen, C.; Yang, X.-Y.; Zhang, Z.-R.; Wang, J.; Li, Z.; Chen, L.; Mu, W.-Z. Solidification modes and δ-ferrite of two types of 316L stainless steels: A combination of as-cast microstructure and HT-CLSM research. J. Iron Steel Res. Int. 2025, 32, 426–436. [Google Scholar] [CrossRef]
- Chen, L.; Wang, Y.; Li, Y.; Zhang, Z.; Xue, Z.; Ban, X.; Hu, C.; Li, H.; Tian, J.; Mu, W.; et al. Effect of nickel content and cooling rate on the microstructure of as-cast 316 stainless steels. Crystals 2025, 15, 168. [Google Scholar] [CrossRef]




| Algorithm | Set | R2 | RMSE (MPa) | MAE (MPa) | MAPE (%) | Max Error (MPa) |
|---|---|---|---|---|---|---|
| Extra Trees | Train | 0.9856 | 19.85 | 13.42 | 2.68 | 89.23 |
| Valid | 0.9156 | 45.67 | 34.21 | 6.89 | 142.56 | |
| Test | 0.9187 | 39.58 | 30.12 | 5.78 | 128.34 | |
| Random Forest | Train | 0.9929 | 13.95 | 9.87 | 1.95 | 67.45 |
| Valid | 0.9245 | 43.21 | 32.45 | 6.54 | 135.67 | |
| Test | 0.9282 | 37.24 | 28.54 | 5.39 | 121.89 | |
| Gradient Boosting | Train | 0.9678 | 29.67 | 21.34 | 4.23 | 98.76 |
| Valid | 0.9134 | 46.23 | 35.67 | 7.12 | 145.23 | |
| Test | 0.9156 | 40.34 | 31.23 | 5.98 | 132.45 | |
| Ridge | Train | 0.8234 | 69.45 | 54.32 | 11.23 | 198.67 |
| Valid | 0.8156 | 67.56 | 52.89 | 10.98 | 189.34 | |
| Test | 0.8198 | 58.92 | 46.78 | 9.87 | 176.23 | |
| ElasticNet | Train | 0.8189 | 70.34 | 55.12 | 11.45 | 201.23 |
| Valid | 0.8123 | 68.12 | 53.45 | 11.12 | 192.67 | |
| Test | 0.8167 | 59.45 | 47.23 | 10.01 | 178.89 |
| Fold | R2 | RMSE (MPa) | MAE (MPa) | MAPE (%) |
|---|---|---|---|---|
| 1 | 0.9267 | 41.23 | 31.45 | 6.12 |
| 2 | 0.9312 | 39.87 | 30.23 | 5.89 |
| 3 | 0.9189 | 43.56 | 33.12 | 6.45 |
| 4 | 0.9345 | 38.92 | 29.67 | 5.67 |
| 5 | 0.9278 | 40.45 | 31.89 | 6.01 |
| Mean | 0.9278 | 40.81 | 31.27 | 6.03 |
| Std | 0.0056 | 1.78 | 1.23 | 0.28 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Tiwari, S.; Gupta, A. Machine Learning Framework for Predicting Mechanical Properties of Heat-Treated Alloys: Computational Approach. Metals 2026, 16, 320. https://doi.org/10.3390/met16030320
Tiwari S, Gupta A. Machine Learning Framework for Predicting Mechanical Properties of Heat-Treated Alloys: Computational Approach. Metals. 2026; 16(3):320. https://doi.org/10.3390/met16030320
Chicago/Turabian StyleTiwari, Saurabh, and Aman Gupta. 2026. "Machine Learning Framework for Predicting Mechanical Properties of Heat-Treated Alloys: Computational Approach" Metals 16, no. 3: 320. https://doi.org/10.3390/met16030320
APA StyleTiwari, S., & Gupta, A. (2026). Machine Learning Framework for Predicting Mechanical Properties of Heat-Treated Alloys: Computational Approach. Metals, 16(3), 320. https://doi.org/10.3390/met16030320
