Molecule Generation with Fragment Retrieval Augmentation
Authors: Seul Lee
Karsten Kreis
Srimukh Prasad Veccham
Meng Liu
Danny Reidenbach
Saee Gopal Paliwal
Arash Vahdat
Weili Nie
Venue: NeurIPS 2024 poster (2024)
Keywords: fragment-based drug discovery
molecule generation
molecular language model
retrieval-augmented generation
Primary area: machine_learning_for_other_sciences_and_fields

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
Seul Lee
Karsten Kreis²
Srimukh Prasad Veccham?
Meng Liu? Weili Nie
Danny Reidenbach²
Saee Paliwal? Arash V
KAIST ?NVIDIA
seul wwt.keestttac..................a m wewpmmeelddddeeednbbeeeee. dreidenbach saeep, avahdat, smie)
(kkreis, sveccham menliu,
Abstract
Fragment- based drug discovery, in which molecular fragments are assembled into new molecules with desirable biochemical properties, has achieved great success. molecule generation methods show limited explo- ration beyond the existing fragments in the database as they only reassemble slightly modify the given ones. To tackle this problem, we propose new fragment- based molecule generation framework with retrieval augmentation, namely Frag- ment Retrieval Retrieval-Augmente Augmented Generation (f-RAG). f-RAG is based on a pre- trained molecular generative model that proposes additional fragments from input frag- ments to complete and generate a new molecule. Given a fragment vocabulary, f-RGG retrieves types of fragments: (1) hard fragments, which serve build- ing blocks that will be explicitly included the newly generated molecule, and (2) soft fragments, which serve reference guide the generation of new fragments through 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-RGG can achieve an improved exploration-exploiiain trade-off by maintaining pool of fragments and expanding it with novel and high-quality fragments through strong generative prior.
However, many fragment-base
Introduction
/-RAG (ours)
Optimization performance
Genetic GFN
The goal of small molecule drug discovery is to discover molecules with specific biochemical target properties, such as synthesizability [9]. non-toxicity [40], solubil- ity [31] and binding affinity, in the vast chemical space, Fragment-basee drug discovery (FBDD) has been consid- ered 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 library of drug-like molecules, FBDD con- structs a library of molecular fragments to synthesize new molecules beyond the existing molecule library, leading to better chemical coverage [5].
REINVENT
Novelty
Figure 1: A radar plot of target proper- ties. f-RAG strikes better balance among optimization performance, diversity, novelty, and synthesizability than the patc-offthhe-an techniques on the PMO benchmark [10].
Recently, generative models have been adopted in the field of FBDD to accelerate the process of searching for drug
"Work done during internship at NVIDIA.
EEuual advising.
38th Conference on Neural Information Processing Systems (NcurIPS 2024).

---

retrieval augmentation
Hard fragments
imput embeddinng
New motecule
Avgmented embedding
Faggent vocauuaary
tars lupas
Soft fragment embeddings
Fragment injection
Later lywes
Soft fragmennts
Genetic modification
Decompose
Mication
Crossover
Molecule
New molecule
Parent molecules
Molecule upaiate
The overall framework of S-RAG. After initial fragment vocabulary is constructed from an existing molecule library, lypes of fragments retrieved during generation. Hard fragments are explicitly included in the newly generated molecules, while soft fragments implicilly guide the generation of new fragments. SAFE-GPP generates a molecule using hard fragments as input, while the fragment injection module in the middle of the SAFE-GPT layers injects the embeddings of soft fragments into the input embedding. After the generation, the molecule population and fragment vocabulary are updated with the newly generated molecule and its fragments, respectively. The exploration is further enhanced with genetic fragment modification, which also updates the fragment vocahulary and molecule population.
Figure 2:
candidates [18, 45, 46, 30, 20, 11, 25]. These methods reassemble or slightly modify the fragments generate new molecules with the knowledge of the generative model. As the methods 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 challenge to improve the ability of discovering novel high-quality fragments, while exploiting existing chemical space effectively.
To this end, propose a fragment- based molecule generation framework leveraging retrieval- augmented generation (RAG) [26]. namely Fragmeni Retrieval-Augmented Generation (f-RAG). As shown in Figure 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 exploration- exploitation trade-off. Specifically, we first construct fragment vocabulary by decomposing known molecules from the existing library into fragments and scoring the fragments by measuring their contribution 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 learn how leverage the retrieved fragments for molecule generation, using a self self- 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 ora We verify f-RAG on various molecular optimization tasks, by examining the optimization performance, along with diversity, novelty, and
achieve an improved exploration-explotaan

---

synthesizability. As shown in Figure 1, f-RAG exhibits the best balance across these essential considerations, demonstrating applicability as a promising tool for drug discovery.
We summarize our contributions as follows:
We introduce f-RAG, novel molecular generative framework that combines FBDD and RAG.
We propose retrieval augmentation strategy that operates at the fragment level with two types of fragments, allowing fine- aee-grained guidance achieve an improved cotoration-epplotatttti trade-off and generate high-quality drug candidates.
Through extensive experiments, we demonstrate the effectiveness of f- 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 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 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 use reinforcement learning (RL) to assemble fragments, while Maziarz et al. [30], Kong et al. [20], and Geng et al. [11] used VAE-based techniques. Lee [25] proposed 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 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 fundamental solution because the modifications are only local, still being based on the existing fragments.
molecule generation. Retrievallauugmente generation (RAG) [26] refers to
technique that retrieves context from external data databases to guide the generation of a generative model. Recently, RAG has gained attention a means to enhance accuracy and reliability of large language models (LL.Ms) [6, 36, 3]. the field of molecule optimization, Liu al. [28] developed text-based drug editing framework that repurposes conversational language model for solving molecular tasks, where the domain knowledge is injected by retrieval and feedback module. More related to us, Wang al. [42] proposed to use 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 fine- fine-grained retrieval augmentation scheme that operates at the fragment level to achieve an improved inporaatooncppliitaation trade-off.
3
Method
In this section, we introduce our Fragment Retrieval-Augee Augmmetl-A 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, 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 and their corresponding properties {(r,, y1) J we first construct a fragment vocabulary. We adopt an arm-linker-arm slicing algorithm provided by Noutahi et al. [34] which decomposes a molecule v into three fragments: two arms Furm (i.e., fragments that have one attachment point) and one linker Finker (i.e., a fragment that has two attachment points). Decomposing molecules into arms and linkers (or scaffolds) is popular approach
[0, 1]. denoted as D
3

---

Linker design
Arm
SAFE-GPT
Arm
Motif extension
vocab
SAFE-GPT
Linker
vocab
CLSORH CAC.C www.eeee-eeeeeeee..........
Figure 3: Hard fragment retrieval of f f-RAG. With probability of 50%, f-RAG either retrieves two arms as hard fragments for linker design (top) one arm and onc linker as hard fragments for motif extension (bottom).
utilized in various drug discovery strategies, such as scaffold decoration scaffold hopping [37]. We ignored the molecules the training set that cannot be decomposed, and set of arms am {Farm. |=1 and set of linkers Frinkr = inkeerrr j==1 are obtained after the algorithm is applied to the molecules {a; Subsequently, calculate the score of each fragment Fj E Fam U Frinkrr using the average property of all molecules containing P3 as their substructure as follows:
score(P,)
Σ y,
|S(Pg)
(2,8)E((B))
where score(F)) E [0, 1]. and S(F,) {(x,8) 8) E D F, is fragment of z}. Intuitively, the fragment score evaluates the contribution of given fragment to the target property of the whole molecule of which it a part. From Farm and Frinkrr, we choose the top-Ning fragments based on the score to construct the arm fragment vocabulary Varn Furm and the linker fragment vocabulary
Vinker C Finkerr respectively.
Given the fragment vocabularies Varm and Vinker consisting of high-property fragments, two hard fragments are randomly retrieved from vocabularies. The hard fragments together form a partial molecular sequence that serves input to pre-trained molecular language model. In this work, we employ Sequential Attachment-baas Fragment Embedding (SAFE) [34] as the molecular representation and SAFE-GP! [34] the backbone generative model of f f-RGG. SAFE is canonical version of simplified molccular-input line-entry system (SMILES) [43] that represents molecules 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 be included in newly generated molecule by providing them input sequence to the language model to complete the rest of the sequence.
During generation, with probability of 50%, fRRA either (1) retrieves two hard fragments from Varn or (2) retrieves one from Varm and one from Vinker- In the former case, fRR performs linker design, which generates randomly selects an attachment point in the retrieved linker and combines it with the retrieved arm to form single fragment, and then performs motif extension, which generates new fragment that completes the molecule (Figure 3).
fragment that links the input fragments. In the latter case, f-RAG first
3.2 Soft Fragment Retrieval
Given two hard fragments as input, the molecular language model generates one new fragment to complete molecule. Instead of relying solely on the model generate the new fragment, we propose to augment the generation with the information of K retrieved fragments, which we refer to as soft fragments, guide the generation. Specifically, if the two hard fragments f-RAG randomly retrieves soft fragments from Vinker- If one of the hard fragments is an arm and another is linker, f-RAG randomly retrieves soft fragments from Varn- Using up the L-th layer of the lauguage model OM the embeddings of the input sequence Tinpat and the soft fragments so K are obtained as follows:
all arms,
higuut
O:L (Xinpu)) and Hon = concatenate jo 12 1xxa)
where h (Fon,,)) for 1= 2....... K.

---

