Abstract
Whilst X-ray Absorption Near Edge Structure (XANES) spectroscopy is a valuable tool to unravel local atomic and electronic structure of catalysts' active sites under working conditions, its quantitative analysis is a complex ill-posed problem. Main limitations of currently existing methods for XANES quantitative analysis are (1) high demand of computational resources needed, (2) lack of universality of ML models between absorption edges, (3) absence of chemical and physical constraints, (4) low specificity for real catalytical cases. To address them simultaniously in an unified framework we introduce the DeepFit, a deep learning approach for physically and chemically informed on-the-fly XANES spectra analysis. By constructing the tmXAS—a comprehensive database of 67,000 possible local atomic environments and their corresponding Ab-initio K-edge XAS spectra for all 3d and 4d transition metals—we leverage a state-of-the-art universal deep learning model for rapid spectral prediction. This approach incorporates physical constraints through equivariance, ensuring consistency with fundamental symmetries. Then, combining quantum chemistry and DeepFit neural network differentiation, we implement an approach for chemically informed atomic structure refinement, capable of $3D$ structure prediction considering both spectroscopic and energetic favorability. Domain-specific spectroscopic solutions were put in the tmXAS database and DeepFit approach to better work with often overlooked in analysis methods and highly relevant cases of homogeneous and single-site/single-atom catalysts. The method's validity for both structure refinement and spectra prediction is rigorously demonstrated with several benchmarks, including structure unraveling of the Rh-complex homogeneous hydroformylation catalyst and well-defined 3d/4d metal coordination compounds (Cu, Co, Zn, Ni), where quantitative agreement with single-crystal XRD and EXAFS is met. By unifying physical constraints with computational efficiency, DeepFit establishes a new universal method for rapid XANES analysis with chemical plausibility and spectroscopic agreement being systematically encoded into efficient gradient-driven optimization.



![Author ORCID: We display the ORCID iD icon alongside authors names on our website to acknowledge that the ORCiD has been authenticated when entered by the user. To view the users ORCiD record click the icon. [opens in a new tab]](https://www.cambridge.org/engage/assets/public/coe/logo/orcid.png)