Discovery and recovery of crystalline materials with property-conditioned transformers
Cyprien Bone, Matthew Walker, Kuangdai Leng, Luis M. Antunes, Ricardo Grau-Crespo, Amil Aligayev, Javier Dominguez, Keith T. Butler
TL;DR
CrystaLLM-$\pi$ tackles the challenge of conditioning crystal-structure generation on continuous properties by introducing Property-Key-Value (PKV) Prefix and PKV Residual attention. The approach injects continuous property representations directly into transformer attention, preserving pre-trained crystallographic knowledge while enabling inverse design for structure recovery from XRD data and discovery of photovoltaic materials, validated by DFT. Key findings show attention-level conditioning yields robust performance across data regimes, that XRD-conditioned generation accelerates structure recovery, and that PV-focused generation can implicitly target optimal band-gap regions with compositionally novel candidates. The framework offers a lightweight, flexible pathway for inverse materials design, capable of leveraging large unlabeled datasets and targeted labeled data to map complex structure-property relationships.
Abstract
Generative models have recently shown great promise for accelerating the design and discovery of new functional materials. Conditional generation enhances this capacity by allowing inverse design, where specific desired properties can be requested during the generation process. However, conditioning of transformer-based approaches, in particular, is constrained by discrete tokenisation schemes and the risk of catastrophic forgetting during fine-tuning. This work introduces CrystaLLM-π (property injection), a conditional autoregressive framework that integrates continuous property representations directly into the transformer's attention mechanism. Two architectures, Property-Key-Value (PKV) Prefix attention and PKV Residual attention, are presented. These methods bypass inefficient sequence-level tokenisation and preserve foundational knowledge from unsupervised pre-training on Crystallographic Information Files (CIFs) as textual input. We establish the efficacy of these mechanisms through systematic robustness studies and evaluate the framework's versatility across two distinct tasks. First, for structure recovery, the model processes high-dimensional, heterogeneous X-ray diffraction patterns, achieving structural accuracy competitive with specialised models and demonstrating applications to experimental structure recovery and polymorph differentiation. Second, for materials discovery, the model is fine-tuned on a specialised photovoltaic dataset to generate novel, stable candidates validated by Density Functional Theory (DFT). It implicitly learns to target optimal band gap regions for high photovoltaic efficiency, demonstrating a capability to map complex structure-property relationships. CrystaLLM-π provides a unified, flexible, and computationally efficient framework for inverse materials design.
