Introduction

Bulk Metallic Glasses (BMGs) are metallic alloys with high strength, good corrosion resistance, good hardness, and good wear resistance because of their amorphous structure1. The excellent properties of BMGs make them a good choice for applications like cardiovascular stents, micro fuel cells (MFC), wear-resistant gears, and catalysts2. However, designing BMGs is challenging due to their non-equilibrium nature related to the metastability of amorphous structures3. Moreover, the low glass-forming ability of BMGs has limited their application4. Therefore, understanding the glass-forming ability of BMGs is crucial in alloy design. The critical casting diameter (Dmax) has been used as a parameter of the glass-forming ability (GFA) of BMGs5. The glass-forming ability of BMGs has a relationship with some of the thermodynamic properties, such as characteristic temperatures, i.e., the glass transition temperature, Tg, the onset crystallization temperature, Tx, and the liquidus temperature, Tl. The characteristic temperatures of BMGs are strongly affected by the composition of these alloys6,7,8,9,10.

Scientists tried to establish a relation between characteristic temperatures and glass-forming ability6,11,12,13,14. Inoue15 used the difference between Tx and Tg (i.e., ΔTx expression) to evaluate the glass-forming ability of BMGs. Lu and Liu13 propose that using γ (\(=\frac{{T}_{x}}{{T}_{g}+{T}_{l}}\)) could guide scientists to compare the glass-forming ability of alloy systems. Tripathi et al.16, combining the thermodynamics and principles of genetic programming, developed a new parameter (i.e., the Gp criterion) to measure the glass-forming ability of BMGs. It has been suggested that the stability of the liquid phase and the glass’s resistance to crystallization should be considered simultaneously to increase the GFA of alloys17. Therefore, it is impossible to use some of these parameters as indicators of GFA. For example, the ΔTx parameter only considers the stability of the glassy phase and not the ease of glass formation. Similarly, Trg (= Tg/Tl) is a parameter that only considers the ease of glass formation18. In addition, although developing different parameters able scientists to evaluate and predict the glass-forming ability of alloy systems, most of these expressions have a low correlation with the glass-forming ability and will fail in predicting the Dmax of newly developed alloy systems16,19.

In recent years, ML has been known as one of the best routes in predicting the glass-forming ability of BMGs20,21,22,23. Scientists have used ML as a promising route for materials design and discovery24. The ML is the science of developing models that will become more efficient over time and is going to replace old methods of finding a solution to relate input features to output features with new attitudes to solving the problem with artificial intelligence25. By using ML modeling, scientists are enable to relate characteristic features of material to its properties26. Therefore, the data-driven approach is compelling in accelerating the exploration of new metallic glasses27.

Recently, Ward et al.28 built a Random Forest model on a dataset of 6315 alloys for predicting three critical parameters of BMGs, such as critical casting diameter or Dmax. Using different ML methods, they found that decision tree-based methods, especially random forest, are the most accurate methods for investigating the properties of BMGs. These researchers used 201 features categorized in seven different groups, including stoichiometric, elemental property statistics, valence shell, ionicity, proximity to crystalline compounds, cluster packing efficiency, and probability of glass-formation attributes, to build a model for predicting the Dmax as a criterion of GFA. The feature space of this model was massive, so it needed much larger amounts of data than other published models, and the training time was tedious. As a result, the correlation coefficient of this model was lower for the BMG dataset, comparing the original dataset consisting BMGs and ribbon-forming glasses.

Xiong et al.11 trained seven different models for predicting the GFA of BMGs. These researchers selected four different parameters from a feature space of 11 basic elemental properties, including metallic radius (Rm), the heat of fusion (Hf), melting point (Tm), and specific heat capacity (Cm), to assess the maximum critical diameters of BMGs. This research depicts that the random forest method is suitable for assessing the properties of BMGs. Although the number of features was significantly lower comparing the model built by Ward et al., the accuracy was still around 80%. Also, computing the value of selected features was sophisticated and needed more thermodynamic data.

Deng and Zhang29 used Random Forest to train a model for predicting the glass-forming ability of metallic alloys. They input parameters such as Total Electronegativity (TEN), atomic size difference (δ), average atomic volume, and the mixing entropy (Sm) to the random forest model to predict the glass-forming ability of BMGs. Although this research was very inspiring, calculating the input parameters of these models is challenging, and the accuracy was not efficient in some cases. Considering the published researches, it is indicated that developing a model using fewer attributes and a larger dataset is required, and this model could be used to predict the GFA of BMGs in an efficient method.

