TL;DR
The paper introduces Neural Neighborhood Search (N2S), a deep reinforcement learning approach designed to solve complex Pickup and Delivery Problems (PDPs). By utilizing a novel Synthesis Attention mechanism and customized decoders that operate on pickup-delivery node pairs simultaneously, N2S effectively handles strict precedence constraints. Remarkably, it becomes the first neural method to outperform the highly optimized traditional heuristic solver, LKH3, on highly constrained PDP variants.
What Problem Does This Paper Address?
Vehicle Routing Problems (VRPs) are foundational in logistics, but the Pickup and Delivery Problem (PDP) introduces a difficult twist: the precedence constraint. Every item must be picked up before it can be delivered. In stricter variants like PDTSP-LIFO, the vehicle operates like a stack—the last item loaded must be the first one unloaded.
Traditional heuristic solvers rely heavily on hand-crafted search rules, which require tedious trial-and-error and lack flexibility when constraints change. Meanwhile, existing deep learning approaches struggle with PDPs. Standard neural local search operations (like reversing a route segment via a 2-opt move) frequently violate the precedence constraint, making the search space incredibly inefficient. This paper aims to bridge the performance gap between flexible neural methods and powerful traditional heuristics.
Methods
The authors propose an encoder-decoder architecture tailored specifically for neighborhood search in constrained routing environments.
1. Synthesis Attention (Synth-Att) Encoder
Previous state-of-the-art neural routing models used complex dual-attention mechanisms (like DAC-Att) to separate spatial node features from cyclic route positions. N2S simplifies this by introducing Synthesis Attention (Synth-Att). It computes standard self-attention on node features and auxiliary attention on positional features, then passes them through a lightweight, element-wise Multi-Layer Perceptron (MLP) to synthesize a unified representation.
2. Node-Pair Decoders
To respect the precedence constraint, N2S abandons single-node modifications. Instead, it uses two customized decoders that operate on pairs of related pickup and delivery nodes:
- Node-Pair Removal Decoder: Selects a pickup-delivery pair $(i^+, i^-)$ to remove from the current tour based on how poorly they fit with their immediate neighbors.
- Node-Pair Reinsertion Decoder: Evaluates the joint distribution of all feasible locations to insert the pair back into the tour, automatically masking out positions that would violate precedence or LIFO constraints.
3. Training and Inference Enhancements
The model is trained using reinforcement learning via n-step Proximal Policy Optimization (PPO) paired with a curriculum learning strategy that gradually increases problem difficulty. During inference, a Diversity Enhancement scheme (N2S-A) applies geometric transformations (rotations, flips) to help the agent escape local minima.
Datasets
The model was evaluated on:
- Synthesized PDP Instances: Randomly generated uniform distributions of sizes $|V| = 21, 51,$ and $101$.
- Classic Benchmarks: Standard TSPLIB-based PDP instances from Renaud et al. (2002) and highly constrained LIFO instances from Carrabs et al. (2007) to test out-of-distribution generalization.
Key Insights and Ideas
- Pairwise Operations are Essential for Constraints: Operating on single nodes in a highly constrained space like PDTSP-LIFO results in massive invalid action spaces (over 92% of actions must be masked out for single-node methods). Moving pairs keeps the search space clean and valid.
- Attention Fusing via MLP Saves Compute: Instead of running parallel, deep attention tracks for different feature types, letting a simple MLP blend attention matrices achieves identical (or slightly better) accuracy while drastically reducing parameter count and runtime.
- Neural Solvers Can Beat Specialized Heuristics: N2S proves that deep learning models don't just have to settle for being "faster but worse" than traditional operations research tools like LKH3; with the right inductive biases, they can find better solutions.
Key Results
- Outperforming LKH3: On synthesized instances of PDTSP-LIFO-101, N2S with diversity enhancement (N2S-A) achieved a negative gap of -1.47% relative to LKH3 (10k iterations), meaning it found significantly shorter, higher-quality routes.
- Dominating Neural Baselines: N2S consistently outperformed other recent neural models like DACT and Heter-AM across all problem sizes, often by an order of magnitude in solution quality.
- Efficiency Gains: The Synth-Att encoder achieved these results using roughly 40% fewer parameters and running faster than the previous state-of-the-art attention mechanism (DAC-Att).
Limitations and Future Work
While N2S excels on distributions it was trained on, its zero-shot out-of-distribution generalization leaves room for improvement. When tested on benchmark datasets with completely different node distributions and larger scales (e.g., 200 nodes), its performance edge over LKH3 slightly degrades.
The authors note that future work will focus on integrating N2S into hierarchical frameworks for dynamic real-time routing, combining it with divide-and-conquer strategies for massive-scale problems, and improving out-of-distribution robustness.
Summary updated