{'fraction_non_alphanumeric': 0.036532395250128, 'fraction_numerical': 0.015640225272093675, 'mean_word_length': 5.160968660968661, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
MolGenSurvey: A Systematic Survey in Machine Learning Models for Molecule Design

Molecule design is a fundamental problem in molecular science and has critical applications in a variety of areas, such as drug discovery, material science, etc. However, due to the large searching space, it is impossible for human experts to enumerate and test all molecules in wet-lab experiments. Recently, with the rapid development of machine learning methods, especially generative methods, molecule design has achieved great progress by leveraging machine learning models to generate candidate molecules. In this paper, we systematically review the most relevant work in machine learning models for molecule design. We start with a brief review of the mainstream molecule featurization and representation methods (including 1D string, 2D graph, and 3D geometry) and general generative methods (deep generative and combinatorial optimization methods). Then we summarize all the existing molecule design problems into several venues according to the problem setup, including input, output types and goals. Finally, we conclude with the open challenges and point out future opportunities of machine learning models for molecule design in real-world applications.


INTRODUCTION
Designing new molecules has been a long-standing challenge in molecular science and has critical applications in many domains such as drug discovery and material design [1]. Traditional methods, e.g., high-throughput screening (HTS) technologies, search over existing molecule databases but rely heavily on enumeration, thus are very time-consuming and laborious [2], [3]. On the other hand, the number of the drug-like molecules is large as estimated to be 10 60 [4] and it is computationally prohibitive to enumerate all the possible molecules. To address the issue, machine learning approaches have been proposed to narrow down the searching space of molecules and explore the chemical space intelligently.
Among different types of machine learning approaches, generative methods offer a promising direction for the automated design of molecules with desired properties such as synthesis accessibility, binding affinity, etc. A wide range of generative methods has been proposed for molecule design, mainly in two types, (1) deep generative models and (2) combinatorial optimization methods. Deep generative models (DGMs) usually map molecules into a continuous latent space while combinatorial optimization methods directly search over the discrete chemical space.
Another key component of molecule design in machine learning is how the molecules are represented which in- cludes 1D string, 2D graph, 3D geometry, etc. Early attempts formulate the molecule design as a 1D string generation problem and represent molecules as simplified molecularinput line-entry system (SMILES) strings. However, the validity of the generated SMILES string is not guaranteed [5].
To address the issues, other string featurization methods are explored, including an alternative string representation, self-referencing embedded strings (SELFIES) [6], which enforces string validity by design. With the emergence of graph representation learning, 2D graph representation has been introduced for molecule design and soon become a research hot spot as 2D graph is expected to carry richer structure information than 1D string.
Despite the success achieved in 1D and 2D molecule generation, molecules are naturally 3D structures and 3D conformations of molecules are crucial to many real-world applications such as structured-based drug design. However, representing a molecule by its 3D geometry is a nontrivial problem as it has to respect symmetry in 3D space such as translation-and rotation-equivariance. With the recent advances on geometric deep learning [7], efforts have been put to study representing molecules by 3D geometry and the wave has led to advances in molecule design in 3D space.
Nevertheless, one of the biggest challenges that stifles the progress of machine learning for molecule design is the fast-growing and not well-organized literature. Specifically, many different types of featurization and generative methods have been proposed for different types of molecule design tasks while the boundaries among them are not clearly specified. Although many recent efforts have been put to review the literature of machine learning models for molecule design, most of them only focus on part of the literature in terms of generative methods and tasks [8], [9], [10], [11], [12], [13], [14]. To the best of our knowledge, we arXiv:2203.14500v1 [cs.LG] 28 Mar 2022 are the first to provide a comprehensive review on machine learning approaches (both deep generative and combinatorial optimization methods) for 1D/2D/3D molecule design under a variety of task settings. Specifically, we present a mind map that drives the key taxonomies in molecule design tasks and unifies the task settings via the input/output types, and goals. The main contributions are summarized as follows: • Review of Methods. Section 2 and 3 gather and categorize the mainstream molecule representation and general generation approaches, respectively. • Review of Tasks. Section 4 elaborates the existing molecule design tasks and unifies them into a highly structured mindmap/table. • Review of Experiments. Section 5 specifies the empirical setups of molecule design, including evaluation metrics, available datasets, oracles (usually molecular properties), etc. • Challenges and Opportunities. Section 6 identifies open challenges and opportunities along the research direction for molecule design, paving the way for the future of molecule design with machine learning models.

MOLECULE STRUCTURE AND REPRESENTATION LEARNING
In this section, we introduce the mainstream featurization and representation learning methods for molecules. The three prevalent features adopted in molecule generation tasks are 1D string description, 2D molecular graph, and 3D molecular geometry. One example of the three features on a specific molecule (IUPAC: methylbenzene) is given in Figure 1.

1D String Description
The 1D string description is to extract molecules into a 1D string following certain domain-specific rules. The mainstream 1D string descriptions used for molecule generation include simplified molecular-input line-entry system (SMILES) [15] and self-referencing embedded strings 2. Credits to 2D and 3D figures are from https://molview.org/?q= Cc1ccccc1.
(SELFIES) [16]. SMILES is well-known for its simplicity in denoting molecules as strings by following rules like adjacent atoms are assumed to be connected by a single or aromatic bond and branches are specified in parentheses, etc. However, one major limitation is that a significant fraction of SMILES strings are invalid. To avoid this, SELFIES augments the rules on handling branches and rings and thus it can achieve 100% validity.
We want to acknowledge that there exist other variants of 1D string descriptions, including International Chemical Identifier (InChI) [17], SMILES Arbitrary Target Specification (SMARTS) [18]; yet, SMILES and SELFIES are the two most commonly-used for molecule generation tasks.

2D Molecular Graph
A large fraction of molecules can be naturally treated as 2D graphs: the atoms and bonds are nodes and edges in the graph, respectively. One example is given in Figure 1(a). Such featurization method has brought wide explorations in the structured data representation and related applications.
Representation methods. Graph neural network (GNN) is leveraged for 2D molecular graph representation. The high-level idea can be summarized into the message-passing neural network (MPNN) framework [26]: it updates each node's representation by aggregating information from its neighborhood; by repeating this for K steps, then each node's final representations can reveal the information in the K-hop neighborhood. Generally, graph application is a broad field where certain GNNs [27], [28], [29] are originally proposed to solve other structured data, e.g., social network and citation network. Specifically for the molecular graph representation, NEF [30] is the first to apply GNN for property prediction, and more recent works have considered different aspects for improving the expressiveness of GNNs. Weave [31] explicitly models both the node-and edge-level representation. D-MPNN [32] and CMPNN [33] explicitly add the direction information in message passing. PNA [34] considers various aggregation methods during message passing. N-Gram Graph [35], on the other hand, proposes the walk-based GNN that can alleviate the over-squashing issue [36] in the MPNN-based GNN. Another big track is motivated by the recent success of the attention module in the NLP and vision domains [37], [38], [39]. To adapt it to molecular graphs, recent works utilize the attention to better capture the correlation at node-, subgraph-, and graph-level, including GAT [40], AttentiveFP [41], GTransformer [42], AWARE [43], and Graphormer [44].

3D molecular Geometry
Essentially, most molecule are not static, but instead in continual motion on a potential energy surface [45], characterized by different conformations, and the 3D structures at the local minima on this surface are named conformer 3 . 3. A more rigorous way of defining conformer is in [46]: a conformer is an isomer of a molecule that differs from another isomer by the rotation of a single bond in the molecule.
More concretely, we can view it as a sets of nodes in the 3D Euclidean space, as displayed in Figure 1(b).

Other Molecular Featurization Methods
There also exist other molecule featurization and representation methods, yet they are not fit or not being widely explored for molecule generation tasks. Here we may as well briefly list them for comprehensiveness.
Descriptors It is mainly obtained by hashing the subcomponents of the molecule into a fixed-length vector. The representation methods on fingerprints include random forest, XGBoost, multi-layer perceptron, etc. Recent work [21], [60], [61], [62] have empirically verified the effectiveness of descriptors. However, due to the irreversible hashing operation, it cannot be directly utilized for generation tasks.
3D density map This represents molecules as the 3D volume occupied by each of the atoms [63]. The volume for each atom is usually a function of the atomic radius which makes it a sphere-like solid object. The density map is often stored in a 3D grid. 3D CNN is a typical neural network utilized to encode the 3D density map [64].
3D surface mesh This represents molecules by their surfaces with 3D meshes (e.g., polygon mesh). The mesh consists of a collection of nodes, edges, and faces that define the shape of the molecular surface. The 3D surface mesh is usually encoded by a geodesic Convolutional Neural Network [65] or 3D Graph Neural Network [47].
Chemical Images This extracts the molecules into 2D grid images, as known as the chemical images. Then standard CNNs [66], [67] are applied on it for representation. Yet, this hasn't been explored for molecule generation tasks yet.

GENERATIVE METHODS
There are two main venues for generative methods. The first one is deep generative models (DGMs), which aim at modeling the data distribution using deep learning models. The second one is combinatorial optimization methods (COMs) that better utilize the heuristic strategies for the target goal. Specifically for the structured data, the main difference between these two venues is that DGMs utilize the continuous latent representation, while the COMs are directly searching in the structured data space. More details are discussed below, and key notations are listed in Table 1.

Autoregressive Models (ARs)
For each data point x, especially for structured data like a graph, we first assume it has d subcomponents, and such subcomponents can have underlying dependence. For example, the subcomponents can be the pixels in images or nodes and bonds in molecular graphs. The autoregressive models (ARs) learn the joint distribution of x by factorizing it as the product of d subcomponent likelihoods as below: Here ARs define an ordering of variablesx i (either heuristically or with domain knowledge), and model the joint distribution in an autoregressive or sequential manner: predicting the next subcomponent based on the previous subcomponents. ARs have been widely-used in generation tasks, including recurrent neural network (RNN) [80], [81], PixelCNN [82], WaveNet [83], Transformer [37] and BERT [38].

Variational Autoencoders (VAEs)
Variational autoencoders (VAEs) [84] estimate a lower bound (a.k.a. evidence lower bound (ELBO)) of the likelihood p(x). VAEs introduce a proposal distribution q(z|x) and the goal is to maximize the ELBO: ELBO. (2) The first term on ELBO is also known as the reconstruction term. Classic VAEs [84] take x as either continuous or binary, where we often model this conditional term as Gaussian or Bernoulli distribution. This will lead to meansquared error (MSE) or binary cross-entropy (BCE) for reconstruction.
The second term of Equation (2) is the KL-divergence term measuring the information loss when using q(z|x) to approximate p(z). In VAEs, the standard Gaussian is often used as the prior, i.e., p(z) ∼ N (0, I). Such standard Gaussian implies that all the learned latent dimensions are expected to be diverse or disentangled. Following work, e.g., β-VAE [85], penalizes this KL-divergence regularizer term to encourage the more disentangled latent representation, such that [86] each single unit in the latent representation is sensitive to only certain factors.
Reparameterization trick. VAEs express z as a deterministic variable z = g( , x), where is an auxiliary variable with independent marginal p( ), and g(·) is the reconstruction function. Then z can be reparameterized as: where is the element-wise product. This reparameterization trick allows us to calculate the gradient of the reconstruction function with lower variance.

Normalizing Flows (NFs)
The normalizing flows (NFs) aim at modeling the data distribution p(x) directly with an invertible and deterministic mapping. First NFs suppose x and z are two random variables with the same dimension, x ∼ p(x) and z ∼ p(z).
There exists an invertible mapping between the two variables, i.e., x = f (z) and z = f −1 (x). Then according to the change of variable theorem, we can have where is the Jacobian matrix and det(·) is the matrix determinant.
Based on Equation (4), an NFs map a simple prior distribution p 0 (z 0 ) to a complex data distribution p(x) by applying a sequence of invertible transformation functions. In other words, the NFs flow through a chain of K transformations z 0 → z 1 → ... → z K = x. Thus, the data distribution can be computed as log p(x) = log pK (zK ) Existing works, e.g., RealNVP [87], NICE [88], and Glow [89], judiciously design invertible transformations f i , where the Jacobian determinant is simple to compute.

Generative Adversarial Networks (GANs)
The Generative Adversarial Networks (GANs) [90] is a likelihood-free deep generative model. GANs do not optimize the likelihood directly; instead, they aim at detecting the real data from fake data, i.e., they transform the generation problem into a binary classification problem. There are two main components in GANs: one generator (G) and one discriminator (D). The generator generates data points to fool the discriminator, while the discriminator tries to distinguish the generated data from the actual data. The objective of GANs is: The training of GANs risks the modal and model collapse issue. To alleviate this, f-GAN [91] adopts the f-divergence for measuring distribution distance, where the f-divergence is a more general metric that covers other widely-used distances, including KL divergence and Jenson-Shannon divergence. An alternative is Wasserstein-GAN (WGAN) [92] which utilizes the Wasserstein distance for measuring the distance between distributions. Follow-up works, including StyleGAN [93] and StyleGAN2 [94], introduce certain inductive biases in the architecture design and have been widely adopted in the community.

Diffusion models
Diffusion models [95], [96] are inspired by non-equilibrium thermodynamics and can be split into the forward and backward diffusion processes. During the forward diffusion process, the diffusion models will gradually add noise to the data and the last-step data will follow an isotropic Gaussian. The reverse diffusion process will revert this process and construct the data from noise distribution. More rigorously, we can define the forward process as from the actual data x 0 ∼ p(x) to the random noise x T with T diffusion steps. Let us first assume that for the forward process, the Gaussian distribution is where β t ∈ (0, 1). Then the corresponding backward process is where ∼ N (0, I) follows the standard Gaussian, The objective is to estimate the variational lower bound (VLB) of the likelihood: The VLB can be rewritten as: Here L T is a constant and can be ignored, and existing methods [96], [97] have been using a separate model for estimating L 0 . For {L t−1 } T t=2 , they adopt a neural network to approximate the conditionals during the reverse process, and reduce to the following objective function: Please also notice that the final objective function is equivalent to a family of score matching methods [98], [99], as will be introduced below.

Energy-Based Models (EBMs)
Energy-based models (EBMs) have a very flexible formulation, and its general form is: where E θ (·) is the energy function, θ is the set of learnable parameters, and A is the partition function. In EBMs, the bottleneck is the calculation of partition function A: it is computationally intractable due to the high cardinality of X . Various methods have been proposed to handle this task, and the most widely-used ones include contrastive divergence [100], noise-contrastive estimation (NCE) [101], score matching (SM) [98]. Each method has been widely explored, and for more details, we refer to this comprehensive summary [102].

Combinatorial Optimization Methods (COMs)
Deep generative models (DGMs) usually require a large amount of data to learn, which may be infeasible in real scenarios. In contrast, combinatorial optimization methods (COMs) have less requirement on the amount of training data, while the trade-off is that algorithm designers need to call the oracles during the exploration to the chemical space [103], [104], [105], [106], [107]. We mainly discuss five categories in COMs, (1) reinforcement learning (RL); (2) genetic algorithm (GA); (3) Bayesian Optimization (BO); (4) Monte Carlo Tree Search (MCTS), and (5) MCMC sampling. However, to conduct a thorough exploration of the chemical space, we need intensive oracle calls in combinatorialbased methods. For example, when we want to optimize molecules' Quantitative Estimate of Drug-likeness (QED) score during the generative process, we need to evaluate the QED score of the generated molecules to guide the next step actions (i.e., call QED oracle).

Reinforcement Learning (RL)
Reinforcement learning (RL) is usually formulated as a Markov Decision Process (MDP). RL has several basic concepts: state, action, transition, and reward. The state is denoted as S, action set is denoted as A. At the t-th step, the transition probability from state s to state s under action where θ is usually parameterized by neural networks. R a (s, s ) is the reward after transition from s to s with action a. The goal of RL is to learn an optimal policy that maximizes the "reward", For molecule generation tasks, a state is usually defined as a partially generated molecule graph, action can be adding a substructure (either an atom or a bond or a ring) at a position, and reward can be the property of the partially generated molecule. Specifically, [108], [109], [110], [111] leverage policy gradient and domain-specific reward function to optimize the graph policy neural network; [103] leverages deep Q-network to conduct value learning, where a deep Q-network is trained to predict the future reward and during each step, the step with maximal expected reward is selected.

Genetic Algorithm (GA)
Genetic Algorithm (GA) starts from a mating pool (set of strings/graphs that serve as warm start) and requires mutation and crossover between parents (interaction between intermediates in the last iteration) to obtain the next generation, where the population in each iteration is called a generation; parent is the intermediate from the previous generation; crossover, also called recombination, combines the genetic information of two parents to generate new offspring, offsprings are generated by cloning an existing solution; mutation involves an arbitrary bit in a genetic sequence that will be flipped from its original state. A common method of the mutation operator involves generating a random variable for each bit in a sequence. Specifically, at the t-th generation (iteration), given a population of molecules, denoted as P (t−1) , we generate a bunch of offsprings (the set is denoted as S (t) ) and select the most promising K (K molecules with highest objectives) as the population for the next generation (denoted as P (t) ). It is defined as .
Specifically, GuacaMol benchmark [107], [112] proves the superiority of (i) SMILES-based GA and (ii) molecular graphbased GA. GA+D [6] leverages SELFIES string as the features of molecule and designs a genetic algorithm enhanced by adversarial learning. The superiority of GA methods is also validated in a molecule generation benchmark that optimizes docking score [113].

Monte Carlo Tree Search (MCTS)
Besides, Monte Carlo Tree Search (MCTS) [112], [114] based approaches show its superiority in molecule optimization. Different from GA, MCTS can start from scratch (e.g., a single node). Then during each generation iteration, it locally and randomly searches each branch of intermediates and selects the most promising (e.g., with highest property scores) ones for the next iteration. , the process is similar to GA (Equation 9), where P (t) is the population at the t-th iteration, and S (t) is the set of all the intermediates generated at the t-th iteration.

Bayesian Optimization (BO)
Bayesian optimization (BO) is usually used to optimize objective functions that demand a long evaluation time (minutes or hours). It is best suited for optimization over continuous domains of less than 20 dimensions [115] and tolerates stochastic noise in function evaluations. BO has two key steps: (1) BO builds a surrogate for the objective and quantifies the uncertainty in that surrogate using a Bayesian machine learning technique, Gaussian process (GP) regression. Suppose in the t-th iteration, we have collected t noisy evaluations, . A GP surrogate model utilizes a non-parametric regression of a particular smoothness controlled by a kernel k : X × X − → R measuring the similarity between two points. (2) It utilizes an acquisition function defined from the surrogate to decide where to sample. Specifically, acquisition function α t : X − → R measures the utility of making a new evaluation given the predictions of current surrogate model. Within the t-th iteration, BO maximizes the acquisition function via x (t+1) = arg max x∈X α t (x).

Markov Chain Monte Carlo (MCMC)
MCMC is designed for drawing samples from target distribution (denoted π(·)) efficiently. In the t-th iteration, MCMC mainly contains two steps: (1) samples the state from proposal distribution, i.e., x (t) ∼ Q(·|x (t−1) ); and (2) accepts/rejects the proposal with probability [123] formulate the generation task as an sampling problem. To be more concrete, suppose we have K constraints/objectives (denoted as O 1 , · · · , O K ) during the optimization procedures, then the target sampling distribution π(·) (i.e., the data space of interest) is formulated as where Y is a valid data (like chemically valid molecule). Usually MCMC utilizes a pretrained proposal distribution for sampling (usually a pretrained Graph Neural Network), is the data at the t-th iteration.

Other Approaches
Optimal Transport (OT) is introduced when matching between two groups of molecules, especially for the molecule conformation generation problem where each molecule has multiple associated conformations and OT provides a way to optimize the generative model via measuring the distance between two probability distributions. Differentiable Learning formulate discrete molecules into differentiable formats and enable gradient-based continuous optimization on the molecules directly. DST [104] formulates it by directly optimizing through the graph representation of molecules.

Road Map of Molecule Generation Tasks
In this section, we identify 8 distinct molecule generation tasks based on the goal of generation and input/output data representation types: (1) de novo 1D/2D molecule generation, (2) de novo 1D/2D molecule optimization, (3) 1D/2D molecule optimization, (4) de novo 3D molecule generation, (5) de novo 3D conformation generation, (6) de novo bindingbased 3D molecule generation, (7) de novo binding-pose conformation generation, (8) 3D molecule optimization. These tasks are compared in Table 2 from various aspects. Nevertheless, the eight tasks can be grouped into two categories, 1D/2D molecule generation and 3D molecule generation based on their output data type. To be more concise, we will divide into these two categories, as each sub-task under the same category shares great similarity. It is worth mentioning three concepts before we dive into the details: • de novo v.s. non-de novo, de novo denotes that generating a molecule while no reference molecule/lead is given, i.e., generating molecules from scratch. • generation v.s. optimization, generation (a.k.a. distribution learning) refers to generating molecules directly or randomly, while optimization (a.k.a. goal-directed/goaloriented generation) refers to generating molecules with optimal or desired properties. • molecule v.s. conformation, molecule refers to the molecule itself represented either in 1D String, 2D Graph or 3D geometry, while conformation specifically refers to the 3D geometry of a molecule. All the generative methods are organized and categorized by different tasks and generative methods in Table 3, 4. For most of the existing methods jointly conducted generation task and optimization task. To better distinguish among distinct methods, we put methods under generation if their main contributions are distribution learning for molecule design, while we put methods under optimization if their main contributions are techniques that handle the molecule optimization task.

1D/2D molecule generation
The goal of 1D/2D molecule generation is to generate novel, diverse, and chemically valid molecules with desired properties. The overall task could be divided into two steps, (1) generating valid molecules, (2) generating/searching/optimizing molecules with desired properties. In the first step, researchers attempt different methods to achieve the goal, from deep generative models to combinatorial-based methods. As mentioned above, we categorize the tasks based on (1) whether it is de novo generation, (2) the goal of generation (generation v.s. optimization) in Table 3.

Problem formulation
As mentioned in Section 2, molecules are normally represented by 1D strings and 2D graphs in the 1D/2D molecule generation task. Here we only consider these two representations and formulate molecule generation problems in the following.
1D String representation. 1D string representation include simplified molecular-input line-entry system (SMILES) [15] and self-referencing embedded strings (SELF-IES) [16]. SMILES strings need to follow specific chemical rules to guarantee the validity of the molecules. This may lead to the generation of invalid string [5], [121], [125]. SELFIES avoids this issue by augmenting the rules on handling Branch and Ring and can achieve 100% validness. However, the connection between atoms in a molecule may be transformed into long-term dependencies in string representations, so it is challenging to model them.
2D Graph representation. 2D Graph representation is commonly used for molecule generation due to its ability to capture substructure information. However, as graph objects are usually discrete and high-dimensional (represented by node feature and edge feature matrices), it is nontrivial to design the generative process. There are two common  2 The input, output, and the goal that we are interested in w.r.t. the generation phase. NA means the task is not meaningful. processes, (1) one-shot generation and (2) sequential generation [189]. One-shot generation refers to generating the node feature and edge feature matrices of a molecular graph at one single step, while sequential generation refers to generating the nodes and edges step by step.

de novo 1D/2D molecule generation
The goal of 1D/2D molecule generation is to generate new molecules from the distributions of given datasets or the vast chemical space.
Representative work: Early works on de novo 1D/2D molecule generation represent molecules as 1D SMILES strings. SMILES-based VAEs (including ChemVAE [5], SD-VAE [124] GrammarVAE [125]) learn a VAE-based model which encodes and decodes SMILES strings and sample new molecules (strings) via decoding from a Gaussian prior. However, the SMILES string does not guarantee the generated molecules to be 100% valid. This may lead to a poor validity rate of the generated molecules. Later works argue that representing molecules as graphs could provide a better representation, especially for substructures. Graph-NVP [129] and GRF [190] first introduce flow-based generative models into molecule generation and design invertible mapping between the input graph and the latent space. However, as both models directly generate node features (i.e. atoms) and edge features (i.e. bonds) without explicit constraints between them, thus the generated molecules are not guaranteed to be valid. GraphAF [131] instead designs an autoregressive flow-based model to generate a 2D molecular graph sequentially, which adds an atom or a bond each step and guarantees validity via incorporating a valency check in each step. MoFlow [130] designs a flow-based model to generate molecular graphs in a one-shot manner, which builds the node feature and edge feature matrices as a whole. To ensure validity, it introduces a valency correction mechanism as a post-processing step. The advantage of the one-shot model compared with the autoregressive model is its simplicity and efficiency, and its ability to capture global information. However, it scales relatively poorly and requires valency correction as post-processing to guarantee the chemical validity of the generated molecules. Nevertheless, both types of flow-based models require dequantization techniques to model discrete molecular graphs with continuous latent variables, which impedes the accuracy. To address it, GraphDF [132] proposes a discrete flow-based model, where latent variables are discrete, which greatly saves computation costs and eliminates the negative effect of dequantization.

de novo 1D/2D molecule optimization
Different from generation tasks that search over the chemical space, the goal of de novo 1D/2D molecule optimization is to generate molecules with optimal or desired properties, in the absence of a given molecule. During the optimization process, oracle calls are usually required to provide heuristics for the goal.
Representative work: Early works directly bias the distribution of the training dataset to generate molecules with desired properties. RNN-finetune [140] first trains the generative model on a large biological activity dataset and finetunes it with another specialized dataset. This is applicable in many real-world scenarios when only a small number of desired molecules are available for model training. GA+D [6] designs a SELFIES level genetic algorithm enhanced by a discriminator neural network to search the molecules with optimal properties over the chemical space. GB-GA [112] leverages graph-level genetic algorithm and design mutation and crossover operations with empirical experience to edit the molecule population in each generation (i.e., iteration). GCPN [108] designs a graph convolutional policy network to optimize molecular properties and ensure validity based on a reward function, and generates molecular graphs by adding either an atom or a bond in a single step. MolDQN [103] designs a deep Q-network (a technique for RL method) based on value function learning and generates molecular graphs by either adding an atom/a bond or removing a bond in a single step. RationaleRL [109] collects property-aware substructures as building blocks and leverages reinforcement learning (policy learning) to grow a molecule with desired properties. GEGL [148] mixes genetic algorithm and reinforcement learning by taking the operations of genetic algorithm as basic actions and using reinforcement learning to learn the policy that optimizes the molecular properties. MIMOSA and MARS [122], [123] formulate molecule optimization as a Bayesian sampling problem, and design graph neural network-based proposal as Markov Chain Monte Carlo (MCMC) kernel.  [125] None SMILES VAE ChemVAE [5] None SMILES VAE JT-VAE [121] None 2D-Graph VAE GraphVAE [126] None 2D-Graph VAE CGVAE [127] None 2D-Graph VAE SG-VAE [128] None SMILES VAE GraphNVP [129] None 2D-Graph Flow MoFlow [130] None 2D-Graph Flow GraphAF [131] None 2D-Graph Flow+AR GraphDF [132] None 2D-Graph Flow+AR dcGAN [133] None Fingerprint GAN Defactor [134] None 2D-Graph GAN ORGAN [135] None SMILES GAN+RL MolGAN [136] None 2D-Graph GAN+RL None 2D-Graph GA GA+D [6] None SELFIES GA EDM [144] None SMILES GA JANUS [145] None SELFIES GA

1D/2D molecule optimization
Different from de novo tasks before, the goal of 1D/2D molecule optimization is to generate molecules with optimal or desired properties by optimizing from a given molecule. In many cases, a local search (without changing the input molecule so much) is sufficient and we do not require traversing over the whole chemical space. Representative work: VJTNN [156] proposes a graph-tograph translation framework to translate the input molecule (to be optimized) into the new molecule with more desirable properties and similar to the input one. It uses a junction tree of molecule substructures as the representation and utilizes a discriminator network to guide the optimization process. Within the graph-to-graph translation framework, CORE [157] designs a copy & refine mechanism to copy substructures from the input molecule and optimize the generation procedure; MOLER [110] leverages a hybrid deep generative model (i.e., graph-to-graph framework) and reinforcement learning (policy gradient); HierVAE [152] designs a hierarchical VAE (both encoder and decoder) to model the mapping and capture hierarchical information of molecules during the optimization process. MSO [115] represents molecules as SMILES strings and designs a sequence-level VAE-based model to reconstruct the strings from the learned latent space. Then a Bayesian optimization (BO) approach is leveraged to search over the latent space for molecules with desired properties. Mol-CycleGAN [158] designs a cycle-GAN based model that translates input molecules to target molecules with a cycle-consistency loss [191]. LatentGAN [159] designs a mixture model of autoencoder (AE) and GAN, where AE is used to learn a continuous latent representation of molecules and GAN encourages the generated molecules to be close to the desirable molecules. DST [104] designs a differentiable molecular graph that is differentiable with respect to the substructure in a molecular graph, thus enabling the gradient-based optimization on the discrete molecular graph for desired properties. ChemSpace [163] introduces a new perspective that aims to discover smooth latent directions controlling molecular properties. It argues the importance of such latent directions for interpreting the smooth structure changes of molecules corresponding to property changes.

Data
Over the past few decades, multiple large-scale databases are curated to advance the field of molecule design [113], [192]. Here, we list commonly used datasets in molecule design and the detailed statistics of datasets are available in Table 5. QM9 [193], [194] provides quantum chemical properties for a relevant, consistent, and comprehensive chemical space of small organic molecules. It contains 134k stable small organic molecules with 3D conformations that contain up to 9 heavy atoms. ZINC [195] is a free database of commercially-available compounds for virtual screening. It contains over 230 million purchasable compounds in ready-to-dock, 3D formats. Molecular Sets (MOSES) [196] is a benchmark platform that provides a cleaned dataset of molecules that are ideal for optimization. It is processed from the ZINC Clean Leads dataset and contains around 1.9 M molecules. ChEMBL [197] is a manually curated database of bioactive molecules with drug-like properties. It brings together chemical, bioactivity, and genomic data to aid the translation of genomic information into effective new drugs. It contains 2.0M molecules. CEPDB [198] contains around 4.3 M molecules that are related to organic solar cell materials for the design of organic Photovoltaics. GDB13 [199] enumerates small organic molecules containing up to 13 atoms of C, N, O, S, and Cl following simple chemical stability and synthetic feasibility rules. It is the largest publicly available small organic molecule database to date and contains around 970 M molecules.

3D molecule generation
3D structures of molecules are critical to their functions with a wide range of applications such as molecular dynamics, docking, etc. In 3D molecule generation, the goal is to generate molecules in 3D space. Unlike 1D/2D molecule generation, one 1D/2D molecule has a variety of 3D geometry or conformations. This results in a list of tasks in which the final outputs are expected to be 3D molecules.
As mentioned above, we categorize the tasks based on (1) whether it is de novo generation, (2) the goal of generation (generation v.s. optimization), and (3) the input/output of the generation (2D molecule v.s. 3D conformation) in Table 4. Similar to 1D/2D molecule generation, two key challenges also exist for 3D molecule generation: (1) generating both syntactically-and geometrically-valid molecules, (2) optimizing molecule structures with desired properties. We will introduce each task under 3D molecule generation in the following sections.

Problem formulation
As mentioned in Section 2, the most common 3D representation of molecules is 3D geometry which consists of a set of nodes with 3D coordinates. 3D representations also include density map, surface mesh, etc.. Here we mainly consider 3D geometry representation and briefly explain other representations in the correspondingly related works. Geometry representation. Geometry representation is a natural representation of molecules characterized by a set of nodes and coordinates in 3D space. One main challenge in representing molecules as geometry is that the model needs to be equivariant to rotation and translation in 3D space. This needs to be properly addressed in reducing the sample complexity of learning the generative methods.

de novo 3D molecule generation
The goal of de novo 3D molecule generation is to generate novel, diverse, and chemically & geometrically valid molecules from scratch. Compared to de novo 2D molecule generation, this task is more flexible to generate molecules in 3D space, while it is also more challenging since it has to take into account geometric validity beyond syntactic validity. While the additional benefit of generating in 3D is that it could be utilized to take into account the geometric constraint or binding conformation where 3D geometry is needed. Representative work: Early attempts focus on extending the generative methods in de novo 2D molecule generation, with 3D geometric representation learning. G-SchNet [173] argues that graph-based generative models have natural flaws in recognizing spatial isomerism and non-bonded interactions of molecules. Specifically, it designs a purely 3D-based autoregressive model which eliminates the need for representing molecules as graphs and respects the rotational invariance of the molecule structures. 3DMolNet [177] designs a VAE-based generative model instead of the autoregressive model which learns a latent space for smooth exploration of the chemical space. E-NFs [52] also respects the symmetry via integrating an equivariant graph neural network in a normalizing flow-based generative model. To obtain an invertible equivariant function for normalizing flow, it integrates the equivariant graph neural network in neural ordinary differential equations which are continuoustime differentiable. G-SphereNet [178] extends the idea of G-SchNet to design an autoregressive model which places atoms in 3D space step-by-step with the backbone model to be one recent 3D GNN, SphereNet [54]. Specifically, the 3D geometry is generated via generating distances, angles, and torsion angles which determine the positions of each atom rather than generating coordinates directly.

de novo 3D conformation generation
The goal of de novo 3D conformation generation is to generate novel, diverse, and chemically & geometrically valid molecule conformations from given 2D molecules. Generating 3D conformations from 2D molecules is of great importance to many downstream tasks such as pocket-ligand binding affinity prediction, pocket-based molecule design, etc. Representative work: Early work CVGAE [164] designs a conditional VAE-based model that learns to generate 3D conformations given the 2D molecules as conditions. It directly generates the 3D geometry. However, a postalignment, which aligns the generated conformations to the ground truth conformations, is needed to ensure the translation-and rotation-equivariance of the model. Instead of directly generating the 3D geometry, ConfDG [165] combines a conditional VAE that generates the interatomic distances over molecule atoms with a euclidean distance geometry which translates the generated distances to a set of atomic coordinates. Later, ConfVAE [166] develops an end-to-end framework that combines conditional VAE and distance geometry and eliminates the need to separate these two steps. GeoMol [171] presents a generative learning pipeline for this task which first predicts local atomic 3D structures and torsion angles and then assembles the conformations, to avoid unnecessary over-parameterization of the geometric degrees of freedom. Another popular generative models used in this task is score-based or diffusion generative models. ConfGF [168] first devises a score-based generative model to estimate the gradient fields of log density with respect to interatomic distances and calculates the gradient fields of log density of atomic coordinates via the chain rule. Then it leverages Langevin dynamics for efficient sampling of molecule conformations. DGSM [169] extends it to take into account the non-bonded interactions by making the molecular graph structure learnable [200]. EVFN [55] designs an Equivariant Vector Field Network (EVFN) (with a novel tuple of equivariant basis and the associated scalarization and vectorization layers) to learn gradient vector fields that allow direct modeling of the 3D coordinates of the conformations via score-based generative models. GeoDiff [170] also designs a diffusion model directly over the 3D geometries instead of interatomic distances to estimate the gradient of log-probability of conformations and sampling from the probability. DMCG [167] realizes the importance of permutation-, translation-and rotation-equivaraince in directly generating 3D geometry from 2D molecular graphs. It introduces an alignment and permutation post-processing step each time before calculating the loss between the generated and ground truth geometries to relieve the model from learning these equivariance properties in the training phase.

de novo binding-based 3D molecule generation
The goal of de novo binding-based 3D molecule generation is to design 3D molecules given proteins' binding pockets. The designed 3D molecules are expected to have high binding affinities to the protein targets. As mentioned above, designing molecules that could bind to specific pockets is a critical task in structured-based drug discovery. Representative work: liGAN [180] proposes to represent 3D molecules by 3D atomic density maps which are more smooth than the discrete graph structures and devises a conditional VAE-based approach with 3D CNN as backbone models. However, as the density map is not a direct representation of molecules, it takes further processes to fit the atoms into the density map and make bonds based on chemical rules (e.g., bond length, angle, atom type) after generating the atomic density maps. DeepLigBuilder [181] instead represents molecules in 3D geometries which are constructed by 3D coordinates and atom types. Specifically, it designs a RL-based 3D molecule generative model which has a policy network to iteratively refine existing structure and add new atoms to the structure. Furthermore, an MCTS algorithm is combined with the RL method to perform structure-based drug discovery towards a specific protein binding pocket. 3DSBDD [182] also represents molecules by 3D geometry and designs an autoregressive model to sample new molecules with high probability in the geometric space of the specific protein binding pocket.

de novo binding-pose conformation generation
Different from de novo 3D conformation generation which aims to generate a diverse set of molecule conformations without specific targets, the goal of de novo binding-pose conformation generation is to find the appropriate conformation of an input (given) molecule to the given protein's pocket site. Representative work: DeepDock [183] designs a model that takes 2D molecular graphs and 2D protein pocket graphs as input and learns the continuous representations. Then, the model learns a statistical potential based on distance likelihood for the pairwise protein-molecule representations. Finally, an optimization method is performed to produce the binding conformation of the molecule. EquiBind [184] instead represents molecules and protein pockets with 3D geometries and models them with a 3D equivariant graph neural network. Then, the binding pose conformation of the molecule towards the target is optimized through a learned set of key points matching from the attention map of a graph matching neural network.

3D molecule optimization
The goal of 3D molecule optimization is to optimize the molecule represented in 3D to meet desired requirements, e.g., better binding pose or better molecular property. Note that although high binding affinity could be considered as one of the goals for this task, we separate related work to de novo binding-pose conformation generation as it is important to be a stand-alone task. Here, we include a diverse set of 3D molecule optimization tasks, such as low-energy molecule conformation optimization, scaffoldbased 3D molecule optimization, coarse-to-fine molecule conformation optimization. Representative work: BOA [185] searches for molecule conformations with the lowest energy which are most probable and stable via Bayesian Optimization. 3D-Scaffold [186] focuses on generating 3D molecules with the replacement of the 3D scaffolds. Specifically, it builds upon G-SchNet and autoregressively generates new atoms from fixed existing 3D scaffolds and the generated new molecule candidates are guaranteed to have the desired scaffolds. Coarse-GrainingVAE [188] learns to generate fine-grained molecule conformations from the coarse-grained molecule conformations via a VAE-based generative model that reconstructs/samples the fine-grained conformations.

Data
3D molecule and conformation databases have also been accumulated in the past few decades with the rising of multiple large data repositories such as Protein Data Bank (PDB) [201]. We list the main datasets used for 3D molecule generation in the following. The detailed statistics of datasets are available in Table 5. GEOM-QM9 [45] uses advanced sampling and semiempirical density functional theory to annotate the 3D conformer ensembles. It contains around 133,000 3D molecules. GEOM-Drugs [45] also uses advanced sampling and semiempirical density functional theory to annotate the 3D conformer ensembles. It contains around 317,000 3D molecules. ISO17 [202] contains 197 2D molecules and 430,692 molecule-conformation pairs. Molecule3D [203] is a dataset with precise ground-state geometries of approximately 4 million molecules derived from density functional theory (DFT). CrossDock2020 [64] contains a total of 22,500,000 poses of ligands docked into multiple similar binding pockets across the Protein Data Bank. scPDB [204] is a comprehensive and up-to-date selection of ligandable binding sites of the Protein Data Bank. It has a total of 16,034 entries and registers 9,283 binding sites from 3,678 unique proteins and 5,608 unique ligands. DUD-E [205] contains 22,886 active compounds and affinity scores against 102 targets. Each active compound, which has similar physico-chemical properties but different molecules, is associated with 50 decoys.

MOLECULE GENERATION EVALUATION
The evaluation of molecule generation tasks can be grouped in four categories, (1) evaluations of a molecule generation method, including the validity, novelty, and uniqueness of the generated molecules; (2) distribution evaluations that measure the distribution of generated molecules and distribution of training molecules; (3) optimization evaluations; (4) conformation evaluation. Basic evaluations refer to the basic requirement of generating molecules, e.g., validity and geometric stability for 2D and 3D molecule generation. Distribution evaluations refer to the distribution of the generated molecules compared to the input distribution. The distribution could be measured by various aspects including molecular properties, graph statistics, sequence similarities, structure similarities, 3D geometry similarities, etc. Optimization evaluations highly relate to the goal of the optimization task. For example, molecule optimization task usually aims to generate molecules or optimize molecules towards specific target values.
However, it is worth noting that not only there are a diverse set of molecules in 3D, but rather one single molecule could have a diverse set of conformations that determines many key properties, especially related to pocketbinding, structured-based drug discovery, etc. In contrast to 1D/2D molecule generation, diversity is not always the desired property for 3D molecule generation. For example, de novo binding-based 3D molecule generation aims to generate the binding pose or conformation of a molecule for a specific protein pocket.

Generation Evaluation
The basic evaluation metrics for molecule generation task include Validity, Novelty, Uniqueness, Diversity [108]. Validity = # valid molecules # generated molecules (12) Novelty = # novel molecules # generated molecules (13) Uniqueness = # unique molecules # generated molecules (14) Quality = # good molecules # generated molecules (15) where novel molecules are the generated molecules that do not appear in training set. Validity is the percentage of valid molecules among all the generated molecules. Novelty is the percentage of the generated molecules that do not appear in training set and measures the ability to explore unknown chemical space. Uniqueness is the percentage of unique molecules among all the generated molecules and measures the methods' ability to reconstruct the molecules. Quality is the percentage of good molecules filtered by a predefined rule set and measures the ability of the method to generate good molecules. Discovery-based evaluation [196]. Discovery-based evaluation refers to testing whether the generative methods would discover certain patterns or rediscover molecules removed from the training set. Diversity [207] is composed of two parts, internal diversity and external diversity. Internal diversity is defined as the average pairwise similarity among all the generated molecules, while external diversity is defined as the average pairwise similarity between the training set and the generated molecules, as follows:: where Z is the set of generated molecules. sim(Z 1 , Z 2 ) could be any similarity metric between molecule Z 1 and Z 2 , calculated in different ways, such as Tanimoto similarity, scaffold similarity, fragment similarity, etc.

Distribution Evaluation
Additionally, more evaluation metrics are used to measure how well the generative models learn the true data property distributions, including • Kullback-Leibler Divergence (KLD) [208]. KL divergence between the probability distributions of a variety of physicochemical descriptors for the training set and a set of generated molecules. Models able to capture the distributions of molecules in the training set will lead to small KL divergence values. • Fréchet ChemNet Distance (FCD) [209]. FCD first takes the means and covariances of the activations of the penultimate layer of ChemNet are calculated for the reference set and the set of generated molecules. The FCD is then calculated as the Frechet distance for both pairs of values. Lower FCD values indicate more similarity between two distributions. • Mean Maximum Discrepancy (MMD) [210]. MMD measures the distance between the probability distributions of a variety of physicochemical descriptors for the training set and a set of generated molecules.
QED, GSK3β, JNK3, and DRD2 scores range from 0 to 1, higher value is more preferred. In contrast, the SA score ranges from 0 to 10, lower SA score means the molecule is easier to synthesize and is more desirable. JNK3 and GSK3β were originally curated in [212]. DRD2 were curated in [213]. Oracle complexity. In realistic discovery settings, the oracle acquisition cost is usually not negligible. Thus, it is necessary to consider oracle complexity as a metric of a molecule generation algorithm. [104] compares the performance of various methods given the same number of oracle calls, because the number of oracle calls is an important metric to evaluate the sample efficiency/complexity of a method. Constrained optimization. In many real-world scenarios, molecule optimization aims to search for molecules with similar structures as the base molecule but with a high activity such as drug-likeness or synthesis accessibility for drug design. Therefore, the similarity between molecule structures is also considered during the so-called constrained optimization scenario. Common similarity measurements are Tanimoto similarity, scaffold similarity, fragment similarity, etc.

3D Molecule Evaluation
This section discusses the evaluation of molecular conformations, measuring the 3D geometries.
Stability As first introduced in E-NFs [52], stability extends from validity in evaluating 1D/2D molecule to its stability in 3D space. Specifically, an atom is stable when the number of bonds connecting to other atoms matches the valence of the atom, a molecule is stable when all atoms are stable.
Room-Mean-Square Deviation (RMSD) measures the alignment between two conformations R ∈ R n×3 and R ∈ R n×3 , n is the number of points in the conformation, defined as follows: The conformationR is obtained by an alignment function R = A(R, R r ), which rotates and translates the reference conformation R r to have the smallest distance to the generated R according to the RMSD metrics. Kabsch-RMSD is a type of RMSDs that first superimposes the two structures with the Kabsch algorithm before calculating RMSD scores. Two common metrics to evaluate the quality of the generated molecule conformations are Coverage (COV) and Matching (MAT) scores [170], [182].

FUTURE DIRECTION
This section summarizes challenges we face and the opportunities we have in molecule generation from various aspects, including data, oracle, interpretability, evaluation, prior knowledge, tasks, etc.

Challenges
• Out-of-distribution Generation, the known molecules take up a small fraction of all the chemically valid molecules. Most of the existing methods (especially deep generative models) imitate the known molecule distribution and lack the exploration of the unknown molecule space. • Unrealistic Problem Formulation, the problem formulation for molecule design task should respect realworld applications in chemistry. • Ideal assumptions/expensive Oracle Calls, current machine learning methods usually assume unlimited access to oracle calls which are expensive in the realworld drug discovery process.
• Lack of Interpretability, interpretability is an important yet not a fully explored area for molecule generative models. For example, how the generative or optimization process of molecules could lead to interpretable chemical rules. There are some early explorations to the interpretability, e.g., [104], [109], [143], [163], [215], [216]. However, most of these methods analyze interpretability via case studies, how to quantitatively evaluate interpretability remains a challenge. • Lack of Unified Evaluation Protocols, this is also related to how we define a good drug candidate, from this, we may also focus more on e.g. structured-based drug design, to generate ligands that could be bound to protein pockets. • Lack of Large-scale Study and Benchmark, tons of machine learning methods have been developed while there are no fair benchmark results on many types of models in different key tasks. The chemical space is estimated to have from 10 23 to 10 60 drug-like molecules, while the current available large datasets, e.g., GDB13, have not been utilized to facilitate molecule generation.
Only small fractions of large databases are utilized instead. • Generation in Low-data Regime, despite the current success in generating new molecules with machine learning models learned from large molecule data repositories, many real-world applications are in short of data collections. Thus, generating molecules in lowdata regime remains a challenge that limits the realworld applications of molecule design.

Opportunities
• Extend to more structured data. Essentially, this survey aims at giving a comprehensive description of small molecule generation, which is indeed structured data. Yet, other applications with more complex data structures may also benefit from the approaches discussed here, e.g., the design of polysaccharide, protein, antibody, gene, crystal structure, etc. • Connection to later phases in drug development.
Molecule design/optimization are early phases in drug discovery. Current approaches leverage some simple and ad-hoc oracles, so there is a gap between molecule design/optimization and later phases in drug development (such as animal models (a.k.a. pre-clinical) and clinical trials) [217], [218]. It would be helpful if we can leverage the information from these later phases. • Knowledge Discovery. Modeling chemical compounds in an efficient and structured way could lead to enhanced human knowledge. Graph structure learning could infer the implicit non-bonded or long-range interactions which are usually ignored while modeling molecules with chemical laws. The exploration over the latent space could interpret the chemical rules that govern molecular properties.

CONCLUSION
In this survey, we comprehensively review the molecule design problem under the setting of machine learning. To the best of our knowledge, this is the first comprehensive review of machine learning approaches for molecule design. We categorize the generation methods on molecules from mainly two aspects. Furthermore, we elaborate on the molecule design tasks and empirical setups of each individual task. Finally, we identify open challenges and opportunities in molecule design, point out the limitations of current approaches and pave the way for the future of molecule design with machine learning models.