Adaptive Graph Contrastive Learning for Recommendation

Yangqin Jiang, Chao Huang, Lianghao XiaKDD 2023 · DOI

Abstract

Graph neural networks (GNNs) have recently emerged as an effective collaborative filtering (CF) approaches for recommender systems. The key idea of GNN-based recommender systems is to recursively perform message passing along user-item interaction edges to refine encoded embeddings, relying on sufficient and high-quality training data. However, user behavior data in practical recommendation scenarios is often noisy and exhibits skewed distribution. To address these issues, some recommendation approaches, such as SGL, leverage self-supervised learning to improve user representations. These approaches conduct self-supervised learning through creating contrastive views, but they depend on the tedious trial-and-error selection of augmentation methods. In this paper, we propose a novel Adaptive Graph Contrastive Learning (AdaGCL) framework that conducts data augmentation with two adaptive contrastive view generators to better empower the CF paradigm. Specifically, we use two trainable view generators - a graph generative model and a graph denoising model - to create adaptive contrastive views. With two adaptive contrastive views, AdaGCL introduces additional high-quality training signals into the CF paradigm, helping to alleviate data sparsity and noise issues. Extensive experiments on three real-world datasets demonstrate the superiority of our model over various state-of-the-art recommendation methods.

Introduction

Graph Neural Networks (GNNs) have become a cornerstone of modern Collaborative Filtering (CF) due to their ability to capture complex high-order relationships between users and items. However, their performance is often hampered by two critical issues: data noise (e.g., accidental clicks) and data sparsity (the long-tail problem where most items have few interactions).

While Self-Supervised Learning (SSL) has been introduced to mitigate these problems by creating "contrastive views" of the interaction graph, most existing methods rely on random augmentations like edge or node dropping. These heuristic-based approaches are often suboptimal, as they may inadvertently discard informative interactions or retain noisy ones. AdaGCL (Adaptive Graph Contrastive Learning) addresses this by replacing random heuristics with two trainable, task-aware view generators that adaptively create high-quality contrastive signals.

Methodology

The AdaGCL framework moves beyond trial-and-error augmentation by integrating three core components that work in a unified learning paradigm:

  1. Local Collaborative Relation Learning: This serves as the backbone, utilizing a LightGCN-style architecture to propagate embeddings across the original user-item interaction graph.
  2. Adaptive View Generator 1 (Generative Model): This component uses a Variational Graph Auto-Encoder (VGAE) to learn the underlying distribution of the graph. By reconstructing a "generative view" and introducing controlled Gaussian noise, it creates a challenging contrastive target that forces the model to learn more robust, generalized features.
  3. Adaptive View Generator 2 (Denoising Model): This specialized GNN layer is designed to identify and filter out "noisy" edges. It learns a binary mask for edges, effectively pruning interactions that do not contribute to meaningful user preferences.
The AdaGCL framework architecture featuring two adaptive view generators: a graph generative model and a graph denoising model.

A key innovation of AdaGCL is its task-awareness. Unlike standard SSL methods where generators are trained independently of the recommendation goal, AdaGCL’s generators are optimized using the Bayesian Personalized Ranking (BPR) loss. This ensures that the contrastive views are specifically tuned to improve the model's ranking performance for the final recommendation task.

Experimental Results

AdaGCL was evaluated on three diverse real-world datasets: Last.FM (music), Yelp (business venues), and BeerAdvocate (beer reviews). The model consistently outperformed 15 state-of-the-art baselines, including LightGCN, SGL, and NCL, across metrics such as Recall@20 and NDCG@20.

Robustness to Noise and Sparsity

One of the most significant advantages of AdaGCL is its resilience to data quality issues. In experiments where 25% of the graph edges were replaced with synthetic noise, AdaGCL's performance degraded far less than its competitors. This robustness stems from the denoising generator's ability to learn which edges to ignore during the contrastive task.

Comparison of robustness against interaction noise. AdaGCL maintains higher relative performance as the noise ratio increases compared to baselines.

Furthermore, AdaGCL showed a particularly strong lead on the Yelp dataset, which is the sparsest of the three tested. This confirms that adaptive signals are most valuable when the available interaction data is thin, as the generative model can effectively "fill in the gaps" with high-quality synthetic signals.

Conclusion

AdaGCL demonstrates that moving from random to adaptive data augmentation significantly enhances the performance and robustness of GNN-based recommender systems. By learning to generate and denoise contrastive views in a task-aware manner, the framework effectively addresses the inherent noise and sparsity of user behavior data. Future work may explore incorporating causal inference to further distinguish user intent from coincidence and investigating the transferability of these adaptive generators across different recommendation domains.

Summary updated

BibTeX
@inproceedings{jiang2023adaptive,
  author = {Yangqin Jiang and Chao Huang and Lianghao Xia},
  title = {{Adaptive Graph Contrastive Learning for Recommendation}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2023},
  doi = {10.1145/3580305.3599768},
}
Figure