# Data-Efficient Graph Grammar Learning for Molecular Generation

arXiv: https://arxiv.org/abs/2203.08031 · HTML: https://mlsanity.com/paper/2203.08031/

## Key facts

- Cited by 26 papers in the map (data through 14 Oct 2026).
- Builds on 31 of its 60 references that are in the map.
- First posted on arXiv 15 Mar 2022.

## Builds on (most cited first, 30 of 31)

- [A Point Set Generation Network for 3D Object Reconstruction from a Single Image](https://mlsanity.com/paper/1612.00603/) (2016)
- [Strategies for Pre-training Graph Neural Networks](https://mlsanity.com/paper/1905.12265/) (2019)
- [Automatic chemical design using a data-driven continuous representation of molecules](https://mlsanity.com/paper/1610.02415/) (2016)
- [Junction Tree Variational Autoencoder for Molecular Graph Generation](https://mlsanity.com/paper/1802.04364/) (2018)
- [MolGAN: An implicit generative model for small molecular graphs](https://mlsanity.com/paper/1805.11973/) (2018)
- [GraphVAE: Towards Generation of Small Graphs Using Variational Autoencoders](https://mlsanity.com/paper/1802.03480/) (2018)
- [Graph Convolutional Policy Network for Goal-Directed Molecular Graph Generation](https://mlsanity.com/paper/1806.02473/) (2018)
- [Molecular Sets (MOSES): A Benchmarking Platform for Molecular Generation Models](https://mlsanity.com/paper/1811.12823/) (2018)
- [Molecular De Novo Design through Deep Reinforcement Learning](https://mlsanity.com/paper/1704.07555/) (2017)
- [Efficient Graph Generation with Graph Recurrent Attention Networks](https://mlsanity.com/paper/1910.00760/) (2019)
- [Learning Deep Generative Models of Graphs](https://mlsanity.com/paper/1803.03324/) (2018)
- [Hierarchical Generation of Molecular Graphs using Structural Motifs](https://mlsanity.com/paper/2002.03230/) (2020)
- [Constrained Graph Variational Autoencoders for Molecule Design](https://mlsanity.com/paper/1805.09076/) (2018)
- [Objective-Reinforced Generative Adversarial Networks (ORGAN) for Sequence Generation Models](https://mlsanity.com/paper/1705.10843/) (2017)
- [GraphNVP: An Invertible Flow Model for Generating Molecular Graphs](https://mlsanity.com/paper/1905.11600/) (2019)
- [Syntax-Directed Variational Autoencoder for Structured Data](https://mlsanity.com/paper/1802.08786/) (2018)
- [Low Data Drug Discovery with One-shot Learning](https://mlsanity.com/paper/1611.03199/) (2016)
- [Retro*: Learning Retrosynthetic Planning with Neural Guided A* Search](https://mlsanity.com/paper/2006.15820/) (2020)
- [Constrained Generation of Semantically Valid Graphs via Regularizing Variational Autoencoders](https://mlsanity.com/paper/1809.02630/) (2018)
- [NeVAE: A Deep Generative Model for Molecular Graphs](https://mlsanity.com/paper/1802.05283/) (2018)
- [Mol-CycleGAN - a generative model for molecular optimization](https://mlsanity.com/paper/1902.02119/) (2019)
- [Molecular Hypergraph Grammar with its Application to Molecular Optimization](https://mlsanity.com/paper/1809.02745/) (2018)
- [Optimizing Molecules using Efficient Queries from Property Evaluations](https://mlsanity.com/paper/2011.01921/) (2020)
- [ChemTS: An Efficient Python Library for de novo Molecular Generation](https://mlsanity.com/paper/1710.00616/) (2017)
- [Message-passing neural networks for high-throughput polymer screening](https://mlsanity.com/paper/1807.10363/) (2018)
- [Self-Referencing Embedded Strings (SELFIES): A 100% robust molecular string representation](https://mlsanity.com/paper/1905.13741/) (2019)
- [Polygrammar: Grammar for Digital Polymer Representation and Generation](https://mlsanity.com/paper/2105.05278/) (2021)
- [Augmenting Molecular Deep Generative Models with Topological Data Analysis Representations](https://mlsanity.com/paper/2106.04464/) (2021)
- [Learning Hyperedge Replacement Grammars for Graph Generation](https://mlsanity.com/paper/1802.08068/) (2018)
- [Modeling Graphs with Vertex Replacement Grammars](https://mlsanity.com/paper/1908.03837/) (2019)

## Built on by (most cited first, 26 of 26)

- [Grammar Prompting for Domain-Specific Language Generation with Large Language Models](https://mlsanity.com/paper/2305.19234/) (2023)
- [De Novo Molecular Generation via Connection-aware Motif Mining](https://mlsanity.com/paper/2302.01129/) (2023)
- [Group SELFIES: A Robust Fragment-Based Molecular String Representation](https://mlsanity.com/paper/2211.13322/) (2022)
- [A Simple and Scalable Representation for Graph Generation](https://mlsanity.com/paper/2312.02230/) (2023)
- [Deep Learning Methods for Small Molecule Drug Discovery: A Survey](https://mlsanity.com/paper/2303.00313/) (2023)
- [Activity Grammars for Temporal Action Segmentation](https://mlsanity.com/paper/2312.04266/) (2023)
- [Neurosymbolic Programming for Science](https://mlsanity.com/paper/2210.05050/) (2022)
- [GraphBPE: Molecular Graphs Meet Byte-Pair Encoding](https://mlsanity.com/paper/2407.19039/) (2024)
- [DISeR: Designing Imaging Systems with Reinforcement Learning](https://mlsanity.com/paper/2309.13851/) (2023)
- [Beam Enumeration: Probabilistic Explainability For Sample Efficient Self-conditioned Molecular Design](https://mlsanity.com/paper/2309.13957/) (2023)
- [Procedural Synthesis of Synthesizable Molecules](https://mlsanity.com/paper/2409.05873/) (2024)
- [How to Make Large Language Models Generate 100% Valid Molecules?](https://mlsanity.com/paper/2509.23099/) (2025)
- [Earning Extra Performance from Restrictive Feedbacks](https://mlsanity.com/paper/2304.14831/) (2023)
- [Data-Efficient Molecular Generation with Hierarchical Textual Inversion](https://mlsanity.com/paper/2405.02845/) (2024)
- [Constrained Adaptive Rejection Sampling](https://mlsanity.com/paper/2510.01902/) (2025)
- [Photonic Quantum Computing For Polymer Classification](https://mlsanity.com/paper/2211.12207/) (2022)
- [Random Copolymer inverse design system orienting on Accurate discovering of Antimicrobial peptide-mimetic copolymers](https://mlsanity.com/paper/2212.00023/) (2022)
- [Dynamic Vertex Replacement Grammars](https://mlsanity.com/paper/2303.11553/) (2023)
- [DiffDTM: A conditional structure-free framework for bioactive molecules generation targeted for dual proteins](https://mlsanity.com/paper/2306.13957/) (2023)
- [Hierarchical Grammar-Induced Geometry for Data-Efficient Molecular Property Prediction](https://mlsanity.com/paper/2309.01788/) (2023)
- [MixGCN: Scalable GCN Training by Mixture of Parallelism and Mixture of Accelerators](https://mlsanity.com/paper/2501.01951/) (2025)
- [Directed Graph Grammars for Sequence-based Learning](https://mlsanity.com/paper/2505.22949/) (2025)
- [Symbolic Neural Generation with Applications to Lead Discovery in Drug Design](https://mlsanity.com/paper/2510.23379/) (2025)
- [FRAGMENTA: End-to-end Fragmentation-based Generative Model with Agentic Tuning for Drug Lead Optimization](https://mlsanity.com/paper/2511.20510/) (2025)
- [Exploring polymer classification with a hybrid single-photon quantum approach](https://mlsanity.com/paper/2512.18125/) (2025)
- [Higher-Order Molecular Grammars for Generative and Foundation Models in Chemistry](https://mlsanity.com/paper/2610.02186/) (2026)

## Abstract (arXiv)

The problem of molecular generation has received significant attention recently. Existing methods are typically based on deep neural networks and require training on large datasets with tens of thousands of samples. In practice, however, the size of class-specific chemical datasets is usually limited (e.g., dozens of samples) due to labor-intensive experimentation and data collection. This presents a considerable challenge for the deep learning generative models to comprehensively describe the molecular design space. Another major challenge is to generate only physically synthesizable molecules. This is a non-trivial task for neural network-based generative models since the relevant chemical knowledge can only be extracted and generalized from the limited training data. In this work, we propose a data-efficient generative model that can be learned from datasets with orders of magnitude smaller sizes than common benchmarks. At the heart of this method is a learnable graph grammar that generates molecules from a sequence of production rules. Without any human assistance, these production rules are automatically constructed from training data. Furthermore, additional chemical knowledge can be incorporated in the model by further grammar optimization. Our learned graph grammar yields state-of-the-art results on generating high-quality molecules for three monomer datasets that contain only ~20 samples each. Our approach also achieves remarkable performance in a challenging polymer generation task with only 117 training samples and is competitive against existing methods using 81k data points. Code is available at https://github.com/gmh14/dataefficientgrammar.
