Introduction

Nanoarchitecture materials such as nanoporous metals are versatile due to their unique properties including high surface-area-to-volume ratios, light weights, and high thermal and electrical conductivities1,2,3. Dealloying is a promising method for fabricating nanoporous metals. During dealloying of a parent alloy (A-B), one or more components (a metal/alloy B) are removed with a dealloying agent (a metal/solution C), and the remaining components form a bicontinuous structure through a self-organizing process4. Recently, liquid metal dealloying (LMD), where liquid metal is used as the dealloying agent (metal C), was reintroduced to fabricate less noble nanoporous materials5, including stainless steel6,7, silicon8,9, magnesium10, graphite11, α-titanium5,12, β-titanium13, and TiVNbMoTa high entropy alloys14. Solid-state metal dealloying (SSMD), or solid-state interfacial dealloying (SSID), has been introduced to fabricate nanoporous Fe, Fe-Cr, and α-Ti with a finer ligament, which can be used to overcome the limitation of high fabrication temperatures and handle liquid metal difficulties in LMD15,16,17,18. However, the fundamental mechanisms leading to metal-agent dealloying remain unclear, thereby creating challenges in defining a strategy for materials design using metal-agent dealloying.

The material design principle of LMD proposed by Wada et al.5 is primarily focused on the thermodynamic quantities of the differences in the mixing enthalpies between the parent alloy A-B (ΔHmAB) and the dealloying agent (C) mixed with one of the components from the parent alloy (ΔHmAC or ΔHmBC). The general guideline is to have a negative mixing enthalpy of BC (ΔHmBC < 0) and ΔHmBC < ΔHmAB to provide a driving force to dealloy B from AB, while utilizing a positive ΔHmAC so that mixing between AC would not be preferred. However, while such criteria have been widely used to design new material systems, they have not been consistent with experimental observations. LMD also occurs when the mixing enthalpy between the elements in parent alloys is more negative than the mixing enthalpy between the soluble element and the dealloying agent (0 > ΔHmBC > ΔHmAB), such as in TiVNbMoTa-Ni, C-Mn, Ti-Cu, and Nb-Ni systems11,14,19. SSID was even reported in some systems with a positive mixing enthalpy between the soluble element in the parent alloy and the dealloying agent (ΔHmBC > 0 and ΔHmAB > 0)20.

These contradictions could have resulted from one of the three factors or a combination of them. The first such factor is the inaccuracy of the mixing enthalpy value available. The widely used mixing enthalpy was proposed and calculated by the Miedema model21. Although the Miedema model provides a way to calculate the mixing enthalpies in binary alloy systems, its accuracy is limited when the mixing enthalpy is close to zero22. In binary systems containing nonmetals or semimetals, a large transformation energy calibration was needed23. The second factor is that in considering the relative phase stability, the mixing enthalpy may not be the right parameter to use. Instead, analysis in the literature has shown that the thermodynamic stability of a material should be defined by its Gibbs energy of decomposition24. The third factor is the entropy contribution to the Gibbs free energy. Conventionally, mixing enthalpy has been treated as the dominant quantity for determining Gibbs free energy. However, new studies indicate that configurational and vibrational entropies can contribute to stabilizing/destabilizing the solid solution25. Overall, the conventional criteria of using the mixing enthalpy difference calculated from the Miedema model to determine if a system can be dealloyed should be re-examined to critically enable the fabrication of a wider range of elements based on sound design principles.

Using machine learning (ML) algorithms to facilitate new materials design is a rapidly growing research area. Complementing computational simulation and theoretical modeling techniques, ML methods promise to efficiently predict the presence of novel materials. Recent developments in the field include a general ML framework for predicting inorganic materials26, with a wide range of materials predicted. Depending on their composition, crystal structure, and microstructures, ML methods have been used to predict materials, such as high entropy alloys27, shape memory alloys28, and thin-film metallic glasses29. Combinatorial thin-film synthesis has been used to achieve the preparation of a great number of material compositions that could not be realized previously. By combining combinatorial sample synthesis with synchrotron characterization, the correlation of material properties with composition to realize rapid materials discovery becomes feasible30. A combination of iterative ML prediction and combinatorial synthesis has also been applied for the discovery of metallic glasses29. Recently, an autonomous decision-making algorithm-driven scientific instrument was developed; it minimized the number of measurements needed, prevented the collection of redundant information, and thus optimized the utilization of experimental and computing resources31,32,33. The Gaussian-process-based decision-making algorithm (gpCAM) was independently developed by CAMERA34. The term “autonomous experiment” describes the combination of automatic decision-making, analysis, instrumentation, and communication tools to create a closed-loop that can make intelligent decisions during an experiment without human interaction33,35. Here, during a synchrotron diffraction experiment, gpCAM makes decisions based on the diffraction intensity of the phase(s) of interest from the collected data, and autonomously drives the next diffraction measurements to probe regions with the highest uncertainty. Closed-loop concepts with machine learning prediction and an autonomous experiment were demonstrated36, and the development of carbon nanotube growth was realized37. The ability to design self-driving materials provides a promising pathway toward autonomously designing and synthesizing novel materials38. In the field of dealloying research, data mining and automated image analysis were introduced to identifying coarsening mechanism39.

