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 .
翻译:序列推荐旨在根据用户的历史交互行为预测其偏好的后续项目。随着大语言模型(LLMs)的发展,将其应用于序列推荐(通过将其构建为语言建模任务)的研究兴趣日益增长。现有工作通过ID索引或文本索引在文本提示中表示项目,并将提示输入LLMs,但要么缺乏对综合世界知识的封装,要么表现出不足的序列理解能力。为发挥传统推荐器(编码用户行为知识)与LLMs(拥有物品世界知识)的互补优势,我们提出LLaRA——一种大语言与推荐助手框架。具体而言,LLaRA采用新颖的混合方法在LLM输入提示中表示项目,该方法将传统推荐器的基于ID的项目嵌入与文本项目特征相结合。将“用户的序列行为”视为推荐中的新模态,我们采用适配器来弥合传统推荐器ID嵌入与LLM输入空间之间的模态差距。此外,我们并未直接将混合提示暴露给LLM,而是应用课程学习方法逐步提升训练复杂度。首先使用纯文本提示对LLM进行热身训练,这更自然地契合LLM的语言建模能力;随后逐步过渡到混合提示训练,使适配器能够将传统序列推荐器的行为知识融入LLM。大量实验证明了LLaRA框架的有效性。我们的代码与数据可在 https://github.com/ljy0ustc/LLaRA 获取。