Abstract
Current graph neural network (GNN) model-stealing methods rely heavily on queries to the victim model, assuming no hard query limits. However, in reality, the number of allowed queries can be severely limited. In this paper, we demonstrate how an adversary can extract a GNN with very limited interactions with the model. Our approach first enables the adversary to obtain the model backbone without making direct queries to the victim model and then to strategically utilize a fixed query limit to extract the most informative data. The experiments on eight real-world datasets demonstrate the effectiveness of the attack, even under a very restricted query limit and under defense against model extraction in place. Our findings underscore the need for robust defenses against GNN model extraction threats.
Introduction
Model stealing occurs when an adversary queries a victim’s API to train a "surrogate" model that mimics the original’s behavior. While this is a known threat, most existing research assumes the attacker has an "unlimited" budget—thousands or tens of thousands of queries. In reality, production APIs use rate-limiting and cost-prohibitive pricing to deter such behavior.
This research addresses the challenge of low-budget GNN model stealing. We investigate whether an adversary can still steal a GNN if they are limited to a tiny number of queries. The answer is a resounding yes, because GNNs have a structural property that adversaries can exploit: the separation of the feature-extracting "backbone" (encoder) from the task-specific "head."
Methodology
The proposed two-stage attack strategy minimizes interaction with the victim API by decoupling the acquisition of the encoder from the training of the classification head.
1. Obtaining the Encoder (The "Free" Backbone)
The adversary first obtains a high-quality model backbone without querying the victim:
- Inductive Setting: Surprisingly, a randomly initialized GNN encoder often produces structured, useful embeddings. An attacker can simply generate a random backbone.
- Transductive Setting: If the attacker has access to the graph structure (but no labels), they use Self-Supervised Learning (SSL)—specifically the LaGraph framework—to train an encoder locally. This requires zero queries to the victim.
2. Strategic Query Selection
Instead of randomly querying nodes, the attacker uses the embeddings from their local encoder to perform K-means clustering. They select the nodes closest to the cluster centroids to query the victim API. This ensures they sample the most representative parts of the data distribution, maximizing the information gained from a very limited query budget.
3. Training the Surrogate Head
The attacker receives class labels for their few selected queries and trains a simple Multi-Layer Perceptron (MLP) $g$ on top of their local encoder $f$. The training process uses the cross-entropy (CE) loss between the surrogate's predictions and the victim's responses.
Experimental Evaluation
The attack was evaluated across eight diverse, real-world graph datasets, including inductive (Reddit, PPI, WikiCS, Amazon, Coauthor) and transductive (Cora, Citeseer, Pubmed) settings. Victim models used architectures like SAGE and GAT, while surrogate models often used GCN or GIN, demonstrating cross-architecture stealing capabilities.
Key Results
- Massive Query Reduction: On the Physics dataset, the attack achieved 91% accuracy with only 100 queries. Previous state-of-the-art methods required roughly 5,000 queries to reach similar performance—a 50x improvement.
- High Fidelity with Tiny Budgets: In transductive settings like Cora, the attack reached high fidelity with as few as 10 queries.
- Resilience to Defense: The "Select" method remained robust against defenses that randomly flip 10% of the API's predictions, outperforming traditional end-to-end stealing methods.
Discussion
The success of this attack stems from two primary factors:
- The "Random Encoder" Phenomenon: In inductive GNNs, the graph's structural information (the adjacency matrix) is so powerful that even random weights in the encoder can produce embeddings that separate classes well.
- SSL as an Adversarial Tool: Self-supervised learning allows an adversary to "pre-train" their theft using local, unlabeled data, making the subsequent query-based theft of the "head" much more efficient.
Conclusion
This work reveals that GNNs are far more vulnerable to model stealing than previously thought, even under strict query limits. Current defenses, such as output perturbation, are insufficient against strategies that exploit the structural information GNNs leak. There is an urgent need for new defense mechanisms that protect the structural integrity of graph data.
Summary updated