In this study, we established a workflow for designing nanopores/nanocomposites, simultaneously exploiting the advances in ML prediction, combinatorial sample preparation, and autonomous synchrotron characterization. We applied several ML methods to predict new ternary dealloying systems by employing training and testing ML methods on randomly split published dealloying data based on systems that exhibit successful dealloying behaviors. We used ML ranked important variables to analyze the underlying materials design principles in the metal-agent dealloying method. In total, the ML models predicted 132 ternary dealloying systems from the selected 16 metal elements. A proof of concept for validating the ML method through thin-film SSID experiments was tested by dealloying a Ti-Cu alloy with Mg. Because the Ti-Cu/Mg system was reported previously40 with an established preparation and characterization methods, it is thus an ideal system to demonstrate new materials design and characterization methodologies here. A combinatorial Ti-Cu thin film was prepared to cover a wide range of parent alloy compositions. Other processing parameters were analyzed, including the dealloying time, dealloying temperature, and amount of dealloying agent. We applied synchrotron X-ray diffraction (XRD) characterization to combinatorial dealloyed thin films to explore the kinetics in Ti-Cu/Mg dealloying systems, including the phase transition, crystallization, and parent alloy composition threshold for dealloying. In addition, the crystallographic companion agent (XCA) was used to automate the XRD analysis, and gpCAM for autonomous experimental control was used to drive XRD characterization at the synchrotron beamline for faster materials discovery. This helped in overcoming the complexity and increasing the efficiency of the time-consuming validation methods for new materials with a large parameter space.

Results and discussion

Workflow of an ML-augmented framework to design SSID

The workflow includes the ML prediction of new ternary SSID systems, combinatorial thin-film deposition of predicted systems, and autonomously driven synchrotron X-ray characterization, as shown in Fig. 1.

Fig. 1: Workflow of an ML-augmented framework to design SSID.
figure 1

The workflow includes the ML prediction of new ternary SSID systems (Xenonpy76, pymatgen82, matminer77, and literatures78), combinatorial thin-film deposition of predicted systems, and autonomous synchrotron X-ray characterization (XCA50, gpCAM34, and bluesky81 libraries). The characterization result is returned to enrich the ML training datasets.

For ML prediction, ML methods are first trained based on published dealloying systems from the literature and are then employed to predict new dealloying systems. The prediction involves classifying the elemental pairs into two categories: miscible and immiscible, composing the elemental pairs into potential ternary dealloying systems, and selecting the parent alloy and the dealloying agent from each of the potential ternary systems. Different ML methods lead to different results, and the majority vote from the three ML methods with equal weight is used towards ensemble prediction, which is then validated by the experiment. The variables selected by the ML methods are used to elucidate the design criteria in SSID thin films. Note that the current training set was built on both SSID and LMD methods, considering both methods are based on the selective dissolution using a metallic dealloying agent. In the future, further refined models that train these two sets of data separately can be developed with more experimental results available in both methods.

In the experiment, we used combinatorial thin-film deposition to prepare dealloying systems and characterized them with decision-making algorithm-driven autonomous synchrotron X-rays. Efficient data collection enables the analysis of the kinetics in multiple SSID thin-film systems, validation of the ML prediction results, and improvement in the ML methods by enriching the ML training sets with the experimental results. The potential functional application is also expected to be tested at the synchrotron after validating the dealloying in the predicted systems.

The experiment and subsequent enrichment of the ML training sets with experimental results are crucial for the following reasons: (1) the reported dealloying systems were mostly designed based on the mixing enthalpy difference calculated by Miedema’s method, where testing and including more systems that did not fit the mixing enthalpy difference would help in exploring the design criteria, (2) to easily etch away the residual dealloying agent, the reported dealloying agent was mostly limited to Mg and Cu, leading to a bias in the training sets that may limit the prediction accuracies of the ML methods, and (3) the reported dealloying systems were primarily focused on successfully dealloyed systems, whereas systems that cannot be dealloyed are still useful for learning design criteria and training ML methods.

Machine learning prediction of ternary metal-agent dealloying systems

The ML predictions geared towards answering two research questions were broken down into two steps, as shown in Fig. 2. In the first step, we trained the ML methods to identify the miscible/immiscible pairs and then compose ternary dealloying systems with two miscible pairs and one immiscible pair. In the second step, we differentiated the parent alloy from the dealloying agent in each ternary dealloying system that was composed in the first step. In each of these two steps, three different ML methods were applied for classification. The selected ternary systems are expected to form bi-continuous composite after isothermal treatment at an elevated temperature to introduce solid-state interfacial dealloying, as shown in Fig. 2. Here a two-step classification was employed. This was because the literature only reports ternary systems that can introduce dealloying, without information on systems that cannot introduce dealloying. This hindered us to label ternary systems directly in a classification process with supervised learning method. With the help of the first classification step to construct the miscible and immiscible pairs first, the plausible dealloying systems can be better predicted with a more accurately defined searching space.

Fig. 2: Schematic of ML predictions of miscible/immiscible pairs and ternary dealloying systems.
figure 2

The two steps for predicting dealloying systems by the ML method. The first step is to classify the miscible and immiscible pairs and compose potential ternary dealloying systems. The second step is to determine the parent alloy and the dealloying agent in each of the ternary systems that are prescreened in the first step.

In the first step, we trained three different ML methods to classify miscible and immiscible elemental pairs. The normalized confusion matrices from each ML method on the testing sets after variable selections are summarized in Supplementary Fig. 1. The three methods showed good classification performance on the testing sets; the accuracies of the random forest, XGBoost, and SVM were 1.00, 1.00, and 0.84, respectively. Note that the high accuracy is also related to the limited sample size, but the good performance on testing sets showed no overfitting issue. Future experiments can help to expand the dataset and achieve a more robust model. As a comparison, the accuracy of determining whether the mixing enthalpy is positive or negative to classify the miscible/immiscible pairs from reported dealloying systems is 0.828. The top 10 most important variables ranked by SHAP values for each of the three ML methods are shown in Supplementary Fig. 2. It is not surprising that the mixing enthalpy is the top, most important variable ranked by both ML methods, as the reported systems from the literature were mostly designed based on the mixing enthalpy. The solubility, which is commonly used in determining dealloying systems, was also highly ranked. It is clear that the high mixing enthalpy and low solubility will lead to immiscibility. Other high-ranking variables, such as the heat of formation, the energy at the ground state, the formation energy, and the decomposition energy as the energy above the convex hull of stable points, are common contributors in the determination of the phase stability. The high rankings of these features indicated that the ML methods rely heavily on thermodynamic stability to determine miscible/immiscible pairs, which is consistent with the scientific understanding of phase stability and signifies the reliability of these ML methods.

