                                           Neural Genetic Search in Discrete Spaces

                         Table 4. Average scores of Top-10 molecules discovered within 10,000 evaluations
    Type              Score Func. (↑)               SynNet      SMILES GA        STONED          Graph GA      NGS (Ours)
                      qed                      0.947 ± 0.001   0.947 ± 0.001   0.948 ± 0.000   0.944 ± 0.001   0.948 ± 0.000
    Property          jnk3                     0.673 ± 0.078   0.407 ± 0.088   0.616 ± 0.083   0.830 ± 0.135   0.891 ± 0.059
    Optimization      drd2                     0.998 ± 0.003   0.993 ± 0.009   0.998 ± 0.004   1.000 ± 0.001   1.000 ± 0.000
                      gsk3b                    0.824 ± 0.069   0.799 ± 0.041   0.755 ± 0.044   0.915 ± 0.065   0.958 ± 0.021
                      perindopril mpo          0.563 ± 0.025   0.447 ± 0.018   0.503 ± 0.020   0.546 ± 0.038   0.600 ± 0.017
    Multi-property
                      ranolazine mpo           0.784 ± 0.012   0.768 ± 0.030   0.850 ± 0.022   0.763 ± 0.028   0.854 ± 0.020
    Optimization
                      sitagliptin mpo          0.337 ± 0.051   0.477 ± 0.074   0.706 ± 0.081   0.629 ± 0.068   0.640 ± 0.061
                      isomers c9h10n2o2pf2cl   0.715 ± 0.030   0.878 ± 0.049   0.949 ± 0.041   0.908 ± 0.025   0.914 ± 0.023
    Structure-based
                      deco hop                 0.676 ± 0.103   0.621 ± 0.006   0.625 ± 0.014   0.610 ± 0.017   0.851 ± 0.130
    Optimization
                      scaffold hop             0.517 ± 0.011   0.519 ± 0.012   0.533 ± 0.031   0.530 ± 0.035   0.697 ± 0.145
                      Average                      0.703           0.686          0.748           0.768           0.835

in ‘Transfer’ setting are more remarkable in that NGS out-         Baselines. We compare NGS with GA methods specially
performs the other decoding schemes significantly, showing         designed for molecular design: Graph GA (Jensen, 2019),
robustness toward the distribution shift. This is attributed       SMILES GA (Brown et al., 2019), STONED (Nigam et al.,
to NGS’s unique characteristic, population-based iterative         2021), and SynNet (Gao et al., 2022b). They utilize
generation, which could adapt the generation process to-           fragment-based graphs, SMILES, SELFIES (Krenn et al.,
wards better search space by conditioning on promising             2020), and synthesis, respectively, as molecular represen-
parents from the previous generations. For more compre-            tations. Note that in SMILES GA and STONED, where
hensive results with standard deviation and results obtained       the string-based representations are employed, mutation is
using another model as source victim models, please refer          solely applied to obtain offspring molecules.
to Appendix F.
                                                                   Results. As depicted in Table 4, NGS outperforms previous
                                                                   GA methods in average Top-10 scores across 10 tasks in
5.3. De novo Molecular Design                                      different types by achieving the best scores in 8 tasks out
In this experiments, we focus on verifying the effectiveness       of 10. These results highlight the effectiveness of NGS as
of NGS as a new GA method, unlike the experiments in rout-         an alternative GA method despite the computational cost
ing and red-teaming. In molecular design, various studies          of policy training. In Appendix G, we compare NGS with
have found that GA methods still remain as strong baselines        the results with training only. Moreover, NGS manages
for recent deep learning methods. Furthermore due to the           to produce valid molecules without explicitly enforcing
black-box properties in chemical space, test-time search           validity checks or SMILES grammar constraints at each step.
with deep generative models have rarely studied. In several        Because the policy is trained on valid examples, it naturally
works, Graph-based GA (Jensen, 2019), an expert-designed           learns to generate syntactically correct SMILES strings and
GA, is directly employed to refine the solutions or support        thus maintains a high rate of validity in its outputs.
the policy explorations (Ahn et al., 2020; Kim et al., 2024;
Gao et al., 2024; Wang et al., 2024; Lee et al., 2024b)            6. Conclusion
Experimental setup. De novo molecular design aims                  Contributions. We propose Neural Genetic Search (NGS),
to discover molecules with the desired property, which is          a test-time search algorithm that combines the population-
measured by the score function.We follow the experimen-            based exploration of genetic algorithms with the expres-
tal setting in the Practical Molecular Optimization (PMO)          sive power of pretrained generative models. By replacing
benchmark (Gao et al., 2022a), which limits evaluations to         domain-specific crossover rules with a parent-conditioned
10,000. We provide further details in Appendix A.3.                generation process and allowing mutation through unre-
Implementation details. This work employs a string-based           stricted sampling, NGS offers an iterative refinement strat-
molecular representation, the Simplified Molecular-Input           egy that boosts solution quality across diverse tasks without
Line-Entry System (SMILES) strings (Weininger, 1988), to           needing specialized heuristics. Our experiments, conducted
generate molecules; the examples are provided in Figure 1.         across diverse tasks such as routing problems, adversarial
Following prior works (Olivecrona et al., 2017; Kim et al.,        prompt generation, and molecular design, show that NGS
2024), we adopt an LSTM policy to generate SMILES se-              improves solution quality compared to previous search meth-
quences. Since we have a limited budget, we use 8K calls           ods. Beyond its strong performance, NGS is flexible and
to train the policy using GFlowNets and 2K to conduct the          easy to adopt: it only requires a pretrained model that con-
genetic search with NGS; see details in Appendix B.3.              structs discrete outputs sequentially.

                                                               8
