Defending Against Neural Network Model Inversion Attacks via Data Poisoning

Shuai Zhou, Dayong Ye, Tianqing Zhu, Wanlei Zhou

This paper, recently published by researchers from the City University of Macau and the University of Technology Sydney, introduces a clever "fight fire with fire" approach to machine learning privacy. By repurposing data poisoning—traditionally an attack vector—as a defensive shield, the authors provide a way to protect sensitive training data from being reconstructed by malicious actors, all without the need to retrain the original model.

TL;DR

The authors propose a retraining-free defense against model inversion attacks by using data poisoning to contaminate the training data of an adversary's reconstruction model. Their primary method, Label-Preserving Poisoning (LPA), uses gradient alignment to add subtle perturbations to model outputs that preserve classification accuracy while making data reconstruction nearly impossible.

What Problem Does This Paper Address?

Machine-Learning-as-a-Service (MLaaS) allows users to query trained models via APIs. However, these APIs often return "confidence vectors" (softmax outputs) that can be exploited through Model Inversion Attacks. In these attacks, an adversary queries the model thousands of times to build their own "inversion model" that learns to map those confidence scores back to the original, sensitive input data—such as private medical records or human faces.

Existing defenses typically fall into two categories:

  1. Regularization: Modifying the model during training to be less "invertible." This is effective but requires expensive retraining, which is impractical for large-scale, established models.
  2. Noise Injection: Adding random noise (like Differential Privacy) to the output vectors. While this protects privacy, it often degrades the model's utility (accuracy) because the noise is indiscriminate.

The authors aim to find a "sweet spot" that provides robust privacy without retraining and without sacrificing the model's primary purpose.

Methods

The core innovation is the Post-process Unit (PU), which sits between the trained classifier and the user. Instead of returning raw confidence vectors, the PU returns poisoned versions.

The pipeline of a model inversion attack and where defenses intervene.

The paper explores two specific strategies:

  • Label-Preserving Poisoning (LPA): This method perturbs all output vectors. Crucially, the perturbations are constrained so that the highest confidence score remains assigned to the correct class, ensuring zero loss in classification accuracy.
  • Label-Flipping Poisoning (LFP): This method selectively targets a small subset of vectors and intentionally flips their labels.

To make the poisoning effective, the authors use Gradient Alignment (inspired by the "Witches' Brew" attack). They use a substitute inversion model to calculate a "defensive gradient"—a direction in the parameter space that would lead to poor reconstruction. They then optimize the perturbations so that an attacker’s inversion model, when trained on this data, is forced to follow this defensive path.

Overview of the unified framework for LPA and LFP.

To solve the latency issue of optimizing perturbations on the fly, the authors also introduced a Variational Autoencoder (VAE) variant that can generate these protective perturbations in a single forward pass.

Datasets

The authors evaluated their defense on four standard benchmarks:

  • MNIST: Handwritten digits.
  • Fashion-MNIST: Clothing items.
  • CIFAR-10: General objects.
  • FaceScrub: A dataset of celebrity faces, used to demonstrate the defense's effectiveness against high-stakes identity reconstruction.

Key Insights and Ideas

  • Poisoning as a Shield: The most striking idea is treating the attacker as a "learner" and the defender as a "data provider." By poisoning the data the attacker needs to learn, the defender can break the reconstruction mapping before it's even built.
  • Targeted vs. Random Noise: Unlike Differential Privacy, which adds random noise, LPA uses targeted perturbations. This allows the defense to destroy the specific information useful for reconstruction while leaving the information useful for classification intact.
  • Indistinguishability: The authors used t-SNE and PCA to show that poisoned confidence vectors are statistically very similar to normal ones. This means an attacker cannot easily detect or filter out the poisoned samples.
  • Transferability: A key concern in security is whether a defense designed against one model architecture works against another. The authors found that perturbations optimized using a 5-layer CNN substitute model still successfully thwarted inversion models with different architectures (like 6-layer CNNs).

Key Results

  • Utility Preservation: On the FaceScrub dataset, LPA achieved 94.82% accuracy (identical to the undefended model) while the state-of-the-art retraining defense (MID) dropped to 93.94%.
  • Privacy Protection: Under LPA, the "Attack Accuracy" (the ability of the inversion model to correctly identify the reconstructed face) plummeted from 32.32% to just 5.08%.
  • Visual Degradation: As shown in Figure 4, reconstructions from an LPA-defended model are visually unrecognizable compared to the clear reconstructions possible without defense.
Reconstructed images under different defense strategies. LPA shows significant visual degradation.
  • Efficiency: Using the VAE-based approach, the defense adds only 0.34ms of latency per query, making it viable for real-time MLaaS applications.

Limitations and Future Work

  • LFP Ineffectiveness: The authors found that Label-Flipping (LFP) was significantly less effective than LPA. Poisoning only a small subset of data allows the inversion model to still learn the general mapping from the remaining clean data.
  • Architecture Mismatch: While the defense transfers well between similar CNN architectures, its effectiveness drops when the attacker uses a radically different architecture, such as a diffusion-based reconstruction model.
  • Future Directions: The authors suggest that using ensemble strategies (optimizing perturbations against multiple substitute models simultaneously) could further improve robustness against diverse and unknown attacker architectures.

Summary updated

BibTeX
@article{zhou2025defending,
  author = {Shuai Zhou and Dayong Ye and Tianqing Zhu and Wanlei Zhou},
  title = {{Defending Against Neural Network Model Inversion Attacks via Data Poisoning}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2025},
  doi = {10.1109/tnnls.2025.3554656},
}
Figure