Distributionally Robust Optimization via Diffusion Ambiguity Modeling

Jiaqi Wen, Jianyi Yang

TL;DR

This paper introduces Diffusion-based Distributionally Robust Optimization (D-DRO), a novel approach that leverages diffusion models to define the "ambiguity set" in DRO. This allows D-DRO to generate more realistic and diverse worst-case distributions, leading to significantly improved out-of-distribution (OOD) generalization performance on challenging tasks like renewable energy prediction.

What Problem Does This Paper Address?

Distributionally Robust Optimization (DRO) is a powerful technique for making machine learning models more robust to shifts in data distribution. It works by optimizing a model against the "worst-case" distribution within a defined "ambiguity set" around the nominal training distribution. However, designing effective ambiguity sets is a major challenge. Traditional methods using KL-divergence are too restrictive, requiring distributions to have the same support as the nominal one, which limits their ability to handle support shifts. Wasserstein distance-based DRO is more flexible but often computationally intractable. The core problem this paper addresses is how to create an ambiguity set that is both diverse enough to capture realistic worst-case scenarios (including support shifts) and computationally tractable for modern ML models.

Methods

The paper's main innovation is the Diffusion Ambiguity Set. Instead of relying on traditional divergence measures, they propose using diffusion models to define the ambiguity set. Here's how it works:

  • Diffusion Models for Distribution Generation: Diffusion models are known for their ability to generate high-quality, diverse samples that can capture complex data distributions. The authors leverage this capability to generate potential "adversarial" distributions.
  • Score-Matching Constraint: They constrain the diffusion model's parameters using a score-matching loss. This ensures that the generated distributions remain consistent with the nominal training distribution, preventing overly unrealistic or "irrelevant" worst-case scenarios.
  • Tractable Inner Maximization: By parameterizing the ambiguity set using diffusion model parameters, the inner maximization problem (finding the worst-case distribution) becomes a finite-dimensional optimization problem over these parameters, making it tractable.
  • D-DRO Algorithm: They propose the Diffusion-based DRO (D-DRO) algorithm, which iteratively updates the model's decision variable and the diffusion model's parameters. This involves a dual gradient descent approach for the inner maximization.
  • Proximal Policy Optimization (PPO) Reformulation: For improved stability and efficiency, they reformulate the inner maximization objective using Proximal Policy Optimization (PPO) techniques.

Datasets

The experiments were conducted using electricity carbon intensity data from the Electricity Maps platform. Specifically, they used datasets from four regions: California (BANC), Texas (ERCO), Queensland (QLD), and the United Kingdom (GB), spanning the years 2021-2024. For training, they merged BANC_23 and BANC_24. Evaluation was performed on multiple independent test sets from different years and regions to simulate OOD scenarios.

Key Insights and Ideas

  • Diffusion Models as Powerful Ambiguity Set Generators: The core insight is that diffusion models, with their generative capabilities, can naturally create diverse and realistic adversarial distributions that go beyond the nominal support space, a limitation of KL-divergence DRO.
  • Score-Matching for Consistency: Using score-matching to constrain the diffusion model ensures that the generated worst-case distributions are not arbitrarily "bad" but remain grounded in the characteristics of the original data distribution. This is crucial for balancing robustness and performance.
  • Tractability via Parameterization: By framing the ambiguity set in terms of diffusion model parameters, the computationally challenging infinite-dimensional optimization problem of DRO is transformed into a finite-dimensional one, making it practical for deep learning.
  • D-DRO Outperforms Baselines: The empirical results strongly suggest that D-DRO's approach to ambiguity set construction leads to superior OOD generalization compared to standard ML, diffusion-augmented ML (DML), Wasserstein-DRO, and KL-DRO.

Key Results

  • Superior OOD Generalization: D-DRO consistently outperformed all baseline methods across various OOD testing datasets, achieving the largest performance gain (63.7% improvement over standard ML).
  • Robustness to Different Perturbations: D-DRO demonstrated strong robustness against various noise types (Gaussian, Perlin, Cutout) and increasing noise levels, often maintaining stable performance where other methods degraded significantly.
  • Effective Budget Selection: The study showed that the performance of D-DRO is sensitive to the DRO budget parameter ($\epsilon$), with an optimal value around $\epsilon = 0.015$ that balances generalization and avoiding overly conservative optimization.
  • Ablation Studies: Ablation studies confirmed that both the diffusion model augmentation (DML) and the DRO component contribute significantly to D-DRO's performance gains.

Limitations and Future Work

  • Computational Cost: While D-DRO makes DRO tractable, it still involves training diffusion models, which can be computationally intensive. The paper mentions fine-tuning only the last T' backward steps of the DDPM for efficiency.
  • Hyperparameter Tuning: Like most deep learning methods, D-DRO's performance is sensitive to hyperparameter choices, such as the diffusion model steps (T), learning rates, and the DRO budget ($\epsilon$).
  • Future Work: The authors suggest that D-DRO has the potential to enhance robustness in critical statistical optimization and ML tasks facing distribution shifts and imperfect data. Further exploration into optimizing the diffusion model training and hyperparameter tuning could lead to even greater gains. The paper also formally establishes stationary convergence, but exploring convergence rates for specific settings could be a future direction.

Summary updated

BibTeX
@inproceedings{wen2025distributionally,
  author = {JIAQI WEN and Jianyi Yang},
  title = {{Distributionally Robust Optimization via Diffusion Ambiguity Modeling}},
  booktitle = {OPT @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=SAWNDxiPmW},
}
Figure