Accelerating electron diffraction analysis using graph neural networks and attention mechanisms
Source abstract
Abstract
Abstract Electron diffraction(ED) often used to solve for unknown structures or refine existing ones. Existing methods for automated ED analysis often struggle with challenges such as computational expense and experimental noise. This study introduces a deep learning framework to accelerate and improve crystal structure determination from diffraction patterns. The methodology treats each diffraction pattern as a relational graph of Bragg spots. Spot features are encoded using a 1D convolutional network, from which a relational attention aggregator constructs an orientation-agnostic graph. This graph is processed by a Graphormer encoder enhanced with Mixture-of-Experts layers, allowing the model to learn complex crystallographic relationships efficiently. Trained and tested on a large dataset of simulated diffraction patterns, the model achieved a crystal system classification accuracy of 89.2% and a space group accuracy of 70.2% from single patterns, significantly outperforming a state-of-the-art random forest baseline (74.2% and 57.8%, respectively). By aggregating predictions across multiple zone axes, these accuracies improved to 96.5% and 79.5%. The model also demonstrated robust performance on experimental data of gold nanoparticles, producing plausible classifications consistent with known orientation degeneracies. By unifying relational graph reasoning with specialized expert networks, this work presents a robust and automated framework for high-throughput materials characterization.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Machine Learning in Materials Science · Advanced Electron Microscopy Techniques and Applications · X-ray Diffraction in Crystallography
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
References (45)
Show source-provided references
1. Müller, U. Symmetry Relationships between Crystal Structures: Applications of Crystallographic Group Theory in Crystal Chemistry (Oxford Univ. Press, 2013).10.1093/acprof:oso/9780199669950.001.0001 ↗
2. Kittel, C. & McEuen, P. Introduction to Solid State Physics (John Wiley & Sons, 2018).
3. Epp, J. X-ray diffraction (XRD) techniques for materials characterization. in Materials Characterization Using Nondestructive Evaluation (NDE) Methods (eds Hübschen, G., Altpeter, I., Tschuncky, R. & Herrmann, H.-G.) 81–124 (Woodhead Publishing, 2016).10.1016/B978-0-08-100040-3.00004-3 ↗
4. Schwartz, A. J., Kumar, M., Adams, B. L. & Field, D. P. (eds.) Electron Backscatter Diffraction in Materials Science (Springer, 2009).10.1007/978-0-387-88136-2 ↗
5. Ophus, C. Four-dimensional scanning transmission electron microscopy (4D-STEM): from scanning nanodiffraction to ptychography and beyond. Microsc. Microanal. 25, 563–582 (2019).10.1017/S1431927619000497 ↗
6. Savitzky, B. H. et al. py4DSTEM: a software package for four-dimensional scanning transmission electron microscopy data analysis. Microsc. Microanal. 27, 712–743 (2021).10.1017/S1431927621000477 ↗
7. Gruene, T., Holstein, J. J., Clever, G. H. & Keppler, B. Establishing electron diffraction in chemical crystallography. Nat. Rev. Chem. 5, 660–668 (2021).10.1038/s41570-021-00302-4 ↗
8. Zeltmann, S. E. et al. Uncovering polar vortex structures by inversion of multiple scattering with a stacked Bloch wave model. Ultramicroscopy 250, 113732 (2023).10.1016/j.ultramic.2023.113732 ↗
9. Stach, E. et al. Autonomous experimentation systems for materials development: a community perspective. Matter 4, 2702–2726 (2021).10.1016/j.matt.2021.06.036 ↗
10. Diebold, A. C. et al. Template matching approach for automated determination of crystal phase and orientation of grains in 4D-STEM precession electron diffraction data for hafnium zirconium oxide ferroelectric thin films. Microsc. Microanal. 31, ozaf019 (2025).10.1093/mam/ozaf019 ↗
11. Rauch, E. Rapid diffraction patterns identification through template matching. Arch. Metall. Mater. 50, 87–89 (2005).
12. Jeong, J., Cautaerts, N., Dehm, G. & Liebscher, C. H. Automated crystal orientation mapping by precession electron diffraction-assisted four-dimensional scanning transmission electron microscopy using a scintillator-based CMOS detector. Microsc. Microanal 27, 1102–1112 (2021).10.1017/S1431927621012538 ↗
13. Ophus, C. et al. Automated crystal orientation mapping in py4dstem using sparse correlation matching. Microsc. Microanal 28, 390–403 (2022).10.1017/S1431927622000101 ↗
14. Price, C., Takeuchi, I., Rondinelli, J., Chen, W. & Hinkle, C. AI-accelerated electronic materials discovery and development. Comput. 58, 98–104 (2025).
15. Chen, K. & Barnard, A. Advancing electron microscopy using deep learning. J. Phys. Mater. 7, 022001 (2024).10.1088/2515-7639/ad229b ↗
16. Kalinin, S. V. et al. Machine learning for automated experimentation in scanning transmission electron microscopy. npj Comput. Mater. 9, 227 (2023).10.1038/s41524-023-01142-0 ↗
17. Levine, D. S. et al. The open molecules 2025 (omol25) dataset, evaluations, and models. Preprint at https://doi.org/10.48550/arXiv.2505.08762 (2025).10.48550/arXiv.2505.08762 ↗
18. Yoo, T. J. Leveraging multimodal data analytics with advanced electron microscopy to obtain quantitative structural insights into complex materials. Ph.D. thesis, University of Florida (2024).
19. Chen, J. et al. Automated crystal system identification from electron diffraction patterns using multiview opinion fusion machine learning. Proc. Natl. Acad. Sci. USA 120, e2309240120 (2023).10.1073/pnas.2309240120 ↗
20. Gleason, S. P. et al. Random forest prediction of crystal structure from electron diffraction patterns incorporating multiple scattering. Phys. Rev. Mater. 8, 093802 (2024).10.1103/PhysRevMaterials.8.093802 ↗
21. Mika, M., Tomczak, N., Finney, C., Carter, J. & Aitkaliyeva, A. Automating selective area electron diffraction phase identification using machine learning. J. Materiomics 10, 896–905 (2024).10.1016/j.jmat.2023.12.010 ↗
22. Tomczak, N. & Kuppannagari, S. Automated indexing of tem diffraction patterns using machine learning. In 2023 IEEE High Performance Extreme Computing Conference (HPEC), 1–7 (IEEE, 2023).10.1109/HPEC58863.2023.10363423 ↗
23. Tiong, L. C. O., Kim, J., Han, S. S. & Kim, D. Identification of crystal symmetry from noisy diffraction patterns by a shape analysis and deep learning. npj Comput. Mater. 6, 196 (2020).10.1038/s41524-020-00466-5 ↗
24. Aguiar, J. A., Gong, M. L. & Tasdizen, T. Crystallographic prediction from diffraction and chemistry data for higher throughput classification using machine learning. Comput. Mater. Sci. 173, 109409 (2020).10.1016/j.commatsci.2019.109409 ↗
25. Aguiar, J., Gong, M. L., Unocic, R., Tasdizen, T. & Miller, B. Decoding crystallography from high-resolution electron imaging and diffraction datasets with deep learning. Sci. Adv. 5, eaaw1949 (2019).10.1126/sciadv.aaw1949 ↗
26. Mortazavi, B. Recent advances in machine learning-assisted multiscale design of energy materials. Adv. Energy Mater. 15, 2403876 (2025).10.1002/aenm.202403876 ↗
27. Martineau, B. H., Johnstone, D. N., van Helvoort, A. T., Midgley, P. A. & Eggeman, A. S. Unsupervised machine learning applied to scanning precession electron diffraction data. Adv. Struct. Chem. Imaging 5, 1–14 (2019).10.1186/s40679-019-0063-3 ↗
28. Bridger, A., David, W. I., Wood, T. J., Danaie, M. & Butler, K. T. Versatile domain mapping of scanning electron nanobeam diffraction datasets utilising variational autoencoders. npj Comput. Mater. 9, 14 (2023).10.1038/s41524-022-00960-y ↗
29. Ra, M. et al. Classification of crystal structures using electron diffraction patterns with a deep convolutional neural network. RSC Adv. 11, 38307–38315 (2021).10.1039/D1RA07156D ↗
30. Corso, G., Stark, H., Jegelka, S., Jaakkola, T. & Barzilay, R. Graph neural networks. Nat. Rev. Methods Primers 4, 17 (2024).10.1038/s43586-024-00294-7 ↗
31. Bruna, J., Zaremba, W., Szlam, A. & LeCun, Y. Spectral networks and locally connected networks on graphs. In Proc. 2nd International Conference on Learning Representations (2014).
32. Kipf, T. N. Semi-supervised classification with graph convolutional networks. In Proc. 5th International Conference on Learning Representations (2017).
33. Veličković, P. et al. Graph attention networks. In Proc. 6th International Conference on Learning Representations (2018).
34. Ying, C. et al. Do transformers really perform bad for graph representation? In Proc. 35th International Conference on Neural Information Processing Systems (Curran Associates Inc., 2021).
35. Yang, H. et al. Mattersim: a deep learning atomistic model across elements, temperatures and pressures. Preprint at https://doi.org/10.48550/arXiv.2405.04967 (2024).10.48550/arXiv.2405.04967 ↗
36. Reiser, P. et al. Graph neural networks for materials science and chemistry. Commun. Mater. 3, 93 (2022).10.1038/s43246-022-00315-6 ↗
37. Vaswani, A. et al. Attention is all you need. In Proc. 31st International Conference on Neural Information Processing Systems (Curran Associates Inc., 2017).
38. Lecun, Y., Bottou, L., Bengio, Y. & Haffner, P. Gradient-based learning applied to document recognition. Proc. IEEE 86, 2278–2324 (1998).10.1109/5.726791 ↗
39. Kingma, D. P. & Welling, M. Auto-encoding variational bayes. In Proc. 2nd International Conference on Learning Representations (2014).
40. El, B., Choudhury, D., Liò, P. & Joshi, C. K. Towards mechanistic interpretability of graph transformers via attention graphs. Preprint at https://doi.org/10.48550/arXiv.2502.12352 (2025).10.48550/arXiv.2502.12352 ↗
41. Lepikhin, D. et al. Gshard: scaling giant models with conditional computation and automatic sharding. In Proc. 34th International Conference on Neural Information Processing Systems (Curran Associates Inc., 2020).
42. Ponce, A., Aguilar, J. A., Tate, J. & Yacamán, M. J. Advances in the electron diffraction characterization of atomic clusters and nanoparticles. Nanoscale Adv. 3, 311–325 (2021).10.1039/D0NA00590H ↗
43. Mu, X., Gillman, C., Nguyen, C. & Gonen, T. An overview of microcrystal electron diffraction (MicroED). Annu. Rev. Biochem. 90, 431–450 (2021).10.1146/annurev-biochem-081720-020121 ↗
44. Jain, A. et al. Commentary: the materials project: a materials genome approach to accelerating materials innovation. APL Mater. 1, 1002 (2013).10.1063/1.4812323 ↗
45. Fedus, W., Zoph, B. & Shazeer, N. Switch transformers: scaling to trillion parameter models with simple and efficient sparsity. J. Mach. Learn. Res. 23, 120 (2022).