2023 年 64 巻 9 号 p. 2179-2184
In this work, we constructed machine learning models to predict structural descriptors that numerically represent the atomic structures in three dimensions from x-ray absorption near-edge structure (XANES) spectra. The neural network models that predict radial distribution functions (RDF) and orbital-field matrix (OFM), a descriptor that deals with the anisotropy of the local structure, the valence electron number of the ligand, and orbital information, were constructed. We used more than 120,000 O K-edge XAS spectra data from the Materials Project database as the training data set. We successfully constructed models that roughly predicted RDFs with 74% of the test data. Furthermore, the model that predicted OFM also captured an overview of OFM in 97% of the test data. These results demonstrate that the atomic structural information can be directly extracted from XANES spectra using neural network models.

Fig. 1 Schematic drawing of the neural network model that predicts structure descriptors from XANES spectra.
Core-electron spectroscopies, a group of spectroscopic techniques to obtain local electronic structures around a particular element in materials, are powerful techniques to investigate nanoscale structures.1–3) Among them, X-ray absorption near-edge structure (XANES) is the most common spectroscopic technique used in a wide range of fields in physics and chemistry.4,5) In XANES, a core electron is excited into unoccupied orbitals. Therefore, XANES provides local geometric structures such as coordination numbers, inter-atomic distances, symmetries, and electronic structures such as chemical states, spin states, and chemical bonding around absorbed atoms. The recent development of experimental equipment and measurement techniques has made it possible to obtain a large amount of XANES spectral data quickly.6,7) For example, time-resolved or operando measurement makes it possible to measure XANES while tracing chemical reaction processes occurring on the picosecond and nanosecond scales.8–11) Electron energy loss near-edge structure (ELNES) using a transmission electron microscope (TEM) also provides similar information to XANES, as both XANES and ELNES correspond to the same electronic transitions. The advantage of using ELNES instead of XANES is the high spatial resolution. Using a modern system comprising scanning TEM (STEM) equipped with a probe aberration corrector, the spatial resolution of ELNES improves to sub-Angstrom order which enables us to obtain spectrum images from single atomic columns in crystals.12–14)
Analyzing local electronic structures from numerous XANES/ELNES spectra obtained by the state-of-art techniques described above is not an easy task. Various first-principles approaches for calculating XANES spectra have been proposed and have successfully reproduced a wide variety of experimental spectra.15–18) The local atomic arrangement and electronic structures can be determined by enumerating the possible atomic structures of the target system and fingerprinting the theoretical XANES obtained for these structures against the experimental spectra. Though this approach is most reliable, the computational costs could be enormously large when the number of possible atomic structures is significant, e.g., considering the spectra from impurity atoms in solids or adsorbates on surfaces. Therefore, a novel approach that can simulate and predict XANES spectra from given atomic structures with much less computational time than first-principles calculations is highly desirable.
Recently, machine learning has been rapidly spreading in materials science and has been applied to various problems, such as high-throughput materials exploration and virtual screening of atomic structures.19–22) Machine learning algorithms are also used for accelerating quantum chemical or density functional calculations.23–26) Several applications of the machine learning approach to analyzing XANES spectra were also reported. Rankine et al. succeeded in constructing deep NN models to predict XANES spectra directly from atomic structures.27) The data-driven approach for interpreting XANES spectra based on tree-based algorithms has also been reported.28,29)
Another aspect of the XANES analyses using machine learning is to extract local structural information around the excited atom. Timoshenko et al. developed the neural network (NN) model to extract three-dimensional structures of Pt nano-particles from Pt-L3 XANES spectra.30) Attempts to extract radial distribution functions (RDFs) from XANES spectra were also made in several groups.31,32) However, no machine learning model that predicts three-dimensional local atomic structures, including the anisotropy around the central atom, from XANES spectra is reported. In this study, we constructed a machine learning model to predict structural descriptors that numerically represent atomic structures in three dimensions from XANES. We focused on the two types of structural descriptors: one is RDF, which reflects the interatomic distances, and the other is the orbital-field matrix (OFM) that contains the information of interatomic distances, bond-angles among neighboring atoms, and electronic configurations of ligand atoms.33) The performance of deep NN models to predict atomic structure information is demonstrated.
Theoretical XANES and crystal structure data used for machine learning are collected from the Materials Project, a database of electronic structure calculations.34) This database contains theoretical XANES spectra calculated using FEFF code based on multiple scattering theory.35,36) In this study, atomic structures, and theoretical O-K edge XANES spectral data were collected for binary, ternary, and quaternary compounds containing oxygen, which have rich variations in chemical compositions and coordination structures. Site-dependent XANES spectra are provided for materials with multiple O sites in this database. A data set of local structures and spectra was created, considering this site dependence. The constituent elements of the compound range from H to Pu; there is a considerable variation in the frequency of occurrence of each element. If the number of local structures containing a particular element is small, it may cause insufficient learning and degradation of the generalization performance. In this study, we decided to remove the data containing a particular element if the number of local structures containing that element is less than 2000. In the end, we obtained a data set containing 122,160 local structures and O-K XANES spectra from 16,285 compounds.
Theoretical XANES spectra were discretized in the range of 520 eV to 580 eV in 0.01 eV increments to produce vector data, which were used as the explanatory variables of machine learning models. The RDFs and OFMs were calculated from atomic structures.
We randomly selected 80% of the 16,285 compounds in the dataset and used their site-dependent spectra as training data, while the site-dependent spectra for the remaining 20% were used as test data to verify the generalization performance of the training model. The training and test data numbers are 98,528 and 23,632, respectively.
2.2 Structure descriptorsThe coordinates and atomic numbers of constituent atoms can describe the local atomic structure around an absorption O-atom. However, this information cannot be used directly for machine learning because the number of atoms varies depending on the material and site. Therefore, it is necessary to convert the local atomic structure into descriptors. Various descriptors for molecules and crystals have been proposed to predict the properties of materials. The descriptors used in this study are as follows.
(1) Radial distribution functions (RDFs)
The RDF g(r) is formally defined as,
| \begin{equation} g(r) = \frac{dn(r)}{4\pi r^{2}\rho(r)dr} \end{equation} | (1) |
(2) Orbital-field matrices (OFMs)
Pham et al. proposed an OFM as a representation of a local atomic structure.33) The OFM, Xc, is described as,
| \begin{equation} X^{c} = \overrightarrow{O^{c}}^{T} + \sum_{n = 1}^{M}\overrightarrow{O^{c}}^{T}\overrightarrow{O^{n}}\theta_{cn}\zeta(r_{cn}) \end{equation} | (2) |
We have created fully connected NN models to separately predict RDFs and OFMs from XANES spectra, as shown in Fig. 1. These NN models use the discretized XANES spectrum as the input layer and discretized RDF in 500 points and OFM (Xc in eq. (2)) as the output layer. There are hidden layers between the input and output layers. Each hidden node and output node receives inputs {xi} from each node in the previous layer, apply an activation function ϕ to each input, and outputs the sum ∑i wiϕ(xi) where {wi} are weights assigned to the edges connecting the nodes. The weight parameters on the edges are optimized based on the training data. The inverse error propagation method based on Adam’s method was used to optimize the learning parameters.38) We used scaled exponential linear units (SELUs) as the activation function.39) The loss function used in this work was the mean squared error with the L2 regularization term,
| \begin{equation*} E = \sum_{i}(y_{i} - f_{i}(\boldsymbol{x},\boldsymbol{w}))^{2} + \frac{\alpha}{2}\|\boldsymbol{w}\|_{2} \end{equation*} |

