Towards an Intrinsic Definition of Robustness for a Classifier

Théo Giraudon, Vincent Gripon, Matthias Löwe, Franck Vermet

TL;DR

This paper argues that standard measures of classifier robustness—like averaging the "radius of robustness" across a test set—are flawed because they depend too heavily on which specific samples are chosen. The authors propose a new, "difficulty-aware" robustness score that weights samples based on their proximity to decision boundaries, providing a more stable and intrinsic measure of a model's performance that holds up even when evaluated on different subsets of data.

What Problem Does This Paper Address?

In machine learning, "robustness" usually refers to a model's ability to maintain its prediction even when an input is slightly perturbed (e.g., by adversarial noise or common corruptions like fog). Currently, researchers measure this by calculating the radius of robustness: the maximum distance you can move away from a data point before the classifier changes its mind.

The problem? Not all data points are created equal. A point in the "center" of a class region naturally has a huge radius of robustness, while a point near the decision boundary has a tiny one. If your validation set happens to have many "easy" (central) points, your model looks robust; if it has "hard" (boundary) points, it looks fragile. This makes it incredibly difficult to compare two different classifiers fairly if they aren't evaluated on the exact same distribution of "difficulty."

Methods

The authors propose a new metric called Difficulty-Aware Robustness ($R_\nu$).

  1. The Link Between Loss and Distance: They first prove theoretically (for logistic regression) that a sample's cross-entropy loss is directly related to its distance from the decision boundary. Specifically, they define a function $g(\ell)$ of the loss $\ell$ that acts as a proxy for this distance.
  2. The New Score: Instead of just averaging the radii, they calculate the ratio of the radius of robustness to this distance proxy $g(\ell)$.
  3. Intrinsic Property: For a simple linear classifier, this ratio is a constant that represents the "margin" of the classifier. For deep neural networks, they empirically show that the radius of robustness increases approximately linearly with $g(\ell)$.
  4. Estimation: Since finding the exact radius of robustness for a deep net is NP-hard, they estimate it using a dichotomy-based search across thousands of random directions.

Datasets

The paper validates its approach using two standard computer vision benchmarks:

  • MNIST: Used with a LeNet5 architecture to demonstrate the linear relationship between loss and robustness radius.
  • CIFAR-10: Used with a ResNet18 architecture. They also utilize the CIFAR-10-C (corruption) benchmark to see how their metric handles "black-box" real-world corruptions like noise and weather effects.

Key Insights and Ideas

  • Loss as a Compass: The most significant "aha moment" is that cross-entropy loss isn't just a training signal; it's a reliable indicator of how "deep" a sample is within its class territory. High loss means the sample is near a boundary.
  • Subset Independence: A "golden" robustness score should be independent of the samples it is evaluated on. The authors demonstrate that their score remains remarkably consistent whether you calculate it on the "easiest" 50% of a dataset or the "hardest" 50%.
  • The "Slope" of Robustness: By dividing the radius by the difficulty, the score essentially measures the slope of the decision boundary. A "robust" model isn't just one that gets lucky with easy samples; it's one where the radius of safety grows quickly as you move away from the boundary.

Key Results

  • Stability: In experiments comparing "easy" and "hard" subsets of MNIST and CIFAR-10, the standard mean robustness ($R_m$) varied by 38% to 44%. In contrast, the proposed $R_\nu$ score only varied by 8% to 12%, proving it is much less dependent on sample choice.
  • Adversarial Training: The metric successfully captures the benefits of adversarial training. On CIFAR-10, an adversarially trained network showed a nearly 6x increase in the $R_\nu$ score (from 0.25 to 1.49) compared to a naturally trained network.
  • Pathological Samples: The authors found that a small number of "pathological" samples (about 20% of the dataset) have a disproportionately large negative impact on traditional robustness measures. Their method helps mitigate the "noise" introduced by these outliers.

Limitations and Future Work

  • Computational Cost: While calculating the loss is cheap, estimating the radius of robustness for deep networks still requires many forward passes (sampling random directions), which can be slow for very large models.
  • Linear Approximation: The linear relationship between $g(loss)$ and the radius is a theoretical certainty for linear models but only an empirical approximation for deep networks. There are "outliers" in deep nets where this relationship breaks down.
  • Future Directions: The authors suggest investigating whether this "difficulty-aware" perspective could be used during training (e.g., sampling training inputs based on their distance to the boundary) to create more robust classifiers from the start.

Summary updated

BibTeX
@inproceedings{giraudon2021towards,
  author = {Théo Giraudon and Vincent Gripon and Matthias Löwe and Franck Vermet},
  title = {{Towards an Intrinsic Definition of Robustness for a Classifier}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2021},
  doi = {10.1109/icassp39728.2021.9414573},
}
Figure