CAFE: Catastrophic Data Leakage in Federated Learning

Xiao Jin, Ruijie Du, Pin‐Yu Chen, Tianyi Chen

Introduction

Federated Learning (FL) is widely regarded as a privacy-preserving paradigm because it allows multiple parties to train a shared model without exchanging raw data. Instead, only model updates, such as gradients, are shared. However, recent research has exposed vulnerabilities where these gradients can leak sensitive information. A common defense against such leakage is increasing the training batch size, under the assumption that averaging gradients over many samples makes individual data points harder to reconstruct.

In this paper, the authors challenge this assumption within the context of Vertical Federated Learning (VFL). In VFL, different organizations hold different features for the same set of users (e.g., a bank and a hospital sharing data about the same patient base). The authors introduce CAFE (Catastrophic Data Leakage in VFL), an attack that demonstrates how large batch sizes—previously considered a robust defense—fail to protect private data in VFL environments.

The CAFE Attack Framework

CAFE is a sophisticated three-step optimization-based attack designed to systematically reconstruct raw input data from shared gradients. Unlike previous methods that struggle with large batches, CAFE leverages the structural requirements of VFL to achieve high-fidelity reconstruction.

The three-step CAFE attack process: recovering layer gradients, internal representations, and finally the raw input data.

The attack follows these stages:

  1. Step I: Recovering Layer Gradients: The attacker (typically the server) recovers the gradients of the loss with respect to the outputs of the first fully connected (FC) layer.
  2. Step II: Recovering Internal Representations: Using the gradients from Step I, the attacker reconstructs the inputs to the first FC layer. The authors provide theoretical guarantees that this recovery converges to the ground truth.
  3. Step III: Data Reconstruction: Finally, the attacker uses these recovered internal representations as a powerful regularizer to guide the optimization of raw input pixels (e.g., images).

A critical vulnerability exploited by CAFE is data index alignment. Because VFL requires the server to coordinate which specific user IDs are in a batch across different workers, the attacker gains the exact indices needed to make the reconstruction equations solvable rather than underdetermined.

Empirical Evaluation and Results

The researchers evaluated CAFE against standard benchmarks including MNIST, CIFAR-10, Linnaeus 5, and the Yale Face Dataset. The results demonstrate a significant leap in attack capability compared to existing methods like DLG and SAPAG.

Visual comparison showing CAFE's superior ability to reconstruct high-quality images compared to other baseline attacks.

Key findings include:

  • Superior Quality: On MNIST, CAFE achieved a Peak Signal-to-Noise Ratio (PSNR) of approximately 43, while competing methods remained below 15. Higher PSNR indicates a more accurate reconstruction.
  • Breaking the Batch Size Defense: While previous attacks often failed with batch sizes larger than 8 or 16, CAFE maintained high reconstruction quality even with a batch size of 100.
  • Real-world Privacy Risk: The attack successfully reconstructed recognizable human faces from the Yale dataset, highlighting the severe privacy risks in sensitive domains like healthcare and finance.

Proposed Defense: Fake Gradients

To mitigate these risks, the authors propose a Fake Gradients defense. In this approach, workers send slightly perturbed versions of the true gradients. These "fake" gradients are designed to be close enough to the original to allow the model to converge during training, but different enough to mislead the CAFE optimization process. Experiments showed that this defense could reduce reconstruction PSNR from ~28 to ~7 on CIFAR-10, effectively neutralizing the attack without significantly impacting model accuracy.

Conclusion

CAFE reveals a fundamental privacy flaw in Vertical Federated Learning, proving that large batch sizes do not provide the expected security "safety net." By exploiting data index alignment and internal representation recovery, CAFE can reconstruct private data with alarming accuracy. This work underscores the need for more robust privacy-preserving mechanisms, such as the proposed Fake Gradients defense, to secure collaborative machine learning.

Summary updated

Abstract

Private training data can be leaked through the gradient sharing mechanism deployed in machine learning systems, such as federated learning (FL). Increasing batch size is often viewed as a promising defense strategy against data leakage. In this paper, we revisit this defense premise and propose an advanced data leakage attack to efficiently recover batch data from the shared aggregated gradients. We name our proposed method as \textit{\underline{c}atastrophic d\underline{a}ta leakage in \underline{f}ederated l\underline{e}arning (CAFE)}. Comparing to existing data leakage attacks, CAFE demonstrates the ability to perform large-batch data leakage attack with high data recovery quality. Experimental results on vertical and horizontal FL settings have validated the effectiveness of CAFE in recovering private data from the shared aggregated gradients. Our results suggest that data participated in FL, especially the vertical case, have a high risk of being leaked from the training gradients. Our analysis implies unprecedented and practical data leakage risks in those learning settings.
BibTeX
@misc{jin2021cafe,
  author = {Xiao Jin and Ruijie Du and Pin‐Yu Chen and Tianyi Chen},
  title = {{CAFE: Catastrophic Data Leakage in Federated Learning}},
  year = {2021},
}

Loading related content...

Figure