Adversarial Defense Framework for Graph Neural Network

Shen Wang, Zhengzhang Chen, Jingchao Ni, Xiao Yu, Zhichun Li, Haifeng Chen, Philip S. YuarXiv 2019

Abstract

Graph Neural Networks (GNNs) have emerged as powerful tools for learning on non-Euclidean data, yet they remain highly susceptible to adversarial perturbations. This paper introduces DefNet, a comprehensive defense framework designed to enhance GNN robustness. DefNet integrates two key strategies: Graph Encoder Refining (GER), which hardens the model architecture against noise, and Adversarial Contrastive Learning (ACL), which utilizes a conditional GAN to generate high-quality adversarial examples for training. Our evaluation on benchmark datasets demonstrates that DefNet significantly outperforms standard GNNs, maintaining high accuracy under sophisticated attacks where baseline models often fail.

The Vulnerability of Graph Neural Networks

Despite their success in domains like social network analysis and protein interaction modeling, GNNs possess a significant "glass jaw." A malicious actor can flip a model's prediction by adding or removing just a few edges, often with high confidence. This fragility is primarily attributed to two factors: standard architectural components (like max-pooling aggregation) that are overly sensitive to outliers, and the discrete nature of graph data, which makes generating effective adversarial training examples computationally difficult.

Methodology: The DefNet Framework

DefNet addresses these vulnerabilities through a dual-pronged approach: architectural hardening and robust training.

1. Graph Encoder Refining (GER)

GER "hardens" the GNN architecture through three specific modifications:

  • Mean Intra-layer Aggregation: Unlike "Max" or "Sum" pooling, Mean pooling averages out the impact of malicious neighbors, providing inherent stability.
  • Dense-connected Inter-layer Aggregation: By connecting each layer to all previous layers, the model can selectively aggregate structural information from different "hops," preventing adversarial noise from dominating the signal as it propagates.
  • Bottleneck Perceptron: Reducing the dimensionality of hidden layers forces the model to learn compressed, robust representations that are less sensitive to small input perturbations.
The DefNet architecture, illustrating the Graph Encoder Refining (GER) and Adversarial Contrastive Learning (ACL) components.

2. Adversarial Contrastive Learning (ACL)

To solve the training data scarcity in discrete graph spaces, DefNet employs a Conditional GAN. The generator is conditioned on the global graph representation. Because global features are much harder for an attacker to manipulate than local node neighborhoods, this stable global signal guides the generation of high-quality adversarial examples, allowing the model to better distinguish between true structural features and malicious noise.

Experimental Results

DefNet was evaluated on three standard benchmarks—Cora, Citeseer, and PolBlogs—against various attack models, including RAND, FGSM, and the state-of-the-art NETTACK.

Performance comparison of DefNet (RGCN_ACL/RGraphSage_ACL) against baseline models under various adversarial attacks.

The results highlight the extreme fragility of standard GNNs and the resilience of DefNet. For instance, on the Cora dataset, a standard GCN's accuracy plummeted from 0.90 to 0.01 under NETTACK. In contrast, DefNet (RGCN_ACL) maintained an accuracy of 0.60. Even on the PolBlogs dataset, which is naturally harder to attack due to high node degrees, DefNet improved baseline accuracy under attack from 0.06 to 0.65.

Key Insights and Conclusion

DefNet demonstrates that architectural choices are paramount for GNN security. The shift from Max to Mean pooling and the use of dimensionality bottlenecks provide simple yet powerful defenses. Furthermore, leveraging global graph embeddings to regularize local node learning proves to be a clever strategy, acknowledging that while local neighborhoods are easily poisoned, the overall statistics of the graph remain relatively stable. Future work will explore the scalability of this GAN-based approach to massive graphs and the development of adaptive attacks designed to bypass these new defenses.

Summary updated

BibTeX
@misc{wang2019adversarial,
  author = {Shen Wang and Zhengzhang Chen and Jingchao Ni and Xiao Yu and Zhichun Li and Haifeng Chen and Philip S. Yu},
  title = {{Adversarial Defense Framework for Graph Neural Network}},
  year = {2019},
  eprint = {1905.03679},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.03679},
}
Figure