Learning to Solve the Quadratic Assignment Problem with Warm-Started MCMC Finetuning

Yicheng Pan, Ruisong Zhou, Haijun Zou, Tianyou Li, Zaiwen WenarXiv 2026

Here is a concise, engaging summary of the paper designed for a technically literate audience.

TL;DR

The authors introduce PLMA, a deep learning framework that solves the notoriously difficult Quadratic Assignment Problem (QAP) by combining transferable neural pretraining with an efficient, warm-started Markov Chain Monte Carlo (MCMC) finetuning procedure. By designing an additive energy-based model that enables $O(1)$-time local swap evaluations, PLMA consistently matches or outperforms state-of-the-art handcrafted heuristics while running up to orders of magnitude faster on large-scale instances.

What Problem Does This Paper Address?

The Quadratic Assignment Problem (QAP) is a fundamental combinatorial optimization problem that models real-world challenges like facility location, network routing, and chip design. It is exceptionally hard: it is both NP-hard to solve and NP-hard to approximate. Exact algorithms fail for problem sizes larger than $n=20$.

While handcrafted meta-heuristics (like Tabu Search) can find good solutions, they are CPU-bound, require extensive instance-specific tuning, and struggle with stability on adversarial datasets. On the other hand, existing machine learning approaches fail to generalize to out-of-distribution test instances and scale poorly because they typically rely on massive "association graphs" with $n^2$ nodes. The authors set out to build a scalable, learning-based QAP solver that generalizes well across diverse problem structures without sacrificing computational efficiency.

Methods

PLMA bridges the gap between learning and search using a novel two-stage paradigm:

  1. Cross-Graph Attention Network: Instead of building a massive $n^2$ association graph, PLMA encodes the two input graphs (e.g., flows and distances) separately using edge-based Graph Neural Networks (GNNs). It then uses a flexible cross-attention mechanism to model the interactions between facilities and locations, keeping the node space at a scalable $2n$. A log-Sinkhorn operator transforms this into a doubly stochastic heatmap matrix.
  2. Additive Energy-Based Model (EBM): The heatmap parameterizes an EBM over the permutation space. Crucially, the authors designed the energy function to be additive. This mathematical choice allows a 2-swap Metropolis-Hastings sampling step to be evaluated in $O(1)$ constant time, enabling incredibly rapid exploration of the solution space.
  3. Warm-Started MCMC Finetuning: At deployment time, the model parameters are refined directly on target test instances. Unlike auto-regressive models that must restart from scratch at each iteration, PLMA leverages the warm-start property of MCMC. It initializes short Markov chains using high-quality solutions discovered in previous rounds, steering the search toward promising regions while maintaining sample diversity through a within-group competitive retention rule.

Datasets

The framework was evaluated on a comprehensive mix of synthetic and real-world benchmarks:

  • Synthetic Datasets: Geometrically structured instances and uniformly random instances for sizes $n \in \{20, 50, 100\}$, alongside large-scale synthetic datasets ($n \in \{200, 500\}$).
  • QAPLIB: A canonical real-world benchmark library containing 134 instances across 15 distinct categories.
  • Taixxeyy: A notoriously rugged benchmark suite specifically engineered to cause local search heuristics to fail.
  • UF Sparse Matrix Collection: Used to evaluate the model's performance on the related Bandwidth Minimization (BM) problem.

Key Insights and Ideas

  • Warm-Starting vs. Restarting: Traditional neural combinatorial optimization methods rely on autoregressive models that construct solutions element-by-element, meaning they must restart from scratch during deployment-time active search. PLMA’s EBM formulation allows it to continuously iterate on and improve existing high-quality solutions.
  • The Power of $O(1)$ Swaps: By structuring the EBM's energy function as a simple dot product, the change in energy from swapping two elements can be computed instantly. This makes MCMC sampling computationally viable for combinatorial optimization, bypassing the typical $O(n)$ re-evaluation overhead.
  • Shared Parameter Adaptation: When finetuning on a batch of test instances, PLMA updates a single shared set of network parameters simultaneously. This parallelized batch-wise approach drastically reduces runtime compared to per-instance optimization methods without degrading solution quality.

Key Results

PLMA achieves state-of-the-art performance across the board, establishing itself as the first learning-based QAP solver to genuinely surpass leading handcrafted heuristics in both quality and speed.

  • Synthetic Benchmarks: On QAP100 instances, PLMA achieves an optimality gap of 0.00% while running over 13 times faster than Robust Tabu Search (Ro-TS).
  • Scalability: As shown in the large-scale evaluations, PLMA scales gracefully to $n=500$, outperforming strong baselines while requiring only a fraction of the computational time.
TABLE I: Performance comparison on synthetic datasets (256 instances). Ro-TS (xk) denotes Ro-TS with x*1000*n iterations. IPFP (x) runs IPFP from x random initializations. PLMA (T = 1) represents the zero-shot performance of the pre-trained model without any fine-tuning, while T = 50/200 correspond to the results after 50 / 200 fine-tuning iterations.
TABLE II: Performance comparison on large-scale synthetic datasets (64 instances).
  • Real-World Generalization: On the QAPLIB benchmark, PLMA achieves a near-zero average optimality gap of 0.06%, outperforming all other heuristic and learning-based baselines.
  • Adversarial Robustness: On the notoriously difficult Taixxeyy instances, where traditional heuristics like Ro-TS exhibit catastrophic failures (with average gaps spiking to 81.01%), PLMA remains remarkably stable, delivering a low average gap of 2.56% with zero extreme outliers.

Limitations and Future Work

While PLMA demonstrates exceptional performance, the authors note a few areas for future exploration:

  • Bridging Pretraining and Finetuning: They suggest that incorporating meta-learning strategies could provide an even better initialization for the deployment-time adaptation phase.
  • Broader Constraints: The current framework is tailored specifically for permutation-based problems. Future work will focus on extending this EBM-MCMC approach to broader classes of combinatorial problems that feature more complex, heterogeneous constraints.

Summary updated

BibTeX
@misc{pan2026learning,
  author = {Yicheng Pan and Ruisong Zhou and Haijun Zou and Tianyou Li and Zaiwen Wen},
  title = {{Learning to Solve the Quadratic Assignment Problem with Warm-Started MCMC Finetuning}},
  year = {2026},
  eprint = {2604.20109},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.20109},
}
Figure