Molecular Graph Generation by Decomposition and Reassembling

Masatsugu Yamada, Mahito Sugiyama

Introduction

Drug discovery is a monumental challenge, often described as finding a needle in a haystack of $10^{23}$ to $10^{60}$ potential molecules. While deep generative models, such as Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs), have attempted to navigate this vast chemical space by mapping molecules to latent representations, they face two significant hurdles. First is the issue of validity: much of the latent space often corresponds to "chemical junk"—structures that are physically impossible to synthesize. Second is interpretability: many models operate as black boxes, providing little insight into why a specific structure was generated or how it might be constructed in a laboratory.

To address these challenges, the MOLDR (Molecular graph Decomposition and Reassembling) framework treats molecular design as a structured assembly process. By breaking down known molecules into frequent, chemically meaningful subgraphs and using reinforcement learning to reassemble them, MOLDR ensures that every intermediate step results in a valid molecule while maintaining a transparent generation path.

Methodology

The MOLDR algorithm operates through a two-phase workflow: Decomposition and Reassembling.

1. Decomposition: Building the Library

To avoid the computational complexity of raw graph mining and the risk of breaking essential chemical structures like rings, MOLDR first converts molecular graphs into junction trees. This abstraction simplifies the molecule into a tree structure where cycles are treated as single nodes.

Following this conversion, the system employs gSpan, a frequent subgraph mining algorithm, to identify common "building blocks" (motifs) across a massive database of successful drugs. To restore the specific atom and bond details lost during the junction tree abstraction, the framework uses the ISMAGS subgraph matching algorithm. This results in a library of chemically relevant fragments that serve as the "Lego bricks" for new molecules.

2. Reassembling: The Reinforcement Learning Phase

The generation of new molecules is framed as a Markov Decision Process, optimized using Proximal Policy Optimization (PPO).

  • State: The current molecular structure, represented via Mol2vec embeddings.
  • Action: Selecting a building block from the mined library and determining its attachment point on the current structure.
  • Reward: A scalar value based on target chemical properties, such as solubility (logP) or quantitative estimate of drug-likeness (QED).

Experimental Setup and Datasets

The researchers evaluated MOLDR using two industry-standard benchmarks:

  • ZINC: A dataset of approximately 250,000 drug-like molecules used primarily for property optimization tests.
  • GuacaMol: A larger benchmark containing 1.5 million molecules, used to evaluate the model's ability to maintain distribution diversity and "rediscover" known therapeutic agents.

Key Insights

Validity and Interpretability

Because MOLDR only utilizes subgraphs derived from real-world molecules and enforces chemical valency rules at every step, the generated molecules are 100% valid by design. Furthermore, unlike models that generate a molecule in a single step, MOLDR provides a "transition path." This allows chemists to observe the step-by-step addition of functional groups, making the AI's logic transparent and traceable.

Efficiency through Junction Trees

Directly mining subgraphs from raw molecular graphs is computationally prohibitive. By utilizing junction trees, MOLDR significantly accelerates the library creation phase. In comparative tests, tree-based mining took approximately 164 seconds, whereas direct graph mining required over 100 minutes at the same frequency threshold.

Results and Performance

MOLDR demonstrated superior performance across several key metrics compared to state-of-the-art models like JT-VAE, GCPN, and GraphAF:

  • Property Optimization: For penalized logP (a measure of solubility and synthetic ease), MOLDR achieved a top score of 12.46, surpassing GraphAF (12.23) and nearly tripling the performance of earlier models like JT-VAE (5.30).
  • Drug-likeness (QED): The model achieved a score of 0.948, reaching the theoretical maximum for the ZINC dataset.
  • Molecular Rediscovery: In the GuacaMol benchmark, MOLDR successfully rediscovered complex drugs such as Celecoxib and Troglitazone with 100% accuracy by correctly reassembling their constituent parts.

Limitations and Future Directions

While MOLDR represents a significant step forward, several areas for improvement remain. The current mining process can produce redundant subgraphs; the authors suggest that clustering these motifs could streamline the action space. Additionally, while the generated molecules are chemically valid, the reassembling steps do not always mirror real-world laboratory synthesis. Future iterations of the framework aim to incorporate retro-synthesis analysis to ensure that the AI's assembly instructions are practically executable by medicinal chemists.

Summary updated

Abstract

Designing molecular structures with desired chemical properties is an essential task in drug discovery and materials design. However, finding molecules with the optimized desired properties is still a challenging task due to combinatorial explosion of the candidate space of molecules. Here we propose a novel <i>decomposition-and-reassembling</i>-based approach, which does not include any optimization in hidden space, and our generation process is highly interpretable. Our method is a two-step procedure: In the first decomposition step, we apply frequent subgraph mining to a molecular database to collect a smaller size of subgraphs as building blocks of molecules. In the second reassembling step, we search desirable building blocks guided via reinforcement learning and combine them to generate new molecules. Our experiments show that our method not only can find better molecules in terms of two standard criteria, the penalized log <i>P</i> and druglikeness, but also can generate drug molecules showing the valid intermediate molecules.
BibTeX
@inproceedings{yamada2023molecular,
  author = {Masatsugu Yamada and Mahito Sugiyama},
  title = {{Molecular Graph Generation by Decomposition and Reassembling}},
  booktitle = {ACS},
  year = {2023},
  doi = {10.1021/acsomega.3c01078},
}
Figure