Source-linked AI summary

XRec: Large Language Models for Explainable Recommendation

Qiyao Ma, Xubin Ren, Chao Huang

arXiv:2406.02377v2cs.IRcs.AIcs.CL

TL;DR

Recommender systems help users navigate information overload, but collaborative filtering models often do not explain why recommended items match user behavior. XRec combines collaborative signals with LLMs to generate explanations, and the authors report effective, superior performance in producing comprehensive and meaningful explanations.

  • Problem

    Collaborative filtering models often provide accurate recommendations without explaining the reasons behind user–item interactions, limiting transparency into recommendation decisions.

    Source: §1 · p. 1
  • Method

    XRec is a model-agnostic framework that integrates collaborative signals into LLMs using a lightweight collaborative adaptor to generate explanations for user behavior.

    Source: §1 · p. 2
  • Results

    The authors report that XRec effectively generates comprehensive and meaningful explanations with superior performance in their experiments.

    Source: §1 · p. 2
  • Takeaways & Limitations

    XRec uses collaborative relationships to produce comprehensive, insightful explanations for recommendation outputs.

    Source: §6 · p. 8

    XRec is limited to textual and graph-based data and does not currently incorporate visual inputs such as images or videos.

    Source: §7 · p. 9

Abstract

from arXiv · show

Recommender systems help users navigate information overload by providing personalized recommendations aligned with their preferences. Collaborative Filtering (CF) is a widely adopted approach, but while advanced techniques like graph neural networks (GNNs) and self-supervised learning (SSL) have enhanced CF models for better user representations, they often lack the ability to provide explanations for the recommended items. Explainable recommendations aim to address this gap by offering transparency and insights into the recommendation decision-making process, enhancing users' understanding. This work leverages the language capabilities of Large Language Models (LLMs) to push the boundaries of explainable recommender systems. We introduce a model-agnostic framework called XRec, which enables LLMs to provide comprehensive explanations for user behaviors in recommender systems. By integrating collaborative signals and designing a lightweight collaborative adaptor, the framework empowers LLMs to understand complex patterns in user-item interactions and gain a deeper understanding of user preferences. Our extensive experiments demonstrate the effectiveness of XRec, showcasing its ability to generate comprehensive and meaningful explanations that outperform baseline approaches in explainable recommender systems. We open-source our model implementation at https://github.com/HKUDS/XRec.

1 Introduction

Recommender systems address information overload with personalized recommendations, but accurate collaborative filtering models often leave the reasons for user–item interactions unexplained. XRec integrates collaborative signals with LLMs to generate explanations for user behavior.

1 Introduction

  • Recommender systems aim to reduce the burden of information overload by filtering options into recommendations aligned with users’ preferences and interests.The passage frames online content abundance as the motivation for personalized recommendation.Source: §1 · p. 1
  • Collaborative filtering is widely used because it assumes users with similar past preferences will have similar future preferences; GNNs and SSL have also advanced collaborative filtering.The introduction describes GNNs as capturing complex relational information and SSL as addressing data sparsity.Source: §1 · p. 1
  • Explainable recommendations address the gap in understanding why user–item interactions occur, offering transparency that can enhance users’ understanding and trust.The paper contrasts this need with collaborative filtering models that excel at recommendation accuracy.Source: §1 · p. 1
  • Prior explanation-generation approaches use attention, RNNs, Transformers, or GPT-2, but limited explanation data can hinder quality, while ID-based methods struggle to generalize to unseen users and items.The paper identifies zero-shot recommendation as a particular challenge for ID-based methods.Source: §1 · p. 2
  • XRec is a model-agnostic collaborative instruction-tuning framework that integrates collaborative signals and a lightweight adaptor to help LLMs explain user behavior.The adaptor bridges collaborative-representation and language-semantic spaces with behavior-aware signals.Source: §1 · p. 2

2 Preliminaries

The preliminaries frame explainable recommendation as generating textual rationales for user–item interactions. They also outline graph collaborative filtering, where neighborhood aggregation builds node embeddings used to predict interactions.

2.1 Explainable Recommendation

  • For each user–item interaction, explainable recommendation seeks a clear textual rationale for the recommendation.The stated goal is to make the reasoning behind each recommendation understandable.Source: §2.1 · p. 2
  • User profiles incorporate items the user has interacted with, while item profiles use item prompts and descriptions as textual information.The user-profile prompt is denoted P_U, and the interacted-item set is denoted N_u.Source: §2.1 · p. 2

