\section{keyword}
	\par
	Keywords:Coordination Motif, X-ray Absorption Spectroscopy,XANES, Machine Learning, Interpretable Machine Learning, Shapley, SHAP
	
	\section{Introduction} 
	\par
	Quantitative rather than purely qualitative analysis of XANES data is the key for XANES data to play a practical role in the detection of three-dimensional geometry and electronic structure changes. The detection capability of XANES in local structure is irreplaceable. Compared with EXAFS data analysis, XANES data analysis lacks both breadth and depth in conventional XAS data processing. Because EXAFS data fitting is based on analytical mathematical expression based on fixed theoretical amplitude and phase, its computational amount and fitting complexity are less than XANES fitting. However, the information provided by XANES cannot be replaced by EXAFS, and the increasing perfection of XANES data processing methods can also increase its proportion in conventional XAS data processing. Currently, XANES calculations mainly include two categories. One is based on first-principles calculations, including DFT-MO method for calculating transition matrix elements on the basis of K-S orbits \cite{DFTMO,DFTMO2}. TDDFT\cite{TDDFT} and ROCIS\cite{ROCIS} are used to calculate the inner shell excitation of other occupied orbits other than the frozen inner shell orbit, focusing on the calculation of the excitation characteristics in spectroscopy. Another calculation method based on multiple scattering \cite{MS} focuses on the calculation of scattering characteristics in spectroscopy, which is closely related to the geometric structure of the system. Common XAS calculation software based on multiple scattering theory includes FEFF\cite{FEFF}, FDMNES\cite{FDMNES} and CONTINUUE. Based on the computational core mentioned above, some XANES fitting programs are developed in combination with mathematical optimization methods. For example, MXAN program combined with MINUIT optimization algorithm package \cite{MXAN}, FITIT program combined with interpolation method \cite{FITIT}, XANES fitting program combined with Bayesian optimization \cite{rehr2005bayes}. The above methods have also been applied in XANES data processing. For example, MXAN was applied to study the structure change of excited state of photosensitizer $Ru^{II}(bpy)_3$ \cite{benfatto2006}. FITIT was applied to the study of photosensitive $Ru(DCBPY)_2(NCS)_2$\cite{Zhang2011}, and Bayesian fitting was applied to the study of the excited state structure of binuclear Pt complexes \cite{van2010}. XANES fitting software for instance MXAN and FITIT program interfaces adopt the rigid body as fixed groups and ligands to fit the geometric parameters of the rigid body. This model is suitable for XANES fitting of protein and complex molecules, but it is not convenient for materials cluster system. The XANES quantitative analysis of nanomaterial system may require other methods, machine learning and neural network are among the choices.
	
	
	\par
	It is worth mentioning that the spectral analysis method based on neural network has a good play in the field of materials and cluster system. Research on deep learning based on neural network has been revived since 2006. In this wave trend, neural networks and other machine learning algorithms are applied to X-ray spectral data analysis, and many achievements have been achieved. As the first work of neural network in quantitative analysis of XANES, Timoshenko, Frenkel et al. applied fully connected neural network to the nearest neighbor coordination number of metal clusters with good results \cite{timoshenko2017JPCL}. The preliminary exploration by Timoshenko et al. shows the application value of neural network in XANES data processing and verifies the feasibility of extracting coordination number from experimental near edge spectrum by constructing neural network. In 2020, Timoshenko's work demonstrated the simultaneous capture of coordination number and bond length information based on fully connected neural networks\cite{timoshenko2020}. In 2020, Frenkel et al. used two fully connected neural networks simultaneously to resolve coordination number of two-element nanosystems\cite{li2021AxBy}. In addition to fully connected neural networks, other machine learning algorithms were applied to XANES analysis. For instance, Timoshenko applied convolutional neural networks in 2018 to extract radial distribution function(RDF) from two-dimensional XAS wavelet data\cite{timoshenko2018PRL};Zheng et al used ensemble machine learning algorithm\cite{zheng2018npj}. In addition, unsupervised learning algorithms are also applied to XANES analysis\cite{timoshenko2019unsupervised,tetef2021unsupervised}.Existing researches mostly focus on the use of training sets built for specific samples. Machine learning based on this is aimed at improving its structural analysis performance, but its generalization is limited while obtaining powerful structure analysis ability.
	\par
	There are few XANES analysis works which is based on database based machine learning for XANES parsing is relatively rare\cite{zheng2018npj,carbone2019}. For example, Zheng et al. used ensemble learning algorithm to match similar spectra in the database\cite{zheng2018npj}, and then predicted the architecture based on the matched spectra. However, to sum up, most of the data analysis methods based on machine learning is still to build training sets for specific systems, and the training sets are relatively large in scale. In the above work, the algorithm based on neural network algorithm, which has more advantages in large-scale data sets, is adopted, which also confirms this point from the side. However, the method based on the specific system training set is difficult to be applied to other systems with the same absorption edge. Liu, Yang et al pointed out in their work that error bar of analysis results would increase greatly when constructing neural network analysis using other systems to analyze a given sample\cite{liu2019}.In addition, machine learning XANES analysis based on training sets is more similar to XANES fitting to some extent. The training set is a set of calculated spectra obtained by the variation of structural parameters based on the initial structure. The similar XANES fitting idea is to change the initial structural parameters to find the structure whose calculated spectrum is closest to the experimental one. This is a process from "something" to "excellent", and before that there is a process from "nothing" to "something". All of these methods require an initial structure, and it is often a complex and challenging task to get the initial structure model in practice.
	
	\par
	The machine learning XANES analysis method based on database has greater generality to the sample to be studied than methods based on training set. The constructed model of this method can be applied to other samples with the same absorption element with high repeatability. 
	This article enriches the toolkit for such kind of methods. Based on the small and medium scale theoretical spectral database, we apply the ensemble learning algorithm random forest algorithm, which is more advantageous and robust in small and medium scale data, to analyze the coordination motif of the structure. The accuracy of the analytical results is 90 percent in coordination number and more than 80 percent in stereo coordination motif, which has practical value. This method is based on small and medium scale spectral database and has reference for constructing experimental spectral database and related analysis produce of spectral beam line for spectral analysis. In addition, the method can also provide the initial structure for the users of beam line, which can be used for on-line sample judgment and as the basic structure for subsequent XANES fitting or neural network spectral analysis. At the same time, we have carried out analysis based on interpretable machine learning. We use the TreeSHAP method to explain the mechanism of our model and of a specific prediction example. The model mechanism is explained from the physical perspective as much as possible, which expands the methodological perspective of machine learning application in XAS data analysis.
	
	\section{Method} 
	
	
	The flow chart of our method is shown in Figure\ref{flow}, and the whole processing process is briefly described below. Firstly, the theoretical XANES and the representation of the three-dimensional local structure are calculated from the material project structure database\cite{MP}. XANES is the independent variable X, and the three-dimensional local structure is represented as the dependent variable Y to constitute the data set. The input of the model we constructed is XANES and the output is three-dimensional local structure characterization. The model prediction effect is characterized by  $R^2$ or accuracy.
	\par
	In terms of three-dimensional local structure characterization, we use the algorithm developed by Zimmermann\cite{zimmermann2017,PyCDT} et al. to calculate OP. Only structures that can be accurately resolved based on OP are included in the XANES calculation. The local structure order parameters(OP) was selected as the index. On the one hand, it can process single local structure or sample with one dominant local structure; on the other hand, regression based on OP vector also provides a technical  for sample analysis of complex or mixed local structure. The space cutoff index calculated by OP is large enough to obtain more robust results. In the recognition of OP structure, the cutoff value of OP is 0.5 relatively high considering the amount of data included and the accuracy of the algorithm to identify the three-dimensional local structure. XANES is the average effect of atoms of all absorbing edge elements in the system. Let's use the Cu element as an example. In the three-dimensional local structure characterization, we firstly calculate the OP of all Cu atom sites in the system, and only the sample with successful OP identification of all Cu sites in the system is included in the analysis. Then calculate the average OP of system elements as the indicator variable.
	
	
	
	\begin{figure}
		\centering
		\includegraphics[width=1\linewidth]{MLXAS1.eps}
		\caption[flow]{Flow chart}
		\label{flow}
	\end{figure}
	
	\par
	In terms of theoretical calculation of XANES, this paper mainly deals with K-edge XANES of 3d transition metals. The calculation accuracy and calculation time are considered comprehensively. Therefore, we use FEFF\cite{FEFF} software based on multiple scattering theory for the calculation. This article focuses on XANES. Therefore, a more suitable full multiple scattering algorithm for XANES is adopted. The random-phase approximation (RPA) core-hole approximation is used in calculation. The radius of cluster for self-consistent multiple scattering calculation is large enough for convergency. Real Hedin-Lundqvist exchange-correlation potential is used in the calculation. Considering the error of muffin-tin potential approximation on XANES calculation results of a few systems, we subsequently wrote module using FDMNES\cite{FDMNES} as calculation core which is based on multiple scattering and finite difference method to carry out the XANES calculation process.Considering the amount and scale of data we deal with, we choose tree algorithm and its improved integrated learning algorithm to build the model. See the results section for a detailed description.
	
	
	\par
	The dataset consists of the important 3d transition metal Cu K-edge XANES. The local structure order parameters(OP) was calculated to characterize coordination number(CN) and coordination motif(CM), using the OP calculation method developed by Zimmermann\cite{zimmermann2017,PyCDT}. Dataset 1 contains 1088 data, which is denoted as dataset CN. The independent variable X of the dataset is XANES spectrum, which is interpolated evenly to 200 energy grid points. Index Y is the classification based on coordination number. Among them, the largest proportion was 4-coordination, accounting for 65.35\%. We use this as a baseline. That is, the worst learning model predicts that the coordination number with the largest proportion. The model results better than the baseline can reflect that the model has learned "knowledge" in the process of training. Dataset 2 contains 879 data, which we denoted as dataset OP. The dataset independent variable X is still the XANES interpolated to 200 energy points on average. Index Y is OP vector when regression is performed, and OP is used as a 21-dimensional vector here. The value of each dimension of the OP vector represents the similarity between the structure and the corresponding coordination CM of this dimension, which is a smooth value from 0 to 1. The twenty-one 3D CM names and their corresponding coordination numbers are shown in the Table.\ref{OP}. Meanwhile, based on OP, we can obtain CM dominated by sample based on OP maximum, and then classify CM classification index.
	\par
	The result part is divided into two parts according to the difference of the final analysis index. The first part is the classification of coordination number, the second part is the classification of 3D CM, furthermore the regression of OP vector. In the choice of machine learning algorithm, we choose the Tree algorithms instead of neural network. There are a lot of parameters to be fitted in the neural network model, so it is usually not used in small and medium scale data. Tree algorithm has good robustness and good performance in avoiding over-fitting. We choose Tree algorithms that perform well in small and medium scale data, including basic decision tree and ensemble learning algorithm based on decision tree including bagging random forest algorithm and boosting gradient boosted decision tree(GBDT) algorithms XGBoost\cite{xgboost} and LightGBM\cite{lightgbm}. There is no strong dependence between the individual decision trees integrated in random forest algorithm and they can be generated simultaneously. While individual decision trees integrated by XGBoost and LightGBM algorithm are strongly dependent on each other and must be generated sequentially. The important hyperparameters of the model, taking random forest as an example, include the framework hyperparameters nestimators and decision tree hyperparameters such as max-features,max-depth, min-samples-leaf, min-samples-split. The hyperparameter optimization of the model is based on references\cite{hyper1,hyper2}.
	
	
	
	
	
	\section{ Model results and discussion} 
	
	
	
	
	\par
	The machine learning classification results based on data set CN are as follows. The index was CN classification, and the independent variable of the dataset was XANES energy spectrum. The machine learning classification results are shown in the Table\ref{CN}. We see that the accuracy of cross-validation is slightly lower than that of a single test set due to the grouping of testing sets. Specifically looking at 5 accuracy results before cross-validation, there are 1-2 results comparable to that of a single testing set. In the comparison of the results of the given machine learning algorithms, the ensemble learning algorithms are generally superior to the basic decision tree model, and the random forest model with the worst performance has a 10.6\% performance improvement compared with the original decision tree model. LightGBM model has the best effect, which can reach 91.28\% accuracy.
	\par
	The machine learning classification results based on data set OP are as follows. The index was CM classification, and the independent variable of the dataset was XANES energy spectrum. Compared with CN classification, CM classification focuses more directly on stereoscopic coordination motifs. Taking 4-coordination as an example, there are the most common tetrahedral and squ qre plan coordination motif, as well as 	see-saw like, trigonal-bipyrami coordination motifs. Here we present the relevant spectral data of tetrahedron and octahedron, the two coordination motifs with the highest proportion in the Cu OP dataset, as shown in Figure\ref{tetoct}. The machine learning classification results are shown in the Table\ref{CM}. In the process of cross-validation, the data set is divided into 5 subsets, that is, 20\% of whole data. It can be seen that even the decision tree model with the worst result is also obtained with 71.56\% accuracy in cross validation. Taking tetrahedron CM with the highest proportion of 32.49\% as the base line, the decision tree model also has a 39.07\% improvement. The optimal cross-validation accuracy of LightGBM model results reaches 81.68\%. Compared with LightGBM, the random forest model only reduced by 0.56\%.
	
	
	\par
	Further, we use OP vectors for regression. An important advantage of OP vector over 3D CM classification is that OP vector can deal with complex and mixed CM. When a variety of CM exist in the sample at the same time, OP vector can measure the similarity between the average structure of the sample and various given CMs, and the closeness to each CM can reflect the proportion of various CMs. Therefore, OP vector can represent several dominant CM components and their approximate proportion in the sample to a certain extent. OP vector regression is carried out on data set OP, and the regression results using 21-dimensional Y as the index are shown in Table\ref{CMR} DIM21. Testing $R^2$ 0.42 is the calculation result when 20\% testing sets are used. The small $R^2$ reflects that the model does not achieve the expected effect at the regression level. We compared the predicted value of $\widehat{OP}$ output from the model with the OP from testing set through post-processing, and looked at the model effect at the classification level. If the maximum value of predicted $\widehat{OP}$ and the maximum value of OP of testing set were located in the same CM, it was considered that the prediction of the first leading CM was accurate as shown in the 1st ACC column in the Table\ref{CMR}. If the seconda maximum value of $\widehat{OP}$  and OP were still located in the same CM, or there is no obvious second important CM, the prediction of the second dominant CM is accurate, see 2rd ACC column in Table\ref{CMR}. Here, the judgment that there is no obvious second CM major component is that the second largest value in the OP is less than 0.1. It can be seen that although the effect of the model is poor at the regression level, the prediction accuracy of the first important CM of the model still reaches 81.25\%. 
	We speculated that one of the reasons was that samples of a few CM accounted for a large proportion in the small and medium scale data set. And OP component prediction of the CMs was more accurate, which also led to the high 1st acc. For other CM, due to the small amount of sample data, the prediction result is poor, thus lowering the overall regression $R^2$. 
	In order to verify this conjecture, we reduced the regression dimension to 3 dimensions, including the three kinds of CMs with the largest number in the data set, TET, OCT and BCC. The regression results are shown as DIM3 in Table\ref{CMR}. We found that the testing $R^2$ in the testing set increased significantly to 0.71, which verified our conjecture. The quality of regression model will be improved by expanding the database to increase the sample size of other CMs.
	
	
	\par
	Finally, we discuss the importance of different energy regions to the model. We take the classified random forest model of OP data set as an example. In the Figure\ref{importance}, the abscissa is the energy corresponding to different features, and the ordinate is the normalized feature importance. It can be seen that the "main peak" feature importance, namely the feature importance of white line peak and scattering peaks near the absorption edge, is generally higher than the feature importance of scattering peaks in higher energy region. It shows the importance of "main peak" features to the model.
	
	
	
	
	\begin{table}
		\caption{\label{OP}Twenty-one 3D CM names and their corresponding coordination numbers.}	
		\centering
		\begin{tabular}{lc}
			Coordination Motif    &Coordination number \\
			single neighbor      &1\\
			bent and linear           &2\\
			trigonal plane&3\\
			triangular non-coplanar &3\\
			T-shape&3\\
			square plane&4\\
			tetrahedron&4\\
			see-saw &4\\
			trigonal bipyramid&4\\
			trigonal pyramid&4\\
			pentagonal plane&5\\
			square pyramid&5\\
			trigonal bipyramid&5\\
			hex plan&6\\
			octahedron&6\\
			pentagonal pyramid&6\\
			hex pyr&7\\
			pentagonal bipyramid&7\\
			cube&8\\
			hex bipyr&8\\
			cuboctahedron&12\\
		
		
		\end{tabular}
	\end{table}
	

	\begin{table}
		\caption{\label{CN} Classification results of coordination number.(CN)}	
		\centering
		\begin{tabular}{lccc}
			Algorithm    &testing set accuracy &cross validation accuracy  \\
			Decision Tree             &87.16\%        &81.62\%        \\
			Random Forest             &94.50\%        &90.26\%        \\
			XGBoost                   &94.50\%        &90.45\%        \\
			LightGBM                  &94.95\%        &91.28\%        \\
		
		
		\end{tabular}
	\end{table}
	

	\begin{table}
		\caption{\label{CM}Classification results of three-dimensional coordination motifs(CM).}	
		\centering
		\begin{tabular}{lcc}
			Algorithm    &testing set accuracy &cross validation accuracy   \\
			Decision Tree             &73.30\%        &71.56\%        \\
			Random Forest             &89.20\%        &81.22\%        \\
			XGBoost                   &89.20\%        &79.29\%         \\
			LightGBM                  &90.90\%        &81.68\%         \\
		
		
		\end{tabular}
	\end{table}
	
	
	\begin{table}
		\caption{\label{CMR}Regression results of three-dimensional coordination motifs(CM).}	
		\centering
		\begin{tabular}{lcccc}
			Regression target     &training$R^2$  &testing$R^2$  &1st acc   &2rd acc   \\
			dim3             &0.95   &0.71   &77.27\%   &67.61\%        \\
			dim21            &0.91   &0.42   &81.25\%   &57.95\%        \\
		\end{tabular}
	\end{table}
	
	
	\begin{figure}
		\includegraphics[width=12cm]{tet_oct.eps}
		\caption{\label{tetoct}Tet Oct database}
	\end{figure}
	
	\begin{figure}
		\includegraphics[width=12cm]{feature_importance.eps}
		\caption{\label{importance}feature importance}
	\end{figure}
	
	
	
	
	
	
	\section{Application of SHAP based Interpretable Machine Learning in stereo coordination motif prediction Model} 
	\par
	Despite the great success of machine learning in many areas, However, the lack of interpretability of some machine learning methods severely limits its application in some tasks, especially in some fields concerned with mechanisms for spectrographers, ideally, the model should be able to explain the logic of the model to spectrographers and applied field researchers, and gain more trust from applied field researchers, i.e. beam line users.
	This paper focuses on the application of SHAP explainable method in XAS spectral analysis. SHAP is based on Shapley value theory\cite{shapley} in game theory and machine learning local interpretation. It belongs to the post-interpretation framework, which can provide Shapley value to estimate the contribution of each feature. Shapley Value is a method to describe the weight or importance of a particular feature in the prediction of a particular data point, which is the core of SHAP. Compared with the traditional feature importance method results\ref{importance} ,SHAP has better consistency and can present the positive-negative relationship of each predictor relative to the target variable, which can be used for local and global interpretation . Because SHAP has efficient algorithm implementation under the tree model, we adopted TreeSHAP\cite{TreeSHAP} here.For local interpretability, each feature has its own set of Shapley values.
	
	We take the CuS covellite system in the experiment to perform the tetrahedral CM regression model as an example. The force plot of the analysis results is shown in the Figure\ref{force}. You can see three features of 8992.4eV, 8992.7eV, 8993eV, that is, the covellite XANES in the 8992.4-8993eV energy region is used for prediction.
	8992.4-8993eV energy region plays an important positive role for tetrahedral CM regression results. This energy area also contributes an important positive role when we conduct model sorting and analysis, that is, considering the performance of the model on a large number of samples, as shown in the figure. In order to adapt to the habits of spectrographers, we present another form of graphs commonly used in SHAP analysis. In the graph, the ordinate is SHAP and the abscissa is energy. We also present a covellite on the graph. Cu K-edge XANES is used to visualize different energy regions. These features are all behind the absorption edge rather than the front edge peaks that we usually think of empirically. We speculate that this may be related to the accuracy of the multiple scattering calculation in the edge front. We have performed a dependency analysis on the 8992.4 and 8992.7 eV energy regions, as can be seen in the figure, these two features work under the same trend, that is, they can be combined as the same feature. 8992.4-8993eV is located in the peak energy region of scattering, and the model may predict the CM through the scattering characteristics of the structure. We conduct an interpretable machine learning analysis of the model, and this result enriches the methodological perspective of XANES data analysis, which can be used for reference.
	
	We take the CuS Covellite system in the experiment for the tetrahedral CM regression model as an example, and the force plot of the analysis results is shown in the figure. It can be seen that there are three features: 8992.4eV, 8992.7ev and 8993eV. That is, covellite XANES in the energy region of 8992.4-8993eV play an important positive role in predicting the tetrahedral coordination of covellite system i.e. tetrahedral CM OP value. This energy region also plays an important positive role in whole model, i.e. considering the performance of the model on a large number of samples, as shown in the Figure\ref{bswarm}. In order to adapt to the habit of spectrographers, we presented the graph commonly used in SHAP analysis in another form in Figure\ref{SHAP-XANES}. In the graph, the ordinate is SHAP and the abscissa is energy. We also presented a covellite Cu K-Edge XANES on the graph to intuitively reflect different energy regions. The 8992.4-8993eV are behind the absorption edge but not in pre-edge region. We speculate that this may be related to the accuracy of the multiple scattering calculation of pre-edge feature. We conducted a dependency analysis on 8992.4 and 8992.7eV feature, as shown in the Figure\ref{dep}. These two features work under the same trend, that is, they can be combined as the same feature. 8992.4-8993eV is located in the scattering peak energy region, and the model may predict CM based on the scattering characteristics of the structure.  In summary we perform interpretable machine learning analysis on the model, which enriches the methodological perspective of XANES data analysis and has reference significance.
	
	
	\begin{figure}
		\centering
		\includegraphics[width=0.7\linewidth]{SHAP-XANEStitle}
		\caption{SHAP value plot from a spectroscopy view of tetrahedron CM regression model.}
		\label{SHAP-XANES}
	\end{figure}
	
	\begin{figure}
		\centering
		\includegraphics[width=0.7\linewidth]{force}
		\caption{SHAP value force plot of CuS coverllite's prediction result.}
		\label{force}
	\end{figure}
	
	\begin{figure}
		\centering
		\includegraphics[width=0.7\linewidth]{dep}
		\caption{dependence diagram.}
		\label{dep}
	\end{figure}
	
	\begin{figure}
		\centering
		\includegraphics[width=0.7\linewidth]{bswarm}
		\caption{Summary beeswarm plot of SHAP value.}
		\label{bswarm}
	\end{figure}
	
	
	
	\section{Application of SHAP based Interpretable Machine Learning in XANES Reconstruction Model}
	In the previous section we demonstrated the application of interpretable machine learning to parametric prediction models. The input of this kind of model is XAS spectrum, and the output is various structural parameters, such as coordination number, bond length, bond Angle, stereo structure symmetry, etc.In contrast, there is another type of model, XANES spectrum reconstruction model in which structural parameters are input and theoretical XANES reconstructed by machine learning algorithm are output. Taking Fe complex system as an example, we also carry out explainable machine learning analysis for such models. The analysis results quantitatively and systematically demonstrate the model mechanism, that is, how parameter changes affect the theoretical XANES reconstructed by machine learning. SHAP analysis results can be seen in the Figure\ref{SHAP_FITIT}.
	For representative work in XANES Reconstruction Model, see software PyFITIT\cite{pyfitit} introduced by Martini et al. PyFITIT calls the XANES Reconstruction Model as indirect method. We take the PyFITIT IHS500 Fe complex example\cite{pyfitit} as the analysis system. The input of the model is three structural parameters, and the output is theoretical XANES reconstructed by machine learning algorithm. This example is a metal complex. The rigid body of the ligand is fixed to reduce the degree of freedom of movement. There are three ligand structural parameters central ring shift eg. the axial ring shift along Fe-N axis direction, side rings elong and side rings Shift. The three parameters are in the range of -0.3 to 0.5 angstrom.
	\par
	SHAP analysis results are shown in Figure\ref{SHAP_FITIT}. We did not adopt the traditional SHAP data presentation form similar to Figure\ref{bswarm}, but reorganized the data results according to the needs of spectral analysis. We incorporate the related SHAP values of the same parameter into the same image. Because SHAP decomposed the prediction contribution of the three structure parameters, the graph based on the given parameter can quantitatively and systematically show the influence of the given parameter on the reconstructed XANES based on machine learning algorithm. We use the two-color segmental colormap as the colorbar to display the corresponding structural parameter values of the data point.
	 It can be seen from Figure\ref{SHAP_FITIT} that the increase and decrease of "central ring shift" and "side ringselong" parameters clearly correspond to the two trends of reconstructed XANES change respectively. 
	 The reduction of "central ring shift" and "side rings elong" parameters forms a new feature in 7140-7150eV energy range. The "central ring shift" decreases with the weakening of the white line peak. The decrease of "side rings elong" also causes the shift of white line peak to high energy direction. Comparatively, "side rings shift" has less effect on reconstructed XANES, and only when the parameters increase, the white line feature increases obviously. The trend of reconstructed XANES variation caused by parameters can be quantified and systematically presented by interpretable machine learning. It provides a clear direction for the subsequent XANES fitting based on optimization algorithm. The mechanism of parameters affecting reconstructed XANES also makes it possible to analyze the physical background, remove redundant and interfering set parameters, and to improve and modify the model.
	 
	 The decrease in oxygen beam induced by oxygen impurities corresponds to two trends of oxygen dependence. 
	
	
	\begin{figure}
		\centering
		\includegraphics[width=1.2\linewidth]{SHAP_FITIT}
		\caption[SHAP_FITIT]{SHAP mechanism of XANES Reconstruction Model.The above three pictures are SHAP values plots of three structural parameters, and the below three pictures are the sum of SHAP values and expected spectrum values. The black solid line is the reference XANES formed by expected values, called "XANES View", which is more convenient for spectrographers to interpret the results. Colorbar is the value of structure parameters from -0.3 to 0.5 angstrom.}
		\label{SHAP_FITIT}
	\end{figure}
	
	
	\section{Conclusion and Outlook} 
	Based on the small and medium scale theoretical spectral database, we apply random forest algorithm to analyze the coordination motif of the structure. The accuracy of the analytical results is 90percent in coordination number and more than 80 percent in stereo coordination motif, which has practical value. This method can provide an initial structure for the beamline user for online judgment and as an initial guess for further detail XANES quantitative analysis. Later, we will further expand our database based on other databases than material project such as NOMAD\cite{NOMAD}, AFLOW\cite{AFLOW}, etc. A more systematic study will be also carried out on the stereo coordination motif analysis of the most common used three dimensional metal K-edge absorption spectrum.
	
	
	
