MiLoop: Selective Memory Propagation for Neural Combinatorial Optimization

Changliang Zhou, Yuanyao Chen, Rongsheng Chen, Zhiyun Lin, Zhenkun WangarXiv 2026

TL;DR

MiLoop introduces a selective memory propagation framework for Neural Combinatorial Optimization (NCO) that allows shallow models to achieve state-of-the-art generalization. By reusing and selectively updating node representations across construction steps, MiLoop eliminates the need for deep attention stacks or external labels, successfully scaling to problem instances with up to 10 million nodes.

What Problem Does This Paper Address?

Combinatorial Optimization Problems (COPs), such as the Traveling Salesman Problem (TSP), are fundamental to logistics and engineering but are notoriously NP-hard. Constructive NCO methods aim to solve these by learning to build solutions step-by-step.

Currently, these methods fall into two camps:

  1. Static Embedding: These compute node features once at the start. They are fast but generalize poorly to larger problem sizes.
  2. Dynamic Embedding: These re-compute features at every step to reflect the changing state of the sub-problem. While they generalize better, they are computationally expensive because they typically rebuild representations from scratch at each step using deep, parameter-heavy attention layers.

Furthermore, many top-tier dynamic models require high-quality labels (supervised learning) or aggressive search-space pruning to train effectively. The authors of MiLoop ask: Can we leverage the multi-step nature of the construction process itself to propagate memory, making dynamic embeddings both efficient and easy to train via Reinforcement Learning (RL)?

Methods

The core innovation is Memory-in-the-Loop (MiLoop), a framework that treats the solution rollout as a sequential decision process with a persistent memory state.

Figure 1: Comparison of different embeddings. Unlike traditional dynamic embeddings, MiLoop maintains a trajectory memory throughout each rollout, with selective updates for subsequent reuse.

Key components include:

  • Stepwise Memory Fusion: Instead of starting from raw coordinates at each step, MiLoop fuses current node features with historical memory retrieved from previous steps. This fusion happens before the attention layers, providing the model with structural context immediately.
  • Selective Memory Update: After the attention layers process the fused input, the model uses an adaptive gating mechanism (a sigmoid-based gate) to decide which parts of the new representation should be written back to the global memory. This allows the model to retain useful historical information while adapting to the evolving solution.
  • Shallow Architecture: Because it reuses information, MiLoop only requires a 3-layer attention stack, whereas traditional dynamic models often need 6 or more layers to achieve similar representational power.
  • Reference-free DPO Training: The model is trained using a variant of Direct Preference Optimization (DPO). It samples two trajectories, identifies the better one (lower cost), and optimizes the policy to prefer that sequence—all without needing external expert labels.

Datasets

The authors evaluated MiLoop across four major COPs:

  • Traveling Salesman Problem (TSP)
  • Capacitated Vehicle Routing Problem (CVRP)
  • Pickup-and-Delivery TSP (PDTSP)
  • Knapsack Problem (KP)

Testing involved synthetic datasets ranging from 100 to 10,000 nodes, as well as established benchmarks like TSPLib, CVRPLib, and the 8th DIMACS Challenge, which includes ultra-large-scale instances of up to 10 million nodes.

Key Insights and Ideas

  • Turning a Weakness into a Strength: In standard RL, the need to perform many rollout steps is a computational burden. MiLoop turns this into an advantage by using those steps to progressively refine a "trajectory memory."
  • Representational Continuity: The authors found that standard dynamic models have "jumpy" representations—node embeddings change drastically and inconsistently between steps. MiLoop maintains strong continuity (high cosine similarity between adjacent steps) while still allowing the representation to evolve significantly over the entire rollout.
  • Efficiency through Reuse: By propagating memory, the model achieves higher solution quality with fewer layers. On a 10,000-node TSP, MiLoop achieved a lower error gap than a 6-layer non-memory baseline while using roughly half the inference time.
Figure 2: Overview of MiLoop, illustrated on the TSP instances, the starting node π1 is randomly selected at the first step. During RL rollouts, MiLoop fuses node-wise memory with current embed- dings before attention and selectively updates it afterward for action scoring and cross-step reuse.

Key Results

  • State-of-the-Art Generalization: Despite being trained only on 100-node instances, MiLoop produced high-quality solutions for TSP instances with 10 million nodes, outperforming all other comparable neural solvers.
  • Superior Accuracy: On TSP100, MiLoop achieved a near-optimal gap of 0.02%. On larger 10K instances, it maintained a gap of ~1.8%, significantly better than other RL-based dynamic solvers like L2R (~4.7%) or LEHD (~27%).
  • Zero-Shot Robustness: The model demonstrated strong performance on real-world benchmark libraries (TSPLib and CVRPLib) without any fine-tuning on those specific data distributions.

Limitations and Future Work

While MiLoop is highly effective, the authors noted a few areas for growth:

  • Heuristic Constraints: For ultra-large instances (>1,000 nodes), the model still relies on limiting the candidate set to the nearest 200 nodes per step to keep computation feasible.
  • Multi-Task Potential: Currently, separate models are trained for different problem types. The authors plan to extend MiLoop to multi-task learning, where a single policy could handle multiple types of COPs simultaneously.
  • Advanced Fusion: Future work will explore even more sophisticated ways to fuse and update memory to further improve representational efficiency.

Summary updated

BibTeX
@misc{zhou2026miloop,
  author = {Changliang Zhou and Yuanyao Chen and Rongsheng Chen and Zhiyun Lin and Zhenkun Wang},
  title = {{MiLoop: Selective Memory Propagation for Neural Combinatorial Optimization}},
  year = {2026},
  eprint = {2610.01685},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.01685},
}
Figure