LLM2Rec: Large Language Models Are Powerful Embedding Models for Sequential Recommendation

Yingzhi He, Xiaohao Liu, An Zhang, Yunshan Ma, Tat-Seng Chua
6/16/2025
cs.IRcs.AI

Official code: HappyPointer/LLM2Rec (68 stars, last commit 2025-09-06).

Abstract

Sequential recommendation aims to predict users' future interactions by modeling collaborative filtering (CF) signals from historical behaviors of similar users or items. Traditional sequential recommenders predominantly rely on ID-based embeddings, which capture CF signals through high-order co-occurrence patterns. However, these embeddings depend solely on past interactions, lacking transferable knowledge to generalize to unseen domains. Recent advances in large language models (LLMs) have motivated text-based recommendation approaches that derive item representations from textual descriptions. While these methods enhance generalization, they fail to encode CF signals-i.e., latent item correlations and preference patterns-crucial for effective recommendation. We argue that an ideal embedding model should seamlessly integrate CF signals with rich semantic representations to improve both in-domain and out-of-domain recommendation performance. To this end, we propose LLM2Rec, a novel embedding model tailored for sequential recommendation, integrating the rich semantic understanding of LLMs with CF awareness. Our approach follows a two-stage training framework: (1) Collaborative Supervised Fine-tuning, which adapts LLMs to infer item relationships based on historical interactions, and (2) Item-level Embedding Modeling, which refines these specialized LLMs into structured item embedding models that encode both semantic and collaborative information. Extensive experiments on real-world datasets demonstrate that LLM2Rec effectively improves recommendation quality across both in-domain and out-of-domain settings. Our findings highlight the potential of leveraging LLMs to build more robust, generalizable embedding models for sequential recommendation. Our codes are available at https://github.com/HappyPointer/LLM2Rec.

View on arXivView PDF

Code Implementations(1)

[KDD'25] LLM2Rec: Large Language Models Are Powerful Embedding Models for Sequential Recommendation.

6810Shell, PythonMay 31, 20251 years ago

Similar Papers

Cite this paper

@article{he2025llmrec,
  title  = {LLM2Rec: Large Language Models Are Powerful Embedding Models for Sequential Recommendation},
  author = {Yingzhi He and Xiaohao Liu and An Zhang and Yunshan Ma and Tat-Seng Chua},
  year   = {2025},
  eprint = {2506.21579},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.21579v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.21579.svg)](https://codeofpaper.com/paper/2506.21579)

Discussion