  X-ray free-electron lasers (XFELs) offer unique capabilities for measuring
the structure and dynamics of biomolecules, helping us understand the basic
building blocks of life. Notably, high-repetition-rate XFELs enable single
particle imaging (X-ray SPI) where individual, weakly scattering biomolecules
are imaged under near-physiological conditions with the opportunity to access
fleeting states that cannot be captured in cryogenic or crystallized
conditions. Existing X-ray SPI reconstruction algorithms, which estimate the
unknown orientation of a particle in each captured image as well as its shared
3D structure, are inadequate in handling the massive datasets generated by
these emerging XFELs. Here, we introduce X-RAI, an online reconstruction
framework that estimates the structure of a 3D macromolecule from large X-ray
SPI datasets. X-RAI consists of a convolutional encoder, which amortizes pose
estimation over large datasets, as well as a physics-based decoder, which
employs an implicit neural representation to enable high-quality 3D
reconstruction in an end-to-end, self-supervised manner. We demonstrate that
X-RAI achieves state-of-the-art performance for small-scale datasets in
simulation and challenging experimental settings and demonstrate its
unprecedented ability to process large datasets containing millions of
diffraction images in an online fashion. These abilities signify a paradigm
shift in X-ray SPI towards real-time capture and reconstruction.
