TL;DR
This paper introduces an uncertainty-aware multi-task learning framework for explainable recommendation systems that pairs Matrix Factorization with GPT-2. By using continuous user and item ID vectors as "soft prompts" and dynamically balancing rating prediction and text generation losses via homoskedastic uncertainty, the model generates highly diverse and feature-rich explanations without sacrificing language quality.
What Problem Does This Paper Address?
An effective recommendation system (RS) shouldn't just tell you what item to choose; it should explain why it fits your preferences. While Large Language Models (LLMs) are excellent at generating natural language, fully fine-tuning them for recommendation tasks is computationally expensive and impractical for many real-world applications.
To bypass this, researchers use "prompt learning." However, existing methods often convert user and item IDs into discrete text prompts (like a list of keywords), which risks losing the implicit collaborative filtering information embedded within the IDs themselves. Furthermore, combining recommendation (rating prediction) and explanation generation into a single multi-task framework typically requires tedious, manual tuning of loss function weights.
The authors tackle two main challenges:
- How to feed raw user/item ID information into an LLM without losing latent feature information.
- How to automatically and dynamically balance the trade-off between recommendation accuracy and explanation quality during training.
Methods
The authors propose a multi-task learning framework that optimizes both recommendation and explanation generation simultaneously.
Key components include:
- Continuous Prompts: Instead of translating user and item IDs into human-readable text, the IDs are treated as unique tokens and mapped directly to continuous vector embeddings. These embeddings act as "soft prompts" prepended to the explanation text sequence for GPT-2.
- Multi-Task Architecture: The model uses Matrix Factorization (MF) to predict user ratings based on the dot product of user and item embeddings. Concurrently, these same embeddings guide a frozen or lightly trained GPT-2 model to generate the corresponding explanation sentence by sentence.
- Uncertainty-Aware Loss Balancing: Rather than manually tuning the weights between the rating prediction loss ($L_R$) and the explanation generation loss ($L_S$), the authors adopt a homoskedastic uncertainty approach. They introduce a modified regularization term, $\log(1 + \lambda_t^2)$, which guarantees that the task weights ($\lambda$) remain positive during stochastic gradient descent, preventing negative loss calculations.
Datasets
The model was evaluated on three standard, publicly available datasets that contain user IDs, item IDs, 1-5 star ratings, and textual reviews:
- Yelp (Restaurant reviews)
- TripAdvisor (Hotel reviews)
- Amazon (Movies and TV reviews)
Each ground-truth explanation was filtered to ensure it contained at least one explicit item feature (e.g., "subway station" or "gym"), ensuring high-quality evaluation benchmarks.
Key Insights and Ideas
- IDs as Vectors Preserve Latent Context: Representing users and items as continuous vectors allows the LLM to leverage collaborative filtering signals. Translating an ID into discrete words (e.g., mapping a restaurant ID to just "bathroom, subway, gym") is lossy and irreversible; continuous prompts preserve the unique identity and latent features of the item.
- Dynamic Weighting Prevents Task Dominance: In multi-task setups, one loss function often dominates the gradient updates, degrading the performance of the secondary task. Automatically adjusting weights based on homoskedastic uncertainty allows the model to seamlessly balance numerical rating accuracy with linguistic creativity.
- Data Density Boosts LLM Explanations: The framework performed exceptionally well on the Amazon dataset. Because Amazon provided a higher density of ratings, the Matrix Factorization component learned superior user-item alignments, which directly translated into more accurate and context-aware text generation from the LLM.
Key Results
The authors evaluated their model against four state-of-the-art baselines (Attn2Seq, NRT, PETER, and PEPLER) using both explainability metrics—Unique Sentence Ratio (USR), Feature Coverage Ratio (FCR), and Feature Diversity (DIV)—and textual quality metrics (BLEU and ROUGE).
- Superior Explainability: The proposed method consistently achieved the best performance in explainability across all three datasets. Notably, on the TripAdvisor dataset, the Unique Sentence Ratio (USR) surged to 0.57 (compared to PEPLER's 0.21), and the Feature Coverage Ratio (FCR) reached 0.50 (compared to PEPLER's 0.21).
- Stable Textual Quality: While significantly boosting the diversity and feature coverage of the explanations, the model maintained highly competitive BLEU and ROUGE scores, proving that the text remains natural and readable.
Limitations and Future Work
While the model shows strong performance, the authors note a few limitations:
- Simplicity of the RS Module: The recommendation component relies on standard Matrix Factorization. Replacing this with more advanced deep recommendation architectures could further improve rating accuracy.
- Sensitivity to Dataset Size: There was a slight performance degradation in textual quality when dealing with the smallest dataset (TripAdvisor).
For future work, the authors plan to investigate a more generic recommendation framework capable of handling highly sparse datasets with limited training samples.
Summary updated