Title: Molecule Generation with Fragment Retrieval Augmentation
Venue: NeurIPS 2024
Accepted: yes
Keywords: fragment-based drug discovery

molecule generation

molecular language model

retrieval-augmented generation
Abstract: Fragment-based drug discovery, in which molecular fragments are assembled into new molecules with desirable biochemical properties, has achieved great success. However, many fragment-based molecule generation methods show limited exploration beyond the existing fragments in the database as they only reassemble or slightly modify the given ones. To tackle this problem, we propose a new fragment-based molecule generation framework with retrieval augmentation, namely *Fragment Retrieval-Augmented Generation* (*f*-RAG). *f*-RAG is based on a pre-trained molecular generative model that proposes additional fragments from input fragments to complete and generate a new molecule. Given a fragment vocabulary, *f*-RAG retrieves two types of fragments: (1) *hard fragments*, which serve as building blocks that will be explicitly included in the newly generated molecule, and (2) *soft fragments*, which serve as reference to guide the generation of new fragments through a trainable *fragment injection module*. To extrapolate beyond the existing fragments, *f*-RAG updates the fragment vocabulary with generated fragments via an iterative refinement process which is further enhanced with post-hoc genetic fragment modification. *f*-RAG can achieve an improved exploration-exploitation trade-off by maintaining a pool of fragments and expanding it with novel and high-quality fragments through a strong generative prior.

Molecule Generation with Fragment Retrieval Augmentation

Abstract

Fragment-based drug discovery, in which molecular fragments are assembled into new molecules with desirable biochemical properties, has achieved great success. However, many fragment-based molecule generation methods show limited exploration beyond the existing fragments in the database as they only reassemble or slightly modify the given ones. To tackle this problem, we propose a new fragmentbased molecule generation framework with retrieval augmentation, namely Fragment Retrieval-Augmented Generation ( f -RAG). f -RAG is based on a pre-trained molecular generative model that proposes additional fragments from input fragments to complete and generate a new molecule. Given a fragment vocabulary, f -RAG retrieves two types of fragments: (1) hard fragments , which serve as building blocks that will be explicitly included in the newly generated molecule, and (2) soft fragments , which serve as reference to guide the generation of new fragments through a trainable fragment injection module . To extrapolate beyond the existing fragments, f -RAG updates the fragment vocabulary with generated fragments via an iterative refinement process which is further enhanced with post-hoc genetic fragment modification. f -RAG can achieve an improved exploration-exploitation trade-off by maintaining a pool of fragments and expanding it with novel and high-quality fragments through a strong generative prior.

1 Introduction

The goal of small molecule drug discovery is to discover molecules with specific biochemical target properties, such as synthesizability [9], non-toxicity [40], solubility [31] and binding affinity, in the vast chemical space. Fragment-based drug discovery (FBDD) has been considered as an effective approach to explore the chemical space and has resulted in many successful marketed drugs [27]. Contrary to high-throughput screening (HTS) [41] that searches from a library of drug-like molecules, FBDD constructs a library of molecular fragments to synthesize new molecules beyond the existing molecule library, leading to a better chemical coverage [5].

Recently, generative models have been adopted in the field of FBDD to accelerate the process of searching for drug

Optimization

performance

Diversity

Novelty

Synthesizability

f

-RAG (ours)

Genetic GFN

REINVENT

2

Hard fragments

Soft fragments

Augmented

embedding

Soft fragment

embeddings

Input

embedding

Fragment

vocabulary

New molecule

New molecule

Fragment

update

Molecule

update

Fragment

injection

*

*

*

*

*

*

*

Molecule

population

Genetic fragment modification

Parent molecules

Crossover

Mutation

Fragment update

Molecule update

SAFE-GPT with retrieval augmentation

Early layers

of SAFE-GPT

Later layers

of SAFE-GPT

*

Decompose

*

*

*

*

candidates [18, 45, 46, 30, 20, 11, 25]. These methods reassemble or slightly modify the fragments to generate new molecules with the knowledge of the generative model. As the methods are allowed to exploit chemical knowledge in the form of fragments to narrow the search space, they have shown meaningful success in generating optimized molecules. However, their performance is largely limited by the existing library of molecular fragments, where discovering new fragments is either impossible or highly limited. Some of the methods [14, 38, 25] suggested making modifications to existing fragments, but the modifications are only applied to small and local substructures and still heavily dependent on the existing fragments. The limited exploration beyond known fragments greatly hinders the possibility of generating diverse and novel drug candidates that may exhibit better target properties. Therefore, it is a challenge to improve the ability of discovering novel high-quality fragments, while exploiting existing chemical space effectively.

To this end, we propose a fragment-based molecule generation framework leveraging retrievalaugmented generation (RAG) [26], namely Fragment Retrieval-Augmented Generation ( f -RAG). As shown in Figure 2, f -RAG augments the pre-trained molecular language model SAFE-GPT [34] with two types of retrieved fragments: hard fragments and soft fragments for a better explorationexploitation trade-off. Specifically, we first construct a fragment vocabulary by decomposing known molecules from the existing library into fragments and scoring the fragments by measuring their contribution to target properties. From the fragment vocabulary, f -RAG first retrieves fragments that will be explicitly included in the new molecule (i.e., hard fragments). Hard fragments serve as the input context to the molecular language model that predicts the remaining fragments. In addition to retrieval of hard fragments, f -RAG retrieves fragments that will not be part of the generated molecule but provide informative guidance on predicting novel, diverse molecules (i.e., soft fragments). Concretely, the embeddings of soft fragments are fused with the embeddings of hard fragments (or input embeddings) through a lightweight fragment injection module in the middle of SAFE-GPT. The fragment injection module allows SAFE-GPT to generate new fragments by referring to the information conveyed by soft fragments.

During training, we only update the fragment injection module while keeping SAFE-GPT frozen. Inspired by Wang et al. [42], we train f -RAG to learn how to leverage the retrieved fragments for molecule generation, using a self-supervised loss that predicts the most similar one in the set of soft fragments. At inference, f -RAG dynamically updates the fragment vocabulary with newly generated fragments via an iterative refinement process. To further enhance exploration, we propose to modify the generated fragments from SAFE-GPT with a post-hoc genetic fragment modification process. The proposed f -RAG takes the advantages of both hard and soft fragment retrieval to achieve an improved exploration-exploitation trade-off. We verify f -RAG on various molecular optimization tasks, by examining the optimization performance, along with diversity, novelty, and

synthesizability. As shown in Figure 1, f -RAG exhibits the best balance across these essential considerations, demonstrating its applicability as a promising tool for drug discovery.

We summarize our contributions as follows:

We introduce f -RAG, a novel molecular generative framework that combines FBDD and RAG.

We propose a retrieval augmentation strategy that operates at the fragment level with two types of fragments, allowing fine-grained guidance to achieve an improved exploration-exploitation trade-off and generate high-quality drug candidates.

Through extensive experiments, we demonstrate the effectiveness of f -RAG in various drug discovery tasks that simulate real-world scenarios.

2 Related Work

Fragment-based molecule generation. Fragment-based molecular generative models refer to a class of methods that reassemble existing molecular substructures (i.e., fragments) to generate new molecules. Jin et al. [18] proposed to find big molecular substructures that satisfy the given chemical properties, and learn to complete the substructures into final molecules by adding small branches. Xie et al. [45] proposed to progressively add or delete fragments using Markov chain Monte Carlo (MCMC) sampling. Yang et al. [46] proposed to use reinforcement learning (RL) to assemble fragments, while Maziarz et al. [30], Kong et al. [20], and Geng et al. [11] used V AE-based techniques. Lee et al. [25] proposed to take the target chemical properties into account in the fragment vocabulary construction and used a combination of RL and a genetic algorithm (GA) to assemble and modify the fragments. On the other hand, graph-based GAs [14, 38] decompose parent molecules into fragments that are combined to generate an offspring molecule, and are also mutated with a small probability. Since fragment-based strategies are limited by generating molecules outside of the possible combinations of existing fragments, they suffer from limited exploration in the chemical space. Some of the methods [14, 38, 25] suggest making modifications to existing fragments to overcome this problem, but this is not a fundamental solution because the modifications are only local, still being based on the existing fragments.

