Enhancing Spatial Reasoning in Large Language Models for Metal-Organic Frameworks Structure Prediction
Mianzhi Pan, JianFei Li, Peishuo Liu, Botian Wang, Yawen Ouyang, Yiming Rong, Hao Zhou, Jianbing Zhang, [0.075em] National Key Laboratory for Novel Software Technology &School of Artificial Intelligence, Nanjing University, China · 2026
Read Enhancing Spatial Reasoning in Large Language Models for Metal-Organic Frameworks Structure Prediction by Mianzhi Pan, JianFei Li, Peishuo Liu, Botian Wang, Yawen Ouyang, Yiming Rong, Hao Zhou, Jianbing Zhang, [0.075em] National Key Laboratory for Novel Software Technology &School of Artificial Intelligence, Nanjing University, China (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-09285.txt.
Introduction
Mianzhi Pan and seven co-authors help chat models call the 3D form of metal organic frameworks. Such frameworks are crystal sponges with vast use, from gas trap to drug haul. Their 3D form sets their use. Chat models can draft crystals, but these sponges hold vast counts of atoms in strict plans. A plain model call oft breaks that plan.
The team adds space thought steps to the model. Steps force it to weigh how atoms sit next to each, not just which atoms are there. That care may lift true calls for sponge forms. A reader in stuffs work gets a path to AI calls that respect the hard space rules of real sponges.
Catalog record
| CREATOR | Mianzhi Pan, JianFei Li, Peishuo Liu, Botian Wang, Yawen Ouyang, Yiming Rong, Hao Zhou, Jianbing Zhang, [0.075em] National Key Laboratory for Novel Software Technology &School of Artificial Intelligence, Nanjing University, China |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 39 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2601-09285
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Enhancing Spatial Reasoning in Large Language Models for Metal-Organic Frameworks Structure Prediction Mianzhi Pan, JianFei Li, Peishuo Liu, Botian Wang, Yawen Ouyang, Yiming Rong, Hao Zhou, Jianbing Zhang, [0.075em] National Key Laboratory for Novel Software Technology &School of Artificial Intelligence, Nanjing University, China Abstract Metal-organic frameworks (MOFs) are porous crystalline materials with broad applications such as carbon capture and drug delivery, yet accurately predicting their 3D structures remains a significant challenge. While Large Language Models (LLMs) have shown promise in generating crystals, their application to MOFs is hindered by MOFs’ high atomic complexity. Inspired by the success of block-wise paradigms in deep generative models, we pioneer the use of LLMs in this domain by introducing MOF-LLM, the first LLM framework specifically adapted for block-level MOF structure prediction. To effectively harness LLMs for this modular assembly task, our training paradigm integrates spatial-aware continual pre-training (CPT), structural supervised fine-tuning (SFT), and matching-driven reinforcement learning (RL). By incorporating explicit spatial priors and optimizing structural stability via Soft Adaptive Policy Optimization (SAPO), our approach substantially enhances the spatial reasoning capability of a Qwen-3 8B model for accurate MOF structure prediction. Comprehensive experiments demonstrate that MOF-LLM outperforms state-of-the-art denoising-based and LLM-based methods while exhibiting superior sampling efficiency. 1 1 1 The model, data and code are available at https://github.com/panmianzhi/MOF-LLM . 1 Introduction Metal-organic frameworks (MOFs) are a revolutionary class of porous crystalline materials with extensive applications such as carbon capture ( 25 ) , drug delivery ( 15 ) , and water harvesting ( 21 ) . In light of their value, the development of MOFs was recently awarded the Nobel Prize in Chemistry ( 29 ) . The functional versatility of MOFs arises from their distinctive architecture, where inorganic metal nodes and organic linkers, i.e., building blocks, assemble into periodic reticular structures ( Figure 1 ). Variations in these building blocks can lead to millions of possible structures with diverse properties ( 27 ) . Navigating this expansive space to identify optimal candidates poses a significant challenge, as traditional experimental trial-and-error is intractable 3 . Therefore, Crystal Structure Prediction (CSP) plays a pivotal role in accelerating MOF discovery. By computationally predicting thermodynamically stable 3D structures, CSP enables the rapid screening of materials prior to laboratory synthesis. Figure 1: Illustration of MOF structures. An MOF structure and its unit cell are shown on top. The unit cell can be decomposed into building blocks, including metal nodes and organic linkers (bottom). Atom color: Zn (purple), O (red), C (gray), H (white). Recently, Large Language Models (LLMs) have emerged as a promising paradigm for CSP. By leveraging extensive pre-trained knowledge, LLMs have demonstrated a strong ability to generate physically plausible crystal structures when fine-tuned on crystallographic text data ( 12 ; 1 ; 41 ; 35 ) . Such crystal representations typically consist of atom-level information, including element types and atomic positions. However, extending these approaches to MOFs presents significant challenges. Unlike simple inorganic crystals, MOF unit cells often contain hundreds of atoms. Representing such massive systems as conventional atom-wise strings leads to excessively long contexts that current LLMs struggle to handle. Inspired by recent advances in deep generative models for CSP, we adopt a block-wise generation paradigm to address the scalability challenges in MOF structure prediction. While early CSP models operated at the atomistic level ( 18 ; 26 ; 39 ) , recent MOF-specific approaches have achieved significant breakthroughs by exploiting the intrinsic modularity of MOFs ( 10 ; 23 ; 20 ) . These methods predict the positions and orientations of MOF building blocks rather than individual atomic coordinates. As a result, the block-level generation paradigm substantially reduces the dimensionality of the design space. Despite their promise, LLMs face key challenges in block-wise MOF structure prediction. First, MOF building blocks possess complex 3D geometries that are difficult for LLMs to understand, frequently resulting in block collisions and physically implausible assemblies. Second, generating stable MOFs requires precise control over the orientations of individual blocks, necessitating the accurate generation of rotations in 3D space. However, existing LLMs exhibit limited spatial reasoning ability, particularly regarding rotations ( 24 ) , thereby constraining their efficacy in this task. To address these challenges, this paper proposes MOF-LLM, the first LLM training framework that integrates spatial-aware continue pre-training (CPT), structural supervised fine-tuning (SFT), and matching-driven reinforcement learning (RL) for autoregressive MOF structure prediction. Our pipeline is as follows: first, we perform CPT on our curated dataset that explicitly incorporates block connectivity and geometry. This process facilitates LLMs’ basic spatial understanding and reasoning for MOF structures. Subsequently, we conduct SFT to generate lattice parameters and block-wise roto-translations, thereby enabling LLMs to assemble building blocks. Finally, we adapt RL with reward signals from the matching degree between the generated structures and stable MOF references, which further improves the stability of the predicted structures. To validate the effectiveness of MOF-LLM, we conducted comprehensive experiments on the MOF dataset introduced by 3 . MOF-LLM demonstrates superior predictive performance, achieving a match rate of 35.78% on unseen MOFs and outperforming both existing LLM-based approaches and state-of-the-art denoising-based models. Beyond strong accuracy, MOF-LLM also exhibits exceptional computational efficiency: with an inference time of 0.04 seconds per structure, it exceeds the fastest denoising-based methods currently available. Our main contributions are as follows: • We propose MOF-LLM, a progressive framework integrating spatial-aware CPT, structural SFT, and matching-driven RL. To our knowledge, this is the first work to adopt LLMs for MOF structure prediction. • We enhance the spatial reasoning ability of LLMs, allowing accurate assembly of 3D building blocks into stable MOF structures. • We demonstrate the superior performance of MOF-LLM over all baselines in MOF structure prediction while achieving exceptional computational efficiency. Our analysis reveals the effectiveness of each training stage. 2 Related Work Generative Models for Crystal Structure Prediction (CSP). Deep generative models are promising solutions for CSP. 18 ; 19 propose joint generation of lattice parameters and fractional atomic coordinates using a periodic E (3)-equivariant denoising diffusion model. 26 and 39 introduce Riemannian flow matching and periodic Bayesian flow networks (BFNs), respectively, enabling efficient sampling of crystals. For MOFs, 23 treat the metal nodes and organic linkers as rigid building blocks and introduce a Riemannian flow matching framework to predict the position and orientations of these components. 20 extend the periodic BFNs to the hypersphere for better orientation modeling by introducing Bingham BFNs. Unlike these denoising-based paradigms, we pioneer the application of LLMs for autoregressive MOF structure prediction. LLM-based Crystal Generation. Although denoising-based models currently dominate 3D structure generation, recent advances have adapted LLMs for crystal generation by treating structures as texts. 12 and 1 pioneer fine-tuning LLMs to produce text-encoded atomistic data and Crystallographic Information Files (CIFs), respectively. Furthermore, CrystalICL ( 35 ) extends LLM-based crystal geneation with hybrid instruction tuning to enable few-shot in-context learning (ICL). 41 fine-tunes a Qwen-2.5 backbone ( 32 ) with reinforcement learning to bias generation towards stable, novel structures with desired properties. These atom-level text representations fail to capture the intrinsic topology and modularity of MOFs, and also lead to extremely long contexts that LLMs struggle with. Specifically for MOFs, recent systems like MOFGPT ( 2 ) and MOFGen ( 17 ) leverage LLMs for generative design. However,