FlashTrie: A GPU-Accelerated Constrained Beam Search for Generative Retrieval
Not on the map. Why?
Abstract (arXiv)
Constrained decoding is essential in generative retrieval, where document identifiers generated directly from a query must exactly match a predefined library of valid IDs. At scale, decoding is often constrained using a trie with beam search but most implementations run on CPU. Limited parallelism then makes trie traversal and candidate validation a serving bottleneck as beam width grows. We present FlashTrie, which addresses this limitation by optimizing constrained beam search on GPUs. It introduces an integer-aware succinct trie layout that uses bit compression to reduce memory footprint while keeping the full index in GPU high-bandwidth memory reducing memory stalls, and a cooperative CUDA kernel that performs beam expansion, validation, and pruning entirely on-device without per-step host orchestration. It further replaces CPU-style irregular lookup and heap maintenance with GPU-aware parallel primitives, improving warp utilization and reducing divergence. Together, these designs significantly reduce decoding latency and increase throughput while preserving retrieval quality. On a library of 800M keywords with beam widths up to 1000, FlashTrie reduces trie-search latency to under 3 ms, achieving up to 24x speedup over a highly optimized multi-threaded CPU baseline. These improvements enable FlashTrie to scale beam sizes by up to 5x in latency-critical applications such as sponsored search. In a large-scale online A/B experiment on a popular commercial search engine, it delivers a statistically significant +0.71% revenue lift, enabling real-time constrained decoding at a scale previously feasible only offline. The FlashTrie code will be publicly released after the review process.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 16 of its 30 references that are in the map. First posted on arXiv 10 Jul 2026.
Builds on
16 of 30 references.
References · 16
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2019Latent Retrieval for Weakly Supervised Open Domain Question Answeringcited by 691
- 2020KILT: a Benchmark for Knowledge Intensive Language Taskscited by 571
- 2017Non-Autoregressive Neural Machine Translationcited by 457
- 2020Autoregressive Entity Retrievalcited by 333
- 2022Transformer Memory as a Differentiable Search Indexcited by 242
- 2020NeuroLogic Decoding: (Un)supervised Neural Text Generation with Predicate Logic Constraintscited by 146
- 2022Autoregressive Search Engines: Generating Substrings as Document Identifierscited by 112
4 more
- 2022A Neural Corpus Indexer for Document Retrievalcited by 107
- 2016Guided Open Vocabulary Image Captioning with Constrained Beam Searchcited by 105
- 2020An EM Approach to Non-autoregressive Conditional Sequence Generationcited by 21
- 2025Semantic IDs for Joint Generative Search and Recommendationcited by 14
Built on by
Not cited yet.