
Flows (Dinh et al., 2014, 2016). Besides known issues with their training, GANs (Goodfellow et al.,
2014; Maziarka et al., 2020) suffer from the well-documented problem of mode collapse, thereby
generating molecules that lack diversity. VAEs (Kingma and Welling, 2013; Lim et al., 2018; Jin
et al., 2018), on the other hand, are susceptible to a distributional shift between the training data and
the generated samples. Moreover, optimizing for likelihood via a surrogate lower bound is likely
insufficient to capture the complex dependencies inherent in the molecules.
Flows are especially appealing since, in principle, they enable estimating (and sampling from)
complex data distributions using a sequence of invertible transformations on samples from a more
tractable continuous distribution. Molecules are discrete, so many flow models (Madhawa et al.,
2019; Honda et al., 2019; Shi et al., 2020) add noise during encoding and later apply a dequantization
procedure. However, dequantization begets distortion and issues related to convergence (Luo et al.,
2021). Moroever, many methods segregate the generation of atoms from bonds, so the decoded
structure is often not a valid molecule and requires post hoc correction to ensure validity (Zang
and Wang, 2020), effecting a discrepancy between the encoding and the decoded distributions.
Permutation dependence is another undesirable artifact of these methods. Some alternatives have
been explored to avoid dequantization, e.g., (Lippe and Gavves, 2021) encodes molecules in a
continuous latent space via variational inference and jointly optimizes a flow model for generation.
Discrete graph flows (Luo et al., 2021) also circumvent the many pitfalls of dequantization by
resorting to discrete latent variables, and performing validity checks during the generative process.
However, discrete flows follow an autoregressive procedure that requires a specific ordering of nodes
and edges during training. In general, one shot methods can generate much faster than discrete flows.
We offer a different flow-based perspective tailored to molecules. Specifically, we suggest coupled
continuous normalizing E(3)-equivariant flows that bestow generative capabilities from neural partial
differential equation (PDE) models on graphs. Graph PDEs have been known to enable designing
new embedding methods such as variants of GNNs (Chamberlain et al., 2021), extending GNNs
to continuous layers as Neural ODEs (Poli et al., 2019), and accommodating spatial information
(Iakovlev et al., 2020). We instead seek to bring to the fore their efficacy and elegance as tools to
help generate complex objects, such as molecules, viewed as outcomes resulting from an interplay of
co-adapting latent trajectories (i.e., underlying dynamics). Concretely, a flow is associated with each
node of the graph, and these flows are conjoined as a joint ODE system conditioned on neighboring
nodes. While these flows originate independently as samples from simple distributions, they adjust
progressively toward more complex joint distributions as they repeatedly interact with the neighboring
flows. We view molecules as samples generated from the globally aligned distributions obtained after
many such local feedback iterations. We call the proposed method Modular Flows (
ModFlow
s) to
underscore that each node can be regarded as a module that coordinates with other modules. Table 1
summarizes the capabilities of ModFlow compared to some previous generative works.
Contributions.
We propose to learn continuous-time, flow based generative models, grounded on
graph PDEs, for generating molecules without resorting to any validity correction. In particular,
•
we propose
ModFlow
, a novel generative model based on coupled continuous normalizing
E(3)-equivariant flows.
ModFlow
encapsulates essential inductive bias using PDEs, and
defines multiple flows that interact locally toward a globally consistent joint density;
Table 1: A comparison of generative modeling approaches for molecules.
Method One-shot Modular Invertible Continuous-time
JT-VAE 3 3 7 7 Jin et al. (2018)
MRNN 7 7 7 7 Popova et al. (2019)
GraphAF 7 7 37Shi et al. (2020)
GraphDF 7 7 37Luo et al. (2021)
MoFlow 3737Zang and Wang (2020)
GraphNVP 3737Madhawa et al. (2019)
ModFlow 3 3 3 3 this work
2