Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Nanoscale light element identification using machine learning aided STEM-EDS


Light element identification is necessary in materials research to obtain detailed insight into various material properties. However, reported techniques, such as scanning transmission electron microscopy (STEM)-energy dispersive X-ray spectroscopy (EDS) have inadequate detection limits, which impairs identification. In this study, we achieved light element identification with nanoscale spatial resolution in a multi-component metal alloy through unsupervised machine learning algorithms of singular value decomposition (SVD) and independent component analysis (ICA). Improvement of the signal-to-noise ratio (SNR) in the STEM-EDS spectrum images was achieved by combining SVD and ICA, leading to the identification of a nanoscale N-depleted region that was not observed in as-measured STEM-EDS. Additionally, the formation of the nanoscale N-depleted region was validated using STEM–electron energy loss spectroscopy and multicomponent diffusional transformation simulation. The enhancement of SNR in STEM-EDS spectrum images by machine learning algorithms can provide an efficient, economical chemical analysis method to identify light elements at the nanoscale.


In a multi-component material, light elements determine the physical, chemical, mechanical, and electrical properties of the material; hence, alloying with light elements can be exploited for many applications. For example, the microstructure and phase stability in ferrous alloys are strongly dependent on the addition of a small amount of C and/or N (~ 1 wt%), which in turn dramatically changes their mechanical properties and corrosion resistance1,2,3,4,5. In addition, the distribution/concentration of light elements at the nanometer scale substantially affects the phase formation, which determines the performance of the material6,7. Therefore, analytical characterization techniques, strengthened by both a robust detection limit and nanometer spatial resolution, are required for researching and manufacturing materials with enhanced properties.

Analytical techniques such as scanning transmission electron microscopy (STEM)-electron energy loss spectroscopy (EELS) and 3D atom-probe tomography (3D-APT) have been widely used to characterize the chemical composition or a phase structure of materials due to their excellent detection limits (0.005–0.1 at%8,9,10 and 0.001 at%11,12, respectively) and spatial resolutions (0.1 nm13,14 and 0.2–0.4 nm15,16,17,18, respectively). In spite of these strengths, these techniques have some drawbacks. For example, large background EELS signals that stem from multiple scattering appear in the tails of the zero-loss peaks, resulting in a reduction in sensitivity19. Consequently, chemical composition results are substantially affected by the thickness of samples when using STEM-EELS. In addition, the wider usage of 3D-APT in nanoscale characterization is limited owing to the necessity of using small analytical volumes (~ 10 × 10 × 100 nm)20,21, the difficulty of sample preparation, and the production of local magnification artifacts caused by evaporation field-induced compositional variations16,22.

In contrast, STEM–energy dispersive X-ray spectroscopy (EDS) allows a detection limit as small as 0.05 wt%23 with nanometer spatial resolution (< 2 nm)24,25 and adequate efficiency of both time and cost for chemical quantification. However, the detection limits of light elements are insufficient, since less characteristic X-ray signals are generated by light elements owing to the lower number of orbiting electrons. This results in a smaller sample signal compared to the noise signal. This lower signal-to-noise ratio (SNR) restricts light element identification by STEM-EDS. Furthermore, it is difficult to detect a light element when alloyed with heavy element(s), because its characteristic X-ray energies are likely to be overlapped by the low-energy L and M peaks of the heavy element26.

Recently, machine learning (ML) algorithms have been applied for the classification27,28,29,30,31,32,33,34,35 and noise reduction36,37,38,39,40 of images or spectra obtained from electron microscopy. These algorithms point to a possible congregation of different signals that represent independent information but are physically correlated with each other. This is achieved using statistical algorithms that perform the dimensionality reduction without human contribution, such as singular value decomposition (SVD) and independent component analysis (ICA). Therefore, the noise signals can be distinguished from the elemental signals using these unsupervised ML algorithms, and consequently, they can be removed. Eventually, the sensitivity can be enhanced by noise-reduction of the initial data. The SVD and ICA algorithms have been applied to EDS spectrum images (SIs) of multi-component systems with nanoscale spatial resolution29,30,31, which enhanced the sensitivity of chemical composition and distribution measurements.

Herein, we present a simple, efficient, and economical analytical method for nanoscale light element characterization using STEM-EDS SIs with the aid of ML algorithms. High-nitrogen stainless steel (HNS) was used as the target alloy. This alloy has been used in a wide range of applications, from medical materials to the ship and oil industries. It is an interesting material owing to its high fatigue strength, tolerance for fracture at low and high temperatures, cold working hardening, and high wear resistance, among other features1,2,3. These characteristics originate from the high N content (> 0.4 wt%), which acts as a strong austenite stabilizer and an interstitial solid solution strengthener2,3,4,5,6,7,41,42, and also improves the corrosion resistance of stainless steel when in solid solution42. Despite these advantages, the lack of thermal stability of HNS hinders its use. When aged at 600–950 °C, the Cr and N in HNS tend to form Cr2N precipitates43,44,45,46,47,48,49,50, which reduce the mechanical properties such as tensile strength, fracture toughness, and fatigue life46,47,48,49,50,51,52, as well as the corrosion resistance50,53,54.

It is generally accepted that the precipitation of Cr2N induces the formation of Cr- and N-depleted zones around the precipitate44,55. Since these elements are responsible for the physico-chemical properties of stainless steels, investigating these Cr- and N-depleted zones is essential. However, various reports44,55 have shown that the Cr- and N-depleted regions are too narrow for substantial composition changes to be detected. Additionally, the low SNR makes it difficult to identify N depletion, although this can be overcome by enhanced detection limits and spatial resolutions. On the other hand, electrochemical methods have been employed to indirectly estimate the extent of Cr depletion, both at the grain boundary and around Cr-related precipitates, through evaluation of the intergranular corrosion behavior43,44,56. Additionally, direct observation of Cr-depleted regions around the Cr2N precipitates using techniques such as scanning electron microscopy (SEM)-EDS47,57, electron probe micro-analysis (EPMA)58, transmission electron microscopy (TEM)-EDS59, and STEM-EDS60 have been reported. However, even these techniques do not have the detection limit or SNR required for clear analysis of the N depletion.

