Does Distributionally Robust Supervised Learning Give Robust Classifiers?

Weihua Hu, Gang Niu, Issei Sato, Masashi Sugiyama · DOI

Abstract

Distributionally Robust Supervised Learning (DRSL) is necessary for building reliable machine learning systems. When machine learning is deployed in the real world, its performance can be significantly degraded because test data may follow a different distribution from training data. DRSL with f-divergences explicitly considers the worst-case distribution shift by minimizing the adversarially reweighted training loss. In this paper, we analyze this DRSL, focusing on the classification scenario. Since the DRSL is explicitly formulated for a distribution shift scenario, we naturally expect it to give a robust classifier that can aggressively handle shifted distributions. However, surprisingly, we prove that the DRSL just ends up giving a classifier that exactly fits the given training distribution, which is too pessimistic. This pessimism comes from two sources: the particular losses used in classification and the fact that the variety of distributions to which the DRSL tries to be robust is too wide. Motivated by our analysis, we propose simple DRSL that overcomes this pessimism and empirically demonstrate its effectiveness.

Introduction

In the "lab" of machine learning, we usually assume our test data will look exactly like our training data. In the real world, this is rarely true. Distribution shift—where the environment changes or sample bias occurs—can tank a model's performance. To fight this, researchers use Distributionally Robust Supervised Learning (DRSL). The idea is a minimax game: an "adversary" shifts the training distribution within a certain "budget" (defined by $f$-divergences like KL divergence) to make the model fail, while the "learner" tries to minimize this worst-case loss.

However, the authors noticed a gap: while DRSL works well for regression, its effectiveness in classification was questionable. They set out to answer: Does DRSL actually produce robust classifiers, or is it just a mathematical exercise?

The Analysis: Why Standard DRSL Fails in Classification

The paper provides a rigorous theoretical analysis proving (Theorems 1–3) that when standard DRSL is applied to classification using common losses (like 0-1 loss or surrogates like logistic/cross-entropy), the model ends up being identical to one trained with standard Empirical Risk Minimization (ERM).

This "pessimism" arises because the adversary is given too much freedom to reweight individual data points. If the adversary can pick any point and weight it heavily, the learner's only winning move is to make the error zero on every single training point. This collapses the "robust" model back into a standard one that fits the training distribution perfectly. Furthermore, the authors show a "steeper loss" effect: DRSL with a surrogate loss is mathematically equivalent to ERM using a "steeper" version of that loss (e.g., DRSL with logistic loss behaves like ERM with exponential loss). While this makes the model robust to the surrogate loss, it doesn't necessarily improve robustness to the actual 0-1 classification error.

Proposed Method: Structural DRSL

To overcome this pessimism, the authors introduce Structural DRSL. Instead of letting the adversary shift every data point independently (non-parametric freedom), they group data into latent categories ($z$). They assume that while the relationship between features and labels within a group ($p(x,y|z)$) is stable, the proportion of those groups ($p(z)$) might change at test time.

By forcing the adversary to shift groups of data rather than individual points, the learner can no longer "cheat" by just fitting the training points. It must find a decision boundary that is stable across different group proportions. The authors derive efficient gradient-based algorithms for this new objective using both Kullback-Leibler (KL) and Pearson (PE) divergences.

Experimental Evaluation

The authors evaluated their approach across several domains:

  • UCI Repository: blood, adult, fourclass, and phishing.
  • Computer Vision: MNIST, satimage, and letter.
  • Text Classification: 20newsgroups.

To simulate distribution shift, they manually created sub-category shifts. For example, in the MNIST dataset, they treated the original digit labels as sub-categories for a broader "odd vs. even" binary classification task, then shifted the proportions of those digits during testing.

Key Results

The experiments confirmed that while standard DRSL (AERM) often performed no better (and sometimes worse) than standard ERM, the proposed Structural AERM showed significant gains.

Table 1: Comparison of estimated ordinary risk and structural adversarial risk across multiple datasets.

As shown in Table 1, on the blood dataset, Structural AERM reduced the "structural adversarial risk" (the error under the worst-case group shift) from 62.3% (ERM) to 36.7%. Across all datasets, Structural AERM achieved the lowest estimated structural adversarial risk, proving it successfully ignored the "pessimism" of individual outliers while defending against group-level shifts. Additionally, the computational overhead for calculating the adversarial weights was negligible, making the method practical for large-scale linear models and neural networks.

Conclusion and Future Work

Structural DRSL offers a practical path toward robust classification by constraining the adversary to group-level shifts. The primary limitation is that it requires the user to define the groupings (latent categories), which necessitates domain knowledge or meta-information. Additionally, the authors established a convergence rate of $O(N^{-1/4})$, which is theoretically slower than the standard $O(N^{-1/2})$ rate of ERM.

A promising future direction would be developing methods to automatically discover these latent structures from the data itself, removing the need for manual grouping while maintaining the benefits of structural robustness.

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