Skip to main content
QUICK REVIEW

[Paper Review] LLaRA: Large Language-Recommendation Assistant

Jiayi Liao, Sihang Li|arXiv (Cornell University)|Dec 5, 2023
Topic ModelingComputer Science5 citations
TL;DR

LLaRA proposes a hybrid framework that integrates traditional sequential recommenders with large language models (LLMs) by fusing ID-based embeddings with textual item features through a trainable adapter. Using curriculum learning, it gradually aligns LLMs with user behavioral patterns, significantly improving sequential recommendation performance over baselines on MovieLens and Steam datasets.

ABSTRACT

Sequential recommendation aims to predict users' next interaction with items based on their past engagement sequence. Recently, the advent of Large Language Models (LLMs) has sparked interest in leveraging them for sequential recommendation, viewing it as language modeling. Previous studies represent items within LLMs' input prompts as either ID indices or textual metadata. However, these approaches often fail to either encapsulate comprehensive world knowledge or exhibit sufficient behavioral understanding. To combine the complementary strengths of conventional recommenders in capturing behavioral patterns of users and LLMs in encoding world knowledge about items, we introduce Large Language-Recommendation Assistant (LLaRA). Specifically, it uses a novel hybrid prompting method that integrates ID-based item embeddings learned by traditional recommendation models with textual item features. Treating the "sequential behaviors of users" as a distinct modality beyond texts, we employ a projector to align the traditional recommender's ID embeddings with the LLM's input space. Moreover, rather than directly exposing the hybrid prompt to LLMs, a curriculum learning strategy is adopted to gradually ramp up training complexity. Initially, we warm up the LLM using text-only prompts, which better suit its inherent language modeling ability. Subsequently, we progressively transition to the hybrid prompts, training the model to seamlessly incorporate the behavioral knowledge from the traditional sequential recommender into the LLM. Empirical results validate the effectiveness of our proposed framework. Codes are available at https://github.com/ljy0ustc/LLaRA.

Motivation & Objective

  • Address the limitation of existing LLM-based sequential recommendation methods that rely solely on ID-based or text-based item representations, both of which fail to capture full user behavioral patterns or world knowledge.
  • Bridge the modality gap between traditional sequential recommenders (which model user behavior) and LLMs (which possess world knowledge) by treating user interaction sequences as a new modality.
  • Improve LLM alignment with sequential user behavior through a curriculum learning strategy that progressively introduces hybrid prompts combining textual and behavioral embeddings.
  • Demonstrate that combining world knowledge from LLMs with sequential behavioral patterns from traditional recommenders leads to superior recommendation accuracy.

Proposed method

  • Propose a hybrid prompting method that combines textual metadata (e.g., item titles) with ID-based embeddings from a pre-trained sequential recommender model.
  • Introduce a trainable adapter (a linear projector) to map ID-based embeddings into the LLM’s input space, enabling seamless integration of behavioral patterns.
  • Implement a curriculum learning strategy: first fine-tune the LLM on text-only prompts to align with language modeling, then gradually introduce hybrid prompts with behavioral embeddings.
  • Use LoRA-style parameter-efficient fine-tuning with a cosine learning rate scheduler and half-precision training to optimize efficiency and memory usage.
  • Train the adapter and LLM jointly using a cross-entropy loss on next-item prediction, with hyperparameters tuned via grid search.
  • Apply weight decay (1e-5) and early stopping to prevent overfitting, and report results averaged over five random seeds.

Experimental results

Research questions

  • RQ1Can combining textual item features with ID-based embeddings from sequential recommenders improve LLM-based sequential recommendation?
  • RQ2Does a curriculum learning strategy that gradually introduces behavioral embeddings enhance LLM alignment with sequential user patterns?
  • RQ3How does the hybrid prompting mechanism compare to pure text-only or ID-only prompting in terms of recommendation accuracy?
  • RQ4To what extent can LLaRA leverage both world knowledge and sequential behavioral patterns to outperform existing sequential recommendation models?
  • RQ5What is the contribution of the adapter module in bridging the modality gap between traditional recommenders and LLMs?

Key findings

  • LLaRA outperforms all baseline models on both MovieLens and Steam datasets, achieving state-of-the-art performance in sequential recommendation.
  • The ablation study confirms that both hybrid prompting and curriculum learning are essential, with the full LLaRA framework significantly outperforming variants without either component.
  • On MovieLens, LLaRA achieves a Hit Rate@10 of 0.621 and NDCG@10 of 0.587, surpassing the next-best baseline by over 3 percentage points.
  • On Steam, LLaRA achieves a Hit Rate@10 of 0.592 and NDCG@10 of 0.551, demonstrating strong generalization across diverse domains.
  • The case study shows that LLaRA correctly predicts user preferences based on genre patterns (e.g., adventure and war), while models relying only on world knowledge or behavior fail.
  • The adapter module enables effective alignment between sequential behavioral embeddings and LLM input space, enabling the model to internalize user preference dynamics.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.