Batch Label Inference and Replacement Attacks in Black-Boxed Vertical Federated Learning

Yang Liu, Tianyuan Zou, Yan Kang, Wenhan Liu, Yuanqin He, Zhihao Yi, Qiang Yang

Abstract

In a vertical federated learning (VFL) scenario where features and model are split into different parties, communications of sample-specific updates are required for correct gradient calculations but can be used to deduce important sample-level label information. An immediate defense strategy is to protect sample-level messages communicated with Homomorphic Encryption (HE), and in this way only the batch-averaged local gradients are exposed to each party (termed black-boxed VFL). In this paper, we first explore the possibility of recovering labels in the vertical federated learning setting with HE-protected communication, and show that private labels can be reconstructed with high accuracy by training a gradient inversion model. Furthermore, we show that label replacement backdoor attacks can be conducted in black-boxed VFL by directly replacing encrypted communicated messages (termed gradient-replacement attack). As it is a common presumption that batch-averaged information is safe to share, batch label inference and replacement attacks are a severe challenge to VFL. To defend against batch label inference attack, we further evaluate several defense strategies, including confusional autoencoder (CoAE), a technique we proposed based on autoencoder and entropy regularization. We demonstrate that label inference and replacement attacks can be successfully blocked by this technique without hurting as much main task accuracy as compared to existing methods.

Introduction

Vertical Federated Learning (VFL) enables multiple organizations to collaboratively train a machine learning model using vertically partitioned data—where different parties hold different features for the same set of users. To safeguard privacy, many VFL frameworks adopt a "black-box" approach using Homomorphic Encryption (HE) to mask individual updates, revealing only batch-averaged gradients to the participating parties.

This research challenges the prevailing assumption that these batch-averaged summaries are inherently secure. The authors demonstrate that a curious or malicious passive party can still reconstruct private labels and even manipulate the global model through sophisticated inversion and replacement attacks.

Vulnerabilities in Black-Boxed VFL

The paper identifies two primary security threats inherent in the standard VFL architecture: batch label inference and gradient-replacement backdoor attacks.

Batch Label Inference via Gradient Inversion

A passive party can recover private labels held by the active party through a technique called gradient inversion. By setting up a local internal model to simulate gradients and minimizing the difference between these simulations and the observed batch-averaged gradients, an attacker can "guess" the true labels with high precision.

Overview of the VFL architecture showing Batch Label Inference (B) and the proposed CoAE defense (C).

A key insight of this work is the "Dimensionality Trap." Theorem 1 proves that if the training batch size is smaller than the dimension of the final feature embedding, labels are mathematically leaked through the gradients. In practice, the sign of the gradient often serves as a primary indicator, as elements corresponding to the true label typically exhibit an opposite sign compared to others.

Label recovery accuracy across different batch sizes and class counts for MNIST and NUSWIDE datasets.

Gradient-Replacement Backdoor Attack

While HE provides confidentiality, it does not inherently provide integrity. A malicious passive party can exploit the additive properties of HE to replace the encrypted intermediate results of a "poisoned" sample with those of a known "target" sample. This allows the attacker to inject a backdoor—such as a specific trigger pattern that forces a target classification—without the active party detecting the tampering.

Proposed Defense: Confusional Autoencoder (CoAE)

To counter these threats, the authors introduce the Confusional Autoencoder (CoAE). Traditional defenses like Differential Privacy (DP) often degrade model utility by adding random noise. In contrast, CoAE uses "confusion"—a structured transformation that maps labels to "soft fake labels."

By employing an autoencoder with entropy regularization, the active party transforms discrete labels into a distribution designed to be as ambiguous as possible to an attacker (e.g., mapping a specific class to a balanced multi-class distribution). This approach preserves the underlying relationships necessary for the main learning task while effectively thwarting gradient inversion attempts.

Key Results and Conclusion

The researchers evaluated their findings on standard benchmarks including MNIST, CIFAR-10/100, and NUS-WIDE:

  • Attack Success: The gradient inversion attack achieved over 90% reconstruction accuracy on CIFAR datasets, even with relatively large batch sizes.
  • Defense Performance: CoAE significantly outperformed DP and Gradient Sparsification. On MNIST, CoAE maintained main task accuracy above 98% while reducing label inference to near-random levels, whereas DP caused significant accuracy drops to achieve similar protection.

In conclusion, the study highlights that batch-averaged gradients in VFL are not a silver bullet for privacy. The proposed CoAE defense offers a robust alternative to noise-based methods, providing a better balance between security and model utility in federated environments.

Summary updated

Abstract

In a vertical federated learning (VFL) scenario where features and model are split into different parties, communications of sample-specific updates are required for correct gradient calculations but can be used to deduce important sample-level label information. An immediate defense strategy is to protect sample-level messages communicated with Homomorphic Encryption (HE), and in this way only the batch-averaged local gradients are exposed to each party (termed black-boxed VFL). In this paper, we first explore the possibility of recovering labels in the vertical federated learning setting with HE-protected communication, and show that private labels can be reconstructed with high accuracy by training a gradient inversion model. Furthermore, we show that label replacement backdoor attacks can be conducted in black-boxed VFL by directly replacing encrypted communicated messages (termed gradient-replacement attack). As it is a common presumption that batch-averaged information is safe to share, batch label inference and replacement attacks are a severe challenge to VFL. To defend against batch label inference attack, we further evaluate several defense strategies, including confusional autoencoder (CoAE), a technique we proposed based on autoencoder and entropy regularization. We demonstrate that label inference and replacement attacks can be successfully blocked by this technique without hurting as much main task accuracy as compared to existing methods.
BibTeX
@misc{liu2021batch,
  author = {Yang Liu and Tianyuan Zou and Yan Kang and Wenhan Liu and Yuanqin He and Zhihao Yi and Qiang Yang},
  title = {{Batch Label Inference and Replacement Attacks in Black-Boxed Vertical Federated Learning}},
  year = {2021},
  eprint = {2112.05409},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.05409},
}
Figure