Rethinking Efficiency in Neural Combinatorial Optimization: Batched Preference Optimization with Mamba

Zhenxing Xu, Zeyuan Ma, Weidong Bao, Yan Zheng, Chongshuang Hu, Ji Wang, Zhiguang CaoarXiv 2026

TL;DR

The paper introduces ECO, an efficiency-oriented Neural Combinatorial Optimization (NCO) framework that replaces standard Transformer architectures and online reinforcement learning loops with a tailored Mamba backbone and a batched Direct Preference Optimization (DPO) pipeline. By decoupling trajectory generation from gradient updates and leveraging hardware-aware state-space models, ECO achieves state-of-the-art solution quality on large-scale routing problems while dramatically reducing training time and memory footprints.

What Problem Does This Paper Address?

Neural Combinatorial Optimization (NCO) uses deep learning to solve complex discrete optimization problems like the Traveling Salesperson Problem (TSP) and the Vehicle Routing Problem (VRP). While modern NCO models show great promise, they hit a massive wall when scaling up to large instances (thousands of nodes).

The authors identify two primary bottlenecks:

  1. The Architecture Bottleneck: State-of-the-art NCO models rely heavily on Transformers. Although effective, the quadratic memory and computational complexity ($O(N^2)$) of self-attention makes processing long sequences incredibly expensive, often leading to Out-Of-Memory (OOM) errors.
  2. The Learning Paradigm Bottleneck: Most NCO frameworks use online Reinforcement Learning (like REINFORCE or PPO), where rollout collection and parameter updates are tightly coupled. This sample-then-update loop under-utilizes GPUs and suffers from high gradient variance.

ECO (Efficient Combinatorial Optimization) addresses both challenges simultaneously to make large-scale NCO training and inference practical.

Methods

ECO introduces a co-design of network architecture and learning paradigm:

1. Mixed Mamba-based Architecture

Instead of a Transformer, ECO utilizes a tailored architecture based on Mamba, a structured state-space model (SSM) known for linear-time sequence modeling.

  • Recurrent Mamba Encoder (S6): To handle the fact that Mamba is sensitive to sequence order (unlike permutation-equivariant Transformers), ECO first canonicalizes the input graph nodes using a spatial Morton (Z-order) code sorting strategy.
  • S4 Decoder: Used for autoregressive decoding. During training, it allows for parallel, teacher-forced state computation, while during inference, it maintains a fixed-size recurrent state to keep memory usage low.

2. Batched Preference Optimization Paradigm

ECO ditches online RL in favor of a decoupled, two-phase offline-in-update paradigm:

  • Phase I: Supervised Fine-Tuning (SFT): The model is warmed up via behavior cloning on high-quality solutions pre-computed by traditional solvers (like LKH-3).
  • Phase II: Iterative Direct Preference Optimization (DPO): Borrowed from LLM alignment, DPO optimizes the policy using pairwise preferences (winner vs. loser trajectories) generated by the policy itself, completely bypassing the need for a separate Critic network.

3. Local-Search-Guided Bootstrapping

To prevent vanishing gradients as the policy improves and preference margins narrow, ECO integrates a lightweight local search operator (e.g., 2-opt or 3-opt) only during training. It refines a subset of model-generated solutions to artificially widen the winner-loser gap, distilling local optimization patterns directly into the neural network's weights. Crucially, no local search is used at inference time.

Fig. 2. The core designs and workflow of our ECO. Left: The Mamba-based Encoder-Decoder architecture proposed to facilitate offline NCO training. Right: The two-phase offline learning with a SFT warm-up as quick knowledge adaption and an iterative preference learning to further enhance performance.

Datasets

The framework was evaluated on standard synthetic routing benchmarks:

  • Traveling Salesperson Problem (TSP): Evaluated on node scales $N \in \{200, 500, 1000, 5000\}$.
  • Capacitated Vehicle Routing Problem (CVRP): Evaluated on node scales $N \in \{100, 200, 500, 1000\}$.

For each scale, performance was measured across 1,000 held-out test instances, comparing against exact/heuristic baselines (Concorde, LKH-3, HGS) and prominent neural baselines (AM, POMO, LEHD, CNF, GFlowNet-HBG).

Key Insights and Ideas

  • DPO is a Natural Fit for NCO: In NCO, rewards (tour lengths) are deterministic and cheap to compute. DPO elegantly converts these absolute costs into a pairwise supervised objective, reducing gradient variance and decoupling data generation from optimization.
  • The "Attention Collapse" Mitigation: Standard Transformers suffer severe performance degradation on massive scales (e.g., TSP5000) due to attention blurring over huge context windows. Mamba's recurrent state update acts as a continuous compression mechanism, maintaining stability even at thousands of nodes.
  • Inference remains Purely Neural: Even though local search is used to boost training signals, the inference step remains purely constructive and autoregressive. The model effectively "absorbs" the geometric corrections of local search without paying the search-time computational tax at deployment.

Key Results

  • Superior Convergence Speed: On TSP1000, ECO converges to a tight $4.84\%$ optimality gap in under 10 hours on a single GPU, drastically outperforming online RL methods like POMO and AM, which struggle to break out of high optimality gaps within the same timeframe.
Fig. 1. Convergence efficiency on TSP1000. The curves display the average optimality gap over 20 independent runs, with shaded regions indicating the standard deviation. All methods were trained on a single NVIDIA A800 GPU; wall-clock time includes rollout or candidate generation during training but excludes the one-time generation of shared SFT labels. Batch sizes were tuned within the same memory budget for each method.
  • Linear Memory Scaling: While Transformer baselines hit Out-Of-Memory (OOM) errors around 7,000 nodes, ECO scales near-linearly, consuming only ~40GB of VRAM even at 10,000 nodes.
  • High Throughput: Thanks to its hardware-aware parallel scan kernels, ECO maintains significantly higher instance-per-second throughput during inference compared to Transformer equivalents as problem size scales up.
Memory cost and inference throughput analysis across varying problem sizes.

Limitations and Future Work

The authors explicitly clarify a key algorithmic boundary: ECO does not make the entire constructive inference process linear. While sequence modeling in the encoder and decoder state updates becomes linear ($O(N)$), the final action-scoring step (pointer-style compatibility calculation over feasible candidate nodes) still requires an $O(N^2)$ dense matrix operation in the worst case.

Additionally, because Mamba is inherently non-equivariant to node permutations, the framework relies heavily on spatial sorting heuristics (like the Morton order) to canonicalize inputs. Future work could explore sub-quadratic candidate scoring mechanisms or alternative canonicalization techniques to achieve true end-to-end linear complexity.

Summary updated

BibTeX
@misc{xu2026rethinking,
  author = {Zhenxing Xu and Zeyuan Ma and Weidong Bao and Yan Zheng and Chongshuang Hu and Ji Wang and Zhiguang Cao},
  title = {{Rethinking Efficiency in Neural Combinatorial Optimization: Batched Preference Optimization with Mamba}},
  year = {2026},
  eprint = {2602.20730},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.20730},
}
Figure