Table of Contents
Fetching ...

LMask: Learn to Solve Constrained Routing Problems with Lazy Masking

Tianyou Li, Haijun Zou, Jiayuan Wu, Zaiwen Wen

TL;DR

This work tackles constrained routing by formulating a unified optimization framework and learning a constrained auto-regressive policy. It introduces LazyMask decoding with a backtracking budget $R$ and refinement intensity embedding to maintain and utilize search-trace information, coupled with an $\ell_1$-penalized training objective and entropy regularization $\lambda$. Theoretical guarantees ensure feasibility and probabilistic optimality, while extensive experiments on TSPTW and TSPDL demonstrate state-of-the-art feasibility rates and high-quality solutions with competitive runtimes. Overall, LMask advances neural constructive solvers for complex routing constraints and suggests a path toward applying masked, backtracking-enabled strategies to broader constrained combinatorial optimization problems.

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.

LMask: Learn to Solve Constrained Routing Problems with Lazy Masking

TL;DR

This work tackles constrained routing by formulating a unified optimization framework and learning a constrained auto-regressive policy. It introduces LazyMask decoding with a backtracking budget and refinement intensity embedding to maintain and utilize search-trace information, coupled with an -penalized training objective and entropy regularization . Theoretical guarantees ensure feasibility and probabilistic optimality, while extensive experiments on TSPTW and TSPDL demonstrate state-of-the-art feasibility rates and high-quality solutions with competitive runtimes. Overall, LMask advances neural constructive solvers for complex routing constraints and suggests a path toward applying masked, backtracking-enabled strategies to broader constrained combinatorial optimization problems.

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.

Paper Structure

This paper contains 44 sections, 3 theorems, 38 equations, 5 figures, 12 tables, 2 algorithms.

Key Result

Proposition 4.1

Suppose that the problem eq:route is feasible, and that the backtracking budget in Algorithm alg:lazy is set to $R=+\infty$. Then, i) any solution $\pi$ generated by Algorithm alg:lazy is feasible; ii) Algorithm alg:lazy assigns a non-zero probability to generate any feasible solution $\pi$.

Figures (5)

  • Figure 1: An illustrative overview of LMask: Up - the overall LMask framework. Down - the LazyMask decoding algorithm.
  • Figure 2: Effect of backtracking and overestimation set initialization strategy combinations.
  • Figure 3: Effect of RIE.
  • Figure 4: Effect of backtracking budget under different overestimation initialization strategies
  • Figure 5: Box plots of optimality gaps and solution infeasibility rates of LMask under sampling decoding across 10 random seeds. Each box shows the interquartile range (25th-75th percentile), the horizontal line indicates the median, and the whiskers extend to the minimum and maximum within 1.5 times the interquartile range.

Theorems & Definitions (5)

  • Proposition 4.1
  • Theorem 4.3
  • proof
  • proof
  • Proposition E.1