This article used the Random Forest method with Python 3.9 to train a model based on parameters derived from characteristic temperatures relations for predicting the critical casting diameter (Dmax) of BMGs, using a database of 715 different alloys consisting of Zr-based, Mg-based, Cu-based, La-based, Fe-based and other BMGs. In this research, the fivefold cross-validation has been used to improve the accuracy of the model. The fivefold cross-validation randomly divided the dataset into 572 alloys for use as training and 143 alloys as test sets. Then, the characteristic temperatures were added as input features to guide the model thermodynamically.

Methodology

The whole process of modeling consists of four steps. The schematic demonstration of these steps is represented in Fig. 1. The very first step of modeling is collecting a suitable dataset. The next step is processing the dataset with input features to attain the desired output. It then can be followed by representing results. The final step is the validation of the model.

Figure 1
figure 1

Schematic demonstration of steps involved in the process of ML modeling.

Data collection

In the ML, it is essential to use a suitable dataset. Due to the purpose of ML and attaining a reliable result from modeling, the dataset used in this article was collected from 44 different published articles12,19,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71, including 715 different BMGs. Furthermore, 17 different parameters were used as input features to predict the maximum critical diameter (Dmax) of BMGs. It is noticeable that all parameters can be calculated using characteristic temperatures. Although liquid fragility is another important parameter that has a straightforward relationship with the GFA, researchers need to have the relaxation time of metallic glasses to measure this parameter. In most papers used in the dataset, there is insufficient information for determining this parameter. Besides that, since one of the parameters we used as an input feature (i.e., the reduced glass-transition temperature or Trg) is essential in determining the liquid fragility parameter, adding the liquid fragility parameter will not benefit the model’s accuracy72. Therefore, the liquid fragility parameter has not been used in this research. The parameters including the ideal values are represented in Table 1. When the parameter’s value tends to this ideal value, the GFA (i.e., Dmax) of BMGs is increased.

Table 1 Parameters (GFA criteria) expressed by characterization temperatures used as input features in this article (* means the ideal value has not been measured for this parameter).

Modelling process

At the first step of modeling, all of the values of the features normalized with the Min–Max method to fall in the [0, 1] domain86. Normalization is a preprocessing step in ML modeling. It has been shown that normalization can help scientists establish more accurate models. Model fitting and model learning are affected by variables measured at different scales and could result in decreased efficiency of the model. The typical way to deal with this potential problem is to perform feature-wise normalization, such as Min–Max scaling, before fitting a model87. The formula of the Min–Max method is represented in Eq. (1):

$${X}_{new}=\frac{x-\mathrm{min}(x)}{\mathrm{max}\left(x\right)-\mathrm{min}(x)}$$
(1)

where the Xnew is the normalized value of x and max(x) and min(x) are maximum and minimum values of feature x, respectively.

Recursive Feature Elimination (RFE) is used with the Random Forest algorithm for feature selection. The RFE starts with pruning the least essential feature from the set of features and is repeated on the pruned set until the desired number of features to select is eventually reached88. Then, three characteristic temperatures were added to the model with the highest correlation value and all features. In the following step, fivefold cross-validation is used to split the dataset into five groups. Four groups form the training set, and one performs as a testing set. The whole process of modeling was repeated 100 times. The mean of all modeling was used to ensure the accuracy and generalization ability of the model89. Then, the squared correlation coefficient (R2) and mean absolute error (MAE) were selected to evaluate the accuracy and generalization ability of the RF model. Equations (2) and (3) represent the formula of these methods:

$${R}^{2}=\frac{(n\sum_{i=1}^{n}f\left({x}_{i}\right){y}_{i}-\sum_{i=1}^{n}f({x}_{i})\sum_{i=1}^{n}{y}_{i}{)}^{2}}{(n\sum_{i=1}^{n}f({x}_{i}{)}^{2}-(\sum_{i=1}^{n}f\left({x}_{i}\right){)}^{2}-(n\sum_{i=1}^{n}{y}_{i}^{2}-(\sum_{i=1}^{n}{y}_{i}{)}^{2})}$$
(2)
$$MAE=\frac{1}{n}\sum_{i=1}^{n}\left|f\left({x}_{i}\right)-{y}_{i}\right|$$
(3)

where n is the number of samples and f(xi) and yi represent the predicted and experimental values of the ith sample, respectively.

Validation

For validation of the model, the characteristic temperatures of the four alloys studied in the previous work90 were used as inputs. The predicted Dmax of these alloys was compared with the measured values of Dmax. In order to evaluate the effect of adding characteristic temperatures to the model, the overfitting and squared correlations of the initial models and models with characteristic temperatures were compared.

Results and discussion

Feature selection

The Random Forest Regression (RFR) with 5-fold cross-validation was conducted on the BMGs dataset 100 times to have a reliable model. Then, the Recursive Feature Elimination (RFE) algorithm was used to determine the squared correlation coefficient (R2) of models with the different number of selected features, as shown in Fig. 2. It can be seen from Fig. 2a that the correlation of the best model with a certain number of selected features (i.e., the highest correlation for the model with the specific number of selected features) can be divided into three different parts, where the correlation will maintain the same level at that part. Moreover, it is indicated that models with more than 11 selected features have the highest correlation. In fact, this figure indicates that when we select just one parameter (from 17 parameters) and train the model, the testset accuracy of the best model would be around 88.25%. Similarly, when we choose two parameters and train the model, the accuracy will increase to approximately 91%. This increase will continue until we select 11 parameters. At this step, the accuracy would be around 92.5%. After that, the change in accuracy would be imperceptible when we increase the number of selected parameters in training the model. Figure 2b represents the average coefficient of all 100 repeated modeling and illustrates that the model with 13 selected features has the highest average correlation value compared to other models. Although the model with 16 features also had a correlation coefficient near the model with 13 features, it is preferable to have the least number of features91. Moreover, overfitting is higher in the models with more parameters92. As a result, the model including 13 features was selected as the optimal model for further research in this article.

Figure 2
figure 2

The squared correlation coefficient (R2) of 5-fold cross-validated models based on the number of selected features for (a) test set of the most accurate models with the highest R2 and (b) averages train sets and test sets of 100 repeated models.

To ensure that the characteristic temperatures will not be eliminated if we use RFE for all parameters, including characteristic temperatures, we conducted RFE on a model with all 20 parameters. The selected parameters, in this case, were the same as the model with 13 features + 3 characteristic temperatures, i.e., Tg, Tx, and Tl, and the characteristic temperatures were selected as features.

To evaluate the effect of adding characteristic temperatures to the model and thermodynamically guiding the model, Tg, Tx, and Tl were added to the optimal model (i.e., the model with 13 features) and the model with all features. To evaluate every single feature’s importance in modeling, the feature importance algorithm is represented in Fig. 3.

Figure 3
figure 3

The feature importance of the model with (a) 13 selected features, (b) 13 selected features and added characteristic temperatures, (c) 17 selected features, and (d) 17 selected features and added characteristic temperatures.

Figure 3a,b are related to the feature importance of models with 13 different features without and with characteristic temperatures. Also, Fig. 3c,d are for models with all parameters without and with characteristic temperatures. It is evident that in all of the modeling, the parameter of Gp is the most crucial feature. There are some reasons why this parameter is so important, and actually, it has the highest importance in all of the modelings. First, the Gp expression has been extracted using genetic programming. Scientists could generate several different solutions using this method and choose the most reliable solution93. Secondly, the expression itself can be divided into two different parts that are shown in Eq. (4):

$${G}_{P}=\frac{{T}_{g}({T}_{x}-{T}_{g})}{({T}_{l}-{T}_{x}{)}^{2}}=\frac{{T}_{g}}{{T}_{l}-{T}_{x}}\times \frac{{T}_{x}-{T}_{g}}{{T}_{l}-{T}_{x}}$$
(4)

Increasing Tg in the first part of Eq. (4) will increase the viscosity, and the glass-formation process will facilitate. Also, Tl–Tx area is prone to crystallization, so minimizing this part of the Equation is desirable75. Besides, it is optimal to have an extended supercooled liquid area (i.e., \({T}_{x}-{T}_{g}\)) in BMGs as crystallization will not occur at this area78. On the other hand, the Gp expression proposes that high Tx will increase liquid stability and lead to better glass-forming ability. Based on Wakasugi et al.94, the viscosity of supercooled liquid will increase with increasing the ratio of Tx/Tl, and increasing the viscosity of supercooled liquid will lead to high glass-forming ability. In conclusion, the Gp expression inherits the phenomenological attributes of glass-forming ability in BMGs and shows a good correlation with Dmax16.

GFA prediction

Figure 4 shows the testing set’s predicted Dmax versus the measured Dmax. As can be seen, adding characteristic temperatures to the models increases the squared correlation coefficient for the train set and test set and decreases the mean absolute error. The best result is for the model with 13 features and added characteristic temperatures. Our model had two different outliers, which were Pd40Cu30Ni10P20 with a Dmax of 72 mm95, and Zr41.2Ti13.8Cu12.5Ni10Be22.5 with a Dmax of 50 mm76. These two alloys are outliers because the dataset does not have any other alloy with a high GFA like these alloys28,96. The model with 13 features and added characteristic temperatures is the most accurate, with a R2 of 95.01% and a MAE of 0.88 mm.

Figure 4
figure 4

The predicted Dmax values against measured Dmax for the model with (a) 13 selected features, (b) 13 selected features and added characteristic temperatures, (c) 17 selected features, and (d) 17 selected features and added characteristic temperatures.

The effect of characteristic temperatures on GFA prediction

Figure 5 indicates the correlation coefficient for models without characteristic temperatures and those including characteristic temperatures. The R2 of the test set increased by adding characteristic temperatures in both models, i.e., the model with 13 features and the model with 17 features. It is important to note that mean absolute error was reduced by introducing characteristic temperatures. Characteristic temperatures and selected parameters have a synergic effect on each other because; by using these parameters, the thermodynamic approach of the model will improve. Firstly, all the input parameters are dimensionless relations, including the characteristic temperatures. It is expected that introducing the individual characteristic temperatures will increase the weight of these crucial parameters, which in turn leads the model to be more accurate. In an ideal glassy system with high glass-forming ability, the glass transition temperature (and crystallization temperature) should be very high and the liquidus temperature very low3. Secondly, the two critical criteria for high glass-forming ability are the liquid phase’s stability and crystallization resistance76. Although in most of the parameters, these two factors have been considered, some of them, such as Trg and ΔTx, are only based on the stability of the liquid phase15,73. It has been indicated that the stability in the equilibrium state and in the undercooled state depends on the liquidus and glass transition temperatures, respectively. On the other hand, resistance to crystallization is a parameter that has a linear relationship with the glass transition temperature13,76. As a result, by introducing the characteristic temperatures as input parameters, ignorance of parameters like ease of glass formation and resistance to crystallization will be compensated.

Figure 5
figure 5

The squared correlation coefficient for models with 13 features with and without characteristic temperatures and 17 features with and without characteristic temperatures.

Overfitting is one of the most critical problems in ML modeling that cause us to have a low coefficient correlation in the testing set while having a very well-fitted model on the training set. The Overfitting/Underfitting can be determined using the squared correlation coefficient of the training and test sets97. For evaluating the effect of the introduction of characteristic temperatures on the overfitting problem24, the number of models with a difference of R2 value between the training set and testing set in the range of 1–5% and 5–10% are plotted respectively as shown in Fig. 6. The overfitting problem and this difference are dependent on each other. The overfitting problem is more severe in cases where the difference of R2 value is higher98. It is evident that adding the characteristic temperatures to the models reduces the occurrence of overfitting and improves the efficiency and accuracy of the model.

Figure 6
figure 6

The number of overfitting ML models with/without characteristic temperatures.

Validation

In order to validate the established model (the one including 13 features and characteristic temperatures), the measured Dmax as the glass-forming ability of four different alloys along with the related data were extracted from reference90. The data of alloys entered into the model, and then the predicted Dmax is compared with the experimental results, as shown in Table 2. The modeling results were very close to the experimental results, as shown by low discrepancy between the experimental and predicted results, which is in the range of regression value (Fig. 4b). This works shows that neither 13 dimensionless parameters proposed by different researchers nor three characteristic temperatures proposed in this work could predict the GFA accurately. However, when three characteristic temperatures plus 13 parameters were employed by ML modeling, a rather more accurate result was depicted. In fact, most of the GFA results in literature have been obtained by trial-and-error experiments without sufficient scientific background, e.g., thermodynamic analysis. This matter is mostly due to non-equilibrium and complicated feathers of solidification in BMG alloys. The successful introduction of three characteristic temperatures, which are closely related to the thermodynamics of BMG alloys, bears in mind that more scientific exploring on the composition-structure-properties of BMG could be very informative to provide enough knowledge for predicting GFA to lessen too many experimental studies.

Table 2 Experimental validation of ML model using the four different alloys.

Conclusion

In summary, this work conducted a random forest model combined with Recursive Feature Elimination to predict the Dmax (GFA) of BMGs on a dataset of 714 different alloys. The results showed that the model with 13 selected features has the highest coefficient correlation value (R2 = 92%) and is very efficient. The feature importance algorithm showed that the Gp parameter is the most crucial parameter in all modeling. Adding characteristic temperatures, i.e., Tg, Tx, and Tl, to the models will improve the accuracy (R2 up to 95%) and efficiency of models, resulting in overcoming the overfitting problem. Comparing the measured and predicted values of Dmax for a set of newly developed BMGs indicated that the model is reliable and can be used for predicting the GFA of BMGs.