Title: 3D molecule generation by denoising voxel grids
Venue: NeurIPS 2023
Accepted: yes
Keywords: generative model

molecule generation

drug discovery
Abstract: We propose a new score-based approach to generate 3D molecules represented as atomic densities on regular grids.
First, we train a denoising neural network that learns to map from a smooth distribution of noisy molecules to the distribution of real molecules.
Then, we follow the _neural empirical Bayes_ framework [Saremi and Hyvarinen, 2019] and generate molecules in two steps: (i) sample noisy density grids from a smooth distribution via underdamped Langevin Markov chain Monte Carlo, and (ii) recover the "clean" molecule by denoising the noisy grid with a single step.
Our method, _VoxMol_, generates molecules in a fundamentally different way than the current state of the art (ie, diffusion models applied to atom point clouds). It differs in terms of the data representation, the noise model, the network architecture and the generative modeling algorithm.
Our experiments show that VoxMol captures the distribution of drug-like molecules better than state of the art, while being faster to generate samples.

3Dmolecule generation by denoising voxel grids

Abstract

Wepropose a new score-based approach to generate 3D molecules represented as atomic densities on regular grids. First, we train a denoising neural network that learns to map from a smooth distribution of noisy molecules to the distribution of real molecules. Then, we follow the neural empirical Bayes framework [1] and generate molecules in two steps: (i) sample noisy density grids from a smooth distribution via underdamped Langevin Markov chain Monte Carlo, and (ii) recover the 'clean' molecule by denoising the noisy grid with a single step. Our method, VoxMol , generates molecules in a fundamentally different way than the current state of the art ( i.e. , diffusion models applied to atom point clouds). It differs in terms of the data representation, the noise model, the network architecture and the generative modeling algorithm. Our experiments show that VoxMol captures the distribution of drug-like molecules better than state of the art, while being faster to generate samples.

1 Introduction

Finding novel molecules with desired properties is an important problem in chemistry with applications to many scientific domains. In drug discovery in particular, standard computational approaches perform some sort of local search-by scoring and ranking molecules-around a region of the molecular space (chosen based on some prior domain knowledge). The space of possible drug-like molecules is prohibitively large (it scales exponentially with the molecular size [2, 3], estimated to be around 10 60 [4]), therefore search in this space is very hard. Search-based approaches achieve some successes in practice, but have some severe limitations: we can only explore very small portions of the molecular space (on the order of billions to trillions molecules) and these approaches cannot propose new molecules conditioned on some desiderata.

Generative models for molecules have been proposed to overcome these limitations and explore the molecular space more efficiently [5]. These approaches often consider one of the following types of molecule representations: (i) one-dimensional sequences such as SMILES [6] or SELFIES [7] ( e.g. , [8, 9, 10]), (ii) two-dimensional molecular graphs, where nodes represent atoms or molecular substructures and edges represent bonds between them ( e.g. , [11, 12, 13, 14]), or (iii) atoms as three-dimensional points in space. Molecules are entities laying on three-dimensional space, therefore 3Drepresentations are arguably the most complete ones-they contain information about atom types, their bonds and the molecular conformation.

Recent generative models consider molecules as a set of points in 3D Euclidean space and apply diffusion models on them [15, 16, 17, 18, 19, 20]. Point-cloud representations allow us to use equivariant graph neural networks [21, 22, 23, 24, 25]-known to be very effective in molecular discriminative tasks-as the diffusion model's denoising network. However, point-based diffusion approaches have some limitations when it comes to generative modeling. First, the number of atoms in the molecule ( i.e. , nodes on the 3D graph) to be diffused need to be known beforehand. Second, atom types and their coordinates have very different distributions (categorical and continuous variables, respectively) and are treated separately. Because a score function is undefined on discrete distributions,

NH

NH

m0

Br

some workaround is necessary. Finally, graph networks operate only on nodes and edges (single and pairwise iterations, respectively). Therefore, capturing long-range dependencies over multiple atoms (nodes) can become difficult as the number of atoms increases. This is related to the limitations of the message-passing formalism in graph neural networks [26]. Higher-order message passing can alleviate this problem to a degree [27, 28], but they come at a significant computational cost and they have been limited to third-order models [29] (see next section for more discussions on the tradeoffs between model expressivity and built-in equivariance). 1

In this work we introduce VoxMol , a new score-based method to generate 3D molecules. Similar to [33], and unlike most recent approaches, we represent atoms as continuous (Gaussian-like) densities and molecules as a discretization of 3D space on voxel ( i.e. , a discrete unit of volume) grids. V oxelized representations allow us to use the same type of denoising architectures used in computer vision. These neural networks-the workhorse behind the success of score-based generative models on images, e.g. [34, 35, 36]-are very effective and scale very well with data.

Westart by training a neural network to denoise noisy voxelized molecules. Noisy samples are created simply by adding Gaussian noise (with a fixed identity covariance matrix scaled by a large noise level) to each voxel in the molecular grid. This denoising network also parametrizes the score function of the smooth/noisy distribution. Note that in contrast to diffusion models, the noise process we use here does not displace atoms. Then, we leverage the (learned) denoising network and generate molecules in two steps [1]: (i) (walk) sample noisy density grids from the smooth distribution via Langevin Markov chain Monte Carlo (MCMC), and (ii) (jump) recover 'clean' molecules by denoising the noisy grid. This sampling scheme, referred to as walk-jump sampling in [1], has been successfully applied before to 2D natural images [37, 38] and 1D amino acid sequences [39].

Compared to point-cloud diffusion models, VoxMol is simpler to train, it does not require knowing the number of atoms beforehand, and it does not treat features as different distributions (continuous, categorical and ordinal for coordinates, atom types and formal charge)-we only use the 'raw' voxelized molecule. Moreover, due to its expressive network architecture, our method scales better to large, drug-sized molecules. Figure 1 (and Figures 8, 9 on appendix) illustrates voxelized molecules and their corresponding molecular graphs generated by our model, trained on two different datasets. These samples show visually that our model learns valences of atoms and symmetries of molecules.

The main contributions of this work can be summarized as follows. We present VoxMol, a new score-based method for 3D molecule generation. The proposed method differs from current approaches-usually diffusion models on point clouds-in terms of the data representation, the noise model, the network architecture, and the generative modeling algorithm. We show in experiments that VoxMol performs slightly worse than state of the art on a small dataset (QM9 [40]), while outperforms it (by a large margin) on a challenging, more realistic drug-like molecules dataset (GEOM-drugs [41]).

2 Related Work

Voxel-based unconditional 3D molecule generation. Skalic et al. [42] and Ragoza et al. [33] map atomic densities on 3D regular grids and train V AEs [43] using 3D convolutional networks to generated voxelized molecules. To recover atomic coordinates from the generated voxel grids 2 , [33] introduces a simple optimization-based solution, while [42] trains another model that 'translates' voxel structures into SMILES strings. Voxel representations are flexible and can trivially be applied to related problems with different data modalities. For instance, [44] proposes a GAN [45] on voxelized electron densities, while [46] leverages voxelized 3D pharmacophore features to train a pocket-conditional model. Similar to these works, our model also relies on discretization of 3D space. Like [33], we use a simple peak detection algorithm to extract atomic coordinates from the generated voxel grids. However, our method differs on the underlying generative modeling, architecture, datasets, input representations and evaluations.

Point cloud-based unconditional generation. Most recent models treat molecules as sets of points, where each node is associated with a particular atom type, its coordinates and potentially extra information like formal charge. Different modeling approaches have been proposed, e.g. , [47, 48, 49] utilize autoregressive models to iteratively sample atoms, and [50, 51] use normalizing flows [52]. Hoogeboom et al. [15] proposes E(3) Equivariant Diffusion Models (EDM), a diffusion [53]-based approach that performs considerably better than previous models on this task. EDMs learn to denoise a diffusion process (operating on both continuous and categorical data) and generate molecules by iteratively applying the denoising network on an initial noise. Several works have been proposed on the top of EDM [54, 55, 20, 56]. For instance, Xu et al. [56] improves EDM by applying diffusion on a latent space instead of the atomic coordinates, while MiDi [20] shows that EDM results can be improved by jointly generating the 3D conformation and the connectivity graph of molecules (in this setting, the model has access to both the 3D structure and the 2D connectivity graph).

Conditional 3D molecule generation. A related body of work is concerned with conditional generation. In many cases, conditional generation is built on the top of unconditional generation methods. Some authors propose to predict the 3D structure of the molecules given a molecular graph (this is called the conformer generation task): V AEs [57, 58], normalizing flows [59], reinforcement learning [60], optimal transport [61], autoregressive models [62] and diffusion models [63, 16, 64] have been proposed to this task. Some work [65, 66] condition 3D generation on shape while other works condition molecule generation on other structures. For instance, [17, 18, 19, 67] adapt (unconditional) diffusion models to condition on protein pockets, while [68] adapt their previous work [33] to condition voxelized structures to protein targets. Finally, [46] proposes a hybrid conditional generation model by modeling fragments/scaffolds with point cloud representation and the 3D target structures and pharmacophores features [69] with voxel grids.

Comparison between voxel and point-cloud representations. Voxels have some advantages and disadvantages compared to point cloud representations. First, voxels are straightforward generalizations of 2D pixels to 3D space, therefore we can leverage similar machinery used in score-based generative modeling for images. These models are known to perform well and scale nicely with data. Second, message passing on graphs operate on single and pairwise interactions while convolution filters (and potentially transformer layers applied to regular grids) can capture multiple local interactions by construction (see [70] for a discussion on the many-body representation hypothesis). Third, voxel representations have a higher memory footprint and lower random memory accesses than point cloud representations [71]. We note however, that developing models on drug-sized molecules (that is, molecules with size close to those on GEOM-drugs [41]) with reasonable resolution (.1-.2Å) is possible on current GPU hardware. Fourth, recovering point coordinates from a discrete grid has no analytical solution, therefore voxel-based models require an extra step to retrieve atomic coordinates. We show empirically that this is not a problem in practice as we can achieve competitive results, even with a very simple peak detection algorithm.

Finally, graph networks are less expressive due to message passing formalism [26, 27], but are a better fit for built-in SE(3)-equivariance architectures ( e.g. [21, 22, 23, 24, 25]). Rotation-equivariant 3D con-

volutional network have been proposed [72, 73, 74] 3 , but current models do not scale as well as standard convnets, and it would be a challenge to apply them to drug-sized molecules. Built-in rotation equivariance is a good property to have, however equivariance can also be learned with strong data augmentation/larger datasets [75, 76, 32]. In fact, concurrently to this work, [77] also show that built-in SE(3)equivariant architecture is not necessary to generate molecules. Our experiments show that an expressive denoiser scales up better, allowing V oxMol to outperform current state of the art on GEOM-drugs. However, we hope our results motivate exploration of more efficient SE(3)-equivariant convnet architectures.

3 Method