SAFE-GPT with retrieval augmentation
Ingut embedding
Targel sequence
Fi-Fs +
Training molecule
x
Soft fragments
Early layers SAFE
Soft fragment embeddings
Fragment injection
Augmented embeedling
Laber layers
RANN
Cross entropy
Figure 4: The self-supervised training process of the fragment injection module of f-RAG. pANN denotes the k-th most similar fragment to F. Using Fi and F'2 as hard fragments, while using F's and its neighbors (F lk= soft fragments, the training objective is to predict F3 P1NN.
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:
Hont) softmax Query(himpa) Key( )
Value (osn));
(3)
Vdkey
where Fl is the fragment injection module. Query, Key, and Value are multi- perceptrons (MLPs), and dKey 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 I Inew = -M (h). where LT is the total number 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 dynamically updated through an iterative process that scores newly generated fragments based on Eq. (1) and replaces fragments in the fragment vocabulary to the top-Niug 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 al. [42]. we propose a new self- self-super objective that predicts the most similar fragment to the input fragments. Specifically, each molecular sequence v in the training set is first decomposed into fragment sequences (Fi, F2, F3) 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 F2. We consider the first two fragments as hard fragments. Given the remaining fragment F3. we retrieve its K most similar fragments [F 1K jkm 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 F1. the objective is to predict the most similar fragment F3 NN utilizing the original fragment and the next K most similar fragments ( (F 1K 1k=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 used for training are independent of the target property. In contrast, the fragment vocabularies used for generation are target property-specific, it constructed using the scoring function in Eq. (1). This allows f-RAG to effectively generate optimized molecules across different target properties without any retraining.
the fragments
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 iop-Nmol molecules generated by our fragment retrieval- augmented BAFE-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 Varm and Vinker are again updated by the top-Nin fragments based on the scores of Fq. (1). the subsequent generation, the population P is updated with the generated molecules far by both SAFE-GPT and GA.
5

---

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-RGG in Algorithm in Section C.
4
Experiments
We validate f-RAG on molecule generation tasks that simulate various real-world drug discovery prob- lems. We first conduct experiments on the practical molecular optimization (PMO) benchmark [10] in Section 4. 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 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 metries and experimental setup are provided Section D.3.
Baselines. We employ the top-7 methods reported by the PMO benchmark and two recent state-of- the-art methods as our baselines. Graph GA [14] is a GA with a fragment-level crossover operation, and Mol GA [38] is more hyperparameter-tune
version of Graph GA. Genetic GFN [19] is method that uses Graph GA to guide generation of a GFlowNet. REINVENT [35] is a SMILES- is 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] GA-based model that operates on SELFIES strings. LSTM HC [7] is a SMILES-bard LSTM model. SMILES GA [47] a GA whose genetic operations are based on the SMILES context-free grammar.
based RL model and
Results. The results of optimization performance are shown in Table 1. fRAG 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 5, and 6. As shown in these tables, f-RAG achieves the best diversity and synthesizability, and the second best novelty. Notably, f-RGG 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 and Figure 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 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 likeness,

---

Table 1: PMO AUC top-10 results. The results are the mean and standard deviation of independent runs. The results Genetic GFN [19] and Mol GA [38] are taken from the respective original papers and the results for other baselines are taken from Gao et al. [10]. The best results are highlighted in bold.
Oracle
f-RAG (ours)
Genetic GFN
Mol GA
REINVENT
Graph GAA
albuterol_ similarity
0.977 + 0.002
0.949 + 0.010
0.896
0.035
0.882
0.006
0.838 - 0.016
amlodipine mpo
0.749 + 0.019
0.761 + 0.019
0.688 0.039
0.635
0.035
0.661 = 0.020
celecoxib beccoxibbrediscoveryy
0.778 + 0.007
0.802 + 0.029
0.567 0.083
0.713
0.067
0.630 + 0.097
hepp
0.936 + 0.011
0.733 + 0.109
0.649 0.025
0.666
0.044
0.619 + 0.004
drd2
0.992 + 0.000
0.974 0.006
0.936 + 0.016
0.945
0.007
0.964 + 0.012
fexofenadine_mpo
0.856 + 0.016
0.856 + 0.039
0.825 0.019
0.784 + 0.006
0.760 + 0.011
gsk3b
0.969 + 0.003
0.881 + 0.042
0.843 0.039
0.865 + 0.043
0.788 + 0.070
isomers_c7h8nne
0.955 + 0.008
0.969 1 0.003
0.878 0.026
0.852 + 0.036
0.862 + 0.065
1somers_c9h1tn2222ppi
0.850 + 0.005
0.897 + 0.007
0.865 0.012
0.642 0.054
0.719 + 0.047
jnk3
0.904 + 0.004
0.764 + 0.069
0.702 0.123
0.783 0.023
0.553 + 0.136
medianl
0.340 + 0.007
0.379 + 0.010
0.257 + 0.009
0.356 + 0.009
0.294 + 0.021
median2
0.323 + 0.005
0.294 + 0.007
0.301 0.021
0.276 0.008
0.273 + 0.009
mestranol nnestaano_similaarity
0.671 + 0.021
0.708 1 0.057
0.591 0.053
0.618 0.048
0.579 + 0.022
osimertinib mpo
0.866 + 0.009
0,860 + 0.008
0.844 + 0.015
0.837 + 0.009
0.831 0.005
perindopril mpo qed ranolazine mpo scaffold_ hop
0.681 + 0.017
0.595 + 0.014
0.547 + 0.022
0.537 + 0.016
0.538 + 0.009
0,939 = 0.001
0,942 = 0.000
0,941 + 0.001
0.941 0.000
0.940 = 0.000
0,820 = 0.016
0.819
0.804 + 0.011
0.760 = 0.009
0.728 = 0.012
0.576 + 0.014
0
0.527 + 0.025
0.560 = 0.019
0.517 = 0.007
sitagliptin mpo iioohixene_rediscoveery
0,601 + 0.011
0.634 + 0.039
0.582 + 0.040
0.021 + 0.003
0.433 + 0.075
0.584 + 0.009
0,583 + 0.034
0.519 + 0.041
0.534 + 0.013
0.479 + 0.025
troglitazone_ redissooerrrddyryeeeeeeeo
0,448 + 0.017
0.511 + 0.054
0.427 + 0.031
0.441 + 0.032
0.390 + 0.016
valsartan_smi smarts
0.627 + 0.058
0.135 1 0.271
0.000 + 0.000
0.178 + 0.358
0.000 + 0.000
zaleplon_mpo
0,486 + 0.004
0.552 1 0.033
0.519 + 0.029
0.358 + 0.062
0.346 + 0.032
Sum
16.928
16.213
14.708
14.196
13.751
SELFIES-
Oracle
GP BO
STONED
LSTM HC
SMILES GA
REINVENT
albuterol_ simiilarttt
0,826 + 0.030
0.898 + 0.014
0.745 + 0.076
0.719 + 0.018
0.661 + 0.066
amlodipine_nie
0,607 + 0.014
0.583 + 0.044
0.608 + 0.046
0.593 + 0.016
0.549 + 0.009
celecoxib_ rerdicovbrrrdssoveerry
0.573 + 0.043
0.723
0.382 + 0.041
0.539 + 0.018
0.344 + 0.027
deco_hop
0.631 + 0.012
0.629 0.018
0.611 + 0.008
0.826 1:26:000 0.017
0.611 = 0.006
drd2
0,943 + 0.005
+ +
0.913 = 0.020
0.919 = 0.015
0.908 = 0.019
fexafenadine_mpa
0.741 + 0.002
0.722 + 0.005
0.797 + 0.016
0.725 + 0.003
0.721 + 0.015
gsk3h
0.780 + 0.037
0,851 + 0.041
0.668 + 0.049
0.839 + 0.015
0.629 + 0.044
isomers_c7h8n202
0.849 + 0.034
0.680 + 0.117
0.899 + 0.011
0.485 0.045
0.913 + 0.021
isomerr__9h1102222p1l
0.733 + 0.029
0.469 + 0.180
0.805 0.031
0.342 0.027
0.860 + 0.065
jnk3
0.631 + 0.064
0.564
0.523 1 0.092
0.661 0.039
0.316 : 0.022
medianl
0.355 1 0.011
0.301 0.014
0.266 + 0.016
0.255 0.010
0.192 1 0.012
median2
0.255 1 0.005
0.009
0.245 0.032
0.248 0.008
0.198 - 0.005
mestranol similarity
0.620 :::000000000 0.029
0.627 0.089
0.609 0.101
0.526 = 0.032
0.469 1 0.029
osimertinib mpo
0.820 + 0.003
0.787
0.822 0.012
0.796 0.002
0.817 0.011
perindopril_mp mmp
0.517 # 0.021
0.011
0.488 0.011
0.489 0.007
0.447 = 0.013
qed
0.940 + 0.000
0.937
0.941 0.000
0.939 0.000
0.940 = 0.000
ranolazine_mpo
0.748 0.018
+
0.765 0.029
0.714
0.008
0.699 + 0.026
scaffold_ hoo
0.525 0.013
0.548 0.019
0.521 0.034
0.533
0.012
0.494 0.011
sitagliptin_npp _mpo
0.194 0.121
0
0.393 0.083
0.066
0.019
0.363 0.057
thiothixene rewisscoeeryyyeeee
0.495 + 0.040
0.367 0.027
0.438
0.008
0.315 0.017
troglitazone_ rediscovery
0.348 + 0.012
0.015
0.320 0.018
0.354
0.016
0.263 + 0.024
valsartan_ smarts
0.000 + 0.000
0.000
0.000
0.000 0.000
0.000
0.000
0.000 0.000
zaleplon_mpo
0.333 + 0.026
0.221 + 0.072
0.325 0.027
0.206
0.006
0.334 0.041
Sum
13.471
13.156
13.024
12.223
12.054
Table 2: Top-100 diversity, top-100 novelty, and top-100 SA score results. The results are the average values of all 23 tasks. The best results are highlighted in bold.
Metric
f F-R (ours)
Genetic GFN
Mol GA
REINVENT 0.491
Average diversity f
0.532
0.443
0.468
Average novelty
0.800
0.724
0.845
0,540
Average SA score
2.026
3.770
4.605
3.207
7

---

Table 3: Novel top 5% docking score (kcal/mol) results. The results the and standard deviations of 3 independent runs. The results RationaleRL, PS VAE, RetMol, and GEAM are taken from Lee et al. [25]. Other baseline results except for Genetic GFN are taken from Lee et al. [24]. Lower is better, and the best results are highlighted in bold.
Target protein
Method
parp1
fa7
5htlb
hraf
jak2
JT-VAE [16]
-9.482 + 0.132
-7.683
0.048
-9.382
0.332
-9.079 = 0.069
-8.885 +: 0.026
REINVENT [35]
-8.702 0.523
-7.205
+ 0.266
-8.770
+ 0.316
-8.392 + 0.400
-8.165 + 0.277
Graph GA [14]
-10,949 +: 0.532
-7365
-10.422
0.670
-10.789 0.341
-10.167
0.576
MORLD [15]
-.263
0..550
-8.00
0.337
7781610011
HierVAE [17]
-9,487 0.278
0.274
3.081
-8,978 0.525
-8.285
1 0.370
GA+D [32]
-8.36 0.201
1.299
-8,567
0.177
=
8.610 0.104
MARS [45]
-9.716 + 0.082
-7.839
+ 0.018
-9.804
0.0733
-9.569 + 0.078
-9.150
+ 0.114
GEGL [I]
-9,329 + 0.170
-7.470
0.013
-9.06
+ 0.067
.9003 + 0.047
-8.601
+ 0.038
RationaleRL. [18]
-10.663 + 0.086
-8.129
0,048
-9,005
0.155
No found
99.398
+ 0.076
FREED [46]
100.579 + 0.104
-8.378 + 0.044
-00.714
+ 0.183
10.5661 + 0.080
-9.735 + 0.022
PS-VAE [20]
-9,978 + 0.091
-8.028
0.050
-9.887
0.115
-9,637 = 0.049
.9.464 + 0.129
MOOD [24]
-00886 0.113
1.110+00000
-11.145
+ 0.042
11.063
-00.147 0.060
RetMol [42]
-8.590 + 0.475
-5,488
0.688
-6,980
+ 0.740
+
-7.133 + 0.242
GEAM [25]
-2,891 + 0.158
9.890
-123744 0.036
12.342 - 0.095
-11816 1 0.067
Genetic GFN [19]
-9.227
+ 0.644
-7.288
+ 0.433
-8.973
0.804
8.719 0.190
-8.539
+ 0.592
f-RAG (ours)
-12.945
+ 0.053
9,899 0.205
-1.6670 0.144
-12.390
= 0.046
-11842 + 0.316
synthesizability, and novelty. Following the previous works, Quick Vina 2 [2] with five protein targets, parp1, fa7, Shtlb, braf, and jak2, to measure binding affinity. We 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:
docking score calculated by
y DS QED X SA E (0, 1),
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 (keal/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 provided in Section D.4.
Baselines. JT-VAE [16], VAE [17]. MARS [45], RationaleRL [18], FREED [46], PS- VAE [20], and GEAM [25] the methods that first construct fragment vocabulary using 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 eegmment-based crossover operation. GA+D [32] is diseriminator-enhanne GA method that operates on the SELFIES representation. RetMol [42] is retrieval-be based method that uses retrieved example molecules to augment the generation of 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.
The results are shown in Table 3. In all five tasks, f-RAG outperforms all the baselines. Note that the evaluation metric, novel 5 DS, is designed to reflect the nature 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, synthesiz- able, and novel drug candidates that have high binding affinity to the target protein with the improved explovation-exploitaiii trade-off. We additionally visualize the generated molecules in Figure 8.
Results.
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 As we can see, f-RAG significantly outperforms GEAM in all the tasks, validating its applicability to wide range of drug discovery problems.
8

---

F-RAG (hard-soft+GA)
FRAA (hard-soft+GA)
FRAG
f-RA (soft=GA)
f-RA (soft+GA)
J-RAG (6-0.8)
Optimization
Optimization
F-RAG (hard+GA)
performance
FRAG (hard-GA)
performance
FRAG (8-0.6)
f RAG (hard-softt
f-RAG (hard-soft)
f-RAG (5=0.4)
(a)
f-RAG (GA)
Avg. Top-10
Diversity
0.6-
0.5
2000
4000
6000
8000
10000
Number of oracle calls
Novelty
Novelty
Figure 5: (a) The optimization curves in the deco hop task of the PMO benchmark of the ablated f-RAGs. Solid lines denote the mean and shaded areas denote the standard deviation of 3 independent runs. (b) Overall results of the ablated f-RAGs. (c) Results with different values of 5 of the similarity bastd fragment filter.
4.3
Analysis
Ablation study. To verify the effect of each component of f-RAG, 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 shown in Table 8 and Table 9. For f-RAG (soft+GA) that does not utilize the hard fragment retrieval, randomly initialized the fragment vocabularies instead of selecting the top-Nira 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 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 synthesizabilityy while showing reasonably high diversity and novelty. Importantly, f f-AG outperforms f f-RAG (hard+GA) in all the metries, 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 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 similarity-based fragment filtering strategy, which excludes similar fragments from the fragment vocabulary. Specifically, when updating the vocabulary, new fragments that have higher Tanimoto similarity than å to fragments in the vocabulary are filtered out. Morgan fingerprints of radius 2 and 1024 bits are used calculate the Tanimoto similarity. The results of the similarity-bard based fragment filter with different values of 8 are shown in Figure 5(c), verifying f-RGG can increase diversity at the expense of optimization performance by controlling 8.
Effect of the fragment vocabulary update. To analyze the effect of the dynamic update of the fragment vocab- ulary 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.
fragment update
Without fragment update
Best in 7IC7790
0.3
The dynamic update allows f- f-AG to generate more op- timized 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 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
0.2
00.
-16
-14
-12
-10
Docking score (kcal/mol)
Figure 6: DS distribution of molecules gen- erated by f-RAG with or without the frag- ment vocabulary update in the jak? task.

---

Conclusion
We proposed f-RAG, 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-GPP 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 exploration- exploitation trade-off. f-RAG outperforms previous methods, achieving sate-of-the-art performance to synthesize diverse, novel, and synthesizable drug candidates with high target properties.
Acknowledgements
We would like to thank the NVIDIA GenAIR team for their comments during the development of the framework.
References
[1] Sungsoo Ahn, Junsu Kim, Hankook Lee, and Jinwoo Shin. Guiding deep molecular optimization with genetic exploration. Advances in neural information processing systems, 33: 13:18-0--2021,, 2020.
[2] Amr Alhossary, Stephanus Daniel Handoko, Yuguang Mu, and Chee- Chee-Keong Kwoh. Fast, accurate, and reliable molecular docking with quickvina 2. Bioinformatics, 31(13))221--2116 2015.
[3] Akari Asai, Sewon Min, Zexuan Zhong, and Danqi Chen. Retrieval- based language models and applications. In Proceedings of the 6lst Annual Meeting of the Association for Computational Linguistics (Volume 6: Tutorial Abstracts), pages 41 41-46, 2023.
[4] 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.
[5] Marta Bon, Alan Bilsland, Justin Bower, and Kirsten McAulay. Fragment-bass based drug dis- covery- the importance of high-quality molecule libraries. Molecular Oncology. 16(21): 3761-3777,200
[6] Sebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai, Eliza Rutherford, Katie Millican, George Bm Van Den Driessche, cean-Baptiste Lespiau, Bogdan Damoc, Aidan Clark, al. Improving language models by retrieving from trillions of tokens. International conference on machine learning, pages 2206-2244 PMLR, 2022.
[7] Nathan Brown, Marco Fiscato, Marwin HS Segler, and Alain C. Vaucher. Guacamol: bench- marking models for de novo molecular design. Journal of chemical information and modeling, 59(3):1096-11 1108, 2019.
[8] Peter Ertl and Ansgar Schuffenhauer. Estimation of synthetic accessibility score of drug-like molecules based molecular complexity and fragment contributions. Journal of cheminfor- matics, 1:1-11, 2009.
[9] Wenhao Gao and Connor W Coley. models. Journal of chemical information and modeling, 60(12):5714-577) 2020.
The synthesizability of molecules proposed by generative
[10] Wenhao Gao, Tianfan Fu, Jimeng Sun, and Connor Coley. Sample efficiency matters: benchmark for practical molecular optimization. Advances in Neural Information Processing Systems, 35:21342-213577 2022.
10

---

[11] 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-award motif mining. In International Conference on Learning Representations, 2023.
[12] 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 Truck Datasets and Benchmarks, 2021.
[13] John Irwin, Teague Sterling, Michael M Mysinger, Erin 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.
[14] 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):356733572, 2019.
[15] Woosung Jeon and Dongsup Kim. Autonomous molecule generation using reinforcement learning and docking to develop potential novel inhibitors. Scientific Reports, 10, 12 2020.
[16] 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
[17] Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Hierarchical generation of molecular graphs using structural motifs. In International Conference on Machine Leurning, pages 4839 4848. PMLR, 2020.
[18] Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Multi-objective molecule generation using interpretable substructures. In International conference on machine learning, pages 4859. PMLR, 2020.
[19] Hyeonah Kim, Minsu Kim, Sanghyeok Choi, and Jinkyoo Park. Genetic-guided gflownets: Advancing in practical molecular optimization benchmark. arXiv preprint arXiv:2402.05961. 2024.
[20] 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.
[21] Mario Krenn, Florian Häse, AkshatKumar Nigam, Pascal Friederich, and Alan Aspuru- Self-referencing embedded strings (selfies): A 100% robust molecular string representation. Machine Learning: Science and Technology, 14)):045024, 2020.
[22] Matt Kusner, Brooks Paige, and José Miguel Hernández-Lobato. Grammar variational autoencoder. In International Conference on Machine Learning, pages 1945-1954, PMLR, 2017.
[23] Greg Landrum et al. RDKit: Open-source cheminformatics software, 2016. URL http://www. rdkir. org/. https://github com//dkit/rdkit, 2016.
[24] Seul Lee, Jaehyeong Jo, and Sung Ju Hwang. Exploring chemical space with score-based out-of- distribution generation. In International Conference on Machine Learning, pages 18872-18892. PMLR, 2023.
[25] Seul Lee, Scanie Lee, Kenji Kawaguchi, and Sung Ju Hwang. Drug discovery with dynamic goal-aware fragments. International Conference on Machine Learning, 2024.
[26] Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Retrieval- seugreeal-uggmentedd generation for mnowledge-intensive nlp tasks. Advances in Neural Information Processing Systems, 0119449-94744 2020.
[27] Qingxin Li. Application of fragment- based drug discovery to versatile targets. Frontiers in molecular biosciences, 7:180, 2020.

