Improving Generalization via Uncertainty Driven Perturbations

Matteo Pagliardini, Gilberto Manunza, Martin Jaggi, Michael I. Jordan, Tatjana ChavdarovaarXiv 2022

Abstract

Recently Shah et al., 2020 pointed out the pitfalls of the simplicity bias—the tendency of gradient-based algorithms to learn simple models—which include the model's high sensitivity to small input perturbations, as well as sub-optimal margins. In particular, while Stochastic Gradient Descent yields max-margin boundary on linear models, such guarantee does not extend to non-linear models. To mitigate the simplicity bias, we consider uncertainty-driven perturbations (UDP) of the training data points, obtained iteratively by following the direction that maximizes the model's estimated uncertainty. The uncertainty estimate does not rely on the input's label and it is highest at the decision boundary, and—unlike loss-driven perturbations—it allows for using a larger range of values for the perturbation magnitude. Furthermore, as real-world datasets have non-isotropic distances between data points of different classes, the above property is particularly appealing for increasing the margin of the decision boundary, which in turn improves the model's generalization. We show that UDP is guaranteed to achieve the maximum margin decision boundary on linear models and that it notably increases it on challenging simulated datasets. For nonlinear models, we show empirically that UDP reduces the simplicity bias and learns more exhaustive features. Interestingly, it also achieves competitive loss-based robustness and generalization trade-off on several datasets.

Introduction

Neural networks are notorious overachievers—they can fit training data perfectly, yet often fail to generalize to new, unseen examples. A major culprit is simplicity bias: the tendency of gradient-based algorithms to latch onto the simplest possible patterns (features) to solve a task, often ignoring more complex but robust information. While Stochastic Gradient Descent (SGD) naturally finds "maximum margin" solutions for simple linear models, this property vanishes in non-linear neural networks. Instead, networks often find a decision boundary that is "too close" to the data points or relies on "spurious" features that do not hold up in real-world scenarios.

Existing solutions, such as Adversarial Training (AT), typically employ Loss-Driven Perturbations (LDP). LDP pushes data points in directions that increase the training loss. However, LDP has a significant flaw: if the perturbation magnitude is too large, it can push a sample across the decision boundary into the territory of another class while maintaining the original label. This creates conflicting signals that can degrade the model's performance on clean, unperturbed data.

Methodology: Uncertainty Driven Perturbations (UDP)

The core innovation presented is Uncertainty Driven Perturbations (UDP). Instead of utilizing the label to maximize loss, UDP analyzes the model's internal state to maximize entropy (uncertainty).

Comparison of LDP and UDP landscapes. (a) shows the geometric constraints, (b) illustrates the LDP landscape where perturbations can cross the boundary, and (c) shows the UDP landscape where perturbations naturally hover near the decision boundary.

Mechanism of Action

  1. Unsupervised Search: For a given input $x$, UDP iteratively searches for a small perturbation $\delta$ that makes the model most "confused" about the class. Because it is unsupervised, it does not require ground-truth labels to identify "hard" directions.
  2. Boundary Awareness: Uncertainty is naturally highest at the decision boundary. Unlike loss-driven methods that seek to cross the boundary, UDP-driven points tend to "hover" near it, as uncertainty drops once a point moves deep into another class's territory.
  3. Local Adaptation: UDP naturally adapts to the local geometry of the data. In regions where classes are far apart, it allows for larger perturbations; where they are close, the perturbations remain small. This prevents the creation of "semantically wrong" training pairs.

The authors introduce two primary implementations: UDP-PGD, which replaces the standard training sample with a perturbed one, and UDPR, which adds a regularization term encouraging model consistency under uncertainty-driven noise.

Experimental Evaluation

The researchers evaluated UDP across a mix of synthetic benchmarks (e.g., "Narrow Corridor" and "LMS-5") and real-world datasets including Fashion-MNIST, SVHN, CIFAR-10, and CIFAR-100.

Key Results

  • Robustness Trade-offs: On CIFAR-10, UDP-PGD achieved a superior balance between clean accuracy and robustness, yielding a 73.1% trade-off score compared to 71.3% for the popular TRADES method.
  • SVHN Performance: On the SVHN dataset, UDP-PGD reached 86.5% clean accuracy, significantly outperforming TRADES (79.4%) while maintaining comparable robustness.
  • Feature Transferability: To demonstrate the reduction of simplicity bias, features from a CIFAR-10 model were used to train a classifier on CIFAR-100. UDP features achieved 45.7% accuracy, outperforming both the baseline (42.5%) and TRADES (43.1%), suggesting that UDP forces the model to learn a more exhaustive and generalizable feature set.
  • Low-Data Regime: In a subset containing only 5% of CIFAR-10 training data, UDP improved clean accuracy by nearly 5% over the standard baseline.

Discussion and Conclusion

UDP offers a promising path toward breaking simplicity bias by forcing models to handle noise in directions of maximum uncertainty. By preventing the model from relying on a single "easy" feature, UDP encourages the learning of exhaustive features necessary for high-confidence classification.

While effective, the method shares the computational overhead of other PGD-based techniques, requiring multiple forward/backward passes per training step. Future work may involve exploring more advanced Bayesian uncertainty techniques to refine the perturbation directions and extending the uncertainty-driven philosophy to regression and reinforcement learning tasks.

Summary updated

BibTeX
@misc{pagliardini2022improving,
  author = {Matteo Pagliardini and Gilberto Manunza and Martin Jaggi and Michael I. Jordan and Tatjana Chavdarova},
  title = {{Improving Generalization via Uncertainty Driven Perturbations}},
  year = {2022},
  eprint = {2202.05737},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.05737},
}
Figure