We follow previous work ( e.g. , [78, 33, 70, 79]) and represent atoms as continuous Gaussian-like atomic densities in 3D space, centered around their atomic coordinates. Molecules are generated by discretizing the 3D space around the atoms into voxel grids, where each atom type (element) is represented by a different grid channel. See appendix for more information on how we discretize molecules. This discretization process gives us a dataset with n voxelized molecules { x i } n i =1 , x i ∈ R d , d = c × l 3 , where l is the length of each grid edge and c is the number of atom channels in the dataset. Each voxel in the grid can take values between 0 (far from all atoms) and 1 (at the center of atoms). Throughout our experiments, we consider a fixed resolution of .25Å (we found it to be a good trade-off between accuracy and computation). Therefore, voxel grids occupy a volume of ( l/ 4) 3 cubic Ångströms.

3.1 Background: neural empirical Bayes

Let p ( x ) be an unknown distribution of voxelized molecules and p ( y ) a smoother version of it obtained by convolving p ( x ) with an isotropic Gaussian kernel with a known covariance σ 2 I d 4 . Equivalently, Y = X + N , where X ∼ p ( x ) , N ∼ N (0 ,σ 2 I d ) . Therefore Y is sampled from:

This transformation will smooth the density of X while still preserving some of the structure information of the original voxel signals. Robbins [80] showed that if we observe Y = y , then the least-square estimator of X is the Bayes estimator, i.e. , ˆ x ( y ) = E [ X | Y = y ] . Built on this result, Miyasawa [81] showed that, if the noising process is Gaussian (as in our case), then the least-square estimator ˆ x ( y ) can be obtained purely from the (unnormalized) smoothed density p ( y ) :

where g ( y ) = ∇ y log p ( y ) is the score function [82] of p ( y ) . This interesting equation tells us that, if we know p ( y ) up to a normalizing constant (and therefore the score function associated with it), we can estimate the original signal x only by observing its noisy version y . Equivalently, if we have access to the estimator ˆ x ( y ) , we can compute the score function of p ( y ) via (1).

Our generative model is based on the neural empirical Bayes (NEB) formalism [1]: we are interested in learning the score function of the smoothed density p ( y ) and the least-square estimator ˆ x ( y ) from a dataset of voxelized molecules { x i } n i =1 , sampled from unknown p ( x ) . We leverage the (learned) estimator and score function to generate voxelized molecules in two steps: (i) sample y k ∼ p ( y ) with Langevin MCMC [83], and (ii) generate clean samples with the least-square estimator. The intuition is that it is much easier to sample from the smooth density than the original distribution. See Saremi and Hyvärinen [1] for more details.

3.2 Denoising voxelized molecules

We parametrize the Bayes estimator of X using a neural network with parameters θ denoted by ˆ x θ : R d → R d . Since the Bayes estimator is the least-squares estimator, the learning becomes a least-squares denoising objective as follows:

F

<latexi sh

1_b

64="7

+E

T

R/9

r

XjOvNc

IGY

>A

B

n

VDLSg

y

fU

oP

K

2

Q

8

5

HJ

m

d

Z

M

z

w

F

p

3

k

0

W

q

C

u

x

i

<latexi sh

1_b

64="7

+E

T

R/9

r

XjOvNc

IGY

>A

B

n

VDLSg

y

fU

oP

K

2

Q

8

5

HJ

m

d

Z

M

z

w

F

p

3

k

0

W

q

C

u

x

i

x

<latexi sh

1_b

64="7

+E

T

R/9

r

XjOvNc

IGY

>A

B

n

VDLSg

y

fU

oP

K

2

Q

8

5

HJ

m

d

Z

M

z

w

F

p

3

k

0

W

q

C

u

i

<latexi sh

1_b

64="7

+E

T

R/9

r

XjOvNc

IGY

>A

B

n

VDLSg

y

fU

oP

K

2

Q

8

5

HJ

m

d

Z

M

z

w

F

p

3

k

0

W

q

C

u

<latexi sh

1_b

64="7

+E

T

R/9

r

XjOvNc

IGY

>A

B

n

VDLSg

y

fU

oP

K

2

Q

8

5

HJ

m

d

Z

M

z

w

F

p

3

k

0

W

q

C

u

<latexi sh

1_b

64="7

+E

T

R/9

r

XjOvNc

IGY

>A

B

n

VDLSg

y

fU

oP

K

2

Q

8

5

HJ

m

d

Z

M

z

w

F

p

3

k

0

W

q

C

u

x

<latexi sh

1_b

64="

jv37c

HCFu

5

A

8/

D9IU

>

B

V

LSgN

EOy

r

fq

Z

MK

+

o

Q

J

Yn wm

2

z

P

k

p

T

d

G

W

X

0

R

+

σ

+

/epsilon1

=

=

+

/epsilon1

=

+

σ

=

x

i

y

i

(a)

(b)

y

k

-

1

y

k

y

k

+1

ˆ

x

(

y

k

)

ˆ

x

(

y

i

)

x

i

y

i

ˆ

x

(

y

i

)

+

σ

=

x

i

y

i

(a)

(b)

y

k

-

1

y

k

y

k

+1

ˆ

x

(

y

k

)

ˆ

x

(

y

i

)

(a)

(b)

y

0

■

■

N

F

Using (1), we have the following expression for the smoothed score function in terms of the denoising network 5 :

By minimizing the learning objective (2) we learn the optimal ˆ x θ and by using (3) we can compute the score function g θ ( y ) ≈∇ y log p ( y ) .

OLD: We model the denoising network ˆ x θ with an encoder-decoder 3D convolutional network that maps every noised voxel on the grid to a clean version of it. Figure 2(a) shows a general overview of the denoising model. The noise level, σ , is kept constant during training and is a key hyperparameter of the model. Note that in the empirical Bayes formalism, σ can be any (large) value.

+ /epsilon1 = + σ = y k -1 y k y k +1 + σ = x i y i y k -1 y k y k +1 ˆ x ( y k ) ˆ x ( y i ) y 0 Compared to diffusion models, this training scheme is simpler as the noise level is fixed during training. VoxMol does not require noise scheduling nor temporal embedding on the network layers. We observe empirically that single-step denoising is sufficient to reconstruct voxelized molecules (within the noise levels considered in this paper). Our hypothesis is that this is due to the nature of the voxel signals, which contain much more 'structure' than 'texture' information, in comparison to natural images.

(a)

y i x i y i 3.3 Sampling voxelized molecules

(a)

(a)

(b)

(b)

We use the learned score function g θ and the estimator ˆ x θ to sample. We follow the walk-jump sampling scheme [1, 37, 38, 39] to generate voxelized molecules x k :

k

ˆ