The overlap of the new miscible pairs predicted by the three ML methods is shown in Fig. 3a. Since each binary pair can only be classified as a miscible or immiscible pair, the two classification results are in a complementary relationship. We selected the pairs that are commonly predicted from the majority (two or three) ML methods as the classification results. Therefore, a total of 94 miscible and 27 immiscible pairs were selected to generate 169 potential ternary dealloying systems.

Fig. 3: The ML prediction result and corresponding SHAP value analysis.
figure 3

a The overlap of the miscible and immiscible pairs predicted by the three ML methods, namely random forest, XGBoost, and SVM. b The overlap of predicted ternary dealloying systems from the three ML methods. c The 12 variables which are ranked by their impacts on differentiating the dealloying agent from the parent alloy, as sorted by the random forest method. Variables ending with 1 represent the properties of the first two elements in a ternary system, and those ending with 2 represent the properties of the last two elements. d The number of predicted ternary dealloying systems organized by element A, where the parent alloy is A-B. The results are voted higher by at least two ML methods.

In the second step, we separately trained three different ML methods to distinguish the parent alloy from the dealloying agent using the training dataset with a 70% random split from the 31 reported ternary dealloying systems. The normalized confusion matrices from the three ML methods are summarized in Supplementary Fig. 3. All three ML methods showed good classification performances in determining the parent alloys and dealloying agents in the testing dataset, which is the remaining 30% of the random split, and the accuracies of the random forest, SVM, and XGBoost methods in classifying the parent alloy were 1.00, 0.95, and 1.00, respectively. In comparison, the conventional method based on the mixing enthalpy difference between the parent alloy and sacrificial element with a dealloying agent showed an accuracy of only 0.516 for the 31 reported ternary dealloying systems. We then removed the overlap of the reported ternary systems from the classified A-B-C systems and focused on the newly predicted ternary dealloying systems. The overlap of classified ternary A-B-C systems with A-B as parent alloy from mixtures A-B or B-C as parent alloy in the first step by the three ML methods is shown in Fig. 3b. All the predicted ternary dealloying systems are summarized in Supplementary Table 1. The systems colored gray were voted higher by all three ML methods, while other colored systems were voted higher by only one of the two ML methods. Among the 132 predicted systems, only 59 systems satisfy the mixing enthalpy criteria, which are labeled in green and summarized in Supplementary Table 2, and the rest 73 systems that did not satisfy the mixing enthalpy criteria are labeled in orange in Supplementary Table 2. Note that using the mixing enthalpy to determine whether a system can be dealloyed is still valuable, but there are additional cases to be considered and explored. Compared to the training dataset in which 20 out of 31 (64.5%) of the dealloying systems consist of Mg as the dealloying agent, there are only 26 out of the 132 (19.7%) of the predicted dealloying systems using Mg as the dealloying agent. It shows the potential of using ML methods to explore new dealloying systems.

After removing the highly correlated variables, the top 12 most important variables selected by three ML methods by SHAP values, are shown in Fig. 3c, and the corresponding descriptions of each variable are summarized in Table 1. The variables are ranked along the vertical axis by their influence on differentiating the dealloying agent from the parent alloy. The horizontal axis shows the SHAP values for classifying the feasible and infeasible ternary dealloying systems. The color scale represents the feature value from high (red) to low (blue). Here the solubility difference between two elemental pairs was used to explain the meaning of SHAP values. The system with a relatively low solubility difference corresponds with a positive SHAP value, implies that it tends to be able to form a ternary dealloying system. The top 10 most important variables ranked by SHAP values from all three ML methods for variables selection are shown in Supplementary Fig. 4a–c. The correlation matrix showing the correlation coefficients between each pair of variables is summarized in Supplementary Fig. 4d. Different from the variables ranked in Step 1 to classify miscible/immiscible pairs, in Step 2 the mixing enthalpy was no longer ranked highly by any of ML methods.

Table 1 Description of the final 12 most important variables selected by three ML methods, using for determining parent alloy (Step 2).

Other thermodynamic variables, such as the energy at the ground state, heat of fusion, and heat of formation, were ranked highly. The energy at the ground state is related to the relative stabilities of the compounds41. The melting point is then associated with the elemental diffusivity20. Furthermore, the atomic volume was also ranked high by the ML methods; this is consistent with our previous suggestion that the entropic contribution should be included in the design criteria of the metal-agent dealloying method40. Conventionally, the mixing enthalpy has been treated as a dominant quantity due to the identification of stable alloys, and the contribution of the mixing entropy term for determining the total mixing Gibbs free energy was considered to be less important for its relatively small value, particularly in ordered structures25. In a solid solution, the entropic contribution has a significant impact on the alloy phase stability. Because we included both reported intermetallic and solid solution dealloying systems in our training sets, the ML methods were able to rank the important variables for both alloy systems. Therefore, the limitation regarding the conventional design criteria for limited intermetallic alloys can be resolved by using the ML methods.

The number of predicted ternary dealloying systems were organized by element A, where Fig. 3d depicts ternary systems A-B-C. After removing the ternary system which cannot be distinguished by ML methods, as well as the systems that have been previously reported, we obtained a total of 132 ternary systems that have been voted highly by at least two ML methods. Interestingly, the predicted elements can be dealloyed by a large number of dealloying systems that correspond to elements such as Cr and Nb that have been reported and fabricated based on the metal-agent dealloying method42. ML methods can not only provide an approach to explore metal elements that have not been explored but also enable the design of bicontinuous nanocomposites with wider elemental compositions for the explored elements.