Retrieval-augmented molecule generation. Retrieval-augmented generation (RAG) [26] refers to a technique that retrieves context from external data databases to guide the generation of a generative model. Recently, RAG has gained attention as a means to enhance accuracy and reliability of large language models (LLMs) [6, 36, 3]. In the field of molecule optimization, Liu et al. [28] developed a text-based drug editing framework that repurposes a conversational language model for solving molecular tasks, where the domain knowledge is injected by a retrieval and feedback module. More related to us, Wang et al. [42] proposed to use a pre-trained molecular language model to generate molecules, while augmenting the generation with retrieved molecules that have high target properties. Contrary to this method that retrieves molecules, our proposed f -RAG employs a fine-grained retrieval augmentation scheme that operates at the fragment level to achieve an improved exploration-exploitation trade-off.

3 Method

In this section, we introduce our Fragment Retrieval-Augmented Generation ( f -RAG) framework. f -RAG aims to generate optimized molecules by leveraging existing chemical knowledge through RAG, while exploring beyond the known chemical space under the fragment-based drug discovery (FBDD) paradigm. We first introduce the hard fragment retrieval in Sec. 3.1. Then, we present the soft fragment retrieval in Sec. 3.2. Lastly, we describe the genetic fragment modification in Sec. 3.3.

3.1 Hard Fragment Retrieval

Given a set of N molecules x i and their corresponding properties y i ∈ [0 , 1] , denoted as D = { ( x i , y i ) } N i =1 , we first construct a fragment vocabulary. We adopt an arm-linker-arm slicing algorithm provided by Noutahi et al. [34] which decomposes a molecule x into three fragments: two arms F arm (i.e., fragments that have one attachment point) and one linker F linker (i.e., a fragment that has two attachment points). Decomposing molecules into arms and linkers (or scaffolds) is a popular approach

*

*

*

[*]C1C(C(=O)OCCCC)=C(C)Nc2ncnn21

SAFE-GPT

C13C(C(=O)OCCCC)=C(C)Nc2ncnn21.C13=NCCS1

[*]c1cccc(Br)c1.[*]C(=O)C#CCN1CCCCC1

SAFE-GPT

c13cccc(Br)c1.C2(=O)C#CCN1CCCCC1.N2S3(=O)=O

Motif extension

Linker design

*

*

*

Arm

vocab

Linker

vocab

Arm

vocab

Arm

vocab

utilized in various drug discovery strategies, such as scaffold decoration or scaffold hopping [37]. We ignored the molecules in the training set that cannot be decomposed, and a set of arms F arm = { F arm ,j } 2 j N =1 and a set of linkers F linker = { F linker ,j } N j =1 are obtained after the algorithm is applied to the molecules { x i } N i =1 . Subsequently, we calculate the score of each fragment F j ∈ F arm ∪F linker using the average property of all molecules containing F j as their substructure as follows:

where score ( F j ) ∈ [0 , 1] , and S ( F j ) = { ( x, y ) ∈ D : F j is a fragment of x } . Intuitively, the fragment score evaluates the contribution of a given fragment to the target property of the whole molecule of which it is a part. From F arm and F linker, we choose the topN frag fragments based on the score to construct the arm fragment vocabulary V arm ⊂ F arm and the linker fragment vocabulary V linker ⊂ F linker, respectively.

Given the fragment vocabularies V arm and V linker consisting of high-property fragments, two hard fragments are randomly retrieved from the vocabularies. The hard fragments together form a partial molecular sequence that serves as input to a pre-trained molecular language model. In this work, we employ Sequential Attachment-based Fragment Embedding (SAFE) [34] as the molecular representation and SAFE-GPT [34] as the backbone generative model of f -RAG. SAFE is a noncanonical version of simplified molecular-input line-entry system (SMILES) [43] that represents molecules as a sequence of dot-connected fragments. Importantly, the order of fragments in a SAFE string does not affect the molecular identity. Using the SAFE representation, f -RAG forces the hard fragments to be included in a newly generated molecule by providing them as an input sequence to the language model to complete the rest of the sequence.

During generation, with a probability of 50% , f -RAG either (1) retrieves two hard fragments from V arm or (2) retrieves one from V arm and one from V linker. In the former case, f -RAG performs linker design, which generates a new fragment that links the input fragments. In the latter case, f -RAG first randomly selects an attachment point in the retrieved linker and combines it with the retrieved arm to form a single fragment, and then performs motif extension, which generates a new fragment that completes the molecule (Figure 3).

3.2 Soft Fragment Retrieval

Given two hard fragments as input, the molecular language model generates one new fragment to complete a molecule. Instead of relying solely on the model to generate the new fragment, we propose to augment the generation with the information of K retrieved fragments, which we refer to as soft fragments, to guide the generation. Specifically, if the two hard fragments are all arms, f -RAG randomly retrieves soft fragments from V linker. If one of the hard fragments is an arm and another is a linker, f -RAG randomly retrieves soft fragments from V arm. Using up to the L -th layer of the lauguage model LM 0: L , the embeddings of the input sequence x input and the soft fragments { F soft ,k } K k =1 are obtained as follows:

𝐹

!

.

𝐹

"

!

𝐹

!

"##

𝐹

#

𝐹

#

"$$

𝐹

#

#$$

⋯

𝐹

#

%$$

Input sequence

Target sequence

𝐹

!

"##

Cross entropy

𝑥 = 𝐹

"

.𝐹

$

.

𝐹

!

Training molecule

SAFE-GPT with retrieval augmentation

Early layers

of SAFE-GPT

Later layers

of SAFE-GPT

Augmented

embedding

Soft fragment

embeddings

Input

embedding

Fragment

injection

Soft fragments

Subsequently, f -RAG injects the embeddings of soft fragments through a trainable fragment injection module . Following Wang et al. [42], the fragment injection module uses cross-attention to fuse the embeddings of the input sequence and soft fragments as follows:

where FI is the fragment injection module, Query, Key, and Value are multi-layer perceptrons (MLPs), and d Key is the output dimension of Key. Next, a molecule is generated by decoding the augmented embedding h using the later layers of the language model as x new = LM L +1: L T ( h ) , where L T is the total number of layers of the model. With the fragment injection module, f -RAG can utilize information of soft fragments to generate novel fragments which are also likely to contribute to the high target properties. During generation, the fragment vocabulary is dynamically updated through an iterative process that scores newly generated fragments based on Eq. (1) and replaces fragments in the fragment vocabulary to the topN frag fragments.

Next, we need to train f -RAG to learn how to augment the retrieved soft fragments into the molecule generation. To retain the high generation quality of SAFE-GPT and make the training process efficient, we keep the backbone language model frozen and only train the lightweight fragment injection module. Inspired by Wang et al. [42], we propose a new self-supervised objective that predicts the most similar fragment to the input fragments. Specifically, each molecular sequence x in the training set is first decomposed into fragment sequences ( F 1 , F 2 , F 3 ) with a random permutation between the fragments, using the same slicing algorithm used in the vocabulary construction. Importantly, using the SAFE representation, x can be simply represented by connecting its fragments with dots as F 1 .F 2 .F 3 . We consider the first two fragments as hard fragments. Given the remaining fragment F 3 , we retrieve its K most similar fragments { F kNN 3 } K k =1 from the training fragment pool. Here, we use the pairwise Tanimoto similarity using Morgan fingerprints of radius 2 and 1024 bits. Using the hard fragments as the input sequence as F 1 .F 2 , the objective is to predict the most similar fragment F 1 NN 3 utilizing the original fragment and the next K -1 most similar fragments { F kNN 3 } K k =2 as the soft fragments. The training process is illustrated in Figure 4, and the details are provided in Section D.1.

