Generative retrieval (GR) has emerged as an autoregressive alternative to dense and lexical retrieval, casting search and recommendation as the generation of discrete semantic identifiers (SIDs). In GR systems based on SIDs, each document is represented by a short sequence of tokens constructed from its semantic embedding, and the generator autoregressively predicts these identifiers given a query. The design of the semantic index largely determines retrieval quality: SID construction, collision handling, decoding frameworks, and training recipes can each change performance significantly. However, these design choices are discrete and interdependent, and they cannot be optimized end-to-end using gradients from downstream retrieval. As a result, they remain largely hand-designed, and no prior work has applied automated search to improve them.

The Design Challenge in Generative Retrieval

Generative retrieval maps a query to a document by generating its semantic identifier. Let 𝔻 denote the document corpus. Each document d ∈ 𝔻 is assigned a semantic identifier z(d) = (z₁(d), …, z_L(d)(d)), where L(d) is the number of tokens in its identifier. Given query text q, an autoregressive generator with parameters θ models P_θ(z(d) ∣ q) = ∏_{ℓ=1}^{L(d)} P_θ(z_ℓ(d) ∣ q, z_{<ℓ}(d)), where z_{<ℓ}(d) denotes the preceding identifier tokens. The generator is trained on relevant query–SID pairs using teacher-forced next-token cross-entropy loss.

During inference, the model traces a prefix trie of valid SID sequences, and constrained beam search only permits child trie nodes as next tokens. Documents sharing the same SID prefix share early decoding decisions, so pruning a prefix early removes every document beneath it from the remaining search. The SID index therefore determines both the prediction targets during training and the branching structure during retrieval.

Improving a generative retriever thus requires careful design of SID generation. This design could involve several interdependent procedures: an index builder assigns SIDs to documents; collision handling distinguishes documents assigned the same SID; a training objective teaches the generator to predict these identifiers; and generative decoding searches over valid SID sequences. Each procedure affects how the others operate. Changing the SID structure reforms the prediction targets, while resolving collisions may induce longer SID sequences for the generator to learn. Existing methods have shown that SID and generative retrieval models can be learned jointly within predefined architectures, but ordinary backpropagation does not directly choose among different implementations of SID construction, collision handling, training, and decoding. Optimizing these executable procedures presents a broader, discrete search problem.

LLM-Driven Evolutionary Search for GR Components

The paper introduces a framework for automatically improving these components through LLM-driven evolutionary program search, to the authors' knowledge the first application of this approach to generative retrieval. A locally served, open-weight 31B model mutates executable GR components, so no proprietary LLM API is used at any point. A 1M-parameter proxy decoder provides fast feedback in place of repeatedly training the 1B target generator, which would otherwise make evolutionary search computationally infeasible.

The framework works as follows. The outer loop manages a population database, selects parent programs, and constructs feedback for the mutator LLM. The inner loop gatekeeps and refines candidate programs, approximating fitness with a tiny decoder. The mutator proposes SEARCH/REPLACE edits to the program under fixed input and output constraints. For SID generation, the program receives document and query embeddings together with training relevance labels and returns an SID for each document. Evolution can change the procedure implementing this mapping: alternative quantization and clustering methods, codebook initialization, or even entirely different approaches.

Candidate programs are evaluated by executing the program to obtain document-to-SID mappings, training the small generator on the relevant query–SID pairs, and measuring its retrieval performance. This feedback serves as a proxy that guides evolutionary program search without training the full 1B target generator at every step. To keep search blind to test data, the dataset's original training relevance pairs are split into two thirds for proxy evaluation and one third for final target assessment.

Proxy Evaluation and the 1M-Parameter Decoder

The proxy evaluator is a two-layer GPT-2 model with approximately 1M non-embedding parameters (7M including token embeddings). Like the target 1B generator, it receives query text and predicts relevant documents' SIDs using constrained decoding. Across 21 evaluated NQ320K SID programs, the collision rate logged during evolution is negatively associated with final target Recall@100 (Spearman ρ = −0.855), making it a usable signal but one that cannot serve as the fitness function because it is too easy to hack—for example, random assignments can produce few collisions and balanced code usage without providing meaningful semantic structure for the downstream generator.

