Operando and in-situ powder X-ray diffraction can yield hundreds or thousands of patterns as a material charges, heats, or changes phase. Refining each pattern independently offers flexibility, but weak peaks can produce noisy structural trajectories. Xiangyu Yin and colleagues address this challenge with diffPXRD, a PyTorch engine that automatically differentiates the complete diffraction calculation and can fit a shared structural model directly to an entire measured series.
The contribution extends beyond automatic differentiation. The engine includes lattice and atomic variables, instrumental and sample corrections, peak broadening, batched CPU or GPU evaluation, and gradients for optimization. The authors compare diffPXRD with GSAS-II on 200 crystal structures, nine instrument and sample configurations, and all seven crystal systems. All 1,800 comparisons pass the predefined checks for reflection lists, positions, intensities, and profiles. In a measured CuCr2O4 series, the refined oxygen positions agree within 0.0016 A across 17 patterns, while the weighted profile R-factors differ by no more than 0.02 percentage points.
Batching reduces computational cost without requiring patterns to share parameters. At a batch size of 32, the median GPU speedup for the loss and gradient used in refinement is 7.4 relative to the tested four-thread CPU. For a single complete pattern, the devices perform comparably for many structures, while the CPU is faster for most small structures. The GPU is faster for every tested structure with more than 500 peaks, and its median speedup is nearly fourfold for the largest fifth of the 200-structure set. Hardware and workload therefore matter more than any general claim that GPUs are always faster.
Parameter sharing addresses a separate problem: instability when individual patterns contain little information. For an operando nickel-cobalt-aluminum oxide cathode series, the authors model the lattice parameter c using separate cubic B-splines for charge and discharge. Twelve coefficients per branch replace one independently fitted lattice value for each of 239 patterns. Across 20 noisy realizations retaining 10% of the measured photon counts on average, the root-mean-square repeat-to-repeat standard deviation of c decreases from 0.00340 to 0.00107 A, a reduction of 68.4%, while the joint fit maintains agreement with the original profiles. On four CPU threads, median analysis times are 7.85 s for joint fitting, 8.22 s for batched framewise fitting, and 59.33 s for serial framewise fitting.
The same framework tests whether a shared model predicts data excluded from fitting. For lithium-sulfur cycling, a kinetic model is fitted to the Li2S 200 reflection in cycles 1-4, then evaluated on later cycles and the unfitted 111 reflection. With 10% count retention, the shared models achieve a median Pearson correlation of 0.90 with published 111 integrated areas, compared with 0.83 for framewise fitting across 20 realizations. Their scaled root-mean-square differences are similar: 0.36 for the kinetic model and 0.34 for framewise fitting. The benefit is thus greater stability and correlation under weak signal, not consistently lower error.
This distinction is important for inverse problems in materials characterization. A smoother trajectory may reflect the imposed constraint rather than lower measurement uncertainty. The authors explicitly distinguish batching, which improves speed, from parameter sharing, which imposes relationships across measurements. They also evaluate held-out patterns, reflections, cycles, and temperatures—an important safeguard when multiple structures can explain similar diffraction profiles or when parameters are correlated.
The limitations define the scope in which the method can be used. diffPXRD currently supports constant-wavelength X-ray diffraction with symmetric pseudo-Voigt, Thompson-Cox-Hastings, and Finger-Cox-Jephcoat-corrected profiles. Time-of-flight, magnetic diffraction, stacking-fault models, and grazing-incidence geometry are unsupported. Reflection identities and the space group remain fixed during differentiation, so a first-order transition involving phase coexistence requires an explicit second phase. The reduced variability in the cathode example reflects the smooth shared model; it is not a direct estimate of experimental uncertainty. This preprint demonstrates computational analysis, not certification of a battery material or diffraction instrument.
Proposed ten-business-day pilot
This proposed reproduction and hold-out study has not been performed. It makes no claim of new results, experimental validation, novelty, or a guaranteed manuscript.
- Days 1-2 - Freeze the evidence and environment. Pin arXiv:2610.28564v1, the diffPXRD repository commit, the published nickel-cobalt-aluminum oxide dataset, the 239-pattern 003-reflection window, units, the four-thread CPU configuration, and optimizer settings. Record the 191 training and 48 omitted patterns before fitting. Predeclare the acceptance metrics: lattice-parameter error in A, weighted profile R-factor, repeat-to-repeat standard deviation in A, held-out profile loss, wall time, and peak memory.
- Days 3-4 - Reproduce the forward-model baseline. Recalculate a bounded subset of the authors' GSAS-II comparisons and verify reflection positions, integrated intensities, profiles, and automatic-differentiation gradients against central finite differences. Use serial framewise GSAS-II-style refinement as the primary baseline, and retain a simple independent peak-position fit as a deliberately lower-fidelity check.
- Days 5-6: reproduce the operando comparison. Fit the 239-pattern cathode series using serial framewise, batched framewise and joint spline models. Keep the charge and discharge branches separate, with 12 coefficients per branch. Generate paired lower-count realizations using fixed random seeds, and test whether the reported change from 0.00340 to 0.00107 A can be reproduced within a predeclared numerical tolerance.
- Days 7-8: validate independently. Use a separate script, environment or reviewer to reconstruct c from the refined peak positions and recompute all timing and variability metrics from the raw outputs. Evaluate the 48 omitted patterns, repeat the analysis with 8 and 10 spline coefficients per branch, and compare the results with one alternative noise-realization set without retuning the acceptance thresholds.
- Days 9-10: quantify sensitivity and package the results. Report absolute and relative deviations from the published values, held-out loss, sensitivity to spline complexity and count retention, runtime, and memory. Deliver pinned environments, input hashes, random seeds, command lines, raw refinements, validation scripts, and one command that regenerates every table and original pilot figure. Keep reproduced paper values distinct from any new pilot observations.
Proceed to a manuscript-scale study only if the forward profiles and gradients agree independently, the held-out patterns show no material loss of predictive quality, the variability reduction withstands the spline and noise sensitivity checks, and the full evidence package can be reproduced from pinned inputs.
Source: Xiangyu Yin et al., "Differentiable powder X-ray diffraction enables analysis of evolving structures," arXiv:2610.28564v1, submitted 20 October 2026, DOI: 10.48550/arXiv.2610.28564. Article license: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International, https://creativecommons.org/licenses/by-nc-sa/4.0/.
Figure: Original independent schematic by Ricardo Fitas/LUMEN, 21 October 2026. It is not copied, traced or adapted from the paper. Numerical annotations reproduce values reported in the paper text and are attributed to Yin et al. (2026). No paper figure is reused because the article's NonCommercial condition was not considered sufficient authorization to reuse a figure on a professional website.