Note that the training of the fragment injection module is target property-agnostic, as the fragments used for training are independent of the target property. In contrast, the fragment vocabularies used for generation are target property-specific, as it is constructed using the scoring function in Eq. (1). This allows f -RAG to effectively generate optimized molecules across different target properties without any retraining.

3.3 Genetic Fragment Modification

To further enhance exploration in the chemical space, we propose to modify the generated fragments with a post-hoc genetic algorithm (GA). Specifically, we adopt the operations of Graph GA [14]. We first initialize the population P with the topN mol molecules generated by our fragment retrievalaugmented SAFE-GPT based on the target property y . Parent molecules are then randomly selected from the population and offspring molecules are generated by the crossover and mutation operations (see Jensen [14] for more details). The offspring molecules can have new fragments not contained in the initial fragment vocabulary, and the fragment vocabularies V arm and V linker are again updated by the topN frag fragments based on the scores of Eq. (1). In the subsequent generation, the population P is updated with the generated molecules so far by both SAFE-GPT and GA.

As shown in Figure 2, f -RAG generates desirible molecules through multiple cycles of (1) the SAFE-GPT generation augmented with the hard fragment retrieval (Section 3.1) and the soft fragment retrieval (Section 3.2), and (2) the GA generation (Section 3.3). Through this interplay of hard fragment retrieval, soft fragment retrieval, and the genetic fragment modification, f -RAG can exploit existing chemical knowledge through the form of fragments both explicitly and implicitly, while exploring beyond initial fragments by the dynamic vocabulary update. We summarize the generation process of f -RAG in Algorithm 1 in Section C.

4 Experiments

Wevalidate f -RAG on molecule generation tasks that simulate various real-world drug discovery problems. We first conduct experiments on the practical molecular optimization (PMO) benchmark [10] in Section 4.1. We then conduct experiments to generate novel molecules that have high binding affinity, drug-likeness, and synthesizability in Section 4.2. We further perform analyses in Section 4.3.

4.1 Experiments on PMO Benchmark

Setup. We demonstrate the efficacy of f -RAG on the 23 tasks from the PMO benchmark. Following the standard setting of the benchmark, we set the maximum number of oracle calls to 10,000 and evaluate optimization performance with the area under the curve (AUC) of the average property scores of the top-10 molecules versus oracle calls. In addition, we evaluate diversity , novelty , and synthesizability of generated molecules, other essential considerations in drug discovery. We use the Therapeutics Data Commons (TDC) library [12] to calculate diversity. Following previous works [18, 45, 24, 25], novelty is defined as the fraction of molecules that have the maximum Tanimoto similarity less than 0 . 4 with the training molecules. We use the synthetic accessibility (SA) [8] score of the TDC library to measure synthesizability. These values are measured using the top-100 generated molecules, following the setting of the benchmark. Further explanation on the evaluation metrics and experimental setup are provided in Section D.3.

Baselines. We employ the top-7 methods reported by the PMO benchmark and two recent state-ofthe-art methods as our baselines. Graph GA [14] is a GA with a fragment-level crossover operation, and Mol GA [38] is a more hyperparameter-tuned version of Graph GA. Genetic GFN [19] is a method that uses Graph GA to guide generation of a GFlowNet. REINVENT [35] is a SMILESbased RL model and SELFIES-REINVENT is a modified REINVENT that uses the self-referencing embedded strings (SELFIES) [21] representation. GP BO [39] is a method that optimizes the Gaussian process acquisition function with Graph GA. STONED [33] is a GA-based model that operates on SELFIES strings. LSTM HC [7] is a SMILES-based LSTM model. SMILES GA [47] is a GA whose genetic operations are based on the SMILES context-free grammar.

Results. The results of optimization performance are shown in Table 1. f -RAG outperforms the previous methods in terms of the sum of the AUC top-10 values and achieves the highest AUC top-10 values in 12 out of 23 tasks, demonstrating that the proposed combination of hard fragment retrieval, soft fragment retrieval, and genetic fragment modification is highly effective in discovering optimized drug candidates that have high target properties. On the other hand, the average scores of diversity, novelty, and synthesizability of the generated molecules are summarized in Table 2, and the full results are presented in Tables 4, 5, and 6. As shown in these tables, f -RAG achieves the best diversity and synthesizability, and the second best novelty. Notably, f -RAG shows the highest diversity in 12 out of 23 tasks, and the highest synthesizability in 19 out of 23 tasks. Note that the high novelty value of Mol GA comes at the cost of other important factors, i.e., optimization performance, diversity, and synthesizability. The essential considerations in drug discovery often conflict with each other, making the drug discovery problem challenging. These trade-offs are also visualized in Figure 1 and Figure 7, and f -RAG effectively improves the trade-offs by utilizing existing fragments while dynamically updating the fragment vocabulary with newly proposed fragments.

4.2 Optimization of Docking Score under QED, SA, and Novelty Constraints

Setup. Following Lee et al. [24] and Lee et al. [25], we validate f -RAG in a set of tasks that aim to optimize the binding affinity against a target protein while also maintaining high drug-likeness,

synthesizability, and novelty. Following the previous works, we use docking score calculated by QuickVina 2 [2] with five protein targets, parp1, fa7, 5ht1b, braf, and jak2, to measure binding affinity. We use quantitative estimates of drug-likeness (QED) [4] and SA [8] to measure drug-likeness and synthesizability, respectively. Following the previous works, we set the target property y as follows:

where ̂ DS and ̂ SA are the normalized DS and SA according to Eq. (7) in Section D.4. We generate 3,000 molecules and evaluate them using novel top 5% DS (kcal/mol) , which indicates the mean DS of the top 5% unique and novel hits. Here, novel hits are defined as the molecules that satisfy all the following criteria: (the maximum similarity with the training molecules) < 0 . 4 , DS < (the median DS of known active molecules), QED > 0 . 5 , and SA < 5 . Further details are provided in Section D.4.

Baselines. JT-VAE [16], HierVAE [17], MARS [45], RationaleRL [18], FREED [46], PSVAE [20], and GEAM [25] are the methods that first construct a fragment vocabulary using a molecular dataset, then learn to assemble those fragments to generate new molecules. On the other hand, Graph GA [14], GEGL [1], and Genetic GFN [19] are GA-based methods that utilize the information of fragments by adopting the fragment-based crossover operation. GA+D [32] is a discriminator-enhanced GA method that operates on the SELFIES representation. RetMol [42] is a retrieval-based method that uses retrieved example molecules to augment the generation of a pre-trained molecular language model. REINVENT [35] and MORLD [15] are RL models that operate on SMILES and graph molecular representations, respectively. MOOD [24] is a diffusion model that employs an out-of-distribution control to improve novelty.

Results. The results are shown in Table 3. In all five tasks, f -RAG outperforms all the baselines. Note that the evaluation metric, novel top 5% DS, is designed to reflect the nature of the drug discovery problem, which optimizes multiple target properties by finding a good balance between exploration and exploitation. The results demonstrate the superiority of f -RAG in generating drug-like, synthesizable, and novel drug candidates that have high binding affinity to the target protein with the improved exploration-exploitation trade-off. We additionally visualize the generated molecules in Figure 8.

Additional comparison with GEAM. To further justify the advantage of f -RAG over GEAM, we additionally include the results of seven multi-property optimization (MPO) tasks in the PMO benchmark (Section 4.1) in Table 7. As we can see, f -RAG significantly outperforms GEAM in all the tasks, validating its applicability to a wide range of drug discovery problems.

