TL;DR
LapidaryEngine is the first generative framework to enable fully conversational, multi-round crystal structure design directly from natural language. By introducing a textual "pivot representation" that bridges language models and geometric graph neural networks, it allows researchers to iteratively refine and edit crystal structures through intuitive, dialogue-like feedback.
What Problem Does This Paper Address?
Generative AI has made massive waves in materials science, but existing text-to-crystal models suffer from two major flaws: they require highly rigid, expert-level inputs (like exact chemical formulas or space groups), and they only work in one direction (text $\rightarrow$ crystal).
In the real world, materials discovery is rarely a one-shot process. Scientists usually start with a vague idea (e.g., "find a stable insulator") and refine it through trial and error. Because current models cannot translate a generated crystal structure back into text, they cannot handle interactive feedback or multi-round conversations. LapidaryEngine solves this by enabling a closed-loop, bidirectional workflow where users can progressively guide the AI using natural language.
Methods
The core innovation of LapidaryEngine is its pivot representation. Directly mapping ambiguous natural language to discrete, highly constrained 3D atomic coordinates is incredibly difficult, especially since no large datasets of conversational materials design exist.
Instead, the authors use a rule-based text generator called Robocrystallographer as an intermediate bridge. Because it is rule-based, the mapping between a crystal structure and its structural description is bijective (one-to-one). This allows the workflow to operate as follows:
- Interpretation: A Large Language Model (LLM) translates a user's vague prompt into a precise, rule-based structural description (the pivot).
- Generation: A Graph Neural Network (GNN)-based diffusion model (built on Chemeleon) generates candidate 3D crystal structures from this pivot description.
- Refinement: To optimize the output, the system uses a Best-of-$N$ sampling strategy, filtering candidates for physical validity (using the SMACT library for charge neutrality and checking atomic distances) and selecting the structure that best aligns textually with the prompt.
- Conversational Loop: When a user provides feedback (e.g., "increase the bandgap" or "replace strontium with calcium"), the system converts the previous crystal back into its pivot text, combines it with the feedback, and uses the LLM to update the description.
Crucially, instead of restarting generation from pure noise, subsequent rounds use a partially noised version of the previous structure (similar to image-to-image generation), ensuring the model modifies the existing design rather than starting from scratch.
Datasets
The GNN-based diffusion model was trained on the MEGNet dataset, which is a snapshot of the Materials Project database. The dataset was split into:
- Training: 60,000 samples
- Validation: 5,000 samples
- Testing: 4,239 samples
Textual descriptions for these crystals were automatically generated using Robocrystallographer to create the paired text-crystal training data.
Key Insights and Ideas
- Text-Space Pivot Bypasses Data Scarcity: By shifting the problem from a joint text-crystal space to a text-only pivot space, the framework fully exploits the editing and reasoning strengths of LLMs without requiring a massive dataset of human-AI design dialogues.
- Exploration vs. Exploitation Control: The authors found that the denoising strength parameter ($\alpha$) acts as a knob for creativity. Lower values force the model to make minor edits (exploitation), while higher values allow it to break away from the previous structure to discover entirely new configurations (exploration).
- Linguistic Descriptions Beat Direct File Generation: Attempting to make an LLM directly output raw Crystallographic Information Files (CIFs) performs poorly because LLMs struggle with precise 3D spatial coordinates. Keeping the LLM's output linguistic and letting a specialized GNN handle the geometry yields far more stable and physically plausible structures.
Key Results
The authors evaluated LapidaryEngine across both quantitative optimization tasks and qualitative editing tasks:
- Property Optimization: In multi-round feedback loops targeting stability (low formation energy) and large bandgaps, LapidaryEngine consistently outperformed baselines. For bandgap-focused generation, it achieved a 77.2% structural stability rate, vastly outperforming the "LLM-only" baseline which directly generated CIF files (50.2%).
- Uniqueness and Novelty: Across 1,000 generated samples, the model achieved 98.9% to 99.8% uniqueness and 100% novelty against the Materials Project database, proving it doesn't just regurgitate known structures.
- Crystal Editing: The model successfully executed complex, multi-step structural modifications from colloquial text, such as transforming a distorted perovskite structure ($\text{CaTiO}_3$) into a distortion-free version, and accurately adjusting lattice constants during elemental substitutions.
Limitations and Future Work
- Symmetry Constraints: The underlying structure generation module does not strictly enforce crystallographic symmetry. Consequently, most generated structures default to the lowest symmetry space group ($P1$), even if they roughly mirror higher symmetries. Integrating symmetry-aware diffusion models is a key next step.
- Surrogate Evaluation: To enable rapid feedback cycles during testing, the authors used machine learning models (CrystalFramer) as proxies to evaluate properties like bandgap and energy, rather than computationally expensive Density Functional Theory (DFT) calculations or physical experiments.
- Qualitative Demands: Real-world materials engineering often involves complex, subjective, or multi-property trade-offs that are difficult to fully capture in automated evaluation frameworks.
Summary updated