NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning Robust Representation Through Graph Adversarial Contrastive Learning

Jiayan Guo, Shangyang Li, Yue Zhao, Yan Zhang

Abstract

Graph Neural Networks (GNNs) have demonstrated significant success in modeling relational data but remain highly susceptible to adversarial attacks. Small, intentional perturbations to graph structure or node features can drastically degrade performance. This paper introduces GraphACL (Graph Adversarial Contrastive Learning), a framework designed to learn robust representations by training GNNs to recognize the underlying structure of a graph despite adversarial noise. By leveraging adversarial augmentations within a contrastive learning objective, GraphACL forces the model to ignore "nuisance" information. Experimental results on citation networks show that GraphACL significantly outperforms existing supervised and self-supervised methods in both evasive and poisoning attack scenarios.

Introduction

While GNNs are widely used in node classification and recommendation systems, their vulnerability to adversarial attacks—often referred to as a "glass jaw"—poses a significant security risk. A minor change, such as adding a few malicious edges, can cause a model's accuracy to plummet. Traditional defense strategies often rely on supervised learning, which is limited by the availability of labeled data. Conversely, standard self-supervised methods like Graph Contrastive Learning (GCL) typically employ random augmentations (e.g., edge dropping). However, random noise is insufficient for building robust defenses. To truly harden a model, it must be trained against "worst-case" adversarial scenarios.

The GraphACL Framework

GraphACL integrates adversarial training into a self-supervised contrastive learning pipeline. The core idea is to maximize the mutual information between the representations of a clean graph and its adversarially perturbed version.

Overview of the GraphACL framework, showing the contrastive objective between clean and adversarially augmented graph representations.

The framework operates through three primary stages:

  1. Adversarial Augmentation: Instead of random shuffling, GraphACL generates a perturbed version of the input graph designed to challenge the model.
  2. Contrastive Objective: The model maximizes the mutual information between local node representations of the clean graph and the global representation of the adversarial graph (and vice versa).
  3. Theoretical Foundation: Using the Information Bottleneck (IB) Principle, the authors demonstrate that this objective encourages the encoder to retain essential structural features while discarding adversarial noise.

Adversarial Augmentation Strategies

GraphACL supports two modes of augmentation:

  • Supervised Mode: Utilizes existing labels and a surrogate model to identify perturbations that maximize classification error.
  • Unsupervised Mode: A key contribution of this work. In the absence of labels, the model employs meta-gradients to find perturbations that maximize the contrastive loss between the clean and perturbed graphs.
The Unsupervised Adversarial Attack mechanism, utilizing meta-gradients to maximize contrastive loss without requiring labels.

Experimental Evaluation

The researchers evaluated GraphACL on three standard citation network benchmarks: Cora, Citeseer, and Pubmed. These datasets were preprocessed with boolean features to satisfy the requirements of attack models like Netattack and Metattack.

Key Results

GraphACL was tested against both Evasive (test-time) and Poisoning (training-time) attacks.

  • Cora: GraphACL outperformed standard GCNs by 16.0% and the previous self-supervised leader, Deep Graph Infomax (DGI), by 5.5% under single-perturbation evasive attacks.
  • Citeseer: On this sparser graph, GraphACL surpassed GCN by 23.5% in evasive tasks.
  • Optimal Perturbation: The study found that a perturbation rate of 0.030 during training provided the best balance between challenging the model and preserving useful graph information.

Discussion and Insights

The central insight of GraphACL is that adversarial augmentations provide a tighter theoretical bound for robustness than random ones. By attacking the contrastive loss itself during training, the model learns a "shield" that generalizes well to downstream tasks. From an information-theoretic perspective, GraphACL acts as a filter, forcing the encoder to focus on stable, underlying topology rather than features that fluctuate under attack.

Limitations and Future Work

While effective, GraphACL currently relies on the Deep Graph Infomax (DGI) architecture. Future research should explore its applicability to other GNN architectures. Additionally, the computational cost of generating adversarial samples via meta-gradients is higher than random augmentation, presenting a trade-off between training efficiency and robustness. Finally, scaling these methods to massive, industrial-scale graphs remains an open challenge.

Summary updated

BibTeX
@inproceedings{guo2022learning,
  author = {Jiayan Guo and Shangyang Li and Yue Zhao and Yan Zhang},
  title = {{Learning Robust Representation Through Graph Adversarial Contrastive Learning}},
  booktitle = {DASFAA},
  year = {2022},
  doi = {10.1007/978-3-031-00123-9\_54},
}
Figure