In this study, we investigated the correlation between the element distribution around the Cr2N precipitate and the aging time of HNS using STEM-EDS SIs with improved SNRs via ML algorithms. Using this technique, we performed an effective and direct observation of N distribution around the Cr2N precipitate in HNS. The elemental spectrum was compared to spectra treated with SVD and ICA algorithms to examine whether these algorithms are effective in reducing the noise signals. Additionally, the verification process was conducted using EELS data and a multicomponent diffusional transformation simulation.

Results and discussion

Figure 1 shows SEM images of the microstructures of HNS specimens aged at 900 °C for 103, 104, and 105 s. Trigonal Cr2N precipitates61,62,63 were observed in the micrographs as bright white regions at the grain boundaries and within the grain with a lamellar structure. In the specimen aged for 103 s (Fig. 1a), a cellular type of Cr2N began to form within the grains, and the volume fraction of cellular Cr2N increased with the aging time (Fig. 1b,c). The precipitate embryos grow by consuming other embryos or constituent elements around them, resulting in the formation of a region depleted of specific elements around the precipitate. However, the depletion zone of light elements such as N is not easily detected by conventional STEM-EDS technology because the SNR is too low. We attempted to overcome this detection limit by reducing the noise signals using unsupervised machine learning algorithms. First, the elemental distribution around the Cr2N precipitate was investigated using STEM-EDS. Then, the noise signals in the spectral images were reduced by combining several unsupervised machine learning algorithms. Finally, by comparing the noise-reduced STEM-EDS, EELS, and simulation results, the depletion zone of light elements was confirmed.

Figure 1
figure 1

Scanning electron microscopy (SEM) images (top) and higher magnified images (bottom) of yellow box marked in each SEM image of P900NMo alloy specimens showing morphologies of Cr2N precipitates grown by aging at 900 °C in high-nitrogen stainless steel (HNS) for different aging times: (a) 103 s, (b) 104 s, and (d) 105 s.

Figure 2 shows the high-angle annular dark-field imaging (HAADF)-STEM and EDS mapping images of a typical precipitate in the HNS sample aged at 900 °C for 103 s. The precipitates had a cellular morphology and width of 100–150 nm. The EDS maps show that the main components of the precipitate and matrix were Cr and Fe, respectively (see Fig. 2b,c, respectively). There was minimal Fe in the precipitate, while Mn, N, and Mo were all present (Fig. 2d–f). The concentration of Fe atoms in the precipitate was less than 5% of that in the matrix (for details, see Fig. 3a), which suggests that the precipitate does not overlap with the matrix alloy, or is placed on a very thin matrix layer that can be considered negligible. Thus, the characteristic X-ray signals of Mn and Mo within the precipitate, as shown in Fig. 2e,f, respectively, do not result from the matrix alloy but from the precipitate itself. The concentration of Mn atoms within the precipitate was smaller than that within the matrix, while the concentration of Mo atoms was greater. The morphology and width of the precipitates and the respective distribution of each element (including each element’s concentration) were similar to that in the samples aged for 104 and 105 s (see Supplementary Figs. S1 and S2 online).

Figure 2
figure 2

High-angle annular dark-field imaging (HAADF)-scanning transmission electron microscopy (STEM) and energy dispersive X-ray spectroscopy (EDS) elemental mapping images of the Cr2N precipitate in the specimen aged at 900 °C for 103 s: (a) HAADF-STEM image, (b) Cr EDS map, (c) N EDS map, (d) Fe EDS map, (e) Mn EDS map, and (f) Mo EDS map.

Figure 3
figure 3

High-angle annular dark-field imaging (HAADF)-scanning transmission electron microscopy (STEM) micrographs of Cr2N precipitates (top) and composition line profiles for Cr, Fe, Mn, Mo, and N (bottom) along the red lines marked in the HAADF-STEM images of specimens aged at 900 °C for different aging times: (a) 103 s, (b) 104 s, and (c) 105 s. The composition line profiles of Cr and N are magnified and displayed as insets, showing whether the depletion region of Cr and N is observed.

For more quantitative analysis, the EDS concentrations of each element were profiled along the red lines in Fig. 3a–c. The concentrations of each element in the matrix and within the precipitate were similar for the samples aged for 103, 104, and 105 s; the Cr, Fe, Mn, Mo, and N concentrations in the matrix were approximately 16, 63, 21, 2, and 0.2 wt%, respectively, and those with in the precipitate were 71, 4, 18, 2.5, and 4.3 wt%, respectively. The difference in matrix composition between the nominal composition and EDS results stems from the uncertainty of electrons scattered into a detector30. Within the precipitate, the Cr and N concentrations were approximately 71 and 4 wt%, respectively, regardless of the aging time. However, the Cr and N concentrations around the precipitate, i.e., in the depletion region, were dependent on the aging time. In the sample aged for 103 s, a Cr-depleted zone was observed around the precipitate, with a minimum Cr concentration of 13 wt% (adjacent to the precipitate; see the left inset of the composition line profile in Fig. 3a for details), while no such reduction in Cr concentration was observed for the samples aged for 104 or 105 s (see the left insets in Fig. 3b,c, respectively). This difference is likely to result from the diffusion of Cr atoms from the matrix to the region around the precipitates in the samples aged for 104 and 105 s. Nevertheless, this does not explain the absence of an N-depleted region in the sample aged for 103 s (right inset in Fig. 3a), because the interstitial diffusion of N atoms is faster than that of the other substitutional elements. Considering the low concentration of N in HNS, it is conceivable that the flat concentration profile resulted from difficulties in distinguishing N signals and noise.

To investigate the presence of the N-depleted region around the Cr2N precipitate, the noise signals of the SIs were reduced using the SVD and ICA algorithms. The EDS maps were reconstructed using only a few principal components following decomposition using the SVD and ICA64,65,66 and selected based on a knee-point detecting algorithm67 (for details, see Supplementary Figs. S3S5 online). Figure 4 shows the reconstructed EDS maps of the samples aged for 103, 104, and 105 s. The Cr, Fe, and Mn elemental maps do not differ much from the original maps. This suggests that the principal components selected based on the knee-point algorithm provide enough information to represent most of the variation of the characteristic X-ray signals, while also reproducing the elemental configuration. However, where the element had a relatively small concentration, such as N and Mo, the SNR of the elemental maps was considerably enhanced by the noise reduction process (for details, see Supplementary Fig. S6 online). The magnitude of characteristic X-ray signals from the majority elements (Cr, Fe, and Mn) is sufficiently higher than that of the noise signals; therefore, reduction of the noise signals has a negligible effect on the original spectral data. The opposite was observed for N and Mo, where the original SNR was much lower.

