Skip to main content
QUICK REVIEW

[Paper Review] SGD with Hardness Weighted Sampling for Distributionally Robust Deep Learning

Lucas Fidon, Sébastien Ourselin|arXiv (Cornell University)|Sep 25, 2019
Risk and Portfolio OptimizationDecision Sciences11 references6 citations
TL;DR

This paper proposes SGD with Hardness Weighted Sampling (HWS), an efficient and principled optimization method for Distributionally Robust Optimization (DRO) in deep learning. By adaptively resampling hard examples via a softmax-based weighting scheme and maintaining loss history, HWS achieves convergence in over-parameterized ReLU networks while matching SGD’s computational efficiency and outperforming ad hoc hard mining strategies.

ABSTRACT

Distributionally Robust Optimization (DRO) has been proposed as an alternative to Empirical Risk Minimization (ERM) in order to account for potential biases in the training data distribution. However, its use in deep learning has been severely restricted due to the relative inefficiency of the optimizers available for DRO in comparison to the wide-spread Stochastic Gradient Descent (SGD) based optimizers for deep learning with ERM. We propose SGD with Hardness weighted sampling, an efficient optimization method for machine learning with DRO with a focus on deep learning. In this work, we propose SGD with hardness weighted sampling, a principled and efficient optimization method for DRO in machine learning that is particularly suited in the context of deep learning. We show that our optimization method can be interpreted as a principled Hard Example Mining strategy. Similar to an online hard example mining strategy in essence and in practice, the proposed algorithm is straightforward to implement and computationally as efficient as SGD-based optimizers used for deep learning. It only requires adding a softmax layer and maintaining a history of the loss values for each training example to compute adaptive sampling probabilities. In contrast to typical ad hoc hard mining approaches, and exploiting recent theoretical results in deep learning optimization, we We also prove the convergence of our DRO algorithm for over-parameterized deep learning networks with ReLU activation and finite number of layers and parameters. Preliminary results demonstrate the feasibility and usefulness of our approach.

Motivation & Objective

  • Address the inefficiency of existing DRO optimizers in deep learning, which limits their adoption despite their robustness to data distribution shifts.
  • Overcome the computational bottleneck of DRO by designing a method compatible with standard SGD-based training pipelines.
  • Develop a principled alternative to heuristic hard example mining that leverages theoretical insights from deep learning optimization.
  • Ensure convergence of the proposed DRO algorithm in over-parameterized deep networks with ReLU activations and finite depth.
  • Enable practical deployment of DRO in real-world deep learning applications through minimal architectural and computational overhead.

Proposed method

  • Introduce a dynamic sampling strategy that assigns higher sampling probabilities to training examples with higher historical losses, using a softmax transformation of loss history.
  • Maintain a running history of loss values per training example to compute adaptive sampling weights, enabling the algorithm to focus on hard examples over time.
  • Integrate the sampling mechanism into SGD by modifying the sampling distribution during each training step, preserving the simplicity and efficiency of standard SGD.
  • The method is formally grounded in DRO theory and interpretable as a principled online hard example mining strategy with theoretical convergence guarantees.
  • Prove convergence for over-parameterized deep networks with ReLU activation functions and finite depth, under standard DRO assumptions.
  • Require only a single additional softmax layer and loss history tracking—minimal changes to standard deep learning training pipelines.

Experimental results

Research questions

  • RQ1Can DRO be made computationally efficient enough for practical use in deep learning without sacrificing robustness?
  • RQ2How can hard example mining be formalized as a principled optimization strategy within the DRO framework?
  • RQ3Does the proposed hardness-weighted sampling method converge for over-parameterized deep networks with ReLU activations?
  • RQ4Can the method achieve performance comparable to ERM-based SGD while improving robustness to distributional shift?
  • RQ5What is the impact of adaptive sampling on generalization and convergence in DRO training?

Key findings

  • The proposed HWS method achieves computational efficiency comparable to standard SGD, enabling practical deployment in deep learning systems.
  • The algorithm is theoretically proven to converge for over-parameterized deep networks with ReLU activation functions and finite depth.
  • HWS is interpretable as a principled online hard example mining strategy, avoiding the ad hoc nature of typical heuristic approaches.
  • The method requires minimal architectural changes—only a softmax layer and loss history tracking—making it easy to integrate into existing training pipelines.
  • Preliminary results confirm the feasibility and effectiveness of the approach in improving robustness without incurring significant computational cost.
  • The method maintains the simplicity and scalability of SGD while enabling distributionally robust training, bridging the gap between DRO and standard deep learning optimization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.