Discovering Crystal Structure Prediction Algorithms with an AI Co-Scientist

Kiyoung Seong, Nayoung Kim, Sungsoo AhnarXiv 2026 · arXiv

TL;DR

The Human-AI Co-discovery system (HACO) bridges the gap between autonomous code execution and genuine scientific discovery by successfully transferring a core machine learning principle from computer vision to materials science. Guided by sparse human steering, HACO discovered MaskGXT, a discrete masked generative transformer that sets a new state-of-the-art in crystal structure prediction (CSP) and significantly improves the discovery of diverse crystal polymorphs.

What Problem Does This Paper Address?

Crystal Structure Prediction (CSP)—predicting the stable 3D arrangement of atoms given only a chemical composition—is a foundational challenge in materials discovery. Crystals are highly complex, bound by strict geometric constraints: they are periodic (repeating in space), their coordinates exist on a torus, and they possess specific space group symmetries. Furthermore, a single chemical composition can form multiple distinct structures, known as polymorphs (e.g., diamond vs. graphite for carbon).

While existing AI engineering agents excel at optimizing hyperparameters or tweaking existing domain-specific code, they rarely discover entirely new modeling paradigms. The authors address a stricter question: Can an AI co-scientist, working with minimal human domain guidance, cross-pollinate ideas from unrelated machine learning fields to build a state-of-the-art algorithm in a mature scientific domain?

Methods

The authors developed HACO (Human-AI Co-discovery system), an evolutionary, tree-based search framework driven by a Large Language Model (Claude Opus 4.7) acting as an orchestrator.

HACO tree-based search and orchestration loop with human intervention

Instead of iterating on standard continuous diffusion or flow-matching models typically used in CSP, HACO executed a cross-domain transfer. It identified MaskGIT—a masked generative model originally designed for computer vision—as a promising framework, adapting it into a novel architecture called MaskGXT (Masked Generative Crystal Transformer).

MaskGXT operates by tokenizing a crystal into a discrete sequence:

  • Symmetry & Lattice: One space group token and six quantized lattice tokens (lengths and angles).
  • Atom Sites: Three quantized coordinate tokens, a Wyckoff position token, and an atom-type token per site.

To make this vision-based discrete framework respect the laws of physics and chemistry, HACO implemented several key domain adaptations under high-level human steering:

  1. Periodic Ordinal Label Smoothing: Ensures the model understands that coordinate bin $0$ is adjacent to the final bin on a circular torus.
  2. Sub-bin Coordinate Refinement: A lightweight regression head that predicts a continuous offset ($\pm$ half a bin width), preventing geometric precision from being limited by the discretization grid.
  3. Space Group Stratified Sampling: Instead of random sampling, the model explicitly predicts the space group posterior first, allowing it to deliberately branch out and capture diverse polymorphs.
Research trajectory towards MaskGXT showing the optimization process over trials

Datasets

The system was trained and evaluated on standard inorganic crystal benchmarks:

  • MP-20: Materials Project data containing structures with up to 20 atoms per unit cell.
  • MPTS-52: An extended, more challenging dataset containing up to 52 atoms per cell, split chronologically by publication year.
  • MP-20 Polymorph Split: A specialized split where all polymorphs of a given composition are kept within the same subset, explicitly testing the model's ability to recover multiple structural variations for a single formula.

Key Insights and Ideas

  • Cross-Domain Transfer is Viable for Science: The breakthrough didn't come from making incremental changes to existing crystal diffusion models, but from recognizing that a masked token-reconstruction approach from computer vision could map effectively onto crystal structures.
  • Discretization Beats Continuity (with a catch): Continuous generative models (like diffusion) often struggle with exact symmetry constraints and require expensive iterative integration. Discretizing coordinates allows for confident, greedy decoding. Crucially, adding a continuous regression "fine-tuning" head (sub-bin refinement) recovers the lost geometric precision without sacrificing the stability of discrete token prediction.
  • The Power of Sparse Steering: Humans do not need to write the code. By providing high-level conceptual objectives (e.g., "recover sub-bin precision" or "spread draws across polymorphs"), the human acts as a strategic guide while the AI agent handles implementation, testing, and refinement.

Key Results

MaskGXT achieved state-of-the-art performance across all evaluated benchmarks, outperforming established diffusion and flow-matching baselines:

  • Polymorph Recovery: On the MP-20 polymorph split, MaskGXT achieved a 79.06% Match-Everyone-to-Reference (METRe) accuracy, substantially outperforming the strongest baseline, Crystalite (70.87%).
  • Standard CSP Performance:
  • MP-20: Reached a 73.79% unfiltered match rate (compared to 69.64% for Crystalite).
  • MPTS-52: On the harder, larger-atom dataset, it achieved a 36.75% match rate, significantly clearing the baseline's 27.26%.
  • Geometric Precision: MaskGXT achieved the lowest matched-pair Root Mean Squared Error (RMSE) on both datasets (0.0330 on MP-20; 0.1004 on MPTS-52), proving that discretization did not compromise spatial accuracy.

Limitations and Future Work

Despite its success, the authors highlight several boundaries for AI co-scientists:

  • Human Attention Bottleneck: The agent generates massive amounts of raw data, logs, and failed code variants. Future iterations need to maintain a compact, high-level "research state" that summarizes insights for the human collaborator rather than flooding them with raw outputs.
  • Proxy Evaluation Limits: HACO evaluates candidate algorithms using short, low-compute training runs (e.g., 2 hours). This setup inherently penalizes complex architectures that require longer training cycles to converge. Developing better scaling-law predictors is an open challenge.
  • Moving Beyond Metrics: Currently, the agent is strictly driven by optimizing a validation metric. True scientific discovery requires exploratory capabilities, such as mapping failure modes and autonomously designing analytical experiments.

Summary updated

Abstract

We introduce Human-AI Co-discovery system (HACO) for scientific algorithm discovery through cross-domain search and sparse human steering. Starting from the goal of generating crystal structures from chemical compositions, HACO searched across generative modeling methodologies from multiple fields and identified MaskGIT, a masked generative model from vision, as a promising framework for crystal structure prediction (CSP). HACO instantiated this masked formulation as a discrete token model of crystal structure; guided by sparse high-level human objectives, it then added crystallographic symmetry tokens, space group stratified sampling for polymorph coverage, and sub-bin coordinate refinement, yielding the Masked Generative Crystal Transformer (MaskGXT). On the MP-20 polymorph split, MaskGXT reaches 79.06% match-everyone-to-reference (METRe) accuracy, compared with 70.87% for the strongest evaluated baseline. MaskGXT also attains the best match rate on standard MP-20 and MPTS-52 CSP benchmarks. These results provide evidence that, in domains offering cheap, fast, and well-aligned validation, transfer-guided interactive AI co-scientists can contribute to scientific algorithm discovery by identifying transferable modeling principles and combining them with targeted human domain guidance.
BibTeX
@misc{seong2026discovering,
  author = {Kiyoung Seong and Nayoung Kim and Sungsoo Ahn},
  title = {{Discovering Crystal Structure Prediction Algorithms with an AI Co-Scientist}},
  year = {2026},
  eprint = {2606.22866},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.22866},
}
Figure