Large Language Models Merging for Enhancing the Link Stealing Attack on Graph Neural Networks

Faqian Guan, Tianqing Zhu, Wenhan Chang, Wei Ren, Wanlei Zhou

TL;DR

This paper introduces a potent new method for "link stealing" attacks on Graph Neural Networks (GNNs) by leveraging the cross-domain reasoning of Large Language Models (LLMs). By employing a novel model merging strategy, the authors demonstrate that multiple attackers can collaboratively build a universal attack model that is highly effective even on datasets it has never seen before, all without ever sharing their private local data.

What Problem Does This Paper Address?

Graph Neural Networks are the workhorse of modern relational data, powering everything from social network recommendations to financial fraud detection. However, they are vulnerable to link stealing attacks, where an adversary tries to figure out if a connection (a "link") exists between two specific nodes just by querying the GNN and looking at its outputs.

Existing attack methods face two major hurdles:

  1. Dataset Rigidity: Most attacks are "single-dataset" affairs. Because different graphs have different feature dimensions and structures, a model trained to attack a social network graph usually can't be easily repurposed to attack a citation graph.
  2. Collaboration Barriers: In the real world, multiple attackers might want to pool their knowledge to create a stronger "super-attacker." However, due to privacy regulations and commercial interests, they cannot share their raw datasets.

Methods

The authors propose a two-step framework to overcome these challenges:

Step 1: LLMs as Attackers

Instead of using standard multi-layer perceptrons (MLPs), the authors use LLMs (like Vicuna-7B) as the attack engine. LLMs are naturally suited for cross-dataset tasks because their attention mechanisms can handle variable-length inputs and capture complex semantic relationships in node features.

The researchers designed a specific prompt structure that feeds the LLM the textual features of two nodes and their posterior probabilities (the GNN's output) to ask: "Do these two have a link?"

Fig. 3. Prompts designed for LLM-based link stealing attacks.

Step 2: Collaborative Model Merging

To allow attackers to collaborate without sharing data, the paper introduces a three-stage merging process for their fine-tuned LLMs:

  • Drop: Pruning redundant parameters that have little impact on performance, which helps the model generalize better.
  • Elect: A masking technique that filters out "abnormal" parameter updates by ensuring the merged model only keeps updates where the majority of individual models agree on the direction (sign) of the change.
  • Merge: A weighted averaging strategy. Instead of treating all models equally, it assigns higher weights to models trained on "unique" or "difficult" datasets (calculated using a MAX-MIN accuracy difference) to ensure the final model is robust across diverse domains.
Fig. 2. Overview of the proposed link stealing attack method. The upper section illustrates the service provider offering the target model for user access. The lower section details the attackers’ process of creating attack models using our proposed method. In Attacker Step 1, Attackers introduce LLMs and leverage their respective node features to fine-tune and develop multiple LLM-based link stealing attack models. In Attacker Step 2, the attackers, through model merging techniques, combine the strengths of these individual models to create a more robust merged LLM model for executing link stealing attacks.

Datasets

The method was evaluated on four benchmark GNN datasets:

  • Cora, Citeseer, and Pubmed: Standard citation network datasets.
  • Ogbn-arxiv: A much larger citation dataset used to test the scalability of the attack.

Key Insights and Ideas

  • LLMs Solve the Dimension Problem: Traditional neural networks fail when input dimensions change between datasets. Because LLMs tokenize input into a shared embedding space, they can "read" different graphs regardless of their original feature size.
  • Collaboration without Data Sharing: By sharing only model parameters (deltas) rather than raw data, attackers can bypass privacy regulations while still benefiting from a "collective intelligence."
  • Unseen Data Vulnerability: The most striking finding is that the merged model often performs better on a new, unseen dataset than a model specifically trained on a different single dataset. This suggests that "knowledge" about how GNNs leak information is transferable across domains.

Key Results

  • Superior Accuracy: The LLM-based attack consistently outperformed traditional methods. On the Ogbn-arxiv dataset, the proposed method achieved a staggering 97.48% accuracy and F1 score.
  • Cross-Dataset Success: An LLM attack model trained on Ogbn-arxiv could attack Cora with ~90% accuracy, whereas previous non-LLM methods struggled to even run on different datasets due to dimension mismatches.
  • Merging Effectiveness: The proposed weighted merging strategy (using the "Drop, Elect, Merge" pipeline) outperformed standard parameter averaging and other state-of-the-art merging techniques like TIES or DARE, especially on the more challenging Pubmed dataset.

Limitations and Future Work

  • Computational Cost: Fine-tuning and running inference on LLMs is significantly more resource-intensive than using simple MLPs. The authors acknowledge that deploying these models requires substantial computational infrastructure.
  • Textual Dependence: The current prompt design relies heavily on textual features (like titles and abstracts). It remains to be seen how well this generalizes to graphs that are purely numerical or lack semantic metadata.
  • Defense Strategies: While the paper focuses on the attack, the authors note that developing robust defenses against such "universal" LLM-based attacks is a critical next step for GNN privacy research.

Summary updated

BibTeX
@article{guan2025large,
  author = {Faqian Guan and Tianqing Zhu and Wenhan Chang and Wei Ren and Wanlei Zhou},
  title = {{Large Language Models Merging for Enhancing the Link Stealing Attack on Graph Neural Networks}},
  journal = {IEEE Trans. Dependable Secur. Comput.},
  year = {2025},
  doi = {10.1109/tdsc.2025.3591543},
}
Figure