Source-linked AI summary

Personalized Prompt Learning for Explainable Recommendation

Lei Li, Yongfeng Zhang, Li Chen

arXiv:2202.07371v2cs.IRcs.AIcs.CLcs.LG

TL;DR

Explainable recommendation needs understandable natural-language justifications, but user and item IDs do not naturally fit the word-based space of pre-trained language models. PEPLER uses discrete word prompts or continuous ID-vector prompts, with two training strategies for the latter, and consistently outperforms strong baselines across three datasets.

  • Problem

    Natural-language explanation generation has mostly used recurrent networks, while effectively incorporating recommender-system IDs into pre-trained language models remains unresolved.

  • Method

    PEPLER uses item-feature words as discrete prompts or directly inputs user and item ID vectors as continuous prompts, applying sequential tuning and recommendation regularization.

  • Results

    PEPLER consistently outperforms strong LSTM, GRU, Transformer, and BERT baselines on text quality and explainability across three explainable-recommendation datasets.

  • Takeaways & Limitations

    Prompt learning can exploit pre-trained language models for personalized recommendation explanations while evaluating both textual quality and item-feature explainability.

  • Takeaways & Limitations

    On the small TripAdvisor dataset, PEPLER may underfit because training samples are limited, although it outperforms state-of-the-art baselines on the larger Yelp dataset.

Abstract

from arXiv · show

Providing user-understandable explanations to justify recommendations could help users better understand the recommended items, increase the system's ease of use, and gain users' trust. A typical approach to realize it is natural language generation. However, previous works mostly adopt recurrent neural networks to meet the ends, leaving the potentially more effective pre-trained Transformer models under-explored. In fact, user and item IDs, as important identifiers in recommender systems, are inherently in different semantic space as words that pre-trained models were already trained on. Thus, how to effectively fuse IDs into such models becomes a critical issue. Inspired by recent advancement in prompt learning, we come up with two solutions: find alternative words to represent IDs (called discrete prompt learning), and directly input ID vectors to a pre-trained model (termed continuous prompt learning). In the latter case, ID vectors are randomly initialized but the model is trained in advance on large corpora, so they are actually in different learning stages. To bridge the gap, we further propose two training strategies: sequential tuning and recommendation as regularization. Extensive experiments show that our continuous prompt learning approach equipped with the training strategies consistently outperforms strong baselines on three datasets of explainable recommendation.

1 INTRODUCTION

Explainable recommendation uses natural-language explanations to help users understand recommendations, while integrating recommender-system IDs into powerful pre-trained language models remains challenging. PEPLER addresses this with discrete and continuous prompt learning, plus training strategies for continuous prompts, and reports consistently strong performance on three datasets.

  • Natural-language explanations can help users understand recommendations, decide faster, use systems more easily, and trust them more.
  • Pre-trained language models remain underused for explanation generation because user and item IDs occupy a different semantic space from words.
  • Prompt learning adapts pre-trained models to tasks without modifying their structure, motivating prompts for recommendation explanation generation.
  • PEPLER represents IDs through either domain-specific words in discrete prompts or ID vectors in continuous prompts.
  • Sequential tuning and recommendation as regularization address the mismatch between randomly initialized ID vectors and an already-trained pre-trained model.
  • PEPLER consistently achieves the best text-quality and explainability performance against strong LSTM, GRU, Transformer, and BERT baselines on three datasets.

2 RELATED WORK

Related work covers explainable recommendation, Transformer-based language modeling, and personalized natural-language generation. PEPLER extends text-based personalization by investigating continuous ID-vector prompts in pre-trained models.

  • Explainable-recommendation research studies how people perceive explanations and how algorithms generate them, using templates, item features, ranked text, and images.
  • Transformers evolved from encoder-decoder translation models to effective architectures with reduced parameter counts and broad language-understanding applications.
  • Personalized natural-language generation commonly encodes user and item IDs into context vectors that recurrent networks decode into word sequences.
  • Prior Transformer and pre-trained approaches replace IDs with text segments, whereas PEPLER additionally investigates continuous prompts to retain more ID information.

3 METHODOLOGY

The methodology formulates explanation generation for user–item pairs with Transformer-based language models and develops discrete and continuous prompt approaches. It also introduces sequential tuning and recommendation-based regularization to address continuous prompts’ mismatch with pretrained model parameters.

  • Task formulation: The task generates a natural-language explanation for a user–item pair using only the user and item as input.The approach is compatible with any recommendation model.
  • Prompt learning: The method treats a discrete prompt as a word sequence and a continuous prompt as a vector sequence, such as user and item embeddings.Item features serve as discrete prompts, while ID vectors serve as continuous prompts.
  • Transformer and language modeling: Autoregressive, left-to-right masking is suited to explanation generation because bidirectional masking exposes future tokens during prediction.The Transformer uses an attention mask to control which tokens can attend to one another.
  • Discrete prompt learning: PEPLER-D represents IDs with domain-specific item features, using features associated with the target user and item as prompt words.The discrete prompt is fixed-size to include as many informative item features as possible.
  • Continuous prompt learning: PEPLER directly uses user and item ID vectors as continuous prompts instead of adding potentially millions or billions of IDs to the vocabulary.The ID vectors are treated as additional token types rather than ordinary vocabulary words.
  • Training strategies: Sequential tuning first optimizes randomly initialized prompt parameters with the language model frozen, then fine-tunes both prompt and language-model parameters.Recommendation as regularization adds a rating-prediction task to help learn continuous prompts, using matrix factorization or a multilayer perceptron.

