TL;DR
This paper introduces a novel optimization method, "SGD with Hardness Weighted Sampling," that makes Distributionally Robust Optimization (DRO) practical for deep learning. This approach improves model robustness to data imbalances and variations, crucial for safety-critical applications like medical imaging, without sacrificing computational efficiency.
What Problem Does This Paper Address?
Machine learning models, especially deep neural networks, often perform poorly on underrepresented data subsets, a phenomenon known as "hidden stratification." This is particularly problematic in safety-critical domains like medical imaging, where failures can have severe consequences. While Distributionally Robust Optimization (DRO) offers a theoretical solution by optimizing for the worst-case data distribution, its practical application in deep learning has been hindered by inefficient optimization methods compared to standard Stochastic Gradient Descent (SGD). Existing DRO optimizers often introduce extra hyperparameters and computational overhead, making them difficult to integrate into existing deep learning pipelines.
Methods
The core contribution is SGD with Hardness Weighted Sampling. This method adapts standard SGD to perform DRO by intelligently sampling training data. Instead of uniformly sampling mini-batches, it assigns higher probabilities to "harder" examples – those that currently yield higher loss values. This is achieved by:
- Hardness Weighted Sampling: A principled sampling strategy that dynamically weights training examples based on their current loss. This is inspired by Hard Example Mining but formally integrated into the DRO framework.
- Stale Per-Example Loss Vector: To maintain computational efficiency, the method uses a history of per-example losses rather than recomputing all losses at each step. This is a practical approximation that still allows for effective hardness weighting.
- Theoretical Guarantees: The authors provide theoretical convergence proofs for their method, extending existing work on SGD for over-parameterized deep neural networks with ReLU activations to the DRO setting. This is a significant theoretical advancement, being the first convergence result for DRO in this context.
Datasets
The paper evaluates their method on several datasets:
- MNIST: Used as a toy example to demonstrate the benefits of DRO in a class-imbalanced scenario.
- Fetal Brain 3D MRI Segmentation: Utilized the FeTA dataset and a private dataset, comprising a total of 437 MRIs with various anatomical variations and pathologies.
- Brain Tumor Segmentation: Employed the BraTS 2019 dataset, a standard benchmark for brain tumor segmentation.
Key Insights and Ideas
- Bridging DRO and Hard Example Mining: The paper demonstrates that their hardness weighted sampling approach can be viewed as a principled form of Hard Example Mining, providing a theoretical foundation for heuristic methods.
- Practical DRO for Deep Learning: The proposed method is computationally as efficient as standard SGD, making DRO a viable option for deep learning without significant overhead.
- Robustness to Anatomical and Protocol Variations: The experiments show that DRO significantly improves robustness in medical image segmentation, particularly for cases with anatomical abnormalities (fetal brain) and variations in imaging protocols (brain tumors).
- Beyond Average Performance: The work highlights that focusing on average performance (ERM) can mask failures on critical subgroups. DRO, by considering worst-case scenarios, leads to more reliable models.
Key Results
- MNIST: DRO with hardness weighted sampling achieved over 15% higher accuracy on the underrepresented digit '3' compared to ERM.
- Fetal Brain Segmentation: nnU-Net trained with DRO showed improved segmentation for pathological cases (spina bifida, other abnormalities) by achieving comparable or higher mean Dice scores and lower interquartile ranges (IQR), indicating better robustness. For instance, improvements of up to +1pp for white matter and +1pp for cerebellum in spina bifida cases were observed.
- Brain Tumor Segmentation: DRO improved robustness by reducing the IQR for enhancing tumor and tumor core segmentation by approximately 2pp. It also led to a more "fair" model by reducing poor segmentations on cases from specific acquisition centers (TCIA).
- Computational Efficiency: The overhead of the hardness weighted sampler was found to be negligible, even for datasets with up to 1 million samples.
Limitations and Future Work
- No Guarantee of Absolute Robustness: The authors acknowledge that DRO, while improving robustness, does not provide an absolute guarantee against failures, especially for subgroups entirely unrepresented in the training data.
- Future Work: The paper suggests investigating DRO for subgroups not present in the training data as a direction for future research. They also explore the impact of importance sampling and the choice of the hyperparameter $\beta$.
Summary updated