Towards Extracting Graph Neural Network Models via Prediction Queries (Student Abstract)

Bang Wu, Shirui Pan, Xingliang Yuan

Introduction

Graph Neural Networks (GNNs) have emerged as the state-of-the-art for processing data with complex relational structures, such as social networks, citation graphs, and recommendation systems. Given their high utility, these models are often deployed as proprietary "black boxes" via Machine Learning as a Service (MLaaS) platforms. However, this monetization strategy exposes GNNs to "Model Extraction Attacks," where an adversary attempts to replicate the functionality of a target model by querying its API.

The Challenge of GNN Extraction

While extraction attacks are well-understood for standard neural networks (e.g., image classifiers), GNNs present unique difficulties. In a standard NN, predictions for individual data points are independent. In contrast, a GNN’s prediction for a specific node depends heavily on its neighbors and the overall graph topology. An attacker typically only has access to a small, disconnected subset of the graph, making it difficult to capture the structural correlations that the target model relies on.

A Stealthy Extraction Framework

This paper proposes a framework for extracting GNN models that prioritizes stealth and structural reconstruction. The attack is designed to bypass anomaly detection by mimicking the behavior of legitimate users.

Overview of the GNN model extraction attack framework, showing the interaction between the attacker, the ML server, and the social network.

The attack follows a three-step process:

  1. Legitimate Querying: The attacker controls a set of "attack nodes" within the network. These nodes query the target GNN $f$ to obtain labels for their own features $x_q$.
  2. Node Synthesis: To bridge the gap between isolated attack nodes, the authors introduce a synthesis method. They create "synthetic nodes" whose attributes are a weighted combination of 1-hop and 2-hop neighbors, effectively reconstructing the missing structural context.
  3. Surrogate Training: Using the obtained labels and the reconstructed local graph structure, the attacker trains a surrogate GNN $f'$. This clone model learns to approximate the decision boundaries of the original model.

Experimental Evaluation

The attack was evaluated on three benchmark datasets: Cora (citation network), Citeseer (citation network), and Pubmed (diabetes research publications). The target models were standard two-layer Graph Convolutional Networks (GCNs).

Key Results

The primary metric for success is fidelity, defined as the percentage of predictions where the surrogate model matches the target model's output.

Fidelity of the surrogate model across Cora, Citeseer, and Pubmed datasets as the number of attack nodes increases.

The results demonstrate a significant vulnerability in GNNs:

  • High Fidelity: The attack successfully produced surrogate models with over 80% fidelity across all three datasets at higher query volumes.
  • Scaling Performance: On the Cora dataset, fidelity reached nearly 90% with only 700 queries.
  • Saturation: While increasing the number of attack nodes initially boosts performance, the gains eventually saturate, suggesting that a relatively small number of compromised nodes is sufficient for a successful extraction.

Conclusion

This research highlights that GNNs are susceptible to stealthy extraction attacks that leverage both node labels and local graph structure. The use of synthetic nodes to "fill in the blanks" of a partial graph is a particularly effective strategy. Future work should focus on developing adaptive defenses that can detect these subtle, structure-based query patterns and testing these vulnerabilities against more complex GNN architectures like Graph Attention Networks (GATs).

Summary updated

BibTeX
@inproceedings{wu2021towards,
  author = {Bang Wu and Shirui Pan and Xingliang Yuan},
  title = {{Towards Extracting Graph Neural Network Models via Prediction Queries (Student Abstract)}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i18.17959},
}
Figure