Combinatorial thin-film SSID and synchrotron XRD characterization

Combinatorial thin-film deposition is used to prepare a range of parent alloy compositions efficiently, which is critical for analyzing the composition-dependent structural/morphological evolution and validating the ML method predictions. With its high brilliance X-ray, the synchrotron enables the characterization of a large number of samples in a short time43. These two components are critical in the materials discovery for metal-agent dealloying.

Here, the reason for choosing Ti-Cu (the A-B parent alloy) dealloyed by Mg (the C dealloying agent) with the SSID method is twofold. The first reason for this choice is that Ti-Cu dealloyed by Mg has been reported only in bulk samples with discrete compositions, while the precise dealloying composition threshold is missing. Another reason for this choice is that the Ti-Cu-Mg system does not adhere to the conventional mixing enthalpy difference criteria, which states that the mixing enthalpy of Cu-Mg is less negative than that of Ti-Cu21. In addition, the sample preparation procedure for the Ti-Cu/Mg system has been well-established. We can validate the new characterization methods in the current work against the known the crystalline phases and use the prior knowledge in the XCA method. Thus, the dealloying behavior of the Ti-Cu-Mg system through the thin-film SSID method was studied, also serving as a proof of concept for establishing a method for future experiments with a wider range of elements to (1) experimentally validate the ML method predictions, and (2) acquire new datasets for ML method training and testing, as illustrated by the workflow in Fig. 1. In the future, the accuracy of each ML method can be validated with experiments to determine the ML method with the highest accurate probability, or to combine the prediction from the ML methods each with a different weight factor based on the accuracy. In addition, experimenters may choose a dealloying system based on different design goals, such as elemental compositions, cost of the materials, and properties of the materials, etc.

A combinatorial Ti-Cu thin film was prepared by the cosputtering method44. Compared to conventional samples with discrete compositions, combinatorial samples provide an effective way to study samples with compositional gradients. In addition, we considered the influence of the processing parameters on the dealloying combinatorial samples. A total of four parameters were considered, including 3 dealloying times (7.5, 15, 30 and/or 60 min, depending on the dealloying temperature), 3 dealloying temperatures (340, 400, and 460 °C), 2 thicknesses of the dealloying agent, a Mg film, (250 and 450 nm), and a continuous parent alloy composition (Ti ~20–80 at.% in a Ti-Cu alloy). The layout with the conditions for combinatorial samples is shown in Fig. 4a, and the setup of samples measured at the XPD beamline is shown in Supplementary Fig. 5. The representative XRD result after subtracting the background from glass substrate is shown in Fig. 4b.

Fig. 4: Sample layout for XRD measurement and XRD result.
figure 4

a Sample layout for a series of combinatorial thin-film samples with four controlled parameters: parent alloy composition (Ti ~20–80 at.% in a Ti-Cu parent alloy), Mg dealloying agent film thickness (250 and 450 nm), dealloying time (7.5, 15, 30, and/or 60 min, depending on the dealloying temperature) and temperature (340, 400 and 460 °C). The numbers in each grid indicate atomic concentration of Ti in the parent alloy film. b XRD pattern from a sample dealloyed at 400 °C for 60 min, after subtracting the glass background.

The scanning step size along the horizontal (X) axis was 2 mm, and that along the vertical (Y) axis was 4.75 mm. A total of 34 × 18 = 612 data points were collected upon scanning an 80.64 mm by 66 mm area. The interpolated diffraction peak intensities from Cu2Mg (1 1 1), CuMg2 (0 8 0), and Cu2Mg (2 2 2) overlap with CuMg2 (4 4 0) in grid scanning and are shown in Fig. 5. Grid-scanned mapping was used to analyze the kinetics in the Ti-Cu dealloying system and was also used as the ground truth to validate the automatic XRD pattern analysis and autonomous algorithm-driven characterization result, which will be discussed in the next section.

Fig. 5: Selected diffraction peaks and interpolated diffraction peak intensities from Cu2Mg (1 1 1), CuMg2 (0 8 0), and Cu2Mg (2 2 2) overlapped with CuMg2 (4 4 0).
figure 5

The white color lines separate the regions with different dealloying temperature.

The variation in the dealloying-generated Cu2Mg and CuMg2 phases with dealloying temperature is shown in Fig. 5. XRD from the CuMg2 phase can be detected only below 460 °C, and XRD from the Cu2Mg phase can be detected only when dealloying at 460 °C with thick Mg. Such a phase distribution is consistent with the phase transition in Cu and Mg interdiffusion. Arcot et al. showed that with excess Cu in the system, CuMg2 transformed to Cu2Mg when the annealing temperature was >380 °C45. When a small amount of oxygen is distributed in the sample, crystal phase formation can be increased over a range of more than 200 °C. Knowing the dealloying-generated phase distribution, we used CuMg2 and Cu2Mg phases together to determine the dealloying progress.

The parting limit is the composition threshold of the parent alloy; when the concentration of the sacrificial component (B) falls below this threshold, the parent alloy cannot be fully dealloyed. While the sacrificial element composition in the parent alloy is above the parting limit, an atomic-scale network of sacrificial components (B) runs through the entire structure of the parent alloy for B element dissolution. This dissolution process is called a percolation dissolution mechanism in dealloying46. The theoretical values of the site percolation threshold for face-centered cubic (FCC) and hexagonal close packed (HCP) structures have been determined to be ~20 at.%, where ~24.5 at.% has been reported for body-centered cubic (BCC) structures47,48. Although few systems, such as the Cu-Zn system, showed a parting limit that is close to the theoretical percolation limit of ~20%, more common systems, such as Au-Ag and Au-Cu, showed a much higher parting limit of ~55%.

