FLAG: Adversarial Data Augmentation for Graph Neural Networks

Kezhi Kong, Guohao Li, Mucong Ding, Zuxuan Wu, Chen Zhu, Bernard Ghanem, Gavin Taylor, Tom Goldstein

Abstract

Data augmentation helps neural networks generalize better by enlarging the training set, but it remains an open question how to effectively augment graph data to enhance the performance of GNNs (Graph Neural Networks). While most existing graph regularizers focus on manipulating graph topological structures by adding/removing edges, we offer a method to augment node features for better performance. We propose FLAG (Free Large-scale Adversarial Augmentation on Graphs), which iteratively augments node features with gradient-based adversarial perturbations during training. By making the model invariant to small fluctuations in input data, our method helps models generalize to out-of-distribution samples and boosts model performance at test time. FLAG is a general-purpose approach for graph data, which universally works in node classification, link prediction, and graph classification tasks. FLAG is also highly flexible and scalable, and is deployable with arbitrary GNN backbones and large-scale datasets. We demonstrate the efficacy and stability of our method through extensive experiments and ablation studies. We also provide intuitive observations for a deeper understanding of our method.

Introduction

In domains like Computer Vision, data augmentation techniques such as flipping, cropping, or color jittering are standard practices that significantly improve model generalization. However, applying similar techniques to Graph Neural Networks (GNNs) is challenging. Modifying the graph topology (e.g., adding or removing edges) can be computationally expensive and risks altering the underlying semantic meaning of the data.

To address this, researchers from the University of Maryland, KAUST, and the US Naval Academy developed FLAG (Free Large-scale Adversarial Augmentation on Graphs). FLAG shifts the focus from topological manipulation to node feature augmentation, using adversarial training as a powerful regularizer to improve GNN performance across diverse tasks.

Methodology: Adversarial Training as Regularization

FLAG treats adversarial training not merely as a defense against attacks, but as a mechanism for data augmentation. The core idea is to make the GNN invariant to small, task-agnostic fluctuations in the input node features.

Min-Max Optimization

The training process is formulated as a min-max optimization problem. The "inner" loop seeks a small perturbation that maximizes the model's loss, effectively finding the most challenging "noise" for the current model state. The "outer" loop then updates the model weights to minimize this maximized loss.

Efficiency and Scalability

Traditional adversarial training (like PGD) is computationally heavy. FLAG utilizes a "free" training approach where model weights and perturbations are updated simultaneously over multiple "replays" of a data batch. This allows FLAG to achieve the benefits of adversarial training with minimal overhead, making it suitable for large-scale datasets.

Experimental Evaluation

The authors evaluated FLAG using the Open Graph Benchmark (OGB), covering node classification, link prediction, and graph classification.

Validation performance curves for node classification (loss), link prediction (Hits@20), and graph classification (loss) comparing the baseline to FLAG-augmented training.

As shown in the validation curves, FLAG consistently improves performance and stability across all three task types. By exposing the model to a variety of noise scales during training, FLAG helps the network learn more robust representations that generalize better to unseen test data.

Key Results

FLAG demonstrates significant performance gains across various GNN backbones, including GCN, GraphSAGE, GAT, and DeeperGCN.

Test performance on OGB node classification datasets using various GNN backbones with and without FLAG augmentation.

On the ogbn-products dataset, FLAG improved the accuracy of a GAT model by an absolute 2.31%. In link prediction tasks, such as ogbl-ddi, the Hits@20 score for a standard GCN increased from 37.07 to 51.41. These results highlight FLAG's ability to act as a universal performance booster for GNNs.

Conclusion

FLAG provides a simple, scalable, and effective way to perform data augmentation on graphs. By focusing on node feature perturbations rather than topological changes, it preserves the vital structural information of the graph while enhancing the model's ability to generalize. Its model-agnostic nature and computational efficiency make it a valuable tool for any GNN pipeline.

The implementation is available at https://github.com/devnkong/FLAG.

Summary updated

BibTeX
@inproceedings{kong2020flag,
  author = {Kezhi Kong and Guohao Li and Mucong Ding and Zuxuan Wu and Chen Zhu and Bernard Ghanem and Gavin Taylor and Tom Goldstein},
  title = {{FLAG: Adversarial Data Augmentation for Graph Neural Networks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
}
Figure