Abstract
In a data poisoning attack, an attacker modifies, deletes, and/or inserts some training examples to corrupt the learnt machine learning model. Bootstrap Aggregating (bagging) is a well-known ensemble learning method, which trains multiple base models on random subsamples of a training dataset using a base learning algorithm and uses majority vote to predict labels of testing examples. We prove the intrinsic certified robustness of bagging against data poisoning attacks. Specifically, we show that bagging with an arbitrary base learning algorithm provably predicts the same label for a testing example when the number of modified, deleted, and/or inserted training examples is bounded by a threshold. Moreover, we show that our derived threshold is tight if no assumptions on the base learning algorithm are made. We evaluate our method on MNIST and CIFAR10. For instance, our method achieves a certified accuracy of 91.1% on MNIST when arbitrarily modifying, deleting, and/or inserting 100 training examples.
Introduction
Machine learning models are increasingly trained on user-provided data, making them vulnerable to data poisoning attacks. In these scenarios, an adversary manipulates the training set—by modifying, deleting, or inserting samples—to induce specific misclassifications in the resulting model.
While empirical defenses exist, they often fail against adaptive attackers. This work focuses on certified defenses, which provide mathematical guarantees that a model's prediction will remain unchanged as long as the number of poisoned samples stays below a calculated threshold. Unlike previous certified defenses that were often limited to specific algorithms or provided "loose" (overly conservative) guarantees, this paper explores the inherent robustness of a classic ensemble technique: Bagging.
Methodology
The core of this approach is Bootstrap Aggregating (Bagging). In this framework, multiple "base models" are trained on random subsamples of the original training dataset. The final prediction for a test instance is determined by a majority vote among these base models.
The authors' theoretical contribution involves several key steps:
- Probabilistic Analysis: The label predicted by a base classifier is treated as a random variable. The ensemble's robustness is tied to the "label probability"—the likelihood that a base model trained on a random subsample predicts a particular label.
- Neyman-Pearson Lemma: This lemma is employed to determine the worst-case shift in label probabilities when the training set is poisoned.
- Certified Poisoning Size ($r^*$): The researchers formulate an optimization problem to find the maximum number of poisoned samples ($r^*$) the ensemble can tolerate before the majority vote could potentially flip.
- Tightness Proof: They demonstrate that this derived threshold is "tight," meaning it represents the strongest possible guarantee without making further assumptions about the base learning algorithm.
- Estimation: To handle the computational complexity of exact probability calculation, a Monte Carlo algorithm (SimuEM) is used to estimate these probabilities with high statistical confidence.
Experimental Evaluation
The method was rigorously tested on standard computer vision benchmarks: MNIST and CIFAR-10, as well as a simplified MNIST 1/7 subset for comparison with prior art.
Key Results
- High Certified Robustness: On the MNIST dataset, the method achieved a 91.1% certified accuracy even when 100 training examples were poisoned (using $k=100$ subsample size and $N=1000$ base models).
- Superiority over Baselines: In head-to-head comparisons on MNIST 1/7, the bagging approach maintained high certified accuracy while previous state-of-the-art methods dropped to 0% certified accuracy under identical attack conditions.
- Efficiency and Scalability: Because base models are trained on small subsamples rather than the full dataset, the approach is significantly more efficient than defenses requiring multiple full-dataset training runs.
Discussion and Key Insights
The fundamental insight is that Bagging acts as a natural shield. If an attacker poisons a small fraction of the data, most random subsamples will not contain any poisoned points, ensuring the majority of base models remain "clean."
A critical parameter is the subsample size ($k$). A larger $k$ typically improves the accuracy of individual base models but reduces robustness, as it increases the probability that a poisoned sample is included in any given subsample. Furthermore, this approach is highly general; it works with any base learning algorithm, including deep neural networks and SVMs. The authors also noted that transfer learning can significantly boost certified accuracy by allowing base models to perform better even with small subsample sizes.
Limitations and Future Work
The certification strength depends on the "probability gap" between the top two predicted labels. If a model is uncertain, the certified poisoning size decreases. Future research directions include extending this framework to other data structures like graphs and utilizing meta-learning to enhance the performance of base classifiers trained on very small subsamples.
Summary updated