2.2 Graph Collaborative Filtering

  • Graph collaborative filtering uses neighborhood aggregation across GNN layers to form node embeddings, concatenating the resulting L + 1 embeddings into a final representation.N_u denotes a node’s neighborhood, and AGG(·) denotes the aggregation function.Source: §2.2 · pp. 2–3
  • The user and item embeddings are used to predict interactions from historical behavior, with the inner-product score representing the predicted interaction likelihood between 0 and 1.The score is defined for users and items using their embeddings.Source: §2.2 · p. 3

3 Methodology

XRec unifies graph collaborative filtering and large language models to generate explanations of user-item interactions and clarify factors influencing user behavior.

3.1 Collaborative Relation Tokenizer

  • GNN message passing encodes high-order user-item relations into latent embeddings, with BPR feedback and regularization used to optimize the tokenizer.The final user and item embeddings average their layer embeddings.Source: §3.1 · p. 3

3.2 Collaborative Instruction Tuning for Large Language Models (LLMs)

  • Collaborative instruction tuning aligns behavior-level information with language-level semantics so LLMs can incorporate user preferences.A lightweight adapter aligns the distinct collaborative and textual representation spaces.Source: §3.2 · p. 3, §3.2.1 · p. 3

3.2.1 Collaborative Information Adapter

  • A Mixture of Experts adapter uses linear-layer experts and a learnable gating router to adapt collaborative tokens to LLM language-token representations.The router adaptively combines representations from different experts.Source: §3.2.1 · p. 4

3.2.2 Unifying CF with LLM

  • Injecting adapted collaborative embeddings into every LLM layer preserves access to collaborative context and supports gradient flow to the MoE module.This addresses the potential dilution of single-token embeddings as prompt length increases.Source: §3.2.2 · p. 4
  • The structured prompt replaces user and item token embeddings with their adapted collaborative embeddings before passing the sequence to the LLM.The prompt reserves special tokens for user, item, and explanation positions.Source: §3.2.2 · pp. 4–5

3.2.3 Ground Truth Explanation Generation

  • For ground-truth explanations, LLMs distill explicit user intentions from raw reviews, with each user-item review serving as the review input.The approach is proposed to address reviews' subjective or implicit expression of intent.Source: §3.2.3 · p. 5

4 Evaluation

XRec is evaluated for explanation quality and stability against baselines, through component ablations, and across data-sparsity and zero-shot settings. The reported results favor the full model and show robust performance for infrequent and unseen users.

4.1 Experimental Settings

  • The evaluation uses Amazon-books, Yelp, and Google-reviews datasets, semantic explanation metrics, and baseline systems including Att2Seq, NRT, PETER, and PEPLER.The setup also compares an XRec variant without user and item profiles; standard deviations are used to assess stability.Source: §4.1 · pp. 5–6

4.2 Performance Comparison

  • XRec consistently outperforms the baselines, including when user and item profiles are removed.The authors attribute this to capturing collaborative information and aligning behavior-level information with text-level semantics.Source: §4.2 · p. 6, Table 1 · p. 6
  • XRec’s Unique Sentence Ratio (USR) is nearly 1, indicating unique explanations for distinct user-item interactions.The evaluation defines USR as the ratio of unique to total generated sentences.Source: §4.1 · p. 5, §4.2 · pp. 6–7
  • The authors describe XRec as exploiting synergistic strengths across domains to enhance learning efficacy and overall performance.This statement accompanies the reported performance comparison.Source: §4.2 · p. 7

4.3 Ablation Study

  • The ablation varies user/item profiles and collaborative-information injection, evaluating GPTScore and BERTScore and their standard deviations on Amazon-books and Google-reviews.The four variants are the full model, each component removed separately, and both components removed together.Source: §4.3 · p. 7
  • The complete model outperforms ablated variants in explainability and stability; removing profiles significantly reduces stability, while removing injection lowers scores.The variant without either profiles or injection has the lowest scores; Figure 3 summarizes the ablation comparison.Source: §4.3 · p. 7, Figure 3 · p. 7

4.4 Model Robustness against Data Sparsity

  • The data-sparsity evaluation partitions test users into five training-frequency subsets and adds a zero-shot set of users unseen during training.This design examines performance across user familiarity, including the cold-start setting.Source: §4.4 · p. 7
  • In zero-shot testing, XRec outperforms baselines and performs comparably to the tst1–tst5 subsets despite no prior user data.The evaluation also reports robust performance across all five frequency-based subsets, with noticeably better results as user frequency decreases.Source: §4.4 · p. 7