(

y

x

(b)

y 0 (i) (walk step) For sampling noisy voxels from p ( y ) , we consider Langevin MCMC algorithms that are based on discretizing the underdamped Langevin diffusion [84]:

=

σ

+

y i (a) (b) ˆ x ( y k ) ˆ x ( y i ) i y i (a) (b) ˆ x ( y k ) ˆ x ( y i ) y i ˆ x ( y i ) (a) (b) where B t is the standard Brownian motion in R d , γ and u are hyperparameters to tune (friction and inverse mass, respectively). We use the discretization algorithm proposed by Sachs et al. [85] to generate samples y k , which requires a discretization step δ . See appendix for a description of the algorithm.

(ii) (jump step) At an arbitrary time step k , clean samples can be generated by estimating X from y k with the denoising network, i.e. , computing x k =ˆ x θ ( y k ) .

This approach allows us to approximately sample molecules from p ( x ) without the need to compute (or approximate) ∇ x log p ( x ) . In fact, we do MCMC on the smooth density p ( y ) , which is known to be easier to sample and mixes faster than the original density p ( x ) [1, 38, 86]. Figure 2(b) shows a schematic representation of the generation process. Following [37], we initialize the chains at by adding uniform noise to Gaussian noise (with the same σ used during training), i.e. , y 0 = N + U , N ∼ N (0 ,σ 2 I d ) , U ∼ U d (0 , 1) (this was observed to mix faster in practice).

<latexi sh

1_b

64="

/

RJSM3P

QXVg

D

HF

9

oE

>A

B8

c

N

K2

W

O

w

I

p

k

GU

yZ

0

d

Y

f

5

7

T

C

L

u

m

v

q

j

n

+

z

<latexi sh

1_b

64="

jv37c

HCFu

5

A

8/

D9IU

>

B

V

LSgN

EOy

r

fq

Z

MK

+

o

Q

J

Yn wm

2

z

P

k

p

T

d

G

W

X

0

R

<latexi sh

1_b

64="

/

RJSM3P

QXVg

D

HF

9

oE

>A

B8

c

N

K2

W

O

w

I

p

k

GU

yZ

0

d

Y

f

5

7

T

C

L

u

m

v

q

j

n

+

z

<latexi sh

1_b

64="

jv37c

HCFu

5

A

8/

D9IU

>

B

V

LSgN

EOy

r

fq

Z

MK

+

o

Q

J

Yn wm

2

z

P

k

p

T

d

G

W

X

0

R

<latexi sh

1_b

64="

jv37c

HCFu

5

A

8/

D9IU

>

B

V

LSgN

EOy

r

fq

Z

MK

+

o

Q

J

Yn wm

2

z

P

k

p

T

d

G

W

X

0

R

<latexi sh

1_b

64="7

+E

T

R/9

r

XjOvNc

IGY

>A

B

n

VDLSg

y

fU

oP

K

2

Q

8

5

HJ

m

d

Z

M

z

w

F

p

3

k

0

W

q

C

u

<latexi sh

1_b

64="7

+E

T

R/9

r

XjOvNc

IGY

>A

B

n

VDLSg

y

fU

oP

K

2

Q

8

5

HJ

m

d

Z

M

z

w

F

p

3

k

0

W

q

C

u

<latexi sh

1_b

64="jXEr5I8cR9v

WQ

B2

P

K

>A

n

VDLSgN

Oy fUY

o

HJ

m

d

p

w

F

3

k

G

q

T

Z

0

u

C

M

/

+

<latexi sh

1_b

64="jXEr5I8cR9v

WQ

B2

P

K

>A

n

VDLSgN

Oy fUY

o

HJ

m

d

p

w

F

3

k

G

q

T

Z

0

u

C

M

/

+

<latexi sh

1_b

64="7

+E

T

R/9

r

XjOvNc

IGY

>A

B

n

VDLSg

y

fU

oP

K

2

Q

8

5

HJ

m

d

Z

M

z

w

F

p

3

k

0

W

q

C

u

<latexi sh

1_b

64="jXEr5I8cR9v

WQ

B2

P

K

>A

n

VDLSgN

Oy fUY

o

HJ

m

d

p

w

F

3

k

G

q

T

Z

0

u

C

M

/

+

<latexi sh

1_b

64="jXEr5I8cR9v

WQ

B2

P

K

>A

n

VDLSgN

Oy fUY

o

HJ

m

d

p

w

F

3

k

G

q

T

Z

0

u

C

M

/

+

<latexi sh

1_b

64="

/

RJSM3P

QXVg

D

HF

9

oE

>A

B8

c

N

K2

W

O

w

I

p

k

GU

yZ

0

d

Y

f

5

7

T

C

L

u

m

v

q

j

n

+

z

<latexi sh

1_b

64="jXEr5I8cR9v

WQ

B2

P

K

>A

n

VDLSgN

Oy fUY

o

HJ

m

d

p

w

F

3

k

G

q

T

Z

0

u

C

M

/

+

<latexi sh

1_b

64="jXEr5I8cR9v

WQ

B2

P

K

>A

n

VDLSgN

Oy fUY

o

HJ

m

d

p

w

F

3

k

G

q

T

Z

0

u

C

M

/

+

<latexi sh

1_b

64="

jv37c

HCFu

5

A

8/

D9IU

>

B

V

LSgN

EOy

r

fq

Z

MK

+

o

Q

J

Yn wm

2

z

P

k

p

T

d

G

W

X

0

R

<latexi sh

1_b

64="

jv37c

HCFu

5

A

8/

D9IU

>

B

V

LSgN

EOy

r

fq

Z

MK

+

o

Q

J

Yn wm

2

z

P

k

p

T

d

G

W

X

0

R

<latexi sh

1_b

64="jXEr5I8cR9v

WQ

B2

P

K

>A

n

VDLSgN

Oy fUY

o

HJ

m

d

p

w

F

3

k

G

q

T

Z

0

u

C

M

/

+

<latexi sh

1_b

64="jXEr5I8cR9v

WQ

B2

P

K

>A

n

VDLSgN

Oy fUY

o

HJ

m

d

p

w

F

3

k

G

q

T

Z

0

u

C

M

/

+

<latexi sh

1_b

64="jXEr5I8cR9v

WQ

B2

P

K

>A

n

VDLSgN

Oy fUY

o

HJ

m

d

p

w

F

3

k

G

q

T

Z

0

u

C

M

/

+

<latexi sh

1_b

64="r

+

3qYVDH

oCAB

Iz mKS

J

>

8

c

N

E

U

/

9

QLy

Rv

5F

2

T

j

G

Zu

w

W

X

7

0n

M

k

g

d

p

P

O

f

<latexi sh

1_b

64="r

+

3qYVDH

oCAB

Iz mKS

J

>

8

c

N

E

U

/

9

QLy

Rv

5F

2

T

j

G

Zu

w

W

X

7

0n

M

k

g

d

p

P

O

f

<latexi sh

1_b

64="r

+

3qYVDH

oCAB

Iz mKS

J

>

8

c

N

E

U

/

9

QLy

Rv

5F

2

T

j

G

Zu

w

W

X

7

0n

M

k

g

d

p

P

O

f

<latexi sh

1_b

64="r

+

3qYVDH

oCAB

Iz mKS

J

>

8

c

N

E

U

/

9

QLy

Rv

5F

2

T

j

G

Zu

w

W

X

7

0n

M

k

g

d

p

P

O

f

<latexi sh

1_b

64="r

+

3qYVDH

oCAB

Iz mKS

J

>

8

c

N

E

U

/

9

QLy

Rv

5F

2

T

j

G

Zu

w

W

X

7

0n

M

k

g

d

p

P

O

f

<latexi sh

1_b

64="r

+

3qYVDH

oCAB

Iz mKS

J

>

8

c

N

E

U

/

9

QLy

Rv

5F

2

T

j

G

Zu

w

W

X

7

0n

M

k

g

d

p

P

O

f

ˆ

x

ˆ

x

(

(

y

y

i

i

)

)

<latexi sh

1_b

64="r

+

3qYVDH

oCAB

Iz mKS

J

>

8

c

N

E

U

/

9

QLy

Rv

5F

2

T

j

G

Zu

w

W

X

7

0n

M

k

g

d

p

P

O

f

<latexi sh

1_b

64="r

+

3qYVDH

oCAB

Iz mKS

J

>

8

c

N

E

U

/

9

QLy

Rv

5F

2

T

j

G

Zu

w

W

X

7

0n

M

k

g

d

p

P

O

f

<latexi sh

1_b

64="r

+

3qYVDH

oCAB

Iz mKS

J

>

8

c

N

E

U

/

9

QLy

Rv

5F

2

T

j

G

Zu

w

W

X

7

0n

M

k

g

d

p

P

O

f

<latexi sh

1_b

64="c

ZMWAfoFGCJ

EuNwpKvO

3n

>

B

VDLSg

y

r

UY9

P

2

Q

8

I5

H

m

d

k

jq

T

0

R

+

/

X

<latexi sh

1_b

64="c

ZMWAfoFGCJ

EuNwpKvO

3n

>

B

VDLSg

y

r

UY9

P

2

Q

8

I5

H

m

d

k

jq

T

0

R

+

/

X

<latexi sh

1_b

64="9MCp7Z

G5/+

kPD

J

I

w3

Qo

>A

B

n

c

V

LS

N

F

TX

W

q

d

j

UR

8u

g

zEy

f

v

O2

0

K

r

Y

m

H

<latexi sh

1_b

64="9MCp7Z

G5/+

kPD

J

I

w3

Qo

>A

B

n

c

V

LS

N

F

TX

W

q

d

j

UR

8u

g

zEy

f

v

O2

0

K

r

Y

m

H

<latexi sh

1_b

64="9MCp7Z

G5/+

kPD

J

I

w3

Qo

>A

B

n

c

V

LS

N

F

TX

W

q

d

j

UR

8u

g

zEy

f

v

O2

0

K

r

Y

m

H

<latexi sh

1_b

64="9MCp7Z

G5/+

kPD

J

I

w3

Qo

>A

B

n

c

V

LS

N

F

TX

W

q

d

j

UR

8u

g

zEy

f

v

O2

0

K

r

Y

m

H

<latexi sh

1_b

64="9MCp7Z

G5/+

kPD

J

I

w3

Qo

>A

B

n

c

V

LS

N

F

TX

W

q

d

j

UR

8u

g

zEy

f

v

O2

0

K

r

Y

m

H

<latexi sh

1_b

64="c

ZMWAfoFGCJ

EuNwpKvO

3n

>

B

VDLSg

y

r

UY9

P

2

Q

8

I5

H

m

d

k

jq

T

0

R

+

/

X

<latexi sh

1_b

64="c

ZMWAfoFGCJ

EuNwpKvO

3n

>

B

VDLSg

y

r

UY9

P

2

Q

8

I5

H

m

d

k

jq

T

0

R

+

/

X

<latexi sh

1_b

64="

9

jFC

3A

7nJPckW

OI

>

B8

V

NS

E

Ur q/

QLy

Rv

5

2

o

+

z

T

D

Gm

Zu

Y

w

X

H

0

K

M

g

d

p

f

<latexi sh

1_b

64="

9

jFC

3A

7nJPckW

OI

>

B8

V

NS

E

Ur q/

QLy

Rv

5

2

o

+

z

T

D

Gm

Zu

Y

w

X

H

0

K

M

g

d

p

f

<latexi sh

1_b

64="9MCp7Z

G5/+

kPD

J

I

w3

Qo

>A

B

n

c

V

LS

N

F

TX

W

q

d

j

UR

8u

g

zEy

f

v

O2

0

K

r

Y

m

H

<latexi sh

1_b

64="mU/3SK

C

A

jd5FP8

>

B7H

c

V

N

EJ

r

q

9L

0n

2

R

D

T

w

G

y

+

Q

u

M

f

W

o

Z

k

z

X

I

O

<latexi sh

1_b

64="mU/3SK

C

A

jd5FP8

>

B7H

c

V

N

EJ

r

q

9L

0n

2

R

D

T

w

G

y

+

Q

u

M

f

W

o

Z

k

z

X

I

O

<latexi sh

1_b

64="

9

jFC

3A

7nJPckW

OI

>

B8

V

NS

E

Ur q/

QLy

Rv

5

2

o

+

z

T

D

Gm

Zu

Y

w

X

H

0

K

M

g

d

p

f

<latexi sh

1_b

64="

9

jFC

3A

7nJPckW

OI

>

B8

V

NS

E

Ur q/

QLy

Rv

5

2

o

+

z

T

D

Gm

Zu

Y

w

X

H

0

K

M

g

d

p

f

<latexi sh

1_b

64="mU/3SK

C

A

jd5FP8

>

B7H

c

V

N

EJ

r

q

9L

0n

2

R

D

T

w

G

y

+

Q

u

M

f

W

o

Z

k

z

X

I

O

<latexi sh

1_b

64="mU/3SK

C

A

jd5FP8

>

B7H

c

V

N

EJ

r

q

9L

0n

2

R

D

T

w

G

y

+

Q

u

M

f

W

o

Z

k

z

X

I

O

<latexi sh

1_b

64="

9

jFC

3A

7nJPckW

OI

>

B8

V

NS

E

Ur q/

QLy

Rv

5

2

o

+

z

T

D

Gm

Zu

Y

w

X

H

0

K

M

g

d

p

f

<latexi sh

1_b

64="mU/3SK

C

A

jd5FP8

>

B7H

c

V

N

EJ

r

q

9L

0n

2

R

D

T

w

G

y

+

Q

u

M

f

W

o

Z

k

z

X

I

O

<latexi sh

1_b

64="

9

jFC

3A

7nJPckW

OI

>

B8

V

NS

E

Ur q/

QLy

Rv

5

2

o

+

z

T

D

Gm

Zu

Y

w

X

H

0

K

M

g

d

p

f

<latexi sh

1_b

64="X2

/z dTSH57P

O

MIr+WFV

g

>A

B

n

c

DL

N

q

Z

E

o

vp

y

0

U

mk3

J

Q

R

8

u

w

G

f

9

Y

K

j

C

<latexi sh

1_b

64="mU/3SK

C

A

jd5FP8

>

B7H

c

V

N

EJ

r

q

9L

0n

2

R

D

T

w

G

y

+

Q

u

M

f

W

o

Z

k

z

X

I

O

)

<latexi sh

1_b

64="X2

/z dTSH57P

O

MIr+WFV

g

>A

B

n

c

DL

N

q

Z

E

o

vp

y

0

U

mk3

J

Q

R

8

u

w

G

f

9

Y

K

j

C

<latexi sh

1_b

64="X2

/z dTSH57P

O

MIr+WFV

g

>A

B

n

c

DL

N

q

Z

E

o

vp

y

0

U

mk3

J

Q

R

8

u

w

G

f

9

Y

K

j

C

<latexi sh

1_b

64="X2

/z dTSH57P

O

MIr+WFV

g

>A

B

n

c

DL

N

q

Z

E

o

vp

y

0

U

mk3

J

Q

R

8

u

w

G

f

9

Y

K

j

C

<latexi sh

1_b

64="X2

/z dTSH57P

O

MIr+WFV

g

>A

B

n

c

DL

N

q

Z

E

o

vp

y

0

U

mk3

