Identifying Backdoored Graphs in Graph Neural Network Training: An Explanation-Based Approach with Novel Metrics

Jane Downer, Ren Wang, Binghui Wang

TL;DR

This paper introduces a robust defense against backdoor attacks in Graph Neural Networks (GNNs) by moving beyond simple explanatory subgraphs. By extracting seven diverse metrics from the GNN explanation process—ranging from graph geometry to optimization loss curves—the authors create a composite detection system that consistently outperforms existing baselines across various attack models and datasets.

What Problem Does This Paper Address?

Graph Neural Networks are increasingly used in high-stakes fields like bioinformatics and financial fraud detection. However, they are susceptible to backdoor attacks: an attacker injects a specific "trigger" subgraph into training data and changes the labels. At test time, the presence of this trigger causes the model to predictably misclassify the graph into a target class.

Detecting these "trojaned" graphs is difficult because triggers are often designed to be subtle or blend into the natural variations of the data. Existing defenses often rely on a single metric (like an "explainability score") or assume a specific trigger structure (like dense subgraphs). These are easily bypassed by sophisticated attackers. The authors highlight that even state-of-the-art GNN explainers are inconsistent at isolating triggers, as seen in the figure below:

Fig. 2: Explanations are inconsistent in their ability to isolate the trigger in backdoored graphs.

Methods

The core innovation is a composite detection strategy based on seven novel metrics derived from GNNExplainer. Instead of just looking at the final "important" subgraph, the authors analyze the entire explanation process:

  1. Prediction Confidence: Measures how certain the model is when only the explanatory subgraph is present.
  2. Explainability Score (ES): The difference between positive and negative fidelity (how much the prediction changes when features are included vs. excluded).
  3. Connectivity: The proportion of node pairs in the explanatory subgraph that are connected in the original graph.
  4. Node Degree Variance (NDV): A geometric metric looking for "degree inflation" caused by trigger injection in the original graph.
  5. Subgraph Node Degree Variance (SNDV): Measures the variance of node degrees within the explanatory subgraph itself.
  6. Elbow: The specific epoch where the explainer's loss curve rate of decrease changes most sharply.
  7. Curvature: A proxy for how sharply the explainer's loss curve bends, indicating how "easy" it was for the explainer to find the trigger.

To make a final decision, the authors use a thresholding strategy based on a small set of clean validation data. They introduce the NPMR (Number of Positive Metrics Required) hyperparameter—if a graph exceeds the threshold for $k$ out of 7 metrics, it is flagged as backdoored.

To stress-test their defense, they also developed a new Adaptive Backdoor Trigger generator that specifically tries to create triggers that are "stealthy" to GNNExplainer.

Datasets

The method was evaluated on six diverse benchmark datasets:

  • MUTAG & AIDS: Chemical compounds and molecular structures.
  • PROTEINS: Enzyme and non-enzyme structures.
  • DBLP: A citation network.
  • IMDB-BINARY & IMDB-MULTI: Social ego-networks of actors.

These datasets provide a mix of sparse and dense graphs, as well as binary and multi-class classification tasks.

Key Insights and Ideas

  • The "Process" is the Signal: The most important "aha" moment is that the artifacts of the explanation process (like loss curves and entropy) are often more informative than the output of the explanation (the subgraph).
  • Statistical Mixture Theory: Backdoors act as "foreign bodies." When you mix artificial triggers with natural graph data, the resulting population exhibits higher variance in its topological and signal properties, which the NDV and SNDV metrics exploit.
  • Optimization Dynamics: Artificial triggers are designed to be "shortcuts" for the model. Consequently, an explainer will converge much faster and more sharply on a trigger than on complex natural features. This makes the "Elbow" and "Curvature" of the loss curve powerful detection signals.
  • Ensemble Robustness: No single metric is foolproof. By requiring multiple metrics to fire (NPMR), the defense remains robust even if an attacker manages to evade one or two specific signals.

Key Results

  • Superior Performance: The proposed method outperformed baselines (ES and XGBD) in 34 out of 36 tested attack/dataset combinations.
  • High F1 Scores: The system achieved F1 scores up to 0.911 against traditional random triggers and 0.897 against "Low-Importance Node" (LIN) attacks.
  • Resilience to Adaptive Attacks: Even against the authors' custom-built adaptive attack designed to evade detection, the method maintained a robust F1 score of 0.859.
  • Data Efficiency: The defense is practical; it only requires about 20 clean validation samples to establish effective detection thresholds.

Limitations and Future Work

  • Computational Overhead: The method's speed is tied to the GNN explainer used. While the metric calculation is instant, running GNNExplainer for every graph in a large dataset can be computationally expensive.
  • Explainer Dependency: The current metrics are tailored to GNNExplainer. While the authors showed that other explainers (like PGExplainer) can work, they provide fewer auxiliary signals, which slightly degrades detection performance.
  • Future Directions: The authors suggest exploring faster explanation mechanisms to reduce overhead and investigating how these metrics might be used to actually remove backdoors (unlearning) rather than just detecting them.

Summary updated

BibTeX
@article{downer2025identifying,
  author = {Jane Downer and Ren Wang and Binghui Wang},
  title = {{Identifying Backdoored Graphs in Graph Neural Network Training: An Explanation-Based Approach with Novel Metrics}},
  journal = {IEEE Trans. Inf. Forensics Secur.},
  year = {2025},
  url = {https://openreview.net/forum?id=iUnK39AN5j},
}
Figure