Figure 4
figure 4

Images with enhanced resolution due to reduced noise signals. Energy dispersive X-ray spectroscopy (EDS) mapping images reconstructed using only a few principal components of the samples aged at 900 °C for different aging times: (a) 103 s, (b) 104 s, and (c) 105 s.

To confirm whether the remarkable SNR enhancement in the N and Mo spectral data would reveal the presence of the N-depleted region, we re-examined the compositional line profiles of the precipitate and surrounding area. In order to make a fair comparison with the line profiles in Fig. 3, the concentrations of each element were profiled at exactly the same position and width, as shown in Fig. 5. (Line profiles integrated at other positions are presented in Supplementary Figs. S7S9 online.) The resulting compositional line profiles of all elements except N were equivalent to those from the original spectral images. However, an N-depleted region was clearly revealed in the sample aged for 103 s following noise reduction, as shown in the right inset in Fig. 5a. The width of the Cr- and N-depleted regions were almost identical at 70–100 nm, indicating that the diffusions of Cr and N atoms were considerably correlated. Additionally, the minimum Cr concentration in the depletion region was 13 wt% (adjacent to the precipitate), which coincides with the result obtained from the line profile in Fig. 3a, while the minimum N concentration was 0.01 wt% (adjacent to the precipitate). Compared to the Cr and N concentrations in the matrix of approximately 16 and 0.2 wt%, respectively, the depletion region was deficient in Cr by ≤ 3 wt% and in N by ≤ 0.19 wt%. Cr- and N-depleted regions were not observed in the samples aged for 104 and 105 s. Thus, an aging time of 104 s seems to be sufficient for Cr and N atoms to diffuse into the depletion region around the Cr2N precipitates. These observations were confirmed by summing the EDS signals in an area for each of the regions of interest, i.e., the matrix, depletion region, and precipitate (see Supplementary Fig. S10 online for details).

Figure 5
figure 5

Energy dispersive X-ray spectroscopy (EDS) line profiles of each element for the samples aged at 900 °C for different aging times: (a) 103 s, (b) 104 s, and (c) 105 s. The composition of each element is profiled along the same red lines marked in the high-angle annular dark-field imaging (HAADF)-scanning transmission electron microscopy (STEM) images in Fig. 3.

It is almost impossible to quantify the detection limit in EDS images because of the discontinuity of the characteristic X-ray signals; therefore, we evaluated the degree of enhancement for the detection limit of EDS images by calculating the SNR (Table 1). The EDS mapping images of abundant elements like Cr, Fe, and Mn were slightly or negligibly enhanced, but those of sparse elements like Mo and N were drastically improved on the SNR (or the detection limit), with improvements of 470% and 44%, respectively.

Table 1 Signal-to-noise ratios (SNRs) calculated for energy dispersive X-ray spectroscopy (EDS) elemental mapping images before and after noise reduction (NR).

We performed EELS analysis of a Cr2N precipitate to validate the EDS results. The EELS elemental maps of Cr and N (Fig. 6a,b, respectively) provide information about the Cr- and N-depleted regions, with these regions being clearly recognized in the line profiles (see Fig. 6c and Supplementary Fig. S11 online). To compare the Cr and N EELS line profiles, the intensity of the N profile was adjusted to that of the Cr profile by multiplication with an appropriate value. Interestingly, the depletion regions of Cr and N coincided precisely, as shown in Fig. 6c. Both regions had a width of approximately 70–100 nm, which is the same as the width of the depletion regions obtained from the EDS results (Fig. 5a). This confirms that the noise reduction achieved by the proposed technique successfully increases the SNR without loss of information from the original signals. In general, the efficiency of EELS analysis in terms of both time and cost is inferior to that of EDS analysis. In addition, to eliminate the effect of sample thickness on the EELS signals, the plural scattering signals must be removed from raw EELS data, with the risk of distorting the spectra. From this perspective, EDS analysis with machine learning algorithms is more effective than EELS for detecting light elements.

Figure 6
figure 6

Electron energy loss spectroscopy (EELS) elemental maps of (a) Cr and (b) N constituting the Cr2N precipitate, and (c) their line profiles. The line profiles are obtained along the blue lines indicated in the EELS mapping images, and regions in black boxes are magnified as insets. The line profile of N was multiplied by an appropriate value to allow comparison with that of Cr.

To better understand the reason behind the similar widths of the N- and Cr-depleted regions, we explored the diffusional dynamics of each element, i.e., Fe, Cr, Mo, Mn, and N, using numerical simulations to solve the diffusion equation. The simulation results are summarized in Fig. 7. The austenite and Cr2N phases are both thermodynamically stable at 900 °C. Hence, the direction in which the interface moves is related to the equilibrium fractions of Cr2N and austenite. Figure 7b–f show the concentration profile changes for each element in the whole system at different times. The element concentrations change abruptly at the interface of the two phases. Fe, Cr, and N have relatively large concentration gradients at the submicron scale when the heat treatment is less than 103 s. This means that the probability of observing Cr- and N-depleted regions in the sample aged for 103 s is higher than that in the samples aged for longer than 103 s. Additionally, the simulation results coincided with the EDS and EELS experiments. It is important to note that, over time, the gradient of N is similar to that of Cr (Fig. 7c,f, respectively), which could be attributed to the chemical potential effect caused by the Cr concentration gradient in the matrix. This happens despite the diffusion coefficient of N being approximately five orders of magnitude higher than that of other substitutional elements. These diffusional dynamics induced by the chemical potential effect force the width of the N-depleted region to correspond with the Cr-depleted region.

Figure 7
figure 7

Results of a multicomponent diffusional transformation simulation showing Cr2N precipitate growth. (a) Precipitate size as a function of temperature, and alloying element contents profile for (b) Fe, (c) Cr, (d) Mo, (e) Mn, and (f) N.

