arXiv:2611.04715cs.DBNov 2026

Manuscript Offprint

arXiv:2611.04715

ZeroGR: Filtering-First Constrained Decoding for Generative Recommendation

Xiangrui Yang, Jiawei Yang, Liang Zeng, Daqian Ding, Ziqian Liu, Bing Tian, Cheng Peng, Yunfeng Zhao, Fangyu Zhang, Jiaqiang Liu, Xiao Liang, Yiming Qiu

Xiangrui Yang

The University of Hong Kong

Hong Kong, China

xiangruiyang@connect.hku.hk

Jiawei Yang

Peking University

Beijing, China

yangjiawei26@stu.pku.edu.cn

Liang Zeng

Kuaishou Technology

Beijing, China

zengliang03@kuaishou.com

Daqian Ding

The University of Hong Kong

Hong Kong, China

daqianding@connect.hku.hk

Ziqian Liu

The University of Hong Kong

Hong Kong, China

liuqizian@connect.hku.hk

Bing Tian

Huazhong University of Science and Technology

Wuhan, China

tbing@hust.edu.cn

Cheng Peng

Kuaishou Technology

Beijing, China

pengcheng09@kuaishou.com

Yunfeng Zhao

Kuaishou Technology

Beijing, China

zhaoyunfeng@kuaishou.com

Jiaqiang Liu

Kuaishou Technology

Beijing, China

liujiaqiang@kuaishou.com

Xiao Liang

Kuaishou Technology

Beijing, China

liangxiao03@kuaishou.com

Fangyu Zhang

Kuaishou Technology

Beijing, China

zhangfangyu@kuaishou.com

Yiming Qiu

The University of Hong Kong

Hong Kong, China

yimingq@hku.hk

ABSTRACT

Generative recommendation is gaining traction in production, retrieving items by generating their identifiers one token at a time. The generated sequences must identify relevant catalog items, so constrained decoding couples relevance scoring with validity filtering. Because most possible sequences are invalid, scoring before filtering wastes computation on candidates that will be discarded. Our evaluation shows that filtering first can avoid this work with negligible impact on recommendation quality. We present ZeroGR, a filtering-first constrained decoding system for generative recommendation. ZeroGR uses a step-sliced filtering index to reduce GPU memory use by tailoring data representations to each decoding step. Its execution engine adopts shared-slot execution to accelerate data exchange across stages and hybrid projection to adapt computation to workload patterns, thereby reducing execution overhead. During index refreshes, ZeroGR applies layout-guided streaming construction to speed up updates and limit serving interference. Extensive evaluation shows that ZeroGR accelerates the filtering and scoring pipeline by up to 9.9×9.9\times over representative baselines while reducing GPU index memory use and accelerating index reconstruction.

1 INTRODUCTION

Recommendation systems (RecSys) underpin online services, selecting relevant items for users from enormous catalogs under interactive latency constraints. Inspired by the rapid advancement of LLMs, emerging generative recommendation (GR) approaches item discovery by autoregressively generating item identifiers from user context [10, 32]. These GR models promise better recommendation quality and less operational toil than conventional RecSys, and have gained traction in production deployments [6, 11, 24]. To cover catalogs with millions of items, GR represents each item as a short sequence of semantic identifier (SID) tokens, with related items sharing sequence prefixes [27, 29]. Decoding these tokens one at a time progressively narrows the item space toward specific recommendations. Because each step depends on the preceding tokens, its cost adds directly to the user request latency [22].

To find multiple relevant items, GR uses beam search to explore competing partial SID sequences, scoring their continuations and retaining promising candidates at each decoding step [11, 27]. These scores guide relevance to the user, but cannot establish validity within the catalog: a seemingly promising SID sequence may identify no actual item. Each GR decoding step therefore also requires filtering, typically through a catalog trie that restricts continuations to those that can reach valid items [21, 30, 43]. This search for relevant recommendations subject to catalog validity is the constrained decoding problem in GR. Maintaining competing item candidates requires both scoring and filtering to process many continuations at every step, and their decisions determine which candidates advance. Both operations thus lie on the serving critical path, making their performance central to meeting GR's latency objective.

