Abstract
Adversarially robust machine learning has received significant attention, yet research has primarily focused on neural networks. Non-parametric classifiers, such as $k$-Nearest Neighbors ($k$-NN) and Random Forests, have been largely overlooked due to their non-differentiable nature. This paper addresses this gap by introducing Adversarial Pruning, a generic defense that cleans training data to ensure class separation, and the Region-Based Attack (RBA), which leverages the geometric structure of these models to identify optimal adversarial examples.
The Challenge of Non-Parametric Robustness
Standard adversarial attacks, such as Projected Gradient Descent (PGD), rely on gradients to find small perturbations that deceive a model. However, non-parametric classifiers are typically non-differentiable and "piecewise constant." This lack of gradients renders traditional attacks ineffective. Furthermore, standard defenses like adversarial training—retraining on noisy data—often fail for these models, sometimes even degrading their performance by making decision boundaries more complex.
Prior research in this area was often ad-hoc, focusing on specific classifiers in isolation. There is a clear need for a unified, principled framework capable of both attacking and defending a wide variety of non-parametric models.
Methods: Geometry Over Gradients
The authors propose two primary contributions rooted in the geometric nature of non-parametric models:
1. Region-Based Attack (RBA)
Non-parametric models partition the input space into convex polyhedra. For instance, a 1-NN classifier creates Voronoi cells, while a decision tree creates axis-aligned boxes. The RBA exploits this structure by searching for the closest polyhedron that results in a different classification.
- RBA-Exact: Utilizes convex programming to find the mathematically optimal (closest) adversarial example.
- RBA-Approx: A heuristic version designed for complex models like Random Forests, searching a subset of nearby regions to maintain computational efficiency.
2. Adversarial Pruning (Defense)
Rather than altering the learning algorithm, Adversarial Pruning preprocesses the training set. It removes the minimum number of points required to ensure that any two points with different labels are separated by a distance of at least $2r$. This "well-separated" dataset results in smoother, more robust decision boundaries. Theoretically, this method serves as a finite-sample approximation of the $r$-optimal classifier, a robust analogue to the Bayes Optimal classifier.
Key Results and Insights
The authors evaluated their methods across nine standard binary classification datasets, including tabular data and PCA-reduced image sets (MNIST and Fashion MNIST).
- Attack Strength: RBA-Exact proved optimal for 1-NN and Decision Trees. For $k$-NN ($k>1$) and Random Forests, RBA-Approx consistently outperformed or matched state-of-the-art black-box attacks.
- Defense Effectiveness: Adversarial Pruning (AP) consistently improved the "defscore" (the ratio of robust radius vs. an undefended model) across all classifiers. It proved competitive with, and often superior to, classifier-specific defenses like "Robust Splitting" for trees.
- Visual Proof: The impact of the defense is most evident in the decision boundaries. Defended models exhibit significantly simpler and "cleaner" boundaries compared to the convoluted boundaries of undefended models.
Conclusion and Future Directions
This work demonstrates that for non-parametric models, robustness is determined by the separation of training classes in the feature space rather than gradient information. While Adversarial Pruning is highly effective, it faces challenges regarding computational complexity in multi-class settings (where it is NP-Hard) and scalability to very high-dimensional raw data.
Future research may explore the links between $r$-optimal classifiers and robust ReLU network defenses, potentially bridging the gap between parametric and non-parametric robustness frameworks.
Summary updated