We used the boundary of the dealloying-generated crystalline phase to search for the parting limit in the thin-film SSID Ti-Cu system. Since only crystalline Cu2Mg and CuMg2 phases were detected from the XRD pattern, their distributions were used to find the parting limit. In the samples dealloyed with a thin Mg layer, the Cu2Mg and CuMg2 phases can be found based on samples with a sacrificial element Cu of 20–80 at.% in the parent alloy. Such a composition range matches the theoretical percolation limit. It is interesting that in the samples dealloyed by the thicker Mg films, a clear decrease in diffraction peak intensity can be found when the sacrificial element composition is below ~35 at.% in the parent alloy, as indicated by vertical red dashed lines in Fig. 5. Since thick Mg layer samples provide more material for dealloying, the difference cannot be induced by limited diffusion materials. In addition, the percolation threshold is related to the atomic coordination environment49, and a relatively thin layer is not expected to change the environment. The differences in dealloying-generated crystalline phases in thinner vs. thicker Mg films may be attributed to geometric differences in the thin films, although further kinetics analysis is needed.

ML-augmented synchrotron characterization: ML-informed automated (XCA) and ML-driven autonomous experiments (gpCAM)

A neural-network-based automated XRD pattern analysis method, XCA50, and a Gaussian process regression-based algorithm, gpCAM32, were tested separately for ML-informed automated and autonomous characterization. The goal here is to develop a methodology for rapidly validating the ML prediction results through experiments and enriching the training datasets for ML methods.

The working principle of XCA is that an ensemble model is trained from synthetic datasets by inputting the CIFs of expected phases and subsequently generates the existence probability of a given phase given the diffraction pattern. The trained XCA model can be applied to analyze the collected XRD patterns in real time. In our study, the XCA method first generated a synthetic dataset from the CIFs of the expected Ti, Cu2Mg, CuMg2, and Mg phases with a range of experimental variations, such as the diffraction instrument parameters, peak shape, sample texturing, and offset. The ensemble of CNNs were trained based on this synthetic dataset. Then, the trained model was applied to analyze the grid-scanned results on combinatorial Ti-Cu-Mg samples and the output existence probability of Ti, Cu2Mg and CuMg2 from each input diffraction pattern. To analyze the accuracy of the XCA method, we overlapped the XCA-generated existence probability of each phase with the interpolated intensity of a key diffraction peak interest for each phase from the grid scan, as shown in Fig. 6. The layout discrepancy between the XCA-generated probability distribution and grid-scanned data points is related to the sample layout. The XCA focused only on the samples with calibrated compositions, while grid scans covered the full dimension of the samples, as shown in Fig. 5. Overall, the distribution of the high probabilities of Cu2Mg and CuMg2 phases matches well with the distribution of strong diffraction intensity from the grid-scanned result. Crystalline Ti was barely detected in the dealloyed sample, but XCA generated relatively high existence probabilities among a wide compositional range of the dealloyed samples. This deviation stems from the discrete probability distribution being confined to only the input phases and no other possible impurities. The challenge of classifying out-of-distribution data, and small amounts of phases in samples need to be considered carefully in the future. Overall, the accuracy in detecting a large amount of Cu2Mg and CuMg2 phases demonstrated that the XCA is a powerful tool for analyzing the evolution of the phase during the dealloying processes. In addition, the XCA holds great advantages in considering the preferred orientation, peak shifting, and phase mixtures, which are critical for characterizing thin-film materials50. The XCA method provides an additional tool for future experimental validation and is thus valuable to be included in the current materials discovery workflow as a proof-of-concept. The data-collection points in autonomous characterization driven by an XCA-generated probability are summarized in Supplementary Fig. 6.

Fig. 6: The distribution of the XCA-generated phase probability, represented by round points in a gray-to-blue color scheme, overlayed on the interpolated intensity of the designated diffraction peak in the grid-scanned result, represented by a yellow-to-purple color scheme.
figure 6

The diffraction analysis was based on Cu2Mg (1 1 1), CuMg2 (0 8 0), and Ti (1 1 0).

We also tested the gpCAM algorithm, which autonomously decides on future measurements and is critical in driving experiments in the multidimensional parameter space. gpCAM was developed based on Gaussian-process regression and we augmented the GP posterior variance with local information and measurement costs. In this experiment, gpCAM considers the absolute value of the gradient to find regions where the diffraction intensity rapidly changes as local information and the total time required to acquire a new datapoint as the measurement cost. Here, gpCAM aims to search the phase boundary based on the intensities of the diffraction peaks of dealloying-generated Cu2Mg and CuMg2. The selected diffraction peak was previously characterized as an overlapping peak from Cu2Mg (3 1 1) and CuMg2 (3 5 1), and the peak in the q range is 3.047 Å−1–3.106 Å−1, where q is the momentum transfer of the scattered wave vector to the incident wave vector. By comparing the peak intensity distributions from Cu2Mg (1 1 1) and CuMg2 (0 8 0), we were able to determine that this diffraction peak is mainly attributed to the Cu2Mg phase, thus corresponding to Cu2Mg (3 1 1).

Compared to the grid scan in which 612 points were collected, in the gpCAM-driven autonomous experiment, only 133 points were collected. With only ~21.7% of the data points, the autonomously driven analysis was able to successfully determine the boundary of the Cu2Mg phase by means of the key processing parameters. The intensity and distribution of gpCAM data- and mapping of the Cu2Mg (3 1 1) diffraction peak intensity in the grid scan are shown in Fig. 7. The collection trajectory, intensity of the Cu2Mg (3 1 1) diffraction peak in the gpCAM-driven characterization is shown in Supplementary Fig. 7. A large number of collected points were distributed at the boundary between 400 °C for 60 min and 460 °C for 7.5 min in both thin and thick dealloying agent samples. This result indicates that gpCAM determined the Cu2Mg phase transition distributed between 400 °C and 460 °C, matching the grid scan results. Overall, this match of the phase boundary from grid-scanned mapping with gpCAM collected points proves the capability of gpCAM in analyzing the phase transition in SSID.