Schematic drawing of the neural network model that predicts structure descriptors from XANES spectra.

The coefficient of determination R2 was used in this study as an index to evaluate the accuracy of NN models. R2 is defined as,
| \begin{equation} R^{2} = 1 - \frac{\varSigma_{k}(y_{k} - f_{k})^{2}}{\varSigma_{k}(y_{k} - \bar{y})^{2}}, \end{equation} | (3) |
The NN model for predicting RDFs centered at an absorption O-atom from O-K XANES spectra with Rmax = 5 Å was constructed following the procedure describing Sec. 2.
Figure 2 shows the predicted RDFs obtained using the NN model for selected compounds in the test data. It can be seen that the NN model accurately reproduces the theoretical RDFs for SnO2 (R2 = 0.990), Sr2MnO4 (R2 = 0.988), and TiO2 (R2 = 0.986). Small deviations between the predicted RDFs and theoretical ones are found for SrFeO3 (R2 = 0.916), CaFe(SiO3)2 (R2 = 0.881), LiTiO2 (R2 = 0.858), but the main features of RDFs are reproduced. For LaTiCrO6 (R2 = 0.831), Cu5Bi2(B2O7)2 (R2 = 0.812), and CrCoO4 (R2 = 0.811), good agreement between the predicted and theoretical RDFs are found within 3 Å, while significant deviations are found in RDFs beyond 3 Å. In addition, some of the predicted RDFs do not capture the general shape of the theoretical values, such as FeO2 (R2 = 0.716), USbO5 (R2 = 0.613), and V2O3 (R2 = 0.508).