---

[28] Shengchao Liu, Jiongxiao Wang, Yijin Yang. Chengpeng Wang, Ling Liu, Hongyu Guo, and Chaowei Xiao. Conversational drug editing using retrieval and domain feedback. The Tweifth International Conference on Learning Representations, 2023.
[29] Nya Loshchilov and Frank Hutter. Decoupled weight decay regularization. International Conference on Learning Representations, 2019.
[30] Krzysztof Maziarz, Henry Richard Jackson-Flux, Pashmina Cameron, Finton Sirockin, Nadine Schneider, Nikolaus Stiefl, Marwin Segler, and Mare Brockschmidt. Learning to extend molec- ular scaffolds with structural motifs. In International Conference Learning Representations, 2021.
[31] 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.
[32] AkshatKumar Nigam, Pascal Friederich, Mario Krenn, and Alan Guzpkk. Augmenting genetic algorithms with deep neural networks for exploring the chemical space. In International Conference Learning Representations, 2020.
[33] 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):7079- 7090, 2021.
[34] 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-800 8804,,0,,500 2024.
[35] Marcus Olivecrona, Thomas Blaschke, Ola Engkvist, and Hongming Chen. Molecular novo design through deep reinforcement learning. Journal of cheminformaties, 91)::-114, 2017.
[36] Ori Ram, Yoav Levine, Itay Dalmedigos, Dor Muhlgay, Amnon Shashua, Kevin Leyton-Brown and Yoav Shoham. In-context retrieval-augmenntd language models. Transactions of the Association for Computational Linguistics, 11:1316-133 1331,,11111111 2023.
[37] Gisbert Schneider, Werner Neidhart, Thomas Giller, and Gerard Schmid. "scaffold-hopping" by topological pharmacophore search: contribution to virtual screening. Angewandte Chemie International Edition, 38(19):2894 22922999929962 1999.
[38] Austin Tripp and José Miguel Hernández-Lobato. Genetic algorithms are strong baselines for molecule generation. arXiv preprint arXiv:2310.09267 2023.
[39] Austin Tripp, Gregor NC Simm, and José Miguel Hernández-
fresh look at de novo molecular design benchmarks. In NeurIPS 202/ Al for Science Workshop. 2021.
[40] Fabio Urbina, Filippa Lentzos, Cédric Invernizzi, and Sean Ekins. Dual of artificial- intelligence-poweree drug discovery. Nature Machine Intelligence, 4(3): 2022.
[41] W Patrick Walters, Matthew T Stahl, and Mark A Murcko. Virtual screening an overview. Drug discovery today, 3(4):160-178, 1998.
[42] Zichao Wang, Weili Nie, Zhuoran Qiao, Chaowei Xiao, Richard Baraniuk, and Anima Anand- kumar. setrieval-based controllable molecule generation. In International Conference on Learning Representations, 2023.
[43] David Weininger. Smiles, chemical language and information system. introduction to methodology and encoding rules. Journal of chemical information and computer sciences, 28 (1):31-36, 1988.
[44] Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, et al. Transformers: State- of-the-art natural language processing. In Proceedings of the 2020 conference on empirical methods in natural language processing: system demonstrations, pages 38-45, 2020.
12

