Rethinking Backdoor Attacks

Alaa Khaddaj, Guillaume Leclerc, Aleksandar Makelov, Kristian Georgiev, Hadi Salman, Andrew Ilyas, Aleksander Madry

Introduction

In a standard backdoor attack, an adversary inserts maliciously constructed examples into a training set to make the resulting machine learning model vulnerable to targeted manipulation. Traditionally, defending against these attacks has involved treating the inserted examples as statistical outliers and using robust statistics to detect and remove them.

This paper challenges that conventional wisdom. The authors argue that without prior structural information about the training data distribution, backdoor triggers are fundamentally indistinguishable from naturally occurring features. Instead of viewing them as outliers, the authors propose a paradigm shift: backdoor triggers should be understood as the strongest features in the dataset. Guided by this perspective, they develop a novel detection algorithm with theoretical guarantees that identifies and removes malicious inputs with high precision.

The Flaw in the "Outlier" Assumption

In a typical backdoor attack, an adversary adds a specific "trigger" (such as a small pixel patch) to a fraction of the training data and alters their labels to a target class. At test time, the model behaves normally on clean data but is forced to make a specific, incorrect prediction whenever it encounters the trigger.

Standard Backdoor Attack

Historically, researchers have treated these backdoored examples as anomalies that don't belong in the natural data distribution. However, the authors point out a critical flaw in this logic: without knowing the exact structure of "natural" data, it is impossible to prove a trigger isn't just a rare, valid feature. Existing defenses often rely on hidden assumptions—such as backdoors being separable in a model's latent space—which adaptive attackers can easily bypass.

The Indistinguishability Argument

To prove that outlier-based defenses are fundamentally limited, the authors demonstrate that an attacker can use "plausible" features as triggers. For example, an attacker could use images of cats wearing hats as the backdoor trigger. Because these images look completely natural, outlier-based anomaly detection fails.

Plausible Feature Trigger

This indistinguishability proves that detecting backdoors is essentially the same problem as identifying spurious correlations or overly strong natural features (like a specific background object that always correlates with a certain class).

A New Perspective: Backdoors as "Super-Features"

If backdoors aren't outliers, what are they? The authors reframe the problem: a backdoor is simply a feature that is "too strong." A trigger is only useful to an attacker if it overpowers the natural features it competes with; otherwise, the model wouldn't prioritize it, and the attack would fail.

To turn this insight into a defense, the authors utilize three main components:

  1. Datamodels: They use a framework that approximates a model's output as a linear combination of its training samples. This estimates how much each individual training image contributes to the final prediction on a given test point.
  2. Feature Strength ($s_\phi$): They formally define "strength" as the rate at which a model’s performance on a feature improves as more examples of that feature are added to the training set. A successful backdoor must inherently possess high strength.
  3. The Detection Algorithm: The search for backdoors is framed as a "maximum-sum submatrix" problem—finding the subset of data that exerts the most powerful, outsized influence on the model. Because this is computationally NP-hard, they employ a greedy local search heuristic (inspired by the Kernighan-Lin algorithm) to flag the most influential training examples for removal.

Key Results

The proposed defense significantly outperforms traditional baselines like Activation Clustering (AC) and Spectral Signatures (SS), particularly against "clean-label" attacks where the images look normal and the labels are technically correct.

  • High Detection Accuracy: Evaluated primarily on CIFAR-10, the algorithm achieved an AUROC of over 90% in identifying backdoored examples in seven out of eight experimental setups.
  • Plummeting Attack Success Rate (ASR): In a "Dirty Label" attack scenario, the ASR dropped from 87.94% (with no defense) to a mere 0.81% using the authors' method, all while maintaining a high clean accuracy of 85.05%.
  • Clean-Label Resilience: Even in difficult clean-label scenarios where state-of-the-art defenses (like SPECTRE) struggled, this influence-based method reduced the ASR to near-zero levels.

Limitations and Future Directions

While highly effective, the approach has notable limitations:

  • Computational Overhead: Building the datamodels requires training a massive number of models (100,000 ResNet-9 models were used in this study). Although optimized libraries like FFCV can train these rapidly, it remains a significant resource hurdle for larger datasets like ImageNet.
  • The Assumption of Strength: The defense fundamentally assumes the backdoor is the strongest feature. If an attacker manages to create a very "weak" or subtle backdoor that only triggers under highly specific conditions, this algorithm might miss it (though such an attack would inherently be less reliable).
  • Scaling to Complex Domains: Applying this influence-based rethinking to Large Language Models (LLMs), where data distributions and feature interactions are vastly more complex, remains an open and exciting challenge for future research.

Summary updated

BibTeX
@inproceedings{khaddaj2023rethinking,
  author = {Alaa Khaddaj and Guillaume Leclerc and Aleksandar Makelov and Kristian Georgiev and Hadi Salman and Andrew Ilyas and Aleksander Madry},
  title = {{Rethinking Backdoor Attacks}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=V0ydUD8aW4},
}
Figure