Fig. 7: The data-collection distribution of the autonomous experiment driven by the gpCAM algorithm overlayed on the interpolation of the diffraction peak intensities from Cu2Mg (3 1 1) and CuMg2 (3 5 1).
figure 7

a The sample with thin Mg layer, b The sample with thick Mg layer. Note that the colormap in grid-scan and gpCAM are different for better visualization. (For video sequence of diffraction peak intensity analysis see Supplementary Movie 12).

It should be noted that while gpCAM determines the boundary based on the diffraction peak intensity calculated from a fixed q range, it could be replaced by the phase probability result from the XCA method. From each collected XRD pattern, the XCA generates the probability of an existing phase, which can be used to replace the diffraction peak intensity in the gpCAM algorithm. gpCAM searches through the phase distribution based on the probability of a given phase existing at each location. In such circumstances, we can prevent XRD pattern variation in thin-film samples, such as a strain-induced phase shift, calculate the compositional variation according to Vegard’s law, accurately determine the dealloying-generated phase intensity, and efficiently analyze the dealloying results. To fully realize a closed-loop approach, future test on the systems predicted in this work could consider different design criteria and cost functions based on the goal of the materials design. For instance, other dealloying agents beyond Cu and Mg could be prioritized to create novel systems. Alloys with compositions not following the conventional mixing enthalpy differences would be of fundamental research interests. For particular applications, the cost of materials and processing constraints such as temperature can be considered.

Conclusion

An ML approach to dealloying and designing nanoporous/nanocomposite materials is first introduced. The proposed ML ensemble pipeline consisting of three ML methods was able to predict 132 ternary dealloying systems from 16 selected metal elements after training with published dealloying systems. In addition to elements that have never been reported by the dealloying method, more elemental combinations have been introduced to pave the way for the development of nanocomposites and nanoporous materials with a broader range of applications. The important variables ranked by the ML methods, such as energy at the ground state, fusion heat, and heat formation, indicate that thermodynamic stability is the key to designing dealloying systems. In addition, atomic volume differences that contributed to entropy changes were also ranked highly by the ML methods. The ML methods have demonstrated their potential to overcome the limitations of conventional design criteria in intermetallic alloys and can be readily applied to a wider range of alloys.

The kinetics in Ti-Cu-Mg dealloying systems was studied using combinatorial thin-film deposition and synchrotron XRD characterization. The relation between the phase transition of dealloying-generated Cu2Mg and CuMg2 phases and the dealloying conditions was discussed. Relation between the dealloying-generated phase and the film thickness and parent alloy composition was analyzed.

A neural-network-based automated XRD pattern analysis method, XCA, and a Gaussian process regression-based algorithm using the gpCAM software were validated through the characterization of Ti-Cu-Mg dealloying systems. The accuracy of XCA analysis in identifying the Cu2Mg and CuMg2 phases generated from dealloying and the efficiency of finding the Cu2Mg phase boundary through gpCAM were demonstrated. In the future, validated ML-informed automated pattern analysis and the ML-augmented decision-making algorithm can be combined to further the development of the autonomous experimental methods, where a range of automatic decision making, analysis, instrumentation, and communication tools are combined to create a closed-loop that can make intelligent decisions during an experiment without human interaction.

The ML-augmented workflow built in this work will significantly improve data-acquisition accuracy and rate, which will pave the way for rapidly validating the ML predictions, enriching the ML training set with experimental results, improving the accuracy of the ML methods, and developing nanoporous/nanocomposite materials. Moreover, such a workflow can be used to design a wider range of solid-state materials with limited published results.

Methods

Machine learning prediction of ternary systems for metal-agent dealloying

To construct a ternary system where the dealloying of a parent alloy by a dealloying agent can occur, two questions must be answered. First, among all possible ternary systems, how do we identify promising ternary systems that may display dealloying behavior with two miscible pairs and one immiscible pair of elements? Here we simplify the question and exclude the potential ternary systems that composed of three miscible pairs or composed of one miscible pair and two immiscible pairs. Second, within a ternary system, how do we discern which element will act as a dealloying agent in the immiscible pair? Note that the other element is then the remaining element left within the parent alloy. While for both questions, thermodynamics can provide guidelines for identifying possible answers, these two questions are essentially classification problems that can also be addressed using ML methods.

Based on the two questions outlined above, we divided the ML-based classification process for identifying dealloying systems into two steps. In Step 1, ML methods were trained to classify the published miscible and immiscible pairs. Once trained, the first-step ML classifier can be applied to classify new elemental pairs into miscible and immiscible pairs. Two miscible pairs and one immiscible pair were then combined to form ternary systems. In Step 2, ML methods were trained to distinguish ternary systems that will lead to dealloying process. This was done by identifying systems with the A-B combination as a parent alloy from a mixture of ternary systems where either A-B or B-C combination is the parent alloy; both new systems satisfy the criterion of Step 1 in that they contain a composition of two immiscible pairs and one miscible pair. However, only the systems with A-B as parent alloys will lead to the dealloying process. Once trained, the second-step ML classifier can identify the parent alloy and dealloying agent from new ternary systems.

