Graph Contrastive Learning with Adaptive Augmentation

Yanqiao Zhu, Yichen Xu, Feng Yu, Qiang Liu, Shu Wu, Liang Wang · DOI

Abstract

Recently, contrastive learning (CL) has emerged as a successful method for unsupervised graph representation learning. Most graph CL methods perform stochastic augmentation on the input graph to obtain two graph views and maximize the agreement of representations in the two views. Despite the prosperous development of graph CL methods, the design of graph augmentation schemes—a crucial component in CL—remains rarely explored. We argue that the data augmentation schemes should preserve intrinsic structures and attributes of graphs, which will force the model to learn representations that are insensitive to perturbation on unimportant nodes and edges. However, most existing methods adopt uniform data augmentation schemes, like uniformly dropping edges and uniformly shuffling features, leading to suboptimal performance. In this paper, we propose a novel graph contrastive representation learning method with adaptive augmentation (GCA) that incorporates various priors for topological and semantic aspects of the graph. Specifically, on the topology level, we design augmentation schemes based on node centrality measures to highlight important connective structures. On the node attribute level, we corrupt node features by adding more noise to unimportant node features, to enforce the model to recognize underlying semantic information. We perform extensive experiments of node classification on a variety of real-world datasets. Experimental results demonstrate that our proposed method consistently outperforms existing state-of-the-art baselines and even surpasses some supervised counterparts, which validates the effectiveness of the proposed contrastive framework with adaptive augmentation.

The Problem: The Pitfalls of Uniform Augmentation

In unsupervised graph representation learning, Contrastive Learning (CL) has become the dominant strategy. The core idea is to create two slightly different "views" of a graph via stochastic augmentation—such as dropping edges or masking features—and train a neural network to recognize that the same node in both views should have a similar embedding.

Despite its success, most existing methods rely on uniform augmentation. They might drop 10% of edges at random, regardless of their structural role. However, graphs are inherently non-uniform. Dropping a "bridge" edge that connects two major communities is far more damaging to the graph's identity than dropping a peripheral edge. Similarly, some node features are noise, while others are vital semantic markers. By treating all elements equally, uniform augmentation often creates "noisy" views that hinder the model's ability to learn underlying patterns.

Comparison of GCA with existing graph contrastive learning methods.

Methodology: Adaptive Augmentation (GCA)

The proposed Graph Contrastive learning with Adaptive augmentation (GCA) framework revolutionizes the augmentation step by incorporating various priors for topological and semantic aspects of the graph.

The GCA framework: two views are generated via adaptive augmentation, processed by a shared GNN, and optimized via intra-view and inter-view contrastive loss.

1. Topology-Level Adaptive Augmentation

Instead of dropping edges uniformly, GCA calculates node centrality (using measures like Degree, Eigenvector, or PageRank). Edges connected to highly central nodes are considered "important" and are assigned a lower probability of being dropped. Conversely, peripheral edges are dropped more frequently. This forces the model to remain robust against unimportant structural noise while preserving the graph's "skeleton."

2. Node-Attribute-Level Adaptive Augmentation

The importance of a feature dimension is determined by its prevalence in influential (central) nodes. Features that are prominent in the graph's "hubs" are protected, while less relevant features are masked more aggressively. This ensures that the model recognizes underlying semantic information rather than overfitting to noise.

3. Contrastive Objective

The model uses a shared Graph Neural Network (GNN) encoder to generate embeddings for both views. It then employs a contrastive objective (based on InfoNCE) to maximize the agreement between the embeddings of the same node across the two adaptive views (inter-view) while also considering intra-view relationships.

Experimental Results

The researchers evaluated GCA on five widely-used transductive node classification benchmarks, including Wiki-CS, Amazon-Computers, and Coauthor-Physics.

  • Superior Performance: GCA consistently outperformed state-of-the-art unsupervised baselines like DGI, GMI, and MVGRL across all datasets.
  • Surpassing Supervised Models: Remarkably, on several tasks, GCA's unsupervised representations (followed by a simple linear classifier) outperformed fully supervised GCN and GAT models. For example, on Wiki-CS, GCA achieved ~78.3% accuracy compared to GCN's ~77.2%.
  • Ablation and Robustness: Ablation studies confirmed that combining both topology and attribute adaptive augmentation provides a significant boost over uniform methods. The model also showed stability across various drop probabilities, provided the graph structure wasn't completely degraded.

Conclusion

GCA demonstrates that preserving the intrinsic identity of a graph through adaptive augmentation is key to effective contrastive learning. By using classical network science metrics as priors, GCA provides a computationally efficient way to highlight important structures and features, leading to representations that are both robust and highly discriminative. Future work may explore the application of these adaptive schemes to graph-level tasks and massive-scale networks.

Summary updated

BibTeX
@inproceedings{zhu2020graph,
  author = {Yanqiao Zhu and Yichen Xu and Feng Yu and Qiang Liu and Shu Wu and Liang Wang},
  title = {{Graph Contrastive Learning with Adaptive Augmentation}},
  booktitle = {The Web Conference},
  year = {2020},
  doi = {10.1145/3442381.3449802},
}
Figure