The order of scoring and filtering directly affects how much work GR decoding performs. Scoring first [30] scores all possible continuations before discarding invalid ones, whereas filtering first [12] restricts scoring to valid continuations permitted by the catalog. At first glance, filtering first is attractive: valid candidate sparsity allows it to eliminate substantial scoring work while preserving the same validity guarantee. Its effect on relevance, however, is less straightforward. Scoring first normalizes scores over all continuations of each sequence prefix, whereas filtering first normalizes only over valid continuations. Depending on the total probability assigned to invalid continuations under each prefix, filtering first can give candidates from some prefixes a larger boost than others, changing their relative ranking and ultimately which candidates survive beam search. The two orders can therefore return different recommendations even though both enforce the same catalog constraints. The key question therefore becomes whether filtering first can deliver recommendation quality on par with scoring first.

In this paper, we answer this question in the affirmative. Our evaluation shows virtually identical recall for the two orders, with approximately 99.9% overlap in the returned items. This stability is consistent with how GR progressively narrows the search: early steps assign most probability mass to valid continuations, so filtering has little effect on normalization; later steps mainly refine choices established earlier, so changes in normalization tend to have limited impact on recommendation quality. We therefore aim to build a filtering-first constrained decoding pipeline for GR serving. The remaining question is how to realize the performance benefits of filtering first given the following coupled challenges:

  • Representing filtering index within limited GPU memory. Filtering requires efficient access to valid continuations; keeping this lookup on the GPU reduces CPU-GPU coordination. The GPU filtering index must cover the catalog and accommodate varying valid candidate densities across decoding steps, while sharing memory with model weights and inference state [18]. The challenge is to keep the index compact across diverse step profiles.

  • Translating filtering-first computation into efficient GPU execution. Computing fewer scores does not by itself ensure efficient GPU execution [36]. Filtering first produces selective workloads that vary across prefixes and decoding steps, and the overhead of organizing and processing them can outweigh the scoring savings. The challenge is to adapt GPU execution to these workload patterns so that reduced scoring translates into lower latency.

  • Building filtering index without disrupting GPU serving. Because the catalog and SID assignments are refreshed with the model, each GR update requires rebuilding the filtering index. GPU construction competes with ongoing inference for compute, while transferring a CPU-built index consumes bandwidth also needed by serving. The challenge is to complete the rebuild within the update window while protecting the latency of ongoing requests.

We present ZeroGR, a filtering-first constrained decoding system for generative recommendation. To save GPU memory, ZeroGR uses a step-sliced filtering index: for each decoding step, it maintains a mapping from sequence prefixes to valid next tokens, encoded in either a sparse or a dense representation according to that step's valid candidate density. Building on this index, the ZeroGR execution model adopts shared-slot execution to give each prefix fixed candidate slots shared by filtering, scoring, and candidate selection, allowing stages to exchange results directly and reducing coordination overhead. The execution model further applies hybrid projection: when the scoring reduction outweighs selective execution overhead, it computes scores only for valid continuations; otherwise it computes all scores to preserve regular batched execution. To speed up refreshes and limit serving interference, ZeroGR applies layout-guided streaming construction: it precomputes each fragment's size and position in the final index, allowing CPU workers to generate fragments independently in their final form while streaming completed fragments to the GPU.

Figure

Figure 1: Generative recommendation with SID sequences.

We evaluate ZeroGR on a variety of recommendation datasets. Compared with representative constrained decoding baselines, ZeroGR reduces the combined latency of filtering, scoring, and candidate selection by up to 9.9×. It also reduces GPU index memory use by up to 74.5% and reconstructs its index 278× faster, completing the rebuild within the service's update window. In summary, this work makes the following contributions:

  • We analyze valid candidate sparsity in GR decoding and empirically demonstrate that filtering first can reduce scoring work while retaining comparable recommendation quality.

  • We design ZeroGR, integrating a compact filtering index, coordinated GPU execution, and parallel streaming construction to realize the performance benefits of filtering first.

  • We evaluate ZeroGR on real-world datasets from industrial GR services, demonstrating significant improvement over representative constrained decoding baselines.

References (17)