WorksComputer Science
Speculative Decoding for Semantic-ID-Based Generative Recommendations
Abstract
Generative recommender systems with Semantic IDs (SIDs) represent each item as a short sequence of discrete tokens and use a sequence model to predict the next item's tokens from a user's history. Industry-scale deployments typically use these models to retrieve multiple candidates per request with constrained beam search. However, this incurs a fixed cost of sequential model calls per request, and accuracy degrades as the SID generator becomes less sharp, without a guarantee on how close the output is to the exact top-. Production systems therefore cannot detect degraded retrieval for individual requests. We propose SIDECAR, which uses approximate draft candidates and a tree-attention pass to score the entire draft in a single model call, memory permitting. This pass bounds the probability of every unexplored SID prefix and certifies the exact top- if the draft contains them. Otherwise, a branch-and-bound fallback expands only the parts of the trie that can still change the output, reaching certification within at most calls for any draft. Moreover, under a budget of tokens per call and calls, which for matches the resources of a beam search of width , SIDECAR announces a factor within which its list will be exact at every rank. Depending on model sharpness, SIDECAR returns the exact top- using a fraction of beam search's calls or memory. Even when the budget is too small to recover the exact top-, SIDECAR, unlike beam search, reports the announced factor, allowing the serving system to stop early once a quality target or latency limit is reached.