The compositional profile of alloying elements near the precipitate is essential for understanding the evolution of the precipitate. However, it is difficult to measure the profile of light elements such as N. Machine learning algorithms, such as SVD and ICA, can successfully reveal not only Cr deficiency but also N deficiency, which is regarded as the primary reason for degradation of various mechanical and corrosive properties, around the Cr2N precipitates that form in HNS. The physico-chemical properties of steel alloys depend on the distribution of precipitates. Therefore, an advanced analysis of the distribution of precipitates is important for the design of high-performance steels. The precise detection and analysis technique suggested in this study can be utilized in a comprehensive interpretation of the evolution kinetics of nanometer-sized precipitates containing light elements, and consequently can result in the design of an optimum thermal treatment process.


The combination of two unsupervised machine learning algorithms, i.e., SVD and ICA, successfully reduces the noise signals in EDS images and therefore increases the SNR of images. The N-depleted region around the Cr2N precipitate, which was concealed by noise signals in the original EDS data, was revealed using this technique. This is significant owing to the difficulties of noise separation and removal through normal signal processing methods. The Cr- and N-depleted regions were only observed in samples aged for 103 s when using our proposed method. The widths of the Cr- and N-depleted regions were equal, ranging from 70 to 100 nm. This consistency was validated using EELS. Simulations provided further evidence for the diffusional dynamics that explain how N, with lighter and faster diffusion, follows the depletion behavior of Cr. Both the simulation and EELS results support our method as a feasible and useful way of increasing the SNR in spectral images of different natures, including EDS and EELS. The work reported in this study can be viewed as a potential way of identifying light elements, such as N, from EDS experiments, in a more efficient way than that of EELS experiments. Other popular decomposition methods, such as non-negative matrix factorization (NMF), also provide the same results suggested in this work (see Supplementary Fig. S12 online). Thus, it is valuable to explore and compare different multivariate analysis algorithms for identifying light elements, which we will explore in future work.


Sample preparation

The HNS was a commercial P900NMo alloy (manufactured by VSG, Essen, Germany) with a composition of Febal.–17.94Cr–18.60Mn–2.09Mo–0.89N–0.04C (in wt%), which is a modified version of P900 (DIN 1.3816) with higher Mo and N concentrations. Specimens (12 × 10 × 4 mm) were cropped from the hot-rolled plate, encapsulated in an evacuated quartz tube, solution-treated at 1,150 °C for 30 min, and water-quenched. The resulting specimens were isothermally aged at 900 °C for 103, 104, and 105 s under Ar, followed by water-quenching. At this aging temperature, Cr2N formation is facilitated while the formation of other precipitates is retarded (e.g., σ phase)50,61,68,69. After isothermal aging, the microstructure for each specimen was analyzed using SEM (JSM-7100F, JEOL, Japan). For this analysis, the aged specimens were mechanically ground with SiC abrasive papers to 2,400 grit, mechanically polished using a diamond suspension with a particle size of 1 μm, and chemically etched in a glyceregia reagent (10 mL nitric acid, 20 mL hydrochloric acid, and 30 mL glycerin) at 25 ± 1 °C for 1–2 min followed by rinsing with water and drying in air.

Electron microscopy analysis

To investigate the elemental configuration changes and aging time of the depletion region using STEM-EDS, samples with different aging times were prepared using a focused ion beam (FIB; Helios NanoLab 600, FEI, US) lift-off milling technique. The Cr2N precipitates were observed using TEM (Talos F200X, FEI, US) at an accelerating voltage of 200 kV (Schottky X-FEG gun) and equipped with a Super-X EDS system comprising four windowless silicon drift detectors (SDDs) in STEM mode with a probe current of ~ 0.7 nA. To guarantee a high enough SNR, the EDS mapping data was collected through a spectrum imaging form for 60 min with a 20 ms/pixel dwell time. This large dwell time also allows the Bremsstrahlung background subtraction based on a simple and widely used two-window method. The windows for each element (Cr, Fe, Mn, N, and Mo) are denoted in Supplementary Fig. S13 (online). After the background removal, we quantified the composition of each element in the HNS samples using this spectrum imaging data based on the conventional Cliff–Lorimer method with k-factors provided by the manufacturer (Bruker).

EELS signals were obtained using a Quantum 966 (Gatan, USA) spectrometer attached to a Cs-corrected microscope (Titan 80-300, FEI, Netherlands), with an energy resolution of 0.8 eV for 0.01 eV/channel energy dispersion. The convergence semi-angle for the incident beam was 36 mrad, with an EELS collection semi-angle of ~ 50 mrad.

Noise reduction using machine learning algorithms

To reduce the noise signals in the STEM-EDS images, principal component analysis (PCA) and ICA, which are machine learning algorithms for dimensional reduction, were performed using the HyperSpy package70, written in Python. The noise-reduced EDS mapping images were obtained by the following three steps: (1) decomposition of the multivariate X-ray signals using the SVD algorithm; (2) independent component analysis; and (3) reconstruction of de-noised EDS maps. For the PCA, the spectral energy information of each pixel in the spectral images obtained by STEM-EDS was decomposed using the SVD technique. Spectral image with spatial dimensions of 1,024 × 1,024 and an energy dimension of 4,096 was decomposed by computing the SVD as follows:

$$M=U\Sigma {V}^{T}$$

where M is a 10242 × 4,096 spectral image matrix, U is a 10242 × 10242 factor matrix vector, Σ is a diagonal 10242 × 4,096 eigenvalue matrix with non-negative values, and VT is the conjugate transpose with a 4,096 × 4,096 loading matrix vector. In terms of matrix factorization, the factor and loading matrix can be expressed as follows:

$$M{M}^{T}=\left(U\Sigma {V}^{T}\right){\left(U\Sigma {V}^{T}\right)}^{T}=U\left(\Sigma {\Sigma }^{T}\right){\mathrm{U}}^{T},$$
$${M}^{T}M={\left(U\Sigma {V}^{T}\right)}^{T}\left(U\Sigma {V}^{T}\right)=V\left({\Sigma }^{T}\Sigma \right){\mathrm{V}}^{T}.$$

