Table of Contents
Fetching ...

Learning to Insert for Constructive Neural Vehicle Routing Solver

Fu Luo, Xi Lin, Mengyuan Zhong, Fei Liu, Zhenkun Wang, Jianyong Sun, Qingfu Zhang

TL;DR

This work tackles Vehicle Routing Problems by introducing L2C-Insert, a fully learned insertion-based constructive framework thatallows nodes to be inserted at any valid position in the current partial solution. The model combines a Transformer-style encoder-decoder with a supervised training scheme that learns precise insertion positions, and a distance-based local reconstruction strategy to refine solutions during inference. Empirical results on TSP and CVRP demonstrate strong, scalable performance from 100 to 100K nodes, often outperforming state-of-the-art neural solvers and even rivaling classical methods in efficiency. The study highlights the insertion paradigm as a powerful alternative to traditional appending, with clear implications for designing more flexible and effective neural solvers for VRPs.

Abstract

Neural Combinatorial Optimisation (NCO) is a promising learning-based approach for solving Vehicle Routing Problems (VRPs) without extensive manual design. While existing constructive NCO methods typically follow an appending-based paradigm that sequentially adds unvisited nodes to partial solutions, this rigid approach often leads to suboptimal results. To overcome this limitation, we explore the idea of insertion-based paradigm and propose Learning to Construct with Insertion-based Paradigm (L2C-Insert), a novel learning-based method for constructive NCO. Unlike traditional approaches, L2C-Insert builds solutions by strategically inserting unvisited nodes at any valid position in the current partial solution, which can significantly enhance the flexibility and solution quality. The proposed framework introduces three key components: a novel model architecture for precise insertion position prediction, an efficient training scheme for model optimization, and an advanced inference technique that fully exploits the insertion paradigm's flexibility. Extensive experiments on both synthetic and real-world instances of the Travelling Salesman Problem (TSP) and Capacitated Vehicle Routing Problem (CVRP) demonstrate that L2C-Insert consistently achieves superior performance across various problem sizes.

Learning to Insert for Constructive Neural Vehicle Routing Solver

TL;DR

This work tackles Vehicle Routing Problems by introducing L2C-Insert, a fully learned insertion-based constructive framework thatallows nodes to be inserted at any valid position in the current partial solution. The model combines a Transformer-style encoder-decoder with a supervised training scheme that learns precise insertion positions, and a distance-based local reconstruction strategy to refine solutions during inference. Empirical results on TSP and CVRP demonstrate strong, scalable performance from 100 to 100K nodes, often outperforming state-of-the-art neural solvers and even rivaling classical methods in efficiency. The study highlights the insertion paradigm as a powerful alternative to traditional appending, with clear implications for designing more flexible and effective neural solvers for VRPs.

Abstract

Neural Combinatorial Optimisation (NCO) is a promising learning-based approach for solving Vehicle Routing Problems (VRPs) without extensive manual design. While existing constructive NCO methods typically follow an appending-based paradigm that sequentially adds unvisited nodes to partial solutions, this rigid approach often leads to suboptimal results. To overcome this limitation, we explore the idea of insertion-based paradigm and propose Learning to Construct with Insertion-based Paradigm (L2C-Insert), a novel learning-based method for constructive NCO. Unlike traditional approaches, L2C-Insert builds solutions by strategically inserting unvisited nodes at any valid position in the current partial solution, which can significantly enhance the flexibility and solution quality. The proposed framework introduces three key components: a novel model architecture for precise insertion position prediction, an efficient training scheme for model optimization, and an advanced inference technique that fully exploits the insertion paradigm's flexibility. Extensive experiments on both synthetic and real-world instances of the Travelling Salesman Problem (TSP) and Capacitated Vehicle Routing Problem (CVRP) demonstrate that L2C-Insert consistently achieves superior performance across various problem sizes.

Paper Structure

This paper contains 65 sections, 12 equations, 6 figures, 15 tables.

Figures (6)

  • Figure 1: Appending-based construction vs. Insertion-based construction. Given the same intermediate state in the construction process: (a) The appending-based paradigm restricts the addition of a selected node exclusively to the end of the current partial solution. This inflexibility leads to path intersections, a common cause of suboptimal solutions. (b) In contrast, the insertion-based construction offers greater flexibility by allowing the selected node to be inserted into any feasible position within the partial solution. Such flexibility is crucial for avoiding the intersections and thereby enhancing the potential for generating high-quality solutions.
  • Figure 2: Model Structure of L2C-Insert.(a) Encoding: At the beginning of solution construction, the encoder transforms each node's feature vector into a $d$-dimensional node embedding $\mathbf{h}_i\in \mathbb{R}^{d}$. (b) Decoding: At construction step $t$, the decoder maintains three embeddings for 1) the current node (the node to be inserted), 2) unvisited nodes, and 3) the positions in the partial solution, where each position embedding is created by horizontally concatenating the embeddings of adjacent visited nodes. Each embedding type undergoes separate linear transformations before being collectively processed through $L$ stacked attention layers. The final insertion probabilities are obtained by applying a linear projection followed by a masked softmax operation to the refined embeddings.
  • Figure 3: Training Scheme for L2C-Insert Model. The model learns to sequentially insert the current node into the target position in the partial solution. The target position for the current node is determined by its adjacent visited nodes in the original labeled solution. The training objective is to maximize the probability of the model predicting the correct target insertion position, as defined by the provided loss function.
  • Figure 4: figure
  • Figure 5: Insertion-based construction process on the TSPLIB instance "eil51". The green dot is the node selected in the current step for insertion. The hollow dots are the unvisited nodes. The black dots are visited nodes.
  • ...and 1 more figures