Boundary thickness and robustness in learning models

Yaoqing Yang, Rajiv Khanna, Yaodong Yu, Amir Gholami, Kurt Keutzer, Joseph E. Gonzalez, Kannan Ramchandran, Michael W. Mahoney

TL;DR

This paper introduces boundary thickness, a geometric metric that measures the "buffer zone" between classes in a machine learning model. The authors demonstrate that thicker decision boundaries are the secret sauce behind model robustness, proving that popular techniques like Mixup work precisely because they thicken these boundaries, and they introduce a new "Noisy Mixup" method to further boost resilience.

What Problem Does This Paper Address?

Deep learning models are notoriously brittle. They can be fooled by adversarial examples (tiny, invisible perturbations) or fail when faced with out-of-distribution (OOD) transforms (common corruptions like blur, snow, or digital noise).

While researchers have developed many "tricks" to improve robustness—like data augmentation and specific regularization—we haven't had a unified geometric way to measure why these tricks work. The traditional concept of a "margin" (the distance to the nearest decision boundary) is difficult to calculate for complex neural networks and often fails to predict how well a model will perform on unseen, corrupted data. This paper fills that gap by proposing "boundary thickness" as a more reliable and intuitive metric for robustness.

Methods

The authors define boundary thickness as the expected distance one must travel along a line segment between two different classes to cross the "uncertainty zone" of the classifier.

Key Innovations:

  1. The Thickness Metric: Unlike the "worst-case" nature of a margin, thickness is an "average-case" geometric property. It measures the gap between two probability level sets (e.g., where the model is 75% sure of class A vs. 75% sure of class B).
  2. Noisy Mixup: Building on the popular "Mixup" technique (which trains on convex combinations of image pairs), the authors propose Noisy Mixup. This method mixes real data with pure random noise and assigns these samples to a new, artificial "NONE" class. This forces the model to create a thick boundary not just between real classes, but between "meaningful data" and "meaningless noise."
  3. Theoretical Link: They provide a mathematical proof showing that the objective of Mixup training is essentially a dual to the goal of maximizing boundary thickness.

Datasets

The researchers validated their findings using standard computer vision benchmarks:

  • CIFAR-10 & CIFAR-100: Standard small-image classification.
  • SVHN: Street View House Numbers.
  • CIFAR-10-C & CIFAR-100-C: Benchmarks specifically designed for OOD robustness, containing 15 different types of real-world corruptions (blur, weather, noise, etc.).

Key Insights and Ideas

  • Thickness > Margin: The authors found that boundary thickness is a much better predictor of the "robust generalization gap" (the difference between training and testing performance under attack) than the standard margin.
  • The "Tilting" Problem: Thin boundaries tend to "tilt" toward the data manifold. This means that even if a point is technically far from the boundary, a small adversarial nudge in a specific direction can easily push it across. Thick boundaries are more "upright" and harder to bypass.
  • Implicit Regularization: They discovered that many standard training choices—like using a large initial learning rate, early stopping, or $L_2$ regularization—actually work by implicitly increasing the boundary thickness.
  • The "NONE" Class Advantage: By introducing a "NONE" class for noise, the model learns that anything that doesn't look like the training data should be rejected or treated with high uncertainty, significantly improving OOD performance.

Key Results

  • OOD Performance: On CIFAR-10-C, Noisy Mixup achieved an accuracy of 83.6%, significantly outperforming standard Mixup (78.5%) and normal training (74.5%).
  • Adversarial Resilience: Under a grueling PGD-20 adversarial attack (8-pixel perturbation), Noisy Mixup maintained 11.7% accuracy, while standard Mixup plummeted to 2.0%. While these numbers seem low, in the context of "black-box" and "white-box" attacks on these datasets, the relative improvement is massive.
  • Consistency: The correlation between thickness and robustness held true across various architectures, including ResNet-18, VGG13, and DenseNet.

Limitations and Future Work

  • Model Capacity: The authors note that "thickening" a boundary requires a model with enough capacity. For very small models, forcing a thick boundary might lead to a drop in "clean" (un-attacked) accuracy.
  • Computational Cost: While measuring thickness is easier than measuring the exact margin, it still requires sampling line segments and performing multiple forward passes, which adds overhead during the evaluation phase.
  • Direct Optimization: Currently, thickness is increased indirectly via Mixup. A promising future direction is developing loss functions that explicitly maximize boundary thickness during the training process without relying on data augmentation.

Summary updated

Abstract

Robustness of machine learning models to various adversarial and non-adversarial corruptions continues to be of interest. In this paper, we introduce the notion of the boundary thickness of a classifier, and we describe its connection with and usefulness for model robustness. Thick decision boundaries lead to improved performance, while thin decision boundaries lead to overfitting (e.g., measured by the robust generalization gap between training and testing) and lower robustness. We show that a thicker boundary helps improve robustness against adversarial examples (e.g., improving the robust test accuracy of adversarial training) as well as so-called out-of-distribution (OOD) transforms, and we show that many commonly-used regularization and data augmentation procedures can increase boundary thickness. On the theoretical side, we establish that maximizing boundary thickness during training is akin to the so-called mixup training. Using these observations, we show that noise-augmentation on mixup training further increases boundary thickness, thereby combating vulnerability to various forms of adversarial attacks and OOD transforms. We can also show that the performance improvement in several lines of recent work happens in conjunction with a thicker boundary.
BibTeX
@inproceedings{yang2020boundary,
  author = {Yaoqing Yang and Rajiv Khanna and Yaodong Yu and Amir Gholami and Kurt Keutzer and Joseph E. Gonzalez and Kannan Ramchandran and Michael W. Mahoney},
  title = {{Boundary thickness and robustness in learning models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=IyJTkSjfxv},
}
Figure