The proxy measures how well a small generator can learn and retrieve the candidate's SIDs. Its scores do not need to match the target's absolute score, but they must provide useful preferences among programs in the search space. Whether these preferences transfer to the target generator is an empirical question explored in the paper's transfer study. The proxy and target Recall@100 show strong rank correlation (Spearman ρ = 0.90) across 21 SID programs on NQ320K, confirming that the proxy reliably ranks programs in a way that aligns with the target generator's performance.

Evolved Semantic Indexes Improve Retrieval Quality

Guided by the proxy, evolution improves the seed GR on NQ320K, MSMARCO300K, and a multilingual e-commerce dataset under a fixed training recipe. On NQ320K, jointly evolving SID construction and collision handling improves Recall@1 from 55.8% to 59.3% and Recall@100 from 85.8% to 90.6%. SID evolution increases Recall@100 from 85.82% to 90.57% on NQ and from 79.70% to 82.55% on MSMARCO, and raises the e-commerce Recall@100 gain over BM25 from +49.01 to +50.66 points. Recall@1 and MRR@10 also improve on all three datasets, indicating that the benefits extend to early ranking quality rather than only retrieving additional relevant documents near the end of the list.

For NQ and MSMARCO, the best evolved program comes from jointly evolving SID construction and collision handling. For the e-commerce dataset, it comes from evolving SID construction only. On NQ, the seed underperforms Contriever on Recall@100, yet a different SID structure is sufficient for the final generator to outperform Contriever while everything else—data, target generator, and training recipe—remains the same. On MSMARCO, evolved GR exceeds BM25 at rank one, but BM25 remains stronger at larger recall cutoffs and in MRR@10. The authors do not claim that the evolved GR pipeline achieves state-of-the-art results, nor that GR dominates lexical or dense retrieval. Instead, they argue that evolutionary search on the semantic index can reliably improve a well-established GR pipeline whose every other component is held fixed.

Proxy Transfer Depends on What Is Evolved

A component study reveals that proxy reliability depends on which component is evolved. Improvements transfer reliably for the semantic index but not for the generator's training objective or the full pipeline.

Table 2 in the paper contrasts selected NQ programs grouped by whether the generator objective can change. Evolving the generator's training objective decreases target Recall@100: objective evolution reaches proxy Recall@100 of 53.80% but target Recall@100 of 84.46% (Δ = −1.36 percentage points relative to Seed GR). Full-pipeline evolution, which mutates both the objective and the semantic index, reaches proxy Recall@100 of 62.85% while reducing target Recall@100 to 76.12% (Δ = −9.70 percentage points). Across five distinct evolved programs (three objective-only and two full-pipeline), all five improve proxy fitness over initialization while regressing on target recall relative to Seed GR, and proxy and target Recall@100 are inversely ranked (Spearman ρ = −0.80).

The main distinction is what the generators learn versus how they learn it. Semantic index evolution changes the SID structures shared by both the proxy and target generators. Objective evolution changes the optimization signal, whose effect can depend on model architecture, pretraining, and training recipe. An objective highly optimized for the 1M-parameter proxy does not necessarily transfer to the 1B-parameter target. Full-pipeline evolution, which can change both the objective and the semantic index, did not produce positive results either. The finding is that proxy transfer depends on the allowed search region, and correlation with the target system must be established for the chosen search space.

As shown in the table, SID-only evolution improves target retrieval, while collision-only evolution leaves it close to the seed at 85.72% versus 85.82% Recall@100. Joint evolution provides the largest gain, reaching 90.57%. Evolving collision handling after fixing an evolved SID constructor reaches 87.25%, with no additional mean improvement over SID-only evolution at 87.40%. The pattern is consistent with a dependence between the two procedures: SID construction determines which documents share an identifier and thus the groups within which collision handling must distinguish documents.

The Evolved SID Program

