[Paper Review] Personalized Transformer for Explainable Recommendation
This paper proposes PETER, a personalized Transformer model that integrates user and item IDs into natural language generation for explainable recommendation. By introducing a context prediction task that maps IDs to target words, PETER enables the Transformer to generate user- and item-specific explanations, outperforming fine-tuned BERT in both generation quality and training efficiency on large-scale datasets.
Personalization of natural language generation plays a vital role in a large spectrum of tasks, such as explainable recommendation, review summarization and dialog systems. In these tasks, user and item IDs are important identifiers for personalization. Transformer, which is demonstrated with strong language modeling capability, however, is not personalized and fails to make use of the user and item IDs since the ID tokens are not even in the same semantic space as the words. To address this problem, we present a PErsonalized Transformer for Explainable Recommendation (PETER), on which we design a simple and effective learning objective that utilizes the IDs to predict the words in the target explanation, so as to endow the IDs with linguistic meanings and to achieve personalized Transformer. Besides generating explanations, PETER can also make recommendations, which makes it a unified model for the whole recommendation-explanation pipeline. Extensive experiments show that our small unpretrained model outperforms fine-tuned BERT on the generation task, in terms of both effectiveness and efficiency, which highlights the importance and the nice utility of our design.
Motivation & Objective
- To address the challenge of personalizing natural language generation in Transformers, where user and item IDs are not semantically aligned with words.
- To enable a unified model that performs both recommendation and explanation generation using the same architecture.
- To design a learning objective that endows user and item IDs with linguistic meaning, making them effective for generation.
- To improve explainability by incorporating item features into the generation process, enabling targeted explanations.
- To demonstrate that a small, unpretrained Transformer can outperform larger, fine-tuned models like BERT in generation tasks.
Proposed method
- Introduce a context prediction task that uses user and item IDs to predict words in the explanation sequence, effectively mapping IDs to semantic representations.
- Train the model with a multi-task objective combining explanation generation and context prediction, sharing the same Transformer encoder-decoder architecture.
- Use a lightweight, two-layer unpretrained Transformer to reduce computational cost while maintaining strong performance.
- Incorporate item features into the input to guide explanation generation, enabling targeted explanations (e.g., about price or style).
- Apply a shared representation learning mechanism where user and item IDs are embedded and attended over, allowing them to influence attention during decoding.
- Use left-to-right masking in the recommendation head to prevent information leakage, ensuring the model learns from context rather than future tokens.
Experimental results
Research questions
- RQ1Can a standard Transformer be effectively personalized for natural language generation using user and item IDs?
- RQ2Does introducing a context prediction task enable IDs to contribute meaningfully to explanation generation?
- RQ3Can a unified model jointly perform recommendation and explanation generation with superior performance to fine-tuned BERT?
- RQ4How does incorporating item features affect the quality and relevance of generated explanations?
- RQ5Can a small, unpretrained Transformer outperform larger, fine-tuned models in explanation generation tasks?
Key findings
- PETER outperforms fine-tuned BERT on all major text generation metrics (BLEU, ROUGE, and explainability-focused metrics) across multiple datasets.
- The model achieves a 2.3-minute training time per epoch on the TripAdvisor dataset, significantly faster than ACMLM, despite being unpretrained.
- Disabling the context prediction task causes a dramatic drop in both explanation quality and explainability, with the unique sentence ratio (USR) approaching that of standard Transformer.
- PETER+ with feature-guided generation produces more accurate and semantically relevant explanations, such as focusing on 'rooms' instead of 'pool' in the correct context.
- On the large Yelp dataset (1.3M records), PETER performs comparably to strong baselines like SVD++, NRT, and NETE in recommendation performance.
- The ablation study confirms that the context prediction task is essential for personalization, as its removal leads to identical explanations across different user-item pairs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.