The RDFs around the O-site predicted by the NN model (red lines) of the test data. They are compared with theoretical RDFs calculated by their crystal structures (blue lines). The R2 values calculated by eq. (3) are also shown.
Figure 3(a) shows the histogram of the distribution of the R2 values for all test data. As shown in Fig. 2, the predicted RDFs reproduce the main features of theoretical ones for the data with R2 values of 0.85 or higher. These data accounted for 56.4% of the total. In addition, as mentioned earlier, many of the data with R2 values less than 0.85 showed a significant discrepancy only beyond 3 Å, and this discrepancy causes a reduction in the R2 values. We also conducted another NN model for RDFs with Rmax = 3 Å. This model exhibits higher accuracy than the NN models with Rmax = 5 Å: 73.9% of test data had R2 values of 0.85 or higher, as shown in Fig. 3(b).

Histograms of the distribution of R2 values for RDFs in test data. (a) and (b) are the results for the models that RDFs are predicted within 5 Å and 3 Å radius of the central O atom, respectively.
The results demonstrate that the RDFs close to the absorption atom can be extracted directly from XANES spectra using machine learning. Theoretically, XANES reflects the information of unoccupied orbitals localized by the core-hole effects on excited atoms. The results are consistent with the physical picture that XANES strongly reflects the information near the excited atoms.
3.2 Neural network model for OFMsThe NN model for predicting OFMs around the absorption O-atoms from O-K XANES spectra was also constructed separately from the NN models for RDFs. Figure 4 compares the predicted value of OFM by the NN model with the theoretical value calculated from the crystal structure. The rows of those heatmaps reflect the electronic configuration of the central O-atom, while the columns reflect those of neighboring atoms. The OFM is expressed by eq. (2). However, only the second term on the right-hand side is plotted because the first term on the right-hand side is the value determined by the outermost electronic configuration of the absorption O-atom and is common to all systems. Considering the outermost electron configuration of the O atom, the elements other than the rows corresponding to the s2 and p4 configurations in the OFM are, in principle, zero. Therefore, only the rows near the corresponding electronic configurations are shown in Fig. 4. Figure 4 shows that for systems with R2 values of 0.94 or higher, including Ta2O5, Mn(FeO2)2, KAlSiO4, Li(CoO2)2, and Zn(MoO2)2, the heatmaps of the theoretical values of OFM and the predictions by NN are almost identical. Clear deviation of heatmaps between theoretical and predicted OFMs could be found when the R2 values were below 0.94, including CaAl2O4, Mo(H2O)2, and Mg(AgO2)2, where some elements that should be zero have non-zero values in predicted OFM.

Heatmaps of OFMs around the O-site predicted by the NN model (lower panels). They are compared with the original values calculated from their crystal structures (upper panels).
Figure 5 shows the histogram of the distribution of R2 values for all test data. As mentioned above, good agreement between predicted and theoretical OFMs was found for the systems with R2 values of 0.94 or higher. These data accounted for 97.1% of the test data, meaning the OFMs can be predicted accurately from XANES spectra using the NN model. The OFM is a descriptor consisting of a vector representing the outermost electronic configuration and a weighted coordination number defined using the solid angles determined by the Voronoi polyhedral faces. The latter contains angular-dependent information on local atomic structures. The results suggest that three-dimensional local atomic structure information, including interatomic distances and anisotropy, can be directly extracted from XANES spectra using machine learning techniques.

Histograms of the distribution of R2 values for OFMs in test data.
In this study, we constructed machine learning models which predict descriptors representing three-dimensional local atomic structure information from O-K XANES spectra. NN models were constructed separately, which take discretized XANES spectra as input and output RDFs and OFMs around the absorption O-atoms. The NN model for predicting RDFs can reproduce the theoretical RDF near the central O-atom (within 3 Å) with a probability of 74%, and that of OFMs can reproduce theoretical OFMs with a probability of 97%. The results demonstrate that machine learning techniques can extract local atomic structure information, such as interatomic distances and anisotropy, directly from XANES spectra.
Extracting local atomic arrangements directly from XANES spectra would be extremely useful. For this purpose, developing a method to recover atomic arrangements from structural descriptors is necessary, which is future work.
This work was supported by JSPS KAKENHI, grant numbers JP20H05192 and JP22H04512.