Disentangling Paradigm, Identifier, and Decoding in Generative Retrieval
Organizations: Artefact Research Center France
Abstract
Generative retrieval trains a language model to generate the identifier of a relevant document. Recent work replaces the autoregressive decoder with diffusion, but changes identifiers, training recipe and decoding at once, so differences cannot be credited to the paradigm. On NQ320K and MS300K, we train autoregressive, masked-diffusion and block-diffusion models with residual-quantised, product-quantised and random identifiers. With identifier length and training budget fixed, we decode each model in several ways. Decoding alone moves a diffusion model's Hit@1 by 6.6 to 13.7 points. Our reference diffusion decoding, generate-and-match, generates an identifier, then retrieves the closest corpus identifiers. The generated identifier is right for 14-21% of NQ320K queries. We test one-pass scoring to decode diffusion retrievers: the model reads a fully masked identifier once, and each document is scored by its codes' probabilities. It matches or beats generate-and-match in 11 of 12 settings. Autoregressive models still lead in Hit@1; on NQ320K, the lead comes from the model, not beam search. Starting from one sampled identifier, one-pass scoring removes 46-83% of masked diffusion's deficit to beam search; from generate-and-match, at most a quarter. On NQ320K, every paradigm largely memorises which identifier answers which query: random identifiers keep 83-90% of the Hit@1 of residual-quantised ones. There, product-quantised identifiers lead residual-quantised ones by 3.4 points in the autoregressive model and by -0.7 to +3.6 in diffusion models; across decodings, AR's gap exceeds diffusion's by 1.5-2.3 points, around our 2-point threshold. Paradigm comparisons must report each paradigm at its own recipe and best decoding.
Figures & tables
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| AR | MDLM, BD8, BD4 | |
|---|---|---|
| Initialisation | T5 1.1 base (C4) | DiT 12 layers, width 768, 12 heads, OpenWebText checkpoint (BD: one per block size) |
| Size, time | 260M; 7 h | 182M; MDLM 4.5 h, BD 9.2 h |
| Input | “retrieve:” + query; 16 codes + end token | GPT-2 tokens; query ( 128 tokens, never masked) + 16 codes |
| Loss | cross-entropy, label smoothing 0.1 | cross-entropy on masked codes, unweighted; per example (BD: per block) |
| Optimizer | AdamW, peak lr , , weight decay 0.01, gradient clip 1; linear decay, no warmup | AdamW, peak lr (MDLM), / (BD, NQ320K / MS300K), , weight decay , gradient clip 1; 3% linear warmup, then constant |
| Budget | 64K steps 256 | MDLM 32K 512, BD 64K 256; 16.4M examples in every cell |
| NQ320K | MS300K | |
| Documents | 109,739 | 319,927 |
| Training queries | 307,373 | 367,013 |
| Documents with a training query | 108,026 | 319,927 |
| Eval queries | 7,830 | 808 |
| Unseen documents / eval queries on them | 1,713 / 1,755 (22.4%) | 0 / 0 |
| Training examples per cell | 16M | 16M |
| Decoding | Generates | Docid chosen by |
| AR | ||
| greedy, no trie | 1 code, free | exact match to a docid |
| greedy, trie | 1 code, in the trie | the trie (always a docid) |
| beam 100, trie | 100 codes, in the trie | summed log-probability |
| Diffusion | ||
| one sample | 1 stochastic sample | code matching |
| Id. | Size | Same title (%) | Empty text (%) | Cosine (random) | Topic | |
|---|---|---|---|---|---|---|
| NQ320K | PQ | 75 | 1 | 0 | .745 (.041) | visa-policy pages |
| NQ320K | PQ | 70 | 1 | 0 | .226 (.041) | FIFA World Cup |
| NQ320K | PQ | 59 | 2 | 0 | .224 (.041) | shared Hinduism nav box |
| MS300K | RQ | 512 | 92 | 100 | .000 (.015) | empty pages |
| MS300K | PQ | 737 | 92 | 100 | .000 (.015) | empty pages |