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 · DOI

TL;DR

TALLRec is a lightweight framework that aligns Large Language Models (LLMs) with recommendation tasks through a two-stage instruction tuning process. By using Low-Rank Adaptation (LoRA), it enables high-performance recommendation on consumer-grade hardware (like a single RTX 3090) with as few as 64 training samples, significantly outperforming both zero-shot LLMs and traditional recommendation models.

What Problem Does This Paper Address?

While Large Language Models (LLMs) like ChatGPT excel at general language tasks, they are surprisingly poor at recommendation out-of-the-box. The authors identify a "recommendation gap" caused by two main factors:

  1. Task Disparity: The gap between general language processing (predicting the next token) and recommendation (predicting user preference) is vast.
  2. Data Scarcity: Recommendation-oriented corpora are underrepresented in the massive datasets used to pre-train LLMs.

As shown in Figure 1, when using standard In-context Learning (ICL), models like ChatGPT often refuse to answer or exhibit extreme bias, predicting "like" for almost every item. Even when they do answer, their performance is often no better than random guessing (AUC ≈ 0.5).

Figure 1: Illustration of LLMs for the recommendations. Given users’ interaction history, LLMs predict whether a user will like a new item through In-context Learning. However, the representative LLMs, e.g., ChatGPT, either refuse to answer or always give positive predictions (likes) on Movie and Book recommendation tasks. If we ignore the refused answers and calculate AUC on the remaining samples, we find that LLMs perform similarly with random guessing (AUC=0.5). Refer to Section 3 for more experimental details.

Methods

The authors propose TALLRec (Tuning for Aligning LLMs with Recommendation), a framework designed to build a "Large Recommendation Language Model" (LRLM). The framework consists of two key tuning stages:

  1. Alpaca Tuning: The model first undergoes general instruction tuning using the Alpaca dataset. This enhances the model's ability to follow diverse human instructions and improves its generalization to new tasks.
  2. Rec-Tuning: The model is then tuned specifically for recommendation. The authors formulate recommendation as a binary classification task: given a user's historical "liked" and "disliked" items, the model must predict if the user will enjoy a new target item with a "Yes" or "No" response.

To make this process efficient, TALLRec utilizes LoRA (Low-Rank Adaptation). Instead of updating all billions of parameters in the backbone (LLaMA-7B), LoRA introduces and trains a tiny fraction of additional parameters (rank decomposition matrices). This allows the entire framework to run on a single NVIDIA RTX 3090 GPU.

The TALLRec Framework uses a two-stage tuning process with LoRA for efficiency.

Datasets

The framework was evaluated on two classic recommendation benchmarks, processed into instruction-following formats:

  • MovieLens100K (Movie): User ratings on movies, including textual descriptions like titles and directors.
  • BookCrossing (Book): User ratings on books, including titles and authors.

The authors specifically focused on a few-shot setting, sampling as few as 16, 64, or 256 interactions for training to see how quickly the model could acquire recommendation capabilities.

Key Insights and Ideas

  • Tuning is Non-Negotiable: In-context learning (providing examples in the prompt) is insufficient for recommendation. Explicit instruction tuning is required to "unlock" the LLM's latent knowledge for this specific domain.
  • Generalization Matters: The "Alpaca Tuning" stage is crucial. It provides a foundation of instruction-following that helps the model generalize better, especially when recommendation-specific data is extremely limited (e.g., <128 samples).
  • Cross-Domain Mastery: One of the most striking findings is that a model tuned on movie data performs remarkably well on book recommendations without further tuning. This suggests that the model learns the logic of recommendation rather than just memorizing item correlations.
  • Efficiency is Possible: You don't need a supercomputer to build a powerful recommender. By combining LLaMA-7B with LoRA, TALLRec brings LLM-based recommendation to consumer-grade hardware.

Key Results

TALLRec significantly outperformed both traditional sequential recommendation models (like GRU4Rec and SASRec) and much larger LLMs (like GPT-3.5) in few-shot scenarios:

  • Accuracy Boost: On the Movie dataset with 256 samples, TALLRec achieved an AUC of 71.98, compared to ~54 for traditional models and ~50 (random) for zero-shot ChatGPT.
  • Sample Efficiency: Even with only 64 samples, TALLRec achieved an AUC of 67.48 on movies, while traditional models struggled to break 52.
  • Robustness: The model showed consistent improvements across both movie and book domains, proving that the tuning framework is robust to different types of item content.

Limitations and Future Work

  • Binary Task Limitation: Currently, TALLRec is framed as a binary "Yes/No" classification. In real-world systems, models often need to rank thousands of candidates, which this framework doesn't address directly.
  • Candidate Generation: The authors note that LLMs are currently best used for re-ranking. They still rely on traditional models to filter down the initial pool of items.
  • Scaling Up: Future work includes exploring how to activate the recommendation abilities of even larger models and how to handle multiple diverse recommendation tasks (e.g., ranking, explanation, and retrieval) simultaneously.

Summary updated

BibTeX
@inproceedings{bao2023tallrec,
  author = {Keqin Bao and Jizhi Zhang and Yang Zhang and Wenjie Wang and Fuli Feng and Xiangnan He},
  title = {{TALLRec: An Effective and Efficient Tuning Framework to Align Large Language Model with Recommendation}},
  booktitle = {RecSys},
  year = {2023},
  doi = {10.1145/3604915.3608857},
}
Figure