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. Recognizing the challenge in detecting such intrusions, we devised a novel detection method that creatively leverages graph-level explanations. By extracting and transforming secondary outputs from GNN explanation mechanisms, we developed seven innovative metrics for effective detection of backdoor attacks on GNNs. 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 increasingly deployed in high-stakes environments, from bioinformatics to financial services. However, their growing adoption is shadowed by a significant security vulnerability: backdoor attacks. In these scenarios, an adversary poisons a fraction of the training data by injecting a "trigger" (a specific subgraph) and re-labeling these graphs to a target class. While the GNN performs normally on clean data, it is "backdoored" to predict the target class whenever it encounters the trigger in the wild.
The Challenge of Detection
A logical first step in defense is using GNN explainability tools to identify these triggers. Ideally, an explainer would highlight the malicious subgraph as the primary reason for a prediction. However, empirical evidence shows that explainers are often inconsistent, failing to isolate the trigger or producing noisy, incomprehensible patterns.
The core insight of this research is that while the final explanatory subgraph might be unreliable, the process of generating that explanation contains vital clues.
Methodology: Beyond the Final Subgraph
We propose a defense mechanism that extracts seven novel metrics from the secondary outputs and learning stages of the GNN explanation process:
- Prediction Confidence: Backdoored graphs often exhibit higher predicted probabilities due to the robust nature of the trigger.
- Explainability: Measures the reliance on the explanatory subgraph via the difference between positive and negative fidelity.
- Connectivity: The ratio of connected node pairs within the explanatory subgraph.
- Subgraph Node Degree Variance (SNDV): Variance of degrees within the identified subgraph.
- Node Degree Variance (NDV): Variance across the entire original graph.
- Elbow: The specific epoch where the explainer's loss curve flattens.
- Curvature: The sharpness of the loss curve at the "elbow" point.
By establishing baseline distributions for these metrics using a clean validation set, we can classify a graph as backdoored if it triggers a specific number of "positive" votes (the Number of Positive Metrics Required, or NPMR).
Experimental Evaluation
We evaluated our approach across five diverse benchmark datasets: MUTAG, AIDS, PROTEINS, IMDB-BINARY, and DBLP. To ensure a rigorous test, we also developed an adaptive backdoor attack. In this scenario, a generator GNN is trained specifically to produce triggers optimized to evade detection by standard GNN explainers.
Key Results
- High Detection Performance: Our composite metric achieved an F1 score of up to 0.906 for random triggers and 0.842 against adaptive triggers on the MUTAG dataset.
- Optimal Thresholding: Requiring 2 or 3 positive metrics out of 7 proved to be the most effective balance for minimizing false positives while maintaining high detection rates.
- The Strength Paradox: Interestingly, "stronger" attacks with larger triggers or higher success rates were easier to detect, as their explanation artifacts deviated more significantly from clean data.
Conclusion
This work demonstrates that the artifacts of the explanation process—the "journey" rather than the "destination"—are highly revealing of malicious intrusions. While computational overhead remains a challenge due to the need to run explainers on training data, this approach represents a significant step forward in securing GNNs. Future work will focus on optimizing these metrics for smaller datasets and exploring faster explainability methods to enhance scalability.
Summary updated