---

[45] 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.
[46] 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.
[47] 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):1411-144, 2018.
13

---

A Limitations
Since our proposed f-RAG is built on a pre-trained backhone molecular language model, relies heavily the generation performance of the backhone model. However, this also means that method delegates the difficult task of molecule generation to 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 solve various drug discovery tasks.
Broader Impacts
Through our paper, we demonstrated that f-RAG can achieve improved trade-off's 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 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
Algorithm Generation Process of f-RAG
Input: Dataset fragment vocabulary size Ning molecule population size Nmol- number of soft fragments K, number of total generations G, number of SAFE-GPT generations per cycle GSAFE.GPT. number of GA generations per cycle GGa
Set Vann < top-Ninng arms obtained from 'D (Eq. (1))
Set Vinker f- top-Nitg linkers obtained from D (Eq. (1))
Set P + 0
Set M M+0
while .M| G do
Fragment retrieval-uugmennte SAFE-GPT generation
for = 1,2..... NNSFF-GPTT do
Randomly retrieve two hard fragments Fiard, Fbard,2 from Varn U Vinker
Randomly retrieve K soft fragments { LK from Varn U Vinker
Using Frand, 1-and,2 as input and {Fonn) k= as soft fragments, run SAFE-GPT to generate molecule
Update M +- [
Decompose x into Farm.1 Finker. and Famm2
Update Vann top-NNrng arms from Varm U {Famm, Fam.23 }} Update Viinker +- top-Ning linkers from Viinker Finnker Update P top-Nmol from P {x}
Update
end for
GA generation
for i= =
1,2, 1,2,..,, NGA do
Select parent molecules from P
Perform crossover and mutation to generate a molecule :
Update M MU {z}
Decompose x into Fam.1, Finker. and Famm.2
Update Vann top-NNre arms from Varm (1am.1 Farm. 2}
Update
Update Viinker +- top-Ning linkers from Viinker U F linker
Update P top-N from P {x}
end for
end while
Output: Generated molecules M
14

---

D Experimental Details
D.I 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 39,6488,6 indicating that the fragment injection module is very lightweight compared the backbone molecular language model.
Throughout the paper, we used the official codebase including the pre-trained SAFE-GPT* 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, 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 epochs with a learning rate of 1 10-4 using the Adam optimizer [29]. We performed searches with the search spaces (epoch) E {5, 8, 10} and (learning
rate) E {1 10 4, 5 x 10 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. the mutation operation, bond inser- tion/deletion, atom insertion/deletion. bond order swapping, 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 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 Noog 50 and the size of the molecule population to Nm 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)] E [5,, 12], [10, 16), [10, 30]}. }. As a result, we used the range [5, 12] for the albuterol_similarity, mers c7h8n202m, isomers c9h Ofh2ff22pf medianl, 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_ satsss_hhhh_p c9h 10n2o2ff2ll. median 1, qed, sitagliptin _mp__ppop___ paleplon_mpe 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 GSAFE GPT = 10 and GGA = 10, respectively.
similarity, iso-
Mcasuring 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 similarity less than 0.4 compared to its nearest neighbor zSNN in the training set as follows:
Novelty
1
Σ NE
1sim((2, TSNN) < 0.4),
(5)
N
where N = | and sim(r, 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]
wttp://..om//aammmmma.... sofff (Apache-2.0 license)
'https://githur
https///gggtabb..cc/eeeeooooooe www.wweoaoowooeeeeee http://eehho-ggommoooo. gao/mol_opt (MIT license)
15

---

