Inductive Generative Recommendation via Retrieval-based Speculation

Yijie Ding, Yupeng Hou, Jiacheng Li, Julian J. McAuley

Abstract

Generative Recommendation (GR) models represent a shift in recommender systems, moving from ID-matching to autoregressive generation of semantic item IDs. Despite their success, these models face a significant limitation: they are typically transductive, failing to recommend items added to the catalog after training. We present SpecGR, a framework that leverages speculative decoding principles to enable inductive recommendation. SpecGR uses a retrieval-based "drafter" to propose candidates and a generative "verifier" to rank them. Our approach not only enables the recommendation of unseen items but also achieves a 1.7x speedup in inference latency, setting a new state-of-the-art on multiple Amazon Review datasets.

Introduction: The Challenge of Inductive Recommendation

Traditional Generative Recommendation (GR) models tokenize items into "semantic IDs"—sequences of discrete tokens—and learn to predict these sequences much like a Large Language Model (LLM) predicts text. While effective for seen items, this approach creates a "blind spot" for new content. Because the model learns specific token patterns during training, it rarely generates the IDs of items added post-training.

The inductive setting involves a dynamic item pool where new items (e.g., a new shoe model) are frequently added after the recommendation model has been trained.

In dynamic environments like news feeds or short-video platforms, this "seen-item bias" renders standard GR models ineffective. The core challenge is bridging the gap between the model's fixed vocabulary and the ever-expanding item catalog.

Methodology: Speculative Generative Recommendation (SpecGR)

To address this, we propose SpecGR, a framework inspired by speculative decoding in LLMs. Instead of generating tokens from scratch, SpecGR employs a "draft-then-verify" workflow.

SpecGR uses an inductive drafter to propose candidate items and a GR-based verifier to calculate their likelihood, enabling the recommendation of unseen items.

The process consists of four key stages:

  1. Inductive Drafting: A lightweight model (the "drafter") uses K-Nearest Neighbor search to propose a batch of candidate items, including those never seen by the main model. We explore two variants: SpecGR$_{Aux}$, which uses an external model, and SpecGR++, which reuses the GR model’s own encoder for maximum efficiency.
  2. Target-aware Verifying: The main GR model (the "verifier") calculates the log-likelihood of the drafted candidates. Candidates exceeding a probability threshold ($\gamma$) are accepted.
  3. Guided Re-drafting: If insufficient candidates are accepted, the GR model generates initial tokens (a prefix) to guide the drafter toward more relevant candidates in subsequent rounds.
  4. Adaptive Exiting: The loop terminates once $K$ items are accepted, significantly reducing the computational cost compared to full autoregressive generation.

Experimental Evaluation

We evaluated SpecGR on three subsets of the Amazon Reviews 2023 dataset: Video Games, Office Products, and Cell Phones & Accessories. To simulate real-world conditions, we used a chronological split, ensuring the test set contained "unseen" items that appeared only after the training period.

Key Results

  • Superior Performance on New Items: SpecGR significantly outperforms transductive baselines. On the "Unseen" subset of the Phones dataset, it improved Recall@50 by over 20%.
  • Efficiency Gains: SpecGR++ achieved a 1.7x speedup in inference latency for standard semantic IDs. This advantage scales with ID length, reaching up to 10x for longer sequences.
  • Generalizability: The framework is "plug-and-play," demonstrating consistent improvements when integrated with various GR backbones like TIGER and DSI.

Discussion and Insights

A key finding is the Generation-Representation Synergy. In SpecGR++, joint training for both item representation (retrieval) and generation (ranking) actually improves generative performance. This suggests that the two tasks are complementary rather than competing.

Furthermore, we identified that "identification tokens" at the end of semantic IDs often act as noise for unseen items. By developing a verification score that focuses on core semantic tokens, we achieved fairer and more accurate rankings for new content.

Limitations and Future Work

While SpecGR++ is efficient during inference, its multi-task training (combining contrastive and generative losses) requires approximately 2.6x more GPU hours than standard models. Additionally, the system remains dependent on the quality of pre-assigned semantic IDs; if tokenization fails to capture an item's essence, the drafter's performance may degrade.

Future work will focus on scaling this approach to foundation-scale recommendation models and refining the "guided" mechanisms between the drafter and verifier to further improve accuracy and efficiency.

Summary updated

Abstract

Generative recommendation (GR) is an emerging paradigm that tokenizes items into discrete tokens and learns to autoregressively generate the next tokens as predictions. Although effective, GR models operate in a transductive setting, meaning they can only generate items seen during training without applying heuristic re-ranking strategies. In this paper, we propose SpecGR, a plug-and-play framework that enables GR models to recommend new items in an inductive setting. SpecGR uses a drafter model with inductive capability to propose candidate items, which may include both existing items and new items. The GR model then acts as a verifier, accepting or rejecting candidates while retaining its strong ranking capabilities. We further introduce the guided re-drafting technique to make the proposed candidates more aligned with the outputs of generative recommendation models, improving the verification efficiency. We consider two variants for drafting: (1) using an auxiliary drafter model for better flexibility, or (2) leveraging the GR model's own encoder for parameter-efficient self-drafting. Extensive experiments on three real-world datasets demonstrate that SpecGR exhibits both strong inductive recommendation ability and the best overall performance among the compared methods. Our code is available at: https://github.com/Jamesding000/SpecGR.
BibTeX
@misc{ding2024inductive,
  author = {Yijie Ding and Yupeng Hou and Jiacheng Li and Julian J. McAuley},
  title = {{Inductive Generative Recommendation via Retrieval-based Speculation}},
  year = {2024},
  eprint = {2410.02939},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.02939},
}
Figure