arXiv:2609.01076cond-mat.mtrl-sciSep 2026

Manuscript Offprint

arXiv:2609.01076

Text-guided flow matching enables sample-efficient crystal structure generation

Wentao Li

Abstract

Crystal generators can now propose periodic structures, but their control interfaces remain poorly matched to the mixed descriptors used in materials design. Text provides a compact way to combine composition, symmetry, prototype and property cues, yet it has not been clear whether such information can steer flow-based crystal generation. Here we introduce TFMat, a text-conditioned flow-matching framework that uses structured materials language as a semantic prior for a CrystalFlow generator. Across Perov-5, Carbon-24 and MP-20 crystal structure prediction benchmarks, TFMat improves one-candidate match rates over CrystalFlow and reaches a 92.04% MP-20 match rate with 20 candidates; in de novo generation, it improves element-count and density distribution alignment while retaining coarse property consistency in composition-selected outputs. These results position structured text as an inspectable control layer for translating human-readable materials intent into candidate crystals for downstream simulation and validation.

Introduction

Generative modeling has changed the computational search for crystalline materials from enumerating known prototypes to proposing new periodic structures under chemical and functional constraints. The opportunity is large because stable crystals occupy a sparse subset of an enormous space of compositions, lattices and atomic arrangements. 1^{1} High-throughput materials databases and community benchmark tools now provide the infrastructure for data-driven crystal design, 2−10^{2-10} while graph neural networks and large-scale discovery pipelines have shown that learned atomic environments and interatomic representations can support accurate structure-property modeling. 11−18^{11-18} The most useful generative model must therefore do more than populate a benchmark distribution: it must respond to the kinds of constraints that define an actual materials question. Such control becomes especially important when candidate structures must be ranked, relaxed and interpreted across downstream computations. The remaining challenge is not simply to generate valid crystals, but to make generation controllable in the language of materials design.

Recent crystal generative models have addressed this challenge mainly by strengthening the geometric model. Conditional graph generators and physics-guided adversarial models established that chemical and symmetry constraints can improve validity, 19−21^{19-21} and diffusion or flow-based methods then made it possible to jointly model periodic coordinates, lattices and atom types. 22−27^{22-27} Other approaches introduced autoregressive crystal strings, language-model base distributions and large-scale property-conditioned diffusion. 28−30^{28-30} Together these methods have clarified how to respect periodic geometry, but their control variables are often chosen for algorithmic convenience rather than for expressiveness. This gap is methodological as much as architectural, because realistic constraints rarely arrive as isolated labels. In parallel, materials natural-language processing has shown that chemical entities, synthesis recipes and property relations can be extracted from text using parsers, word embeddings and scientific language models. 31−38^{31-38} These advances suggest that crystallographic metadata and language representations could become a shared control layer between human hypotheses, databases and generative models.

This control layer is still underdeveloped. Most crystal generators are unconditional, conditioned only on composition, or driven by a small number of scalar labels. Such inputs are convenient for benchmarks, but they compress materials intent into a narrow representation: a scientist may know a formula, prototype family, space-group tendency, stability range and electronic-property expectation simultaneously, and these descriptors are often mixed across structured database fields and written descriptions. Text-guided diffusion models such as TGDMat and Chemeleon have recently shown that prompt representations can influence periodic materials generation, 39,40^{39,40} and FlowLLM has explored language models as base distributions for flow-based generation. 29^{29} However, it remains unclear whether a compact, frozen materials-language prior can improve a continuous crystal flow without replacing its geometric backbone. This is a more stringent question than adding another conditioning channel: if language merely repeats formula labels, its apparent benefit may reflect reconstruction from highly informative metadata rather than useful semantic control. The distinction matters for closed-loop and agentic materials workflows, where autonomous systems must translate research intent into candidates, pass them to simulation or synthesis modules, and keep the decision trail legible to researchers. 41−43^{41-43} A useful text interface should therefore improve sample-efficient structure recovery now, expose where prompt information is most helpful, and remain honest about the boundary between controlled generation and open-ended discovery.

Here we introduce TFMat, a text-guided extension of CrystalFlow designed to test that premise directly. TFMat keeps the flow-matching crystal generator as the central geometric model and adds a condition vector obtained from frozen MatSciBERT embeddings of structured materials prompts. The prompts are database-derived rather than free-form instructions; they include formula or composition information, symmetry descriptors and selected scalar properties, but not lattice vectors or fractional coordinates. This design isolates the contribution of the text prior more cleanly than replacing the entire generator, while keeping the task close to metadata-rich settings encountered in materials databases. We evaluate TFMat in composition-fixed crystal structure prediction (CSP) and text-conditioned de novo generation (DNG). In CSP, TFMat improves one-sample match rates over CrystalFlow on Perov-5, Carbon-24 and MP-20, with the largest gains on the constrained perovskite and carbon-network benchmarks, and the MP-20 gain persists under a 20-candidate evaluation budget. In DNG, TFMat does not dominate every validity metric, but it improves element-count and density distribution alignment and retains coarse formation-energy and band-gap cues in a composition-selected diagnostic subset. These results support a bounded conclusion: structured language descriptors can bias a flow-based crystal generator towards more relevant regions of crystal space, providing a practical interface for future materials discovery pipelines.

References (52)