J

Q

R

8

u

w

G

f

9

Y

K

j

C

<latexi sh

1_b

64="X2

/z dTSH57P

O

MIr+WFV

g

>A

B

n

c

DL

N

q

Z

E

o

vp

y

0

U

mk3

J

Q

R

8

u

w

G

f

9

Y

K

j

C

<latexi sh

1_b

64="JPMXk9

d

zmAr5W

OKo

E

7v

>

B

n

c

VDLSgN

y

fUY

2

Q

8

I

H

Z

w

F

p

3

G

jq

T

/

R

u

0

+

C

y

k

<latexi sh

1_b

64="JPMXk9

d

zmAr5W

OKo

E

7v

>

B

n

c

VDLSgN

y

fUY

2

Q

8

I

H

Z

w

F

p

3

G

jq

T

/

R

u

0

+

C

<latexi sh

1_b

64="c

ZMWAfoFGCJ

EuNwpKvO

3n

>

B

VDLSg

y

r

UY9

P

2

Q

8

I5

H

m

d

k

jq

T

0

R

+

/

X

<latexi sh

1_b

64="c

ZMWAfoFGCJ

EuNwpKvO

3n

>

B

VDLSg

y

r

UY9

P

2

Q

8

I5

H

m

d

k

jq

T

0

R

+

/

X

<latexi sh

1_b

64="JPMXk9

d

zmAr5W

OKo

E

7v

>

B

n

c

VDLSgN

y

fUY

2

Q

8

I

H

Z

w

F

p

3

G

jq

T

/

R

u

0

+

C

<latexi sh

1_b

64="JPMXk9

d

zmAr5W

OKo

E

7v

>

B

n

c

VDLSgN

y

fUY

2

Q

8

I

H

Z

w

F

p

3

G

jq

T

/

R

u

0

+

C

<latexi sh

1_b

64="

9

jFC

3A

7nJPckW

OI

>

B8

V

NS

E

Ur q/

QLy

Rv

5

2

o

+

z

T

D

Gm

Zu

Y

w

X

H

0

K

M

g

d

p

f

k

k

y

k

ˆ

x

(

y

k

)

y

0

H

O

N

y

k y 0 The noise level plays a key role in this sampling framework. If the noise is low, denoising (jump step) becomes easier, with lower variance, while sampling a 'less smooth' p ( y ) (walk step) becomes harder. If the noise is high, the opposite is true.

ˆ x ( y k ) ˆ x ( y k ) Figure 3 illustrates an example of a walk-jump sampling chain, where generated molecules change gradually as we walk through the chain (the clean samples are shown every ten steps, ∆ k =10 ). This figure is a demonstration of the fast-mixing properties of our sampling scheme in generating 3D molecules. For instance, some atoms (or other structures like rings) might appear/disappear/change as we move through the chain. Interestingly, this behavior happened on most chains we looked into explicitly.

3.4 Recovering atomic coordinates from voxelized molecules

It is often useful to extract atomic coordinates from generated voxelized molecules ( e.g. , to validate atomic valences and bond types or compare with other models). We use a very simple algorithm (a simplified version of the approach used in [33]) to recover the set of atomic coordinates from generated voxel grids: first we set to 0 all voxels with value less than .1, i.e. , x k = ✶ ≥ . 1 ( x k ) . Then we run a simple peak detection to locate the voxel on the center of each Gaussian blob (corresponding to the center of each atom). Finally we run a simple gradient descent coordinate optimization algorithm to find the set of points that best create the generated voxelized molecule. Once we have obtained the optimized atomic coordinates, we follow previous work [33, 18, 17, 20] and use standard cheminformatics software to determine the molecule's atomic bonds. Figure 4 shows our pipeline to recover atomic coordinates and molecular graphs from generated voxelized molecules. See appendix for more details.

4 Experiments

In this section, we evaluate the performance of our model on the task of unconditional 3D molecule generation. Our approach is the first of its kind and therefore the objective of our experiments is to show that (i) VoxMol is a feasible approach for unconditional generation (this is non-trivial) and (ii) it scales well with data, beating a established model on a large, drug-like dataset. In principle, VoxMol can be used for guided (or conditional) generation, an arguably more useful application for molecular sciences (see appendix for a discussion on how guidance can be used on generation).

We start with a description of our experimental setup, followed by results on two popular datasets for this problem. We then show ablation studies performed on different components of the model.

4.1 Experimental setup

Architecture. The denoising network ˆ x θ is used in both the walk and jump steps described above. Therefore, its parametrization is very important to the performance of this approach. We use a 3D U-Net [87] architecture for our denoising network. We follow the same architecture recipe as DDPM[34], with two differences: we use 3D convnets instead of 2D and we use fewer channels on all layers. The model has 4 levels of resolution and we use self-attention on the two lowest resolutions. Weaugment our dataset during training by applying random rotation and translation to every training sample. Our models are trained with noise level σ = . 9 , unless stated otherwise. We train our models with batch size of 128 and 64 (for QM9 and GEOM-drugs, respectively) and we use AdamW [88]

<latexi sh

1_b

64="

9

jFC

3A

7nJPckW

OI

>

B8

V

NS

E

Ur q/

QLy

Rv

5

2

o

+

z

T

D

Gm

Zu

Y

w

X

H

0

K

M

g

d

p

f

<latexi sh

1_b

64="

9

jFC

3A

7nJPckW

OI

>

B8

V

NS

E

Ur q/

QLy

Rv

5

2

o

+

z

T

D

Gm

Zu

Y

w

X

H

0

K

M

g

d

p

f

<latexi sh

1_b

64="d/R

c

SM

Ev

p

An

L8To

f

>

B

H

VD

gN

Oz

G

r

Y

3

Q

Z

UCy

J

m

X

k

w

I

K

q

2

j

7

0W

P

5

u

+

F

9

<latexi sh

1_b

64="d/R

c

SM

Ev

p

An

L8To

f

>

B

H

VD

gN

Oz

G

r

Y

3

Q

Z

UCy

J

m

X

k

w

I

K

q

2

j

7

0W

P

5

u

+

F

9

<latexi sh

1_b

64="9MCp7Z

G5/+

kPD

J

I

w3

Qo

>A

B

n

c

V

LS

N

F

TX

W

q

d

j

UR

8u

g

zEy

f

v

O2

0

K

r

Y

m

H

<latexi sh

1_b

64="YcWNgMQEmo

TZ

y

CzU

PB3

H

>A

9X

VDLS

FJ

2vqk

0

5KIr

Rj

p

G

/

+

dO

w

n

u8

f

7

<latexi sh

1_b

64="mU/3SK

C

A

jd5FP8

>

B7H

c

V

N

EJ

r

q

9L

0n

2

R

D

T

w

G

y

+

Q

u

M

f

W

o

Z

k

z

X

I

O

<latexi sh

1_b

64="X2

/z dTSH57P

O

MIr+WFV

g

>A

B

n

c

DL

N

q

Z

E

o

vp

y

0

U

mk3

J

Q

R

8

u

w

G

f

9

Y

K

j

C

find

peaks

atomic

bonds

y

k

-

1

y

k

+1

y

k

ˆ

x

(

y

k

)

sample

voxelized molecules

[H][N]=[C]1[C]([H])=[C]([H])[C]2=[N]O[C](=[O])N12

…

(learning rate 2 × 10 -5 , weight decay 10 -2 ) to optimize the weights. The weights are updated with exponential moving average with a decay of .999. We use γ =1 . 0 , u =1 . 0 and δ = . 5 for all our MCMC samplings. See appendix for more details on the architecture, training and sampling.

find OLD: Datasets. Weconsider two popular datasets for this task: QM9 [40] and GEOM-drugs [41]. QM9 contains small molecules with up to 9 heavy atoms (29 if we consider hydrogen atoms). GEOM-drugs contains multiple conformations for 430k drug-sized molecules and its molecules have 44 atoms on average (up to 181 atoms and over 99% are under 80 atoms). We use grids of dimension 32 3 and 64 3 for QM9andGEOM-drugs respectively. These volumes are able to cover over 99.8% of all points on both datasets. All our models model hydrogens explicitly. For QM9, we consider all 5 chemical elements (C, H,O,NandF)presentonthedataset. For GEOM-drugs, we consider 8 elements (C, H, O, N, F, S, Cl and Br). We ignore P, I and B elements as they appear in less than .1% of the molecules in the dataset. Finally, the input voxel grids are of dimension R 5 × 32 × 32 × 32 and R 8 × 64 × 64 × 64 for QM9 and GEOM-drugs, respectively. We perform the same pre-processing and dataset split as [20] and end up with 100K/20K/13K molecules for QM9 and 1.1M/146K/146K for GEOM-drugs (train, validation, test splits respectively).

peaks post-processing [H][N]=[C]1[C]([H])=[C]([H]) [C]2=[N]O[C](=[O])N12 y k -1 y k y k +1 ˆ x ( y k ) determine connectivity determine bonds SMILES, graph, etc. Baselines. Wecompareourmethodwithtwostate-of-the-artapproaches: GSchNet [47], a point-cloud autoregressive model and EDM [15], a point-cloud diffusion-based model. We note that both methods rely on equivariant networks, while ours does not. Our results could potentially be improved by successfully exploiting equivariant 3D convolutional networks. We also show results of VoxMoloracle in our mainresults, where we assume we have access to real samples from the noisy distribution. Instead of performing MCMC to sample y k , we sample molecules from the validation set and add noise to them. This baseline assumes we would have perfect sampling of noisy samples (walk step) and let us assess the quality of our model to recover clean samples. It serves as an upper bound for our model and allows us to disentangle the quality of the walk (sampling noisy samples) and jump (estimating clean molecules) steps.

RDKit post-processing All methods generate molecules as a set of atom types and their coordinates (in the case of voxelized molecules, we use the post-processing described above to get the atomic coordinates). We follow previous work [33, 18, 17, 20] and use standard cheminformatics software to determine the molecule's atomic bonds given the atomic coordinates 6 . Using the same post-processing for all methods allows a more apples-to-apples comparison of the models.

Metrics. Most metrics we use to benchmark our model come from [20] 7 . Wedraw 10,000 samples from each method and measure performance with the following metrics: stable mol and stable atom , the percentage of stable molecules and atoms, respectively, as defined in [15]; validity , the percentage of generated molecules that passes RDKit [90]'s sanitization filter; uniqueness , the proportion of valid molecules that have different canonical SMILES; valency W 1 , the Wasserstein distance between the distribution of valencies in the generated and test set; atoms TV and bonds TV , the total variation

[H][N]=[C]1[C]([H])=[C]([H])[C]2=[N]O[C](=[O])N12

<latexi sh

1_b

64="9MCp7Z

G5/+

kPD

J

I

w3

Qo

>A

B

n

c

V

LS

N

F

TX

W

q

d

j

UR

8u

g

zEy

f

v

O2

0

K

r

Y

m

H

<latexi sh

1_b

64="

9

jFC