To establish ML methods to address the above classification problems, training and testing datasets were collected from a total of 21 different peer-reviewed papers, including 13 discussing the LMD method8,10,11,14,19,51,52,53,54,55,56,57,58,59,60,61,62,63, 4 papers addressing the SSID method17,20,64,65, and 4 papers examining the aqueous solution dealloying (ASD) method66,67,68,69, listed in Supplementary Table 3. These data were then used to classify miscible/immiscible pairs. Excluding the ASD systems, only the training and testing datasets from metal-agent dealloying systems were used for classifying parent alloys and dealloying agents. Each of the ternary dealloying systems is composed of three elements, A, B, and C, where the parent alloy elements A and B are miscible. In addition, the sacrificial element (B) and the dealloying agent (C) are miscible, while the remaining element (A) and the dealloying agent (C) are immiscible. We organized all the reported dealloying systems to follow the A-B-C sequence, specifically to distinguish dealloying agent C from the remaining element A. To identify miscible/immiscible pairs, the organized A-B-C ternary systems were separated into A-B and B-C miscible pairs, as well as A-C immiscible pairs. Some reported systems have more than two elements in the parent alloy. Following the miscible/immiscible relation, these systems (A1A2…An)-B-C were separated into multiple miscible pairs (A1B, A2B… AnB, BC) and immiscible pairs (A1C, A2C… AnC) and placed into the miscible/immiscible dataset. In addition, we also separated (A1A2…An)-B-C into A1-B-C, A2-B-C… An-B-C ternary systems, which were included in the training and testing datasets for classifying parent alloys and dealloying agents.

We first conducted the training and testing of the ML methods for both steps using the data from the literature. In the first step, we classified all reported dealloying systems into miscible and immiscible pairs. Two types of elemental parts are labeled as miscible pairs: (1) the parent alloy elemental pair, and (2) the pair of sacrificial element and dealloying agent. The pair of the residual element and the dealloying agent is labeled as immiscible pair. In our dataset, we summarized 64 pairs, including 43 miscible and 21 immiscible pairs. To train each ML method, the dataset was randomly divided, where 70% was allocated for training and 30% was allocated for testing classifier performance. To increase the reliability of the ML predictions, we used three ML methods from the scikit-learn library70: random forest71, support vector machine (SVM)72, and XGBoost73. We trained the ML methods with all variables and used the SHAP (SHapley Additive exPlanations) value, based on a game theoretic approach for explaining outputs of ML models to select variables74. The union set of the top five important variables from each ML method was selected, leading to a total of 10 valuables. Then we removed two highly correlated variables (correlation coefficients r > 0.8) based on the correlation matrix. The final 8 variables selected were used to train the three ML methods with one more iteration, listed in Supplementary Table 4. The trained ML classifier was then applied to predict new miscible and immiscible pairs generated from 16 selected elements, including Mg, Al, Sc, Ti, V, Cr, Mn, Fe, Co, Ni, Cu, Zn, Zr, Nb, Mo, and Ta. The fabrication of half of the selected elements has not been reported based on the metal-agent dealloying method, according to McCue et al.’s report42. Although all the three ML methods showed great performance in both training and testing process, they showed different prediction results on new pairs. We used the majority vote from the three ML classifiers with equal weight as the ensemble prediction result75 so that the common predictions from at least two ML classifiers were included, while the prediction from only one ML classifier without intersections with the other ML classifiers’ prediction was not included in the final classification result. The newly classified miscible and immiscible pairs derived from the ensemble prediction results were used to build new potential ternary dealloying systems A-B-C, where A-B and B-C are two miscible pairs and A-C is an immiscible pair.

In Step 2, we then introduced the second classification step to identify the parent alloy and dealloying agent in the potential ternary systems, as classified in Step 1. The parent alloy and dealloying agent were not identified in the new ternary A-B-C dealloying system in the first step. In Step 1, we did not determine the relative strength of the miscibility. In Step 2, we then identified whether A-B or B-C had a stronger tendency to mix; in other words, we classified whether A-B or B-C was the parent alloy. From the published result, we knew that the C element had a stronger tendency to combine with the B element so that the A element could not dealloy the B-C pair. In Step 2, we classified the ternary alloy systems where B-C combination is the parent alloy as systems that cannot be dealloyed. A total of 62 systems, including 31 feasible systems, were reported as feasible ternary systems with A-B combination as parent alloy; the 31 corresponding infeasible ternary systems with B-C combination as the parent alloy were randomly split, resulting in 70% of the system allocated for training and 30% for testing. The elemental distribution in training and testing dataset in the step 1 and 2 are summarized in Supplementary Fig. 8. We then separately trained 3 ML methods (random forest, XGBoost, and SVM) to classify feasible and infeasible systems. The variables selection based on the SHAP values were conducted following the similar procedure as in step 1, except that the top eight important variables were selected from each ML method, leading to a total of 18 in the union set. After removing six values with r > 0.8, a total of 12 final variables were selected (Table 1). The trained classifiers were then applied to differentiate ternary systems with A-B or B-C as parent alloy that were composed in the first step.

The variables that were input into the ML methods to classify and predict new dealloying systems were sets of quantitative attributes describing the materials. We selected 55 relevant element-level properties and electronic structure attributes available in the Python library XenonPy76, including 21 calculated elemental properties developed for a general machine learning framework for inorganic materials26. To avoid bias from training sets that restricted dealloying agents to specific elements (Cu and Mg), we focused on the relationships within elemental pairs rather than the individual element properties. We computed the means and absolute differences of each pair’s 52 attributes and used them as variables in the ML methods. In addition, we included two key variables, mixing enthalpy and maximum equilibrium solubility in binary systems, that are conventionally used to classify dealloying systems. The mixing enthalpies of all elemental pairs were calculated based on Miedema’s method21 and are available from the Python library Matminer77. The maximum equilibrium solubilities of the first 83 elements in the periodic table were collected from the literature78. We also included thermodynamic attributes to determine the compound stabilities, including the formation energy and energy above the convex hull (approximate as decomposition enthalpy)24, which are available in the Matminer library77. Since the compositions of the dealloying-generated B-C phases were not reported in all the literature, we did not consider a specific composition in each A-B-C system. We generalized the dealloying for compositional attribution and included only the minimum and maximum values of the formation energy and energy above the hull among each binary pair here. All variables were summarized in Supplementary Table 5.