5 Related Work

Prior explainable recommenders generate textual explanations, but ID-based approaches face generalization challenges in sparse and zero-shot settings. XRec draws on GNN collaborative representations and instruction tuning to align user preferences with language semantics.

5.1 Explainable Recommendation

  • Existing explainable-recommendation methods use attention, RNNs, Transformers, or GPT2, while ID-based approaches face generalization challenges in sparse and zero-shot settings.The passage also identifies scarce explanation data as a challenge for producing high-quality, comprehensive explanations.Source: §5.1 · p. 8

5.2 GNNs for Recommendation

  • GNNs capture high-order collaborative relationships, and SSL has been integrated with graph-based collaborative filtering to address data sparsity (Yang et al., 2023a,b; Yao et al., 2021).LightGCN and Star-GCN use iterative message passing to model collaborative relationships (He et al., 2020; Zhang et al., 2019a).Source: §5.2 · p. 8
  • XRec uses GNNs as collaborative relation encoders and collaborative instruction tuning to align behavior-level preferences with language semantics.The framework is described as enabling comprehensive textual explanations corresponding to user interaction behaviors.Source: §5.2 · p. 8

6 Conclusion

XRec combines graph-based collaborative filtering with LLMs to generate explanations for recommendation outputs. The study highlights its collaborative information adaptor and reports explainability and zero-shot generalization advantages.

6 Conclusion

  • XRec integrates graph-based collaborative filtering with LLMs to generate comprehensive explanations for recommendation outputs.The framework leverages collaborative relationships in the user-item graph to capture high-order dependencies underlying preferences and item associations.Source: §6 · p. 8
  • A specialized collaborative information adaptor connects collaborative signals with the textual semantics encoded within the LLM.Source: §6 · p. 8
  • Experiments report enhanced explainability and robustness in zero-shot scenarios, with generalization across unseen users and items.Source: §6 · p. 8

7 Limitation

XRec is limited to textual and graph-based data, excluding visual inputs such as images and videos. The authors identify multimodal processing as a direction for future work.

7 Limitation

  • XRec is constrained to textual and graph-based data and excludes visual inputs such as images and videos.The authors suggest exploring multimodal data processing in future work.Source: §7 · p. 9
  • Images and videos may provide contextual cues about aesthetic preferences, cultural trends, emotional responses, and visual patterns relevant to personalization.Source: §7 · p. 9

A Appendix

The supplementary materials examine how ground-truth explanations and detailed user/item profiles are developed.

A Appendix

  • Supplementary materials explore the methods used to craft ground-truth explanations and develop detailed user/item profiles.Source: A Appendix · p. 10

A.1 Generating Ground Truth Explanations

For Yelp, the ground-truth explanation process uses uniform instructions across user-item interactions. The prompt uses only the user's review text to elicit the interaction's implicit intentions.

A.1 Generating Ground Truth Explanations

  • The Yelp ground-truth explanation process uses uniform language-model instructions across user-item interactions.Source: §A.1 · p. 10
  • The prompt contains only the user's review text, omitting additional user or item data to focus on implicit intentions behind the interaction.Source: §A.1 · p. 10

A.2 Item Profile Generation

On Yelp, item profiles are generated from business metadata and user reviews to describe the kinds of users who favor each business. These profiles capture characteristics of users drawn to the item.

A.2 Item Profile Generation

  • Yelp item profiles use business name, location, category, and user reviews as inputs.The process is illustrated as item profile generation on the Yelp dataset.Source: §A.2 · p. 10
  • The LLM processes this information to summarize key characteristics of users inclined toward the item.The profiles aim to help the model understand which types of users favor a business.Source: §A.2 · p. 10
  • The case-study profiles include preferences of users drawn to beer-related businesses.Source: §A.2 · p. 10

A.3 User Profile Generation

Because users often have little metadata, XRec derives user profiles from their historical interactions and profiles of previously visited items. This produces descriptions of the item types users prefer for personalized recommendations.

A.3 User Profile Generation

  • Users often lack extensive metadata, creating a challenge for deducing their preferences.Source: §A.3 · p. 10
  • To infer preferences, the LLM analyzes a user’s historical interactions using item descriptions from previously generated profiles.Those descriptions are refined to better characterize the items and include information such as item titles and reviews.Source: §A.3 · p. 10
  • The resulting profiles identify the specific types of items a user prefers and support personalized recommendations.Source: §A.3 · p. 10
Loading 2406.02377v2…