Securing GNNs: Explanation-Based Identification of Backdoored Training Graphs

Jane Downer, Ren Wang, Binghui Wang · OpenReview

Abstract

Graph Neural Networks (GNNs) have gained popularity in numerous domains, yet they are vulnerable to backdoor attacks that can compromise their performance and ethical application. The detection of these attacks is crucial for maintaining the reliability and security of GNN classification tasks, but effective detection techniques are lacking. Following an initial investigation, we observed that while graph-level explanations can offer limited insights, their effectiveness in detecting backdoor triggers is inconsistent and incomplete. To bridge this gap, we extract and transform secondary outputs of GNN explanation mechanisms, designing seven novel metrics that more effectively detect backdoor attacks. Additionally, we develop an adaptive attack to rigorously evaluate our approach. We test our method on multiple benchmark datasets and examine its efficacy against various attack models. Our results show that our method can achieve high detection performance, marking a significant advancement in safeguarding GNNs against backdoor attacks.

Introduction

Graph Neural Networks (GNNs) are the current standard for analyzing complex relational data, ranging from drug discovery to financial fraud detection. However, they are highly susceptible to backdoor attacks. In these scenarios, an adversary injects a specific, small subgraph—a "trigger"—into a subset of training examples and modifies their labels. The GNN learns to associate this trigger with the target label, eventually ignoring the rest of the graph's features when the trigger is present.

Comparison of common graph models (Erdos-Renyi, Small World, and Preferential Attachment) often used as triggers in backdoor attacks.

Existing defenses, such as those searching for dense subgraphs or using randomized sampling, are often brittle and easily bypassed by sophisticated attackers. While GNN "explainers"—tools designed to interpret model predictions—can sometimes highlight these triggers, they are too inconsistent to serve as a standalone defense. This paper proposes a novel way to secure GNNs by turning their own explainability tools into a defensive shield.

Methodology

The proposed defense strategy leverages the process of GNN explanation rather than just the final output. By extracting seven novel metrics from the explanation mechanism, the researchers create a multi-faceted detection system:

  1. Prediction Confidence: Identifies unusually high-certainty predictions typical of backdoored graphs.
  2. Explainability (Fidelity): Measures the change in prediction when the "important" subgraph is isolated versus when it is removed.
  3. Connectivity: Evaluates if the nodes flagged by the explainer form a coherent structure.
  4. Subgraph Node Degree Variance (SNDV): Detects unusual connectivity patterns within the explanation.
  5. Node Degree Variance (NDV): Analyzes the geometric structure of the original graph.
  6. Elbow: Captures the specific epoch where the explainer's loss curve flattens.
  7. Curvature: Measures the sharpness of the loss curve's inflection point.

The system classifies a graph as backdoored if it exceeds a threshold for a specific number of these metrics, a value referred to as the Number of Positive Metrics Required (NPMR).

Datasets

The method was evaluated on five diverse benchmark datasets: MUTAG (chemical compounds), AIDS (molecular structures), PROTEINS (enzymes), IMDB-BINARY (social networks), and DBLP (citation networks).

Visualization of a graph from the MUTAG dataset, one of the benchmarks used to evaluate the defense.

Key Results and Insights

The study reveals that the "byproducts" of the explanation process, such as the "Elbow" metric, provide a cleaner signal for detection than the final explanation mask itself. Furthermore, an ensemble voting approach (NPMR=2 or 3) proved most robust across different datasets and attack types.

  • Detection Performance: The method achieved a high F1 score of 0.906 on the MUTAG dataset against standard "random" triggers.
  • Adaptive Robustness: Against a novel "Adaptive Attack" designed to create stealthy triggers that evade explainers, the defense maintained a strong F1 score of 0.842.
  • Efficiency: The computational overhead is minimal, as metrics are derived from existing explanation processes, making the added time negligible.

Conclusion

This research demonstrates that GNN explainability tools can be repurposed as a powerful defensive shield. While very small triggers (size 2) present a unique challenge requiring distance-based normalization, the multi-metric approach significantly advances GNN security. Future work will focus on scaling these techniques to industrial-sized graphs and addressing multi-target backdoor scenarios where different triggers lead to different malicious outcomes.

Summary updated

BibTeX
@article{downer2025securing,
  author = {Jane Downer and Ren Wang and Binghui Wang},
  title = {{Securing GNNs: Explanation-Based Identification of Backdoored Training Graphs}},
  journal = {IEEE Trans. Inf. Forensics Secur.},
  year = {2025},
  url = {https://openreview.net/forum?id=iUnK39AN5j},
}
Figure