LMask: Learn to Solve Constrained Routing Problems with Lazy Masking

Tianyou Li, Haijun Zou, Jiayuan Wu, Zaiwen Wen
5/23/2025
math.OCcs.AIcs.LG

No confident code implementation found for this paper.

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2025lmask,
  title  = {LMask: Learn to Solve Constrained Routing Problems with Lazy Masking},
  author = {Tianyou Li and Haijun Zou and Jiayuan Wu and Zaiwen Wen},
  year   = {2025},
  eprint = {2505.17938},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.17938v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.17938.svg)](https://codeofpaper.com/paper/2505.17938)

Discussion