Skip to main content
QUICK REVIEW

[Paper Review] Spatio-Temporal Contrastive Learning Enhanced GNNs for Session-based Recommendation

Zhongwei Wan, Xin Liu|arXiv (Cornell University)|Sep 23, 2022
Recommender Systems and Techniques4 citations
TL;DR

This paper proposes RESTC, a novel graph neural network framework for session-based recommendation that integrates spatio-temporal contrastive learning to mitigate temporal information loss in GNNs. By leveraging cross-view contrastive learning between spatial and temporal views and incorporating a global collaborative filtering graph, RESTC significantly improves session representation learning and achieves state-of-the-art performance on benchmark datasets.

ABSTRACT

Session-based recommendation (SBR) systems aim to utilize the user's short-term behavior sequence to predict the next item without the detailed user profile. Most recent works try to model the user preference by treating the sessions as between-item transition graphs and utilize various graph neural networks (GNNs) to encode the representations of pair-wise relations among items and their neighbors. Some of the existing GNN-based models mainly focus on aggregating information from the view of spatial graph structure, which ignores the temporal relations within neighbors of an item during message passing and the information loss results in a sub-optimal problem. Other works embrace this challenge by incorporating additional temporal information but lack sufficient interaction between the spatial and temporal patterns. To address this issue, inspired by the uniformity and alignment properties of contrastive learning techniques, we propose a novel framework called Session-based Recommendation with Spatio-Temporal Contrastive Learning Enhanced GNNs (RESTC). The idea is to supplement the GNN-based main supervised recommendation task with the temporal representation via an auxiliary cross-view contrastive learning mechanism. Furthermore, a novel global collaborative filtering graph (CFG) embedding is leveraged to enhance the spatial view in the main task. Extensive experiments demonstrate the significant performance of RESTC compared with the state-of-the-art baselines e.g., with an improvement as much as 27.08% gain on HR@20 and 20.10% gain on MRR@20.

Motivation & Objective

  • To address the limitation of GNN-based session recommendation models that ignore temporal order during message passing, leading to sub-optimal representation learning.
  • To improve the interaction between spatial graph structure and temporal patterns in session embeddings by introducing a contrastive learning mechanism.
  • To alleviate data sparsity in short sessions by incorporating global collaborative filtering graph (CFG) embeddings.
  • To enhance representation quality through self-supervised contrastive learning that aligns and encourages uniformity across spatial and temporal views.

Proposed method

  • The framework employs a dual-view contrastive learning objective that aligns session representations from spatial (item transition graph) and temporal (ordered item sequence) views.
  • A multi-head graph attention network (MGAT) encodes the spatial graph structure, while temporal order is preserved via positional encoding and sequence modeling.
  • A global collaborative filtering graph (CFG) is constructed from inter-session co-occurrence patterns to enrich spatial representations and reduce data sparsity.
  • The contrastive learning loss is optimized in a self-supervised manner, enhancing the alignment of positive samples (same session in different views) and uniformity of negative samples.
  • The main recommendation task is jointly trained with the contrastive objective, using a weighted combination of supervised and contrastive losses.
  • Hyperparameters such as the contrastive loss weight and MGAT layer count are tuned via grid search to balance main task optimization and representation learning.

Experimental results

Research questions

  • RQ1Can spatio-temporal contrastive learning improve session representation learning in GNN-based session recommendation?
  • RQ2How does the integration of a collaborative filtering graph affect performance on short and sparse sessions?
  • RQ3To what extent does contrastive learning enhance the discriminative quality of session embeddings in the latent space?
  • RQ4How do model hyperparameters such as MGAT layers and contrastive loss weight affect performance and generalization?

Key findings

  • RESTC achieves state-of-the-art performance on Diginetica, Tmall, RetailRocket, and LastFM datasets, outperforming existing SOTA baselines in both HR@20 and MRR@20 metrics.
  • The ablation study shows that removing the contrastive learning component (RESTC w/o Cont.) leads to a significant drop in performance, confirming its effectiveness in representation learning.
  • The use of a 3-layer CFG embedding module yields the best performance, while deeper layers introduce noise and over-smoothing.
  • The model is robust across different session lengths, with superior performance on short sessions due to effective sparsity mitigation via CFG embeddings.
  • t-SNE visualization confirms that RESTC learns more discriminative and well-separated session embeddings compared to S2-DHCN and GC-SAN, especially for same-label sessions.
  • Grid search reveals that an optimal balance between the main prediction loss and contrastive loss is achieved at specific hyperparameter values, with performance degrading when the contrastive weight (η₁) is too high.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.