Keywords

1 Introduction

Conventional alloys made from iron, aluminium, titanium, magnesium, and many others are prepared by mixing one or sometimes two principal elements with some secondary alloying elements in small proportions. Cantor alloys also recognized now as high-entropy alloys shows a unique characteristic that by mixing at least five metallic elements such that when the mixing percentage vary from 5 to 35% in an equimolar composition produces a single solid-solution phase which is crystalline in nature [1]. By virtue of this, HEAs offer high specific strength [2, 3], excellent stability at high temperatures, exceptional ductility [4], and high corrosion resistance and others [5]. Unlike conventional alloys, HEAs possess a trend of ‘stronger being more ductile’ [6, 7].

Cantor suggests that as many as ~ 108 varieties of HEAs can be developed using 44–64 elements from the chemical periodic table [8]. Many of these HEAs are yet to be synthesized in the lab and Yeh [9] suggests that “still a lot more treasure exist in non-equimolar HEAs”. In developing an alloy, a considerable number of input parameters such as its composition, synthesis route, processing window, temperature, heating/cooling rate are required to obtain its crystallographic information and mechanical, electrical and functional properties of interest. Thus, relying on traditional laboratory experiments for novel material discovery can be very time-intensive.

Machine learning (ML) has emerged as a sophisticated and reliable technique in replacing repetitive laboratory experiments and computational simulations such as Density Functional Theory (DFT) and Molecular Dynamics (MD) [10]. DFT method predicts material properties using quantum mechanics and can at times be erroneous [11]. MD on the other hand analyse atoms by numerically solving Newton’s equations of motion [12]. MD continues to suffer from the drawback on having reliable interatomic potential functions. Thus, ML provides a robust alternative tool based on the reliance of historical data and a mathematic way by pattern recognition technique. This in turn enhances our ability to extract salient features from within the data which are otherwise not readily visible even to an experienced researcher. A summary of various ML algorithms currently being used is shown in Fig. 1a which formed the core of this paper.

Fig. 1
An illustration, and a chart. 1. An illustration of machine learning starts with data including input, and output variables leading to machine learning resulting in program rules, y equals f of x. 2. Classification of M L algorithms into supervised, unsupervised, and reinforcement learning with sub-divisions of each. Random forest is highlighted.

a Illustrative architecture of ML, b classification of ML algorithms on the basis of supervised, unsupervised, and reinforcement learning [12,13,14]. Circle on Random forest is done to highlight that this method was used in this paper to present a case study

1.1 ML Algorithms

ML algorithms are broadly classified into three categories based on their type of learning, namely supervised, unsupervised, and reinforcement learning shown in Fig. 1b [13, 14].

1.1.1 Supervised Learning

As the name suggests, supervised ML algorithms are taught by providing a labelled dataset that includes input and output variables. The objective of supervised learning is to map input (x) and output (y), using a linear or nonlinear function, for instance, y = f(x) [14].

1.1.2 Unsupervised Learning

In unsupervised ML algorithms, unlabelled dataset is used to train an algorithm, where inputs are not labelled with the correct outputs. The goal is to model the underlying structure or to discover the patterns in the data. The unlabelled data in the unsupervised learning is used to train algorithms for clustering and association problems.

1.1.3 Reinforcement Learning

Reinforcement learning is based on reward or punishment methods, where an agent learns to perceive and interpret its complex environment; it takes actions and learns through the trial-and-error method. It is devised to reward the desired behaviour by assigning a positive value to encourage the agent and punishing the undesirable behaviour by assigning negative values to penalize the agent. An agent either gets an award or a penalty based on the actions it performs, and the ultimate goal is to maximize the total reward. Over time, the agent learns to avoid the negative and seek the positive, thus learns the ideal behaviour to optimize its performance.

Current study focuses on a supervised ML algorithm, as the labelled data is employed for phase prediction of HEAs. A detailed description of all supervised ML algorithms has been discussed in Table 1.

