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

Certified Robustness of Graph Neural Networks against Adversarial Structural Perturbation

Binghui Wang, Jinyuan Jia, Xiaoyu Cao, Neil Zhenqiang Gong

Abstract

Graph Neural Networks (GNNs) are increasingly used for critical tasks but remain vulnerable to adversarial structural perturbations, where small changes to a graph's edges can significantly alter predictions. This paper presents a model-agnostic framework that provides tight certified robustness for GNNs against such attacks. By adapting randomized smoothing to discrete binary data and leveraging the Neyman-Pearson Lemma, the authors derive a theoretical guarantee on the maximum number of edge modifications a GNN can tolerate before its output changes. Evaluations on node and graph classification benchmarks demonstrate significant certified safety margins, establishing a new standard for provable defense in graph-based learning.

Introduction

Graph Neural Networks (GNNs) have become the standard for learning on graph-structured data. However, their susceptibility to adversarial attacks—specifically structural perturbations like adding or removing edges—poses a significant security risk. While empirical defenses have been proposed, they often lack formal guarantees and can be bypassed by adaptive attackers. This work addresses the need for "certified robustness," providing a mathematical assurance that a model's prediction remains constant within a defined perturbation radius $K$. Unlike previous methods that were architecture-specific or provided loose bounds, this framework offers a universal and tight certificate for any GNN.

Methodology: Binary Randomized Smoothing

The core of the proposed approach is an adaptation of randomized smoothing for discrete, binary graph structures.

  1. Smoothing Mechanism: A "smoothed" classifier is constructed from a base GNN. During inference, the input graph is perturbed by flipping each potential edge with a probability $1-\beta$. The final prediction is the majority vote across many such noisy samples.
  2. XOR Noise Model: Structural changes are modeled as binary vector operations using the XOR operator, facilitating a rigorous mathematical treatment of edge additions and deletions.
  3. Tightness via Neyman-Pearson: The authors utilize the Neyman-Pearson Lemma to calculate the exact worst-case probability shift an attacker can induce. This ensures the derived perturbation radius $K$ is tight, representing the maximum possible certified resilience without internal model knowledge.
  4. Statistical Certification: Since exact probabilities are intractable, a simultaneous confidence interval estimation method is employed to bound these probabilities with high statistical confidence.

Experimental Evaluation

The framework was evaluated across two primary tasks: node classification (using Cora, Citeseer, and Pubmed datasets) and graph classification (using MUTAG, PROTEINS, and IMDB). These represent standard benchmarks covering different scales and domains.

Certified accuracy for graph classification tasks (MUTAG, PROTEINS, IMDB) across varying perturbation sizes and smoothing parameters $\beta$.

Key Insights and Results

The experimental results highlight several critical properties of the smoothed GNNs:

  • The $\beta$ Trade-off: The parameter $\beta$ (the probability of retaining an edge's original state) controls the balance between clean accuracy and robustness. As shown in the figures, higher $\beta$ values (e.g., 0.9) favor accuracy on unperturbed data but drop sharply under attack. Conversely, lower values (e.g., 0.5) provide a stable, albeit lower, baseline of accuracy that is highly resilient to large perturbations.
  • Certified Safety Margins: On the Cora dataset, a smoothed GCN maintained a certified accuracy of 0.49 against up to 15 edge perturbations per node. Similarly, for graph classification on MUTAG, a smoothed GIN achieved 0.40 certified accuracy against 15 global edge modifications.
  • Sample Efficiency: While certification requires multiple inference passes, the authors found that certified accuracy curves stabilize between 10,000 and 50,000 samples, making the approach computationally viable for practical use.
Certified accuracy on the Pubmed node classification dataset, illustrating the impact of the smoothing parameter $\beta$ on robustness.

Conclusion and Future Directions

This work provides a robust, model-agnostic foundation for certifying GNNs against structural attacks. By treating the GNN as a black box, the method is applicable to diverse architectures like GCNs, GATs, and GINs. However, the computational cost of randomized smoothing remains a challenge for real-time applications. Future research could explore incorporating architecture-specific information to further tighten bounds or extending the framework to handle perturbations in node attributes alongside structural changes.

Summary updated

BibTeX
@inproceedings{wang2020certified,
  author = {Binghui Wang and Jinyuan Jia and Xiaoyu Cao and Neil Zhenqiang Gong},
  title = {{Certified Robustness of Graph Neural Networks against Adversarial Structural Perturbation}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2020},
  doi = {10.1145/3447548.3467295},
}
Figure