Abstract
Recent advances in Large Language Models (LLMs) have demonstrated promising performance in sequential recommendation tasks, leveraging their superior language understanding capabilities. However, existing LLM-based recommendation approaches predominantly focus on modeling item-level co-occurrence patterns while failing to adequately capture user-level personalized preferences. This is problematic since even users who display similar behavioral patterns may have fundamentally different underlying interests. To alleviate this problem, we propose ULMRec, a framework that effectively integrates user personalized preferences into LLMs for sequential recommendation. ULMRec replaces item IDs with titles to capture semantics and introduces two key components: a personalized user indexing mechanism using vector quantization on reviews, and an alignment-based tuning stage with comprehensive preference alignment tasks. Extensive experiments on two public datasets demonstrate that ULMRec significantly outperforms existing methods.
Introduction
Sequential recommendation aims to predict the next item a user will interact with based on their historical behavior. While Large Language Models (LLMs) have shown great potential in this area due to their reasoning and language processing abilities, they face two significant challenges:
- The Semantic Gap: LLMs are optimized for natural language, but traditional recommendation systems rely on arbitrary item and user IDs. These IDs lack semantic meaning and can be fragmented during tokenization, hindering the model's ability to learn user-specific patterns.
- Personalization Deficit: Most LLM-based models focus on item sequences (e.g., "User bought A, then B, what is C?") without understanding the underlying user intent or long-term preferences.
ULMRec addresses these issues by grounding user identities in natural language reviews and aligning these identities with the LLM's semantic space.
Methodology
The ULMRec framework consists of two primary stages designed to bridge the gap between user behavior and language models.
Personalized User Indexing
To create semantically meaningful user representations, ULMRec utilizes user reviews, which are rich in personal sentiment and preference information.
- Encoding: User reviews are encoded using a pre-trained BERT model to extract high-level semantic features.
- Vector Quantization: These features, combined with traditional user IDs to ensure uniqueness, are processed through a Residual-Quantized Variational AutoEncoder (RQ-VAE). This process generates a discrete, hierarchical "user index" (e.g.,
<a_219> <b_3> <c_95> <d_238>). This indexing ensures that users with similar preferences have similar representations in the LLM's vocabulary.
Alignment-based Index Understanding
Simply introducing new tokens is insufficient; the LLM must understand their meaning. ULMRec employs instruction tuning across six alignment tasks, including next-item prediction, index-preference alignment, and rating prediction.
Experimental Results
ULMRec was evaluated on the Amazon Beauty and Video Games datasets, which were pre-processed to ensure data quality and semantic availability (item titles).
Performance Comparison
ULMRec significantly outperformed both traditional sequential models (like SASRec) and state-of-the-art LLM-based recommenders (like LlamaRec). On the Video Games dataset, ULMRec achieved an improvement of 8.7% in Recall@5 and 7.7% in MRR@10 over the strongest baseline.
Ablation Study
To understand the contribution of each component, the authors conducted an ablation study. The results indicate that the alignment tasks—particularly preference and intent alignment—are crucial for the model's success. Removing these components leads to a noticeable drop in recommendation accuracy, confirming that the LLM requires explicit training to associate user indices with semantic preferences.
Conclusion and Future Work
ULMRec demonstrates that integrating personalized user indexing and multi-task alignment can significantly enhance the performance of LLMs in recommendation tasks. By grounding user IDs in natural language reviews, the model gains a deeper understanding of "who" the user is.
Future research will focus on addressing the cold start problem for users without historical reviews and exploring cross-domain transferability, where a user index learned in one category could provide immediate personalization in another.
Summary updated