3A

7nJPckW

OI

>

B8

V

NS

E

Ur q/

QLy

Rv

5

2

o

+

z

T

D

Gm

Zu

Y

w

X

H

0

K

M

g

d

p

f

<latexi sh

1_b

64="mU/3SK

C

A

jd5FP8

>

B7H

c

V

N

EJ

r

q

9L

0n

2

R

D

T

w

G

y

+

Q

u

M

f

W

o

Z

k

z

X

I

O

<latexi sh

1_b

64="X2

/z dTSH57P

O

MIr+WFV

g

>A

B

n

c

DL

N

q

Z

E

o

vp

y

0

U

mk3

J

Q

R

8

u

w

G

f

9

Y

K

j

C

between the distribution of atom types and bond types, respectively; bond length W 1 and bond angle W 1 , the Wasserstein distance between the distribution of bond and lengths, respectively. Finally, we also report the strain energy metric proposed in [91]. This metric is defined as the difference between the internal energy of the generated molecule's pose and a relaxed pose of the molecule. The relaxation and the energy are computed using the Universal Force Field (UFF) [92] within RDKit. See appendix for more details about the metrics.

4.2 Experimental results

Table 1 and Table 2 show results on QM9 and GEOM-drugs respectively. We report results for models trained with and without data augmentation (VoxMol and VoxMolnorot, respectively) and generate 10,000 samples with multiple MCMC chains. Each chain is initialized with 1,000 warm-up steps, as we observed empirically that it slightly improves the quality of generated samples. Then, samples are generated after each 500 walk steps (each chain having a maximum of 1,000 steps after the warm-up steps). Results for our models are shown with mean/standard deviation among three runs. The row data on both tables are randomly sampled molecules from the training set.

On QM9, VoxMol performs similar to EDM in some metrics while performing worse in others (specially stable molecule, uniqueness and angle lengths). On GEOM-drugs, a more challenging and realistic drug-like dataset, the results are very different: VoxMol outperforms EDM in eight out of nine metrics, often by a considerably large margin .

Figure 5(a,b) shows the cumulative distribution function (CDF) of strain energies for the generated molecules of different models on QM9 and GEOM-drugs, respectively. The closer the CDF of generated molecules from a model is to that of data (samples from training set), the lower is the strain energy of generated molecules. The ground truth data has median strain energy of 43.87 and 54.95 kcal/mol for QM9 and GEOM-drugs, respectively. On QM9, all models have median strain energy around the same ballpark: 52.58, 66.32 and 56.54 kcal/mol for EDM, VoxMolnorot and VoxMol, respectively. OnGEOM-drugs, the molecules generated by VoxMol have considerably lower median strain energy than EDM : 951.23 kcal/mol for EDM versus 286.06 and 171.57 for VoxMolno rot and VoxMol.

We observe, as expected, that augmenting the training data with random rotations and translations improves the performance of the model. The improvement is bigger on QM9 (smaller dataset) than on GEOM-drugs. In particular, the augmentations help to capture the distribution of bonds and angles between atoms and to generate more unique molecules. We note that, unlike EDM, our model does not require knowledge of the number of atoms beforehand (neither for training nor sampling). In fact, Figure 6 show that our model learns the approximate distribution of the number of atoms per molecule on both datasets. Implicitly learning this distribution can be particularly useful in applications related to in-painting ( e.g. , pocket conditioning, linking, scaffold conditioning). Finally, our method generates drug-like molecules in fewer iterations and is faster than EDM on average (see Table 3). EDM sampling time scales quadratically with the number of atoms, while ours has constant time (but scales cubically with grid dimensions).

These results clearly show one of the main advantages of our approach: a more expressive model scales better with data. Architecture inductive biases (such as built-in SE(3) equivariance) are helpful in the setting of small dataset and small molecules. However, on the large-scale regime, a more expressive model is more advantageous in capturing the modes of the distribution we want to model. Compared

(a)

(b)

(c)

(a)

(b)

QM9

GEOM-drugs

1.0

1.0

prob

0.8

一

data

b

prob

ative

e

0.6

VoxMol (oracle)

VoxMol(norot)

ative

e

0.6

data

0.4

0.4

EDM

m

E

VoxMol

C

0.2

C

0.2

VoxMol(norot)

VoxMol(oracle)

0.0

0.0

101

102

103

101

102

103

104

StrainEnergy(UFF,kcal/mol)

(c)

(a)

(b)

(a)

(b)

QM9

GEOM-drugs

0.14

data

0.040

data

0.12

VoxMol

0.035

VoxMol

0.10

0.030

0.08

0.025

0.06

0.020

0.015

0.04

0.010

0.02

0.005

0.00

0

5

10

15

20

25

30

35

40

0.000

0

20

40

60

80

100

#atoms/molecule

#atoms/molecule

to VoxMoloracle results, we see that VoxMol can still be vastly improved. We can potentially close this gap by improving the quality of the denoising network ( e.g. , by improving the architecture, train on more data, efficient built-in SE(3)-equivariance CNNs, etc).

4.3 Ablation studies

Noise level σ . Unlike diffusion models, the noise level is considered fixed during training and sampling. It is an important hyperparameter as it poses a trade-off between the quality of the walk step (Langevin MCMC) and the jump step (empirical Bayes). The ideal noise level is the highest possible value such that the network can still learn how to denoise. We train models on QM9 with σ in { . 6 , . 7 , ..., 1 . 2 } , while keeping all other hyperparameters the same. Figure 7(a,b,c) shows how noise level σ influences the performance on the validation set. While most metrics get better as the noise level increases, others (like stable molecules and valency W1) get worse after a value. We observe empirically that σ = . 9 is the sweet spot level that achieves better overall performance on the validation set of QM9.

Number of steps ∆ k . Table 3 shows how VoxMol's performance on GEOM-drugs change with the number of walk steps ∆ k on the Langevin MCMC sampling. In this experiment, we use the same trained model and only change the number of steps during sampling. Results of EDM are also shown for comparison (it always requires 1,000 diffusion steps for generation). We see that some metrics barely change, while others improve as ∆ k increases. The average time (in seconds) to generate a

(a)

(b)

(c)

(a)

(b)

(c)

molecule increases linearly with the number of steps, as expected. We observe that even using 500 steps, our model is still faster than EDM on average, while achieving better performance in these metrics. Remarkably, with only 50 steps, VoxMol already outperforms EDM in most metrics, while being an order of magnitude faster on average.

Atomic density radii. Wealso assess how the performance of the model changes with respect to the size of atomic radii chosen during the voxelization step (while always keeping the resolution of the grid fixed at .25Å). See appendix for how this is done. We tried four different values for the radii (same for all elements): .25, .5, .75 and 1.0. We observe-throughout different versions of the model, with different hyperparameters-that using a fixed radius of .5 consistently outperform other values. Training does not converge with radius .25 and quality of generated samples degrades as we increase the radius. We also tried to use Van der Waals radii (where each atom type would have their own radius), but results were also not improved.

5 Conclusion

Weintroduce VoxMol, a novel score-based method for 3D molecule generation. This method generates molecules in a fundamentally different way than the current state of the art ( i.e. , diffusion models applied to atoms). The noise model used is also novel in the class of score-based generative models for molecules. Werepresent molecules on regular voxel grids and VoxMol is trained to predict 'clean' molecules from its noised counterpart. The denoising model (which approximates the score function of the smoothed density) is used to sample voxelized molecules with walk-jump sampling strategy. Finally atomic coordinates are retrieved by extracting the peaks from the generated voxel grids. Our experiments show that VoxMol scales better with data and outperforms (by a large margin) a representative state of the art point cloud-based diffusion model on GEOM-drugs, while being faster to generate samples.

Broader impact. Generating molecules conditioned on some desiderata can have huge impacts in many different domains, such as, drug discovery, biology, materials, agriculture, climate, etc. This work deals with unconditional 3D molecule generation (in a pure algorithmic way): a problem that can be seen as an initial stepping stone (out of many) to this long-term objective. We, as a society, need to find solutions to use these technologies in ways that are safe, ethical, accountable and exclusively beneficial to society. These are important concerns and they need to be thought of at the same time we design machine learning algorithms.

Acknowledgements. The authors would like to thank the whole Prescient Design team for helpful discussions and Genentech's HPC team for providing a reliable environment to train/analyse models.

References

Saeed Saremi and Aapo Hyvarinen. Neural empirical Bayes. JMLR , 2019.

Tobias Fink, Heinz Bruggesser, and Jean-Louis Reymond. Virtual exploration of the small-molecule chemical universe below 160 daltons. Angewandte Chemie International Edition , 2005.

Jiankun Lyu, Sheng Wang, Trent E Balius, Isha Singh, Anat Levit, Yurii S Moroz, Matthew J O'Meara, Tao Che, Enkhjargal Algaa, Kateryna Tolmachova, et al. Ultra-large library docking for discovering new chemotypes. Nature , 2019.

Regine S Bohacek, Colin McMartin, and Wayne C Guida. The art and practice of structure-based drug design: a molecular modeling perspective. Medicinal research reviews , 1996.

Camille Bilodeau, Wengong Jin, Tommi Jaakkola, Regina Barzilay, and Klavs F Jensen. Generative models for molecular discovery: Recent advances and challenges. Computational Molecular Science , 2022.

David Weininger. Smiles, a chemical language and information system. 1. introduction to methodology and encoding rules. Journal of chemical information and computer sciences , 1988.

Mario Krenn, Florian Häse, AkshatKumar Nigam, Pascal Friederich, and Alan Aspuru-Guzik. Selfreferencing embedded strings (selfies): A 100% robust molecular string representation. Machine Learning: Science and Technology , 2020.

Marwin HS Segler, Thierry Kogej, Christian Tyrchan, and Mark P Waller. Generating focused molecule libraries for drug discovery with recurrent neural networks. ACS central science , 2018.

Thomas Blaschke, Marcus Olivecrona, Ola Engkvist, Jürgen Bajorath, and Hongming Chen. Application of generative autoencoder in de novo molecular design. Molecular informatics , 2018.

Gabriel Lima Guimaraes, Benjamin Sanchez-Lengeling, Carlos Outeiral, Pedro Luis Cunha Farias, and Alán Aspuru-Guzik. Objective-reinforced generative adversarial networks (organ) for sequence generation models. arXiv preprint arXiv:1705.10843 , 2017.

Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Junction tree variational autoencoder for molecular graph generation. In ICML , 2018.

Yujia Li, Oriol Vinyals, Chris Dyer, Razvan Pascanu, and Peter Battaglia. Learning deep generative models of graphs. arXiv preprint arXiv:1803.03324 , 2018.

Jiaxuan You, Rex Ying, Xiang Ren, William L. Hamilton, and Jure Leskovec. Graphrnn: A deep generative model for graphs. In ICML , 2018.

Omar Mahmood, Elman Mansimov, Richard Bonneau, and Kyunghyun Cho. Masked graph modeling for molecule generation. Nature Communications , 2021.

