PXRD-Diff: Machine Learning in Conditional Diffusion for Powder Diffraction Inversion
PXRD-Diff: Machine Learning in Conditional Diffusion for Powder Diffraction Inversion
Tuesday, September 29, 2026
Powder X-ray diffraction (PXRD) is the workhorse characterization technique of solid-state chemistry, yet inverting a 1D powder pattern to a 3D crystal structure remains an open problem. Recent generative approaches (DiffractGPT, Crystalyze) report encouraging numbers but use very different evaluation protocols, and the literature contains few published failure modes that practitioners can use to calibrate expectations. I worked on a method called PXRD-Diff, a 3.7 M-parameter conditional denoising diffusion model that takes a simulated Cu Kα PXRD pattern as input and generates fractional coordinates and lattice parameters jointly, conditioned on the known composition. The model combines a 1D ResNet PXRD encoder, a periodic-distance message-passing denoiser with multi-resolution PXRD cross-attention, and, as the central physics-informed contribution, a differentiable Bragg structure-factor module that supplies an auxiliary "predicted-pattern matches input-pattern" loss. We train on the canonical CDVAE MP-20 split (≤20 atoms/cell, 27 k train / 9 k test) and report a careful 7-condition ablation. Three findings stand out. (1) A naive ε-prediction denoiser conditioned on the true lattice never escapes the random baseline on lattice prediction, because the lattice head is fed the *clean* lattice rather than the lattice it is being asked to denoise; passing the noisy lattice as input drops lattice loss by 95 %. (2) Switching from ε-prediction to x₀-residual prediction lifts the StructureMatcher match rate by 3.5× over the ε baseline. (3) Two seemingly attractive extensions, Wyckoff-site embeddings and an auxiliary distance-matrix loss, fail to improve on (2) and, in combination, actively hurt it. The best configuration recovers 2.5 % of MP-20 test structures (StructureMatcher, true-lattice coord-only setting; 1.2 % full-pipeline). This is far from solving the inverse problem, but the architectural recipe and the catalogue of what did not work are concrete, reproducible, and could be useful for future references.
