FedMIA: An Effective Membership Inference Attack Exploiting "All for One" Principle in Federated Learning

Gongxi Zhu, Donghao Li, Hanlin Gu, Yuxing Han, Yuan Yao, Lixin Fan · DOI

Abstract

Federated Learning (FL) is a promising approach for training machine learning models on decentralized data while preserving privacy. However, privacy risks, particularly Membership Inference Attacks (MIAs), which aim to determine whether a specific data point belongs to a target client's training set, remain a significant concern. Existing methods for implementing MIAs in FL primarily analyze updates from the target client, focusing on metrics such as loss, gradient norm, and gradient difference. However, these methods fail to leverage updates from non-target clients, potentially underutilizing available information. In this paper, we first formulate a one-tailed likelihood-ratio hypothesis test based on the likelihood of updates from non-target clients. Building upon this formulation, we introduce a three-step Membership Inference Attack (MIA) method, called FedMIA, which follows the "all for one"--leveraging updates from all clients across multiple communication rounds to enhance MIA effectiveness. Both theoretical analysis and extensive experimental results demonstrate that FedMIA outperforms existing MIAs in both classification and generative tasks. Additionally, it can be integrated as an extension to existing methods and is robust against various defense strategies, Non-IID data, and different federated structures.

Introduction

Federated Learning (FL) is designed to keep data local, sharing only model updates with a central server. Despite these privacy-preserving intentions, Membership Inference Attacks (MIAs) pose a significant threat. In an MIA, an adversary—often the central server—attempts to determine if a specific data point was part of a client's local training set.

Traditional MIAs in FL suffer from a critical limitation: they typically analyze the target client's updates in isolation. Without a clear baseline for how the model responds to unseen data (the "non-member" distribution), distinguishing between training samples and general samples becomes difficult. Previous attempts to solve this required auxiliary datasets to train "shadow models," an assumption that rarely holds in real-world federated environments.

The "All for One" Methodology

FedMIA overcomes these limitations by introducing the "All for One" principle. In a typical FL setup, the server receives updates from numerous clients simultaneously. Since these clients usually possess disjoint datasets, the updates from non-target clients provide a natural, real-time distribution of how the model behaves on data it has not seen.

Timeline of the FedMIA attack process across multiple communication rounds.

The attack follows a structured three-step process:

  1. Low-Dimensional Representation: High-dimensional gradients are mapped to a scalar metric. The authors propose two variants: FedMIA-I (based on model loss) and FedMIA-II (based on gradient cosine similarity).
  2. Distribution Estimation: The server aggregates updates from all non-target clients to estimate the non-member distribution ($Q_{out}$). A 3-sigma rule is applied to filter out potential outliers—clients who might coincidentally have the same data point—ensuring a clean baseline.
  3. Likelihood-Ratio Test: A one-tailed hypothesis test is performed. If the target client’s update is a statistical outlier relative to the estimated non-member distribution, it is classified as a "member." This confidence is further refined by averaging results across multiple communication rounds.

Experimental Evaluation

The effectiveness of FedMIA was tested on standard benchmarks (CIFAR-100, Tiny-ImageNet) and high-stakes medical data (DermNet). The evaluation spanned various architectures, including AlexNet, ResNet18, and Latent Diffusion Models.

Comparison of member and non-member distributions between standard MIAs and FedMIA.

As shown in Figure 1, FedMIA achieves significantly better separation between member and non-member distributions compared to existing MIAs. Key results include:

  • Superior Performance: On CIFAR-100 with AlexNet, FedMIA-II achieved a True Positive Rate (TPR) of ~67% at a 0.1% False Positive Rate (FPR), significantly higher than the ~54% achieved by the best baseline.
  • Defense Robustness: The attack remains potent against defenses like Differential Privacy (DP), gradient sparsification, and MixUp.
  • Temporal Advantage: The attack's accuracy improves as training progresses, leveraging the accumulation of information over hundreds of communication rounds.

Discussion and Insights

FedMIA reveals several critical vulnerabilities in current FL implementations. First, it highlights the server's unique position as a perfect observer capable of generating its own "shadow" distribution from live client updates. Second, it demonstrates that Non-IID data—often a challenge for FL performance—actually aids the attacker by making a target client's unique data stand out more clearly.

Furthermore, the attack is not limited to classification. In generative tasks using Diffusion Models, identifying member samples allowed for the reconstruction of images strikingly similar to private training data.

Conclusion and Future Work

While FedMIA is highly effective, it can be mitigated by Secure Aggregation (MPC/HE), which prevents the server from seeing individual client updates. However, due to the high computational cost of these methods, they are often omitted. This research underscores the urgent need for lightweight, efficient defenses that can protect against cross-client information leakage without the overhead of full cryptographic protocols.

Code available at: https://github.com/Liar-Mask/FedMIA

Summary updated

BibTeX
@inproceedings{zhu2025fedmia,
  author = {Gongxi Zhu and Donghao Li and Hanlin Gu and Yuxing Han and Yuan Yao and Lixin Fan},
  title = {{FedMIA: An Effective Membership Inference Attack Exploiting "All for One" Principle in Federated Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01922},
}
Figure