1. Introduction
Steel is the most widely used metallic material in the world, playing a crucial role across sectors such as construction (beams, reinforcement bars), transportation (automotive frames, shipbuilding), infrastructure (bridges, pipelines), and machinery. According to the World Steel Association, over 1.8 billion tonnes of steel are produced annually as of the early 2020s, significantly outpacing the production of aluminium, copper, or titanium. H13 tool steel, a versatile chromium-molybdenum alloy, is commonly utilised in demanding industrial applications, particularly where high temperatures are involved. Its primary uses include hot forging, die casting, extrusion, and the creation of moulds and dies for injection moulding. H13 is valued for its remarkable resistance to heat, wear, and thermal fatigue [
1,
2]. Traditionally, H13 is manufactured through processes such as melting, casting, forging, and heat treatment, all of which optimise its mechanical properties and stability. It is known for its excellent combination of hardness, toughness, and ability to maintain strength at elevated temperatures, often up to 600 °C. These attributes make H13 a preferred choice in the tooling, aerospace, and automotive industries, where reliability and durability are essential. On the other hand, H13 steel is difficult to weld due to its high content of carbide-forming elements and high hardenability, both of which result from its chemical composition. These two characteristics result in a hard, brittle microstructure during welding, thereby increasing the material’s susceptibility to cracking. Furthermore, the amount of heat introduced during the welding process leads to the softening of the microstructure, thus reducing its mechanical properties [
3,
4]. Therefore, the microstructure and mechanical properties of H13 steel after various fabrication methods remain the subject of ongoing research.
Nowadays, H13 steel is also produced using various additive manufacturing technologies outlined in ASTM/ISO 52900:2021 [
5]. One notable method is Direct Energy Deposition (DED), one of the seven Additive Manufacturing (AM) technologies defined in this standard. DED is effective for fabricating functionally graded materials (FGMs) and for repairing high-value dies. Recent studies indicate that intrinsic heat treatment during DED creates a graded microstructure that improves wear resistance [
6]. The Wire Arc Additive Manufacturing (WAAM) process, a type of DED technology, offers deposition rates of 1–4 kg/h. This makes WAAM particularly suitable for manufacturing hot-working tools. Tooling made by WAAM with integrated conformal channels can reduce part mass by about 25% using strategically placed voids without losing structural integrity [
7]. However, DED processes face limitations related to channel diameter, which must be several millimetres. Additionally, producing features with highly inclined surfaces is also difficult, and additional machining is often required to achieve the desired surface topography.
The attainment of optimal geometrical freedom and precision in AM is predominantly realised through powder-in-bed technlogies, notably Binder Jetting (BJT) and Powder Bed Fusion (PBF). In the case of BJT, it has been demonstrated that a density of 95% for H13 steel can be achieved, alongside a hardness value of 499 HV10, following the sintering of green parts within a temperature range of 1410–1415 °C [
8]. This methodology capitalises on the utilisation of fine powders, characterised by diameters less than 10
m. In contrast, market availability of such fine metallic powders is somewhat constrained, as most commercially available options possess diameters ranging from 30 to 70
m. Furthermore, a density below 99% of the theoretical density limits its use in some more demanding applications. Conversely, Powder Bed Fusion using a Laser Beam (PBF-LB) stands out as a process that can generate stainless steel cellular structures with densities exceeding 99.5% [
9]. However, the problems addressed in PBF-LB processes still include process parameter optimisation, density and porosity prediction, defect detection, and melt pool geometry prediction.
AI and machine learning approaches are increasingly being utilised to tackle these challenges. Liu et al. [
10] conducted a comprehensive review of ML applications in PBF-LB processes, examining the interconnections among process parameters, microstructure, mechanical properties, and overall performance. This review highlighted the substantial potential of various ML techniques for optimising additive manufacturing processes and accurately predicting material properties. Current artificial intelligence (AI) models can recommend optimal material selections and process configurations to achieve the desired product performance, while also facilitating the development of innovative composites and improving mechanical behaviour through a deeper understanding of material physics [
11]. In additive manufacturing, traditional machine learning models have been widely used to predict porosity and density. These include Linear Regression (LR), Decision Trees (DT), Support Vector Machines (SVM), and Random Forests Regression (RFR) have been employed to predict the porosity and density of various steels. These models typically utilise hand-engineered features, including laser power “P” [W], scanning speed “V” [mm/s], distance between scanning vectors “H” [
m], and layer thickness “T” [
m], and perform effectively on relatively small, structured datasets [
12]. For property prediction, studies have successfully employed classical ML models to predict ultimate tensile strength and elongation [
13] and deep neural networks to link in situ photodiode signals with mechanical performance in PBF-LB parts [
14]. AI is used to predict the fatigue life of metals and to analyse the factors that influence it, including material properties, manufacturing processes, service conditions, environmental factors, and operational usage [
15,
16,
17]. Process parameter-based ML models have achieved over 99% accuracy in predicting part density across metals such as aluminium and nickel alloys [
18]. Benchmarking studies have further strengthened the field by evaluating ML performance across diverse materials and machines [
19]. Melt pool geometry, a critical factor in determining microstructure, has also been predicted using ML models [
20] and experimental ML pipelines like MeltpoolNet [
21]. Deep learning models based on artificial neural network (ANN) architectures can automatically extract complex features from large, unstructured data, such as images, sensor streams, or process videos, capturing intricate patterns, including defect formation and surface quality variations, that classical models might miss. ANN showed high potential for real-time defect detection in the PBF-LB process, aiming to improve product quality and process reliability [
22]. They can infer internal flaws from surface features [
23] and segment microstructural defects, such as lack of fusion or porosity, in samples [
24]. Deep neural networks can analyse thermographic images of samples to detect defects [
25], achieving 96.8% accuracy in detecting porosity/cracks. Together, these advances demonstrate AI/ML’s vast potential to enable predictive, adaptive, and intelligent AM systems.
This study focuses on selecting parameters for the PBF-LB process, which is essential for industry, especially when working with new materials or transitioning between feedstock suppliers. Such parameter selection represents the initial stage of optimising the PBF-LB process. Currently, identifying process parameters that effectively minimise porosity (a material property that significantly affects mechanical properties) is both time-consuming and resource-intensive. Typically, this optimisation process involves adjusting multiple parameters and producing a substantial number of samples for characterisation. The primary objective of our research is to assess the effectiveness of various ML models for predicting PBF-LB process parameters and achieving densities that closely match theoretical values, particularly for H13 steel, which poses challenges during welding. We introduce the application of eight ML models to predict the PBF-LB process parameters that yield the lowest porosity in H13 steel, specifically on building platforms preheated to 350 250 °C. In our study, the preheating temperature exceeds the 200–250 °C range, which is typically the maximum for industrial AM machines. We have performed the study on building table preheated to higher temperatures because H13 tool steel has high hardenability and is prone to cracking at high cooling rates (approximately
K/s), typical of laser-based processing [
26]. Furthermore, heating the platform to 350 °C minimises thermal gradients, facilitates hydrogen removal [
27], and reduces the potential for crack formation, while ensuring that temperatures do not exceed 450 °C, which could negatively affect martensitic transformation [
28]. This approach enhances the stability of the fabrication process and improves microstructural control compared to lower preheating temperatures.
Eight ML models were verified in this study: 1. Support Vector Regression (SVR), 2. Kernel Ridge Regression (KRR), 3. RFR, 4. Stochastic Gradient Descent (SGD), 5. Extreme Gradient Boosting (XGBoost), 6. Extreme Gradient Boosting with limited depth (XGBoost LD), 7. Extra-Trees Regressor (ETR), and 8. Light Gradient Boosting Machine (LightGBM). To identify the best-performing model, we utilised the Fast Library for Automated Machine Learning & Tuning (FLAML) framework, which autonomously optimises hyperparameters for ML models beyond predetermined ranges [
https://microsoft.github.io/FLAML/ accessed on 31 December 2025]. A thorough evaluation of the trained models, for porosity prediction, was conducted using
, Mean Absolute Percentage Error (MAPE), and Mean Absolute Error (MAE) metrics. This multi-metric assessment provides a comprehensive view of model performance, as each metric highlights different facets of accuracy. This allows us not only to gauge how well models account for the overall variation in the data but also to evaluate the significance of prediction errors. All eight tested ML models were validated for their predictive capability in the PBF-LB process by fabricating H13 steel samples. Notably, a single set of PBF-LB process parameters predicted by an ML model yielded laboratory samples with Archimedes’ density closest to the theoretical H13 value. This ML model (PBF-LB parameters set) was used to fabricate a more complex component from H13 tool steel: a forging die punch with integrated cooling channels.
4. Discussion
4.1. PBF-LB Processing
To obtain functional objects with the required mechanical properties in the PBF-LB process, it is essential to minimise defects such as porosity and cracks [
41,
42]. This can be achieved by using high-quality feedstock materials and carefully selected parameters that ensure the continuity of the molten metal pool [
43,
44]. Additionally, internal stresses and non-equilibrium or non-compliant with ASTM/ISO standards microstructures resulting from the PBF-LB process can be mitigated through heat treatments [
45,
46,
47].
In our research, we utilised H13 steel powders, which had a wide range of particle sizes, from around 3
m to 96
m (
Figure 5). Furthermore, H13 steel powder was characterised by very high sphericity—more than 91% of powder particles in measured sample were spheres (
Figure 6A) with a high flow coefficient—
(
Figure 7). Moreover, used in our research steel feedstock was characterised by minimal internal porosity seen only within individual particles (
Figure 6B). This choice of materials ensured that the porosity observed during the parameter selection stage of the PBF-LB process was related to the process itself and its parameters, rather than the quality of the feedstock. It is essential to note that H13 steel is recognised as challenging to weld and prone to cracking due to the high stresses it generates during production, which are attributed to its chemical composition [
48]. To address this issue, we carried out the PBF-LB process at an elevated build plate temperature of up to 350 °C, a condition that has not been previously reported for H13 steel. PBF-LB processes conducted at a building platform heated above 200–250 °C are rarely documented in the literature, as most commercially available devices do not support heating the building plate beyond this temperature range.
The traditional methodology for selecting PBF-LB process parameters typically involves modifying a set of parameters developed by the device manufacturer through a trial-and-error process. Another method is to create your own matrices with PBF-LB parameter sets and material characterisation of fabricated samples one by one until the required microstructure is obtained with a slight change of parameters during optimisation [
49,
50]. In our study, the initial set of parameters was adapted from the set of H11 steel parameters distributed by Aconity GmbH (Aconity device manufacturer). This set, prepared for H11 steel, is expected to result in porosity below 1% when used by Aconity GmbH powder supplier. Based on the parameters set for H11 steel, we prepared for H13 steel process optimisation nine sets of parameters (Matrix I—
Appendix A.2), each adjusting three key variables of the PBF-LB process: laser power “P” [W], scanning speed “V” [mm/s], and distance between scan lines “H” [mm]. Using these three arrays, we fabricated seven platforms with 189 test samples. Each array produced three samples with a specific set of parameters, resulting in porosity levels below 0.6% for most samples from platforms 5, 6, and 7, where values below 1% are generally acceptable in industrial applications. Notably, the lowest porosity values, below 0.4%, were achieved not by modifying the PBF-LB process parameters, but by adjusting the marking depth for relatively small (10 mm diameter and 10 mm height) test samples. This marking depth was reduced to 100 micrometres for platforms 6 and 7, compared to 500 micrometres for platforms 1–5.
The challenge of identifying a single “best” set of PBF-LB process parameters for producing H13 steel prompted us to test eight selected ML models using the collected data.
4.2. ML Prediction Results
Despite the significant number of publications in recent years focused on using ML to optimise laser processing parameters for additive manufacturing of various metals, there have been no ML-based studies specifically addressing laser parameter optimisation for H13 steel. Yonehara et al. [
51] optimised laser power, scan speed, and hatch spacing through a series of experiments that tested various parameter combinations, achieving a density of 99.9% at 400 W (
not reported; experimental validation) using a trial-and-error approach without incorporating ML methods. In another study [
52], single-track PBF-LB/M experiments were conducted to establish a parameter window that would yield defect-free parts, identifying continuous tracks with depth-to-width ratios of 0.4–0.6 as optimal. Several key machine learning techniques have been reported for predicting porosity and density in different steels, including: 1. GPR for 17-4 PH [
53]; 2. SVM and ANN for 316L SS [
54]; 3. Ensemble Tree Algorithms (such as RFR and XGBoost) for 316L SS [
55,
56]. In this work, we evaluated the performance of models, including KRR, SVR, SGD, RFR, XGBoost, XGBoost LD, ETR, and LightGBM, to predict the theoretical density “D” [g/cm
3] based on selected PBF-LB process parameters. Initially, we conducted trials with SVR and KRR, as these methods are frequently cited in studies related to predicting the physical properties of samples produced via PBF-LB for various alloys [
10,
54,
56] and have demonstrated relatively high prediction accuracy. Subsequently, we trained various ensemble models, which offer the primary advantages of increased accuracy and robustness compared to the usage of a single model [
32,
57].
Feature analysis revealed that H13 steel theoretical density was strongly correlated with volumetric “E” [J/mm3] and linear “LE” [J/mm3] energy densities. Other parameters, such as laser power “P” [W] and the depth of sample marking “Mark depth” (100 m or 500 m), also showed notable effects. The absence of high inter-feature correlations suggested that non-linear models could better capture the underlying dependencies. Following preprocessing, including encoding categorical variables and normalising feature ranges, the trained models were applied to predict optimal process parameters for the PBF-LB process. Its experimental validation (Platform No. 8) confirmed the effectiveness of the predictive framework, as the models successfully identified laser parameter combinations that yielded a high-density (mostly above 99.6% of the 7.76 g/cm3 theoretical density of H13 steel) H13 steel sample. The comparative analysis of the trained models demonstrated that ETR, XGB, XGB LD, RF, LGBM and KRR achieved similar performance on the training dataset (CV ). However, XGBoost proved to be the most effective on the testing data, yielding = 0.977, MAPE = 0.017, and MAE = 0.02, indicating excellent predictive accuracy. Although a few test points exhibited larger deviations (∼1%) between predicted and experimental values, the majority of predictions showed minimal errors with a mean absolute difference of 0.22% and a standard deviation of 0.27%.
A clear distinction arises when comparing the statistical performance of different models (see
Table 4 and
Figure 9) with their experimental reliability (see
Table 6 and
Figure 10). To validate the ML results, optimal laser parameters corresponding to the maximum predicted density were selected for each trained model, as shown in
Table 6. While the XGBoost model maintained high calculated predictive accuracy, the LightGBM model demonstrated greater reliability and generalizability in practical applications (PBF-LB processing). Specifically, the predicted density values from LightGBM showed the closest agreement with both the theoretical density of H13 steel and the experimentally measured densities of the PBF-LB samples, with deviations not exceeding 0.2% (refer to
Figure 10A,B).
In contrast, although the KRR model exhibited a high cross-validation
and competitive MSE and MAPE values, it predicted maximum density values that substantially exceeded the theoretical density of H13 steel. This overestimation indicates a limited physical consistency of the model, a finding confirmed by validation experiments (see
Figure 10A,B). The SVR model showed the weakest performance from the outset, with a CV
of 0.785, MAPE of 0.007, and MAE of 0.052, leading to unrealistically high density predictions beyond the theoretical limit. Consequently, during Archimedes’ density validation, measured densities deviated from the predicted values by 2.6%, highlighting the model’s inadequacy for reliable predictions.
By comparing our results with previously reported data for other materials, we conclude that our trained models predict sample porosity with comparable or superior accuracy. Studies on 316L stainless steel have demonstrated that classical ML algorithms, such as KNN, SVM, logistic regression, and ensemble tree-based methods, can achieve accuracies of up to 96%, with
values ranging from 0.95 to 0.99 [
54,
55,
56]. Similarly, linear regression, ANN, KNN, and SVM have been employed to predict the density of 316L stainless steel. The best-performing ANN model achieving
= 0.95 and MAE of 3.56 [
54]. Tao Shen et al. [
58] reported that a multilayer perceptron (MLP) with three hidden layers and feature engineering techniques, achieved an
of 0.954 when predicting the relative density of Ti-6Al-4V alloy parts manufactured using the PBF-LB process. In contrast, another study that applied seven ML algorithms to 316L stainless steel parts processed by PBF-LB reported lower accuracy, with the Gradient Boosting Regressor (GBR) B algorithm achieving only
= 0.6296 and MAE = 0.4665. Regarding Al-10Si-Mg alloys fabricated by PBF-LB, predictive modelling of porosity using an adaptive-network-based fuzzy inference system achieved an
of 0.97 [
59].
Table 7 summarises the ML porosity prediction results from current and other published studies.
In many previous studies, training data were collected from multiple literature sources with different measurement protocols and machine conditions, which may introduce inconsistent input–output relationships and degrade model performance. In addition, some commonly used ML techniques assume linear relationships and therefore fail to capture the complex nonlinear interactions inherent to the PBF process, while limited experimental diversity can further restrict model generalization. In contrast, in this study, the data were obtained under consistent experimental conditions across a sufficiently wide range of laser parameters, the selected ML models are capable of approximating complex nonlinear dependencies, and the optimal parameter sets were validated through an independent experimental campaign. In addition, the standard set of features—laser power “P” (W), scanning speed “V” (mm/s), hatch distance “H” (m), and layer thickness “T” (m)—was expanded to include volumetric energy density “E” (J/mm3), linear energy density “LE” (J/mm2), the sample position on the build platform (denoted on each sample by a number on the top surface and referred to as “Placement”), and the sample marking depth (“Mark depth”). These additional features demonstrated a high degree of correlation with the target function.
4.3. Heat Treatments and Hardness
Steels used for forging tools must have various properties at an appropriately high level to cope with the problematic conditions present during the forging process. One of the requirements for these steels is the appropriate hardness, indicating the high strength of the material. The elevated build platform temperature of 350 °C in our study served as an in-situ heat treatment, partially relieving residual stresses and significantly reducing the risk of cracking in this high-hardenability tool steel. Moderate preheating of the building platform, in the range of 200–400 °C, during PBF-LB fabrication of H13 steel effectively promotes stress relaxation and stabilises melt pool geometry, resulting in a more uniform material [
61,
62]. In contrast, excessive preheating above 450 °C can suppress martensitic transformations and promote extensive tempering of the microstructure. The preheating level used in this work, therefore, provides a favorable compromise between build quality, dimensional stability, and microstructural control [
63]. To ensure the high strength and homogeneity of the tested steels throughout their volume, the H13 steel samples were subjected to various heat treatment processes. Moreover, heat treatment of steel after the additive manufacturing process removes unwanted internal stresses created during this process, which may be responsible for tool cracks in the future [
36]. The hardness of the As-made samples, processed using the LightGBM model-predicted parameters, on the building platform preheated to 350 °C, was
HV0.5, which is similar to that of tools used in the forging industry, indicating that the optimal fabrication parameters have been selected. During the PBF-LB fabrication process, the material solidifies from the melt at very high cooling rates, beginning just below the liquidus temperature. Then, the material is cyclically exposed to elevated temperatures, which results from the application of successive layers of material. Depending on the process parameters, the initial thermal cycles for H13 steel cause the material to recrystallise due to fast cooling from the austenitization temperature. Subsequent cycles lead to tempering. As a result of these thermal cycles, the material within the sample ultimately becomes tempered steel. However, because the amount of material used in subsequent runs is small, the tempering process is brief and does not occur fully. Consequently, tempering of laser-processed material increased the hardness of H13 steel, as the tempering could proceed more fully due to the effects of secondary hardening. Tempering at 500 °C was likely cooler than the previous tempering temperatures of the material during the PBF-LB process. Therefore, it did not raise the temperature compared to the material in its as-made state. The hardness of the PBF-LB fabricated material after the quenching process is approximately 625 HV (50–51 HRC), as shown in
Figure 11. This value is roughly 10 HV lower than the typical range of 51–53 HRC (635–670 HV) reported for wrought H13 steel that has undergone oil quenching from 1050 °C [
40]. This discrepancy can be attributed to the lath martensite morphology illustrated in
Figure 12C. The martensite present in our PBF-LB samples is notably finer and more densely packed than that in conventionally processed H13, due to the exceptional cooling rates (
K/s) characteristic of laser-based additive manufacturing. In contrast, wrought H13 experiences significantly slower cooling rates during traditional forging and heat treatment, leading to coarser martensitic lath structures that may accommodate higher local dislocation densities; however, verifying this hypothesis would require a more thorough quantitative microstructural analysis. While the refined martensite morphology provides enhanced toughness and ductility relative to its coarser conventional counterparts, it also yields lower hardness values. Moreover, the retained austenite observed in the interdendritic regions (enriched in Cr, Mo, and V) serves as a softer phase interspersed within the martensitic matrix. Although the hardness is slightly lower than that of conventionally processed H13, it remains entirely suitable for tool applications, especially where thermal fatigue resistance, ductility, and a refined grain structure confer superior service performance.
4.4. Limitations and Future Work
While the results of the present study are promising, several limitations must be acknowledged. Firstly, the dataset utilised is relatively small, which may hinder the generalisation capability of the trained models and increase their susceptibility to noise or outliers. Secondly, the process variables examined were confined to a predefined set of PBF-LB parameters, without considering other potentially influential factors, such as powder morphology, chemical composition, or environmental conditions, for example, gas flow or oxygen content during the process. This limitation may restrict the model’s ability to fully capture the complexity of process–structure relationships. Additionally, the experiments were conducted using a single AM process system with specific hardware configurations and control strategies. Consequently, directly transferring trained models to other PBF-LB machines may lead to diminished predictive performance due to machine-to-machine variability. Variations in recoating mechanisms, oxygen content, and gas flow intensity further challenge model portability.
Future research should focus on expanding the dataset to include a broader range of process parameters and build conditions, thereby enhancing the models’ robustness. Including data from multiple AM process systems would facilitate systematic evaluations of model transferability and contribute to the development of more generalizable predictive frameworks. Another promising avenue is the integration of physics-informed constraints to mitigate non-physical predictions and improve extrapolation capabilities. Finally, using adaptive or transfer learning strategies can adjust an existing model to different machines or materials by reusing prior training, enabling efficient recalibration with only a small amount of new experimental data. Results of this study provide a basis for future research to utilise the developed ML models to predict parameters of the PBF-LB process for other alloy groups, such as new copper and titanium alloys.
5. Conclusions
Our research results confirm that the implemented ML framework, based on automated hyperparameter optimisation using the FLAML library, effectively captures complex non-linear relationships between PBF-LB process parameters and relative density. Our research demonstrates that even with a limited experimental dataset (), properly tuned ensemble models can provide robust and generalisable predictions. The best-performing model, XGBoost, achieved an value of 0.977, MAPE = 0.002, and MAE = 0.017, surpassing most results reported for similar alloys in the literature. This validates the suitability of automated ML approaches for efficient parameter screening and process window identification prior to experimental validation, thereby substantially reducing the number of physical trials required.
The LightGBM model provided the most reliable and experimentally validated prediction, yielding additional manufactured samples with a relative density above 99.6% of the theoretical value (7.76 g/cm3). These parameters also enabled successful fabrication of a forging die segment with internal conformal channels and porosity below 0.5%, demonstrating the feasibility of ML-guided optimisation for industrial-scale PBF-LB production.
Microstructural analyses of samples fabricated with the LightGBM model predicted PBF-LB parameters confirmed a fine cellular martensitic structure typical of laser-processed H13 steel, with limited retained austenite. After tempering at 550 °C, hardness increased slightly to approximately 630 HV0.5, indicating partial secondary hardening without significant grain coarsening. Post-process heat treatment, involving re-quenching and tempering, reduced microstructural heterogeneity and improved homogeneity, although the hardness remained unchanged at a level typical of conventionally processed H13 steel.