Abstract
Graph machine learning has advanced rapidly, with Graph Foundation Models (GFMs) marking a major step forward by jointly pretraining graph and text encoders on massive, diverse data. These models unify structural and semantic understanding, enabling zero-shot inference across various domains. However, the high pretraining cost and broad cross-domain knowledge in GFMs also make them attractive targets for model extraction attacks (MEAs). This paper presents the first systematic study of MEAs against GFMs. We introduce a lightweight extraction method that trains an attacker encoder using supervised regression of graph embeddings. Experiments show that an attacker can approximate a victim model using as little as 0.07% of its original training cost with almost no loss in accuracy, revealing significant security implications for large-scale graph learning systems.
Introduction
Graph Machine Learning (GML) has recently shifted from small, task-specific Graph Neural Networks (GNNs) to Graph Foundation Models (GFMs). These models, such as GraphCLIP, are pretrained on massive, heterogeneous datasets by aligning graph structures with natural language descriptions. Because they understand the "semantics" of a graph, they can perform zero-shot inference—making predictions on entirely new types of graphs they have never seen before.
However, GFMs are incredibly expensive to train, requiring massive compute and proprietary graph-text datasets. This makes them valuable intellectual property. This study investigates whether an adversary can "extract" the functionality of a GFM just by querying its API, effectively stealing the model's latent alignment.
The Victim: Graph Foundation Models
GFMs typically consist of a graph encoder and a text encoder aligned via contrastive learning. This alignment allows the model to map graph subgraphs and textual labels into a shared embedding space.
As shown in Figure 1, the pretraining phase is computationally intensive, requiring massive datasets of graph-text pairs. Once trained, the victim model can perform zero-shot classification by calculating the similarity between a target subgraph's embedding and various candidate text label embeddings.
MEA-GFM: The Extraction Framework
The authors introduce MEA-GFM, a lightweight extraction framework. The core strategy is surprisingly simple and operates under a black-box threat model where the attacker only has access to the victim's graph encoder output embeddings.
As illustrated in Figure 2, the attack proceeds in two main steps:
- Extract Domain Knowledge: Instead of trying to replicate the complex, expensive contrastive pretraining, the attacker trains a surrogate model using a Mean Squared Error (MSE) loss. They force the surrogate's output embeddings to match the victim's output embeddings for a given set of query subgraphs.
- Zero-Shot Inheritance: Because the victim GFM's embeddings are already aligned with a public, frozen text encoder (like MiniLM), the surrogate model automatically becomes aligned with that same text encoder. This allows the stolen model to perform zero-shot classification without the attacker ever seeing the victim's private training data.
Key Results and Efficiency
The study utilizes a wide array of Text-Attributed Graph (TAG) datasets, including OGBN-ArXiv, PubMed, and OGBN-Products for pretraining, and others like Cora and WikiCS for evaluation. The findings highlight a startling asymmetry between training and stealing:
- The Efficiency Gap: While the victim model (GraphCLIP) took 56 GPU hours to train, a high-quality surrogate could be trained in just 5 minutes (0.0833 hours), representing roughly 0.07% to 0.15% of the original cost.
- Fidelity: Surrogate models achieved an average classification accuracy gap of just 0.0015 compared to the victim. In some cases, the smaller surrogate actually outperformed the victim, likely due to the "student" model acting as a regularizer.
- Architecture Agnosticism: An attacker doesn't need to know the victim's architecture. Knowledge from a complex Graph Transformer was successfully stolen into much simpler architectures like GCNs and GATs.
Conclusion
These findings reveal that GFMs greatly expand the MEA surface. The ability to replicate high-value latent knowledge with minimal resources suggests that current GFM deployments require urgent security attention. Potential defenses include output perturbation, query rate limiting, and embedding watermarking to protect intellectual property without compromising model utility.
Summary updated