Foundation Molecular Grammar: Multi-Modal Foundation Models Induce Interpretable Molecular Graph Languages
Michael Sun, Weize Yuan, Gang Liu, Wojciech Matusik, Jie Chen
TL;DR
FMG addresses the challenge of learning interpretable molecular grammars from limited data by leveraging multi-modal foundation models to align image- and text-based representations of molecules. It reframes grammar induction as a hierarchical, MMFM-guided clique-tree decomposition that is converted into a hyperedge-replacement grammar, enabling robust generation and design of molecules with built-in interpretability. The approach combines step-by-step MMFM reasoning, LLM-based tournaments for rule quality, and stochastic grammar pooling to achieve data-efficient synthesis, higher diversity, and class membership in molecular discovery workflows. Empirical results on small and real-world datasets show FMG outperforms existing grammar-based and ML baselines on synthesizability, diversity, and data efficiency, with strong alignment between expert judgments and LLM evaluations. The work provides a scalable, interpretable foundation for automated molecular design, with code and prompts enabling broader adoption.
Abstract
Recent data-efficient molecular generation approaches exploit graph grammars to introduce interpretability into the generative models. However, grammar learning therein relies on expert annotation or unreliable heuristics for algorithmic inference. We propose Foundation Molecular Grammar (FMG), which leverages multi-modal foundation models (MMFMs) to induce an interpretable molecular language. By exploiting the chemical knowledge of an MMFM, FMG renders molecules as images, describes them as text, and aligns information across modalities using prompt learning. FMG can be used as a drop-in replacement for the prior grammar learning approaches in molecular generation and property prediction. We show that FMG not only excels in synthesizability, diversity, and data efficiency but also offers built-in chemical interpretability for automated molecular discovery workflows. Code is available at https://github.com/shiningsunnyday/induction.
