Protecting against simultaneous data poisoning attacks

Neel Alex, Shoaib Ahmed Siddiqui, Amartya Sanyal, David Krueger

Most backdoor defenses assume a machine learning model is only subjected to a single attack at a time. However, real-world web-scraped datasets can harbor multiple simultaneous poisoning attacks. This paper demonstrates that existing defenses fail completely in this "multi-attack" scenario and introduces BaDLoss, a novel defense that successfully detects and filters out multiple concurrent backdoors by analyzing the unique loss trajectories of training examples over time.

The Threat of Multiple Backdoors

Deep learning models are increasingly trained on massive, uncurated datasets scraped from the internet. This makes them highly vulnerable to data poisoning, specifically backdoor attacks. In a backdoor attack, an adversary alters a small fraction of the training data by injecting a specific trigger (like a hidden pattern or a small patch) and changing the label. The resulting model performs normally on clean data but misbehaves predictably whenever the trigger is present.

Historically, researchers have evaluated backdoor defenses against one attack at a time. However, a massive internet dataset could easily be poisoned by multiple independent attackers using different triggers. The authors demonstrate that it is entirely feasible to install multiple backdoors into a single model simultaneously without degrading its normal performance. Worse, they reveal that state-of-the-art backdoor defenses completely break down when faced with multiple simultaneous attacks because the statistical assumptions those defenses rely on (e.g., looking for a single outlier class) no longer hold true.

BaDLoss: Detection via Loss Dynamics

To combat this, the authors introduce BaDLoss (Backdoor Detection via Loss Dynamics). Instead of looking at the final model weights or activations, BaDLoss looks at how the model learns individual examples over time.

BaDLoss Pipeline
  1. Pre-training & Tracking: The defender trains the model for a short period (e.g., 30% of the total planned epochs). During this time, the system records the "loss trajectory" (the loss value at each epoch) for every single training example.
  2. The Clean Anchor: The defender must have access to a very small, trusted set of bona fide clean examples (e.g., just 250 images).
  3. Anomaly Scoring: BaDLoss treats each example's loss trajectory as a vector. It calculates an anomaly score for every image in the dataset based on its L2 distance to the trajectories of the nearest bona fide clean examples.
  4. Filtering & Retraining: Examples with the most anomalous trajectories (e.g., the top 40% furthest from the clean baseline) are flagged as poisoned and thrown out. The model is then retrained from scratch on the remaining, sanitized dataset.

Key Insights: Why BaDLoss Works

  • Attacks can be synergistic: When multiple backdoors are installed at once, they don't just coexist; they can actually exhibit positive interference. For example, a single-pixel attack that fails when deployed alone achieved a 90% success rate when deployed alongside other attacks on GTSRB.
  • Why existing defenses fail: Previous defenses rely on rigid assumptions. For instance, Activation Clustering assumes that a poisoned class will split cleanly into exactly two activation clusters (clean and poisoned). If a class is hit by multiple different attacks, it creates many clusters, breaking the detection algorithm.
  • Poisoned data learns differently: Because backdoor images contain unnatural features or mismatched labels, their loss trajectories look different from clean data. However, they don't all follow the same pattern. Some attacks are learned much faster than clean data, while others are learned much slower.
Loss Trajectories of Backdoors vs Clean Data

BaDLoss succeeds because it looks at the entire shape of the learning curve, whereas prior methods (like Anti-Backdoor Learning) only check if the loss is unusually low at one specific epoch.

Experimental Results

The authors evaluated their method on standard computer vision benchmarks (CIFAR-10, GTSRB, Imagenette, and ImageNet-1k).

  • Multi-Attack Superiority: In the multi-attack setting, BaDLoss drastically outperformed existing defenses. It reduced the average Attack Success Rate (ASR) to 7.98% on CIFAR-10, 10.29% on GTSRB, and 19.17% on Imagenette. By comparison, the average ASRs for other defenses were dismal: 63.44%, 74.83%, and 41.74%, respectively.
  • Scalability: BaDLoss successfully scaled to ImageNet-1k, dropping the average ASR of multiple attacks from 88.57% (undefended) to 15.61%.
  • Clean Accuracy Trade-off: Because BaDLoss aggressively filters out a large chunk of the dataset (up to 40% in these experiments to ensure all attacks are caught), it does cause a minor drop in clean accuracy. For example, on CIFAR-10, clean accuracy dropped from ~91.7% (undefended) to ~88.4%.

Limitations and Future Work

  • Impact on Minority Classes: Throwing away large portions of the dataset disproportionately harms the "long tail" of data. In imbalanced datasets like GTSRB, rare clean examples naturally have erratic loss curves and are more likely to be falsely flagged as backdoors by BaDLoss.
  • Training Instabilities: Multiple simultaneous attacks can cause sudden spikes in training loss, which adds noise to the trajectory distance calculations.
  • Adaptive Attacks: A highly informed attacker could theoretically design a complex backdoor optimization process that forces the poisoned data to perfectly mimic the loss trajectory of clean data, evading BaDLoss (though this would be computationally exhausting).
  • Future Work: The authors suggest that instead of simply throwing away flagged data and retraining from scratch, BaDLoss's detection mechanism could be paired with surgical "machine unlearning" techniques to preserve higher clean accuracy.

Summary updated

BibTeX
@inproceedings{alex2025protecting,
  author = {Neel Alex and Shoaib Ahmed Siddiqui and Amartya Sanyal and David Krueger},
  title = {{Protecting against simultaneous data poisoning attacks}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=rK0YJwL69S},
}
Figure