Abstract
Sequential recommendation systems typically rely on either item IDs to capture collaborative patterns or text metadata to understand item content. However, effectively fusing these two distinct information sources remains a challenge, often resulting in a "textual-collaborative gap." We propose CCFRec (Code-based textual and Collaborative semantic Fusion), a novel framework that bridges this gap by quantizing text embeddings into discrete "semantic codes." These codes serve as anchors in a cross-attention-based Semantic-Fusion Module (SFM), allowing the model to dynamically integrate fine-grained textual features with collaborative signals. Experimental results on Amazon datasets show that CCFRec significantly outperforms state-of-the-art baselines, particularly in data-sparse scenarios.
Introduction
Sequential recommender systems aim to predict a user's next interaction based on their historical behavior. Traditional ID-based models excel at capturing collaborative filtering (CF) signals but suffer from cold-start problems and lack semantic understanding. Conversely, text-enhanced models leverage Pre-trained Language Models (PLMs) to process item metadata but often fail to ground these high-dimensional embeddings in the discrete, behavioral space of recommendation.
The core issue identified by the authors is the "textual-collaborative gap." Simple concatenation or additive fusion often leads to dominance by one modality, while existing discrete coding methods may lose critical semantic nuances. CCFRec addresses this by using multi-view semantic codes as a shared vocabulary, functioning as semantically-aware IDs that guide the fusion of raw text attributes.
Methodology: The CCFRec Framework
CCFRec introduces a three-pronged approach to item representation:
1. Multi-View Semantic Codes
Instead of a monolithic text embedding, CCFRec encodes various item attributes (e.g., title, brand, category) separately. These are mapped into discrete semantic codes via Vector Quantization (VQ). These codes act as anchors that represent shared semantic concepts across the item catalog.
2. Code-Guided Semantic-Fusion Module (SFM)
The SFM is the architectural heart of CCFRec. It employs a cross-attention mechanism where the discrete semantic codes act as the Query, and the multi-view text embeddings serve as Key and Value. This design enables the model to selectively attend to relevant textual details based on the collaborative context provided by the codes.
3. Dual Optimization Tasks
To refine the learned representations, CCFRec utilizes two masking-based objectives:
- Masked Code Modeling (MCM): The model learns to reconstruct masked semantic codes from the remaining codes and text attributes, capturing intra-item correlations.
- Masked Sequence Alignment (MSA): A contrastive task that aligns original user sequences with masked versions, improving the robustness of the recommendation backbone.
Experimental Evaluation
The model was evaluated on four subsets of the Amazon 2023 review data: Musical Instruments, Video Games, Baby Products, and Industrial Scientific. These datasets were preprocessed using "5-core filtering" to ensure users and items have at least five interactions.
Key Results
CCFRec consistently outperformed state-of-the-art baselines like SASRec, UniSRec, and VQRec across all four datasets. Notably, on the Scientific dataset, CCFRec showed a 20.1% improvement in Recall@5 and a 12.7% improvement in NDCG@10 over the best-performing baseline.
A crucial finding was the impact of the semantic codes. As shown in the ablation study, using text-derived semantic codes significantly outperforms random or purely ID-based alternatives, validating their role as a bridge between modalities.
Conclusion
CCFRec effectively addresses the textual-collaborative gap in sequential recommendation by using discrete semantic codes to guide the fusion of rich metadata. By treating text as a queryable resource rather than a static feature, the model achieves a better balance between content understanding and collaborative patterns. While the training phase involves additional complexity due to PLM encoding and VQ, the fused representations can be pre-computed, ensuring inference latency remains identical to standard models like SASRec.
Summary updated