Semantics Meet Signals: Dual Codebook Representationl Learning for Generative Recommendation

Zheng Hui, Xiaokai Wei, Reza Shirkavand, Chen Wang, Weizhi Zhang, Alejandro Peláez, Michelle GongarXiv 2025 · DOI

Introduction

Generative recommendation systems have emerged as a powerful paradigm, treating item recommendation as an autoregressive token prediction task. However, traditional approaches often struggle with "one-size-fits-all" tokenization. FlexCode addresses this by introducing a dual-codebook system and a popularity-aware router that dynamically allocates representational capacity based on item characteristics.

The Challenge: Representation Entanglement and Static Capacity

Current generative models face two primary hurdles:

  1. Representation Entanglement: Using a single codebook for both collaborative signals (user-item interactions) and semantic signals (item metadata) leads to interference, where distinct information types dilute each other.
  2. Static Capacity Allocation: Assigning the same number of tokens to all items is suboptimal. Popular "head" items benefit from high-precision collaborative IDs, while "long-tail" items rely more on semantic descriptions due to sparse interaction data.

The FlexCode Framework

FlexCode introduces several innovations to decouple and optimize item representations:

The FlexCode architecture featuring dual codebooks and popularity-aware token allocation.
  • Dual Codebook Construction: FlexCode maintains a Semantic Codebook (SC) for metadata-driven meaning and a Collaborative Codebook (CC) for interaction patterns. Both utilize Residual Quantization (RQ-VAE) to convert continuous embeddings into discrete sequences.
  • Popularity-Aware Token Allocation (PATA): A Mixture-of-Experts (MoE) router dynamically determines the ratio of CC vs. SC tokens. Head items receive more collaborative tokens for precision, while tail items are allocated more semantic tokens for better generalization.
  • Cross-Codebook Alignment (CCA): A contrastive loss ensures both codebooks remain aligned within a coherent shared space.

Experimental Evaluation

The model was tested across diverse benchmarks, including Amazon-Beauty, Amazon-Sports, KuaiRand-1K, and a large-scale Proprietary Industrial Dataset featuring over 45 million interactions.

Key Results and Insights

FlexCode consistently outperforms state-of-the-art baselines like SASRec, TIGER, and URL.

Performance improvement of FlexCode over SASRec, highlighting significant gains in tail item recommendation.
  • Winning the Long Tail: On the industrial dataset, FlexCode achieved an 11.3% improvement in NDCG@10 for tail items, demonstrating its superior ability to generalize for items with sparse data.
  • Industrial Scalability: In production environments, the model delivered a 13.2% lift in NDCG@10 and a 16.5% lift in Hit Rate (HR@10) over standard SASRec models.
  • Efficiency: FlexCode maintains high performance even with limited token budgets, proving that the quality and type of tokens are more critical than the quantity.

Conclusion and Future Work

By disentangling collaborative and semantic signals, FlexCode provides a flexible and scalable solution for generative recommendation. Future research will explore extending adaptive tokenization to the user side, integrating multi-modal signals (visual/audio), and addressing temporal drift in item popularity.

Summary updated

BibTeX
@misc{hui2025semantics,
  author = {Zheng Hui and Xiaokai Wei and Reza Shirkavand and Chen Wang and Weizhi Zhang and Alejandro Peláez and Michelle Gong},
  title = {{Semantics Meet Signals: Dual Codebook Representationl Learning for Generative Recommendation}},
  year = {2025},
  eprint = {2511.20673},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.20673},
}
Figure