RDRec: Rationale Distillation for LLM-based Recommendation

Xinfeng Wang, Jin Cui, Yoshimi Suzuki, Fumiyo FukumotoACL 2024

TL;DR

This paper introduces RDRec, a novel recommendation system that leverages Large Language Models (LLMs) to distill "rationales" – the underlying user preferences and item attributes – from user reviews. By learning these explicit rationales, RDRec significantly improves both sequential and top-N recommendation performance, outperforming existing state-of-the-art methods.

What Problem Does This Paper Address?

Traditional recommender systems often struggle to capture the nuanced reasoning behind user-item interactions. While recent work has explored using LLMs for recommendations, many approaches treat user-item interactions as black boxes, failing to explicitly model the "why" behind a user liking an item. This can lead to recommendations that lack interpretability and may miss subtle user preferences or item characteristics. For instance, a user might prefer a game for its strategic depth, but a review mentioning "intrigue cards" could mislead a model into thinking the user is primarily interested in the cards themselves, rather than the strategic gameplay they enable. RDRec aims to bridge this gap by explicitly extracting and learning from these underlying rationales.

Methods

RDRec employs a two-stage approach:

  1. Interaction Rationale Distillation: This stage uses a powerful LLM (specifically Llama-2-7b) to distill user preferences and item attributes from user reviews. A prompt template is used to guide the LLM to generate two sentences explaining the user's preference and the item's attributes based on a given review. This process transforms a user-item interaction triplet (user ID, item ID, review) into a quadruplet (user ID, item ID, distilled user preference, distilled item attribute).
  2. Rationale-aware Recommendation: The core of this stage is based on the Prompt Distillation (POD) framework, which converts recommendation tasks into LLM-based text generation. RDRec extends POD by incorporating the distilled rationales as additional input. Specifically, it trains a smaller model (T5-small) to generate recommendations by conditioning on user/item IDs, prompt vectors, and the distilled user preferences and item attributes. This allows the model to learn from explicit rationales, leading to more informed recommendations. The model is trained using a log-likelihood loss function across four tasks: explanation generation, rationale generation, sequential recommendation, and top-N recommendation.

Datasets

The authors evaluated RDRec on three public Amazon datasets: Sports & Outdoors, Beauty, and Toys & Games. Each dataset contains user IDs, item IDs, ratings, textual reviews, and timestamps. The datasets were split into training, validation, and test sets with an 8:1:1 ratio.

Key Insights and Ideas

  • Explicit Rationales Matter: The core insight is that explicitly modeling user preferences and item attributes (rationales) derived from reviews significantly boosts recommendation performance, especially for top-N recommendations where identifying unknown items is crucial.
  • LLMs as Rationale Extractors: LLMs, even with limited input like short reviews, can extract objective item attributes and user preferences, moving beyond simple sentiment analysis.
  • Distillation for Efficiency: By distilling the knowledge from a large LLM into a smaller, specialized model (RDRec), the system achieves state-of-the-art performance while maintaining computational efficiency for inference.
  • Top-N vs. Sequential: The study found that explicit rationales are more beneficial for top-N recommendations (predicting new items) than for sequential recommendations (predicting the next item in a sequence), which rely more on temporal patterns.
  • Whole-Word Embedding for IDs: To handle the tokenization of user and item IDs by LLMs, the paper utilizes whole-word embedding, ensuring that ID sequences are treated as distinct units.

Key Results

  • State-of-the-Art Performance: RDRec consistently outperformed several strong baselines (including POD and RSL) on all three datasets for both sequential and top-N recommendations.
  • Significant Improvements: Improvements ranged from 0.5% to 9.8% in hit rate (HR@k) and normalized discounted cumulative gain (NDCG@k) for sequential recommendations, and a substantial 12.1% to 42.2% for top-N recommendations.
  • Ablation Study: An ablation study confirmed that distilling both user preferences and item attributes is beneficial, with item attributes being particularly effective for top-N recommendations and user preferences for sequential ones.

Limitations and Future Work

  • Hallucination Issue: The paper acknowledges that LLMs can still produce hallucinations, especially when dealing with very short reviews. This remains an open challenge.
  • Unfaithful Reasoning: RDRec can sometimes provide correct recommendations but with explanations that don't fully align with the user's original review, suggesting a prioritization of prediction over perfect rationale alignment.
  • Sequential Recommendation Errors: RDRec may sometimes prioritize older interactions over recent ones in sequential recommendations, potentially due to the Transformer's strength in capturing long-term dependencies.
  • Future Directions: The authors suggest exploring better prompts for sequential recommendations, enhancing explanation generation, and investigating methods to mitigate LLM hallucinations. They also propose incorporating popularity-based interaction graphs to help models identify popular items more effectively.

Summary updated

BibTeX
@inproceedings{wang2024rdrec,
  author = {Xinfeng Wang and Jin Cui and Yoshimi Suzuki and Fumiyo Fukumoto},
  title = {{RDRec: Rationale Distillation for LLM-based Recommendation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
}
Figure