Towards Efficient Constraint Handling in Neural Solvers for Routing Problems
Organizations: Nanyang Technological University · MIT · Singapore Management University · Shandong University ·
Abstract
Neural solvers have achieved impressive progress in addressing simple routing problems, particularly excelling in computational efficiency. However, their advantages under complex constraints remain nascent, for which current constraint-handling schemes via feasibility masking or implicit feasibility awareness can be inefficient or inapplicable for hard constraints. In this paper, we present Construct-and-Refine (CaR), the first general and efficient constraint-handling framework for neural routing solvers based on explicit learning-based feasibility refinement. Unlike prior construction-search hybrids that target reducing optimality gaps through heavy improvements yet still struggle with hard constraints, CaR achieves efficient constraint handling by designing a joint training framework that guides the construction module to generate diverse and high-quality solutions well-suited for a lightweight improvement process, e.g., 10 steps versus 5k steps in prior work. Moreover, CaR presents the first use of construction-improvement-shared representation, enabling potential knowledge sharing across paradigms by unifying the encoder, especially in more complex constrained scenarios. We evaluate CaR on typical hard routing constraints to showcase its broader applicability. Results demonstrate that CaR achieves superior feasibility, solution quality, and efficiency compared to both classical and neural state-of-the-art solvers.
Figures & tables
| Methods | VRP applicability | Research focus | Feasibility | Feasibility Awareness | Feasibility | ||||
| Simple | Complex | Optimality | Feasibility | Masking | Penalty | Features | Shared Rep. | Refinement | |
| Most existing neural solvers | |||||||||
| (e.g. POMO, UDC, LCP, RL4CO, NCS) | |||||||||
| NeuOpt-GIRE ( Ma et al., 2023 ) | |||||||||
| Tang et al. (2022) | |||||||||
| MUSLA ( Chen et al., 2024 ) | |||||||||
| Method | #Params | Paradigm § | n=50 | n=100 | |||||||
| Obj. | Gap | Infsb% | Time | Obj. | Gap | Infsb% | Time | ||||
| TSPTW | LKH-3 (max trials 100) | / | I | 25.590 | 0.004% | 11.88% | 7m | 46.625 | 0.103% | 31.05% | 27m |
| LKH-3 (max trials 10000) | / | I | 25.611 | 0.12% | 7h | 46.858 | 0.13% | 1.4d | |||
| OR-Tools † | / | I | 25.763 | -0.001% | 65.72% | 2.4h | 46.424 | 0.026% | 97.45% | 12m | |
| Greedy-L | / | C | / | / | 100.00% | 21.8s | / | / | 100.00% | 1m | |
| Greedy-C | / | C | 26.394 | 1.534% | 72.55% | 4.5s | 51.945 | 9.651% | 99.85% | 11.4s | |
| Problem | Gap | Infsb% | |
|---|---|---|---|
| CVRP | 0.325% | 0.00% | |
| 0.259% | 0.00% | ||
| TSPTW | 0.421% | 0.58% | |
| 0.014% | 0.01% |
| Method | Train Scale | Test Scale | Gap | Infsb% | Time |
|---|---|---|---|---|---|
| POMO*+EAS+SGBS ( Choo et al., 2022 ) | 100 | 200 | 4.51% | 0.00% | 2.1m |
| NeuOpt* ( Ma et al., 2023 ) | 100 | 200 | 6.37% | 75.78% | 17m |
| CaR (R&R, 20) | 100 | 200 | 2.09% | 0.00% | 10s |
| Method | Train | Test | Gap | Infsb% | Time |
|---|---|---|---|---|---|
| PIP (sample 5) | tight | tight | 0.26% | 4.62% | 2.3m |
| PIP (sample 5) | loose | tight | 0.03% | 31.37% | 2.3m |
| CaR-PIP ( 20) | loose | tight | 0.02% | 3.52% | 2.3m |
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| Type | Paradigm | Neural baselines |
|---|---|---|
| Single-task | Construction | AM ( Kool et al., 2018 ) , POMO ( Kwon et al., 2020 ) , BQ-NCO ( Drakulic et al., 2023 ) , LEHD ( Luo et al., 2023 ) , |
| UDC ( Zheng et al., 2024 ) , InViT ( Fang et al., 2024 ) , PolyNet ( Hottung et al., 2025 ) | ||
| Single-task | Construction + Post-search | SGBS ( Choo et al., 2022 ) (on top of POMO+EAS ( Hottung et al., 2022 ) ), |
| RRC ( Luo et al., 2023 ) (on top of LEHD and UDC) | ||
| Multi-task | Construction | POMO-MTL ( Liu et al., 2024 ) , MVMoE ( Zhou et al., 2024 ) , ReLD-MoEL ( Huang et al., 2025 ) |
| Single-task | Improvement | NeuOpt-GIRE ( Ma et al., 2023 ) |
| w. multi-start | w. mask | Obj. | Gap | Infsb% |
|---|---|---|---|---|
| 10.550 | 2.093% | 0.00% | ||
| ✓ | 10.520 | 1.793% | 0.00% | |
| ✓ | 10.431 | 0.921% | 0.00% | |
| ✓ | ✓ | 10.424 | 0.857% | 0.00% |
| Method | Module | n=50 | n=100 | ||||
|---|---|---|---|---|---|---|---|
| Obj. | Gap | Infsb% | Obj. | Gap | Infsb% | ||
| Construction (w/o mask) | 14.798 | 2.116% | 3.50% | 24.404 | -2.050% | 2.80% | |
| CaR | Refinement ( -opt) | 14.759 | 1.682% | 2.50% | 24.360 | -2.285% | 2.60% |
| Re-construction (w. mask) | 14.844 | 2.114% | 0.00% | 24.585 | -1.724% | 0.00% | |
| Construction (w/o mask) | 14.843 | 2.235% | 2.60% | 24.460 | -1.715% | 3.10% | |
| CaR | Refinement (R&R) | 14.567 | 0.221% | 1.10% | 24.215 | -2.886% | 1.90% |
| Method | #Params | Paradigm § | n = 50 | n = 100 | ||||
|---|---|---|---|---|---|---|---|---|
| Obj. | Gap | Time | Obj. | Gap | Time | |||
| HGS | / | I | 10.334 | 4.6m | 15.504 | 9.1m | ||
| LKH-3 | / | I | 10.346 | 0.115% | 9.9m | 15.590 | 0.556% | 18.0m |
| OR-Tools (short) | / | I | 10.540 | 1.962% | 10.4m | 16.381 | 5.652% | 20.8m |
| OR-Tools (long) | / | I | 10.418 | 0.788% | 1.7h | 15.935 | 2.751% | 3.5h |
| AM | 0.68M | L2C-S | 10.590 | 2.478% | 17s | 16.139 | 4.098% | 1.1m |
| Instance | Opt | POMO (greedy) | BQ-NCO (greedy) | LEHD (greedy) | INViT (greedy) | UDC (RRC=2) | MVMoE (greedy) | CaR (greedy, 20) | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Obj. | Gap | Obj. | Gap | Obj. | Gap | Obj. | Gap | Obj. | Gap | Obj. | Gap | Obj. | Gap | ||
| X-n101-k25 | 27591 | 30138 | 9.23% | 33617 | 21.84% | 31445 | 13.97% | 28311 | 2.61% | 33466 | 21.29% | 29361 | 6.42% | 28518 | 3.36% |
| X-n106-k14 | 26362 | 39322 | 49.16% | 28221 | 7.05% | 27351 | 3.75% | 27614 | 4.75% | 28681 | 8.80% | 27278 | 3.47% | 27703 | 5.09% |
| X-n110-k13 | 14971 | 15223 | 1.68% | 15718 | 4.99% | 15252 | 1.88% | 15729 | 5.06% | 16665 | 11.32% | 15089 | 0.79% | 15232 | 1.74% |
| X-n115-k10 | 12747 | 16113 | 26.41% | 15266 | 19.76% | 13950 | 9.44% | 13744 | 7.82% | 16056 | 25.96% | 13847 | 8.63% | 13097 | 2.75% |
| X-n120-k6 | 13332 | 14085 | 5.65% | 15524 | 16.44% | 13851 | 3.89% | 14363 | 7.73% | 16618 | 24.65% | 14089 | 5.68% | 13483 | 1.13% |
| HD | PJD | KTD | |
|---|---|---|---|
| PIP’s constructed solutions | |||
| CaR’s constructed solutions | 0.770 0.893 | 0.015 0.018 | 0.821 0.997 |
| CaR’s diversity improvement over PIP | +15.6% | +15.6% | +15.1% |
| Method | TSPTW-50 Medium | TSPTW-50 Hard | TSPTW-100 Medium | |||
|---|---|---|---|---|---|---|
| Infsb% | Gap | Infsb% | Gap | Infsb% | Gap | |
| Construction-only | 3.77% | 5.230% | 37.27% | 1.635% | 0.12% | 10.931% |
| w/o Shared Rep. | 0.01% | 2.047% | 0.68% | 0.199% | 0.00% | 7.589% |
| w. Shared Rep. | 0.00% | 2.173% | 0.01% | 0.014% | 0.00% | 5.815% |
| Backbones | Shared Rep. | Gap | Infsb% | |
| POMO* (Construction-only) | – | – | 1.959% | 38.22% |
| CaR-POMO* | 0.136% | 0.29% | ||
| CaR-POMO* | 0.199% | 0.68% | ||
| CaR-POMO* (Ours) | 0.014% | 0.01% | ||
| PIP (Construction-only) | – | – | 0.177% | 2.67% |
| CaR-PIP | 0.156% | 1.85% |
| Method | Gap | Infsb% | ||
| 5 (same as CaR) | 20 | / | 100% | |
| 10 | 20 | / | 100% | |
| NeuOpt* | 20 | 20 | / | 100% |
| 100 | 20 | / | 100% | |
| 200 (original NeuOpt) | 20 | / | 100% | |
| 5 (same as CaR) | 100 | / | 100% |
| Hyperparameters | Gap | Infsb% |
|---|---|---|
| 0.421% | 0.58% | |
| (Ours) | 0.014% | 0.01% |
| 1.483% | 32.68% | |
| 0.136% | 0.29% | |
| (Ours) | 0.014% | 0.01% |
| 1.63% | 32.12% |
| Problem | Method | n=50 | n=100 | ||
|---|---|---|---|---|---|
| Gap | Infsb% | Gap | Infsb% | ||
| TSPTW | CaR-POMO ( 20) | 0.016% 0.000% | 0.01% 0.00% | 0.401% 0.002% | 2.33% 0.02% |
| CaR-PIP ( 20) | 0.005% 0.000% | 0.00% 0.01% | 0.158% 0.001% | 0.64% 0.06% | |
| CVRPBLTW | CaR ( -opt) ( 20) | 2.166% 0.025% | 0.00% 0.00% | -1.697% 0.006% | 0.00% 0.00% |
| CaR (R&R) ( 20) | 0.454% 0.012% | 0.00% 0.00% | -2.473% 0.015% | 0.00% 0.00% | |
Neural Combinatorial Optimization
Neural combinatorial optimization uses neural networks to find high-quality solutions to discrete problems such as routing, scheduling, and graph partitioning.
See all 135 papers