Source-linked AI summary
LLaRA: Large Language-Recommendation Assistant
Jiayi Liao, Sihang Li, Zhengyi Yang, Jiancan Wu, Yancheng Yuan, Xiang Wang, Xiangnan He
TL;DR
Sequential recommendation needs to combine LLM world knowledge with the behavioral patterns captured by traditional recommenders, which ID-only and text-only prompts do not fully provide. LLaRA aligns recommender embeddings with LLM inputs through hybrid prompting and progressively trains from text-only to hybrid prompts. It outperforms the reported baselines across three datasets, while ablations support both proposed components.
Problem
ID-based and text-based item prompts do not fully combine LLM world knowledge with the behavioral understanding needed for sequential recommendation.
Method
LLaRA combines textual item features with projected ID-based recommender embeddings and uses curriculum prompt tuning to transition from text-only to hybrid prompts.
Results
LLaRA outperforms all baselines on MovieLens, Steam, and LastFM, achieving HitRatio@1 values of 0.4737, 0.4949, and 0.4508, respectively.
Takeaways & Limitations
The results support integrating traditional sequential recommenders with LLMs through hybrid prompting and curriculum tuning for sequential recommendation.
Takeaways & Limitations
The paper describes LLaRA as an initial step toward more unified natural-language recommendation frameworks for complex and diverse scenarios.
Abstract
from arXiv · showhide
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.
1 INTRODUCTION
LLaRA addresses the limits of representing recommendation items with only IDs or text by aligning behavioral knowledge from conventional recommenders with LLMs’ textual representations. It combines textual and behavioral tokens and trains the model progressively from text-only to hybrid prompts.
- Sequential recommendation predicts a user’s next item from historical interactions, while conventional recommenders learn item embeddings that capture sequential behavioral patterns.
- LLM-based recommendation reframes sequential recommendation as language modeling, but prior item representations often underuse either item world knowledge or user behavioral information.
- LLaRA treats sequential user behavior as a modality and aligns it with the LLM language space through a framework integrating conventional sequential recommenders with LLMs.
- Hybrid prompting combines textual item metadata with a behavioral token produced by projecting a traditional recommender’s ID embedding into the LLM token space.
- Curriculum prompt tuning begins with text-only prompts and progressively shifts to hybrid prompts, easing the LLM into behavioral-token integration.
- LLaRA consistently outperforms baselines on HitRatio@1 across MovieLens, Steam, and LastFM, while ablations support hybrid prompting and curriculum prompt tuning.
2 RELATED WORK
Related work spans language models, multimodal alignment, and sequential recommendation, including efforts to use LLMs directly or enhance recommenders with LLM representations. LLaRA instead aligns established sequential recommenders with LLMs and adds curriculum tuning for list-wise ranking.
- Language models provide broad language understanding and generation capabilities, while domain-specific models combine domain expertise with general commonsense knowledge.
- Multimodal large language models extend predominantly text-based LLMs by aligning textual space with modalities such as vision, video, and audio.
- Sequential recommendation research uses architectures including recurrent networks, convolutional networks, and attention mechanisms to characterize user preferences from interaction sequences.
- LLM-based recommendation studies either train, tune, prompt, or use LLMs in context, or augment traditional recommenders with LLM tokens or embeddings.
- LLaRA aligns traditional sequential models with LLMs, combining recommender-learned behavioral patterns with LLM reasoning and world knowledge.
- Compared with concurrent work, LLaRA adds curriculum tuning for stable alignment and focuses on list-wise ranking rather than point-wise binary classification.
3 PRELIMINARY
The preliminary section defines sequential recommendation as next-item prediction from chronological interactions and introduces curriculum learning, instruction tuning, and parameter-efficient fine-tuning as relevant foundations.
- Given a chronological item sequence [i1, i2, . . . , in], sequential recommendation predicts the next item i_n+1 the user will interact with.
- Curriculum learning trains models from simpler to more complex tasks through complexity assessment, scheduler formulation, and training execution.
- Instruction tuning reorganizes data into instruction-response pairs that provide task descriptions and natural-language training context.
- The LLM is tuned with an autoregressive objective that predicts each response token conditioned on the input and preceding response tokens.
- Parameter-efficient fine-tuning updates a smaller parameter set to reduce computational requirements while retaining effective performance.
4 LARGE LANGUAGE-RECOMMENDATION ASSISTANT (LLARA)
LLaRA aligns conventional sequential recommenders with LLMs through hybrid item representations and curriculum prompt tuning. It combines textual metadata with projected behavioral embeddings, then shifts training from text-only to hybrid prompts.
- Framework overview: LLaRA aligns sequential recommender representations with the LLM language space through hybrid prompting and curriculum learning.The framework combines behavioral knowledge from recommenders with textual item information.
- Item representation: A trainable projector maps ID-based item embeddings learned by sequential recommenders into behavioral tokens compatible with LLM prompts.The ID-based representations capture sequential patterns, while projection bridges their modality gap with language.
- Hybrid prompt design: Hybrid prompts integrate textual and behavioral tokens for historical interactions and candidate items, unlike text-only prompts that use textual tokens and placeholders.The prompt contains task definition, interaction sequence, and candidate set components.
- Hybrid prompt design: The hybrid design addresses the limitations of relying exclusively on ID-based or textual item representations by combining behavioral patterns with item metadata.This integration is intended to generate more accurate recommendations.
- Curriculum prompt tuning: The curriculum treats text-only prompting as the easy task and hybrid prompting as the hard task because behavioral-token integration increases complexity.Text-only prompting better matches the LLM’s text-trained capabilities, whereas hybrid prompting introduces an additional modality.
- Curriculum prompt tuning: Training progressively replaces text-only prompts with hybrid prompts, facilitating behavioral-knowledge injection while preserving the LLM’s initial language-modeling alignment.The strategy first familiarizes the LLM with recommendation through text and then incorporates recommender-derived behavior.
5 EXPERIMENTS AND RESULTS
The experiments evaluate LLaRA against traditional sequential recommenders and LLM-based methods on three datasets. They also test the contributions of hybrid prompting and curriculum prompt tuning through ablations.
- Overall evaluation: Experiments compare LLaRA with traditional sequential recommender models and LLM-based methods on MovieLens, Steam, and LastFM.The evaluation uses three real-world datasets.
- Ablation studies: Ablation studies examine the importance of hybrid prompting and curriculum prompt tuning.The experiments explicitly test both proposed components.
5.1 Experimental Settings
The experiments use MovieLens, Steam, and LastFM datasets, with chronological train/validation/test splits and candidate-based next-item evaluation. LLaRA is also compared through item-representation variants.
- MovieLens contains user ratings and movie titles, Steam contains game reviews and titles, and LastFM contains user-artist listening relationships and artist names.
- Sequences are arranged chronologically and divided into training, validation, and test subsets across the datasets.
- Each sequence uses 20 randomly selected non-interacted items plus the correct subsequent item as the candidate set.
- Performance is evaluated with HitRatio@1, while valid ratio measures the proportion of generated responses belonging to the candidate set.
- Figure 4 compares numerical index, behavioral token, textual feature, and hybrid item representations.
5.2 Performance Comparison (RQ1)
LLaRA outperforms traditional sequential recommenders and LLM-based baselines across MovieLens, Steam, and LastFM. It also maintains high response validity, indicating effective candidate-constrained instruction following.
- LLaRA outperforms all traditional and LLM-based baselines across the three datasets.
- LLaRA achieves the highest HitRatio@1 on MovieLens, Steam, and LastFM, with scores of 0.4737, 0.4949, and 0.4508, respectively.
- Traditional recommenders score lower than LLaRA because they use user behavioral patterns without integrating semantic item information.
- MoRec and TALLRec improve over standalone LLMs but remain below LLaRA, reflecting their omission of reasoning ability or traditional sequential information, respectively.
- LLaRA achieves valid ratios above 95% on all datasets, whereas backbone Llama2 records 0.4421, 0.1653, and 0.3443 on MovieLens, Steam, and LastFM.
5.3 Impact of Hybrid Item Representation (RQ2)
The hybrid representation combines behavioral and textual item information, outperforming numerical, behavioral-token, and textual-feature alternatives in HitRatio@1 across all three datasets.
- The compared item representations are numerical index, behavioral token, textual feature, and hybrid representation.
- The hybrid representation fuses behavioral tokens projected from recommender embeddings with textual tokens derived from item titles.
- The hybrid representation surpasses the other methods in HitRatio@1 across all three datasets.
- The results indicate that relying solely on semantic information or solely on sequential information is insufficient for the evaluated recommendation setting.
5.4 Impact of Curriculum Prompt Tuning (RQ3)
LLaRA compares direct, two-stage, and curriculum training strategies for integrating text and behavioral modalities. Curriculum learning progressively shifts from text-only to hybrid prompting and consistently performs best across datasets.
- The evaluation compares direct training, two-stage training, and LLaRA’s single-stage curriculum learning strategy.
- Direct training uses hybrid representations throughout, whereas two-stage training first fine-tunes Llama2 with title-only representations.
- The case studies show “The Great Escape” matching the user’s subsequent interaction and “Batman & Robin” matching another observed interaction.
- LLaRA gradually transitions from basic text-only prompting to hybrid prompting during training.
- Curriculum learning consistently outperforms the other training strategies across all datasets.
5.5 Case Studies
The case studies show complementary benefits from LLM world knowledge and sequential behavioral patterns. LLaRA matches the correct next film in both examples by incorporating these sources of information.
- World knowledge: LLaRA and TALLRec recommended “The Great Escape,” matching the user’s actual subsequent interaction, whereas SASRec predicted “Mr. Smith Goes to Washington.”The example links the correct recommendation to recognizing adventure and war preferences in the viewing history.
- World knowledge: LLM world knowledge supported identifying the user’s preference for adventure and war genres, favoring “The Great Escape” over a political drama.
- Sequential behavioral patterns: SASRec and LLaRA recommended “Batman & Robin,” aligning with the actual interaction, while TALLRec predicted “The Devil’s Own.”
- Sequential behavioral patterns: The second case illustrates that sequential behavioral patterns can be important for recommendation when background knowledge favors a different genre interpretation.TALLRec may have inferred action, adventure, or thriller preferences, while SASRec used interaction history to identify the correct film.
6 CONCLUSION AND DISCUSSION
The paper introduces LLaRA, which integrates traditional recommender models with LLMs for sequential recommendation through language modeling and curriculum learning. It reports superior baseline performance and identifies hybrid prompting and curriculum prompt tuning as essential components, while positioning the work as an initial step toward broader unified recommendation frameworks.
- LLaRA integrates traditional recommender models with LLMs and transforms sequential recommendation into a language modeling task.
- Curriculum learning gradually injects sequential patterns learned by traditional recommenders into LLM tuning.
- LLaRA outperforms all baseline models in sequential recommendation, while ablations highlight the essential roles of hybrid prompting and curriculum prompt tuning.
- The work is presented as an initial step toward aligning conventional recommender models with LLMs and developing unified recommendation frameworks.The discussion identifies more complex and diverse recommendation scenarios as a direction for future research.