Optimization

performance

Diversity

Novelty

Synthesizability

f

-RAG

f

-RAG (

𝛿

=0.8)

f

-RAG (

𝛿

=0.6)

f

-RAG (

𝛿

=0.4)

Optimization

performance

Diversity

Novelty

Synthesizability

f

-RAG (hard+soft+GA)

f

-RAG (soft+GA)

f

-RAG (hard+GA)

f

-RAG (hard+soft)

f

-RAG (GA)

Avg. Top-10

Number of oracle calls

f

-RAG (hard+soft+GA)

f

-RAG (soft+GA)

f

-RAG (hard+GA)

f

-RAG (hard+soft)

(a)

(b)

(c)

4.3 Analysis

Ablation study. To verify the effect of each component of f -RAG, we conduct experiments with various combinations of the components, i.e., hard fragment retrieval (hard), soft fragment retrieval (soft), and genetic fragment modification (GA), in Figure 5(a) and Figure 5(b). The detailed results are shown in Table 8 and Table 9. For f -RAG (soft+GA) that does not utilize the hard fragment retrieval, we randomly initialized the fragment vocabularies instead of selecting the topN frag fragments based on Eq. (1) and let the model use random hard fragments. Note that even though f -RAG (hard+soft), f -RAG that does not utilize the genetic fragment modification, shows very high diversity, the value is not meaningful as the generated molecules are not highly optimized, not novel, and not synthesizable. The same applies to the high novelty of f -RAG (soft+GA) and f -RAG (GA). On the contrary, the full f -RAG achieves the best optimization performance and synthesizability while showing reasonably high diversity and novelty. Importantly, f -RAG outperforms f -RAG (hard+GA) in all the metrics, especially for diversity and novelty, indicating the soft fragment retrieval aids the model in generating more diverse and novel drug candidates while maintaining their high target properties.

Controlling optimization performance-diversity trade-off. It is well-known that molecular diversity is important in drug discovery, especially when the oracle has noise. However, optimization performance against the target property and molecular diversity are conflicting factors [10, 19]. To control this trade-off between optimization performance and diversity, we additionally introduce a similarity-based fragment filtering strategy, which excludes similar fragments from the fragment vocabulary. Specifically, when updating the vocabulary, new fragments that have a higher Tanimoto similarity than δ to fragments in the vocabulary are filtered out. Morgan fingerprints of radius 2 and 1024 bits are used to calculate the Tanimoto similarity. The results of the similarity-based fragment filter with different values of δ are shown in Figure 5(c), verifying f -RAG can increase diversity at the expense of optimization performance by controlling δ .

Effect of the fragment vocabulary update. To analyze the effect of the dynamic update of the fragment vocabulary during generation, we visualize the distribution of the docking scores of molecules generated by f -RAG with or with the fragment vocabulary update in Figure 6. The dynamic update allows f -RAG to generate more optimized molecules in terms of the target property. Notably, with the dynamic update, f -RAG can discover molecules that have higher binding affinity to the target protein than the top molecule in the training set, and we visualize an example of such molecules in the figure. Note that the molecule also has low similarity ( 0 . 321 ) with the training molecules. This result demonstrates the explorability of f -RAG to discover drug candidates that lie beyond the training distribution.

Density

Docking score (kcal/mol)

Best in

ZINC250k

With fragment update

Without fragment update

5 Conclusion

We proposed f -RAG, a new fragment-based molecular generative framework that utilizes hard fragment retrieval, soft fragment retrieval, and genetic fragment modification. With hard fragment retrieval, f -RAG can explicitly exploit the information contained in existing fragments that contribute to the target properties. With soft fragment retrieval, f -RAG can balance between exploitation of existing chemical knowledge and exploration beyond the existing fragment vocabulary. Soft fragment retrieval with SAFE-GPT allows f -RAG to propose new fragments that are likely to contribute to the target chemical properties. The proposed novel fragments are then dynamically incorporated in the fragment vocabulary throughout generation. This exploration is further enhanced with genetic fragment modification, which modifies fragments with genetic operations and updates the vocabulary. Through extensive experiments, we demonstrated the efficacy of f -RAG to improve the explorationexploitation trade-off. f -RAG outperforms previous methods, achieving state-of-the-art performance to synthesize diverse, novel, and synthesizable drug candidates with high target properties.

References

Sungsoo Ahn, Junsu Kim, Hankook Lee, and Jinwoo Shin. Guiding deep molecular optimization with genetic exploration. Advances in neural information processing systems , 33:12008-12021, 2020.

Amr Alhossary, Stephanus Daniel Handoko, Yuguang Mu, and Chee-Keong Kwoh. Fast, accurate, and reliable molecular docking with quickvina 2. Bioinformatics , 31(13):2214-2216, 2015.

Akari Asai, Sewon Min, Zexuan Zhong, and Danqi Chen. Retrieval-based language models and applications. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 6: Tutorial Abstracts) , pages 41-46, 2023.

G Richard Bickerton, Gaia V Paolini, Jérémy Besnard, Sorel Muresan, and Andrew L Hopkins. Quantifying the chemical beauty of drugs. Nature chemistry , 4(2):90-98, 2012.

Marta Bon, Alan Bilsland, Justin Bower, and Kirsten McAulay. Fragment-based drug discovery-the importance of high-quality molecule libraries. Molecular Oncology , 16(21): 3761-3777, 2022.

Sebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai, Eliza Rutherford, Katie Millican, George Bm Van Den Driessche, Jean-Baptiste Lespiau, Bogdan Damoc, Aidan Clark, et al. Improving language models by retrieving from trillions of tokens. In International conference on machine learning , pages 2206-2240. PMLR, 2022.

Nathan Brown, Marco Fiscato, Marwin HS Segler, and Alain C Vaucher. Guacamol: benchmarking models for de novo molecular design. Journal of chemical information and modeling , 59(3):1096-1108, 2019.

Peter Ertl and Ansgar Schuffenhauer. Estimation of synthetic accessibility score of drug-like molecules based on molecular complexity and fragment contributions. Journal of cheminformatics , 1:1-11, 2009.

Wenhao Gao and Connor W Coley. The synthesizability of molecules proposed by generative models. Journal of chemical information and modeling , 60(12):5714-5723, 2020.

Wenhao Gao, Tianfan Fu, Jimeng Sun, and Connor Coley. Sample efficiency matters: a benchmark for practical molecular optimization. Advances in Neural Information Processing Systems , 35:21342-21357, 2022.

Zijie Geng, Shufang Xie, Yingce Xia, Lijun Wu, Tao Qin, Jie Wang, Yongdong Zhang, Feng Wu, and Tie-Yan Liu. De novo molecular generation via connection-aware motif mining. In International Conference on Learning Representations , 2023.

Kexin Huang, Tianfan Fu, Wenhao Gao, Yue Zhao, Yusuf H Roohani, Jure Leskovec, Connor W Coley, Cao Xiao, Jimeng Sun, and Marinka Zitnik. Therapeutics data commons: Machine learning datasets and tasks for drug discovery and development. In NeurIPS Track Datasets and Benchmarks , 2021.

John J Irwin, Teague Sterling, Michael M Mysinger, Erin S Bolstad, and Ryan G Coleman. Zinc: a free tool to discover chemistry for biology. Journal of chemical information and modeling , 52 (7):1757-1768, 2012.

Jan H Jensen. A graph-based genetic algorithm and generative model/monte carlo tree search for the exploration of chemical space. Chemical science , 10(12):3567-3572, 2019.

