Neural Combinatorial Optimization with Heavy Decoder: Toward Large Scale Generalization

Fu Luo, Xi Lin, Fei Liu, Qingfu Zhang, Zhenkun Wang

Abstract

Neural Combinatorial Optimization (NCO) leverages deep learning to solve NP-hard problems such as the Traveling Salesman Problem (TSP) and Capacitated Vehicle Routing Problem (CVRP). Despite their potential, current models often struggle with a "generalization gap," where performance degrades significantly when moving from small training instances to larger test instances. This paper introduces LEHD (Light Encoder and Heavy Decoder), an architecture that flips the traditional design by employing a deep, dynamic decoder. By re-calculating node relationships at each decoding step, LEHD achieves near-optimal performance on instances up to 1000 nodes while being trained only on 100-node problems.

Introduction

Solving combinatorial optimization problems efficiently is a cornerstone of logistics and operations research. While traditional heuristics are effective, they often require significant manual tuning. NCO offers an automated alternative, yet its adoption is hindered by poor scalability. Most existing models follow a "Heavy Encoder, Light Decoder" (HELD) paradigm, where a deep encoder generates static embeddings. These embeddings often capture scale-dependent features that fail to generalize when the problem size increases at inference time.

The LEHD Architecture

The authors propose shifting the computational burden from the encoder to the decoder. The LEHD model consists of:

  1. Light Encoder: A single-layer projection that maps raw node features into a latent space.
  2. Heavy Decoder: A multi-layer attention mechanism ($L=6$) that dynamically processes the relationships between the current partial solution and the remaining available nodes at every step of the construction process.
The LEHD architecture utilizes a single-layer encoder and a multi-layer heavy decoder to dynamically process node embeddings at each step.

By re-embedding nodes during decoding, the model maintains a "scale-agnostic" perspective, allowing it to handle varying input lengths naturally. This dynamic relationship capture is the core advantage of the LEHD approach.

Training and Inference Strategies

To train LEHD effectively, the authors introduce Optimality Invariance Training. This supervised learning scheme exploits the property that any segment of an optimal route is itself an optimal path for that specific subset of nodes. By sampling random segments from optimal tours, the model is exposed to a diverse range of problem sizes and configurations, enriching the training data without requiring massive new datasets.

During inference, LEHD employs Random Re-Construct (RRC). Instead of a single greedy pass, the model iteratively improves its solution by randomly removing segments and allowing the heavy decoder to re-build them, effectively searching for local optima and refining the final route.

Experimental Results

LEHD demonstrates remarkable zero-shot generalization capabilities across standard benchmarks, setting a new state-of-the-art for constructive NCO methods.

TSP and CVRP Performance

When trained on TSP100, LEHD achieved an optimality gap of only 0.719% on TSP1000. In contrast, previous state-of-the-art (SOTA) methods like POMO exhibited gaps exceeding 40% on the same task. Similar success was observed for the CVRP, where LEHD achieved a 0.921% gap on CVRP1000, significantly outperforming other learning-based solvers.

A sample solution for a Capacitated Vehicle Routing Problem (CVRP) generated by the LEHD model.

Robustness and Efficiency

On the TSPLib benchmark, which contains real-world instances with non-uniform distributions, LEHD reduced the average optimality gap from 12.9% to 1.5%. Despite the "heavy" nature of the decoder, greedy inference remains highly efficient, processing a 1000-node TSP instance in approximately 1.6 seconds.

Conclusion

The LEHD architecture addresses the fundamental limitation of scalability in NCO. By prioritizing dynamic decoding over static encoding and utilizing optimality-invariant training, the model bridges the generalization gap. While the model currently relies on high-quality labels for training, future work includes exploring more efficient reinforcement learning strategies and extending the framework to other combinatorial domains like bin packing and scheduling.

Summary updated

BibTeX
@inproceedings{luo2023neural,
  author = {Fu Luo and Xi Lin and Fei Liu and Qingfu Zhang and Zhenkun Wang},
  title = {{Neural Combinatorial Optimization with Heavy Decoder: Toward Large Scale Generalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=RBI4oAbdpm},
}
Figure