When an X-ray beam reflects off a crystal, it paints a pattern of spots and streaks on a detector. If the crystal is perfect, the pattern is simple. But inside a real material, atoms are often shifted — compressed in some places, stretched in others. The pattern then looks like ripples from a stone thrown into water, and deciphering it by hand is nearly impossible.
The new neural network, Fourier ViT, looks at these ripples and immediately outputs a displacement map. It acts like a translator from the language of spots to the language of atomic shifts. Crucially, the network doesn't guess randomly; it sees the whole pattern at once, the way a person recognizes a face in a photograph. So it doesn't get confused even when displacements are very large — more than half the interatomic distance.
On synthetic crystals with many domains, the network achieved the lowest error among all compared methods. On a real manganese oxide nanocrystal, it matched the best iterative algorithm but didn't depend on an initial guess. It's like assembling a puzzle without looking at the box and still getting the correct picture on the first try.
The X-ray pattern is simple again — because now it's read by a machine trained to see through the ripples.
A displacement of just half the interatomic distance makes the X-ray beam interfere in such a way that spots on the detector double. It's like an echo in the mountains: one shout returns as two voices.