Mixed Supervised Graph Contrastive Learning for Recommendation

Weizhi Zhang, Liangwei Yang, Zihe Song, Henry Peng Zou, Ke Xu, Yuanjie Zhu, Philip S. YuarXiv 2024 · DOI

Abstract

Graph Contrastive Learning (GCL) has become a cornerstone for mitigating data sparsity in recommender systems. However, conventional GCL methods often employ a decoupled design where recommendation and contrastive losses compete, leading to inconsistent gradients and sub-optimal convergence. Furthermore, standard random data augmentation techniques risk removing sparse but vital interaction signals. This paper introduces MixSGCL (Mixed Supervised Graph Contrastive Learning), a framework that unifies these tasks into a single supervised objective. By leveraging node- and edge-level "mixup" augmentations, MixSGCL creates meaningful synthetic signals that enhance model robustness. Our evaluation on three real-world datasets shows that MixSGCL consistently outperforms state-of-the-art baselines in both accuracy and training efficiency.

Introduction

Modern recommender systems typically model user-item interactions as a bipartite graph. To overcome the inherent sparsity of these graphs, Graph Contrastive Learning (GCL) is used to learn robust representations by comparing different "views" of the data. Despite its success, GCL faces two primary challenges:

  1. Inconsistent Gradients: The "tug-of-war" between the recommendation loss (pulling related nodes together) and the contrastive loss (often pushing nodes apart in an unsupervised manner) can hinder optimization.
  2. Risky Augmentation: Randomly dropping nodes or edges to create views can delete the few critical signals available in sparse datasets.

MixSGCL addresses these issues by coupling the tasks into a single supervised loss and replacing destructive augmentation with constructive mixup techniques.

Methodology

The MixSGCL framework integrates two core innovations to streamline the learning process.

Supervised Graph Contrastive Learning (SGCL)

Instead of balancing two separate loss functions, MixSGCL employs a unified SGCL loss. This objective treats observed user-item interactions as positive pairs and other items within the same batch as negatives. This approach ensures a consistent optimization direction and eliminates the need for computationally expensive negative sampling. The authors' theoretical analysis suggests this prevents the "distribution shift" common in decoupled architectures where contrastive tasks might inadvertently push related users and items apart.

Intra-class Mixup Augmentation

To generate diverse views without losing information, MixSGCL introduces two levels of mixup:

  • Node-level Mixup (NMix): This technique blends representations from different graph convolution layers (representing different neighborhood scales) to create virtual node embeddings.
  • Edge-level Mixup (EMix): This creates "virtual edges" by interpolating between a user and an item they have interacted with, effectively smoothing the embedding space along known preference paths.
The MixSGCL framework architecture illustrating the integration of graph convolutions, node/edge-level mixup, and the supervised contrastive learning objective.

Experimental Results

We evaluated MixSGCL on three benchmarks: Amazon-Beauty, Amazon-Toys-and-Games, and Yelp 2018. All datasets were pre-processed using k-core filtering to maintain data quality.

Accuracy and Ablation

MixSGCL consistently achieved superior performance compared to state-of-the-art models like SimGCL and SGL. For instance, on the Beauty dataset, MixSGCL reached a Recall@20 of 0.143, compared to SimGCL’s 0.1345. Ablation studies confirm that both NMix and EMix contribute significantly to the final performance, and the unified SGCL loss is critical for reaching peak accuracy across all metrics.

Performance metrics (Recall and NDCG) across three datasets, including an ablation study showing the impact of removing specific mixup or supervised components.

Efficiency and Convergence

A major advantage of MixSGCL is its training speed. By removing redundant graph convolutions and negative sampling, it converges much faster than its predecessors. On the large-scale Yelp dataset, MixSGCL reached convergence in approximately 6.9 hours, a significant improvement over the 16.8 hours required by the SGL model. Furthermore, the model requires significantly fewer training epochs to reach peak performance compared to traditional networks like LightGCN.

Conclusion

MixSGCL provides a robust solution to the gradient inconsistency and data augmentation risks inherent in traditional graph contrastive learning for recommendation. By unifying the learning objective and utilizing constructive mixup techniques, the framework achieves state-of-the-art results with significantly improved efficiency. Future work will explore extending this supervised contrastive approach to more complex heterogeneous graphs and sequential recommendation tasks.

Summary updated

BibTeX
@misc{zhang2024mixed,
  author = {Weizhi Zhang and Liangwei Yang and Zihe Song and Henry Peng Zou and Ke Xu and Yuanjie Zhu and Philip S. Yu},
  title = {{Mixed Supervised Graph Contrastive Learning for Recommendation}},
  year = {2024},
  eprint = {2404.15954},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.15954},
}
Figure