Standard adversarial robustness often forces a "one-size-fits-all" radius that creates a painful trade-off between accuracy and safety. This paper introduces the Neighborhood Preserving Bayes Optimal Classifier, a theoretical limit that adapts its robustness to the local density of data. The authors prove that classic non-parametric methods—like $k$-Nearest Neighbors and Kernel classifiers—can actually reach this ideal limit, provided they are tuned with more "precision" than standard learning requires.
The Problem with Fixed Robustness Radii
In the realm of adversarial machine learning, robustness is typically defined using a fixed radius $r$. The goal is for a classifier to output the same label for any point within distance $r$ of a given input. However, real-world data is highly heterogeneous, making a single global radius problematic.
Consider a dataset with varying distances between classes. If you select a large $r$ to protect isolated clusters, you force the "robustness regions" of closely packed clusters to overlap. This overlap forces the model to misclassify points, severely tanking accuracy.
Conversely, if you choose a small $r$ to save accuracy in those dense regions, you leave the isolated clusters unnecessarily vulnerable to adversarial perturbations.
The authors argue against picking a global $r$. Instead, they propose a framework where robustness is adaptive—expanding where the data allows it and contracting where classes are naturally close together.
The Neighborhood Preserving Bayes Optimal Classifier
To address this, the authors propose a new theoretical gold standard: the Neighborhood Preserving Bayes Optimal Classifier.
- The Ideal: Within the data support, this classifier acts like a standard Bayes Optimal classifier, maximizing accuracy. Outside the support, it assigns labels based on the closest point within the support. This effectively "stretches" the decision boundaries to be as robust as possible without ever sacrificing accuracy.
- Neighborhood Consistency: The paper defines a new type of convergence. A learning algorithm is "neighborhood consistent" if, as it receives more data, its "astuteness" (a metric combining both accuracy and robustness) converges to the maximum possible accuracy.
- Weight Functions & Splitting Numbers: To prove which algorithms can achieve this, the authors analyze "weight functions" (a category that includes $k$-NN and Kernel methods). They introduce a technical tool called splitting numbers to measure an algorithm's "precision"—essentially, how many training points it uses to decide a label at any given location.
Key Theoretical Insights
The theoretical analysis yields several surprising insights about classic non-parametric methods:
- The $k$-NN "Precision" Gap: Standard statistical theory states that $k$-Nearest Neighbors is consistent if $k$ grows with the sample size $n$. However, this paper proves that for robustness, $k$ must grow faster than $O(\log n)$ (specifically, $k_n = \omega(\log n)$ is both necessary and sufficient). If $k$ is too small, the model lacks the local precision required to be uniformly correct across an entire robustness region.
- Kernels Need Fast Decay: Not all kernels are created equal in the eyes of robustness. The authors prove that kernels with "faster than polynomial" decay (such as Gaussian or Exponential kernels) can achieve neighborhood consistency. Polynomial kernels fail because they "leak" too much influence from distant, differently-labeled points.
- Histograms are a Dead End: Histogram classifiers fail this consistency test entirely. Because they partition space into fixed, rigid bins, they have no mechanism to meaningfully classify points far outside the observed data support, making them inherently non-robust in this adaptive framework.
Experimental Validation
To validate their theoretical findings, the authors utilize a synthetic "overlayed circles" dataset. This dataset features support regions designed to be intrinsically multiscaled—some areas require high-precision boundaries, while others allow for large margins. Because the underlying distribution is known, the authors can explicitly calculate the "true" robustness regions to verify convergence.
The experiments confirmed the theory: an Exponential Kernel successfully converged toward the Bayes accuracy limit across all robustness levels. In stark contrast, a Polynomial Kernel saw its performance decrease as the sample size grew when measured against higher robustness requirements, confirming that local precision is essential for adaptive robustness.
Limitations and Future Work
While theoretically rigorous, the paper acknowledges several limitations and avenues for future research:
- Computability: The "Neighborhood Preserving" regions depend on knowing the exact support of the underlying data distribution. In practice, the support of complex distributions (like natural images) is unknown, making these regions difficult to compute for real-world benchmarks.
- Algorithmic Discovery: The paper proves that $k$-NN and specific Kernels can work, but it leaves the door open for designing entirely new algorithms specifically optimized to balance local robustness and accuracy in heterogeneous data.
- High Dimensions: The analysis relies on non-parametric methods, which notoriously suffer from the "curse of dimensionality." How these adaptive robustness properties scale to extremely high-dimensional spaces remains an open and critical question.
Summary updated