Woosung Jeon and Dongsup Kim. Autonomous molecule generation using reinforcement learning and docking to develop potential novel inhibitors. Scientific Reports , 10, 12 2020.

Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Junction tree variational autoencoder for molecular graph generation. In International Conference on Machine Learning , pages 2323-2332. PMLR, 2018.

Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Hierarchical generation of molecular graphs using structural motifs. In International Conference on Machine Learning , pages 4839-4848. PMLR, 2020.

Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Multi-objective molecule generation using interpretable substructures. In International conference on machine learning , pages 4849-4859. PMLR, 2020.

Hyeonah Kim, Minsu Kim, Sanghyeok Choi, and Jinkyoo Park. Genetic-guided gflownets: Advancing in practical molecular optimization benchmark. arXiv preprint arXiv:2402.05961 , 2024.

Xiangzhe Kong, Wenbing Huang, Zhixing Tan, and Yang Liu. Molecule generation by principal subgraph mining and assembling. Advances in Neural Information Processing Systems , 35: 2550-2563, 2022.

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

Matt J Kusner, Brooks Paige, and José Miguel Hernández-Lobato. Grammar variational autoencoder. In International Conference on Machine Learning , pages 1945-1954. PMLR, 2017.

Greg Landrum et al. RDKit: Open-source cheminformatics software, 2016. URL http://www. rdkit. org/, https://github. com/rdkit/rdkit , 2016.

Seul Lee, Jaehyeong Jo, and Sung Ju Hwang. Exploring chemical space with score-based out-ofdistribution generation. In International Conference on Machine Learning , pages 18872-18892. PMLR, 2023.

Seul Lee, Seanie Lee, Kenji Kawaguchi, and Sung Ju Hwang. Drug discovery with dynamic goal-aware fragments. International Conference on Machine Learning , 2024.

Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems , 33:9459-9474, 2020.

Qingxin Li. Application of fragment-based drug discovery to versatile targets. Frontiers in molecular biosciences , 7:180, 2020.

Shengchao Liu, Jiongxiao Wang, Yijin Yang, Chengpeng Wang, Ling Liu, Hongyu Guo, and Chaowei Xiao. Conversational drug editing using retrieval and domain feedback. In The Twelfth International Conference on Learning Representations , 2023.

Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. International Conference on Learning Representations , 2019.

Krzysztof Maziarz, Henry Richard Jackson-Flux, Pashmina Cameron, Finton Sirockin, Nadine Schneider, Nikolaus Stiefl, Marwin Segler, and Marc Brockschmidt. Learning to extend molecular scaffolds with structural motifs. In International Conference on Learning Representations , 2021.

Nicholas A Meanwell. Improving drug candidates by design: a focus on physicochemical properties as a means of improving compound disposition and safety. Chemical research in toxicology , 24(9):1420-1456, 2011.

AkshatKumar Nigam, Pascal Friederich, Mario Krenn, and Alan Aspuru-Guzik. Augmenting genetic algorithms with deep neural networks for exploring the chemical space. In International Conference on Learning Representations , 2020.

AkshatKumar Nigam, Robert Pollice, Mario Krenn, Gabriel dos Passos Gomes, and Alan Aspuru-Guzik. Beyond generative models: superfast traversal, optimization, novelty, exploration and discovery (stoned) algorithm for molecules using selfies. Chemical science , 12(20):70797090, 2021.

Emmanuel Noutahi, Cristian Gabellini, Michael Craig, Jonathan SC Lim, and Prudencio Tossou. Gotta be safe: a new framework for molecular design. Digital Discovery , 3(4):796-804, 2024.

Marcus Olivecrona, Thomas Blaschke, Ola Engkvist, and Hongming Chen. Molecular de-novo design through deep reinforcement learning. Journal of cheminformatics , 9(1):1-14, 2017.

Ori Ram, Yoav Levine, Itay Dalmedigos, Dor Muhlgay, Amnon Shashua, Kevin Leyton-Brown, and Yoav Shoham. In-context retrieval-augmented language models. Transactions of the Association for Computational Linguistics , 11:1316-1331, 2023.

Gisbert Schneider, Werner Neidhart, Thomas Giller, and Gerard Schmid. 'scaffold-hopping' by topological pharmacophore search: a contribution to virtual screening. Angewandte Chemie International Edition , 38(19):2894-2896, 1999.

Austin Tripp and José Miguel Hernández-Lobato. Genetic algorithms are strong baselines for molecule generation. arXiv preprint arXiv:2310.09267 , 2023.

Austin Tripp, Gregor NC Simm, and José Miguel Hernández-Lobato. A fresh look at de novo molecular design benchmarks. In NeurIPS 2021 AI for Science Workshop , 2021.

Fabio Urbina, Filippa Lentzos, Cédric Invernizzi, and Sean Ekins. Dual use of artificialintelligence-powered drug discovery. Nature Machine Intelligence , 4(3):189-191, 2022.

WPatrick Walters, Matthew T Stahl, and Mark A Murcko. Virtual screening-an overview. Drug discovery today , 3(4):160-178, 1998.

Zichao Wang, Weili Nie, Zhuoran Qiao, Chaowei Xiao, Richard Baraniuk, and Anima Anandkumar. Retrieval-based controllable molecule generation. In International Conference on Learning Representations , 2023.

David Weininger. Smiles, a chemical language and information system. 1. introduction to methodology and encoding rules. Journal of chemical information and computer sciences , 28 (1):31-36, 1988.

Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, et al. Transformers: Stateof-the-art natural language processing. In Proceedings of the 2020 conference on empirical methods in natural language processing: system demonstrations , pages 38-45, 2020.

Yutong Xie, Chence Shi, Hao Zhou, Yuwei Yang, Weinan Zhang, Yong Yu, and Lei Li. Mars: Markov molecular sampling for multi-objective drug discovery. In International Conference on Learning Representations , 2020.

Soojung Yang, Doyeong Hwang, Seul Lee, Seongok Ryu, and Sung Ju Hwang. Hit and lead discovery with explorative rl and fragment-based molecule generation. Advances in Neural Information Processing Systems , 34:7924-7936, 2021.

Naruki Yoshikawa, Kei Terayama, Masato Sumita, Teruki Homma, Kenta Oono, and Koji Tsuda. Population-based de novo molecule generation, using grammatical evolution. Chemistry Letters , 47(11):1431-1434, 2018.

A Limitations

Since our proposed f -RAG is built on a pre-trained backbone molecular language model, it relies heavily on the generation performance of the backbone model. However, this also means that our method delegates the difficult task of molecule generation to a large model and lets the lightweight fragment injection module take care of the relatively easy task of fragment retrieval augmentation. This strategy enables very efficient and fast training (Section D.5) and makes f -RAG a simple but powerful method to solve various drug discovery tasks.

B Broader Impacts

Through our paper, we demonstrated that f -RAG can achieve improved trade-offs between various considerations in drug discovery, showing its strong applicability to real-world drug discovery tasks. However, given its effectiveness, f -RAG has the possibility to be used maliciously to generate harmful molecules. This can be prevented by setting the target properties to comprehensively consider toxicity and other side effects, or filtering out toxic fragments from the fragment vocabulary during generation.

C Generation Process of f -RAG

D Experimental Details

D.1 Training of Fragment Injection Module

In this section, we describe the details for training the fragment injection module, the only part of the f -RAG framework that is trained. f -RAG has 2,362,368 trainable parameters, coming from the fragment injection module. These correspond to only 2.64% of the total parameters of 89,648,640, indicating that the fragment injection module is very lightweight compared to the backbone molecular language model.

