Source-linked AI summary

TALLRec: An Effective and Efficient Tuning Framework to Align Large Language Model with Recommendation

Keqin Bao, Jizhi Zhang, Yang Zhang, Wenjie Wang, Fuli Feng, Xiangnan He

arXiv:2305.00447v3cs.IR

TL;DR

LLMs used through in-context learning remain poorly aligned with recommendation tasks, which also receive limited representation in pre-training data. TALLRec addresses this gap by tuning LLMs with recommendation instructions through an efficient two-stage framework. The tuned models improve recommendation performance in movie and book domains and show cross-domain generalization, while the framework remains lightweight.

  • Problem

    In-context recommendation approaches underperform because LLM language-task training is poorly aligned with recommendation and recommendation-oriented pre-training data are limited.

  • Method

    TALLRec adapts LLMs by structuring recommendation data as instructions and applying two lightweight stages: alpaca tuning and rec-tuning.

  • Results

    TALLRec-trained LLMs outperform traditional models and GPT3.5-based in-context learning in movie and book recommendation scenarios and generalize across domains.

  • Takeaways & Limitations

    TALLRec can efficiently align LLMs with recommendation using few tuning samples and low GPU memory, while retaining cross-domain recommendation ability.

  • Takeaways & Limitations

    BookCrossing lacks interaction timestamps, so historical interactions are constructed by random sampling.

Abstract

from arXiv · show

Large Language Models (LLMs) have demonstrated remarkable performance across diverse domains, thereby prompting researchers to explore their potential for use in recommendation systems. Initial attempts have leveraged the exceptional capabilities of LLMs, such as rich knowledge and strong generalization through In-context Learning, which involves phrasing the recommendation task as prompts. Nevertheless, the performance of LLMs in recommendation tasks remains suboptimal due to a substantial disparity between the training tasks for LLMs and recommendation tasks, as well as inadequate recommendation data during pre-training. To bridge the gap, we consider building a Large Recommendation Language Model by tunning LLMs with recommendation data. To this end, we propose an efficient and effective Tuning framework for Aligning LLMs with Recommendation, namely TALLRec. We have demonstrated that the proposed TALLRec framework can significantly enhance the recommendation capabilities of LLMs in the movie and book domains, even with a limited dataset of fewer than 100 samples. Additionally, the proposed framework is highly efficient and can be executed on a single RTX 3090 with LLaMA-7B. Furthermore, the fine-tuned LLM exhibits robust cross-domain generalization. Our code and data are available at https://github.com/SAI990323/TALLRec.

1 INTRODUCTION

Existing in-context recommendation approaches often underperform because LLM training and recommendation tasks are poorly aligned and recommendation data are limited. TALLRec addresses this gap by efficiently tuning LLMs with recommendation instructions, achieving stronger recommendation performance and cross-domain robustness.

  • Motivation: In-context approaches only achieve performance comparable to traditional recommendation models and may refuse recommendations or predict positive preferences indiscriminately.On Movie and Book tasks, ignoring refusals yields AUC=0.5, equivalent to random guessing.
  • Motivation: LLMs may be poorly aligned with recommendation because their training emphasizes language tasks and contains limited recommendation-oriented data.Existing recommendation models can also restrict performance by omitting target items from candidate lists.
  • TALLRec Framework: TALLRec structures recommendation data as instructions and applies lightweight instruction tuning to adapt LLMs for recommendation.The framework is designed to reduce the computational resources required for LLM adaptation.
  • Efficiency and Evaluation: TALLRec tunes LLaMA-7B with LoRA and can be deployed on a single Nvidia RTX 3090 with 24GB GPU memory.The framework is evaluated in few-shot settings using limited tuning examples.
  • Results: In movie and book recommendation scenarios, the tuned LLaMA-7B outperforms traditional models and GPT3.5-based in-context learning while generalizing across domains.The reported cross-domain example is movie →book.

2 TALLREC

