Node-Level Membership Inference Attacks Against Graph Neural Networks

Xinlei He, Rui Wen, Yixin Wu, Michael Backes, Yun Shen, Yang Zhang

Abstract

Many real-world data comes in the form of graphs, such as social networks and protein structure. To fully utilize the information contained in graph data, a new family of machine learning (ML) models, namely graph neural networks (GNNs), has been introduced. Previous studies have shown that machine learning models are vulnerable to privacy attacks. However, most of the current efforts concentrate on ML models trained on data from the Euclidean space, like images and texts. On the other hand, privacy risks stemming from GNNs remain largely unstudied. In this paper, we fill the gap by performing the first comprehensive analysis of node-level membership inference attacks against GNNs. We systematically define the threat models and propose three node-level membership inference attacks based on an adversary's background knowledge. Our evaluation on three GNN structures and four benchmark datasets shows that GNNs are vulnerable to node-level membership inference even when the adversary has minimal background knowledge. Besides, we show that graph density and feature similarity have a major impact on the attack's success. We further investigate two defense mechanisms and the empirical results indicate that these defenses can reduce the attack performance but with moderate utility loss.

Introduction

Membership Inference Attacks (MIA) pose a significant privacy risk by determining whether a specific data point was used to train a target model. While extensively studied in Euclidean domains like computer vision and natural language processing, the privacy implications for Graph Neural Networks (GNNs) remain largely unexplored. Unlike independent data points, nodes in a graph are defined by both their intrinsic features and their structural relationships with neighbors. This study presents the first comprehensive analysis of node-level MIA against GNNs, investigating whether graph structure serves to protect or expose sensitive membership information.

Methodology

The research defines threat models across three dimensions: knowledge of the shadow dataset, the shadow model architecture, and the node topology. To execute the attack, a "shadow modeling" technique is employed, where an adversary trains a surrogate model on a similar dataset to distinguish the output distributions of members versus non-members.

Overview of the node-level membership inference attack framework, illustrating the use of shadow models to train an attack model.

Three distinct attack methodologies are proposed based on varying levels of topological access:

  1. 0-hop Attack ($\mathcal{A}_0$): The adversary queries the target GNN using only the target node’s features, treating it as an isolated node.
  2. 2-hop Attack ($\mathcal{A}_2$): The adversary queries the GNN using the target node along with its 2-hop neighborhood structure and features.
  3. Combined Attack ($\mathcal{A}_c$): A hybrid approach that aggregates posteriors from both 0-hop and 2-hop queries into a multi-layer perceptron (MLP) for final prediction.

Experimental Results

The attacks were evaluated on four benchmark datasets (Cora, Citeseer, Cora-full, and LastFM Asia) against three popular GNN architectures: GraphSAGE, Graph Attention Network (GAT), and Graph Isomorphism Network (GIN).

Key findings include:

  • High Attack Success: The attacks consistently outperformed random guessing. For instance, on the Citeseer dataset with GraphSAGE, the 0-hop attack achieved an accuracy of 0.791.
  • The Neighborhood Noise Paradox: Counter-intuitively, the 0-hop attack often outperformed the 2-hop attack. This suggests that 2-hop neighborhoods, which often contain a mix of members and non-members, introduce noise that can obscure the membership signal during GNN aggregation.
  • Overfitting Correlation: Vulnerability to MIA is strongly correlated with the degree of model overfitting. Higher overfitting levels generally lead to higher attack accuracy.

Analysis of Privacy Vulnerabilities

Structural properties of the graph significantly influence attack success. Nodes located in dense subgraphs (high ego density) are more vulnerable because they participate more frequently in the message-passing training process, leading to deeper memorization by the model. Furthermore, high feature similarity among neighbors (homophily) acts as a privacy leak, making it easier for attackers to identify training set members.

Comparison of 0-hop and 2-hop attack performance (AUC) across different node degrees and datasets, highlighting the superior performance of simpler 0-hop attacks.

Conclusion and Future Work

This study demonstrates that GNNs are highly susceptible to node-level membership inference. While defense mechanisms like Random Edge Addition and Label-Only Output can mitigate these risks, they often result in significant utility loss for the primary task. Future research is needed to explore the impact of intermediate topologies (e.g., 1-hop subgraphs) and to develop privacy-preserving GNN training methods that maintain high model accuracy.

Summary updated

BibTeX
@misc{he2021node,
  author = {Xinlei He and Rui Wen and Yixin Wu and Michael Backes and Yun Shen and Yang Zhang},
  title = {{Node-Level Membership Inference Attacks Against Graph Neural Networks}},
  year = {2021},
  eprint = {2102.05429},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.05429},
}
Figure