Manuscript Offprint

arXiv:2610.07761

Contrastive Learning for Aspect Representation towards Explainable Recommendation

Emrul Hasan, Chen Ding

Emrul Hasan

Department of Computer Science

Toronto Metropolitan University

Toronto, Canada

elhasan@torontomu.ca

Chen Ding

Department of Computer Science

Toronto Metropolitan University

Toronto, Canada

cding@torontomu.ca

Abstract—In this work, we propose a novel recommendation model, CLARER (Contrastive Learning for Aspect Representation towards Explainable Recommendation) that integrates aspect features learned from textual reviews with rating information to improve the accuracy and explainability of recommendations. Our proposed framework learns user and item representations by combining rating-based features and aspect-based features from reviews. Specifically, rating-based features are learned through a multi-layer perceptron (MLP) model, while aspect-specific review representations are learned using a transformer encoder to capture the semantic information and contrastive learning to better distinguish user preferences. To provide explanations, we train a transformer decoder, using the final representations of users and items from both rating and aspect-based features as context. Experimental results in three benchmark data sets demonstrate that our model achieves superior performance compared to baseline methods in both recommendation (accuracy) and explanation generation.

Index Terms—Aspect-aware, Feature representation, Explainability, Contrastive Learning, Review-based Recommendation

I. INTRODUCTION

While recommendation systems are essential for delivering personalized suggestions in today's digital landscape, traditional approaches relying on latent features from past interactions often lack interpretability [1]-[5]. To enhance the credibility and user acceptance of the recommendation results, it is essential to provide clear justifications or explanations for the recommendations [6], [7]. Justifications can be expressed in several different forms, e.g., using a predefined template [8], [9], highlighting the important parts [10], generating short descriptions [11], [12]. Given the significance of explainable recommendations, this crucial area of research has received considerable attention in recent years [13]-[15].

One of the main challenges in explainable recommendation systems is to identify and incorporate more contextual information and fine-grained user preferences and opinions into personalization and explanation generation. Many existing approaches rely on user and item ID-based feature representation and use them as contextual information in the explanation generation process [12], [16], [17]. However, ID-based features exist in a semantic space different from that of natural language, leading to poor alignment between two different semantic spaces and limited personalization in explanation generation. Furthermore, due to the sparsity of historical rating data, ID-based features often fail to capture accurate representations of users and items [18]. As a result, incorporating only ID-based features into the recommendation model performs suboptimally both in rating prediction and in explanation generation.

To address these issues, previous research has attempted to map user and item IDs onto textual representations and integrate them into the decoding process for explanation generation [16]. Although this approach introduces a degree of personalization, it also increases the model complexity and suffers from inconsistencies in mapping ID-based features to natural language explanations. Consequently, there remains a need for a more effective approach that could directly integrate user preferences into the recommendation generation process while ensuring interpretability and coherence.

Another major challenge is the feature extraction from user reviews. Capturing fine-grained user preferences from historical interactions is crucial to improving recommendation performance. User-generated reviews provide the valuable information, but extracting meaningful features from textual data remains difficult due to its unstructured and noisy nature. Some recent approaches have employed external aspect extraction tools to pre-process textual data before incorporating them into the explanation generation model [19]. Although these methods have shown promise, they rely heavily on external tools, making them less adaptable across different domains. Thus, developing a self-contained feature extraction mechanism that effectively captures aspect-based user preferences remains an open challenge.

To overcome limitations of existing explainable recommendation methods, we propose CLARER (Contrastive Learning for Aspect Representation towards Explainable Recommendation), a novel framework that jointly integrates ID-based features with aspect-aware representations learned from user reviews. The key contribution of our work can be summarized as follows.

  1. We propose CLARER, a novel explainable recommendation framework that seamlessly integrates aspect-based representations with user-item latent factors, improving both rating prediction and explanation generation. To the best of our knowledge, CLARER is the first to combine ID-based features with aspect representations for both rating prediction and explanation generation (i.e., the decoder is initialized using the combined feature).

  2. We introduce a novel aspect representation learning technique that uses predefined domain-specific aspects and contrastive learning. We are the first to apply contrastive learning for aspect representation in explainable recommendation systems.

  3. We run experiments on three real-world datasets and the results show that our approach outperforms state-of-the-art baselines in both accuracy and explainability, with aspect-aware representations driving the performance gains.

References (43)

  • Neural collaborative filtering
  • Item-based collaborative filtering recommendation algorithms
  • Deep learning based recommender system: A survey and new perspectives
  • Joint deep modeling of users and items using reviews for recommendation
  • Multi-modal discrete collaborative filtering for efficient cold-start recommendation
  • Explainable recommendation: A survey and new perspectives
  • Explaining recommendations: Design and evaluation
  • Explicit factor models for explainable recommendation based on phrase-level sentiment analysis
  • Caesar: context-aware explanation based on supervised attention for service recommendations
  • Personalized fashion recommendation with visual explanations based on multimodal attention network: Towards visually explainable recommendation
  • Generate natural language explanations for recommendation (opens arXiv in a new tab)
  • Generate neural template explanations for recommendation
  • Aspect-enhanced explainable recommendation with multi-modal contrastive learning
  • Explainable recommendation via multi-task learning in opinionated text data
  • Jointly learning explainable rules for recommendation with knowledge graph
  • Neural rating regression with abstractive tips generation for recommendation
  • Learning to generate product reviews from attributes
  • Resolving data sparsity and cold start problem in collaborative filtering recommender system using linked open data
  • Synthesizing aspect-driven recommendation explanations from reviews
  • Interpretable convolutional neural networks with dual local and global attention for review rating prediction
  • Neural attentional rating regression with review-level explanations
  • Daml: Dual attention mutual learning between ratings and reviews for item recommendation
  • Asymmetrical hierarchical networks with attentive interactions for interpretable review-based recommendation
  • Leveraging ratings and reviews with gating mechanism for recommendation
  • Mutual self attention recommendation with gated fusion between ratings and reviews
  • Coevolutionary recommendation model: Mutual learning between ratings and reviews
  • Topicmf: Simultaneously exploiting ratings and reviews for recommendation
  • Learning the parts of objects by non-negative matrix factorization
  • Hidden factors and hidden topics: understanding rating dimensions with review text
  • Jointly modeling aspects, ratings and sentiments for movie recommendation (jmars)
  • Aspect-aware latent factor model: Rating prediction with ratings and reviews
  • Explaining recommendations based on feature sentiments in product reviews
  • Personalized prompt learning for explainable recommendation
  • Gavamoe: Gaussian-variational gated mixture of experts for explainable recommendation (opens arXiv in a new tab)
  • Contrastive representation learning: A framework and review
  • Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
  • Attention is all you need
  • Probabilistic matrix factorization
  • A review-aware graph contrastive learning framework for recommendation
  • Distillation from heterogeneous models for top-k recommendation
  • Personalized transformer for explainable recommendation (opens arXiv in a new tab)
  • Language models are unsupervised multitask learners
  • Multi-criteria rating and review based recommendation model