To select the optimal ML methods, we evaluated the performances using fivefold cross-validation for the three different ML methods in the scikit-learn library70, including random forest, SVM, and XGBoost. Hyperparameters, including the number of estimators and maximum depth in XGBoost and random forest, and C values in SVM were selected through a fivefold cross-validated randomized search79. The confusion matrix were used to assess each method’s classification performance. Although the confusion matrix from three ML methods all showed a good classification performance, and the majority of the predictions from three ML methods overlapped, there is still a small number of predictions from each ML method disagrees with each other. Because of the limited data availability, and clustered data at Ti, Cu and Mg elements, we further validated the trained ML methods with the leave-one-element-out method in both steps. The cross_val_score function available in the scikit-learn package was applied with 30 fold cross-validation, and the output accuracies of trained ML methods were averaged and collected. In step 1, the averaged accuracy for the random forest is 0.90, the accuracy for XGBoost is 0.89, and the accuracy for SVM is 0.92. In step 2, the accuracy for the random forest is 0.92, the accuracy for XGBoost is 0.87, and the accuracy for SVM is 1.00. The result indicates that ML method is reliable.

Combinatorial thin-film deposition and synchrotron characterization

Borosilicate glass slides (TedPella) with an initial area of 114 × 159 mm2 and a thickness of ~200 µm were cut down to 72.5 × 72.5 mm2 in size for the deposition substrate. Before deposition, the glass slides were cleaned with isopropyl alcohol and deionized water, followed by treatment in an oxygen-plasma environment. A Ta film (99.95% purity, 3” diameter, and 0.125” thickness target from Kurt J. Lesker) was deposited by direct current (DC) sputtering as a barrier layer. A combinatorial film with a compositional gradient of TixCu1−x (x = 20–80 at.%) was prepared by cosputtering Ti and Cu targets (2” diameter and 0.125” thickness, Kurt J. Lesker) at the University of Maryland44. A Mg sputtering target (99.95% purity, 3” diameter, and 0.25” thickness from Kurt J. Lesker) was used as the dealloying agent. The deposition of the homogeneous barrier layer Ta film and dealloying agent Mg film was conducted at the Center for Functional Nanomaterials (CFN) in Brookhaven National Laboratory (BNL). For the Ta and Mg sputtering targets, a cleaning protocol that involved sputtering the target for 5–10 min with the sputtering shutter closed was conducted to remove the surface oxides. Ta, Ti-Cu, and Mg films were sequentially sputtered onto borosilicate glass slides. Two types of samples with different thicknesses of Mg were prepared: one with a 250 nm thin Mg layer and another with a 450 nm thick Mg layer. The thickness of the rest layer was consistent in both types of samples: 80 nm for Ta and 220 ± 35 nm for Ti-Cu.

After deposition, the samples were heated by rapid thermal processing (RTP-600S, Modular Process Technology Corp.) for an isothermal heat treatment to introduce dealloying. All heat treatment processes were conducted in a reduced gas atmosphere (4 vol.% hydrogen and 96 vol.% argon) to prevent oxidation during the heat treatment. The samples were heated from room temperature to the designated dealloying temperature in 30 s and kept at the dealloying temperature for a designated duration of time. The samples were then cooled to room temperature in ~150 s. The heating temperature and time were determined based on the estimated diffusion length between Cu and Mg, as calculated based on the diffusion data in the literature80.

X-ray diffraction analysis was conducted at the X-ray powder diffraction (XPD) beamline 28-ID-2 at the National Synchrotron Light Source II (NSLS-II) in BNL. The incident X-ray beam energy was 66.16 keV, with a corresponding X-ray wavelength of 0.1874 Å. The beam size was 0.5 mm × 0.5 mm. A large-area X-ray detector with 2048 × 2048 pixels was used to measure the XRD patterns, where the size of each pixel was 200 × 200  µm2. The distance from the sample to the detector was first calibrated with a Ni standard and determined to be 1356.038 mm. The exposure time for collecting each XRD pattern was 60 s. Phase identification based on the XPD results was carried out by comparing the peak locations to those of reference compounds using the commercial software package Jade (Materials Data, Inc. Jade 9). The analysis of diffraction peak intensity was based on the integral of peak intensity after removing the background. The background was fitted by linear interpolating the averaged values of three points on both sides of a given diffraction peak. For instance, for the Cu2Mg (311) peak, we integrated the peak intensity with the corresponding q range from 2.925 to 2.974 Å−1. The diffraction background was removed based on a linear interpolation of the peak intensity at 2.925 and 2.974 Å−1, where values were averaged from three data points at the immediately left of 2.925 Å−1 and right of 2.974 Å−1 respectively.

Automatic XRD pattern analysis and autonomous characterization

A ensemble of feed forward convolutional neural networks were applied to automatically analyze the XRD pattern50. These models were built using the Crystallography Companion Agent (XCA) package, and trained on synthetic datasets by inputting the crystallographic information file (CIF) of the expected phases and created an output of probabilistic classifications. The XCA input included Mg, Cu2Mg, CuMg2, and Ti CIFs collected from the materials project. The autonomous experiment was driven by gpCAM to autonomously detect phase transformation and drive the XRD data-collection process31.

Bluesky, a library for experimental control and scientific data collection, was used for synchrotron characterization81. This library supports the collection and analysis of data in real time, enabling the incorporation of XCA and gpCAM into the ML-augmented materials design process.

In the autonomous characterization process, the experimental control was coordinated based on two Python programs: bluesky control of the XPD beamline and gpCAM implementation of Gaussian-process-based optimization for decision making. Although XCA performed automated XRD pattern analysis separately in this experiment, it demonstrated the feasibility of combining this step with autonomous experimental control; such control involves bluesky controlling the beamline, XCA analyzing the pattern, and gpCAM deciding the measurement point from the XCA-generated probability.