library. On the other hand. since synthetic accessibility (SA) [8] scores range from I to 10 with higher scores indicating more difficult synthesis, we measure synthesizability using the normalized SA score as follows:
Synthesizability 10 SA
(6)
Visualizing the Radar Plots. To draw Figure 1 and Figure sum AUC top- 10,10, average top-100 diversity, average top-100 novelty, and normalized average top-100 SA score on the PMO benchmark in Table and Table 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 of Lee 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 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 GSAFE.GPT = and GGA = 3, respectively.
Measuring docking score, QED, SA, and novelty. We strietly followed the setting used in previous works [24, 25] to measure these properties. Specifically, we used Quick Vina 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:
clip
10 SA
DS
20 [0, SA
E [0,
9
where clip is the function that clips the value in the range [-20, 0J. As in Section D.3, novelty is determined as (sim(zz, < 0.4).
D.5 Computing resources
We trained the fragment injection module using one GeForee RTX 3090 GPU. The training took less than 4 hours. We generated molecules using one Titan XP (12GB), GeForce RTX 2080 Ti (11GB), GeForce RTX 3090 GPU (24GB). The experiments on each task in Section 4.1 took less than 2 hours and the experiments each task in Section 4.2 took approximately 2 hours.
httt::///gthab..oo//ssellee///// (MIT license)
16

---

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 in Table 4, Table 5, and Table 6. As shown the tables, f-RAG achieves the best diversity and synthesizability. while showing the second best novelty, We also provide the pairwise trade-off plots 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 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-divessin trade-off. We provide the full results of Fig- ure 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 location the fragment injection module. We provide the results of f-RAG with L and I, in Table 11. As shown in the table, f-RAG with L, = works better than f-RAG with = 6, probably because injecting information from soft fragments an earlier layer can carry more information into the final augmented embedding. As result of this experiment, f-RAG in the main experiments used L
Visualization of generated molecules. We visualize examples of the generated molecules by f-RAG Figure The examples are drawn randomly from the molecules used calculate novel top 5% DS values in Table 3.
1AG *
FRAG
*
Syrahesitabillty
Diversity
Nowelty
2:75
RLNVENT
2:33
Better
3.75
Betor
0.40
3.70
0.48
2.57
GA
0.4
235
REIVENI
Optimization performance
Optimization performance
Optimization performance
Figure 7: Various trade-offs between the basic considerations in drug discovery. Sum AUC top- 10, average top- 100 diversity, average top-100 100 novelty, and normalized average top- 100 SA score on the PMO benchmark are used to measure optimization performance, diversity, novelty, and synthesizabilitt, respectively.
17

---

Table 4: Top-100 diversity results. The results are the mean of independent runs. The best results are highlighted in bold.
Oracle
f-RAG (ours)
Genetic GPN
GA
REINVENT
albuterol_ sibilari
0.505
0.375
0.596
0.418
amlodipine_ m_m
0.394
0.280
0.371
0.334
celecoxib recissovvrre
0.360
0.283
0.318
0,306
deco_hop
0.482
0.536
0.422
0.445
drd2
0.491
0.521
0.548
0.496
fexofenadine_mpg
0.526
0,424
0,508
0,403
gsk3b
0.329
0.159
0.085
0,402
@oomers_c7h8n222
0.824
0.786
0.820
0.765
isomers_ commerrschh1122222222
0.797
0.621
0.789
0.699
jnk3
0.318
0.354
0.045
0.205
medianl
0.614
0.430
0.543
0,436
median2
0.424
0.470
0.424
0,382
mestranol_similarii
0.572
0,214
0.443
0.322
osimertinib mpo perindopril_mpo
0.480
0.450
0.505
0.444
0.375
0.394
0.454
0.346
qed ranolazine_ng _mp scaffold hop sitagliptin mpo thiothixene thiothixenerrddiccveer rediscovery
0.816
0.642
0.601
0.699
0.570
0.383
0.420
0.318
0.479
0.465
0.451
0.456
0.647
0.165
0.632
0.673
0.428
0.388
0.438
0.387
troglitazone rediscovery
0.445
0.391
0.407
0,410
valsartan_smen ammatts zaleplon_mnp mpo
0.600
0.881
0.902
0.882
0.751
0.581
0.563
0.530
Average
0.532
0.443
0.491
0.468
Table 5: Top-100 novelty results. The results are the mean of 3 independent runs. highlighted in bold.
The best results are
Oracie
f-RAG (ours)
Genetic GFN
REINVENT
albuterol_simin similarity amlodipine mpo celecoxib_reee reddxiib_rediscoveryy
0.543
0.667
0.957
0.553
0.000
0.037
0.113
0.000
0.930
0.980
0.885
0.943
deco deco_hop
0.650
0.923
1.000
0.893
drd2
0.570
0.780
0.987
0,357
fexofenadine_mpe mpp
1.000
0.940
1.000
0.547
gsk3b
1.000
1.000
1.000
0.757
0.953
0.647
0.947
0.373
isomers 1oomers_chh102200111 1n2202222e
0.993
0.747
1.000
0.273
jnk3
1.000
0.933
1.000
1,000
medianl
0.437
0.810
0.980
0.433
median2
0,880
0.127
0.943
0.010
mestranol mestranol_similariyy
0.850
0.893
0.970
0.923
osimertinib_mme mpo
0.917
0.737
1.000
0.617
perindopril_mpo
0.973
0.850
1,000
0.930
qed ranolazine_mpo scaffold hop sitagliptin mpo thiothixene thiothixene_rrddiccvvery
0.757
0.423
0.053
0.063
1.000
0.453
1.000
0.290
0,810
0.993
1,000
0,930
0,920
1.000
1.000
0,303
0.927
0,980
0,960
0,920
troglitazone_rediscne
0.683
0.917
0.683
0.833
Bissarta_smarrd
0.820
0.200
0.323
0.123
zaleplon mpo
0.793
0.610
0.750
0.343
Average
0.800
0.724
0.845
0.540
18

---

Table Top-100 score results. The results are mean independent runs. Lower better and best results are highlighted in bold.
Oracle
f J-RAG (ours)
Genetic GFN
Mol GA
REINVENT
albuterol_ albaterol_similarity
1.451
3.241
3.822
3,311
amlodipine mpo
2.218
3.675
3.806
3.645
pelecoxib_rcdisoone
1.584
2.735
2.388
2.667
deco hop
2.601
4.333
5,066
3.262
drd2
1.079
2.605
3.051
2.514
fexofenadine _ mpo gsk3b
1.837
4.437
4.721
4.193
1.253
4.785
10,000
2,964
1.997
3.354
4.721
3,323
isomers__chiee chtpeesss_ch100222222200
1.125
4.108
5.314
2,828
jnk3
1.746
4.679
10,000
4,202
medianl
2.036
4.098
4.516
4.058
median2
3,408
3.022
3.861
2.957
mestranol miestaatl_simiilrrtty
1.987
4.241
4.780
4.131
osimertinib. @opp mpo perindopril_mpo
3.053
3.734
4,293
3,257
2.153
4.674
4.648
4.146
qed ranolazine_mpp scaffold hop
2.968
3,340
2,501
2.232
2.055
3.489
4.422
3.096
3,691
3,513
5.146
3,030
sitagliptin_mpo
1.627
5.652
5.479
2.912
thiothixene rediscovery
2.866
2.621
2.872
2.444
troglitazone roglitazone_eddisoovery
1.631
4.541
3.672
3,255
valsartan smarts
2.867
3.127
3.530
3.100
zaleplon_mpo
1.574
2.717
3,296
2.236
Average
2.026
3.770
4.605
3.207
Table PMO MPO AUC top-100 results. The results are the means of 3 runs. The results for REINVENT. Graph GA, and SELFIES REINVENT are taken from Gao et al. [10], and the results for GEAM are taken from Lee al. [25]. The best results are highlighted bold.
MPO Benehmark
Method
Amlodipine
Texofenudine
Osimeninib
Perindopeil
Ranolazine
Sitagliptin
Zaleplon
REINVENT [35]
0.608
0.752
0.806
0.511
0.719
0.006
0.325
Graph GA [14]
0.622
0.731
0.799
0.503
0.670
0.330
0.305
SELFIES REINVINT
0.574
0.705
0.791
0.487
0.695
0.118
0.257
GFAM (25)
0.626
0.799
0.831
0.514
0.714
0.417
0.402
f-RAG (ours)
19

---

Table 8: PMO AUC top-10 results of the ablated versions of f-RAG. The results the mean of independent runs. The best results are highlighted bold.
f-RAG
Hard retrieval
V
X
Soft retrieval GA
V
albuterol similarity
0.977
0.907
0.974
0.875
0.929
amlodipine_
0.749
0.620
0.747
0.629
0.666
celecoxib rediscovery
0.778
0.524
0.748
0.505
0.695
deco_hop
0.936
0.621
0,908
0.811
0.645
drd2
0.992
0.987
0.993
0.993
0.976
fexofenadine_mpo
0.856
0.823
0.838
0.756
0.830
gsk3b
0.969
0.825
0.967
0.876
0.822
isomers_c7h8n202
0.955
0.940
0.931
0.891
0.968
isomers_c9h10n222
0.850
0.795
0.880
0.727
0.896
jnk3
0.904
0.834
0.903
0.800
0.612
medianl
0.340
0.293
0.339
0.290
0.285
median2
0.323
0.250
0.315
0.255
0.284
mestranol siiiilritt
0.671
0.650
0.683
0.566
0.550
osimertinib mpo
0.866
0.835
0.867
0.821
0.838
perindopril_mpo
0.681
0.530
0.667
0,585
0.564
ged
0.939
0.937
0.941
0.937
0.942
ranolazine_mmr scaffold hop sitagliptin mpo thiothixene bioohixene_rediscovery
0.820
0.800
0.809
0.726
0.808
0.576
0.556
0.589
0.509
0.522
0.601
0.502
0.615
0.304
0.576
rediscovery
0.584
0.458
0.579
0.432
0.545
troglitazone rediscovery
0.448
0.397
0.459
0.313
0.396
valsartan smarts
0.627
0.685
0,624
0.000
0.540
zaleplon_mpo
0.486
0.462
0,510
0.447
0.506
Sum
16.928
15.231
16.890
14.048
15.395
Table 9: Top-100 diversity, top-100 novelty, and top-100 SA score results of the ablated versions of f-RAG. The results are the average values 23 tasks. The best results are highlighted in bold.
f-AGG
Hard retrieval
X
Soft retrieval
X
GA
/
V
V
Average diversity 1
0.532
0.544
0.497
0.744
0.489
Average novelty f
0.800
0,924
0.720
0.438
0.860
Average SA score
2.026
4.113
2.231
3.443
4.235
Table 10: Top- 100 diversity, top-100 novelty, and top-100 SA results with different values of 5 of the similarity-be -basdd fragment filter. The results are the average values all tasks.
Metric
f-RAG
f-RAG (5 0.8)
f-RAG (8 0.6)
f-RAG (6 = 0.4)
Sum AUC
16,928
16.648
16.262
15,765
Average diversity 1
0,532
0.606
0.681
0.724
Average novelty 1
0.800
0.778
0.751
0.796
Average SA score
2.026
3,836
3.825
3.852
20

---

Table 11: Efffec of location the fragment injection module L. The results are mean of independent
runs. f-RAG main experiments used The best results are highlighted bold.
Oracle
f-RAG (T 1)
f-RAG (T. = 6)
albuterol similarity
0.977
0.971
amlodipine_nup
0.749
0.721
delecoxibreediccon
0.778
0.764
deco_hop
0.936
0.935
0.992
0,991
fexofenadine mpo
0.856
0.847
gsk3b
0.969
0.974
Swomers_e7h8n200
0.955
0.950
Goomers_chhIn22o/p0 jnk3
0.850
0.848
0.904
0.901
modianl
0,340
0,351
median2
0.323
0.322
mestranol mestranol_similarity
0.671
0.685
osimertinib, mpo
0,866
0.865
perindopril mpo ged
0.681
0.698
0.939
0.939
ranolazine_mp
0.820
0.798
scaffold_hoy
0.576
0.586
sitagliptin mpo thiothixene bhiothixene_rddiscoveery
0.601
0,547
0.584
0,583
rediscovery
0.448
0.447
valsartan_sman smaatss
0.627
0.685
zalcplon_mmp mpo
0.486
0.486
16.928
16.894
21

---

12.6 0.561 328, 8:38
-16.1 O.56, 0.373
-12.8 0.76, 0:338
-26 8.77, 36),
12.5, 0,697, 3,67,, 2,47,
parp1
-1277, 0.21, 3.27, 9358
413.,
-12., 0.790
2338 0.355
0.548
9.6 0748, 4.18,0200
-100, 0.73, 3.73, 0.33
-10.1 4.1. 0318
95, 3,252,,22,,..22
999 9,0.650, 3.07, 0.351
fa7
4001, 0.701, 3.09, 0.304
48, 0.799, 2.92, 0.35a
93, 8600, 524,0.34
4A 0.728, 300, 0.352
-1077 0.563, 3.05, 0339
-1.77
-13.5
3
0.53,, 3.30,
Shtlb
-12.6 0.55,, aas
-118 0501,
-IS 0Z.10 0329 -SO DEEZZ 0:319
braf
roga papto
Tooage
12.1, 0810, 300, 0329
-124 0518, 3,00,0350
-128, 0.51, 2.62
-200, 0529, 3.62, 0.276
0.679, 2465, 0.375
11.5 0.895, 3:37, 0.24
415, 0.549, 3.05, 0257
43.3,
433,,0588 0.38, 3.36, 0279
419 0618, 372 0.113
.11A 0741, 3.TL 2.13. 0.357
jak2
111.9 0881, 0539 -22.. 0.00, 4.16 0303 -514 2.9 0366 -115 8.0 0.284 42.5, 0.560, 2.88, 0.343
Figure 8: The generated molecules by f-RGG. Random top 5% novel hits generated in the experiments of Section 4.2 are visualized. The docking score (kcal/mol), QED, SA, and maximum similarity with the molecules in training set are at the bottom each molecule.
22

---

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 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.
is fine to include aspirational goals as motivation as long as is clear that these goals not attained by the paper.
2. Limitations
Question:
Does the paper discuss the limitations 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 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 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 few datasets or with 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, facial recognition algorithm may perform poorly when image resolution is low images are taken in low lighting. Or 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 used by reviewers as grounds for rejection, worse outcome might be that reviewers discover limitations that aren't 't acknowledged judgment and recognize that individual actions in favor of transparency play impor- tant role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.
the paper. The authors should use their best
3. Theory Assumptions and Proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
Answer: [NA]
23

---

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 cross- referenced.
All assumptions should be clearly stated or referenced the statement of any theorems.
The proofs can either appear the main paper or the supplemental material, but they appear in the supplemental material, the authors are encouraged to provide 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 supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental Result Reproducibility
Does the paper fully disclose all the information needed to reproduce the main ex- perimental 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)?
Question:
Answer: [Yes]
Justification: The code to reproduce the results 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, 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 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 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 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 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 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 submis- sions 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 reproduce that algorithm. (b) If the contribution is primarily
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 way to access this model for reproducing the results or 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 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., 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 instruc- tions to faithfully reproduce the main experimental results, as described in supplemental material?
24

---

Answer: [Yes]
The code to reproduce the results our paper is provided as the supplementary material.
Justification:
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurlPS code and data submission guidelines (https://nips.. cc/
for more details.
While we encourage the release of code and data, we understand that this might not be possible, "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 reproduce the results. See the NeurlPS code and data submission guidelines (https: gwwgge/ies////// /Codeeubeiiiieeee wwwiisssssnsioiiiiioeooo
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. only subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information possible in supplemental material (appended to the paper) 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, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification: We provided the training details in Section D.I, 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 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
Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Question:
Answer: [Yes]
Justification: We reported the standard deviation of the main results in Table and Table 3, We provided the standard deviation of the ablation study Figure 5(a).
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results accompanied by emror bars, confi- dence 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.)
25

---

The assumptions made should be given (e.g.. Normally distributed errors).
It should be clear whether the error bar is the standard deviation 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 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 emrr 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
For each experiment, does the paper provide sufficient information on the com- puter resources (type of compute workers, memory, time of execution) needed reproduce the experiments?
Question:
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 well 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 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: / http///eerrrp./eeeee/
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 deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g.. if there is a special consid- eration due to laws or regulations 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: discussed potential positive and negative societal impacts in Section B. Guidelines:
The answer NA means that there no societal impact of the work performed.
If the authors answer NA or No, they should explain why their work has no societal impact 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.
26

---

The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is 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 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 attacks, mechanisms for monitoring misuse, mechanisms to monitor how system learns from feedback over time, improving the efficiency and accessibility ML).
11. Safeguards
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, scraped datasets)?
Question:
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 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 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 dataset.
The authors should state which version of the asset is used and, if possible, include URL.
The name of the license (c.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, paperswi thcode. com datasets has curated licenses for some datasets. Their licensing guide can help determine the license of 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.
27

---

If this information is not available online, the authors are encouraged to reach out to the asset's '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 description to run the code and the license, is provided as the supplementary material.
Guidelines:
The answer NA means that the paper does release new assets.
Researchers should communicate the details the dataset/code/moodll as part 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 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 the supplemental material is fine, but if the main contribu- tion 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 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 expect authors to adhere 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.
28


Reviews:
[{"review_id": "Mbw1HZqQNh", "reviewer": "Reviewer_eome", "summary": "Fragment-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.", "questions": "see weakness.", "limitations": "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.", "rating": 4, "confidence": 3, "soundness": 2, "presentation": 3, "contribution": 2, "strengths": "This 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.", "weaknesses": "1. 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.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely thank you for your comments. We appreciate your positive comments that our paper introduces a novel molecular generative framework that combines fragment-based drug discovery (FBDD) and retrieval-augmented generation (RAG). We address your concerns and questions below.\n\n---\n\n**Comment 1**\n\nThis paper claims the f-RAG approach improves the exploration-exploitation trade-off, but there is no experiment demonstrating this point.\n\n**Response 1**\n\n**The balance between exploiting chemical knowledge and exploring in the chemical space is essential to achieve good performance in molecular optimization problems**, and we have demonstrated the superiority of our proposed $f$-RAG through extensive molecular optimization experiments (Table 1 and Table 3). Furthermore, in addition to optimization performance, we also evaluated diversity, novelty, and synthesizability, other essential considerations in drug discovery. Here, diversity and novelty measure the ability of exploring the chemical space, and synthesizability measures the ability of exploiting chemical knowledge. As shown in Figure 1 and Table 2, $f$-RAG achieves the best optimization performance, diversity, and synthesizability, and the second best novelty. Overall, we can conclude that **$f$-RAG exhibits the best balance between exploration and exploitation across these essential considerations, demonstrating its applicability as a promising tool for drug discovery**.\n\n---\n\n**Comment 2**\n\nNo limitation is discussed.\n\n**Response 2**\n\nWe discussed the limitations in Section A of the appendix.\n\n---\n\n**Comment 3**\n\nNovelty is a concern. In the RAG part, the main difference from Wang et al. [1] is that f-RAG deals with fragments instead of molecules.\n\n**Response 3**\n\nCompared to RetMol, our proposed $f$-RAG is critically different in three aspects: (1) **$f$-RAG retrieves fragments instead of molecules, enabling much more fine-grained generative guidance**. There is a strong correlation between molecular structures and their activity, referred to as structure-activity relationship (SAR) [2], which means that there are important fragments in a given molecule that critically contribute to the target chemical property. Therefore, utilizing fragments instead of whole molecules results in more effective and chemically intuitive guidance. (2) **$f$-RAG utilizes two types of retrieval**, i.e., hard and soft fragment retrieval, while RetMol only performs soft retrieval (of molecules). In this way, $f$-RAG can effectively balance between exploitation of current chemical knowledge and exploration in the chemical space. (3) **$f$-RAG generates molecules in a one-shot manner, while RetMol relies on iterative refinement** that uses retrieved guidance to refine noise over multiple iterations (80 iterations in the paper). This is a significant drawback for many drug discovery problems where oracle calls are expensive and oracle budgets must be considered. Due to these differences, $f$-RAG outperforms RetMol by a very large margin (Table 3).\n\n---\n\n**Comment 4**\n\nf-RAG is built on a pre-trained backbone molecular language model, SAFE-GPT [3], 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\n**Response 4**\n\nAs we have mentioned in Limitations (Section A), our proposed $f$-RAG is built on a pre-trained backbone molecular language model, SAFE-GPT. This design choice that utilizes a pre-trained LLM is a very popular strategy across many domains [1,3]. **This strategy is a large advantage rather than a disadvantage, as it lets the lightweight fragment injection module take care of the relatively easy task of fragment retrieval augmentation**. As shown through the extensive experiments in Section 4, this strategy makes $f$-RAG **a simple but powerful method** to solve various drug discovery tasks. Furthermore, it also enables **very efficient and fast training** of $f$-RAG. As described in Section D.1, the fragment injection module, the only part of $f$-RAG that requires training, is very lightweight. The module has 2,362,368 trainable parameters, which correspond to only 2.64% of the total parameters of 89,648,640. As described in Section D.4, this allows us to train $f$-RAG in less than 4 hours using a single GeForce RTX 3090 GPU, while training of SAFE-GPT takes 7 days using 4 NVIDIA A100 GPUs [4]. Moreover, we emphasize that **the high performance of $f$-RAG cannot be achieved by the backbone large model alone**. For example, $f$-RAG without our proposed fragment retrieval showed AUC top-10 sum of 15.395 while the full $f$-RAG showed 16.928 (Table 8). Overall, we believe that combining the generative power of a large pre-trained model and a novel fragment retrieval augmentation strategy is an important contribution that can have practical impact.\n\n**We appreciate your detailed feedback. We hope our response addresses your concerns and that you consider upgrading your rating. We are happy to elaborate further if there are any remaining concerns.**\n\n---\n\n**References**\n\n[1] Wang et al., Retrieval-based controllable molecule generation, ICLR, 2023.\n\n[2] Crum-Brown et al., The connection of chemical constitution and physiological action. Trans R Soc Edinb, 25(1968-1969):257, 1865.\n\n[3] Yu et al., Enzyme function prediction using contrastive learning, Science 379.6639: 1358-1363, 2023.\n\n[4] Noutahi et al., Gotta be safe: a new framework for molecular design, Digital Discovery, 3(4):796–804, 2024.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "O4oPfU4RSi", "reviewer": "Reviewer_wGFt", "summary": "This 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.", "questions": "1\\. 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?", "limitations": "The authors have properly addressed the limitations.", "rating": 7, "confidence": 4, "soundness": 4, "presentation": 4, "contribution": 3, "strengths": "This 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.", "weaknesses": "The work is overall solid and I don't have major concerns except some minor questions.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely appreciate your positive comments that our paper demonstrates an effective strategy for balancing exploration and exploitation, provides a comprehensive evaluation in many drug discovery tasks simulating real-world scenarios, and is overall solid. We address your questions below.\n\n---\n\n**Comment 1**\n\nAs 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\n**Response 1**\n\nNo, the training of the fragment injection module is **target property-agnostic**. As described in Section 3.2, we proposed to train the fragment injection module using a self-supervised objective that predicts the soft fragment that is most similar to the input fragment. The fragments used in training are independent of the target property, while the fragment vocabulary used in generation is constructed using the scoring function of Eq. (1). The purpose of the training fragment injection module is not to solve a particular drug discovery task, but to teach the whole model how to retrieve and fuse useful information to guide its generation. We will clarify this in the revised paper.\n\n---\n\n**Comment 2**\n\nThe multi-objective optimization is performed using a unified score which is the product of all objectives (line 242). How would this compare with selecting fragments that have higher scores for all three objectives?\n\n**Response 2**\n\nThis is a good point! First of all, we used the unified score (Eq. (4)) to strictly follow the setting in previous works [1,2] for a fair evaluation. Second, in the experiment, we found that the two settings, (1) using the unified score and (2) first filtering out fragments that do not meet the QED and SA constraints and scoring them, yielded similar fragment vocabularies (out of top-50 fragments, 49, 50, 48, 50, and 50 were identical for the parp1, fa7, 5ht1b, braf, and jak2 tasks, respectively). Therefore, we believe that there is little difference between the two scoring schemes.\n\n---\n\n**Comment 3**\n\nIt would be better to compare with Genetic GFN in Table 3.\n\n**Response 3**\n\nWe additionally compare our $f$-RAG with Genetic GFN [3] in the below table. $f$-RAG outperforms Genetic GFN by a very large margin, demonstrating its superiority as a universal method applicable to various drug discovery tasks. We appreciate your suggestion and will include this result in the revised paper.\n\n**Table: Novel top 5% docking score (kcal/mol) results.** The results are the means and standard deviations of 3 independent runs. Lower is better.\n| Method | parp1 | fa7 | 5ht1b | braf | jak2 |\n| --- | --- | --- | --- | --- | --- |\n| Genetic GFN | -9.227 ± 0.644 | -7.288 ± 0.433 | -8.973 ± 0.804 | -8.719 ± 0.190 | -8.539 ± 0.592 |\n| $f$-RAG (ours) | **-12.945** ± 0.053 | **-9.899** ± 0.205 | **-12.670** ± 0.144 | **-12.390** ± 0.046 | **-11.842** ± 0.316 |\n\n---\n\n**Comment 4**\n\nThe no-GA setting has higher diversity (Table 9).\n\n**Response 4**\n\nWe note that optimization performance and molecular diversity are conflicting factors, as methods that generate non-optimized molecules can naturally easily have high diversity [3,4] (as described in Line 284). As shown in Table 8, $f$-RAG without GA showed AUC top-10 sum of 14.048, significantly worse than $f$-RAG’s 16.928. Therefore, the high diversity with low optimization performance of $f$-RAG without GA does not mean that the model can generate high-quality, diverse molecules, but rather that **the optimization is poor**. As you mentioned, GA helps $f$-RAG explore the chemical space beyond the initial fragment vocabulary, leading $f$-RAG to find better chemical optima and generate optimized molecules, whereas $f$-RAG without GA performs worse at finding chemical optima and generates diverse but low-quality molecules.\n\n---\n\n**Comment 5**\n\nWhat are the actual values of the results in Fig 5c?\n\n**Response 5**\n\nWe report the actual values of Figure 5(c) here. We will include the below table in the revised paper.\n\n**Table: PMO AUC top-10, top-100 diversity, top-100 novelty, and top-100 SA score results with different values of $\\delta$ of the similarity-based fragment filter.**\n| Metric | $f$-RAG | $f$-RAG ($\\delta$=0.8) | $f$-RAG ($\\delta$=0.6) | $f$-RAG ($\\delta$=0.4) |\n| --- | --- | --- | --- | --- |\n| Sum AUC | 16.928 | 16.648 | 16.262 | 15.765 |\n| Average diversity | 0.532 | 0.606 | 0.681 | 0.724 |\n| Average novelty | 0.800 | 0.778 | 0.751 | 0.796 |\n| Average SA score | 2.026 | 3.836 | 3.825 | 3.852 |\n\n---\n\n**References**\n\n[1] Lee et al., Exploring chemical space with score-based out-of- distribution generation, ICML, 2023.\n\n[2] Lee et al., Drug discovery with dynamic goal-aware fragments, ICML, 2024.\n\n[3] Kim et al., Genetic-guided gflownets: Advancing in practical molecular optimization benchmark, arXiv, 2024.\n\n[4] Gao et al., Sample efficiency matters: a benchmark for practical molecular optimization, NeurIPS Datasets and Benchmarks, 2022.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "fguxz2WDH0", "reviewer": "Reviewer_SbUr", "summary": "The 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.", "questions": "1. 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).", "limitations": "The 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.", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. 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.", "weaknesses": "1. 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.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely thank you for your comments. We appreciate your positive comments that our dynamic vocabulary update strategy expands the explorable chemical space and that our retrieval-augmented generation strategy provides chemical explainability. We address your concerns and questions below.\n\n---\n\n**Comment 1**\n\nIntegrating both language models and genetic algorithms into generation might result in huge computational costs. The authors should analyze the computational efficiency.\n\n**Response 1**\n\nFirst of all, we note that **GAs generally do not require GPUs and are very fast to execute**. For example, the GA adopted in our paper, Graph GA, takes only 3 minutes for a single run in the PMO benchmark (Table 7 in the benchmark paper [1]), while $f$-RAG takes 1~2 hours as described in Section D.4. During generation with $f$-RAG, the fragment retrieval augmentation and GA parts are very fast to run, and the forward pass of the backbone language model takes up most of the runtime. The slow runtime is a common limitation of autoregressive models, including the backbone model used in our paper, SAFE-GPT. Here, SAFE-GPT was chosen as an example because the pre-training of the backbone model is not the main interest of our paper, and the use of a non-autoregressive chemical language model can improve the runtime of the $f$-RAG framework.\n\nFurthermore, we also emphasize that the runtime of $f$-RAG of 1~2 hours to generate 10,000 drug candidates is **sufficiently fast to be practical for real-world drug discovery problems, especially given its effectiveness in a wide range of drug discovery tasks**.\n\n---\n\n**Comment 2**\n\nBoth 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\n**Response 2**\n\nInstead of querying for relevant fragments every time a new molecule is generated, we proposed to construct an initial high-quality fragment vocabulary only once before generation. This strategy of confining the pool (or vocabulary) itself and randomly retrieving information is also commonly used in GAs. Through extensive experiments, we have demonstrated **the initial vocabulary construction procedure based on the target property (Eq. (1)) is very simple yet effective, and universally applicable to any task or target property**. Moreover, we proposed to dynamically refine the initial vocabulary with newly proposed fragments during generation. This gives $f$-RAG the ability to **explore beyond the best of the database**, as shown in Figure 6.\n\n---\n\n**Comment 3**\n\nThe implementation details are missing, especially for the baselines which incorporate genetic algorithms.\n\n**Response 3**\n\nFor the experiments in Section 4.1 and Section 4.2, we did not reimplement any of the baselines. For the baselines in Section 4.1, the results of Genetic GFN [1] and Mol GA [2] are taken from the respective original papers and the results of other baselines are taken from the PMO benchmark paper [3]. For the baselines in Section 4.2, the results of RationaleRL, PS-VAE, RetMol, and GEAM are taken from Lee et al. [4] and the results of other baselines are taken from Lee et al. [5]. Implementation details for our $f$-RAG are included in Section D.2 and Section D.3.\n\n---\n\n**Comment 4**\n\nWhy can all the molecules be decomposed into an arm-linker-arm form?\n\n**Response 4**\n\nAs described in Lines 117-118, arms are defined as fragments that have one attachment point and linkers are defined as fragments that have two attachment points in our paper. Therefore, all molecules with two or more breakable bonds (i.e., non-ring bonds in the arm-linker-arm slicing algorithm of Noutahi et al [6] we adopted) can be decomposed into arm-linker-arm forms, and we ignored the small number of molecules in the training set that cannot be decomposed. We will include this detail in the revised paper. However, we would like to mention that any other molecular decomposition algorithm is equally compatible with our $f$-RAG framework.\n\n---\n\n**Comment 5**\n\nThe property-related fragment vocabulary can only be built if the property score can be decomposed into fragment-level sums.\n\n**Response 5**\n\n**The initial vocabulary construction procedure is based on the target property at the molecular level**, and does not require the property score to be decomposed to the fragment level. $y$ in Eq. (1) is the target property value of the whole molecule, not a fragment. As explained in Lines 124-126, this scoring function evaluates the contribution of a given fragment to the target property of the molecule of which it is a part. We emphasize that the proposed fragment vocabulary construction scheme is very simple and universally applicable to any target property.\n\n---\n\n**References**\n\n[1] Kim et al., Genetic-guided gflownets: Advancing in practical molecular optimization benchmark, arXiv, 2024.\n\n[2] Tripp et al., Genetic algorithms are strong baselines for molecule generation, arXiv, 2023.\n\n[3] Gao et al., Sample efficiency matters: a benchmark for practical molecular optimization, NeurIPS Datasets and Benchmarks, 2022.\n\n[4] Lee et al., Drug discovery with dynamic goal-aware fragments, ICML, 2024.\n\n[5] Lee et al., Exploring chemical space with score-based out-of- distribution generation, ICML, 2023.\n\n[6] Noutahi et al., Gotta be safe: a new framework for molecular design, Digital Discovery, 3(4):796–804, 2024.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "FMFIBDCbUM", "reviewer": "Reviewer_7DmF", "summary": "The 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.", "questions": "See weakness.", "limitations": "No potential negative societal impact", "rating": 3, "confidence": 5, "soundness": 2, "presentation": 2, "contribution": 1, "strengths": "The work is well written.\n\nThe experiments show the effectiveness of the proposed method.", "weaknesses": "1. 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).", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely thank you for your comments. We appreciate your positive comments that our paper is well-written and the experiments show the effectiveness of our method. We address your concerns below.\n\n---\n\n**Comment 1**\n\nThe novelty of the work is limited compared to [1,2,3]. In [1], retrieved exemplar molecules are used as inputs to guide the generation of new molecules through trainable networks. [2] also used GAs and LLMs.\n\n**Response 1**\n\nCompared to RetMol [1], $f$-RAG (1) retrieves fragments instead of molecules, (2) utilizes two types of retrieval--hard and soft, and (3) generates molecules in a one-shot manner instead of multiple iterations. For a more detailed explanation of the differences, please see *Global Rebuttal*.\n\nCompared to GEAM [2], **$f$-RAG is better at exploring chemical space**. GEAM does not use an LLM. GEAM uses an RL model that only reassembles the given fragments, therefore unable to generate novel molecular structure and solely relies on the modification of the GA to generate new fragments. On the contrary, $f$-RAG applies fragment-level retrieval augmentation to an LLM to propose novel, high-quality fragments rather than simply reassembling existing fragments, greatly enhancing exploration beyond known fragments. Due to these differences, $f$-RAG outperforms GEAM by a large margin (Table 3 and Table 7).\n\nCompared to MolLEO [3], **$f$-RAG applies RAG to an LLM, therefore is better at generating high-quality drug candidates**. MolLEO does not use RAG and is therefore less effective at utilizing chemical knowledge. In addition, MolLEO focuses on replacing one of the crossover or mutation of Graph GA [4] by LLM-guided operations, so it is basically a GA and suffers from the common limitation of GAs--low diversity [5]. On the contrary, $f$-RAG shows an improved balance between optimization performance, diversity, novelty, and synthesizability through the proposed RAG with the fragment injection module (Figure 1). Also, we would like to kindly inform you that **this work was released in arXiv on June 23, 2024, after the NeurIPS submission deadline, and thus should be considered as a concurrent work**.\n\n---\n\n**Comment 2**\n\nThe baselines used by the authors are not the latest. The authors should consider incorporating LLM-related molecular generation methods into the comparison.\n\n**Response 2**\n\nWe used extensive drug discovery tasks--23 PMO benchmark [5] tasks and 5 docking score tasks--that simulate various real-world drug discovery scenarios for a solid evaluation. In these tasks, **we compared $f$-RAG against a large number of baselines**. In Section 4.1, we employed the top-7 methods reported by the PMO benchmark and two latest SOTA methods, Genetic GFN and Mol GA, as our baselines (Line 213). Since there are 25 baselines reported in the PMO paper, this is equivalent to showing superiority of $f$-RAG over 27 baselines. In Section 4.2, we compared $f$-RAG with 14 baselines.\n\nFor LLM-related methods, Wang et al. [3] was released in arXiv **after** the NeurIPS submission deadline and there is no publicly released codebase. RetMol [1] uses an LLM (a BART model) and is included as our baseline. We have made every effort to faithfully demonstrate the superiority of $f$-RAG through extensive experiments, and if you kindly suggest any strong baselines, we would be happy to compare $f$-RAG to them to make our experiments more robust.\n\n---\n\n**Comment 3**\n\nWhy did the author use SAFE-GPT instead of other chemical language models?\n\n**Response 3**\n\nWe adopted Sequential Attachment-based Fragment Embedding (SAFE), non-canonical SMILES that represents molecules as a sequence of fragments, as the molecular representation. We chose SAFE because it is **well-suited for fragment-based molecule generation**, and it enables $f$-RAG to easily include the hard fragments in a generated molecule by simply providing them as an input sequence to SAFE-GPT to complete the rest of the sequence. Other language models besides GPT are also compatible with the $f$-RAG framework as long as they are trained on a SAFE dataset, and SAFE-GPT is chosen as an example since the pre-training of chemical language models is not the main interest of our paper. We emphasize that our proposed strategy of combining fragment retrieval from a goal-aware vocabulary with the SAFE representation to build a molecular optimization framework is simple but powerful, demonstrating its effectiveness in a wide range of drug discovery tasks.\n\n---\n\n**Comment 4**\n\nSome key details in genetic algorithms are missing.\n\n**Response 4**\n\nAs described in Line 181, we adopted the mutation/crossover of Graph GA [4] to further improve exploration in the chemical space. We appreciate your comment and will include the details about the genetic operations in the revised paper for the completeness of the paper. 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.\n\n**We hope our response addresses your concerns and that you consider upgrading your rating. We are happy to elaborate further if there are any remaining concerns.**\n\n---\n**References**\n\n[1] Wang et al., Retrieval-based controllable molecule generation, ICLR, 2023.\n\n[2] Lee et al., Drug discovery with dynamic goal-aware fragments, ICML, 2024.\n\n[3] Wang et al., Efficient evolutionary search over chemical space with large language models, arXiv, 2024.\n\n[4] 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.\n\n[5] Gao et al., Sample efficiency matters: a benchmark for practical molecular optimization, NeurIPS Datasets and Benchmarks, 2022.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "3Yx4WyEOGT", "reviewer": "Reviewer_U6dy", "summary": "The 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.", "questions": "1. Could the authors explain the potential reason that f-RAG falls behind genetic GFN?", "limitations": "Yes, the limitation is well-discussed.", "rating": 7, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. 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.", "weaknesses": "1. 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.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely thank you for your comments. We appreciate your positive comments that our paper proposes an effective strategy to enhance the quality, diversity and novelty of molecules. We address your concerns and questions below.\n\n---\n\n**Comment 1**\n\nThe improvement of f-RAG compared to Genetic GFN is not large enough. Could the authors explain the potential reason that f-RAG falls behind genetic GFN?\n\n**Response 1**\n\nDrug discovery is a comprehensive problem and **optimization performance alone is not meaningful without consideration of other factors such as diversity, novelty, and synthesizability**. Genetic GFN [1] showed competitive results with $f$-RAG in terms of optimization performance (Table 1), but significantly worse results compared to $f$-RAG in terms of diversity, novelty, and synthesizability (Figure 1, Table 2 and Figure 7). As described in Lines 232-235, the essential considerations in drug discovery often conflict with each other, and the results of Genetic GFN illustrate these trade-offs. On the contrary, our proposed **$f$-RAG effectively improves these trade-offs** by utilizing existing fragments while dynamically updating the fragment vocabulary.\n\nTo further compare $f$-RAG and Genetic GFN, we evaluated the performance of Genetic GFN in the experiments of Section 4.2 in the below table. $f$-RAG outperforms Genetic GFN by a very large margin, again demonstrating its superiority as a universal method applicable to various drug discovery tasks. We will include this result in the revised paper.\n\n**Table: Novel top 5% docking score (kcal/mol) results.** The results are the means and standard deviations of 3 independent runs. Lower is better.\n| Method | parp1 | fa7 | 5ht1b | braf | jak2 |\n| --- | --- | --- | --- | --- | --- |\n| Genetic GFN | -9.227 ± 0.644 | -7.288 ± 0.433 | -8.973 ± 0.804 | -8.719 ± 0.190 | -8.539±0.592 |\n| $f$-RAG (ours) | **-12.945** ± 0.053 | **-9.899** ± 0.205 | **-12.670** ± 0.144 | **-12.390** ± 0.046 | **-11.842** ± 0.316 |\n\n---\n\n**Comment 2**\n\nIn Table 2, arrows could be used to illustrate lower-better or higher-better.\n\n**Response 2**\n\nWe appreciate the suggestion to improve the readability of our paper. We will include the arrows in the revised paper.\n\n---\n\n**References**\n\n[1] Kim et al., Genetic-guided gflownets: Advancing in practical molecular optimization benchmark, arXiv, 2024.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:
Dear reviewers, we sincerely appreciate your constructive comments. There were a number of comments that will help us strengthen our paper, and we will be sure to incorporate them into the revision.

We have had a few questions about the difference of our proposed $f$-RAG compared to RetMol [1], so we would like to clarify this in the global response. Compared to RetMol, our proposed $f$-RAG is critically different in three aspects: (1) **$f$-RAG retrieves fragments instead of molecules, enabling much more fine-grained generative guidance**. There is a strong correlation between molecular structures and their activity, referred to as the structure-activity relationship (SAR) [2], which means that fragments are building blocks of molecules that critically contribute to their target chemical property. Therefore, utilizing fragments instead of whole molecules enables compositionally in generation and results in more effective and chemically intuitive guidance. (2) **$f$-RAG utilizes two types of retrieval**, i.e., hard and soft fragment retrieval, while RetMol only performs soft retrieval (of molecules). In this way, $f$-RAG can effectively balance between exploitation of current chemical knowledge and exploration in the chemical space. (3) **$f$-RAG generates molecules in a one-shot manner, while RetMol relies on iterative refinement** that uses retrieved guidance to refine noise over multiple iterations (80 iterations in the paper). This is a significant drawback for many drug discovery problems where oracle calls are expensive and oracle budgets must be considered. Due to these differences, $f$-RAG outperforms RetMol by a very large margin (Table 3).

---

**References**

[1] Wang et al., Retrieval-based controllable molecule generation, ICLR, 2023.

[2] Crum-Brown et al., The connection of chemical constitution and physiological action. Trans R Soc Edinb, 25(1968-1969):257, 1865.

Meta-review: See comment to SAC
Decision: Accept (poster)