Then, in view of eigenvalue decomposition, U and V, which are eigenvectors of MMT and MTM, respectively, can be calculated by solving the eigenvalue characteristic equations:

$$\left(M{M}^{T}-\lambda I\right)x=0,$$
$$\left({M}^{T}M-\lambda I\right)x=0,$$

where λ represents the eigenvalues and x the eigenvectors, which can be transformed to the U and V matrices. Consequently, the principal components were derived with ΣVT. Since the noise signal is subject to the Poisson distribution due to the uncertainty of electrons, the Poissonian noise normalization method was adapted into all of the decomposing processes. Then, the ICA, known as blind source separation64,65,66, was performed using the FastICA algorithm71 embedded in the HyperSpy package to enhance the physical correlation between the principal components. As the factor matrix was derived from the SVD calculations, FastICA was used to find a maximum of the wTU non-Gaussianity, where w is the weight vector. To do this, an initial weight vector was randomly selected, and the vector matrix was recalculated until it converged, as shown in the following equation:

$$w= \frac{{w}^{+}}{\Vert {w}^{+}\Vert },$$

where E{x} is the variance of the x matrix and g(x) is the derivative of the non-quadratic function. Finally, the independent components were obtained by multiplying w and U. The independent components with high eigenvalues that represent most variances were used for the reconstruction of the de-noised EDS mapping images. This was conducted using a PCA scree plot and a knee-point detecting approach67 (for details, see the PCA scree plots, signals, and maps of the independent components in Supplementary Figs. S3S5 online).

To evaluate the SNR of the spectral images, the coefficient reciprocal of the variation calculation method72 was adopted. Briefly, for each element constituting the Cr2N precipitate, appropriate ranges of energy in the spectral images were summed. Then, given images containing intensities of the elemental signals, the SNR was calculated as follows:

$$\mathrm{SNR}=\frac{\mu }{\sigma },$$

where µ is the expected value of the intensities of signals in the image, and σ is the standard deviation of the noise. This method has been widely used for SNR quantification in the field of image and signal processing73,74,75.

Multicomponent diffusional transformation simulation

Cr2N precipitate growth was simulated using multicomponent diffusional transformation (DICTRA module, Version 2018a, Thermo-Calc. Software AB, Sweden)76 software using thermodynamics (TCFE7.0) and mobility (MobFe2) databases77,78,79. This software obtains a numerical solution of the diffusion equation at the local equilibrium in the phase interface. Assuming there is no difference in the chemical potential at the interface between the matrix (austenite) and precipitate (Cr2N), the alloying element concentration at the interface can be evaluated from the thermodynamic equilibrium. The rate of phase transformation was controlled by the rate of the incoming or outgoing diffusional flux of elements. The software can simulate the growth process of the Cr2N precipitate in austenite assuming diffusion-controlled growth by solving equations of thermodynamic phase equilibrium, flux balance, and diffusion. The conservation of mass leads to the following flux balance conditions at the moving interface between the austenite matrix and Cr2N precipitate:

$$V\left({C}_{k}^{\mathrm{austenite}}-{C}_{k}^{{\mathrm{Cr}}_{2}\mathrm{N}}\right)={J}_{k}^{\mathrm{austenite}}-{J}_{k}^{{\mathrm{Cr}}_{2}\mathrm{N}}, \left(k = \mathrm{1,2}, \dots , n\right),$$

where V is the interface migration rate, \({C}_{k}^{\mathrm{austenite}}\) and \({C}_{k}^{{\mathrm{Cr}}_{2}\mathrm{N}}\) are the concentration of species k in austenite and Cr2N close to the interface, respectively, and \({J}_{k}^{\mathrm{austenite}}\) and \({J}_{k}^{{\mathrm{Cr}}_{2}\mathrm{N}}\) are the diffusion flux in austenite and Cr2N, respectively. These can be expressed according to Fick’s first law of diffusion77:

$${J}_{k}=-\sum_{j=1}^{n-1}{D}_{kj}^{n}\nabla {C}_{j} ,$$

where n is the number of elements, \({D}_{kj}^{n}\) is the diffusion coefficient of the matrix, and Cj is the concentration gradient for element j.

The growth of the Cr2N precipitate was simulated using the moving boundary model of the DICTRA software. It was assumed that the austenite and Cr2N phases are separated by a planar boundary, and that thermodynamic equilibrium exists locally at the interface. Initial conditions were set where 1 nm of Cr2N is bound by a 2 μm layer of austenite. The initial Cr2N composition was assumed to be the same as the thermodynamic equilibrium results at 900 °C. The austenite composition was set as Febal.–18Cr–18Mn–2Mo–0.9 N (wt%). The concentration was calculated for 20 uniform points within Cr2N and 200 uniform points within austenite. The transition of the interface and the concentration profiles at the interface were calculated for the sample aged at 900 °C for 104 s.

Data availability

