Boosting the Adversarial Robustness of Graph Neural Networks: An OOD Perspective

Kuan Li, YiWen Chen, Yang Liu, Jin Wang, Qing He, Minhao Cheng, Xiang Ao

TL;DR

Researchers have developed GOOD-AT, a novel defense mechanism that treats adversarial attacks on Graph Neural Networks (GNNs) as an Out-of-Distribution (OOD) detection problem. By training an ensemble of detectors to identify and remove "alien" edges created by attackers, GOOD-AT achieves state-of-the-art robustness against even the most sophisticated adaptive (white-box) attacks.

The Vulnerability of Graph Neural Networks

Graph Neural Networks are notoriously fragile. A few strategically added or removed edges can completely flip a model's predictions. While many defenses exist, they usually rely on "hand-crafted" heuristics—for example, assuming that adversarial edges always connect very dissimilar nodes. The problem with this approach is that smart, adaptive attackers who know the defense's rules can simply craft attacks that bypass the filter entirely.

Furthermore, the "gold standard" for robustness in computer vision—Adversarial Training (AT)—does not translate well to graphs. In images, adversarial noise is a subtle, continuous "shimmer" that doesn't change the underlying object. In graphs, adding an edge is a discrete, structural change. The authors argue that traditional AT actually hurts GNNs by forcing them to learn "incorrect mappings." Essentially, it tells the model to ignore structural changes that should legitimately change the semantic meaning of a node's neighborhood.

Methods: The GOOD-AT Framework

To address these shortcomings, the authors propose GOOD-AT (Graph OOD-Detection-based Adversarial Training). Instead of trying to force the GNN to "ignore" the noise, they build a system to find and delete the noise before the GNN even processes it.

The pipeline operates in four main stages:

  1. Generate "OOD" Samples: The system uses a standard attack algorithm (PGD) to generate thousands of perturbed graphs.
  2. Label the Edges: Original, clean edges are labeled as "In-Distribution," while new edges created by the attack are labeled as "Out-of-Distribution" (OOD).
  3. Train an Ensemble: An ensemble of $K$ binary MLP detectors is trained. These detectors learn to distinguish between "natural" edges and "adversarial" edges based on the features of the connected nodes and their representations from a pre-trained GCN encoder.
  4. Graph Purification: During inference, if even one detector in the ensemble flags an edge as OOD, that edge is removed. The "purified" graph is then passed to the final GNN for classification.
The GOOD-AT framework: generating adversarial edges to train OOD detectors that purify the graph during inference.

Key Insights and Ideas

  • The Failure of Invariance: In images, we want a model to be invariant to noise (a cat is still a cat with a bit of static). In graphs, the local structure is the information. Forcing invariance via traditional AT leads the model to learn wrong relationships.
  • The Trade-off between Efficacy and Defensibility: This is the paper's most compelling theoretical contribution. They posit that an attacker faces a "damned if you do, damned if you don't" scenario. To significantly degrade a GNN's performance, an attack must create edges that look very different from the original data (making them easy for an OOD detector to catch). If the attacker tries to stay "stealthy" by mimicking the original distribution, the attack becomes too weak to do real damage.
  • Purification over Robustness: Rather than building a "tougher" model that tries to process bad data, it is fundamentally more effective to build a "cleaner" input pipeline.

Key Results

The study utilizes two classic citation network benchmarks (Cora and Citeseer), focusing on their Largest Connected Components. The authors performed extensive testing across over 25,000 perturbed graph instances to ensure statistical significance.

To evaluate their method, the authors used RAUC (Relative Area Under the Envelope Curve). This metric measures how well a defense holds up against the best possible adaptive attack at various "budgets" (the percentage of edges changed).

The RAUC metric: the area between the attack envelope and the baseline MLP accuracy represents the model's robustness.
  • Superior Robustness: GOOD-AT consistently outperformed seven other state-of-the-art defenses, including GNNGuard and ProGNN. On the Cora dataset, GOOD-AT's robustness was nearly at the theoretical upper bound.
  • Adaptive Resilience: Even when the attacker was given full access to the OOD detectors and tried to "regularize" the attack to bypass them, the attack's effectiveness dropped significantly. This empirically confirmed the authors' "Trade-off" hypothesis.
  • Generality: GOOD-AT acts as a "plug-and-play" module. The authors demonstrated that it works effectively regardless of whether the underlying GNN is a GCN, GAT, or GraphSAGE.

Limitations and Future Work

While highly effective, the approach has a few limitations:

  • Conjecture vs. Proof: The "Trade-off" hypothesis is supported by extensive empirical data but currently lacks a formal mathematical proof.
  • Feature Attacks: The current work focuses entirely on structural perturbations (adding or removing edges). It does not yet account for attacks that modify the node features themselves.
  • Scalability: While effective on standard benchmarks, training an ensemble of detectors on massive, billion-scale graphs remains an engineering challenge for future research.

Summary updated

BibTeX
@inproceedings{li2024boosting,
  author = {Kuan Li and YiWen Chen and Yang Liu and Jin Wang and Qing He and Minhao Cheng and Xiang Ao},
  title = {{Boosting the Adversarial Robustness of Graph Neural Networks: An OOD Perspective}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=DCDT918ZkI},
}
Figure