Modeling the Second Player in Distributionally Robust Optimization

Paul Michel, Tatsunori Hashimoto, Graham Neubig

Machine learning models trained using standard Empirical Risk Minimization (ERM) optimize for average performance across a training dataset. Unfortunately, this often encourages models to "cheat" by latching onto spurious correlations—such as a specific word that happens to appear mostly in negative reviews—rather than learning the actual underlying concepts. As a result, performance can plummet on under-represented subgroups or when the data distribution shifts in the real world.

Distributionally Robust Optimization (DRO) attempts to solve this by preparing the model for the "worst-case" distribution within a defined "uncertainty set." However, traditional DRO frameworks typically define this set using simple geometric shapes (like $f$-divergence balls). While mathematically convenient, these simple sets fail to capture the complex, high-dimensional structure of real-world data like natural language.

To bridge this gap, researchers have introduced Parametric Distributionally Robust Optimization (P-DRO), a framework that replaces mathematically rigid uncertainty sets with flexible neural generative models.

The P-DRO Framework

P-DRO frames model training as a min-max game between two neural networks:

  1. The Model (Player 1): Aims to minimize the expected loss on the data.
  2. The Adversary (Player 2): A generative model that attempts to maximize the model's loss by reweighting or generating "hard" data distributions, constrained to stay relatively close to the original data distribution via KL-divergence.
The P-DRO framework trains a model and an adversary in a min-max game.

Implementing this conceptually simple idea poses significant optimization challenges. The authors introduce several technical innovations to make it work:

  • Importance Sampling: To maintain training stability, the primary model is trained on the original data, but the gradients are weighted by the ratio of the adversary’s distribution to the original distribution.
  • KL Reversal: Directly optimizing the standard KL-constrained objective is notoriously unstable for large neural networks. The authors utilize a "reverse KL" relaxation, prioritizing gradient stability over exact mathematical equivalence, which makes training large-scale generative models (like Transformers) feasible.
  • Greedy-Minmax Selection: Standard "early stopping" based on validation accuracy fails for robustness tasks. The authors developed a heuristic that uses the learned adversaries to identify which model checkpoint is genuinely the most robust.

Key Insights

The core philosophy of P-DRO is to shift from saying "be robust to any distribution within distance X" to "be robust to distributions that a powerful language model thinks are plausible but difficult."

Perhaps the most powerful aspect of P-DRO is its ability to handle unknown groups. The framework does not require explicit labels for demographic groups, races, or dialects during training. Instead, the adversary naturally discovers these "weak spots" in the model's performance and forces the model to adapt.

Experimental Results

The researchers evaluated P-DRO across synthetic and real-world datasets, including a 2D Toy Task, BiasedSST (a synthetic sentiment analysis dataset with strong spurious correlations), and Twitter toxicity detection datasets (DWMW17 & FDCL18) to measure bias against minority dialects.

The results demonstrate significant improvements in worst-case performance:

  • BiasedSST: P-DRO achieved a robust accuracy of 34.98%, vastly outperforming standard ERM (which collapsed to 2.15%) and traditional Topic-based DRO (5.18%). It successfully captured over 50% of the performance of an "Oracle" model that had perfect knowledge of the bias groups.
Results on BiasedSST showing P-DRO significantly outperforming ERM and other baselines on robust accuracy.
  • Toxicity Detection: On the DWMW17 dataset, P-DRO improved robust accuracy to 69.06% (compared to 53.19% for ERM). It significantly reduced the performance gap for minority dialects like African American English, despite never seeing dialect labels during training.
  • Model Selection: Ablation studies confirmed that the proposed "Greedy-Minmax" stopping criterion was essential; without it, models often appeared robust during training but failed to generalize that robustness to unseen test data.

Limitations and Future Directions

While highly effective, P-DRO does have limitations. Its success heavily relies on the generative quality of the adversary; a weak adversary (e.g., a simple LSTM instead of a Transformer) may fail to find meaningful worst-case distributions. Additionally, the current approach requires the adversary to produce explicit density estimates ($q(x,y)$).

Finally, training two models simultaneously introduces computational overhead compared to standard ERM. However, the authors note that future work could explore modeling the likelihood ratio directly, potentially allowing for even more flexible and efficient adversaries.

Summary updated

BibTeX
@inproceedings{michel2021modeling,
  author = {Paul Michel and Tatsunori Hashimoto and Graham Neubig},
  title = {{Modeling the Second Player in Distributionally Robust Optimization}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=ZDnzZrTqU9N},
}
Figure