Differentiable Semantic ID for Generative Recommendation

Junchen Fu, Xuri Ge, Alexandros Karatzoglou, Ioannis Arapakis, Suzan Verberne, Joemon M. Jose, Zhaochun Ren

TL;DR

Generative recommendation systems typically rely on fixed, pre-computed discrete semantic IDs (SIDs) to represent items, creating a fundamental mismatch between item indexing and the downstream recommendation task. This paper introduces DIGER, a framework that makes semantic indexing fully differentiable and end-to-end trainable. By combining Gumbel-noise-driven exploration with uncertainty decay, DIGER avoids the notorious "codebook collapse" problem and achieves state-of-the-art recommendation performance.

What Problem Does This Paper Address?

Generative recommendation treats recommending items similarly to predicting the next word in a sentence. Items are converted into sequences of discrete tokens called Semantic IDs (SIDs) using a tokenizer (like an RQ-VAE) based on item text or content.

However, standard pipelines do this in two disconnected stages:

  1. Train the tokenizer to compress and reconstruct item text.
  2. Freeze the SIDs, and train a sequence generator (like a Transformer) to predict the next SID based on user history.

This creates an objective mismatch. The SIDs are optimized purely for text reconstruction, not for ranking, personalization, or capturing evolving user interests.

Conventional vs. Generative recommendation with Differentiable SID.

Naively making the indexing process differentiable using standard workarounds like the Straight-Through Estimator (STE) fails in practice. The model quickly becomes overconfident in its early decisions, selecting only a tiny subset of available codes. This leads to codebook collapse, causing highly imbalanced code usage and unstable optimization.

Methods

The authors propose DIGER (Differentiable Semantic ID for GEnerative Recommendation), which introduces a two-part learning paradigm to enable stable joint optimization:

  1. DRIL (DiffeRentiable Semantic ID with Exploratory Learning): Instead of deterministic hard assignments during training, DRIL injects Gumbel noise into the codebook similarity logits. This flattens the selection distribution, explicitly encouraging the model to explore alternative SIDs early in training. It uses a Soft Update mechanism to allow gradients to flow back to all codebook entries, weighted by their Gumbel-Softmax probabilities.
  2. Uncertainty Decay (UD): To bridge the gap between noisy training and deterministic inference, DIGER gradually reduces stochasticity over time using two distinct strategies:
  3. Standard Deviation Uncertainty Decay (SDUD): Formulates an auxiliary loss function where the noise scale ($\sigma$) dynamically shrinks as the main recommendation generation loss decreases.
  4. Frequency-based Uncertainty Decay (FrqUD): Tracks code usage via an Exponential Moving Average (EMA). It injects Gumbel noise only into over-utilized ("hot") codes to encourage diversity, while keeping under-utilized codes deterministic.

Datasets

The framework was evaluated on three public datasets commonly used in sequential and generative recommendation research:

  • B-Shop: User interactions with cosmetic products.
  • I-Shop: User interactions with music-related products.
  • Yelp: Restaurant reviews and business categories.

Note: Item content features were enriched using a LLaMA-7B model to generate clean text descriptions from raw titles and attributes.

Key Insights and Ideas

  • The Differentiability Paradox: Making discrete token selection differentiable is notoriously unstable. As shown in Figure 2, the standard straight-through estimator (STE) suffers from immediate codebook collapse and high training variance, which severely harms recommendation quality.
  • Exploration as a Codebook Safeguard: Injecting Gumbel noise acts like an exploration bonus in reinforcement learning. By forcing the model to try different code assignments early on, it discovers semantic structures aligned with user preferences rather than just text reconstruction.
  • Dynamic Noise Alignment: The SDUD strategy elegantly links the noise level directly to the recommendation loss. As the model gets better at predicting user preferences, it naturally becomes more certain, smoothly transitioning from exploration to exploitation.
Comparison of DIGER and STE on B-Shop Dataset.

Key Results

  • Consistent Performance Gains: DIGER consistently outperformed the standard two-stage pipeline across all datasets. For example, on B-Shop, it raised Recall@10 from 0.0610 to 0.0683 and NDCG@10 from 0.0331 to 0.0372.
  • STE Failure: Naive end-to-end training using STE performed terribly (e.g., Recall@10 dropped to 0.0134 on B-Shop), proving that naive differentiability causes catastrophic codebook collapse.
  • SOTA Comparisons: DIGER achieved state-of-the-art or top-tier results against strong baselines like TIGER, LETTER, and ETEGRec, despite ETEGRec requiring roughly twice the training time due to its alternating distillation scheme.
  • Balanced Codebook Utilization: Visual analysis of code usage across quantization layers confirmed that DIGER maintains a highly balanced codebook distribution, preventing the deeper-layer collapse seen in STE.

Limitations and Future Work

  • Text-Only Focus: DIGER currently relies purely on text descriptions for item indexing. Integrating richer collaborative filtering signals (like user-item interaction graphs) could close the small performance gap seen on datasets like Yelp, where collaborative signals are highly dominant.
  • Item-Side Only: The current framework only makes item IDs differentiable. The authors suggest extending this approach to learn user-side or interaction-level discrete structures.
  • Alternative Estimators: Beyond Gumbel-Softmax, exploring other alternative estimators and optimization strategies for discrete latent variables remains a promising avenue for further stabilizing joint training.

Summary updated

BibTeX
@inproceedings{fu2026differentiable,
  author = {Junchen Fu and Xuri Ge and Alexandros Karatzoglou and Ioannis Arapakis and Suzan Verberne and Joemon M. Jose and Zhaochun Ren},
  title = {{Differentiable Semantic ID for Generative Recommendation}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2026},
  doi = {10.1145/3805712.3809641},
}
Figure