Solving NP-hard combinatorial optimization problems (COPs) usually forces a choice: use an exact solver like Constraint Programming (CP) that guarantees optimality but might take forever, or use a heuristic (often powered by Reinforcement Learning) that is fast but offers no guarantees. This paper proposes a "best of both worlds" approach.
TL;DR
The authors introduce a hybrid framework that uses Deep Reinforcement Learning (DRL) to learn branching heuristics for a Constraint Programming (CP) solver. By using Dynamic Programming as a unifying bridge, they create a general-purpose solver that outperforms standalone RL and CP methods on complex problems while maintaining the ability to prove optimality.
What Problem Does This Paper Address?
Combinatorial optimization is everywhere—from routing delivery trucks to managing financial portfolios. The core challenge is the "state-space explosion": as problem size grows, the number of possible solutions grows exponentially.
Currently, researchers tackle this in two ways:
- Exact Methods (like CP): These explore a search tree. Their efficiency depends on "branching decisions"—choosing which variable to assign and which value to try first. Designing these heuristics manually is incredibly difficult.
- Learning-based Heuristics (like DRL): These learn to construct solutions quickly. However, they are usually "black boxes" that can't prove a solution is the best possible one, and they are often over-specialized for a single problem type (like the Traveling Salesman Problem).
The authors aim to bridge this gap, creating a framework that is both general (applicable to many problems) and complete (able to prove optimality).
Methods
The secret sauce of this paper is Dynamic Programming (DP). The authors show that many COPs can be formulated as a DP model, which then serves as a common language for both RL and CP.
- The Bridge: A COP is defined as a DP model (states, transitions, rewards). This DP model is then automatically translated into an RL environment for training and a CP model for solving.
- The Learning Phase: They use DRL (specifically DQN and PPO) to learn a "value-selection heuristic." The agent learns which actions (values) are most likely to lead to an optimal solution. They use specialized architectures like Graph Attention Networks (GAT) for routing and Set Transformers for portfolio problems to ensure the model can handle different problem sizes.
- The Solving Phase: The learned DRL model is plugged directly into a CP solver (Gecode). When the solver needs to make a branching decision, it queries the neural network for guidance.
- Search Strategies: The authors integrated these learned heuristics into three standard CP search algorithms: Depth-First Branch-and-Bound (BaB), Iterative Limited Discrepancy Search (ILDS), and Restart-Based Search (RBS).
- Efficiency: Because neural network inference is slow, they implemented a caching mechanism to store and reuse Q-values for previously visited states, significantly speeding up the search.
Datasets
The framework was evaluated on two distinct, challenging NP-hard problems:
- Traveling Salesman Problem with Time Windows (TSPTW): A routing problem where customers must be visited within specific time slots. This introduces non-linear constraints that are hard for standard solvers.
- 4-Moments Portfolio Optimization (PORT): A financial problem involving a non-linear objective function (maximizing return while managing variance, skewness, and kurtosis). The authors tested both continuous and discrete versions.
Instances for both were randomly generated with sizes ranging from 20 to 100 variables.
Key Insights and Ideas
- Feasibility First: In many COPs, just finding any valid solution is hard. The authors designed a reward function that explicitly penalizes infeasibility, forcing the RL agent to learn how to satisfy constraints before it even tries to optimize the objective.
- DP as a Formal Link: By using the Bellman equation as the foundation, the authors ensure that the RL agent's "policy" and the CP solver's "search" are mathematically consistent.
- The Power of Caching: The results showed that caching isn't just a minor optimization; it's essential. For a 100-city TSPTW, caching reduced the average time per value selection from 34 milliseconds to just 0.16 milliseconds.
Key Results
The hybrid approach consistently outperformed standalone RL and CP models, especially as problem size increased.
- TSPTW: On 100-city instances, standard CP and industrial solvers (OR-Tools) failed to find solutions within the time limit (t.o.). The hybrid
BaB-DQN*(with cache) found solutions for 100% of instances and proved optimality for 91% of them.
- Portfolio Optimization: In the discrete case (where the objective function is non-continuous), the hybrid methods significantly outperformed traditional non-linear solvers like Knitro, which struggle when they can't use gradients.
Limitations and Future Work
- Inference Bottleneck: Even with caching, the cost of calling a neural network inside a search loop is high. The authors suggest exploring knowledge distillation to compress large models into smaller, faster ones.
- Distribution Shift: The DRL model must be trained on instances that are similar to the ones it will solve. If the test data looks very different from the training data, performance may drop.
- Implementation Overhead: The current system uses a bridge between Python (for RL) and C++ (for CP). A unified implementation in a single high-performance language could further reduce latency.
Summary updated