Throughout the paper, we used the official codebase including the pre-trained SAFE-GPT 3 of Noutahi et al. [34]. Following the codebase, we used the HuggingFace Transformer library [44] (Apache-2.0 license) to train the fragment injection module. We set the number of retrieved soft fragments to K = 10 . For the layer of the backbone language model that the fragment injection module will be inserted behind, we conducted experiments with the search space L ∈ { 1 , 6 } , and found the L = 1 -st layer works well. The results showing this comparison are provided in Table 11. The fragment injection module was trained to 8 epochs with a learning rate of 1 × 10 -4 using the AdamW optimizer [29]. We performed searches with the search spaces (epoch) ∈ { 5 , 8 , 10 } and (learning rate) ∈ { 1 × 10 -4 , 5 × 10 -3 } , respectively.

D.2 Genetic Operations for Fragment Modification

As described in Section 3.3, we adopt the operations of Graph GA [14] to modify the generated fragments to further enhance exploration of f -RAG. Specifically, in the crossover operation, parents are cut at random positions at ring or non-ring positions with a probability of 50%, and random fragments from the cut are combined to generate offspring. In the mutation operation, bond insertion/deletion, atom insertion/deletion, bond order swapping, or atom changes are performed on the offspring molecule with a predefined probability.

D.3 Experiments on PMO Benchmark

In this section, we describe the experimental details used in the experiments of Section 4.1.

Implementation details. We used the official codebase 4 of Gao et al. [10] for implementing the experiments. We used ZINC250k [13] with the same train/test split used by Kusner et al. [22] to train the fragment injection module and construct the initial fragment vocabulary. We set the size of the fragment vocabulary to N frag = 50 and the size of the molecule population to N mol = 50 . When constructing the fragment vocabulary, fragments were filtered according to the number of atoms. We searched the size range in the search space [ (min. number of atoms), (max. number of atoms) ] ∈ { [5 , 12] , [10 , 16] , [10 , 30] } . As a result, we used the range [5 , 12] for the albuterol_similarity, iso-mers_c7h8n2o2m, isomers_c9h10n2o2pf2cl, median1, qed, sitagliptin_mpo, zaleplon_mpo tasks, [10 , 30] for the gsk3b and jnk3 tasks, and [10 , 16] for the rest of the tasks. We also confined the size of the generate molecules. We used the range [10 , 30] for the albuterol_similarity, isomers_c7h8n2o2m, isomers_c9h10n2o2pf2cl, median1, qed, sitagliptin_mpo, zaleplon_mpo tasks, [30 , 80] for the gsk3b and jnk3 tasks, and [20 , 50] for the rest of the tasks. We set the mutation rate of the GA to 0 . 1 . We set the number of SAFE-GPT generation and number of GA generation in one cycle to G SAFE-GPT = 10 and G GA = 10 , respectively.

Measuring novelty and synthesizability. Following previous works [18, 45, 24, 25], novelty of the generated molecules X is measured by the fraction of molecules that have a similarity less than 0.4 compared to its nearest neighbor x SNN in the training set as follows:

where N = |X| and sim ( x, x ′ ) is the pairwise Tanimoto similarity of molecules x and x ′ . The similarity is calculated using Morgan fingerprints of radius 2 and 1024 bits obtained by the RDKit [23]

library. On the other hand, since synthetic accessibility (SA) [8] scores range from 1 to 10 with higher scores indicating more difficult synthesis, we measure synthesizability using the normalized SA score as follows:

Visualizing the Radar Plots. To draw Figure 1 and Figure 5, sum AUC top-10, average top-100 diversity, average top-100 novelty, and normalized average top-100 SA score on the PMO benchmark in Table 1 and Table 2 were used to indicate optimization performance, diversity, novelty, and synthesizability, respectively. After the SA score is normalized according to Eq. (6), all the values are min-max normalized to [0 , 1] .

D.4 Optimization of Docking Score under QED, SA, and Novelty Constraints

In this section, we describe the experimental details used in the experiments of Section 4.2.

Implementation details. We used the official codebase 5 of Lee et al. [24] for implementing the experiments. Following Lee et al. [24] and Lee et al. [25], we used ZINC250k [13] with the same train/test split used by Kusner et al. [22] to train the fragment injection module and construct the initial fragment vocabulary. As in Section D.3, when constructing the fragment vocabulary, fragments were filtered based on their number of atoms. We set the range to [5 , 12] . To confinee the size of the generate molecules, we used the range [20 , 40] . The mutation rate of the GA was set to 0 . 1 . We set the number of SAFE-GPT generation and number of GA generation in one cycle to G SAFE-GPT = 1 and G GA = 3 , respectively.

Measuring docking score, QED, SA, and novelty. Westrictly followed the setting used in previous works [24, 25] to measure these properties. Specifically, we used QuickVina 2 [2] to calculate docking scores (DSs). We used the RDKit [23] library to calculate QED and SA. Following previous works, we compute the normalized DS ( ̂ DS) and the normalized SA ( ̂ SA) as follows:

where clip is the function that clips the value in the range [ -20 , 0] . As in Section D.3, novelty is determined as { sim ( x, x SNN ) < 0 . 4 } .

✶ D.5 Computing resources

We trained the fragment injection module using one GeForce RTX 3090 GPU. The training took less than 4 hours. We generated molecules using one Titan XP (12GB), GeForce RTX 2080 Ti (11GB), or GeForce RTX 3090 GPU (24GB). The experiments on each task in Section 4.1 took less than 2 hours and the experiments on each task in Section 4.2 took approximately 2 hours.

E Additional Experimental Results

In this section, we provide additional experimental results.

Diversity, novelty, and synthesizability results on PMO benchmark. We provide the full results of Table 2 in Table 4, Table 5, and Table 6. As shown in the tables, f -RAG achieves the best diversity and synthesizability, while showing the second best novelty. We also provide the pairwise trade-off plots in Figure 7.

Comparison with GEAM on PMO benchmark. To provide additional comparisons of f -RAG to GEAM [25], we followed the setup of Lee et al. [25] to conduct experiments on the seven MPO tasks in the PMO benchmark. As shown in Table 7, f -RAG largely outperforms the baselines including GEAM in all of the tasks.

Ablation study. We provide the full results of Figure 5(b) in Table 8 and Table 9. As shown in the tables, Figure 5(a), and Figure 5(b), the three components of f -RAG, hard fragment retrieval, soft fragment retrieval, and genetic fragment modification, are essential to the superior performance of f -RAG and improved balance between various drug discovery considerations.

Controlling optimization performance-diversity trade-off. We provide the full results of Figure 5(c) in Table 10. As shown in the table and Figure 5(c), f -RAG can effectively control the performance-diversity trade-off with the similarity-based fragment filtering.

Effect of location of the fragment injection module. We provide the results of f -RAG with L = 1 and L = 6 in Table 11. As shown in the table, f -RAG with L = 1 works better than f -RAG with L = 6 , probably because injecting information from soft fragments in an earlier layer can carry more information into the final augmented embedding. As a result of this experiment, f -RAG in the main experiments used L = 1 .

Visualization of generated molecules. We visualize examples of the generated molecules by f -RAG in Figure 8. The examples are drawn randomly from the molecules used to calculate the novel top 5% DS values in Table 3.

Diversity

Optimization performance

f

-RAG

Novelty

Optimization performance

Synthesizability

Optimization performance

REINVENT

Genetic GFN

f

-RAG

REINVENT

REINVENT

f

-RAG

Genetic GFN

Better

Genetic GFN

Better

Better

-12.8, 0.561, 3.28, 0.338

-14.1, 0.516, 3.15, 0.373

-12.8, 0.676, 3.10, 0.308

-12.6, 0.677, 3.61, 0.385

-12.5, 0.697, 3.47, 0.375

-12.7, 0.821, 3.27, 0.358

-13.1, 0.751, 3.42, 0.329

-12.9, 0.790, 3.64, 0.294

-13.3, 0.684, 4.13, 0.355

-12.7, 0.546, 3.33, 0.250

-9.6, 0.748, 4.18, 0.260

-10.0, 0.709, 3.73, 0.333

-10.1, 0.665, 4.11, 0.318