Table 1 A list of important supervised ML algorithms

1.2 Literature Review

Recently, there has been a surge in the number of publications on phase prediction of HEAs using various ML techniques. Islam et al. [15], Huang et al. [16] and Nassar et al. [17] employed neural networks in their study for phase prediction of HEAs and observed an average accuracy of 83%, 74.3%, and 90%, respectively, by using a relatively smaller number of datasets. These models considered five physical parameters namely mixing entropy (∆Smix), valence electron concentration (VEC), atomic size difference (δ), mixing enthalpy (∆Hmix), and electronegativity difference (∆χ). Choudhury et al. [18], used a random forest regression algorithm for the classification of different phases and crystal structures and obtained an accuracy of 91.66% for the classification of phases and 93.10% for the classification of different crystal structures, respectively.

To significantly improve the phase prediction accuracy, Risal et al. [19], compared Support Vector Machine (SVM), K-Nearest Neighbour (KNN), Random Forest (RF) classifier, and Multi-layer perceptron (MLP). KNN and RF Classifiers performed most effectively and obtained the test accuracy of 92.31% and 91.21%, respectively, whilst SVM and MLP provided satisfactory performance with accuracies greater than 90%. Several similar studies have recently reported about the phase prediction and various mechanical properties which are summarized briefly in Table 2.

Table 2 Application of various ML algorithms in material science

From the aforementioned literature, the random forest algorithm was observed to be the most prominently used algorithm in phase prediction studies, due to its high predictive performance. Therefore, the present study used random forest algorithm with the motive of correctly classifying each phase of HEAs for an imbalanced dataset. Scarce studies on the interpretation of the inner-working of an algorithm have been found in the literature. Thus, an additional attempt to decipher the black-box nature of the employed random forest algorithm has also been made using SHapely Additive exPlanation (SHAP) technique.

1.3 Data Source

A dataset of 1360 HEA samples was used to classify different phases of HEAs [30]. This dataset was observed to be highly imbalanced, as it contained 463 Intermetallic (IM), 441 BCC solid-solution (BCC_SS), 354 FCC solid-solution (FCC_SS), and 102 mixed (FCC + BCC) phase. Five crucial features such as valence electron concentration (VEC), electronegativity difference (∆χ), atomic size difference (δ), mixing enthalpy (dHmix), and mixing entropy (∆Smix) calculated by Miedema’s model were used as input parameters in the dataset. The ML modelling framework for the classification of four different phases of HEAs are demonstrated in Fig. 2, where data preprocessing is performed to detect outliers and missing values, and then feature scaling was performed to scale down the data into a finite range. The data was then divided into training and test sets (80:20) for the training (1088 HEA samples) and testing (272 HEA samples) purpose of the model. Random forest classifier (RFC) was employed using the scikit-learn library in Python, and further training and testing was performed to evaluate the performance of the RFC model.

Fig. 2
A flow diagram compiled in 3 segments expresses the workspace within phase for the high energy alloys placed within data pre procession, random forest algorithm, train, validation and S H A P.

ML modelling framework for phase classification of high-entropy alloys (HEAs)

1.4 RFC Model Performance

RF is an ensemble of various decision trees (tree-like structures) based on various subsets of the given dataset. For a classification task, it takes votes from various decision trees and makes a final prediction on the basis of majority votes. It is more accurate compared to a single decision tree algorithm, as a large number of trees improve its performance and makes the prediction more stable. The performance of RFC model has been evaluated using a confusion matrix and classification report. Confusion matrix provides the number of correctly predicted and incorrectly predicted classes for each phase [35]. Classification report on the other hand provides precision, recall, f1-score, average classification accuracy, and weighted average accuracy. Out of 272 HEA samples from the test data, 93 samples belong to class 0, i.e. IM phase, 88 samples belong to class 1, i.e. BCC phase, 71 samples belong to class 2, i.e. FCC phase, 20 samples belong to class 3, i.e. FCC + BCC mixed phase, as shown in classification report in Fig. 3a. The confusion matrix in Fig. 3b demonstrates the correctly and incorrectly classified phases, for example out of a total of 93 samples of IM phase, only 72 samples were correctly classified as IM phase, remaining 13 samples were misclassified as BCC phase, 5 samples were misclassified as FCC phase and 2 samples were misclassified as FCC + BCC phase. Similarly, the classification of each phase can be observed. Apart from an average classification accuracy of 86%, the precision, recall, and f1-score for all four phases were investigated in the classification report.