Emiel Hoogeboom, Víctor Garcia Satorras, Clément Vignac, and Max Welling. Equivariant diffusion for molecule generation in 3D. In ICML , 2022.

Minkai Xu, Lantao Yu, Yang Song, Chence Shi, Stefano Ermon, and Jian Tang. Geodiff: A geometric diffusion model for molecular conformation generation. In ICLR , 2022.

Ilia Igashov, Hannes Stärk, Clement Vignac, Victor Garcia Satorras, Pascal Frossard, Max Welling, Michael M Bronstein, and Bruno Correia. Equivariant 3d-conditional diffusion models for molecular linker design. In NeurIPS, AI for ScienceWorkshop , 2022.

Arne Schneuing, Yuanqi Du, Charles Harris, Arian Jamasb, Ilia Igashov, Weitao Du, Tom Blundell, Pietro Lió, Carla Gomes, Max Welling, et al. Structure-based drug design with equivariant diffusion models. arXiv preprint arXiv:2210.13695 , 2022.

Gabriele Corso, Hannes Stärk, Bowen Jing, Regina Barzilay, and Tommi S. Jaakkola. Diffdock: Diffusion steps, twists, and turns for molecular docking. In ICLR , 2023.

Clement Vignac, Nagham Osman, Laura Toni, and Pascal Frossard. Midi: Mixed graph and 3d denoising diffusion for molecule generation. arXiv preprint arXiv:2302.09048 , 2023.

Nathaniel Thomas, Tess Smidt, Steven Kearnes, Lusann Yang, Li Li, Kai Kohlhoff, and Patrick Riley. Tensor field networks: Rotation-and translation-equivariant neural networks for 3d point clouds. arXiv preprint arXiv:1802.08219 , 2018.

Bowen Jing, Stephan Eismann, Patricia Suriana, Raphael JL Townshend, and Ron Dror. Learning from protein structure with geometric vector perceptrons. ICLR , 2021.

Vıctor Garcia Satorras, Emiel Hoogeboom, and Max Welling. E (n) equivariant graph neural networks. In ICML , 2021.

Mario Geiger and Tess Smidt. e3nn: Euclidean neural networks. arXiv preprint arXiv:2207.09453 , 2022.

Yi-Lun Liao and Tess Smidt. Equiformer: Equivariant graph attention transformer for 3d atomistic graphs. ICLR , 2023.

Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? ICLR , 2019.

Christopher Morris, Martin Ritzert, Matthias Fey, William L Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and leman go neural: Higher-order graph neural networks. In AAAI , 2019.

Haggai Maron, Heli Ben-Hamu, Hadar Serviansky, and Yaron Lipman. Provably powerful graph networks. Neurips , 32, 2019.

Ilyes Batatia, David P Kovacs, Gregor Simm, Christoph Ortner, and Gábor Csányi. MACE: Higher order equivariant message passing neural networks for fast and accurate force fields. Neurips , 35:11423-11436, 2022.

Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929 , 2020.

Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems , 25, 2012.

Nate Gruver, Marc Finzi, Micah Goldblum, and Andrew Gordon Wilson. The Lie derivative for measuring learned equivariance. arXiv preprint arXiv:2210.02984 , 2022.

Matthew Ragoza, Tomohide Masuda, and David Ryan Koes. Learning a continuous representation of 3d molecular structures with deep generative models. In Neurips, Structural Biology workshop , 2020.

Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In NeurIPS , 2020.

Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis. NeurIPS , 2021.

Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In CVPR , 2022.

Saeed Saremi and Rupesh Kumar Srivastava. Multimeasurement generative models. ICLR , 2022.

Saeed Saremi, Rupesh Kumar Srivastava, and Francis Bach. Universal smoothed score functions for generative modeling. arXiv preprint arXiv:2303.11669 , 2023.

Nathan C Frey, Dan Berenberg, Joseph Kleinhenz, Isidro Hotzel, Julien Lafrance-Vanasse, Ryan Lewis Kelly, Yan Wu, Arvind Rajpal, Stephen Ra, Richard Bonneau, Kyunghyun Cho, Andreas Loukas, Vladimir Gligorijevic, and Saeed Saremi. Learning protein family manifolds with smoothed energy-based models. In ICLR, Workshop on Physics for Machine Learning , 2023.

Zhenqin Wu, Bharath Ramsundar, Evan N Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S Pappu, Karl Leswing, and Vijay Pande. Moleculenet: a benchmark for molecular machine learning. Chemical science , 2018.

Simon Axelrod and Rafael Gomez-Bombarelli. Geom, energy-annotated molecular conformations for property prediction and molecular generation. Scientific Data , 2022.

Miha Skalic, José Jiménez, Davide Sabbadin, and Gianni De Fabritiis. Shape-based generative modeling for de novo drug design. Journal of chemical information and modeling , 2019.

Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. In ICLR , 2014.

Lvwei Wang, Rong Bai, Xiaoxuan Shi, Wei Zhang, Yinuo Cui, Xiaoman Wang, Cheng Wang, Haoyu Chang, Yingsheng Zhang, Jielong Zhou, et al. A pocket-based 3d molecule generative model fueled by experimental electron density. Scientific reports , 2022.

Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yosh Bengio. Generative adversarial nets. In NIPS , 2014.

Fergus Imrie, Thomas E Hadfield, Anthony R Bradley, and Charlotte M Deane. Deep generative design with 3d pharmacophoric constraints. Chemical science , 2021.

Niklas Gebauer, Michael Gastegger, and Kristof Schütt. Symmetry-adapted generation of 3d point sets for the targeted discovery of molecules. In NeurIPS , 2019.

Niklas Gebauer, Michael Gastegger, and Kristof T Schütt. Generating equilibrium molecules with deep neural networks. arXiv preprint arXiv:1810.11347 , 2018.

Youzhi Luo and Shuiwang Ji. An autoregressive flow model for 3d molecular geometry generation from scratch. In ICLR , 2022.

Jonas Köhler, Leon Klein, and Frank Noé. Equivariant flows: exact likelihood generative learning for symmetric densities. In ICML , 2020.

Victor Garcia Satorras, Emiel Hoogeboom, Fabian Fuchs, Ingmar Posner, and Max Welling. E (n) equivariant normalizing flows. In NeurIPS , 2021.

Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In ICML , 2015.

Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In ICML , 2015.

Lei Huang, Hengtong Zhang, Tingyang Xu, and Ka-Chun Wong. Mdm: Molecular diffusion model for 3d molecule generation. arXiv preprint arXiv:2209.05710 , 2022.

Lemeng Wu, Chengyue Gong, Xingchao Liu, Mao Ye, et al. Diffusion-based molecule generation with informative prior bridges. In NeurIPS , 2022.

Minkai Xu, Alexander Powers, Ron Dror, Stefano Ermon, and Jure Leskovec. Geometric latent diffusion models for 3d molecule generation. In ICML , 2023.

Elman Mansimov, Omar Mahmood, Seokho Kang, and Kyunghyun Cho. Molecular geometry prediction using a deep generative graph neural network. Scientific Reports , 2019.

Gregor NC Simm and José Miguel Hernández-Lobato. A generative model for molecular distance geometry. ICML , 2020.

Frank Noé, Simon Olsson, Jonas Köhler, and Hao Wu. Boltzmann generators: Sampling equilibrium states of many-body systems with deep learning. Science , 2019.

Gregor NC Simm, Robert Pinsler, Gábor Csányi, and José Miguel Hernández-Lobato. Symmetry-aware actor-critic for 3d molecular design. arXiv preprint arXiv:2011.12747 , 2020.

Octavian Ganea, Lagnajit Pattanaik, Connor Coley, Regina Barzilay, Klavs Jensen, William Green, and Tommi Jaakkola. Geomol: Torsional geometric generation of molecular 3d conformer ensembles. In NeurIPS , 2021.

Xingang Peng, Shitong Luo, Jiaqi Guan, Qi Xie, Jian Peng, and Jianzhu Ma. Pocket2mol: Efficient molecular sampling based on 3d protein pockets. In ICML , 2022.

Chence Shi, Shitong Luo, Minkai Xu, and Jian Tang. Learning gradient fields for molecular conformation generation. In ICML , 2021.

Bowen Jing, Gabriele Corso, Jeffrey Chang, Regina Barzilay, and Tommi Jaakkola. Torsional diffusion for molecular conformer generation. arXiv preprint arXiv:2206.01729 , 2022.

Siyu Long, Yi Zhou, Xinyu Dai, and Hao Zhou. Zero-shot 3d drug design by sketching and generating. In NeurIPS , 2022.

Keir Adams and Connor W Coley. Equivariant shape-conditioned generation of 3d molecules for ligand-based drug design. arXiv preprint arXiv:2210.04893 , 2022.

Jiaqi Guan, Wesley Wei Qian, Xingang Peng, Yufeng Su, Jian Peng, and Jianzhu Ma. 3d equivariant diffusion for target-aware molecule generation and affinity prediction. ICLR , 2023.

Matthew Ragoza, Tomohide Masuda, and David Ryan Koes. Generating 3d molecules conditional on receptor binding sites with deep generative models. Chemical science , 2022.

David Schaller, Dora Šribar, Theresa Noonan, Lihua Deng, Trung Ngoc Nguyen, Szymon Pach, David Machalz, Marcel Bermudez, and Gerhard Wolber. Next generation 3d pharmacophore modeling. Wiley Interdisciplinary Reviews: Computational Molecular Science , 2020.

Raphael JL Townshend, Martin Vögele, Patricia Suriana, Alexander Derry, Alexander Powers, Yianni Laloudakis, Sidhika Balachandar, Bowen Jing, Brandon Anderson, Stephan Eismann, et al. Atom3d: Tasks on molecules in three dimensions. NeurIPS , 2020.

Zhijian Liu, Haotian Tang, Yujun Lin, and Song Han. Point-voxel cnn for efficient 3d deep learning. In NeurIPS , 2019.

Maurice Weiler, Mario Geiger, Max Welling, Wouter Boomsma, and Taco S Cohen. 3d steerable cnns: Learning rotationally equivariant features in volumetric data. NeurIPS , 2018.

Ivan Diaz, Mario Geiger, and Richard Iain McKinley. An end-to-end se (3)-equivariant segmentation network. arXiv preprint arXiv:2303.00351 , 2023.

Jiehong Lin, Hongyang Li, Ke Chen, Jiangbo Lu, and Kui Jia. Sparse steerable convolutions: An efficient learning of se (3)-equivariant features for estimation and tracking of object poses in 3d space. NeurIPS , 2021.

Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In CVPR , 2015.

Diane Bouchacourt, Mark Ibrahim, and Ari Morcos. Grounding inductive biases in natural images: invariance stems from variations in data. In NeurIPS , 2021.

Daniel Flam-Shepherd and Alán Aspuru-Guzik. Language models can generate molecules, materials, and protein binding sites directly in three dimensions as xyz, cif, and pdb files. arXiv preprint arXiv:2305.05708 , 2023.