4 EXPERIMENTAL SETUP

The experiments evaluate explainable recommendation models on three review-derived datasets using text-quality and feature-oriented explainability metrics, alongside several language-model baselines.

  • Datasets: Three datasets from TripAdvisor, Amazon, and Yelp use 8:1:1 train-validation-test splits repeated five times.Records contain user and item IDs, ratings, review-derived explanations, and item features.
  • Evaluation Metrics: Generated explanations are evaluated with BLEU-1, BLEU-4, and ROUGE-1/2 precision, recall, and F1.BLEU is precision-oriented, whereas ROUGE is recall-oriented.
  • Evaluation Metrics: Feature Matching Ratio, Feature Coverage Ratio, and Feature Diversity measure whether explanations match, cover, and diversify item features.FMR checks ground-truth feature matching; FCR measures distinct feature coverage; DIV compares feature overlap across generated explanations.
  • Evaluation Metrics: Feature Diversity is interpreted oppositely from the other metrics: lower DIV is better, while higher values are better for the remaining metrics.The metric direction is explicitly specified for DIV and the other reported measures.
  • Compared Methods: Baselines include ACMLM, NRT, Att2Seq, and PETER, spanning BERT, GRU, LSTM, and small unpretrained Transformer architectures.The comparison also distinguishes methods that directly use IDs from those that map IDs onto item features.
  • Implementation: Models are trained on training data, tuned on validation data, and evaluated on testing data, with results averaged across five splits.PEPLER and PEPLER-D use GPT-2 as their pretrained backbone, while BPE and 20-token explanation lengths are applied for fair comparison.

5 RESULTS AND ANALYSIS

Experiments compare PEPLER and related explanation-generation methods across text quality, explainability, training strategies, regularization, qualitative outputs, attention fusion, and model size. PEPLER generally performs strongly, while results also reveal trade-offs involving recommendation accuracy, explainability, dataset size, and fine-tuning stability.

  • Quantitative comparison: PEPLER-D consistently and significantly outperforms ACMLM on BLEU and ROUGE across three datasets.ACMLM may produce diverse sentences and features, but its masked-token generation differs from conventional autoregressive generation.
  • Quantitative comparison: Directly ID-based Transformer methods improve text quality over feature-mapping methods, while PEPLER benefits from pre-trained linguistic knowledge.Recurrent NRT and Att2Seq are less competitive than PETER and PEPLER, and PETER does not outperform PEPLER.
  • Training strategies: PEPLER (MF) generally improves text quality over sequential tuning, whereas PEPLER (MLP) retains comparable text quality but often loses explainability.The authors attribute this difference to the additional parameters used by MLP for recommendation.
  • Dataset-specific observations: On TripAdvisor, Att2Seq achieves the largest ROUGE scores in two cases, partly because the dataset is small and the large PEPLER model may underfit.The authors contrast this with Yelp, whose approximately 1.3 million samples support PEPLER’s advantage over state-of-the-art baselines.
  • Effect of Sequential Tuning: Sequential tuning achieves its highest BLEU-4 score at learning rate 10^-3 and outperforms Prompt+LM Fine-tuning across the shown settings.At learning rate 10^-2, both strategies’ performance drops dramatically, while Fixed-LM Prompt Tuning remains relatively stable.
  • Recommendation as regularization: Increasing recommendation regularization creates a trade-off between explanation quality and recommendation accuracy for PEPLER (MF), while explainability declines for both MF and MLP.The authors therefore prioritize BLEU-4 when tuning the regularization coefficient and may use another recommendation model at deployment.

6 CONCLUSION

The work introduces prompt-learning approaches and training strategies for generating recommendation explanations with pre-trained language models. It also identifies bias and stereotype in generated explanations as an important direction for future investigation.

  • The paper proposes two prompt learning approaches to exploit pre-trained language models for recommendation explanation generation.
  • Two learning strategies are introduced to bridge the gap between continuous prompts and pre-trained models.
  • Extensive experiments evaluate the approaches using text quality and explainability metrics, demonstrating their effectiveness in generating high-quality explanations.
  • Future work will investigate whether generated explanations exhibit bias or stereotypes against certain user groups and how to mitigate them.
Loading 2202.07371v2…