TL;DR
Generative recommendation models traditionally map items to rigid, discrete token codes, causing significant semantic information loss. This paper introduces SODA (Semantic-Oriented Distributional Alignment), a plug-and-play framework that replaces discrete code matching with soft probability distributions over multi-layer codebooks. By aligning these information-rich distributions via a contrastive KL-divergence loss, SODA bridges the gap between tokenization and recommendation, consistently boosting the accuracy of various generative backbones.
What Problem Does This Paper Address?
Generative recommendation (GenRec) is an emerging paradigm that treats recommendation as a sequence-to-sequence task. Instead of scoring millions of item IDs, a tokenizer (like RQ-VAE) compresses items into short sequences of discrete tokens drawn from multi-layer codebooks. A generative language model (like a Transformer) then autoregressively predicts the next item's tokens.
However, existing GenRec methods suffer from a fundamental bottleneck: discrete code-level supervision. Forcing continuous item embeddings into hard, discrete tokens discards fine-grained semantic nuances. Furthermore, it creates a disconnect between the tokenizer and the recommender, preventing them from being optimized jointly in a truly differentiable, end-to-end manner.
Methods
To preserve continuous semantic details, the authors propose moving from code-level supervision to distribution-level supervision.
As illustrated in Figure 1, the SODA framework introduces three main components:
- Soft Distributional Representation: Instead of assigning a single hard token at each codebook layer, SODA applies a softmax over the negative squared distances between the item embedding and all codewords. This creates a soft probability distribution ($h^y$) that acts as an information-rich semantic signature.
- Contrastive Distributional Alignment: SODA adapts the classic Bayesian Personalized Ranking (BPR) loss to the distribution space. The recommender encodes a user's history and projects it into the tokenizer space to form a positive distribution ($h^+$). It also aggregates histories from other users in the mini-batch to form a negative distribution ($h^-$).
- KL Divergence Matching: The matching score between these distributions is computed using the negative symmetric Kullback-Leibler (KL) divergence. The model is trained to maximize the similarity between the user's history distribution and the target item distribution while minimizing similarity with negative samples.
The entire pipeline is trained using an alternating optimization strategy, where the tokenizer and recommender are updated iteratively to ensure the token space dynamically adapts to the recommendation task.
Datasets
The authors evaluated SODA on three distinct sequential recommendation datasets:
- Amazon Beauty: A public benchmark containing 22,362 users and 12,083 items.
- Amazon Pet Supplies: A public benchmark containing 19,855 users and 8,498 items.
- Upwork: A large-scale proprietary dataset from an online freelancing platform (15,542 users/employers and 33,508 items/freelancers), where interactions represent timestamped hiring events.
All datasets were filtered using a standard 5-core strategy (retaining users and items with at least 5 interactions).
Key Insights and Ideas
- Soft is Better Than Hard: Relaxing hard quantization into soft probability distributions retains the continuous semantic nuances of items, mitigating the information loss that plagues standard generative retrieval.
- Contrastive Learning Amplifies Alignment: Pointwise alignment isn't enough. Introducing in-batch negative distributions forces the recommender to learn highly discriminative boundaries between relevant and irrelevant item semantics.
- Dynamic Spaces are Crucial: The ablation studies highlight that alternating optimization (dynamically updating the codebooks during recommender training) is vital. Fixing the tokenizer's code assignments beforehand severely limits the model's ability to capture context-dependent semantics.
Key Results
The authors integrated SODA into three state-of-the-art generative recommendation backbones: TIGER, LETTER, and ETEGRec (denoted as SODA-T, SODA-L, and SODA-E).
As shown in Table 2, SODA consistently improved performance across all backbones and datasets:
- On the Beauty dataset, SODA-T improved TIGER's Recall@10 from 0.0594 to 0.0698 (a ~17.5% relative improvement) and NDCG@10 from 0.0320 to 0.0385.
- Generative methods enhanced by SODA broadly outperformed traditional strong sequential baselines like SASRec and BERT4Rec.
Table 3 confirms the necessity of each component. Removing the negative contrastive terms (w/o neg) or dropping the alternating optimization (w/o alter) led to significant performance drops, proving that both distribution-level contrast and dynamic codebook updates are essential for success.
Limitations and Future Work
While SODA shows strong performance gains, the authors note a few areas for future exploration:
- Industrial Scalability: The framework needs to be tested on larger, industrial-scale datasets to fully evaluate its computational efficiency and robustness when handling extremely large item corpora.
- Unified End-to-End Identifiers: The authors plan to explore using these soft codebook distributions directly as item identifiers throughout the entire network architecture, moving closer to a completely unified, end-to-end optimized generative recommendation framework.
Summary updated