Matthew Ragoza, Joshua Hochuli, Elisa Idrobo, Jocelyn Sunseri, and David Ryan Koes. Protein-ligand scoring with convolutional neural networks. Journal of chemical information and modeling , 2017.

Michael Maser and SE Reisman. 3d computer vision models predict dft-level homo-lumo gap energies from force-field-optimized geometries. ChemRvix , 2021.

Herbert Ellis Robbins. An empirical Bayes approach to statistics. In Proc. 3rd Berkeley Symp. Math. Statist. Probab., 1956 , 1956.

Koichi Miyasawa. An empirical bayes estimator of the mean of a normal population. Bull. Inst. Internat. Statist , 1961.

Aapo Hyvärinen. Estimation of non-normalized statistical models by score matching. JMLR , 2005.

Giorgio Parisi. Correlation functions and computer simulations. Nuclear Physics B , 1981.

Xiang Cheng, Niladri S. Chatterji, Peter L. Bartlett, and Michael I. Jordan. Underdamped Langevin MCMC: Anon-asymptotic analysis. In COLT , 2018.

Matthias Sachs, Benedict Leimkuhler, and Vincent Danos. Langevin dynamics with variable coefficients and nonconservative forces: from stationary states to numerical methods. Entropy , 2017.

Saeed Saremi, Ji Won Park, and Francis Bach. Chain of log-concave Markov chains. arXiv preprint arXiv:2305.19473 , 2023.

Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In MICCAI , 2015.

Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In ICLR , 2019.

Noel M O'Boyle, Michael Banck, Craig A James, Chris Morley, Tim Vandermeersch, and Geoffrey R Hutchison. Open babel: An open chemical toolbox. Journal of cheminformatics , 2011.

Greg Landrum. Rdkit: Open-source cheminformatics software, 2016.

Charles Harris, Kieran Didi, Arian R Jamasb, Chaitanya K Joshi, Simon V Mathis, Pietro Lio, and Tom Blundell. Benchmarking generated poses: How rational is structure-based drug design with generative models? arXiv preprint arXiv:2308.07413 , 2023.

Anthony K Rappé, Carla J Casewit, KS Colwell, William A Goddard III, and W Mason Skiff. Uff, a full periodic table force field for molecular mechanics and molecular dynamics simulations. Journal of the American chemical society , 1992.

Lin Li, Chuan Li, and Emil Alexov. On the modeling of polar component of solvation energy using smooth gaussian-based dielectric function. Journal of Theoretical and Computational Chemistry , 2014.

Gabriele Orlando, Daniele Raimondi, Ramon Duran-Romaña, Yves Moreau, Joost Schymkowitz, and Frederic Rousseau. Pyuul provides an interface between biological structures and deep learning algorithms. Nature communications , 2022.

Yuxin Wu and Kaiming He. Group normalization. In ECCV , 2018.

Stefan Elfwing, Eiji Uchibe, and Kenji Doya. Sigmoid-weighted linear units for neural network function approximation in reinforcement learning. Neural Networks , 2018.

Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. In NeurIPS , 2019.

A Extra implementation details

A.1 Voxel representation

Molecules in our datasets are converted into voxelized atomic densities. For each molecule, we consider a box around its center and divide it into discrete volume elements. We follow [93, 94] and first convert each atom (of each molecule) into 3D Gaussian-like densities:

where V a is defined as the fraction of occupied volume by atom a of radius r a at distance d from its center. Although we could consider a different radius for each element, in this work we consider all atoms to have the same radius r a = . 5 Å. The occupancy of each voxel in the grid is computed by integrating the occupancy generated by every atom in a molecule:

where N a is the number of atoms in the molecule, a n is the n th atom, C i,j,k are the coordinates (i,j,k) in the grid and x n is the coordinates of the center of atom n [93]. The occupancy takes the maximum value of 1 at the center of the atom and goes to 0 as it moves away from it. Every channel is considered independent of one another and they do not interact nor share volumetric contributions. We use the python package PyUUL [94] to generate the voxel grids from the raw molecules ( .xyz or .sdf format).

We use grids with 32 3 voxels on QM9 and 64 3 on GEOM-drugs and place the molecules on the center of the grid. These volumes are able to cover over 99% of all points in the datasets. We use all 5 chemical elements present on the dataset (C, H, O, N and F), while for GEOM-drugs, we use 8 (C, H, O, N, F, S, Cl and Br). We model hydrogen explicitly in all our experiments. Finally, the input voxel grids are of dimension R 5 × 32 × 32 × 32 and R 8 × 64 × 64 × 64 for QM9 and GEOM-drugs, respectively. Weaugment the dataset during training by applying random rotation and translation to the molecules. For rotation, we sample three Euler angles uniformly (between [0 , 2 π ) ) and rotate each training sample. For translation, we randomly shift the center of the molecules on each of the three dimensions by sampling an uniform shift between [0 ,. 25] Å.

A.2 Architecture

Our neural network architecture follows standard encoder-decoder convnet architecture. We use a very similar architecture recipe to DDPM [34]. The model uses four levels of resolution: 32 3 to 4 3 for the QM9 dataset and 64 3 to 8 3 for the GEOM-drugs dataset. The input voxel is embedded into a 32 dimensional space with a grid projection layer (3D convnet with kernel size 3 × 3 × 3 ). Each resolution (on both encoder and decoder) has two convolutional residual blocks. Each block contains a group normalization [95] layer, followed by SiLU [96] non-linearity and a 3D convnet (with kernel size 3 × 3 × 3 ). All convolutions have stride 1 and we pad the feature maps with 1 on each side. We use self-attention layers between the convolutional layers in the two lowest resolutions. We reduce (increase, respectively) the resolution of the encoder (decoder) with 2 × 2 × 2 (stride 1) max-poolings (bilinear-upsampling). The model has skip connections at each resolution to concatenate the encoder feature map with the decoder feature map. We double the number of feature maps at each resolution, except the last resolution where we quadruple. VoxMol has approximately 111M parameters. We also implemented a smaller version (with reduced number of channels per layer) with around 30M. These models achieve performance close to the base model and are faster to train and sample.

A.3 Built-in SE(3) equivariance experiments

In early experiments, we made an attempt at using a SE(3)-equivariant 3D U-Net using steerable convnets [72] for denoising, but initial experiments were not successful. The hypothesis is that a built-in SE(3) equivariant version of our model, VoxMolequi, would be advantageous over the non-equivariant version for the task of molecule generation. We start with the official implementation of [73] and tune several network hyperparameters (related to architecture, optimization and training) so that the network is able to achieve good denoising metrics on QM9. We then use the same procedure to

generate samples as described in the main paper (only switching the network from the non-equivariant to the equivariant version). We tried different sampling hyperparameters, but we were never able to achieve the same performance as non-equivariant VoxMol. Table 4 compares the results of the model with and without built-in SE(3) equivariance.

There might be many reasons why this is the case: (i) the best reconstruction loss we found with the equivariant model is higher than the non-equivariant (approx. 9 . 4 × 10 -5 vs. 5 . 4 × 10 -5 MSEonval. set), (ii) the equivariant model needs more capacity to be competitive with the non-equivariant one (currently it has over 90 × fewer parameters), (iii) something in the sampling procedure needs to be different on the equivariant version (unlikely).

Wehypothesize that if an equivariant version of VoxMol achieves similar (or lower) reconstruction loss as the vanilla version, it will probably achieve competitive/better results in the task of molecule generation. Finally, our equivariant implementation is less efficient (around 50-60% slower) and consumes more memory than the original version. This poses, therefore, an extra challenge to scale up the size of the dataset and the size of the molecules ( e.g. , GEOM-drugs requires 64 3 voxel grid).

A.4 Training and sampling

The weights are optimized with batch size 128 and 64 (for QM9 and GEOM-drugs, respectively), AdamWoptimizer ( β 1 = . 9 , β 2 = . 999 ), learning rate of 10 -5 and weight decay of 10 -2 . The models are trained for 500 epochs on QM9 and around 24 epochs on GEOM-drugs. We discretize the underdamped Langevin MCMC (Equation 4) with the algorithm proposed by Sachs et al. [85] (this has been applied on images before [37]). Algorithm 1 describes this process.

Weuse γ =1 . 0 , u =1 . 0 , δ = . 5 for all samplings and we generate multiple chains in parallel (200 chains for QM9 and 100 for GEOM-drugs). We follow [37] and initialize the chains by adding uniform noise to the initial Gaussian noise (with the same σ used during training), i.e. , y 0 = N (0 ,σ 2 I d )+ U d (0 , 1) (this was observed to mix faster in practice).

All experiments and analysis on this paper were done on A100 GPUs and with PyTorch [97]. The models on QM9 were trained with 2 GPUs and the models on GEOM-drugs on 4 GPUs.

A.5 Recovering atomic coordinates from voxel grid

Figure 4 shows our pipeline to recover atomic coordinates and molecular graphs from generated voxelized molecules. In the first step, we use the model to 'jump' to the data manifold generating a sample in the voxelized representation, x k . We set to 0 all voxels with value less than .1, i.e. , x k = ✶ ≥ . 1 ( x k ) . We then apply a simple peak finding algorithm to find the voxel coordinates corresponding to the peaks in the generated sample. Our peak finding algorithm uses a maximum filter with a 3 × 3 × 3 stencil to find local maxima. Note that this algorithm always returns points on the voxel grid and is therefore limited by the resolution of the discretization.

In order to further refine the atomic coordinates we take advantage of the fact that our voxelization procedure is differentiable to perform gradient based optimization of the coordinates. Specifically we use L-BFGS to optimize the atomic coordinates based on the L2 norm of the reconstruction error in the voxel representation. Note, unlike some previous work [33] we perform peak detection and refinement in a single step and do not perform search over multiple possible numbers of atoms or atom identities.

Table 5 shows the effect of coordinate refinement on molecule generation. We generate molecules on the same setting in the experimental section.

Once we have obtained the optimized atomic coordinates, we follow previous work [33, 18, 17, 20] and use standard cheminformatics software to determine the molecule's atomic bonds.

A.6 Metrics

Most of the metrics used to benchmark models come from [20] 8 . Below we describe the metrics:

Atom stability: the percentage of generated atoms with the right valency. This metric is computed on the raw 3D sample (before any postprocessing), therefore it is more stringent than validity.

Molecule stability : the percentage of generated molecules where all its atoms are stable.

Validity: The percentage of generated molecules that passes RDKit's sanitization filter.

Uniqueness: . The proportion of valid molecules (defined above) that has a unique canonical SMILES (generated with RDKit) representation.

Atoms TV: The total variation between the distribution of bond types in the generated and test set. We consider 5 atom types on QM9 and 8 atom types on GEOM-drugs. The histograms ˆ h atm and h atm are generated by counting the number of each atom type on all molecules on both the generated and real sample set. The total variation is computed as:

Bonds TV: Similar to above, the histograms for real and generated samples are created by counting all bond types on all molecules. The total variation is computed as:

