TL;DR
Current domain generalization (DG) methods often oscillate between being too fragile (optimizing for the average case) or too pessimistic (optimizing for the absolute worst case). This paper introduces Quantile Risk Minimization (QRM), a probabilistic framework that allows models to perform well with high probability across unseen domains. By minimizing the $\alpha$-quantile of the risk distribution, the authors provide a tunable way to achieve robustness without the performance-crushing conservatism of minimax approaches.
Introduction: The Domain Generalization Dilemma
Machine learning models are notoriously brittle when faced with out-of-distribution (OOD) data—shifts in lighting, location, or population that weren't present during training. The field of Domain Generalization (DG) tries to fix this by training on data from multiple "domains" (e.g., different hospitals or camera traps) to find features that remain invariant.
However, existing DG objectives usually fall into two camps:
- Average-case (ERM): Minimizes the mean error across training domains. This is efficient but lacks robustness; a model can be great on average but fail catastrophically on a specific, slightly different test domain.
- Worst-case (DRO/Minimax): Minimizes the error of the single worst-performing domain. This is robust but often "overly conservative," leading to poor overall performance because the model fixates on improbable, extreme scenarios.
The authors argue that DG is neither an average-case nor a worst-case problem—it’s a probabilistic one. We want models that work well on most likely future domains.
Methods: Quantile Risk Minimization (QRM)
The authors propose Quantile Risk Minimization (QRM). The core idea is to treat the risk (error) of a predictor as a random variable induced by a "meta-distribution" of domains.
The $\alpha$-Quantile Objective
Instead of the mean or the max, QRM minimizes the $\alpha$-quantile of the risk. For example, if $\alpha=0.9$, the model seeks to ensure that its risk is below a certain threshold in at least 90% of possible domains.
Empirical QRM (EQRM) and Smoothing
Since we only have a finite number of training domains, the authors use Kernel Density Estimation (KDE) to smooth the empirical risk distribution.
- Risk Extrapolation: A critical benefit of using KDE smoothing is that it creates a "tail" in the risk distribution that extends beyond the worst training domain. This allows the model to "extrapolate" and prepare for test domains that might be even harder than those seen during training.
- Causal Link: The paper proves that as $\alpha \to 1$ (approaching the worst case), EQRM recovers the "causal predictor"—a model that relies only on stable, causal features rather than spurious correlations.
Datasets and Evaluation
The authors evaluated EQRM across a diverse set of benchmarks:
- Synthetic Linear Regression: A toy setup to verify if the model can distinguish between causal and "stable but non-causal" features.
- ColoredMNIST (CMNIST): A classic "trap" dataset where digit color is a strong but spurious cue that flips at test time.
- WILDS (iWildCam) & OGB-MolPCBA: Large-scale real-world datasets of camera-trap images across 243 training locations and molecular graphs used to predict biological activities.
- DomainBed: A standard suite of DG datasets (including PACS, VLCS, and OfficeHome) characterized by having very few (usually 3-6) training domains.
Key Insights and Results
- Interpretable Robustness: The hyperparameter $\alpha$ is highly intuitive. It represents the "probability of success." A practitioner can choose $\alpha$ based on the safety requirements of their specific application (e.g., $\alpha=0.99$ for medical imaging vs. $\alpha=0.7$ for a recommendation engine).
- Superior Tail Performance: On the iWildCam and OGB-MolPCBA datasets, EQRM significantly outperformed standard baselines (like ERM and CORAL) in the "tail" of the distribution. While average performance was often similar, EQRM's worst-case and high-quantile risks were much lower.
- Solving CMNIST: EQRM successfully ignored the spurious color correlation and matched oracle performance (training on grayscale images) when combined with standard pre-training techniques.
- Beyond Average Accuracy: The paper advocates for a new evaluation protocol. Instead of just looking at mean test accuracy, researchers should look at the quantile-risk curve. This reveals how a model performs in its "bad" domains, not just its "typical" ones.
Limitations and Future Work
- The I.I.D. Domain Assumption: The theory assumes that training and test domains are sampled independently from the same meta-distribution. In reality, domains often have temporal or hierarchical dependencies (e.g., data from 2023 might depend on 2022).
- Small Sample Sizes: Quantile estimation is statistically difficult when the number of training domains ($m$) is very small. While KDE helps, the "probable" interpretation is less precise when $m < 10$.
- Computational Overhead: Using KDE and optimizing quantiles is more complex than simple empirical risk minimization, though the authors provide an efficient algorithm to handle this.
Future work could involve relaxing the i.i.d. assumption to account for "domain drift" over time.
Summary updated