-9.5, 0.753, 3.22, 0.296

-9.9, 0.650, 3.07, 0.381

-10.1, 0.701, 3.09, 0.394

-9.8, 0.799, 2.92, 0.358

-9.9, 0.601, 3.24, 0.342

-9.4, 0.728, 3.09, 0.352

-10.7, 0.563, 3.05, 0.329

-12.7, 0.640, 3.14, 0.313

-12.4, 0.629, 2.88, 0.380

-13.5, 0.590, 2.98, 0.391

-13.1, 0.548, 3.23, 0.315

-12.4, 0.533, 3.39, 0.346

-12.4, 0.874, 3.39, 0.315

-12.2, 0.545, 3.20, 0.278

-13.1, 0.569, 3.30, 0.351

-12.5, 0.888, 2.99, 0.367

-13.4, 0.781, 4.44, 0.314

-12.6, 0.545, 2.68, 0.385

-11.9, 0.501, 2.65, 0.371

-13.1, 0.711, 3.85, 0.329

-13.0, 0.547, 3.40, 0.319

-12.1, 0.662, 3.42, 0.307

-12.1, 0.810, 3.00, 0.329

-12.4, 0.518, 3.00, 0.350

-12.8, 0.551, 2.82, 0.329

-12.0, 0.539, 3.62, 0.276

-11.9, 0.679, 2.65, 0.375

-11.6, 0.895, 3.37, 0.324

-11.5, 0.549, 3.05, 0.267

-13.3, 0.538, 3.16, 0.279

-11.9, 0.618, 3.72, 0.313

-11.3, 0.743, 3.13, 0.367

-11.9, 0.883, 2.74, 0.333

-12.1, 0.705, 4.16, 0.303

-11.4, 0.575, 2.91, 0.366

-11.5, 0.702, 3.46, 0.284

-12.5, 0.560, 2.88, 0.343

parp1

fa7

5ht1b

braf

jak2

BYOOD

众

prro

80丸双8

NeurIPS Paper Checklist

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

Justification: The main claims made in the abstract and introduction accurately reflect the paper's contributions and scope.

Guidelines:

The answer NA means that the abstract and introduction do not include the claims made in the paper.

The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.

The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.

It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: We discussed the limitations in Section A.

Guidelines:

The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.

The authors are encouraged to create a separate "Limitations" section in their paper.

The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.

The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.

The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.

The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.

If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.

While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.

3. Theory Assumptions and Proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [NA]

Justification: This paper does not include theoretical results.

Guidelines:

The answer NA means that the paper does not include theoretical results.

All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced.

All assumptions should be clearly stated or referenced in the statement of any theorems.

The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.

Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.

Theorems and Lemmas that the proof relies upon should be properly referenced.

4. Experimental Result Reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: The code to reproduce the results in our paper is provided as the supplementary material.

Guidelines:

The answer NA means that the paper does not include experiments.

If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.

If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.

Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.

While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example

(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.

(b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.

(c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).

(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [Yes]

Justification: The code to reproduce the results in our paper is provided as the supplementary material.

Guidelines:

The answer NA means that paper does not include experiments requiring code.

Please see the NeurIPS code and data submission guidelines ( https://nips.cc/ public/guides/CodeSubmissionPolicy ) for more details.

While we encourage the release of code and data, we understand that this might not be possible, so 'No' is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).

The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines ( https: //nips.cc/public/guides/CodeSubmissionPolicy ) for more details.

The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.

The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.

At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).

Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.

6. Experimental Setting/Details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: We provided the training details in Section D.1, and the evaluation details in Section D.3 and Section D.4.

Guidelines:

The answer NA means that the paper does not include experiments.

The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.

The full details can be provided either with the code, in appendix, or as supplemental material.

7. Experiment Statistical Significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [Yes]

Justification: We reported the standard deviation of the main results in Table 1 and Table 3. We provided the standard deviation of the ablation study in Figure 5(a).

Guidelines:

The answer NA means that the paper does not include experiments.

The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.

The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).

The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)

The assumptions made should be given (e.g., Normally distributed errors).

It should be clear whether the error bar is the standard deviation or the standard error of the mean.

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.

For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).

If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.

8. Experiments Compute Resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: We provided the details on computing resources in Section D.5.

Guidelines:

The answer NA means that the paper does not include experiments.

The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.

The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.

The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper).

9. Code Of Ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: We reviewed the NeurIPS Code of Ethics.

Guidelines:

The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.

If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics.

The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).

10. Broader Impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [Yes]

Justification: We discussed potential positive and negative societal impacts in Section B.

Guidelines:

The answer NA means that there is no societal impact of the work performed.

If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.

Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.

The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.

The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.

If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).

11. Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [NA]

Justification: The paper poses no such risks.

Guidelines:

The answer NA means that the paper poses no such risks.

Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.

Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.

We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [Yes]

Justification: For existing assets used in the paper, we cited their original paper, repository URL, and license name in Section D.1, Section D.3, and Section D.4.

Guidelines:

The answer NA means that the paper does not use existing assets.

The authors should cite the original paper that produced the code package or dataset.

The authors should state which version of the asset is used and, if possible, include a URL.

The name of the license (e.g., CC-BY 4.0) should be included for each asset.

For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.

If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.

If this information is not available online, the authors are encouraged to reach out to the asset's creators.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [Yes]

Justification: The code of our work, including a description to run the code and the license, is provided as the supplementary material.

Guidelines:

The answer NA means that the paper does not release new assets.

Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.

The paper should discuss whether and how consent was obtained from people whose asset is used.

At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.

14. Crowdsourcing and Research with Human Subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA]

Justification: The paper does not involve crowdsourcing nor research with human subjects.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.

According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA]

Justification: The paper does not involve crowdsourcing nor research with human subjects. Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.

We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.