Fig. 3
Two illustrations for R F C model. 1. A classification report has precision, recall, F1 score, and support with accuracy, macro, and weighted average. 2. A confusion matrix with four phases, I M, B C C, F C C, and F C C plus B C C for true, and predicted labels.

a Confusion matrix, b classification report for RFC model in classification of IM, BCC, FCC, and FCC + BCC phase

Training accuracy, test accuracy, ROC_AUC_Score, and tenfold cross-validation ROC_AUC_Score were evaluated and shown in Table 3. The Receiver Operating Characteristic_Area under Curve (ROC_AUC) score ensures better performance of model in predicting different classes of HEAs. tenfold cross-validation was performed to avoid overfitting, where the complete dataset is divided into ten equal folds. Each time, the model was trained with 9 of those folds and the remaining onefold was used for the testing purpose, and the procedure was repeated ten times, by reserving a different tenth fold each time for testing the model. This measure ensured the effectiveness of the model and that the RFC model was not overfitting. The reported training accuracy of 90.9% and testing accuracy of 85.23%, suggested that the model was successfully classifying different phases of HEAs. The difference in the training and test accuracy indicated that the data used to train and test the RFC model was slightly different, which means that the RFC model is capable of predicting phases successfully, even for the unseen data points that have not been used in the present study.

Table 3 Comparison of various ML algorithm performance

Furthermore, the interpretation of RFC model was performed using SHAP technique, to understand which physical features were influential in governing phases of HEAs. SHapely Additive exPlanation (SHAP) technique has emerged as breakthrough in the field of ML for easy interpretation and explanation of a complex model’s prediction; published by Lundberg and Lee in 2017 [36]. SHAP value aims to explain the prediction of an instance by considering the contribution of each feature in making a certain prediction at global as well as local levels. From this analysis, VEC was found to play most crucial role in determining FCC, BCC, and mixed FCC + BCC solid-solution phases whilst mixing enthalpy (dHmix) was found important in determining the formation of solid-solution or an intermetallic phase, as shown in Fig. 4. Tables 4 and 5 show the RFC model performance and cross-validation score in each fold of tenfold cross-validation respectively.

Fig. 4
A horizontal bar graph divided into several segments like V E C, dHmix, Elect dot Diff etcetera on basis from 0 to 5 is measured that express the mean output amplitudes for a specialized R F C model.

Feature importance plot for RFC model using SHAP

Table 4 RFC model performance
Table 5 Cross-validation score in each fold of tenfold cross-validation

2 Conclusions

The RFC model developed in this study had successfully and reliably predicted BCC, FCC, intermetallic, and FCC + BCC phases in high-entropy alloys. RFC model performance was evaluated using various evaluation metrics such as average classification accuracy, precision, recall, f1-score, ROC_AUC score, and tenfold cross validation ROC_AUC score.

The RFC model showed that the two input parameters, namely valence electron concentration (VEC) and mixing enthalpies were most influential in determining the resulting phase of a given HEA composition. VEC contributed the most in predicting the crystal structure of solid solution phases (BCC, FCC, and FCC + BCC) whilst mixing enthalpy (ΔHmix) played important role in determining formation of solid-solution or intermetallic. Thus, this present study leveraged the reliability of applying ML techniques in material science without any requirement of performing expensive experiments.