The best NQ program evolved jointly SID construction and collision handling retains the RQVAE structure and the four-token SID with M = 3 semantic tokens and one collision suffix. Its changes mainly concern how the semantic codes are assigned and trained, and how the suffix is constructed.

Direction-based residual quantization. The evolved program selects the code with maximum cosine similarity to the current residual, replacing the squared-Euclidean assignment in the seed. It still subtracts the selected, unnormalized code vector, so codebook vector lengths affect the residual passed to the next level even though selection depends only on direction. The program also doubles each codebook from 256 to 512 entries while retaining the 256-dimensional latent representation.

Training the index with query information. The seed program learns the index using only document reconstruction. The evolved program adds query-based supervision by encouraging each reconstructed document embedding to align with its relevant training queries. For each document d, the embeddings of its associated training queries are averaged and ℓ₂-normalized to form a query target t(d). If d has no associated training query, then t(d) = 0. Let x̂(d) denote the RQVAE decoder's reconstruction of the document embedding from its quantized latent, and let N denote ℓ₂ normalization. For a document minibatch ℬ, the evolved program adds the alignment loss L_align = (1/|ℬ|) ∑_{d∈ℬ} [1 − ⟨N(x̂(d)), t(d)⟩]. This loss is weighted by 0.8 and optimized together with reconstruction, quantization, and codebook regularization losses. The program also adds training stabilizers: data-based initialization of the first codebook, EMA codebook updates, periodic dead-code revival, learning-rate warmup, and gradient clipping.

Geometry-based collision handling. The seed assigns disambiguation tokens to documents with identical semantic codes in document ID order and appends a suffix to every document. The evolved program instead gives non-colliding documents a fixed suffix of 0. Within each collision group, it averages the normalized document embeddings and assigns suffixes 1, 2, … in order of decreasing cosine similarity to that centroid. Small suffix values therefore represent relatively central documents across different groups, giving the suffix a shared interpretation that TIGER-style collision handling lacks.

Related Work

Generative retrieval DSI and NCI were the first to formulate retrieval as document identifier generation. Since then, the community has improved many aspects of the pipeline. TIGER constructs SIDs through residual quantization. GenRet and ASI jointly learn indexing and retrieval. RIPOR and MERGE incorporate relevance supervision into identifier construction. GLEN addresses SID collisions, and TSGen introduces term-set identifiers with permutation-invariant decoding. The current work focuses on making automatic semantic index evolution feasible and shows that index-related improvements transfer more consistently than changes to the generator's training objective.

Evolutionary program search and proxy evaluation FunSearch and AlphaEvolve use a coding LLM to propose code edits to candidate programs, managed by an island-based evolutionary search algorithm. Subsequent work improves search through adaptive population management in AdaEvolve, component-level attribution feedback, evolving search strategies in EvoX, and coordinated multi-agent discovery in CORAL and SwarmResearch. In information retrieval, RankEvolve applies LLM-driven evolutionary search to discover lexical ranking algorithms, where candidates can be evaluated directly without training a neural generator. Proxy evaluation also has established precedents, such as AutoML-Zero, which searches learning algorithms on proxy tasks, and SESS, which approximates full evaluation via submodular subset selection in prompt optimization. Lion addresses generalization from small search tasks to larger workloads. ShinkaEvolve demonstrates transfer of evolved training losses to larger models.

Conclusion

The paper presented a framework for improving generative retrieval through evolutionary search over executable components, using a locally served 31B LLM as the mutator and a tiny 1M-parameter retrieval proxy for candidate evaluation to make evolution practical. Across three retrieval datasets, proxy-selected semantic index programs improve the overall generative retrieval pipeline on the target 1B generator, demonstrating the value of automatically refining SID construction and collision handling. The component study reveals that improvements transfer more consistently for semantic indexes than for changes to the generator training objective, and that the effectiveness of proxy-guided evolutionary search depends on what is being optimized. LLM-driven evolutionary search is thus a practical method for improving GR design, provided proxy reliability is established for the chosen search space. These findings support semantic index evolution as a practical direction for automated generative retrieval system design and motivate further study of evaluators that remain informative across model scales and GR components.

Read the paper on arXiv