For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper introduces a novel fragment-based molecule generation framework called Fragment Retrieval-Augmented Generation (f-RAG). This framework aims to address the limitations of existing fragment-based molecule generation methods, which often struggle to explore beyond the existing fragments in their databases.\nf-RAG utilizes a pre-trained molecular generative model to propose additional fragments from input fragments, completing and generating a new molecule. It retrieves two types of fragments: hard fragments, which are explicitly included in the newly generated molecule, and soft fragments, which serve as references to guide the generation of new fragments through a trainable fragment injection module.\nTo further extrapolate beyond the existing fragments, f-RAG updates the fragment vocabulary with generated fragments through an iterative refinement process. This process is enhanced with post-hoc genetic fragment modification, allowing f-RAG to maintain a pool of fragments and expand it with novel and high-quality fragments through a strong generative prior. This approach enables f-RAG to achieve an improved exploration-exploitation trade-off in fragment-based molecule generation.\n\nSTRENGTHS:\n1. f-RAG uses a pre-trained molecular generative model to propose new fragments, allowing new fragments to be generated\n2. The approach retrieves both hard fragments that are directly incorporated into the new molecule and soft fragments that guide the generation process, enhancing the diversity and effectiveness of the generated molecules.\n3. f-RAG updates the fragment vocabulary with generated fragments through an iterative process, continuously improving the quality and novelty of the fragments used for molecule generation.\n\nWEAKNESSES:\n1. The improvement of f-RAG compared to Genetic GFN is not considered large enough. In many tasks, Genetic GFN actually performs much better than f-RAG, which raises the concern of generalization of the proposed method.\n2. Some notations are not clear enough. For example, in Table 2, arrows could be used to illustrate lower-better or higher-better.\n\nQUESTIONS:\n1. Could the authors explain the potential reason that f-RAG falls behind genetic GFN?\n\nLIMITATIONS:\nYes, the limitation is well-discussed.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-02"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper proposed a fragment retrieval-augmented generation for molecule discovery, namely f-RAG. f-RAG retrieves two types of fragments, i.e., hard fragments and soft fragments. Hard fragments serve as build blocks that are explicitly included in the newly generated molecules, while soft fragments guide the generation of new fragments through a trainable module.\n\nSTRENGTHS:\nThe work is well written.\n\nThe experiments show the effectiveness of the proposed method.\n\nWEAKNESSES:\n1. The novelty of the work is limited. Very similar works have been published, such as [1], [2], and [3]. They basically follow the same pipeline, which generates new molecules through LLMs, GAs, or both. Compared to these works, this work does not seem to bring new insights.\n\n2. Moreover, the so-called soft and hard fragments are not new either. In reference [1], retrieved exemplar molecules are used as inputs to guide the generation of new molecules through trainable networks. Therefore, the concept of soft fragments is not novel.\n\n3. In addition, reference [2] also used GAs and LLMs to generate molecules. The author needs to further clarify the differences between the two works.\n\n4. The baselines used by the authors are not the latest. The authors should consider incorporating LLMs related molecular generation methods into the comparison.\n\n5. Why did the author use SAFE-GPT instead of other chemical language models? Can this method be extended to other chemical large language models?\n\n6. Some key details in genetic algorithms are missing, such as how to use mutation and crossover to generate new molecules.\n\n[1] Wang, Zichao, et al. \"Retrieval-based controllable molecule generation.\", ICLR, 2023.\n[2] Lee, Seul, et al. \"Drug Discovery with Dynamic Goal-aware Fragments.\" Forty-first International Conference on Machine Learning, 2023\n[3] Wang, Haorui, et al. \"Efficient Evolutionary Search Over Chemical Space with Large Language Models.\" arXiv preprint arXiv:2406.16976 (2024).\n\nQUESTIONS:\nSee weakness.\n\nLIMITATIONS:\nNo potential negative societal impact", "TITLE": "Official Review", "RECOMMENDATION": 3, "REVIEWER_CONFIDENCE": 5, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2024-07-03"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper introduces f-RAG, a novel framework for fragment-based molecular generation that integrates hard and soft fragment retrieval and genetic fragment modification. It aims to improve the exploration-exploitation trade-off in drug discovery by leveraging existing molecular fragments and exploring beyond the existing chemical space. On each generation, two hard fragments are sampled which will be ensured to appear in the generated molecule. Then several soft fragments are sampled to derive an embedding via a pretrained chemical language model as the guidance for generation. Another round of genetic algorithm is also implemented to further explore the neighborhood of the generated high-scoring molecules. The authors have conducted extensive experiments on various molecular optimization tasks, demonstrating f-RAG's effectiveness in generating molecules with improved optimization performance, diversity, novelty, and synthesizability.\n\nSTRENGTHS:\n1. The paper tries to tackle an important problem of fragment-based molecular generation, namely exploring further chemical spaces beyond known fragments. During generations, novel and high-scoring fragments will be dynamically updated into the vocabulary so that this kind of \"novelty\" will be passed on to further generations, enlarging the explorable chemical space.\n\n2. The retrieval-augmented generation provide explainability to some extent, therefore has some ensurance on the quality of the generated molecules.\n\nWEAKNESSES:\n1. Integrating both language models and genetic algorithms into generation might result in huge computational cost, which will affect the practical applications of generative models. The authors should discuss and analyze the computational efficiency as well as its trade-off with the performance.\n\n2. Commonly the RAG process will retrieve related information from large-scale database (vocabulary) through some techniques (e.g. Vectorize the data and implement query-key matching). However, in the proposed method, both the hard and soft fragments are randomly sampled from the vocabulary, which leaves great burdens on the construction of high-quality and relevant databases for each task or property.\n\n3. The implementation details are missing, especially for the baselines which incorporate genetic algorithms, whose performance is closely related to the values of parameters like population size and number of cycles.\n\nQUESTIONS:\n1. Why can all the molecules be decomposed into an arm-linker-arm form? Does this formalization impose additional biases on the chemical space which can be explored? For example, what will happen if I want to generate benzene with small substituents (e.g. toluene).\n\nLIMITATIONS:\nThe property-related fragment vocabulary can only be built if the property score can be decomposed into fragment-level sums, which limits the applications of the proposed method.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-07"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis study proposes a fragment retrieval-augmented generation framework for molecular designs based on language models. The arm and linker vocabulary are constructed by fragments that have top average contribution to the given property. The hard fragments and a pool of soft fragments are retrieved from the vocabulary whose embeddings are fused and used for the generation. The generated molecules and the vocabulary are iteratively refined and augmented to further enhance the performance. The authors report competitive performance on multiple properties and generative tasks, including both single and multiple objectives.\n\nSTRENGTHS:\nThis work formulates a novel framework for molecule designs and serves as a useful platform for future explorations. Though most of the techniques used in this study are not novel, the authors demonstrate effective ways of combining them to improve the performance. Specifically, the use of soft fragment pools and the genetic refinement make a good balance between exploration and exploitation. \n\nThe authors provide comprehensive evaluation, comparison and ablation results, and also show competitive performance in multi-objective optimization, which is more relevant to real-world drug discovery applications.\n\nWEAKNESSES:\nThe work is overall solid and I don't have major concerns except some minor questions.\n\nQUESTIONS:\n1\\. As the vocabularies are defined on the target property, is the fragment injection module also trained for each property? Would a universal model also work for the scenario?\n\n2\\. Line 242: the multi-objective optimization is performed using a unified score which is the product of all objectives. This may cause some problems such as high scores in one objective overshadowing others. How would this compare with, for example, selecting fragments that have higher scores for all three objectives?\n\n3\\. Table 3: as shown in Table 1, Genetic GFN does rather well in other tasks, so it would be better to also compare with it here. \n\n4\\. Line 275 and Table 8:  the no-GA setting has substantially higher diversity than all other settings. This is somewhat counterintuitive as GA expands the fragment vocabulary and could potentially lead to more diverse and novel molecules. Thus, the no-GA setting should have lower diversity just like it has lower novelty. What could be the cause of this observation?\n\n5\\. Fig 5c: what are the actual values of the results?\n\nLIMITATIONS:\nThe authors have properly addressed the limitations.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2024-07-13"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nFragment-based drug discovery methods are limited in their exploration beyond existing database fragments, as they primarily reassemble or slightly modify the given fragments. This paper introduces a new approach, fragment retrieval-augmented generation (f-RAG), which retrieves two types of fragments—hard fragments and soft fragments—from a fragment vocabulary to achieve an improved exploration-exploitation to address this limitation.\n\nSTRENGTHS:\nThis paper introduces a novel molecular generative framework that combines fragment-based drug discovery (FBDD) and retrieval-augmented generation (RAG). This paper proposes a retrieval augmentation strategy that operates at the fragment level, utilizing two types of fragments to provide fine-grained guidance. This approach aims to achieve a better exploration-exploitation trade-off and generate high-quality drug candidates.\n\nWEAKNESSES:\n1. This paper claims the f-RAG approach improve the exploration-exploitation trade-off. However, there is no experiment demonstrate this point.\n2. No limitation is discussed.\n3. Novelty and contribution is a concern, from the RAG part, it seems the main difference compared to Want et al. [42] is f-RAG dealing with fragment instead of molecule.  \n4. In addition, the critical part, SAFE-GPT[34], is a previous work.  \n5. f-RAG is built on a pre-trained backbone molecular language model, and it relies heavily on the generation performance of this backbone. This also means that the method delegates the challenging task of molecule generation to a large model.\n\nQUESTIONS:\nsee weakness.\n\nLIMITATIONS:\nf-RAG is built on a pre-trained backbone molecular language model, and it relies heavily on the generation performance of this backbone. This also means that the method delegates the challenging task of molecule generation to a large model.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2024-07-13"}