Practical Bayes-Optimal Membership Inference Attacks

Marcus Lassila, Johan Östman, Khac-Hoang Ngo, Alexandre Graell i Amat

Introduction

As machine learning models are increasingly deployed on sensitive data, the risk of information leakage has become a primary concern for privacy researchers. One of the most significant threats is the Membership Inference Attack (MIA), where an adversary attempts to determine whether a specific data point was part of a model's training set. While empirical attacks like LiRA and RMIA have demonstrated high efficacy, they often lack a rigorous theoretical foundation or require prohibitive computational resources.

In this work, researchers from Chalmers University and AI Sweden bridge the gap between theoretical optimality and practical application. By deriving the "Bayes-optimal" attack—the theoretically superior decision rule—they introduce two high-performance frameworks: BASE (Bayes-Approximate membership Status Estimation) and G-BASE, specifically designed for standard and graph-structured data respectively.

The Challenge of Bayes-Optimality

A Bayes-optimal attack represents the best possible guess an adversary can make given the available information. While the theoretical framework for such an attack has existed for independent and identically distributed (i.i.d.) data, it was historically considered mathematically intractable. Furthermore, extending this framework to Graph Neural Networks (GNNs) presents a unique challenge: data points (nodes) in a graph are interconnected. Removing a single node alters the structural context for its neighbors, breaking the independence assumption that most privacy audits rely upon.

Methodology: BASE and G-BASE

The authors address these challenges by deriving a closed-form expression for the posterior probability of membership and then developing practical approximations.

1. BASE (Bayes-Approximate membership Status Estimation)

Designed for standard i.i.d. data (such as images), BASE simplifies the complex Bayes-optimal rule into a practical scoring function. This score compares the target model's loss on a specific sample against the average loss observed across "shadow models"—models trained on similar data distributions.

A significant theoretical contribution of this paper is the formal link established between BASE and the existing RMIA (Robust Membership Inference Attack). The authors prove that RMIA is a specific case of the BASE framework, providing a principled Bayesian justification for a method that was previously viewed as purely empirical.

2. G-BASE (Graph-BASE)

G-BASE extends these principles to the complex domain of GNNs. It is the first statistic-based attack to formally exploit the "neighborhood effect": the idea that a node's presence in a training set influences the model's predictions not just for that node, but for all its connected neighbors. To manage the computational complexity of graph dependencies, G-BASE utilizes sampling techniques like Gibbs sampling and Metropolis-Hastings to estimate the membership status of the surrounding graph structure.

Experimental Evaluation

The attacks were evaluated across a broad spectrum of benchmarks to test both performance and scalability:

  • Graph Datasets: Citation networks (Cora, Citeseer, Pubmed), social/collaborative networks (Flickr, Github), and product networks (Amazon-Photo).
  • i.i.d. Datasets: Standard image benchmarks (CIFAR-10 and CIFAR-100).

Key Results and Insights

  • State-of-the-Art Performance: G-BASE significantly outperforms previous classifier-based attacks on GNNs. It particularly excels in the "high-confidence" zone—achieving a high True Positive Rate (TPR) even at extremely low False Positive Rates (FPR), such as 0.1%. This is the most critical metric for practical privacy auditing.
  • Extreme Efficiency: One of the most striking findings is that BASE is 20x to 200x faster than RMIA. While RMIA requires querying the model against a large portion of the population data, BASE only requires a single query of the target sample, making it far more viable for large-scale audits.
  • Scalability and Robustness: As datasets increase in size and complexity (e.g., Github or Pubmed), BASE and G-BASE maintain a performance lead over prior methods like LiRA. Furthermore, the attacks remain effective even when the adversary has incorrect assumptions about the target model's architecture or optimization process.

Limitations and Future Outlook

Despite its performance, G-BASE faces a computational bottleneck. Calculating the "neighborhood loss" for thousands of nodes is currently difficult to parallelize, making it slower than its i.i.d. counterpart. Additionally, the effectiveness of G-BASE is tied to the fidelity of the graph sampling; improved sampling strategies could potentially increase the attack's potency.

While the study tested datasets up to 90,000 nodes, real-world social graphs often involve billions of connections. Scaling these Bayesian approximations to such massive scales remains an open and vital challenge for the privacy community. By providing a theoretical anchor for membership inference, this research sets a new standard for how we measure and mitigate data leakage in machine learning.

Summary updated

BibTeX
@inproceedings{lassila2025practical,
  author = {Marcus Lassila and Johan Östman and Khac-Hoang Ngo and Alexandre Graell i Amat},
  title = {{Practical Bayes-Optimal Membership Inference Attacks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=QLQqMndNoL},
}
Figure