# Molecular Hypergraph Grammar with its Application to Molecular Optimization

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

## Key facts

- Cited by 56 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 8 Sep 2018.

## Built on by (most cited first, 30 of 56)

- [Pocket2Mol: Efficient Molecular Sampling Based on 3D Protein Pockets](https://mlsanity.com/paper/2205.07249/) (2022)
- [GraphDF: A Discrete Flow Model for Molecular Graph Generation](https://mlsanity.com/paper/2102.01189/) (2021)
- [Local Latent Space Bayesian Optimization over Structured Inputs](https://mlsanity.com/paper/2201.11872/) (2022)
- [A Survey on Deep Graph Generation: Methods and Applications](https://mlsanity.com/paper/2203.06714/) (2022)
- [InstructZero: Efficient Instruction Optimization for Black-Box Large Language Models](https://mlsanity.com/paper/2306.03082/) (2023)
- [Grammar Prompting for Domain-Specific Language Generation with Large Language Models](https://mlsanity.com/paper/2305.19234/) (2023)
- [Combining Latent Space and Structured Kernels for Bayesian Optimization over Combinatorial Spaces](https://mlsanity.com/paper/2111.01186/) (2021)
- [Edge Representation Learning with Hypergraphs](https://mlsanity.com/paper/2106.15845/) (2021)
- [Artificial Intelligence in Drug Discovery: Applications and Techniques](https://mlsanity.com/paper/2106.05386/) (2021)
- [Data-Efficient Graph Grammar Learning for Molecular Generation](https://mlsanity.com/paper/2203.08031/) (2022)
- [Bayesian Optimization over High-Dimensional Combinatorial Spaces via Dictionary-based Embeddings](https://mlsanity.com/paper/2303.01774/) (2023)
- [Beyond Euclid: An Illustrated Guide to Modern Machine Learning with Geometric, Topological, and Algebraic Structures](https://mlsanity.com/paper/2407.09468/) (2024)
- [NVDiff: Graph Generation through the Diffusion of Node Vectors](https://mlsanity.com/paper/2211.10794/) (2022)
- [Advancing Bayesian Optimization via Learning Correlated Latent Space](https://mlsanity.com/paper/2310.20258/) (2023)
- [Bayesian Optimization over Permutation Spaces](https://mlsanity.com/paper/2112.01049/) (2021)
- [C5T5: Controllable Generation of Organic Molecules with Transformers](https://mlsanity.com/paper/2108.10307/) (2021)
- [Molecule Generation for Drug Design: a Graph Learning Perspective](https://mlsanity.com/paper/2202.09212/) (2022)
- [Modular Flows: Differential Molecular Generation](https://mlsanity.com/paper/2210.06032/) (2022)
- [Inversion-based Latent Bayesian Optimization](https://mlsanity.com/paper/2411.05330/) (2024)
- [Deep reinforcement learning for process design: Review and perspective](https://mlsanity.com/paper/2308.07822/) (2023)
- [HYGENE: A Diffusion-based Hypergraph Generation Method](https://mlsanity.com/paper/2408.16457/) (2024)
- [Polygrammar: Grammar for Digital Polymer Representation and Generation](https://mlsanity.com/paper/2105.05278/) (2021)
- [Conditional β-VAE for De Novo Molecular Generation](https://mlsanity.com/paper/2205.01592/) (2022)
- [Molecule Design by Latent Prompt Transformer](https://mlsanity.com/paper/2310.03253/) (2023)
- [MAGNet: Motif-Agnostic Generation of Molecules from Shapes](https://mlsanity.com/paper/2305.19303/) (2023)
- [Molecular Hypergraph Neural Networks](https://mlsanity.com/paper/2312.13136/) (2023)
- [Representing Molecules as Random Walks Over Interpretable Grammars](https://mlsanity.com/paper/2403.08147/) (2024)
- [Recent Advances in Hypergraph Neural Networks](https://mlsanity.com/paper/2503.07959/) (2025)
- [Dataset Bias in the Natural Sciences: A Case Study in Chemical Reaction Prediction and Synthesis Design](https://mlsanity.com/paper/2105.02637/) (2021)
- [Graph Machine Learning for Design of High-Octane Fuels](https://mlsanity.com/paper/2206.00619/) (2022)

## Abstract (arXiv)

Molecular optimization aims to discover novel molecules with desirable properties. Two fundamental challenges are: (i) it is not trivial to generate valid molecules in a controllable way due to hard chemical constraints such as the valency conditions, and (ii) it is often costly to evaluate a property of a novel molecule, and therefore, the number of property evaluations is limited. These challenges are to some extent alleviated by a combination of a variational autoencoder (VAE) and Bayesian optimization (BO). VAE converts a molecule into/from its latent continuous vector, and BO optimizes a latent continuous vector (and its corresponding molecule) within a limited number of property evaluations. While the most recent work, for the first time, achieved 100% validity, its architecture is rather complex due to auxiliary neural networks other than VAE, making it difficult to train. This paper presents a molecular hypergraph grammar variational autoencoder (MHG-VAE), which uses a single VAE to achieve 100% validity. Our idea is to develop a graph grammar encoding the hard chemical constraints, called molecular hypergraph grammar (MHG), which guides VAE to always generate valid molecules. We also present an algorithm to construct MHG from a set of molecules.
