In the world of "predict-then-optimize," systems typically try to guess a single number (like tomorrow's electricity demand) and then make a decision based on that guess. But what if the world isn't just one number? What if it’s a complex, multi-modal distribution of possibilities?
A new paper, "Diffusion-DFL: Decision-focused Diffusion Models for Stochastic Optimization," introduces a way to use the expressive power of diffusion models to make better decisions under uncertainty.
TL;DR
The authors propose the first framework to integrate diffusion models into Decision-Focused Learning (DFL). By modeling the full distribution of uncertain parameters rather than just point predictions, their approach—specifically a lightweight "score function" estimator—outperforms traditional methods while reducing GPU memory usage from 60 GB to just 0.13 GB.
What Problem Does This Paper Address?
Most real-world decisions involve unknown parameters. In a standard predict-then-optimize pipeline, you train a model to minimize prediction error (like Mean Squared Error) and then feed that prediction into an optimizer. However, Decision-Focused Learning (DFL) argues that we should train the predictor to minimize the final decision cost instead.
The catch? Most existing DFL methods rely on deterministic point predictions. If the underlying reality is "stochastic" (random) or "multi-modal" (e.g., demand could be very high OR very low, but rarely in the middle), a single-point guess leads to overconfident, suboptimal decisions. While some have tried using Gaussian distributions, they are often too simple to capture the messy, complex distributions of the real world.
Methods
The authors introduce Diffusion-DFL, which uses a conditional diffusion model to represent the distribution of uncertain parameters. To train this end-to-end, they tackle the "differentiable optimization" challenge with two distinct strategies:
- Reparameterization Trick: This allows backpropagation through the diffusion sampling process. While mathematically sound, it is a "memory hog" because it requires tracking gradients through hundreds or thousands of sequential sampling steps.
- Score Function Estimator (The "Lightweight" Hero): To solve the memory issue, the authors propose a surrogate gradient based on the Evidence Lower Bound (ELBO). Instead of backpropping through the entire sampling chain, they use the gradient of the diffusion model's training objective as a proxy for the "score" (the gradient of the log-likelihood).
- Variance Reduction: To make the score function estimator stable, they use an importance sampling strategy that prioritizes diffusion timesteps with larger gradient magnitudes, ensuring the training doesn't diverge.
Datasets
The researchers evaluated their method on three distinct tasks:
- Synthetic Product Allocation: A toy problem where profit margins follow a mixture of Gaussians, specifically designed to test how models handle multi-modal uncertainty.
- Power Scheduling: A real-world task using 8 years of data from the PJM Interconnection regional power grid to schedule hourly electricity generation.
- Stock Market Portfolio Optimization: Using the Quandl WIKI dataset (S&P 500 constituents) to allocate portfolio weights under uncertain returns.
- Inventory Stock Problem: A classic "newsvendor" problem included in the appendix to further validate the model's handling of complex demand distributions.
Key Insights and Ideas
- The "Boundary" Trap: Deterministic models often push decisions to the extreme boundaries of a feasible region. Stochastic models (like diffusion) tend to find "interior" solutions that balance risk and reward more effectively.
- ELBO as a Gradient Proxy: One of the most elegant findings is that you don't actually need to differentiate through the sampling process. The gradient of the ELBO—the very thing we use to train diffusion models anyway—is a reliable surrogate for the decision gradient.
- Scalability: As the number of decision variables increases (e.g., more stocks in a portfolio), the gap between Diffusion-DFL and simpler baselines grows, suggesting that diffusion is particularly useful for high-dimensional decision-making.
Key Results
- Decision Quality: Diffusion-DFL consistently achieved the lowest "Task Loss" across all experiments. In the stock portfolio task, it achieved a ~4% average return, while deterministic and Gaussian baselines struggled to break 0.15%.
- Efficiency: The score function estimator is a game-changer for hardware. It achieved decision quality comparable to the reparameterization method but used ~460x less GPU memory (0.13 GB vs. 60.75 GB).
- Robustness: The importance sampling strategy for the score function led to much smoother learning curves and faster convergence compared to uniform sampling of diffusion steps.
Limitations and Future Work
While powerful, the authors note a few areas for growth:
- Uncertainty in Constraints: Currently, the model handles uncertainty in the objective function (the goal), but real-world problems often have uncertainty in the constraints (the rules).
- Calibration vs. Quality: The paper focuses on decision quality; future work could investigate the trade-off between how well-calibrated the diffusion model's probabilities are and how that impacts the final decision.
- Online Learning: Adapting this framework for real-time, online decision-making settings remains an open challenge.
Check out the code: The authors have made their implementation available at https://github.com/GT-KOALA/Diffusion_DFL.
Summary updated