Friendly Noise against Adversarial Noise: A Powerful Defense against Data Poisoning Attacks

Tian Yu Liu, Yu Yang, Baharan MirzasoleimanarXiv 2022

Abstract

A powerful category of (invisible) data poisoning attacks modify a subset of training examples by small adversarial perturbations to change the prediction of certain test-time data. Existing defense mechanisms are not desirable to deploy in practice, as they often either drastically harm the generalization performance, or are attack-specific, and prohibitively slow to apply. Here, we propose a simple but highly effective approach that unlike existing methods breaks various types of invisible poisoning attacks with the slightest drop in the generalization performance. We make the key observation that attacks introduce local sharp regions of high training loss, which when minimized, results in learning the adversarial perturbations and makes the attack successful. To break poisoning attacks, our key idea is to alleviate the sharp loss regions introduced by poisons. To do so, our approach comprises two components: an optimized friendly noise that is generated to maximally perturb examples without degrading the performance, and a randomly varying noise component. The combination of both components builds a very light-weight but extremely effective defense against the most powerful triggerless targeted and hidden-trigger backdoor poisoning attacks, including Gradient Matching, Bulls-eye Polytope, and Sleeper Agent. We show that our friendly noise is transferable to other architectures, and adaptive attacks cannot break our defense due to its random noise component.

Introduction

Deep learning models are increasingly vulnerable to data poisoning attacks, where an adversary injects subtly modified examples into the training set. These "invisible" perturbations are designed to create backdoors or triggers, causing the model to fail predictably on specific test-time targets while appearing normal to human observers.

Existing defenses typically suffer from a "trilemma": they either significantly degrade clean-data accuracy, are computationally too expensive for practical use, or are overly specific to certain attack types. To address these challenges, we introduce FRIENDS (Friendly Noise Defense), a lightweight and robust framework that neutralizes sophisticated poisons with minimal impact on model performance.

The FRIENDS Defense

The core philosophy of FRIENDS is to "smooth out" the training process, preventing the model from converging on the sharp adversarial patterns introduced by poisons. The defense consists of two synergistic components:

  1. Optimized Friendly Noise: Early in training (e.g., epoch 5), the algorithm identifies the maximum perturbation possible for each image that does not alter the model's prediction. This is achieved by minimizing the KL-divergence between original and perturbed outputs. This "friendly" noise naturally occupies the "robust" regions of an image—areas where the model is highly confident and less sensitive to change.
  2. Randomly Varying Noise: At every training iteration, a small amount of random noise (Bernoulli, Gaussian, or Uniform) is added on top of the friendly noise. This creates a moving target, making it computationally impossible for an attacker to bypass the defense.
Visualizing the components of the FRIENDS defense: original images, adversarial poisons, and the proposed friendly noise.

Key Insights: The Sharpness Observation

A critical discovery in our work is that effective poisoning attacks create "local sharp regions" of high training loss. During standard training, models naturally "fall" into these sharp valleys, effectively learning the poison. FRIENDS works by filling in or smoothing these valleys, as illustrated in the loss landscapes below.

Loss landscapes illustrating the sharp regions (a, b) introduced by poisoning attacks and the training loss (c) that the defense seeks to smooth.

By occupying robust pixel regions with friendly noise, we prevent adversarial noise from taking root. The addition of randomness further ensures that even an adaptive attacker—one with full knowledge of the defense—cannot reliably calculate a bypass, as the search space for a successful attack becomes $2^p$ combinations (where $p$ is the number of pixels).

Empirical Results

We evaluated FRIENDS primarily on the CIFAR-10 benchmark across various architectures including ResNet-18, AlexNet, and LeNet. Key findings include:

  • Superior Protection: Against "Gradient Matching" attacks, FRIENDS reduced the poison success rate to 0% while maintaining a high test accuracy of 91.52% (a negligible ~2% drop from a clean baseline).
  • Efficiency: FRIENDS is remarkably fast, completing its defense in 37 minutes—roughly 7.3x faster than state-of-the-art alternatives like Adversarial Poisoning (AP), which required 4.5 hours.
  • Transferability: Friendly noise generated on a small model (e.g., LeNet) can effectively protect a much larger model (e.g., ResNet-18), allowing for efficient cross-architecture deployment.
  • Adaptive Robustness: The unpredictable nature of the random noise component successfully thwarted adaptive attacks designed to circumvent the defense.

Conclusion

FRIENDS offers a powerful, lightweight, and generalizable shield against data poisoning. While currently demonstrated on image classification, its fundamental approach of smoothing loss landscapes via optimized and random noise provides a promising path for securing models in other domains. Future work will explore the scalability of this method to larger datasets like ImageNet and its applicability to Natural Language Processing.

Summary updated

BibTeX
@misc{liu2022friendly,
  author = {Tian Yu Liu and Yu Yang and Baharan Mirzasoleiman},
  title = {{Friendly Noise against Adversarial Noise: A Powerful Defense against Data Poisoning Attacks}},
  year = {2022},
  eprint = {2208.10224},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.10224},
}
Figure