English

LMask: Learn to Solve Constrained Routing Problems with Lazy Masking

Optimization and Control 2026-04-06 v2 Artificial Intelligence Machine Learning

Abstract

Routing problems are canonical combinatorial optimization tasks with wide-ranging applications in logistics, transportation, and supply chain management. However, solving these problems becomes significantly more challenging when complex constraints are involved. In this paper, we propose LMask, a novel learning framework that utilizes dynamic masking to generate high-quality feasible solutions for constrained routing problems. LMask introduces the LazyMask decoding method, which lazily refines feasibility masks with the backtracking mechanism. In addition, it employs the refinement intensity embedding to encode the search trace into the model, mitigating representation ambiguities induced by backtracking. To further reduce sampling cost, LMask sets a backtracking budget during decoding, while constraint violations are penalized in the loss function during training to counteract infeasibility caused by this budget. We provide theoretical guarantees for the validity and probabilistic optimality of our approach. Extensive experiments on the traveling salesman problem with time windows (TSPTW) and TSP with draft limits (TSPDL) demonstrate that LMask achieves state-of-the-art feasibility rates and solution quality, outperforming existing neural methods.

Keywords

Cite

@article{arxiv.2505.17938,
  title  = {LMask: Learn to Solve Constrained Routing Problems with Lazy Masking},
  author = {Tianyou Li and Haijun Zou and Jiayuan Wu and Zaiwen Wen},
  journal= {arXiv preprint arXiv:2505.17938},
  year   = {2026}
}

Comments

Accepted to the Fourteenth International Conference on Learning Representations (ICLR 2026)

R2 v1 2026-07-01T02:33:58.221Z