Certified Robustness of Nearest Neighbors against Data Poisoning and Backdoor Attacks
Jinyuan JiaYupei LiuXiaoyu CaoNeil Zhenqiang Gong
Proves that the intrinsic majority voting mechanisms in standard nearest neighbor algorithms naturally provide certified defense guarantees against data poisoning and backdoor attacks that outperform existing specialized methods on MNIST and CIFAR-10.
Machine learning systems deployed in critical domains like cybersecurity and healthcare are increasingly vulnerable to data poisoning and backdoor attacks, where adversaries manipulate training datasets to corrupt model behavior. While recent defenses seek to provide certified robustness—guaranteeing a minimum model accuracy under bounded adversarial contamination—they rely on complex majority-voting ensembles that suffer from weak theoretical guarantees and certify inputs only on an isolated basis. The article demonstrates that classic nearest neighbor algorithms naturally possess certified robustness against both data poisoning and backdoor attacks, and introduces a novel framework to certify multiple predictions simultaneously.
The authors evaluate the intrinsic majority-vote mechanisms in k-nearest neighbors and radius nearest neighbors across standard benchmark datasets (MNIST and CIFAR-10) using empirical evaluations and theoretical proofs. To eliminate ambiguities in tie-breaking, the approach integrates deterministic hashing and systematic label-ranking schemes. Furthermore, the researchers formulate a joint certification technique—specifically enabled by radius nearest neighbors—that groups testing inputs to calculate stronger global accuracy guarantees than traditional individual evaluations allow.
The investigation yields several key findings: First, nearest neighbor methods substantially outperform leading certified defenses; under an attack modifying 1,000 training examples on MNIST, radius nearest neighbors achieved certified accuracies 22.9% and 40.8% higher than state-of-the-art ensemble baselines (bagging and deep partition aggregation, respectively). Second, each poisoned training example corrupts at most one nearest-neighbor voter in the worst case, compared to multiple corrupted voters in existing partition- or subsample-based defenses. Third, applying joint certification improves radius nearest neighbor certified accuracy by 15.1% under large-scale poisoning by accounting for collective attack constraints across distinct classes. Finally, combining nearest neighbor algorithms with self-supervised feature extraction (such as pre-trained CLIP representations) enhances certified performance by 43.0% under a 500-sample attack on CIFAR-10.
These findings indicate that organizations can establish simpler, provably secure machine learning baselines without training complex, compute-heavy ensemble models. A central practical trade-off exists when tuning neighborhood parameters: smaller neighborhood sizes or radii yield higher accuracy during normal operations but degrade faster under severe poisoning, whereas larger parameters ensure greater defensive resilience. For high-assurance deployments, organizations should leverage radius nearest neighbors combined with robust self-supervised feature extractors to maximize security against training pipeline tampering. Future work should focus on extending joint certification mechanisms to broader algorithmic architectures and exploring optimal distance metrics to further boost certified accuracy.
- Paper: BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chain, Tianyu Gu et al. (2017). Introduces the foundational concept and threat model of backdoor and Trojan attacks via poisoned training data in neural networks, which the source establishes certified defense guarantees against.
- Paper: Targeted Backdoor Attacks on Deep Learning Systems Using Data Poisoning, Xinyun Chen et al. (2017). Formulates targeted backdoor data poisoning attacks against deep learning classifiers, motivating the source's pursuit of provable certification against such training pipeline tampering.
- Paper: Poisoning Attacks against Support Vector Machines, Battista Biggio et al. (2012). Establishes foundational optimization-based data poisoning attacks on non-neural classifiers, providing the core threat model that the source aims to certifiably defend using nearest-neighbor algorithms.
- Paper: Certified Adversarial Robustness via Randomized Smoothing, Jeremy M Cohen et al. (2019). Pioneers majority-voting-based certification frameworks for robustness guarantees, providing theoretical context for the ensemble-based certified defenses that the source critiques and surpasses.
- Paper: Poison Frogs! Targeted Clean-Label Poisoning Attacks on Neural Networks, Ali Shafahi et al. (2018). Demonstrates clean-label targeted data poisoning attacks on neural networks, highlighting the vulnerability of standard training pipelines that nearest neighbor certification resolves.
- Paper: Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networks, Kang Liu et al. (2018). Presents early post-training pruning defenses against neural network backdoors, serving as foundational background for the vulnerabilities inherent in standard models under data tampering.
- Paper: Detecting Backdoors in Pre-trained Encoders, Shiwei Feng et al. (2023). Extends the protection of self-supervised representation encoders against backdoor attacks by introducing automated trigger inversion and detection directly on pre-trained embedding spaces.
- Paper: Reconstructive Neuron Pruning for Backdoor Defense, Yige Li et al. (2023). Develops a fine-grained post-training neuron pruning defense to remove backdoors from deep neural networks, offering a complementary empirical mitigation strategy to certified non-parametric defenses.