Valency W 1 : This is the weighted sum of the Wasserstein distance between the distribution of valencies for each atom type:

where ˆ h val ( x ) and h val ( x ) are the histogram of valencies for atom type x for generated and holdout set samples, respectively.

Bond length W 1 : The weighted sum of Wasserstein distance between the distribution of bond lengths for each bond type:

where ˆ h dist ( b ) and h dist ( b ) are the histogram of bond lengths for bond type b , for generated and holdout set samples, respectively.

Bond angles W 1 : The weighted sum of Wasserstein distance between the distribution of bond angles (in degrees) for each atom type in the dataset:

where ˆ h ang ( x ) and h ang ( x ) are the histogram of angles for atom type x for generated and holdout set samples, respectively. See [20] for how angles are measured.

Strain energy: The strain energy for a generated molecule is computed as the difference between the energy on the generated pose and the energy of a relaxed position. The relaxation and the energy are computed using UFF provided by RDKit. We use [91]'s implementation 9 .

A.7 Guiding the generation process

Like diffusion models, our method also leverages (learned) score functions and relies on Langevin MCMCfor sampling. Therefore, in theory we can condition VoxMol similarly to how it is done in diffusion models: by constraining the score function as we walk through the MCMC chain. In the case of diffusion models, the score function of all steps is constrained to guide the transition steps from noise to a (conditioned) sample. In VoxMol, the constrained score function would affect the 'walk steps' (the Langevin MCMC steps): it would restrict the region where the chain samples noisy molecules y to p ( y | c ) (instead of p ( y ) ), c is the condition ( e.g. , gradient of a classifier). The 'jump step' (a forward pass of the denoising network over the noised molecules) is independent of the condition and remains unchangeable.

Manyoftheinnovationsonconditioningdiffusion models come from computer vision, where U-nets are usually used. Since VoxMol has the same architecture (albeit 3D instead of 2D), many of the conditioning techniques/tricks used in images may be more easily transferable. For example, we could in principle use the gradient of a classifier (trained jointly) to guide the sampling (using the same trick as in Dhariwal and Nichol [35]) or adapt gradient-free guidance ([34]). Pocket conditioning could also be possible, as in e.g. , [18, 67], but utilizing voxel representations instead of point clouds and neural empirical Bayes instead of diffusion models. In-painting has also proven to work very well in 2D U-Nets, so it could potentially work with 3D U-Nets as well. These in-painting techniques could also be leveraged in the context of molecule generation on voxel grids, e.g. , for linker generation, scaffold/fragment conditioning.

B Generated samples

HN

OH

HN

NH

OH

OH

Br

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper describes a new method of unconditional small molecule generation by parameterizing small molecules as 3d voxel arrays.\n\nSTRENGTHS:\n- Novel characterization of the small molecule generation task and a new way to parameterize the data. This comes with benefits, chief among which is the ability to generate without a known number of atoms.\n\n- I appreciate the discussion in section 4.3, where the authors dive into some problems with the metrics that they have chosen.\n\n- The ablation studies are illuminating.\n\n- The paper is well-written and easy to follow.\n\nWEAKNESSES:\n- Unconditional generation of small molecules is a hard task to evaluate. There are no good metrics to optimize for, as the paper indicates. Nevertheless, MiDi (work that the authors cite and compare against) has a more representative set of metrics they compare against. I suggest the authors do the same.\n\n- Weaknesses of the one-step denoising procedure are not discussed. These include, for example, the inability to control generation through the use of auxiliary gradient signals, such as classifier-free guidance.\n\n- The authors don't mention the implications of having a fixed grid size for their generative model. This means that the molecules generated need to be within a specified volume, restricting the output space. They should contrast this to the fixed atom number of competing models.\n\nQUESTIONS:\n- Line 243 should be as noise *decreases*, correct?\n\n- We consistently see a large drop in the validity when the noise level goes from $\\sigma = 0.9$ to $\\sigma = 1$, why is such a small change in noise so detrimental? What are the characteristics of the generated molecules at these levels of noise? What happens if you train a model with $\\sigma = 2$?\n\n- What is the relevance of the number of aromatic rings per molecule? Especially given that this is one of the only metrics where the proposed model outperforms, I would like a good rationale for including this metric.\n\n- What is the relevance of the validity metric, if that is something that can be automatically detected? It seems in this case that generating unique molecules is more relevant, especially if there are no other metrics to optimize.\n\n- How can this model be extended to allow for conditional generation, given that most of the other methods being compared to have this ability?\n\nLIMITATIONS:\nMainly, the authors should find better metrics to evaluate their work, such as those mentioned in the MiDi paper (at a minimum).", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-06-19"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes VoxMol, a novel method for generating 3D molecules in the form of voxel grids. The proposed method adopts neural empirical Bayes as the basic probabilistic framework to develop generative models for 3D voxel grid representations of molecules. Experiments are conducted to show that the proposed method can successfully generate valid 3D molecules.\n\nSTRENGTHS:\n- This work proposes a novel method of generating 3D molecules in the form of 3D voxel grids by neural empirical Bayes framework. The exploration of generating 3D voxel grids representation of molecules is interesting and meaningful to the development of efficient drug discovery applications.\n- The writing of this paper is well-organized and easy to follow.\n\nWEAKNESSES:\n- In this paper, generating 3D molecules in the form of 3D voxel grids by VoxMol is argued to be advantageous compred with 3D molecular graphs because the number of atoms is required to know beforehand, the distributions of continuous atom coordinates and discrete atom features are not treated separately, and simpler and faster training and generation can be achieved. However, in my opinion, these are not strong advantages.  \n(1) Actually, the number of atoms can be sampled from a learned distribution in 3D graph generation model, and VoxMol is also implicitly learn the number of atoms to place in every channel of voxel grids. These two processes are not fundamentally different.  \n(2) It is not a big issue to handle discrete and continuous distributions separately as we can jointly train discrete and continuous generative models (e.g., discrete & contiuous diffusion models). Also, VoxMol need to implicitly learn a \"discrete distribution\" as for every 3D spatial location in the voxel grid, it needs to decide the atom type, i.e., which channel to place an atom.  \n(3) The simpler and faster training and generation are mainly due to the use of neural empirical Bayes method, which may also be applied to 3D molecular graph generation to achieve fast generation and training. Also, 3D molecular graph generation can be accelerated by some other methods like introducing fragment-based generation.  \nHence, it is not convincing that the proposed VoxMol method is really advantageous when compared to existing graph-based method.\n- The use of 3D voxel grids also introduce many disadvantages. 3D voxel grids lose SE(3)-invariance as they are not invariant to rotations or translations. The use of 3D voxel grids hamper the introduction of chemical domain knowledge to guide the generative models to produce chemically valid or drug-like molecules, such as adding constraints based on fragments. The effect of these disadvantages should be evaluated or discussed.\n- The experimental results in Table 1 do not demonstrate the advantages of the proposed VoxMol method as VoxMol does not outperform strong  baseline methods in several metrics.\n\nQUESTIONS:\nIn experiments, methods are evaluated by the average number of aromatic rings per generated molecule. Do aromatic rings are detected from 2D molecule graphs inferred from 3D structures? Are the generated aromatic rings are checked in 3D space to decide whether they respect chemical constraints (i.e., all atoms in an aromatic ring should be in the same plane)? Why this metric is used? What can be shown if a method can generate more aromatic rings?\n\nLIMITATIONS:\nYes.", "TITLE": "Official Review", "RECOMMENDATION": 3, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2023-07-03"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a novel 3D molecule generation routine dubbed VoxMol. The highlight of it lies in its introduction of a connection between traditional molecular graph representation and 3D voxel representation. In VoxMol, the molecules are first translated into voxel representation. A denoising network is then trained to serve as a score approximation. In the sampling process, a novel walk-jump procedure is introduced to sample noisy p(y) and obtain the denoised x.\n\nSTRENGTHS:\n1. To my knowledge, the method is novel in terms of data representation and the training/sampling process. The paper showcases that instead of the traditional graph representation, molecule generation can also be performed on 3D voxels, shedding light on new research directions of connecting 3D CNNs to equivariant GNNs. The authors also tried to recover the molecular graph representation based on the denoised voxel, which I really appreciate.\n\n2. The evaluations are interesting. Though not always state-of-the-art, the authors have exhibited insightful investigations, e.g., how $\\sigma$ influences the tradeoff between validity and uniqueness.\n\n3. The overall presentation is clear and the method is very easy to follow.\n\nWEAKNESSES:\n1. I feel a little pity that equivariance is not properly injected into the model. I think it would make a much stronger impact if equivariance could be enforced even on this 3D voxel representation so that physical/chemical priors could be ensured.\n\n2. The method does not significantly beat EDM on these benchmarks. But I understand that as perhaps the first work to challenge the task of 3D molecule generation with 3D CNNs, it is difficult to beat all other GNN counterparts at once.\n\nQUESTIONS:\nAs the authors have stated in the paper, efforts have been made for equivariant 3D CNNs but were unsuccessful. I am curious about what detailed experiments have been conducted and how were the results. I believe by involving equivariance the work will make a stronger contribution.\n\nLIMITATIONS:\nThe limitations are not discussed in the main text. I would recommend the authors add these discussions since I think the work is inspiring and will benefit more from future research.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-04"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes doing diffusion on voxel space for molecule conformation generation. Because the voxel space is discrete, an efficient sampling method is proposed.\n\nSTRENGTHS:\nThis paper proposes doing diffusion on voxel space for molecule conformation generation. Because the voxel space is discrete, an efficient sampling method is proposed.\n\nWEAKNESSES:\n## Method:\n- It is not clear how the SE(3)-equivariant property is guaranteed in the model. This is critical because once the molecules are too large to fit in the voxel grids, we need to rotate it for a better position.\n- The objective function in Eq 2 is not clear. Concretely, it is not clear how the atom types are trained.\n\n## Experiments:\n- The authors also referred to MiDi in the paper. I’m wondering why the authors did not add MiDi? Is that because the performance of MiDi is better than VoxMol?\n- The MiDi paper introduces more domain-specific metrics, and authors should consider add them.\n- Also a closely-related baseline should be cited at least: https://arxiv.org/abs/2305.05708.\n\n## Minor:\n- `... capturing long-range dependencies over multiple atoms can become difficult …` It also depends on how the edges are constructured. For point clouds, the edges are often constructured by distance, thus this may not become an issue as long as the spatial distance is close.\n\nQUESTIONS:\nI have some questions on the method section, and would like to confirm with the authors.\n- I am wondering what’s the advantage of using NEB for estimating p(x)? Based on lines 135-140, it seems to be a standard EBM with Langevine dynamics, puls an extra NEB module. Is this correct?\n- The authors mentioned that `Chains are initialized with Guassian noise with standard deviation`. I would like to double-check what does standard Guassian mean in the voxel grids?\n\nLIMITATIONS:\nN/A", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 5, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-04"}