Back to Rankings

An End-to-End Differentiable Forward Model for High-Energy Diffraction Microscopy

Hemant Sharma, Nina Andrejevic, Simon Zhang, Mathew Cherukara

Jul 30, 2026arXiv:2607.28843v1
cond-mat.mtrl-sci
Share
Scorecard· 16/16
6.5/10 impact

A rigorous, reproducible, first-in-domain differentiable forward model that lowers a real barrier for the HEDM community, tempered by moderate conceptual novelty and a specialized audience with headline applications deferred to future papers.

Abstract

High-Energy Diffraction Microscopy (HEDM) recovers crystallographic orientation, strain, and grain position from rotating-crystal X-ray diffraction patterns. Existing forward models in far-field (FF), near-field (NF), and point-focused (pf) HEDM are not differentiable, which forecloses gradient-based joint parameter refinement, physics-informed regularisation, and Bayesian uncertainty quantification. We present the first end-to-end differentiable HEDM forward model covering all three geometries, implemented in PyTorch with pixel-exact agreement against the established MIDAS reference simulators (162/162 FF, 2304/2304 NF including a non-zero detector-tilt sweep, and 1088/1096 pf-HEDM spots matched). Three demonstrations validate the framework: joint orientation-strain-position recovery in NF-HEDM at ~6 nm precision; round-trip refinement on a real 214-grain alpha-Ti FF-HEDM dataset reaching 100% grain recovery from a 1.5 degree initial perturbation with residuals matching the production fit to 0.3%; and joint refinement of all per-detector geometry parameters and per-grain state on a synthetic four-panel FF-HEDM setup, recovering panel rotations about the beam axis to ~10 mu-rad and a global rotation-axis wedge to ~26 mu-rad. The framework is released as the open-source midas-diffract package (pip install midas-diffract).

AI Impact Assessments

(1 models)

Scientific Impact Assessment

Core Contribution

This paper delivers the first end-to-end differentiable forward model for High-Energy Diffraction Microscopy (HEDM), spanning all three principal geometries—far-field (FF), near-field (NF), and point-focused (pf-HEDM)—in a single unified PyTorch implementation. The central problem it solves is longstanding: every production HEDM code (MIDAS, HEXRD, ImageD11, hexomap) implements the forward model in non-differentiable C/C++, foreclosing gradient-based joint refinement, physics-informed regularization, and Bayesian uncertainty quantification. The key achievement is that differentiability is obtained *without sacrificing pixel-exact agreement* with the validated C reference simulators—a non-trivial constraint, since the community's entire analysis toolchain is calibrated against those conventions. The authors also release the work as a pip-installable open-source package (`midas-diffract`).

Methodological Rigor

The validation is unusually thorough for a methods paper. Cross-code agreement is demonstrated to floating-point precision (162/162 FF spots, 2304/2304 NF pixels including a detector-tilt sweep, 1088/1096 pf-HEDM spots), with the eight unmatched pf-HEDM spots traced precisely to a legitimate branch-selection degeneracy near |η|=0°/180°—not a bug. Gradient correctness is verified against finite differences across step sizes, with careful explanation of where finite-difference references (not the autograd gradients) break down at validity-mask boundaries. The numerical-substitution strategy (torch.where for branching, clamped arccos, Newton–Schulz SO(3) projection to avoid ill-defined SVD gradients, straight-through estimators for pixel rounding) reflects genuine expertise in converting production physics code to autograd-compatible form. Demonstrations include real 214-grain α-Ti data at 1-ID-E, basin-of-convergence sweeps on both synthetic and real data, and a compelling multi-panel joint geometry+grain refinement where a diagnosed 50× gradient-magnitude imbalance is resolved via an Adam warm-up. This is careful, honest work that anticipates alternative explanations.

Potential Impact

HEDM is a workhorse non-destructive 3D characterization technique deployed at synchrotron facilities worldwide (APS, CHESS, ESRF). By supplying a differentiable substrate, this work potentially unlocks a class of inference methods foreclosed for two decades: sub-voxel grain mixtures, microstructure priors, Bayesian HEDM, temporal 4D tracking, and coupling to differentiable crystal-plasticity FEM. Two demonstrated capabilities are individually valuable: the first automated NF-HEDM detector auto-calibration (NF produces no powder rings, so conventional calibration fails), and single-flow multi-panel geometry+grain refinement recovering panel rotations to ~10 μrad. The explicit positioning as a foundation for a series of forthcoming papers signals a deliberate building-block strategy.

Timeliness & Relevance

The paper rides a clear wave—differentiable physics has recently matured in adjacent synchrotron modalities (ptychography via Pty-Chi, XRF via MapsTorch, cryo-EM via CryoDRGN). HEDM was one of the last major diffraction techniques without this transition. The APS upgrade's higher grain counts and sub-second feedback targets make GPU-native differentiable pipelines a structural necessity rather than a convenience, strengthening timeliness.

Strengths & Limitations

Strengths: exemplary validation, unified cross-geometry framework, real-data demonstration at parity-or-better with the production MIDAS fit (η residuals 14.7% tighter, position 39% tighter), open-source reproducibility with scripts for every figure, and clear, well-organized writing. The paper is also candid about limitations.

Limitations: The point-source intensity model reproduces peak *positions* exactly but cannot represent partial illumination or volume-intersection peak shapes that xrd_simulator captures—a real fidelity gap for some use cases. Many of the most exciting applications (Bayesian HEDM, CPFEM coupling, sub-voxel mixtures) are deferred to unpublished follow-ups, so this paper delivers the substrate plus proof-of-concept demonstrations rather than transformative scientific results. Several demonstrations are single-grain or synthetic. The conceptual novelty is moderate: the autograd-on-physics paradigm is well established; the contribution is its careful, first-time transfer to the combinatorially harder HEDM regime (spot indexing, branch selection, fundamental-zone symmetry) with pixel-exact fidelity. The immediate audience is a specialized subfield, tempering breadth.

Overall

A rigorous, well-executed, genuinely useful foundational tool paper that lowers a real barrier for a specialized but globally deployed community. Its impact will likely be steady adoption and extension within the HEDM/synchrotron materials community rather than field-redefining breakthrough, with strong reproducibility and foundationality supporting downstream reuse.

Rating:6.5/ 10
Significance 7Rigor 8.5Novelty 6.5Clarity 8.5

Generated Aug 3, 2026

Comparison History (0)

No comparisons yet.