A self-learning scientific agent for X-ray diffraction

Bin Cao, Huichi Zhou, Runyu Yang, Jingsong Li, Shuchen Sun, Yan Song, Hanyu Gao, Zhongwei Yu and 2 others

The Hong Kong University of Science and Technology (Guangzhou) · University College London · AI Lab, The Yangtze River Delta · Institute of Automation, Chinese Academy of Sciences

Published October 6, 2026 · on the feed October 8, 2026 · ▲ 14 · arXiv 2610.07862

The abstract

A central challenge for scientific agents is to turn analytical experience into reusable expertise grounded in physical evidence. Here we introduce Gan Jiang, a self-learning agent for powder X-ray diffraction built on a diffraction-analysis ecosystem we developed: XMatcher, XQueryer, XDecomposer and WPEM. Together, these engines span phase identification, multiphase decomposition and physics-constrained whole-pattern modelling. Gan Jiang converts analytical experience into executable skills by diagnosing failures, revising skill instructions and code, and validating revisions before reuse, without retraining the language model or changing the underlying physical models. Skills selected using development data and frozen before held-out evaluation achieve higher refinement scores than the original expert-designed skills across FullProf, GSAS-II and PyWPEM. The agent resolves strongly overlapping reflections, quantifies a five-phase ancient Egyptian cosmetic, tracks lattice evolution in an operating battery and compares atomic configurations in a disordered oxide catalyst. On DeltaXRDbench, it leads the evaluated methods in single- and multiphase identification across simulated and experimental data. Without supplied composition, single-phase top-1 accuracies reach 96.30\%, 81.78\% and 40.83\% on MP500, RRUFF and opXRD, respectively, compared with 58.00\%, 58.47\% and 26.45\% for the strongest comparator. These results demonstrate how an integrated scientific tool ecosystem can support agents that extract structural knowledge from measurements while accumulating validated analytical expertise that transfers to new samples.

The Brief

3:00

A short podcast summary of the paper. Written and voiced by AI.

Transcript

A self-learning scientific agent for X-ray diffraction. By Bin Cao and nine others, from the Hong Kong University of Science and Technology, Guangzhou, University College London, and two other institutions. Published on the sixth of October. Its code repository is public and real: about thirty source files.

Scientific agents face a central challenge: turning analytical experience into reusable expertise that stays grounded in physical evidence. An agent that solves one analysis and then forgets how has learned nothing it can carry to the next sample. And expertise that drifts away from the measurements is not expertise at all. Powder X-ray diffraction is the domain chosen here, and the work pairs an agent with a set of analysis engines so that whatever it learns is tied to the physics of the pattern being measured.

The agent is called Gan Jiang, and it is self-learning. It sits on top of a diffraction-analysis ecosystem the authors built themselves, made of four engines: XMatcher, XQueryer, XDecomposer and WPEM. Between them these cover phase identification, multiphase decomposition, and whole-pattern modelling constrained by physics.

What makes Gan Jiang self-learning is how it handles its own failures. It converts analytical experience into executable skills by diagnosing what went wrong, revising the skill's instructions and code, and validating each revision before it is reused. None of this retrains the language model, and none of it changes the underlying physical models. The learning lives in the skills. That separation has a practical meaning. The physics stays fixed and trusted, the language model stays as it was, and what accumulates is a library of procedures that have each been checked before being used again.

In one test, skills were selected using development data and then frozen before held-out evaluation. Those learned skills achieve higher refinement scores than the original expert-designed skills across FullProf, GSAS-II and PyWPEM. The agent is also shown on demanding cases: resolving strongly overlapping reflections, quantifying a five-phase ancient Egyptian cosmetic, tracking lattice evolution inside an operating battery, and comparing atomic configurations in a disordered oxide catalyst.

On DeltaXRDbench, it leads the evaluated methods in single-phase and multiphase identification, across both simulated and experimental data. Without being given the composition, its single-phase top-one accuracy reaches ninety-six point three percent on MP500, against fifty-eight percent for the strongest comparator.

On RRUFF the figures are eighty-one point seven eight percent against fifty-eight point four seven. On opXRD they are forty point eight three percent against twenty-six point four five.

The authors present these results as showing how an integrated ecosystem of scientific tools can support agents of a particular kind: ones that extract structural knowledge from measurements while also accumulating validated analytical expertise. The frozen-skill comparison is the part that speaks to the second half of that claim, since it asks whether what was learned transfers to new samples.

More with an account

Listen to every day’s papers

Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.

Join free
KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.