Xtalyst AI for Science · 2026

Diagnosing and Narrowing the Simulation-to-Real Gap in Powder X-ray Diffraction

Calibrated end-to-end PXRD analysis — every number shipped with an honest uncertainty and a held-out check.
Shaoguang Wang1, Weiyu Guo1, Ben Fei2, Xiaohong Shao3, Zhihui Wang4,5, Wanli Ouyang2,4
1 HKUST (Guangzhou)  ·  2 The Chinese University of Hong Kong  ·  3 Suzhou National Laboratory
4 Shenzhen Loop Area Institute  ·  5 Dalian University of Technology
Manuscript in submission · 2026
TL;DR. Deep-learning PXRD systems are trained on simulated spectra but deployed on real measurements. Xtalyst diagnoses the resulting gap, shows it is structural, not additive noise, and locates a small rigid peak-position drift as its single largest correctable cause — peak-alignment alone more than doubles the median retrieval correlation on real spectra. The remainder is bridged inside a calibrated, multi-agent end-to-end pipeline that ships every number with a held-out check and a conformal uncertainty interval.
median retrieval correlation from peak-alignment
534
frozen held-out measured spectra
Calibrated
conformal uncertainty on every prediction
End-to-end
phase ID → refinement → property

Abstract

Powder X-ray diffraction (PXRD) analysis with deep learning is typically trained on simulated spectra, yet deployment happens on real measurements. Xtalyst diagnoses the resulting simulation-to-real gap, shows it is structural rather than additive noise, and locates a small rigid peak-position drift as its single largest correctable component — peak-alignment more than doubles the median retrieval correlation on real spectra. The remaining structure is bridged by real-spectrum fine-tuning and physics-based refinement inside a calibrated, multi-agent end-to-end pipeline spanning phase identification, full-profile Rietveld refinement, mass-fraction quantification, and conformal formation-energy prediction. On a frozen held-out set of 534 measured spectra, Xtalyst reproduces development performance where it is strong — every number reported with its sample size and a 95% Wilson confidence interval — and the calibrated-uncertainty layer recovers near-nominal coverage once recalibrated on real spectra.

The gap is structural, not additive noise

We test two hypotheses for the gap. Additive degradation — the kind a denoiser removes — is ruled out: a 1-D U-Net leaves the real-spectrum correlation essentially unchanged, even though the same network improves its synthetic task by +0.30. The gap is therefore structural. That structure is dominated by a small rigid peak-position drift between the simulated candidate lattice and the measured pattern: correcting it (peak-alignment) delivers the largest single gain among the strategies tested. Remaining structural effects — intensity redistribution and anisotropic lattice mismatch — are bridged downstream by physics refinement and real-spectrum fine-tuning.

Xtalyst: narrowing the gap end-to-end

Xtalyst wraps the diagnosis into a calibrated pipeline with a multi-agent control and reliability layer. The contribution is not the chaining of external tools: five models are trained or fine-tuned on real spectra, more than ten algorithms are self-developed, and the two integrated prior tools are modified, not copied.

The Xtalyst architecture: a real PbSO4 pattern flows through layered phase identification, coordinate-consistent Rietveld refinement, and a property/quantification/uncertainty stage, wrapped by a multi-agent control and reliability layer; components are colour-coded by provenance (self-trained on real spectra, self-developed, modified from prior tools, external as-is).
The Xtalyst architecture and component provenance. A real PbSO4 pattern flows through the three stages, colour-coded by provenance: self-trained on real spectra, self-developed, modified from prior tools, and external as-is.
Stage 1 · Phase ID

Layered, real-calibrated identification

XtalCS (a real-RRUFF fine-tuned crystal-system classifier) supplies a soft prior; a chemsys-exact retrieval is reranked by a peak-aligned reranker across tiers.

Stage 2 · Refinement

Coordinate-consistent Rietveld

Full-profile refinement (PyWPEM wrapped by a coordinate-consistency layer) that also resolves an axis-convention pitfall which can inflate a downstream energy comparison.

Stage 3 · Property

Quantification + calibrated uncertainty

CHGNet formation energy (best of 8 MLIPs benchmarked), NNLS quantitative phase analysis, and a distribution-free conformal interval on every energy.

Control & reliability layer. An LLM planner (schema-validated, with a deterministic fallback — no LLM output enters the physical computations) routes the chain. Three advisory agents (Polymorph, Size/Strain, Recommender) turn results into operator advice, and a reliability layer wraps the loop: Guardian (bounded replan), Scribe (provenance), and Phase-Guard (detection-limit checks).

Held-out validation at the 100+ scale

The headline evaluation is a frozen held-out partition of 534 spectra (from 2,696 ingested), used exactly twice across the whole study. The pipeline reproduces development performance where it is strong — every number reported with its sample size n and a 95% Wilson confidence interval.

Held-out metricValue95% CIn
XtalCS crystal-system top-149.4%[43.3, 55.5]251
Stage-1 phase ID (median peak-aligned r)0.609≈ dev 0.594254
Space group preserved on converged refinements100%127 / 127127
Conformal coverage @ α = 0.10 (real-spectrum recalib.)91.8%[80.4, 97.7]49
CHGNet formation-energy MAE vs DFT (best of 8 MLIPs)43.5 meV/atom307

Headline results are established on the frozen held-out partition rather than the development set; each predictive layer ships a distribution-free conformal interval, and production choices (CHGNet, NNLS, chemistry-aware retrieval) were selected by controlled, like-for-like comparison. The method's operating envelope is characterized through held-out validation and calibrated uncertainty rather than a single best-case number.

Citation

@article{Wang_Diagnosing_and_narrowing_2026,
  author  = {Wang, Shaoguang and Guo, Weiyu and Fei, Ben and
             Shao, Xiaohong and Wang, Zhihui and Ouyang, Wanli},
  journal = {Manuscript},
  title   = {{Diagnosing and narrowing the simulation-to-real gap in powder
             X-ray diffraction with an instrument-in-the-loop workflow}},
  year    = {2026}
}