TALLRec aligns LLMs with recommendation through instruction-formatted data, two tuning stages, and lightweight parameter updates. It defines recommendation tuning around user histories and unseen target items while addressing computational and access constraints.

  • Preliminary: Instruction tuning formats tasks as natural-language instructions, inputs, and outputs before updating the LLM on paired examples.The process defines a task, constructs textual inputs and outputs, combines instruction with input, and tunes on the resulting pairs.
  • Rec-tuning Task Formulation: Rec-tuning asks the model to predict whether a user will enjoy an unseen item from historical interactions, returning “Yes” or “No”.Liked and disliked items are grouped by ratings, ordered by interaction time, and represented with textual descriptions.
  • TALLRec Tuning Stages: TALLRec contains alpaca tuning followed by rec-tuning, respectively improving generalization and adapting the LLM to recommendation.The two stages emulate instruction tuning while targeting recommendation alignment.
  • TALLRec Tuning Stages: The framework uses conditional language modeling for alpaca tuning and applies the same tuning pattern to recommendation samples.The instruction input and output are modeled token by token, with rec-tuning samples used analogously.
  • Lightweight Tuning: LoRA makes both tuning stages lightweight by updating only a small parameter subset instead of directly tuning the full LLM.The framework updates LoRA parameters, with training requiring only one-thousandth of the original LLM parameters.
  • Backbone Selection: Backbone selection considers parameter and API accessibility as well as recommendation-field data-security concerns.The discussion notes that some LLMs lack accessible parameters or APIs and that third-party APIs raise further concerns.

3 EXPERIMENTS

The experiments evaluate TALLRec against LLM-based and traditional recommenders, test its two tuning components under few-shot settings, and examine cross-domain generalization. TALLRec consistently performs strongly with limited recommendation data and transfers across movie and book domains.

  • Experimental Setup: The study evaluates TALLRec against LLM-based and traditional recommendation methods using movie and book datasets under few-shot training settings.The evaluation uses AUC for binary user-preference prediction and compares results across varying numbers of tuning samples.
  • Performance Comparison: TALLRec significantly outperforms both traditional and LLM-based methods, while LLM-based baselines perform similarly to random guessing with AUC≈0.5.The results support using recommendation data to tune LLMs rather than relying only on in-context learning.
  • Ablation Study: Rec-tuning is essential: the alpaca-tuning-only variant “AT” performs substantially worse than both rec-tuning-only “RT” and full TALLRec.The ablation compares AT, RT, and TALLRec while varying the number of rec-tuning samples.
  • Ablation Study: With ≤128 rec-tuning samples, TALLRec generally outperforms “RT”, whereas their results become closer as rec-tuning data increase.This pattern indicates that alpaca tuning is especially useful when task-specific training data are scarce.
  • Cross-domain Generalization: TALLRec demonstrates cross-domain generalization, with movie-tuned models performing well on book data and combined-domain tuning surpassing single-domain tuning above 64 samples.The comparison evaluates TALLRec models trained on Book, Movie, or both datasets on both testing domains.

4 RELATED WORK

Prior work combines language models with recommendation systems through semantic information or In-context Learning, while sequential recommendation models users’ historical interaction sequences.

  • LMs for Recommendation: Language-model recommendation methods may retain traditional user and item IDs, limiting their use of language models’ semantic understanding.Other approaches incorporate language information such as reviews, but the cited passage notes that prior models are also limited to small models.
  • LMs for Recommendation: Recent LLM-based recommendation work uses GPT3.5 interaction capabilities and In-context Learning, often linking ChatGPT with traditional models such as MF and LightGCN.
  • Sequential Recommendation: Sequential recommendation infers a user’s next interaction from historical interaction sequences, using methods including Markov chains, RNNs, CNNs, and attention.

5 CONCLUSION

The paper proposes TALLRec to align LLMs with recommendation through two tuning stages. Experiments show improved recommendation performance over traditional models and strong cross-domain generalization.

  • 5 CONCLUSION: TALLRec aligns LLMs with recommendation tasks through alpaca tuning and rec-tuning.
  • 5 CONCLUSION: Tuned LLMs outperform traditional recommendation models in the reported experiments.
  • 5 CONCLUSION: The tuned LLMs exhibit strong cross-domain generalization abilities.
Loading 2305.00447v3…