Verifiable pXRD: Hill-climbing pXRD structure determination with LLM agents

Samuel Chen, Jiaru Bai, Austin Henry Cheng, Alan Aspuru-GuzikAI4Mat @ NeurIPS 2026

TL;DR

Determining a crystal's atomic structure from its powder X-ray diffraction (pXRD) pattern is a major bottleneck for self-driving materials labs. By framing pXRD structure determination as a verifiable search problem—just like math or coding—the authors show that an LLM agent equipped with scientific Python tools, crystallography software, and a 139-word learned skill can jump from 27% to 69% accuracy on a 200-problem benchmark, more than doubling the best specialist baselines. With inference-time scaling and an LLM verifier to gate extra compute, accuracy reaches 90% on a 20-problem panel at 59% lower token cost than naive resampling.

What Problem Does This Paper Address?

When scientists synthesize a new crystalline material, they often shoot X-rays at a powder sample and measure the resulting diffraction pattern—a 1D plot of intensity versus angle. The inverse problem is deceptively hard: given only the chemical composition, the X-ray wavelength, and that 1D pattern, reconstruct the exact 3D periodic arrangement of atoms (a Crystallographic Information File, or CIF).

While specialized generative models and global-search algorithms have been built for this task, they still struggle on complex, polymorphic, or out-of-distribution structures. Meanwhile, frontier LLMs have made huge leaps in math and coding because those domains are verifiable: checking a candidate answer is much easier than finding one. The authors ask: can we bring that same "generate–verify–update" hill-climbing loop to pXRD structure determination?

Methods

The paper exploits two forms of verifiability:

  1. Inference-time verifiability: Any proposed crystal structure can be forward-simulated to predict its diffraction pattern and compared against the measured pattern (using the weighted profile residual, $R_{\text{wp}}$).
  2. Evaluation-time verifiability: During benchmarking or training, a proposed structure can be compared against the known ground-truth structure using pymatgen's StructureMatcher.

Building on a fixed frontier model (GPT-5.6 Sol (high)), the authors construct a controlled agent-adaptation ladder:

  • Tool-free baseline (GPT-5.6 Sol (high)): A single API call with no tools or workspace.
  • matsci-codex: Places the model inside a stateful coding-agent harness with a scientific Python environment (NumPy, SciPy, pymatgen, ASE, spglib, PyXtal) and read-only access to a local Crystallography Open Database (COD) subset.
  • pxrd-codex: Adds dedicated crystallography software—GSAS-II and DICVOL14—to the agent's toolkit.
  • adapted-codex: Uses experience-driven self-evolution on a disjoint 50-problem curriculum. A "trainer" reviews the blind agent's trajectories against ground truth and distills a compact, frozen capability package: a 139-word skill and a neutral DICVOL14 tool adapter.

To push performance further without changing the agent, the authors apply inference-time scaling on a 20-problem panel: sampling up to 8 independent rollouts, using reference-blind $R_{\text{wp}}$ fitting to select the best candidate, and testing an LLM-verifier-gated continuation loop. In the gated loop, an LLM judge (whose prompt was evolved using GEPA) inspects each initial solve and decides whether to stop or continue with an evidence-conditioned retry or fresh solve.

Datasets

  • pXRD-Bench: A newly introduced suite of 200 simulated single-phase pXRD problems, split evenly into:
  • pXRD-100 (in-distribution): 100 Materials Project structures (30 Representative, 30 Challenge cases with rare symmetries or peak congestion, and 40 Polymorphs—same composition, different structures).
  • pXRD-ood (out-of-distribution): 100 novel structures certified against a 3.28-million-record public exposure index, separating compositional extrapolation (25 Substitution, 25 Ordered decoration) from topological extrapolation (25 Wyckoff enumeration, 25 Crystal search).
  • pXRD-Bench-20: A representative 20-problem subset of pXRD-Bench used for the inference-time scaling experiments.

Key Insights and Ideas

  • Scaffolding beats raw model priors: Giving a fixed LLM a stateful coding workspace and standard Python libraries (matsci-codex) nearly doubles its accuracy (27.0% to 52.0%). Coding agents can already orchestrate complex crystallographic workflows like cell indexing and Rietveld refinement via custom scripts.
  • Less is more in self-evolution: Allowing the trainer to endlessly patch every observed mistake led to sprawling, overfitted packages. Restricting adapted-codex to a minimal 139-word skill and a clean tool adapter yielded a 12-point jump (57.0% to 69.0%) that generalized to held-out problems.
  • Scalar $R_{\text{wp}}$ isn't everything: While lowest-$R_{\text{wp}}$ selection successfully picked the exact structure in all 18/20 solved cases during repeated sampling, there is no universal $R_{\text{wp}}$ cutoff that separates right from wrong. An LLM verifier that reads the solver's trace and checks physical plausibility makes more nuanced stop/continue decisions than a simple $R_{\text{wp}}$ threshold.

Key Results

  • Benchmarking on pXRD-Bench (200 problems): adapted-codex achieved 69.0% pass@1 (70.5% when counting declared alternatives), outperforming pxrd-codex (57.0%), matsci-codex (52.0%), tool-free GPT-5.6 Sol (high) (27.0%), and specialist baselines like PXRDGen (32.0%), Ab-PXRD-Solver (31.0%), and RealPXRD-Solver (30.5%)—even though PXRDGen and RealPXRD-Solver were given the oracle primitive-cell formula-unit count $Z$.
  • Inference-time scaling on pXRD-Bench-20: Repeated sampling (8 rollouts) pushed adapted-codex from 68.8% pass@1 to 90% (18/20) oracle recovery, and $R_{\text{wp}}$ ranking converted all 18 into top-1 predictions.
Repeated-sampling results on pXRD-Bench-20
  • Cost-efficient verification: Using LLM-verifier-gated continuations reached the same 18/20 (90%) recovery at a 59% lower token cost than naive 8-pass resampling.
Figure 3: Inference-time verifier accuracy and token-cost-scaled recovery. (a) Decisions on 200 adapted-codex pXRD-Bench trajectories. False stops are incorrect structures judged complete; false continues are exact struc- tures allocated another solve. The Rwp thresholds were selected retrospectively to match the two LLM policies’ false-stop counts. (b) Verifier-gated continuation framework plotted against the 8 independent adapted-codex Sol reruns. The eight independent reruns points are placed at expected token cost for k = 1, . . . , 8 rollouts. The verifier-gated curve shows cumulative recovery after cumulative token cost following the initial blind pass, a coverage-directed continuation, and two verifier-authorized fresh solves.

Limitations and Future Work

The authors note an important gap between benchmark success and real-world crystallography: pXRD-Bench evaluates single-phase, simulated patterns against a single ground-truth CIF. In reality, pXRD often constrains a family of structures (due to site disorder, partial occupancies, or subtle symmetry lowering) rather than a unique solution, and experimental data can be noisy and multiphase. Moving forward, the authors argue that the frontier lies in posing these richer, real-world characterization challenges—such as predicting posterior distributions over structures or deconvolving multiphase mixtures—as verifiable tasks.

Summary updated

BibTeX
@inproceedings{chen2026verifiable,
  author = {Samuel Chen and Jiaru Bai and Austin Henry Cheng and Alan Aspuru-Guzik},
  title = {{Verifiable pXRD: Hill-climbing pXRD structure determination with LLM agents}},
  booktitle = {AI4Mat @ NeurIPS},
  year = {2026},
  url = {https://openreview.net/forum?id=qIdRYok3Vi},
}
Figure