Boosting Cross-problem Generalization in Diffusion-Based Neural Combinatorial Solver via Inference Time Adaptation

Haoyu Lei, Kaiwen Zhou, Yinchuan Li, Zhitang Chen, Farzan Farnia

TL;DR

The authors introduce DIFU-Ada, a training-free inference-time adaptation framework that enables diffusion-based neural combinatorial optimization solvers to generalize across different problem scales and variants without any retraining. By combining energy-guided sampling with a recursive renoising-denoising process, a model trained strictly on the standard Traveling Salesman Problem (TSP) can successfully solve more complex variants like the Prize Collecting TSP (PCTSP) and the Orienteering Problem (OP) in a zero-shot manner.

What Problem Does This Paper Address?

Neural Combinatorial Optimization (NCO) leverages deep learning to solve notoriously difficult NP-complete problems (like routing and scheduling) without relying on hand-crafted heuristics. Recently, diffusion models have emerged as a powerful tool in this domain due to their ability to learn complex solution distributions over graph structures.

However, existing NCO methods suffer from two major generalization bottlenecks:

  1. Cross-scale generalization: Performance degrades drastically when models are evaluated on problem sizes larger than those seen during training.
  2. Cross-problem generalization: Models struggle to adapt to problem variants that introduce new objectives or constraints.

Currently, addressing these issues requires retraining or fine-tuning separate models for every single problem type and scale, which incurs massive computational costs. This paper tackles the challenge of achieving flexible, zero-shot generalization at inference time without any additional training.

Methods

DIFU-Ada scales up the inference phase of a pre-trained diffusion solver by combining two key components:

  1. Energy-Guided Sampling: The authors treat the pre-trained diffusion model (trained on standard TSP) as a structural "prior." To adapt to a new problem variant (like PCTSP or OP), they inject a plug-and-play Energy Potential into the score function during the reverse diffusion process. This energy function uses a log-barrier formulation to penalize constraint violations and reward objective fulfillment.
  2. Recursive Renoising-Denoising Travel: Simply adding an energy gradient isn't enough because the distribution of the new problem might diverge too much from the original TSP training data. To bridge this gap, the authors introduce a mechanism modeled as Guided Langevin Dynamics. It iteratively adds a small amount of noise back into the solution estimate and then denoises it using the guided score function, progressively steering the solution from the source distribution into the target problem's feasible space.
The DIFU-Ada framework pipeline

To prevent the prohibitive computational overhead of running full forward-backward SDE simulations at every step, the authors implement an efficiency trick: they apply the recursive process to only a few renoising steps and a single guided denoising step per iteration, yielding a 5-10x inference speedup.

Shifting from the TSP solution space to the PCTSP solution space

Datasets

The framework is evaluated on classical graph-based routing problems across multiple scales ($N = 20, 50, 100$ nodes, and up to $500$ and $1000$ nodes for scalability tests):

  • Traveling Salesman Problem (TSP): Used exclusively for pre-training the base diffusion models (DIFUSCO and T2T).
  • Prize Collecting TSP (PCTSP): A variant where visiting nodes yields prizes but skipping them incurs penalties; the goal is to minimize total travel cost plus penalties while hitting a prize threshold.
  • Orienteering Problem (OP): A variant where the total path length is constrained by a budget, and the goal is to maximize the total prize collected.

For evaluation, 10,000 test instances were generated per scale. Baselines include exact solvers (Gurobi), traditional Operations Research heuristics (OR-Tools, ILS, Compass), and learning-based approaches (AM, MDAM, ASP, AM-FT).

Key Insights and Ideas

  • Sub-graph Structural Similarity: The core theoretical insight is that variants like PCTSP and OP can be mathematically framed as finding an optimal TSP tour on a subgraph of the original instance. Therefore, a model trained on standard TSP already possesses the foundational geometric and structural knowledge required; it just needs to be guided to focus on the right subset of nodes.
  • The Necessity of "Travel": Standard energy guidance often fails in zero-shot settings because the model gets stuck in local minima or invalid regions due to distribution shift. The recursive renoising-denoising "travel" acts as a global smoothing mechanism, allowing the solution particles to escape bad configurations and settle into the correct target distribution.
  • Decoupled Training and Adaptation: By shifting the burden of constraint satisfaction entirely to the inference phase, the framework decouples model training from problem-specific rules.

Key Results

DIFU-Ada demonstrates remarkable zero-shot transfer capabilities, significantly outperforming other zero-shot diffusion baselines and rivaling models that were explicitly trained on the target tasks.

Zero-shot performance comparison on PCTSP and OP
  • Drastic Gap Reductions: On PCTSP-20, DIFU-Ada slashes the optimality gap from 19.21% (standard DIFUSCO) down to 4.20%. On OP-20, it reduces the gap from 12.48% to 3.11%.
  • Consistent Scale Performance: Across 20, 50, and 100 nodes, DIFU-Ada maintains stable performance, averaging an optimality gap of 9.70% for PCTSP and 7.26% for OP.
  • Zero Training Overhead: While traditional learning-based baselines require 3.2 to 4.9 days of retraining to adapt to these new problem variants, DIFU-Ada requires 0 days of training, operating purely at inference time.

Limitations and Future Work

  • Domain Restriction: The framework's evaluation is currently limited to routing problems (TSP and its direct variants). Its performance on non-routing combinatorial domains—such as scheduling, bin packing, or electronic design automation (EDA)—remains unverified.
  • Inference Latency: Although the recursive travel mechanism is optimized, it still requires multiple iterations of renoising and denoising, making it slower per instance than pure autoregressive or single-pass neural network solvers. Future work could explore accelerating this inference adaptation phase.

Summary updated

BibTeX
@inproceedings{lei2026boosting,
  author = {Haoyu Lei and Kaiwen Zhou and Yinchuan Li and Zhitang Chen and Farzan Farnia},
  title = {{Boosting Cross-problem Generalization in Diffusion-Based Neural Combinatorial Solver via Inference Time Adaptation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i43.40948},
}
Figure