Score Function Gradient Estimation to Widen the Applicability of Decision-Focused Learning

Mattia Silvestri, Senne Berden, Gaetano Signorelli, Ali İrfan Mahmutoğulları, Jayanta Mandi, Brandon Amos, Tias Guns, Michele Lombardi

TL;DR

This paper introduces a new Decision-Focused Learning (DFL) method that combines stochastic smoothing with score function gradient estimation. This approach significantly broadens the applicability of DFL to complex optimization problems with non-linear objectives and uncertain constraints, outperforming existing methods and prediction-focused approaches.

What Problem Does This Paper Address?

Many real-world problems involve making decisions based on parameters that are not known precisely at decision time. A common approach is to first predict these parameters using a machine learning (ML) model and then solve the optimization problem with these predictions. While "prediction-focused learning" (PFL) trains the ML model to be accurate in its predictions, this doesn't guarantee good decisions. "Decision-focused learning" (DFL) aims to directly optimize decision quality by minimizing a task-specific loss. However, a major hurdle for DFL is that for combinatorial optimization problems (where solutions are discrete, like choosing which items to include in a knapsack), the gradients of the task loss are often zero, making gradient-based training impossible. Existing DFL methods try to overcome this with smoothing or surrogate losses, but they often rely on strong assumptions about the optimization problem's structure (e.g., linearity, parameters only in the objective). This paper tackles the challenge of extending DFL to a much wider range of optimization problems, including those with non-linear objectives, uncertain constraints, and two-stage stochastic optimization, without these restrictive assumptions.

Methods

The core of the proposed method is a combination of two techniques:

  • Stochastic Smoothing: Instead of predicting a single point estimate for the unknown parameters, the ML model now predicts a distribution (specifically, a Gaussian distribution defined by a mean $\mu$ and standard deviation $\sigma$). This introduces randomness into the parameter predictions during training. By averaging the task loss over these random predictions, the loss function becomes "smoothed," which helps to generate informative gradients even for combinatorial problems. The degree of smoothing is controlled by $\sigma$, which can be fixed, learned as a constant, or even learned contextually based on input features.
  • Score Function Gradient Estimation (SFGE): To compute the gradient of this smoothed loss with respect to the ML model's parameters, the authors employ SFGE, also known as the REINFORCE algorithm. This technique is well-suited for estimating gradients of expected values and, crucially, does not require the optimization problem to be differentiable or to have specific structural properties. It allows gradients to be estimated even when parameters appear in constraints or non-linearly in the objective.

The authors also introduce a technique called variance reduction using standardization of the regret within mini-batches to improve convergence speed.

Datasets

The paper uses several synthetic datasets for evaluation, often generated based on procedures described in prior work:

  • Fractional Knapsack Problem (KP): Used for evaluating predictions of parameters in constraints.
  • Integer Linear Programs (ILPs): Specifically, KP with uncertain weights and Weighted Set Multi-Cover (WSMC) problems with uncertain coverage requirements.
  • Two-Stage Stochastic Optimization Problems: Applied to ILPs, including KP and WSMC.
  • Linear Regression Models: Used as the ML model for predictions across various experiments.
  • Production Planning Problem: A quadratic objective function problem with integrality constraints, used to demonstrate applicability beyond existing DFL methods.

Key Insights and Ideas

  • Breaking Free from Structural Assumptions: The most significant insight is that by combining stochastic smoothing with SFGE, DFL can be applied to a much broader class of optimization problems than previously possible, without needing to assume linearity, convexity, or that parameters only affect the objective function.
  • Stochastic Smoothing as a General Gradient Generator: The paper demonstrates that introducing controlled randomness (stochastic smoothing) into parameter predictions is a powerful way to create informative gradients for otherwise non-differentiable or zero-gradient loss functions in DFL.
  • SFGE's Versatility: Score Function Gradient Estimation proves to be a robust tool for estimating gradients in this context, working even when parameters are in constraints or objectives, and for non-linear problems.
  • Scalability Advantage in Two-Stage Problems: For two-stage stochastic optimization, the proposed SFGE method offers significant scalability advantages at inference time compared to Sample Average Approximation (SAA) by using only a single predicted parameter vector.
  • Learned Smoothing Adapts to Problem Structure: The learned standard deviation ($\sigma$) of the Gaussian smoothing adapts during training, suggesting that the model learns to balance exploration (high $\sigma$) and exploitation (low $\sigma$) based on the specific problem's characteristics.

Key Results

  • Constraint Parameter Prediction: SFGE matches or outperforms specialized methods for predicting constraint parameters, especially in terms of solution quality and lower variance, while also extending to settings where no existing method is applicable. For example, in the fractional knapsack problem, SFGE achieved competitive relative post-hoc regret with significantly lower variance than a state-of-the-art method.
  • Two-Stage Stochastic Optimization: SFGE shows comparable or better solution quality than PFL+SAA, but with vastly improved inference time scalability, as it doesn't require sampling multiple scenarios.
  • Objective Parameter Prediction: While not outperforming specialized methods designed for this specific case, SFGE still significantly outperforms PFL, demonstrating its general applicability.
  • General Applicability: SFGE successfully tackles a production planning problem with a quadratic objective and integrality constraints, a problem outside the scope of existing DFL methods, achieving a significant reduction in regret compared to PFL.
  • Convergence Speed: SFGE generally converges slower than specialized methods but offers a better trade-off between computational cost and relative regret with an optimal batch size of 32. Variance reduction techniques (standardization) significantly improve convergence speed.

Limitations and Future Work

  • Convergence Speed: A primary limitation acknowledged is that SFGE tends to converge slower than existing methods, partly due to the variance in Monte Carlo gradient estimates. The authors mitigate this with standardization and suggest exploring other variance reduction techniques.
  • Real-World Application: The authors suggest that an interesting future direction is to apply SFGE to real-world case studies, which may present weaker signals and higher variance, requiring further investigation into variance reduction techniques.
  • Alternative Gradient Estimators: Exploring other Monte Carlo gradient estimators, such as measure-valued gradient estimators, is proposed as a future research avenue.
  • Scenario-Based Methods: For problems where optimal solutions cannot be identified via a single predicted vector (e.g., highly complex stochastic scenarios), scenario-based methods might be more appropriate, though SFGE offers better scalability.

Summary updated

BibTeX
@article{silvestri2026score,
  author = {Mattia Silvestri and Senne Berden and Gaetano Signorelli and Ali İrfan Mahmutoğulları and Jayanta Mandi and Brandon Amos and Tias Guns and Michele Lombardi},
  title = {{Score Function Gradient Estimation to Widen the Applicability of Decision-Focused Learning}},
  journal = {Journal of Artificial Intelligence Research},
  year = {2026},
  doi = {10.1613/jair.1.19498},
}
Figure