NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Constrained Combinatorial Optimization with Reinforcement Learning

Ruben Solozabal, Josu Ceberio, Martin Takác

Abstract

Combinatorial optimization (CO) is essential for logistics and scheduling but often involves complex constraints that challenge traditional neural methods. This paper presents a framework that reframes CO problems as Constrained Markov Decision Processes (CMDPs). By utilizing penalty-based rewards and a self-competing baseline, the proposed Deep Reinforcement Learning approach enables agents to learn efficient heuristics. Evaluated on Job Shop Scheduling and Virtual Resource Allocation, the method produces high-quality solutions in milliseconds, significantly outperforming traditional heuristics and matching the quality of exact solvers in a fraction of the time.

Introduction

Combinatorial optimization involves selecting the best solution from a finite set of possibilities. While central to industry, these problems are typically NP-Hard and subject to complex constraints. Recent Neural Combinatorial Optimization (NCO) methods often rely on masking to enforce constraints, which fails for "non-maskable" constraints that depend on a sequence of decisions. Additionally, standard sequence-to-sequence models often fail to fully exploit the evolving state of the problem during the solution process.

Methodology

The authors introduce three major shifts in applying RL to CO:

  1. CMDP Formulation: The problem is treated as a Constrained Markov Decision Process where the solution is built iteratively, allowing the agent full access to the environment's state at each step.
  2. Lagrange Relaxation for Constraints: Non-maskable constraints are incorporated as penalty signals in the reward function. This "soft" penalty approach provides a gradient of feedback, guiding the agent toward feasible regions.
  3. Self-Competing Baseline: To stabilize training, the authors use a novel baseline that compares the agent's performance against a top quantile of its own sampled solutions, forcing it to constantly improve without a separate critic network.
  4. Memory-less Architecture: By providing a fully observable state, the authors replace memory-heavy Recurrent Neural Networks (RNNs) in the decoder with simpler, more efficient Deep Neural Networks (DNNs) coupled with an attention mechanism.

Experimental Results

The framework was evaluated on Job Shop Scheduling (JSP) and the Virtual Resource Allocation Problem (VRAP).

Performance and Generalization

In JSP benchmarks, the RL model consistently outperformed standard heuristics such as Shortest Processing Time (SPT) and Genetic Algorithms (GA). Notably, the model exhibited low variance in solution quality across different instances, suggesting robust generalization within the problem class.

Comparison of optimality gaps for various heuristics and the proposed RL model (NN). The RL approach shows significantly lower gaps and variance compared to traditional methods.

Real-time Superiority

A key advantage of the RL approach is its speed. While exact solvers like OR-Tools eventually find superior solutions, the RL model provides "good enough" solutions in milliseconds. For complex 15x15 JSP instances, the RL model found solutions in approximately 3 seconds that took the OR-Tools CP-SAT solver significantly longer to match, often hitting a one-hour timeout on larger instances.

Mean objective value over time for OR-Tools and the RL model across different JSP sizes. The RL model provides rapid, high-quality solutions, while exact solvers require orders of magnitude more time to improve.

Conclusion

This paper demonstrates that reframing CO as a CMDP and using penalty-based RL can produce powerful, fast heuristics for constrained problems. While a scaling gap exists for massive instances, the model's millisecond-level response time makes it ideal for dynamic real-world applications. Future research will explore automatic tuning of penalty coefficients and improved scaling for industrial-scale problems.

Summary updated

BibTeX
@misc{solozabal2020constrained,
  author = {Ruben Solozabal and Josu Ceberio and Martin Takác},
  title = {{Constrained Combinatorial Optimization with Reinforcement Learning}},
  year = {2020},
  eprint = {2006.11984},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.11984},
}
Figure