Primal-dual algorithm for contextual stochastic combinatorial optimization

Louis Bouvier, Thibault Prunet, Vincent Leclère, Axel Parmentier · DOI

In the intersection of Operations Research (OR) and Machine Learning (ML), a major challenge persists: how do we make complex, combinatorial decisions—such as routing a fleet or designing a power grid—when the future is uncertain and depends on real-time context?

A new paper by Bouvier et al., "Primal-dual algorithm for contextual stochastic combinatorial optimization", offers a scalable solution. They propose a method to train neural networks with "combinatorial layers" that can solve these problems end-to-end without needing the computationally expensive "optimal" labels required by traditional imitation learning.

The Challenge of Contextual Stochastic Optimization (CSO)

Imagine managing a logistics network. You have "context" (weather, traffic, date), but you don't know the exact "noise" (delivery times, road closures) until after a decision is made. This is Contextual Stochastic Optimization (CSO).

The challenge is twofold:

  1. Combinatorial Complexity: The decision space is discrete and massive (e.g., all possible spanning trees in a graph).
  2. The Stochastic Gap: Traditional ML often predicts a single "average" scenario. However, in stochastic settings, the "average" scenario often leads to a sub-optimal decision. A robust policy must consider the entire distribution of possible outcomes.

Current methods either solve these problems online (too slow for real-time) or use Imitation Learning, which requires solving thousands of expensive optimization problems beforehand to create a "teacher" dataset.

Proposed Methodology

The paper introduces a Primal-Dual Alternating Minimization algorithm that embeds combinatorial optimization directly into the learning loop.

Architecture and Flow

The model takes an input $x$ and passes it through standard ML layers to produce parameters $\theta$. These parameters are then mapped to a distribution over combinatorial objects.

The proposed architecture integrates ML layers with a combinatorial optimization framework, mapping input context $x$ to a robust decision $\mu$ through primal and dual variables.

The approach relies on several key components:

  • Combinatorial Optimization (CO) Layers: They embed a linear optimizer (like Kruskal’s algorithm) directly into a neural network.
  • Surrogate Objective: Since raw risk functions in combinatorial spaces are non-differentiable, the authors use Fenchel-Young losses to create a smooth, differentiable objective.
  • Alternating Minimization: The algorithm alternates between a Decomposition Step (finding the best decision for specific scenarios) and a Coordination Step (updating network weights to harmonize these solutions into a single policy).
  • Sparse Perturbations: By adding controlled noise to the costs, they create a "sparse" distribution that remains mathematically tractable even in astronomically large decision spaces.

Duality as a Bridge

A core insight of the work is using Fenchel duality to map "scores" from the neural network to "distributions" over combinatorial objects. This mapping is both mathematically rigorous and computationally efficient.

The duality mapping $\nabla \Omega_\Delta^*$ connects scores $s_\theta$ in the span of the cost matrix to a distribution $q$ on the decision simplex, enabling differentiable training.

By framing the learning problem through this lens, the model discovers optimal policies directly from data without needing "perfect" teacher labels. The "Coordination" step is critical; it allows the model to understand the trade-offs between different uncertain futures rather than learning from scenarios in isolation.

Key Results and Performance

The authors evaluated their algorithm on a Two-Stage Minimum Weight Spanning Tree (MWST) problem using $20 \times 20$ grid graphs.

  • Performance Parity: The primal-dual algorithm achieved an average gap of ~2%, matching the performance of "Fully-coordinated imitation learning."
  • Efficiency: It achieved this performance without the expensive Lagrangian-based heuristic required for imitation learning, making the training pipeline significantly more accessible.
  • Theoretical Guarantees: The authors provided proof that the algorithm converges at a linear rate under certain regularity conditions, offering a theoretical "safety net" for the deep learning-based optimizer.

Limitations and Future Directions

While promising, the method assumes the existence of an efficient "oracle" to solve the deterministic version of the problem. For NP-hard problems like the Traveling Salesperson Problem, the decomposition step remains a bottleneck. Additionally, while the algorithm performs well with sparse perturbations, proving the convexity of the "Jensen gap" for this regularization remains an open question. Future work will focus on applying this approach to real-world datasets, such as power grid loads or urban traffic flow.

Paper Citation: Bouvier, L., Prunet, T., Leclère, V., & Parmentier, A. (2025). Primal-dual algorithm for contextual stochastic combinatorial optimization. arXiv:2505.04757v1.

Summary updated

BibTeX
@misc{bouvier2025primal,
  author = {Louis Bouvier and Thibault Prunet and Vincent Leclère and Axel Parmentier},
  title = {{Primal-dual algorithm for contextual stochastic combinatorial optimization}},
  year = {2025},
  eprint = {2505.04757},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.04757},
}
Figure