Abstract
Characterization of material structure with X-ray or neutron scattering using e.g. Pair Distribution Function (PDF) analysis most often rely on refining a structure model against an experimental dataset. However, identifying a suitable model is often a bottleneck. Recently, automated approaches have made it possible to test thousands of models for each dataset, but these methods are computationally expensive and analysing the output, i.e. extracting structural information from the resulting fits in a meaningful way, is challenging. Our Machine Learning based Motif Extractor (ML-MotEx) trains an ML algorithm on thousands of fits, and uses SHAP (SHapley Additive exPlanation) values to identify which model features are important for the fit quality. We use the method for 4 different chemical systems, including disordered nanomaterials and clusters. ML-MotEx opens for a type of modelling where each feature in a model is assigned an importance value for the fit quality based on explainable ML.
Introduction
Understanding the atomic structure of nanomaterials is notoriously difficult because they lack the long-range order found in bulk crystals. Total scattering and Pair Distribution Function (PDF) analysis—which provides a histogram of inter-atomic distances—is the gold standard for characterizing these materials. However, "solving" a structure from a PDF is a massive computational bottleneck.
Traditionally, researchers use "structure mining," testing thousands of candidate models to see which fits the experimental data best. The problem is the "combinatorial explosion": if you have a starting model with $N$ atoms, there are $2^N - 1$ possible sub-clusters (motifs) you could test. For a modest 48-atom cluster, a brute-force search would take roughly 3 million years. Researchers need a way to screen this vast structural space without checking every single possibility.
The ML-MotEx Framework
The authors introduce ML-MotEx (Machine Learning based Motif Extractor), a framework that uses explainable machine learning to identify structural motifs. Instead of searching for a single best-fitting model, ML-MotEx learns the underlying rules of what makes a motif successful. The process follows a four-step workflow:
- Catalogue Generation: Start with a large "super-structure" and randomly remove atoms to create a diverse catalogue of thousands of smaller candidate motifs.
- Fitting: Use standard PDF fitting tools (like DiffPy-CMI) to calculate the agreement factor ($R_{wp}$) for each candidate against the experimental data.
- ML Training: Train a Gradient Boosting Decision Tree (specifically XGBoost) to predict the $R_{wp}$ based on which atoms are present or absent in the motif.
- Explainability: Use SHAP (SHapley Additive exPlanation) values to quantify the importance of each atom. SHAP values reveal how much the presence of a specific atom "pushes" the $R_{wp}$ toward a better (lower) or worse (higher) fit.
Experimental Validation
The method was validated across four distinct systems:
- Simulated $C_{60}$ Buckyball: A proof-of-concept using a 132-atom unit cell to see if the algorithm could "find" the 60-atom cage. The ML model predicted $R_{wp}$ values with a mean absolute error of only 2.0%.
- Disordered Molybdenum Oxide ($MoO_x$): Experimental data from amorphous $MoO_x$ supported on alumina. ML-MotEx automatically identified a "triad" of edge-sharing $[MoO_6]$ octahedra as the dominant motif.
- Tungstate $\alpha$-Keggin Clusters: Experimental data of clusters in solution. The algorithm identified the same core $\alpha$-Keggin motif regardless of which complex crystal structure was used as the starting point, proving robustness.
- Bismuth Oxido Clusters: Using a "cookie-cutter" approach to extract motifs from a $\beta-Bi_2O_3$ structure, demonstrating scalability to models with over 250 atoms.
Key Insights and Discussion
ML-MotEx turns a process that would take millions of years of brute-force calculation into one that takes mere minutes. The GBDT model only needs to see a small fraction (~10,000) of the total possible structures to accurately predict the importance of every atom. By mapping SHAP values back onto the 3D structure, researchers get a heat map of "good" vs. "bad" atoms, providing immediate chemical intuition.
However, ML-MotEx is not ab initio; it can only find motifs that exist within the provided starting model. Furthermore, the algorithm optimizes for the best mathematical fit ($R_{wp}$). Researchers must still use chemical knowledge to ensure the resulting motifs are physically reasonable (e.g., checking bond lengths and coordination).
Conclusion
ML-MotEx represents a significant advancement in structural characterization, moving from simple model-fitting to explainable feature importance. The team plans to integrate ML-MotEx into the PDFitc.org web server and combine it with database-mining tools to automatically suggest starting models based on the elements present in a sample.
Summary updated