NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Defense-as-a-Service: Black-box Shielding against Backdoored Graph Models

Yuni LaiarXiv 2024 · DOI

TL;DR

This paper introduces GraphProt, a novel black-box defense mechanism designed to protect graph neural networks (GNNs) from backdoor attacks. GraphProt operates without needing access to the model's internal workings or requiring retraining, making it ideal for "defense-as-a-service" scenarios where businesses outsource their GNN models. It achieves this by analyzing input graphs to identify and filter out malicious "trigger" subgraphs before making predictions.

What Problem Does This Paper Address?

The increasing adoption of GNNs in various domains has led to a business model where companies outsource their GNN models to third-party providers (Machine Learning as a Service - MLaaS). This trend, however, introduces significant security risks, particularly backdoor attacks. In such attacks, malicious actors embed "triggers" into specific input graphs during training, causing the GNN to misclassify these poisoned inputs to a target label chosen by the attacker, while still performing normally on clean data. Existing defenses often require access to model internals (white-box), additional training data, or external tools, which are often infeasible in MLaaS settings due to privacy concerns and resource constraints. This paper addresses the need for a practical, black-box defense that can be deployed by businesses without compromising their intellectual property or requiring extensive computational resources.

Methods

GraphProt employs a three-step process for defending against backdoor attacks:

  1. Subgraph Anomaly Detection and Filtering: The core idea is that backdoor triggers often manifest as anomalous subgraphs with distinct topological structures or node features compared to normal data. GraphProt uses clustering techniques (spectral clustering for topology and Gaussian mixture models for features) to identify and filter out these potential trigger subgraphs and outlier nodes from the input graph. The assumption is that the malicious trigger constitutes a small fraction of the graph.
  2. Subgraph Sampling: After filtering, GraphProt samples multiple subgraphs from the remaining "clean" portion of the graph. Three strategies are proposed:
  3. Random Sampling (GraphProt-R): Randomly samples a proportion of nodes.
  4. Topology Sampling (GraphProt-T): Samples nodes based on spectral clustering of the graph's topology.
  5. Topology-Feature Sampling (GraphProt-TF): Combines topological sampling with feature sampling, selecting a subset of feature dimensions.
  6. Robust Prediction: The sampled subgraphs are then fed into the potentially backdoored victim model. The final prediction is determined by a majority vote among the predictions of these subgraphs. The intuition is that if the trigger is successfully filtered or only partially present in the sampled subgraphs, the majority of subgraph predictions will reflect the true label, thus overriding any malicious output from the backdoored model.

Datasets

The paper evaluates GraphProt on six benchmark datasets commonly used in graph classification tasks:

  • AIDS
  • ENZYMES
  • DHFR
  • NCI1
  • PROTEINS
  • COLLAB

For evaluation, two-thirds of the graphs from each dataset were used for training the victim models, and the remaining one-third for testing.

Key Insights and Ideas

  • Black-box Defense is Crucial for MLaaS: The paper highlights the practical necessity of black-box defenses that don't require model internals, aligning with real-world privacy and IP protection needs.
  • Triggers as Anomalies: The fundamental insight is that backdoor triggers often deviate from normal graph structures and features, making them detectable through anomaly detection techniques.
  • Subgraph Analysis for Robustness: By analyzing multiple subgraphs and aggregating their predictions, GraphProt can effectively mitigate the impact of localized triggers that might fool a full-graph prediction.
  • Trade-offs in Sampling Strategies: Different subgraph sampling strategies (random, topology, topology-feature) offer varying balances between defense effectiveness (ASR reduction) and preservation of clean accuracy (ACC). GraphProt-TF generally offers the strongest defense but might incur a slightly higher ACC drop.

Key Results

GraphProt demonstrates significant effectiveness in reducing backdoor attack success rates (ASR) while maintaining high accuracy on clean data.

  • ASR Reduction: GraphProt achieved an average ASR reduction of 86.48% across various attacks and datasets.
  • ACC Preservation: The reduction in accuracy on clean graphs was minimal, averaging 3.49%.
  • Comparison to Baselines: GraphProt consistently outperformed or matched other defense methods like GNNsecurer, RS, and Fine-pruning, especially under black-box conditions. Notably, GNNsecurer, while competitive, requires access to model-relevant information, making it less suitable for MLaaS.
  • Ablation Studies: Experiments showed that increasing the number of subgraphs (N) generally improves defense. The topology-feature sampling (GraphProt-TF) provided the best defense, and an optimal feature fraction of 0.8 was identified.

Limitations and Future Work

  • Computational Cost: While GraphProt is black-box, it still requires multiple model queries (N) for subgraph predictions, which can increase inference time compared to a single query.
  • Trigger Characteristics: The effectiveness of GraphProt relies on the assumption that triggers are indeed anomalous and can be filtered. Highly sophisticated or stealthy triggers might pose a challenge.
  • Future Work: The authors suggest exploring more advanced subgraph sampling strategies and further optimizing the anomaly detection and filtering mechanisms. Investigating the defense against more complex backdoor attack scenarios, such as those involving multiple triggers or adaptive attackers, would also be valuable.

Summary updated

BibTeX
@misc{lai2024defense,
  author = {Yuni Lai},
  title = {{Defense-as-a-Service: Black-box Shielding against Backdoored Graph Models}},
  year = {2024},
  eprint = {2410.04916},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.04916},
}
Figure