Does Distributionally Robust Supervised Learning Give Robust Classifiers?

Weihua Hu, Gang Niu, Issei Sato, Masashi Sugiyama

Introduction

Machine learning models typically rely on the "i.i.d. assumption"—the premise that training and test data are drawn from the exact same distribution. In real-world deployments, however, this assumption is frequently violated by sample selection bias, non-stationary environments, or shifting demographics.

Distributionally Robust Supervised Learning (DRSL) was designed to address this vulnerability. It frames learning as a minimax game: an "adversary" shifts the training distribution within a defined "uncertainty set" to maximize loss, while the "learner" attempts to minimize this worst-case loss. While DRSL is theoretically sound for regression tasks, its effectiveness in classification has remained questionable. This paper reveals a surprising "pessimism" in standard DRSL for classification: common robust methods often fail to provide actual robustness, instead merely recovering the optimal classifier for the original training distribution. To resolve this, the authors propose Structural DRSL.

The Problem with Standard DRSL

The paper presents a rigorous theoretical critique of standard DRSL, demonstrating why it falls short in classification tasks.

  • The Flexibility Trap: In standard DRSL, the adversary has too much "non-parametric" freedom. It can reweight every single data point independently. If the uncertainty set is too flexible, the adversary simply places all weight on the "hardest" individual examples (often outliers or noise) in the training set. The learner then overfits to this noise rather than preparing for a realistic global distribution shift.
  • 0-1 Loss Equivalence: The authors prove that for the standard 0-1 classification loss, the global minima for the adversarial risk and the ordinary risk are exactly the same. In practical terms, "robust" optimization does not change the final classifier's decision boundary at all.
  • Steeper is Not Robust: When using common surrogate losses (like logistic or hinge loss), robust optimization is mathematically equivalent to standard Empirical Risk Minimization (ERM) with a "steeper" loss function. For instance, the exponential loss acts as a steeper version of the logistic loss. While a steeper loss might sound more rigorous, it actually makes the model more sensitive to outliers, which is the exact opposite of the desired robust behavior.

The Solution: Structural DRSL

To fix the flaws of standard DRSL, the authors propose a constrained approach called Structural DRSL.

Instead of allowing the adversary to reweight individual instances arbitrarily, Structural DRSL introduces a latent variable $z$ representing underlying categories or groups. The adversary is restricted to shifting only the prior probabilities of these groups ($p(z)$), while the conditional distributions of the data given the group ($p(x,y|z)$) remain fixed.

By forcing the adversary to shift weights at the group level rather than the instance level, the model is forced to learn a decision boundary that balances performance across all latent groups. This is a much more effective strategy for handling realistic, structural shifts like class imbalance or changing demographic proportions. The authors also derive efficient gradient-based optimization algorithms for this approach, showing that the adversary's inner maximization step can be solved efficiently for KL and Pearson divergences.

Experimental Results

The authors evaluated their approach on several standard classification benchmarks (including UCI datasets like adult and blood, as well as image/text datasets like MNIST and 20newsgroups), modifying them to simulate structural distribution shifts.

The experiments confirmed the theoretical pessimism: standard Adversarial Empirical Risk Minimization (AERM) often performed worse than standard ERM when the test distribution shifted.

Conversely, the proposed Structural DRSL consistently achieved the lowest structural adversarial risk.

Comparison of estimated ordinary and structural adversarial risks across various datasets.

As shown in the results above, Structural AERM significantly outperforms both standard ERM and AERM under structural shifts. For example, on the adult dataset, standard ERM and AERM yielded a structural adversarial risk of roughly 30.4%. The proposed Structural AERM reduced this risk dramatically to 19.1%. The method effectively minimizes the classifier's sensitivity to distribution shifts (the variance of error across different groups) without sacrificing baseline accuracy.

Limitations and Future Work

While Structural DRSL offers a significant step forward, it comes with specific limitations:

  • Requirement of Groupings: The method requires the user to specify the latent categories ($z$) beforehand. If these groupings are unknown or incorrectly specified, the theoretical robustness guarantees may not hold.
  • Convergence Rates: The authors established a convergence rate of $O(N^{-1/4})$ for their method, which is slower than the standard $O(N^{-1/2})$ rate found in ERM. This indicates that robust learning under these structural constraints requires more data to reach the same level of statistical stability.

Future research directions include developing methods to automatically discover these latent structures from the data itself, and extending the "structural" assumption to handle more complex types of distribution shifts beyond simple prior probability changes.

Summary updated

BibTeX
@inproceedings{hu2018does,
  author = {Weihua Hu and Gang Niu and Issei Sato and Masashi Sugiyama},
  title = {{Does Distributionally Robust Supervised Learning Give Robust Classifiers?}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
  url = {https://openreview.net/forum?id=HJZ8EjZdZH},
}
Figure