Abstract
GraphDF is a novel generative model for molecular graphs that utilizes discrete latent variables and normalizing flows. By avoiding the conventional "dequantization" of discrete data into continuous space, GraphDF eliminates training noise and computational overhead associated with Jacobian determinant calculations. The model achieves state-of-the-art performance in generating chemically valid molecules and optimizing molecular properties through reinforcement learning.
Introduction
Molecules are inherently discrete structures, defined by specific sets of atoms (nodes) and bonds (edges). Traditional deep generative models, such as Variational Autoencoders (VAEs) and standard Normalizing Flows, typically operate in continuous latent spaces. To accommodate discrete molecular data, these models often employ "dequantization," adding real-valued noise to discrete categories.
However, this approach introduces two significant drawbacks: distribution distortion, which prevents the model from capturing sharp discrete boundaries, and high computational complexity due to the need for Jacobian determinant calculations in continuous flows. GraphDF addresses these issues by maintaining a discrete latent space throughout the generation process, allowing it to better learn the underlying "grammar" of chemistry.
Methodology: Discrete Flow and Sequential Generation
GraphDF introduces a Discrete Flow architecture that maps molecular graphs to a discrete latent space rather than a continuous Gaussian distribution.
Sequential Graph Construction
The model constructs molecules autoregressively. At each step, it either adds a new node or creates an edge between a newly added node and existing nodes in the subgraph. This step-by-step approach allows the model to maintain structural integrity throughout the process.
Modulo Shift Transform
A core innovation of GraphDF is the use of an invertible modulo shift transform instead of standard affine coupling layers: $$q(z) = (z + \mu) \mod t$$ This transform is naturally suited for discrete categorical data. Because the mapping is discrete, the equivalent of the Jacobian determinant is constant, significantly reducing computational overhead.
Architecture and Conditional Information
To determine the shift factor ($\mu$), GraphDF utilizes a Relational Graph Convolutional Network (R-GCN). This ensures that the generation process is conditioned on the existing graph structure and remains invariant to node ordering.
Experiments and Results
GraphDF was evaluated on standard benchmarks including ZINC250K, QM9, and MOSES. The model was also fine-tuned using Proximal Policy Optimization (PPO) for property-specific tasks.
Performance Metrics
- Validity: GraphDF achieved 100% chemical validity on the ZINC250K and MOSES datasets. Notably, its "Validity without check" (validity before applying valency constraints) reached 89.03% on ZINC, significantly outperforming previous models like GraphAF (68%).
- Property Optimization: In Penalized logP tasks, GraphDF reached a top score of 13.7, surpassing GCPN (7.98) and GraphAF (12.23).
- Constrained Optimization: The model demonstrated superior performance in modifying existing molecules to improve specific properties while maintaining high structural similarity to the starting compound.
Discussion and Conclusion
The success of GraphDF highlights the advantages of staying in the discrete domain for molecular generation. By avoiding dequantization, the model more effectively learns chemical valency rules, leading to higher-quality molecular structures. While the sequential nature of the model introduces some latency compared to one-shot methods, the gains in validity and optimization performance make it a powerful tool for drug discovery. Future work may explore extending this discrete flow framework to graph-to-graph translation tasks, such as predicting reaction products.
Summary updated