NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning to Search Feasible and Infeasible Regions of Routing Problems with Flexible Neural k-Opt

Yining Ma, Zhiguang Cao, Yeow Meng Chee

Abstract

Vehicle Routing Problems (VRPs) are fundamental combinatorial optimization challenges central to logistics. While neural solvers have emerged as promising alternatives to traditional heuristics, they often struggle with high-order local search moves and rigid feasibility constraints. We present NeuOpt, a "learning-to-search" (L2S) framework that introduces flexible $k$-opt moves and a novel strategy for exploring infeasible regions. By decomposing complex $k$-opt exchanges into sequential basis moves and utilizing Guided Infeasible Region Exploration (GIRE), NeuOpt becomes the first neural solver to outperform the state-of-the-art LKH-3 heuristic on the Capacitated Vehicle Routing Problem (CVRP).

1. Introduction

The Vehicle Routing Problem (VRP) and its variants, such as the Traveling Salesman Problem (TSP), are NP-hard tasks central to global logistics and supply chain management. Traditional solvers like LKH-3 rely on hand-crafted heuristics, such as 2-opt or 3-opt exchanges, to iteratively improve solutions. Recently, deep learning has introduced "neural solvers" categorized into three main paradigms: Learning-to-Construct (L2C), Learning-to-Predict (L2P), and Learning-to-Search (L2S).

Despite their potential, L2S models face two significant hurdles. First, they are typically restricted to low-order moves (e.g., 2-opt) because the complexity of $k$-opt moves grows exponentially with $k$. Second, they often employ "feasibility masking," strictly prohibiting moves that violate constraints. This masking can fragment the search space, trapping the solver in local optima. This paper introduces NeuOpt, which addresses these gaps through flexible action factorization and guided exploration of infeasible regions.

2. Methodology

NeuOpt's architecture is designed to handle the complexity of high-order moves while navigating constrained search spaces through three primary innovations.

2.1 Flexible Action Factorization

Rather than selecting a fixed $k$ for $k$-opt moves beforehand, NeuOpt treats a $k$-opt exchange as a sequence of basis moves. This factorization includes:

  • Starting move (S-move): Initiates the exchange.
  • Intermediate moves (I-moves): Continues the chain of edge swaps.
  • Ending move (E-move): Closes the exchange to return to a valid tour.

This sequential approach allows the model to dynamically determine the optimal $k$ for any given state, enabling high-order moves without the computational explosion of exhaustive search. To manage the dependencies within these sequences, NeuOpt utilizes a Recurrent Dual-Stream (RDS) Decoder. One stream tracks the sequence of move types, while the other focuses on the specific nodes and edges involved, ensuring a coherent representation of the global tour structure.

2.2 Guided Infeasible Region Exploration (GIRE)

The core innovation for constrained problems like CVRP is GIRE. In traditional L2S, moves that violate capacity constraints are masked. NeuOpt instead allows the search to enter infeasible regions, treating them as "bridges" between disconnected feasible "islands." To prevent the model from wandering too deep into infeasibility, GIRE employs violation indicators and reward shaping based on entropy. This incentivizes the model to explore the boundaries of feasibility and return to a feasible state after finding a shortcut.

2.3 Dynamic Data Augmentation (D2A)

To further escape local optima during inference, NeuOpt uses D2A. If the search plateaus, the model applies geometric transformations—such as rotations or flips—to the problem instance. This "shakes" the internal representation, allowing the search to proceed from a fresh perspective without changing the underlying problem geometry.

3. Experiments and Results

NeuOpt was evaluated on synthetic TSP and CVRP instances (up to 200 nodes) and standard benchmarks from TSPLIB and CVRPLIB.

3.1 Performance on TSP and CVRP

On TSP-100, NeuOpt achieved a 0.00% optimality gap, matching or exceeding all existing neural and traditional solvers. Its ability to learn high-order moves allows it to find optimal paths that simpler 2-opt or 3-opt heuristics might miss.

The impact of GIRE is most evident in CVRP. On CVRP-100, NeuOpt-GIRE surpassed LKH-3, the long-standing gold standard for routing heuristics. This marks a significant milestone for neural combinatorial optimization, as LKH-3 is highly optimized and notoriously difficult to beat.

3.2 Efficiency and Generalization

NeuOpt demonstrates superior efficiency compared to previous L2S models like DACT, often achieving lower gaps in less wall-clock time. Furthermore, models trained on 100-node instances generalize effectively to 200-node problems and real-world datasets, maintaining a competitive edge over other neural methods.

4. Conclusion

NeuOpt demonstrates that neural solvers can surpass traditional heuristics by learning flexible search strategies and intelligently navigating infeasible regions. The insight that infeasibility can serve as a bridge between feasible solutions is a significant departure from standard masking techniques.

While NeuOpt scales better than L2C methods, it currently faces challenges on massive instances (thousands of nodes) where heatmap-based L2P methods remain more efficient. Future work will focus on optimizing the search logic via high-performance CUDA kernels and extending GIRE to more complex constraints, such as time windows or pickup-and-delivery requirements.

Summary updated

BibTeX
@inproceedings{ma2023learning,
  author = {Yining Ma and Zhiguang Cao and Yeow Meng Chee},
  title = {{Learning to Search Feasible and Infeasible Regions of Routing Problems with Flexible Neural k-Opt}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=q1JukwH2yP},
}
Figure