LLaRA: Aligning Large Language Models with Sequential Recommenders
Preprint
Abstract
Sequential recommendation aims to predict the subsequent items matching user preference based on her/his historical interactions. With the development of Large Language Models (LLMs), there is growing interest in exploring the potential of LLMs for sequential recommendation by framing it as a language modeling task. Prior works represent items in the textual prompts using either ID indexing or text indexing and feed the prompts into LLMs, but falling short of either encapsulating comprehensive world knowledge or exhibiting sufficient sequential understanding. To harness the complementary strengths of traditional recommenders (which encode user behavioral knowledge) and LLMs (which possess world knowledge about items), we propose LLaRA -- a Large Language and Recommendation Assistant framework. Specifically, LLaRA represents items in LLM's input prompts using a novel hybrid approach that integrates ID-based item embeddings from traditional recommenders with textual item features. Viewing the ``sequential behavior of the user'' as a new modality in recommendation, we employ an adapter to bridge the modality gap between ID embeddings of the traditional recommenders and the input space of LLMs. Furthermore, instead of directly exposing the hybrid prompt to LLMs, we apply a curriculum learning approach to gradually ramp up training complexity. We first warm up the LLM with text-only prompting, which aligns more naturally with the LLM's language modeling capabilities. Thereafter, we progressively transition to hybrid prompting, training the adapter to incorporate behavioral knowledge from the traditional sequential recommender into the LLM. Extensive experiments demonstrate the efficacy of LLaRA framework. Our code and data are available at https://github.com/ljy0ustc/LLaRA .Keywords
All Related Versions
This publication has 27 references indexed in Scilit:
- A survey on large language models for recommendationWorld Wide Web, 2024
- GenRec: Large Language Model for Generative Recommendation2024
- Large Language Models are Zero-Shot Rankers for Recommender Systems2024
- GPT understands, tooAI Open, 2024
- Large language models encode clinical knowledgeNature, 2023
- Self-Attentive Sequential Recommendation2018
- Personalized Top-N Sequential Recommendation via Convolutional Sequence Embedding2018
- 3D Convolutional Networks for Session-based Recommendation with Content Features2017
- Personalizing Session-based Recommendations with Hierarchical Recurrent Neural Networks2017
- Parallel Recurrent Neural Network Architectures for Feature-rich Session-based Recommendations2016