Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Generating Long Semantic IDs in Parallel for Recommendation

About

Semantic ID-based recommendation models tokenize each item into a small number of discrete tokens that preserve specific semantics, leading to better performance, scalability, and memory efficiency. While recent models adopt a generative approach, they often suffer from inefficient inference due to the reliance on resource-intensive beam search and multiple forward passes through the neural sequence model. As a result, the length of semantic IDs is typically restricted (e.g. to just 4 tokens), limiting their expressiveness. To address these challenges, we propose RPG, a lightweight framework for semantic ID-based recommendation. The key idea is to produce unordered, long semantic IDs, allowing the model to predict all tokens in parallel. We train the model to predict each token independently using a multi-token prediction loss, directly integrating semantics into the learning objective. During inference, we construct a graph connecting similar semantic IDs and guide decoding to avoid generating invalid IDs. Experiments show that scaling up semantic ID length to 64 enables RPG to outperform generative baselines by an average of 12.6% on the NDCG@10, while also improving inference efficiency. Code is available at: https://github.com/facebookresearch/RPG_KDD2025.

Yupeng Hou, Jiacheng Li, Ashley Shin, Jinsung Jeon, Abhishek Santhanam, Wei Shao, Kaveh Hassani, Ning Yao, Julian McAuley• 2025

Related benchmarks

TaskDatasetResultRank
Sequential RecommendationSports
Recall@50.0294
43
Sequential RecommendationToys
Recall@55.31
31
Sequential RecommendationBeauty
HR@107.57
30
RecommendationAmazon Instruments (test)
HR@50.0756
26
Sequential RecommendationCDs
Recall@54.82
21
Sequential RecommendationToys (test)
Recall@108.42
21
Sequential RecommendationInstruments
HR@55.18
20
Sequential RecommendationBooks Amazon (test)--
20
Sequential RecommendationBeauty
Recall@55.04
13
Sequential RecommendationIndustry internal (test)
Recall@516.79
11
Showing 10 of 18 rows

Other info

Follow for update