The datasets generated during and/or analysed during the current study are not publicly available due to preparing another study and patent but are available from the corresponding author on reasonable request.


  1. Foct, J. Unexplored possibilities of nitrogen alloying of steel. In Advanced Steels (eds Weng, Y. et al.) 363–366 (Springer, Berlin, 2011).

    Google Scholar 

  2. Simmons, J. W. Overview: high-nitrogen alloying of stainless steels. Mater. Sci. Eng.207, 159–169 (1996).

    Google Scholar 

  3. Mudali, U. K. Nitrogen—a boon to the metals industry. Mater. Manuf. Process.19, 1–5 (2004).

    ADS  CAS  Google Scholar 

  4. Talha, M., Behera, C. K. & Sinha, O. P. A review on nickel-free nitrogen containing austenitic stainless steels for biomedical applications. Mater. Sci. Eng. C33, 3563–3575 (2013).

    CAS  Google Scholar 

  5. Metikoš-Huković, M., Babić, R., Grubač, Z., Petrović, Ž & Lajçi, N. High corrosion resistance of austenitic stainless steel alloyed with nitrogen in an acid solution. Corros. Sci.53, 2176–2183 (2011).

    Google Scholar 

  6. Berns, H. Manufacture and application of high nitrogen steels. ISIJ Int.36, 909–914 (1996).

    CAS  Google Scholar 

  7. Sumita, M., Hanawa, T. & Teoh, S. H. Development of nitrogen-containing nickel-free austenitic stainless steels for metallic biomaterials—review. Mater. Sci. Eng. C24, 753–760 (2004).

    Google Scholar 

  8. Leapman, R. D. & Newbury, D. E. Trace elemental analysis at nanometer spatial resolution by parallel-detection electron energy loss spectroscopy. Anal. Chem.65, 2409–2414 (1993).

    PubMed  CAS  Google Scholar 

  9. Servanton, G. & Pantel, R. Arsenic dopant mapping in state-of-the-art semiconductor devices using electron energy-loss spectroscopy. Micron41, 118–122 (2010).

    CAS  Google Scholar 

  10. Riegler, K. & Kothleitner, G. EELS detection limits revisited: Ruby—a case study. Ultramicroscopy110, 1004–1013 (2010).

    CAS  Google Scholar 

  11. Lauhon, L. J., Adusumilli, P., Ronsheim, P., Flaitz, P. L. & Lawrence, D. Atom-probe tomography of semiconductor materials and device structures. MRS Bull.34, 738–743 (2009).

    CAS  Google Scholar 

  12. Kelly, T. F., Nishikawa, O., Panitz, J. A. & Prosa, T. J. Prospects for nanobiology with atom-probe tomography. MRS Bull.34, 744–750 (2009).

    CAS  Google Scholar 

  13. Gregori, G., Kleebe, H.-J., Blum, Y. D. & Babonneau, F. Evolution of C-rich SiOC ceramics: part II. Characterization by high lateral resolution techniques: electron energy-loss spectroscopy, high-resolution TEM and energy-filtered TEM. Z. Metallkd.97, 710–720 (2006).

    CAS  Google Scholar 

  14. Grogger, W., Hofer, F., Kothleitner, G. & Schaffer, B. An introduction to high-resolution EELS in transmission electron microscopy. Top Catal.50, 200–207 (2008).

    CAS  Google Scholar 

  15. Geiser, B. P., Kelly, T. F., Larson, D. J., Schneir, J. & Roberts, J. P. Spatial distribution maps for atom probe tomography. Microsc. Microanal.13, 437–447 (2007).

    ADS  PubMed  CAS  Google Scholar 

  16. Hatzoglou, C. et al. Quantification of APT physical limitations on chemical composition of precipitates in Fe–Cr alloys. J. Nucl. Mater.522, 64–73 (2019).

    ADS  CAS  Google Scholar 

  17. Shimizu, Y. et al. Depth and lateral resolution of laser-assisted atom probe microscopy of silicon revealed by isotopic heterostructures. J. Appl. Phys.109, 036102 (2011).

    ADS  Google Scholar 

  18. Müller, M., Gault, B., Smith, G. D. W. & Grovenor, C. R. M. Accuracy of pulsed laser atom probe tomography for compound semiconductor analysis. J. Phys. Conf. Ser.326, 012031 (2011).

    Google Scholar 

  19. Crozier, P. A. Vibrational and valence aloof beam EELS: A potential tool for nondestructive characterization of nanoparticle surfaces. Ultramicroscopy180, 104–114 (2017).

    PubMed  CAS  Google Scholar 

  20. Sauvage, X., Lefebvre, W., Genevois, C., Ohsaki, S. & Hono, K. Complementary use of transmission electron microscopy and atom probe tomography for the investigation of steels nanostructured by severe plastic deformation. Scr. Mater.60, 1056–1061 (2009).

    CAS  Google Scholar 

  21. Rogozhkin, S. V. et al. An atom probe tomography prototype with laser evaporation. Instrum. Exp. Tech.60, 428–433 (2017).

    Google Scholar 

  22. Miller, M. K. & Hetherington, M. G. Local magnification effects in the atom probe. Surf. Sci.246, 442–449 (1991).

    ADS  CAS  Google Scholar 

  23. Kuisma-Kursula, P. Accuracy, precision and detection limits of SEM-WDS, SEM-EDS and PIXE in the multi-elemental analysis of medieval glass. X-ray Spectrom.29, 111–118 (2000).

    ADS  CAS  Google Scholar 

  24. Alber, U., Müllejans, H. & Rühle, M. Improved quantification of grain boundary segregation by EDS in a dedicated STEM. Ultramicroscopy69, 105–116 (1997).

    CAS  Google Scholar 

  25. Baalousha, M., Motelica-Heino, M., Galaup, S. & Coustumer, P. L. Supramolecular structure of humic acids by TEM with improved sample preparation and staining. Microsc. Res. Tech.66, 299–306 (2005).

    PubMed  CAS  Google Scholar 

  26. Goldstein, J. I. et al.Scanning Electron Microscopy and X-Ray Microanalysis (Springer, Berlin, 2018).

    Google Scholar 

  27. Bonnet, N. & Nuzillard, D. Independent component analysis: a new possibility for analysing series of electron energy loss spectra. Ultramicroscopy102, 327–337 (2005).

    PubMed  CAS  Google Scholar 

  28. de la Pena, F. et al. Mapping titanium and tin oxide phases using EELS: an application of independent component analysis. Ultramicroscopy111, 169–176 (2011).

    PubMed  Google Scholar 

  29. Rossouw, D. et al. Multicomponent signal unmixing from nanoheterostructures: overcoming the traditional challenges of nanoscale X-ray analysis via machine learning. Nano Lett.15, 2716–2720 (2015).

    ADS  PubMed  PubMed Central  CAS  Google Scholar 

  30. Jany, B. R., Janas, A. & Krok, F. Retrieving the quantitative chemical information at nanoscale from scanning electron microscope energy dispersive X-ray measurements by machine learning. Nano Lett.17, 6520–6525 (2017).

    ADS  PubMed  CAS  Google Scholar 

  31. Parish, C. M. & Brewer, L. N. Multivariate statistics applications in phase analysis of STEM-EDS spectrum images. Ultramicroscopy110, 134–143 (2010).

    PubMed  CAS  Google Scholar 

  32. Ziatdinov, M., Maksov, A. & Kalinin, S. V. Learning surface molecular structures via machine vision. NPJ Comput. Mater.3, 1–9 (2017).

    ADS  CAS  Google Scholar 

  33. Ziletti, A., Kumar, D., Scheffler, M. & Ghiringhelli, L. M. Insightful classification of crystal structures using deep learning. Nat. Commun.9, 2775 (2018).

    ADS  PubMed  PubMed Central  Google Scholar 

  34. Rashidi, M. & Wolkow, R. A. Autonomous scanning probe microscopy in situ tip conditioning through machine learning. ACS Nano12, 5185–5189 (2018).

    PubMed  CAS  Google Scholar 

  35. Martineau, B. H., Johnstone, D. N., van Helvoort, A. T. J., Midgley, P. A. & Eggeman, A. S. Unsupervised machine learning applied to scanning precession electron diffraction data. Adv. Struct. Chem. Imaging5, 3 (2019).

    Google Scholar 

  36. Spiegelberg, J. & Rusz, J. Can we use PCA to detect small signals in noisy data?. Ultramicroscopy172, 40–46 (2017).

    PubMed  CAS  Google Scholar 

  37. Spiegelberg, J., Rusz, J., Leifer, K. & Thersleff, T. The usage of data compression for the background estimation of electron energy loss spectra. Ultramicroscopy181, 117–122 (2017).

    PubMed  CAS  Google Scholar 

  38. Spiegelberg, J. et al. Local low rank denoising for enhanced atomic resolution imaging. Ultramicroscopy187, 34–42 (2018).

    PubMed  CAS  Google Scholar 

  39. Song, D., Wang, Z. & Zhu, J. Magnetic measurement by electron magnetic circular dichroism in the transmission electron microscope. Ultramicroscopy201, 1–17 (2019).

    PubMed  CAS  Google Scholar 

  40. Potapov, P. & Lubk, A. Optimal principal component analysis of STEM XEDS spectrum images. Adv. Struct. Chem. Imaging5, 4 (2019).

    PubMed  PubMed Central  Google Scholar 

  41. Kirschner, J. M. W. & Stein, G. High nitrogen containing Ni-free austenitic steels for medical applications. ISIJ Int.36, 893–900 (1996).

    Google Scholar 

  42. Jargelius-Pettersson, R. F. A. Electrochemical investigation of the influence of nitrogen alloying on pitting corrosion of austenitic stainless steels. Corros. Sci.41, 1639–1664 (1999).

    CAS  Google Scholar 

  43. Simmons, J. W., Atteridge, D. G. & Rawers, J. C. Sensitization of high-nitrogen austenitic stainless steels by dichromium nitride precipitation. Corrosion50, 491–501 (1994).

    CAS  Google Scholar 

  44. Covino, B. S., Cramer, S. D., Russell, J. H. & Simmons, J. W. Corrosion and polarization behavior of sensitized high-nitrogen stainless steels. Corrosion53, 525–536 (1997).

    CAS  Google Scholar 

  45. Qin, F., Li, Y., Zhao, X., He, W. & Chen, H. Effect of nitrogen content on precipitation behavior and mechanical properties of Mn18Cr8N austenitic stainless steel. Acta Metall. Sin.54, 55–64 (2018).

    CAS  Google Scholar 

  46. Qin, F., Li, Y., He, W., Zhao, X. & Chen, H. Aging precipitation behavior and its influence on mechanical properties of Mn18Cr18N austenitic stainless steel. Met. Mater. Int.23, 1087–1096 (2017).

    CAS  Google Scholar 

  47. Li, H.-B., Jiang, Z.-H., Feng, H., Ma, Q.-F. & Zhan, D.-P. Aging precipitation behavior of 18Cr–16Mn–2Mo–1.1N high nitrogen austenitic stainless steel and its influences on mechanical properties. J. Iron Steel Res. Int.19, 43–51 (2012).

    Google Scholar 

  48. Simmons, J. W., Covino, B. S. Jr., Hawk, J. A. & Dunning, J. S. Effect of nitride (Cr2N) precipitation on the mechanical, corrosion, and wear properties of austenitic stainless steel. ISIJ Int.36, 846–854 (1996).

    CAS  Google Scholar 

  49. Dayal, R. K., Parvathavarthini, N. & Raj, B. Influence of metallurgical variables on sensitisation kinetics in austenitic stainless steels. Int. Mater. Rev.50, 129–155 (2005).

    CAS  Google Scholar 

  50. Zhang, Z. R., Zhao, Z. Y., Li, C. Z., Jiang, Z. H. & Li, H. B. Effects of aging precipitates on the mechanical and corrosion resistance properties of 18Cr–18Mn–2Mo–0.96N super high nitrogen austenitic stainless steel. Appl. Mech. Mater.395–396, 284–288 (2013).

    Google Scholar 

  51. Kartik, B., Veerababu, R., Sundararaman, M. & Satyanarayana, D. V. V. Effect of high temperature ageing on microstructure and mechanical properties of a nickel-free high nitrogen austenitic stainless steel. Mater. Sci. Eng.642, 288–296 (2015).

    CAS  Google Scholar 

  52. Hereñú, S., Moscato, M. G., Alvarez, I. & Armas, A. F. The influence of chromium nitrides precipitation on the fatigue behavior of duplex stainless steels. Proc. Eng.74, 179–182 (2014).

    Google Scholar 

  53. Bruemmer, S. M. Quantitative modeling of sensitization development in austenitic stainless steel. Corrosion46, 698–709 (1990).

    CAS  Google Scholar 

  54. Hall, E. L. & Briant, C. L. Chromium depletion in the vicinity of carbides in sensitized austenitic stainless steels. Metall. Trans.15, 793–811 (1984).

    Google Scholar 

  55. Betrabet, H. S., Nishimoto, K., Wilde, B. E. & Clark, W. A. T. Electrochemical and microstructural investigation of grain boundary precipitation in AISI 304 stainless steels containing nitrogen. Corrosion43, 77–84 (1987).

    CAS  Google Scholar 

  56. Kain, V., Prasad, R. C. & De, P. K. Detection of sensitization and intergranular corrosion of Fe–Cr–Ni alloys. High Temp. Mater. Proc.16, 183–200 (1997).

    CAS  Google Scholar 

  57. Shi, F., Wang, L.-J., Cui, W.-F. & Liu, C.-M. Precipitation kinetics of Cr2N in high nitrogen austenitic stainless steel. J. Iron Steel Res. Int.15, 72–77 (2008).

    CAS  Google Scholar 

  58. Tao, X., Han, L. & Gu, J. Discontinuous precipitation during isothermal transformation in a 9–12% chromium ferritic steel. ISIJ Int.55, 2639–2647 (2015).

    CAS  Google Scholar 

  59. Toro, A., Misiolek, W. Z. & Tschiptschin, A. P. Correlations between microstructure and surface properties in a high nitrogen martensitic stainless steel. Acta Mater.51, 3363–3374 (2003).

    CAS  Google Scholar 

  60. Mohammadzadeh, R., Akbari, A., Grumsen, F. B. & Somers, M. A. J. Discontinuous precipitation in a nickel-free high nitrogen austenitic stainless steel on solution nitriding. Philos. Mag.97, 2795–2814 (2017).

    ADS  CAS  Google Scholar 

  61. Lee, T.-H., Oh, C.-S., Lee, C. G., Kim, S.-J. & Takaki, S. Precipitation of σ-phase in high-nitrogen austenitic 18Cr–18Mn–2Mo–0.9N stainless steel during isothermal aging. Scr. Mater.50, 1325–1328 (2004).

    CAS  Google Scholar 

  62. Lee, T.-H., Kim, S.-J. & Takaki, S. On the crystal structure of Cr2N precipitates in high-nitrogen austenitic stainless steel. II. Order–disorder transition of Cr2N during electron irradiation. Acta Crystallogr. Sect. B Struct. Sci.62, 190–196 (2006).

    Google Scholar 

  63. Lee, T.-H., Oh, C.-S., Lee, C. G., Kim, S.-J. & Takaki, S. Precipitation characteristics of the second phases in high-nitrogen austenitic 18Cr–18Mn–2Mo–0.9N steel during isothermal aging. Met. Mater. Int.10, 231–236 (2004).

    CAS  Google Scholar 

  64. Jutten, C. & Herault, J. Blind separation of sources, part I: an adaptive algorithm based on neuromimetic architecture. Signal Process.24, 1–10 (1991).

    MATH  Google Scholar 

  65. Cardoso, J. F. Blind signal separation: statistical principles. Proc. IEEE86, 2009–2025 (1998).

    Google Scholar 

  66. Amari, S., Cichocki, A. & Yang, H. H. A new learning algorithm for blind signal separation. In Advances in Neural Information Processing Systems 8 (eds Touretzky, D. S. et al.) 757–763 (Neural Information Processing Systems Foundation Inc, La Jolla, 1995).

    Google Scholar 

  67. 67Satopaa, V., Albrecht, J., Irwin, D. & Raghavan, B. Finding a “kneedle” in a haystack: detecting knee points in system behavior. In Proceedings of the 2011 31st International Conference on Distributed Computing Systems Workshops, 166–171 (IEEE Computer Society, 2011).

  68. Dai, Q. X., Yuan, Z. Z., Luo, X. M. & Cheng, X. N. Numerical simulation of Cr2N age-precipitation in high nitrogen stainless steels. Mater. Sci. Eng.385, 445–448 (2004).

    Google Scholar 

  69. Vanderschaeve, F., Taillard, R. & Foct, J. Discontinuous precipitation of Cr2N in a high nitrogen, chromium-manganese austenitic stainless steel. J. Mater. Sci.30, 6035–6046 (1995).

    ADS  CAS  Google Scholar 

  70. 70de la Pena, F. et al. HyperSpy: a toolbox for hyperspectral data analysis. (2019).

  71. Hyvarinen, A. & Oja, E. Independent component analysis: algorithms and applications. Neural Netw.13, 411–430 (2000).

    PubMed  CAS  Google Scholar 

  72. Schroeder, D. J. Astronomical Optics (Elsevier, Amsterdam, 1999).

    Google Scholar 

  73. Russ, J. C. The Image Processing Handbook (CRC Press, Boca Raton, 2016).

    MATH  Google Scholar 

  74. Stathaki, T. Image Fusion: Algorithms and Applications (Elsevier, Amsterdam, 2011).

    Google Scholar 

  75. Gonzales, R. C. & Woods, R. E. Digital Image Processing (Prentice Hall, Upper Saddle River, 2002).

    Google Scholar 

  76. 76Diffusion Module (DICTRA) (2018)

  77. Andersson, J. O., Helander, T., Höglund, L., Shi, P. & Sundman, B. Thermo-Calc & DICTRA, computational tools for materials science. Calphad26, 273–312 (2002).

    CAS  Google Scholar 

  78. Ågren, J. Computer simulations of the austenite/ferrite diffusional transformations in low alloyed steels. Acta Metall. Mater.30, 841–851 (1982).

    Google Scholar 

  79. Borgenstam, A., Höglund, L., Ågren, J. & Engström, A. DICTRA, a tool for simulation of diffusional transformations in alloys. J. Phase Equilib.21, 269–280 (2000).

    CAS  Google Scholar 

Download references


This work was supported by the National Research Foundation (NRF) of Korea through grants funded by the Korean Government (2018M3D1A1058793 and 2018M3A7B4065593).

Author information

Authors and Affiliations



H.-K.K. and H.-Y.H. contributed equally to this work. J.H.J. and D.C. designed the study. H.-K.K. carried out several machine learning algorithms. H.-Y.H. synthesized the HNS samples and acquired the SEM images. J.-H.B., M.K.C., J.K., and J.H. acquired STEM-HAADF, STEM-EDS, and EELS data. J.H.J. performed the diffusional simulations. J.-Y.S., G.-H.K., and T.-H.L. discussed the results and directed the study. H.-K.K. and H.-Y.H. wrote the manuscript with contribution from all authors.

Corresponding authors

Correspondence to Jae Hoon Jang or Dongwon Chun.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Kim, HK., Ha, HY., Bae, JH. et al. Nanoscale light element identification using machine learning aided STEM-EDS. Sci Rep 10, 13699 (2020).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI:


By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing