                                                                       Neural Genetic Search in Discrete Spaces

                                      TSP500 ( )                        CVRP500 ( )                          PCTSP500 ( )                            OP500 ( )
                                                            64.4                               13.5
                       16.9
Avg. objective value


                                                            64.3                                                                    137.5
                       16.8                                 64.2                               13.0                                 135.0
                       16.7                                 64.1                                                                    132.5
                                                            64.0                               12.5                                 130.0
                       16.6 Concorde
                                                            63.9      PyVRP: 62.96                                                  127.5
                              100   300   1000 3000 10000          100 300 1000 3000 10000            100   300   1000 3000 10000           100   300   1000 3000 10000
                                    Number of samples                  Number of samples                    Number of samples                     Number of samples
                                                                            Sampling       ACO               NGS (Ours)

Figure 4. Benchmark results on various routing problems. NGS outperformed sampling and ACO by a significant margin in all problems,
showing its effectiveness as an inference-time search method. See Appendix E.1 for more comprehensive results.


 tional) probability distribution into explicit outputs. Specif-                               ensure the plausibility, SynNet employs domain-specific re-
 ically, NGS belongs to stochastic decoding methods and                                        action rules in the subsequent synthesis planning. Gao et al.
 shares similarities with top-k or top-p sampling, as it mod-                                  (2024) utilizes the generative model to refine the molecules
 ifies (masking-out) the sampling distribution for better re-                                  obtained by Graph GA to more synthesizable ones. In Re-
 sults. However, unlike single-pass approaches, NGS adopts                                     inforced Genetic Algorithm (RGA; Fu et al., 2022), the
 a population-based approach, which iteratively refines a set                                  neural models guides the crossover and mutation process
 of candidate solutions. This population-based procedure                                       with a protein target structure embedding to overcome a
 often produces more diverse and higher-quality solutions,                                     random-work exploration with predefined rules.
 especially for complex tasks that benefit from repeated im-
                                                                                               More broadly, there is a growing trend that leverages large
 provement steps. Our experiments in Section 5.1 and Sec-
                                                                                               language models (LLMs) as a black-box operator within
 tion 5.2 verify that NGS effectively decodes outputs from a
                                                                                               GAs, where parent samples are directly fed into LLM to
 model’s learned distribution.
                                                                                               obtain new samples. These LLM-based GAs have been
                                                                                               studied in various domains, including prompt optimization
  3.3.2. NGS AS A GENETIC ALGORITHM
                                                                                               (Meyerson et al., 2024; Liu et al., 2024; Guo et al., 2024),
 From another perspective, NGS can be viewed as a genetic                                      molecular design (Wang et al., 2024), and code genera-
 algorithm (GA) with a learned operator, where a pretrained                                    tions (Lehman et al., 2023; Chen et al., 2023a; Ye et al.,
 model specifies how to combine and modify parent solutions                                    2024). However, a primary challenge is the reliance on
 via parent-conditioned generation. This approach provides                                     hand-crafted prompt engineering, and many approaches
 two key benefits: (1) it replaces traditional, hand-crafted                                   continue to employ problem-specific rules along with the
 heuristics, and (2) it produces more informed, higher-quality                                 LLM-based operator (Liu et al., 2024; Wang et al., 2024).
 offspring by using the model’s learned distribution to guide
                                                                                               Test-time search for enhanced inference. Recent work
 the combination process, rather than relying on random-
                                                                                               in large language models (LLMs) (Bai et al., 2022; Madaan
 walk behavior with predefined rules. As shown in Sec-
                                                                                               et al., 2023; Snell et al., 2024; Brown et al., 2024) demon-
 tion 5.3, NGS can thus serve as an effective alternative GA.
                                                                                               strates that dedicating additional computation at test time
                                                                                               can greatly improve outputs (see Dong et al. (2024) for
 4. Related Works                                                                              an overview). Meanwhile, in combinatorial optimization
                                                                                               (CO), its mathematically rigorous algorithmic foundations
 Deep generative models with GA. Several studies explore
                                                                                               have inspired a line of research integrating traditional al-
 combining GAs and deep generative models, particularly
                                                                                               gorithms into test-time search within deep learning. For
 in chemical domains. One direction is that utilizing expert-
                                                                                               instance, Kool et al. (2022) employ restricted dynamic pro-
 designed GA to improve the generative models’ outcome.
                                                                                               gramming guided by a graph neural network (GNN) that
 Ahn et al. (2020) and Kim et al. (2024) employ Graph GA
                                                                                               predicts a solution heatmap in routing problems. Mean-
 (Jensen, 2019) whose crossover and mutation are designed
                                                                                               while, Ye et al. (2023) and Kim et al. (2025) use a predicted
 to guarantee the validity in chemical space, to refine the
                                                                                               edge heatmap in ant colony optimization (ACO) for broader
 generated molecules. Conversely, some researches suggest
                                                                                               CO applications. Luo et al. (2023) propose a new greedy
 to incorporate neural models to enhance or design GAs.
                                                                                               decoding-based search that randomly destroys the generated
 Notably, in SynNet (Gao et al., 2022b), the neural policy
                                                                                               solutions and reconstructs solutions. Although effective,
 construct offspring conditioned on molecule embedding
                                                                                               this method relies on handcrafted rules for destruction. In
 from the parent, allowing exploiting the generative capabil-
                                                                                               addition to external algorithmic integrations, there exist a
 ity from the deep model similar to our works. However, to


                                                                                           5
