LLMs stop guessing bandgaps: Motif turns them into chemistry taxonomies, cutting 2D perovskite OOD error from 0.122 to 0.111 eV
Synopsis
On 2D halide perovskite bandgap prediction, Motif moves the large language model from emitting numbers to generating chemical taxonomies offline, which then define environments for invariant feature selection. Across six leave-one-spacer-family-out folds, mean OOD MAE falls from the kNN+GBT baseline's 0.122 eV to 0.111 eV; under a frozen dev/test protocol the deployable configuration lowers electronic bandgap error from 0.123 to 0.117 eV and optical bandgap error from 0.181 to 0.173 eV.
Interpretation
The role of large language models in materials property prediction is reassigned: instead of outputting bandgap values, the model offline sorts spacer cations into chemically motivated groups, and those groups serve as the environments invariant learning needs. Earlier work mostly treated the model as a direct predictor, using retrieval, reasoning traces or self-correction to generate or revise numbers; under leave-one-spacer-family-out extrapolation such uses improved on the kNN+GBT baseline by less than 2% at best. Across 19 published LLM methods and more than 65 in-house variants, direct numerical use never beat the 0.122 eV kNN+GBT baseline, and the best prompt-based numerical predictor averaged about 0.46 eV error; only offline taxonomy annotation gave consistent gains.
Motif treats each taxonomy axis as a candidate environment, keeps only features whose relationship with the target is stable across groups, trains predictors inside that subspace, and admits a taxonomy only when training-only pseudo-OOD validation beats the baseline. Invariant learning usually assumes environments are given, yet real materials data rarely supply usable groupings; random partitions carry little information, while expert partitions are costly and often too coarse. The main benchmark is 753 compounds from the 2D halide perovskite database after filtering, split into six folds that each hold out one spacer family: short-alkyl, long-alkyl, phenyl, heterocyclic, cycloalkyl and special; each axis first passes a balance filter requiring the largest group to stay under 85% of training samples, leaving 7 to 9 usable taxonomies per fold.
The gains concentrate on the folds chemically farthest from training data rather than spreading evenly. On the cycloalkyl and phenyl folds the baseline's learned correlations transfer least well, and Motif's reduction over kNN+GBT is largest there; on the short-alkyl and special folds the baseline does better. Under the frozen protocol, the gpt-4o annotator with safe blending lowers bandgap error from 0.1233 to 0.1174 eV, with a paired bootstrap 95% confidence interval of [0.0014, 0.0068]; per-fold tests are significant on cycloalkyl and phenyl, consistent on long-alkyl, and absent on special.
Perspective
The conclusions are scoped to the 2D halide perovskite bandgap and optical bandgap benchmark and to four transfer benchmarks (Matbench dielectric, Matbench 2D exfoliation, OQMD ABX3 formation energy and Materials Project ABX3 bandgap), all under group-held-out OOD splits. The intended reader works on materials property prediction and out-of-distribution generalization; the benefit depends on whether the taxonomy bank yields reasonably balanced groups and captures the dominant chemistry of the held-out shift.
The gains are uneven: on the special fold Motif is slightly worse than the baseline and the per-fold bootstrap test is not significant there; a routing gap remains between the gated median's 0.111 eV and the per-fold oracle taxonomy's 0.100 eV, and the authors list more reliable routing or abstention as future work. Reasoning backbones do not behave uniformly, with o3 stronger on bandgap but worse than gpt-4o on optical bandgap safe blending.
