Unsupervised Learning for Quadratic Assignment

Yimeng Min, Carla P. Gomes

TL;DR

PLUME search introduces an unsupervised learning framework to tackle the Quadratic Assignment Problem (QAP), a notoriously difficult NP-hard combinatorial optimization challenge. By training a permutation-equivariant neural network directly on unlabeled problem instances, it generates high-quality initial solutions that significantly boost the efficiency and accuracy of traditional local search heuristics. The framework eliminates the need for expensive labeled data or unstable reinforcement learning loops while generalizing seamlessly across different problem sizes and graph densities.

What Problem Does This Paper Address?

Combinatorial Optimization (CO) is foundational to industries ranging from logistics to VLSI circuit design. Among these, the Quadratic Assignment Problem (QAP)—which models the cost of assigning a set of facilities to a set of locations based on flows and distances—is particularly brutal. It is NP-hard, meaning exact algorithms fail as problem sizes grow.

To solve large instances, practitioners rely on heuristics like Tabu Search. Recently, machine learning has entered the mix, but existing paradigms have steep drawbacks:

  • Supervised Learning (SL): Requires a massive dataset of optimal or near-optimal solutions, which are computationally exhausting to generate for NP-hard problems.
  • Reinforcement Learning (RL): Suffers from sparse rewards and high training variance, making it difficult for agents to scale to larger problem sizes.

The authors address this gap by proposing an Unsupervised Learning (UL) approach that learns directly from the problem structure itself, bypassing the need for labeled data or sequential decision-making.

Methods

The core innovation is PLUME search (Permutation-based Loss with Unsupervised Models for Efficient search). Instead of predicting a solution step-by-step, it uses a non-autoregressive neural network to output a continuous relaxation of a permutation matrix all at once.

The pipeline consists of three main phases:

  1. Permutation-Equivariant Encoding: The model uses separate multilayer perceptron (MLP) encoders for facility flows and location distances. Crucially, it enforces permutation equivariance by construction using row-wise symmetric pooling operators (sum, mean, max). This ensures that shuffling the order of inputs doesn't confuse the model.
  2. Soft Permutation Matrix Construction: The network outputs embeddings that are transformed into a "soft" permutation matrix $\mathbb{T}$ using a Gumbel-Sinkhorn operator. This continuous relaxation allows the model to be trained end-to-end via gradient descent using a surrogate loss function that directly mimics the QAP objective: $\mathcal{L}_{QAP} = \langle \mathbb{T}\mathbf{F}\mathbb{T}^\top, \mathbf{D} \rangle$.
  3. Hybrid Search: During inference, the Hungarian algorithm decodes the soft matrix into a discrete, hard permutation matrix $\mathbf{P}$. This matrix serves as a highly optimized starting point for a C++ implementation of Tabu Search.
Figure 2: Neural network architecture for QAP. The model takes coordinates and flow matrix data and passes them into MLP encoders, the resulting features are then concatenated together. We then feed them into the main network and generate Y through an output layer.

Datasets

The authors evaluated their approach using synthetic QAP instances generated via an Erdős-Rényi (ER) graph model.

  • Problem Sizes ($n$): 100 and 200 nodes.
  • Graph Densities ($p$): Ranging from sparse to dense ($p \in \{0.1, 0.2, \dots, 0.9\}$).
  • Data Split: For each configuration, they generated 30,000 instances for training, 5,000 for validation, and 5,000 for testing.

Key Insights and Ideas

  • Initialization as a Learned Search: The unsupervised model doesn't just provide a random leg-up; it internalizes the underlying problem geometry. For larger problems ($n=200$), the raw UL initialization produces solutions of comparable quality to a lightweight Tabu Search configuration run from scratch, acting as a zero-shot search mechanism.
  • The Power of Inductive Biases: By baking permutation equivariance directly into the network architecture, the model gains the ability to generalize. A model trained on a graph of size $n=100$ can be deployed directly on a graph of size $n=200$ without modifying the neural network parameters.
  • Sparsity is an Advantage: The framework performs exceptionally well on sparse graphs (low $p$ values). Sparser structures provide clearer cost-critical pathways, allowing the network's row-normalized attention mechanisms to allocate representational capacity more effectively.

Key Results

  • Superior Initialization: Before any local search is applied, the UL-predicted solutions consistently beat random initializations. For sparse problems ($n=100, p=0.1$), the UL approach achieved a 16.95% cost reduction over random assignments.
  • Enhanced Tabu Search: When plugged into Tabu Search, PLUME consistently found lower-cost solutions than the randomly initialized baseline across all tested parameter budgets.
Table 2: Performance comparison of selected tabu search configurations on QAP instances with n = 100, 200. TS(µ, κ, ω) denotes the tabu search with evaluations : µ, neighbourhoodSize : κ, and maxFails : ω.
  • Outperforming Reinforcement Learning: Compared to a recent state-of-the-art RL method (Tan & Mu, 2024) on $n=100, p=0.7$ instances, PLUME search achieved a lower average cost (1624.33 vs. 1644.37) while being dramatically faster—running within 10 ms compared to the RL method's ~150 ms.

Limitations and Future Work

  • Diminishing Returns in Dense Graphs: As graph density approaches 1.0, the performance gap between PLUME and random initialization narrows. In highly dense matrices, the structural contrast blurs, making it harder for the network to identify dominant geometric patterns.
  • Hardware Mismatch: The neural network inference runs on a GPU, whereas the subsequent Tabu Search runs on a CPU. This hybrid execution makes direct end-to-end runtime optimization complex.

Future research directions include extending the PLUME framework to other permutation-based combinatorial problems beyond QAP and TSP, and exploring fully GPU-accelerated local search backbones to eliminate CPU-GPU data transfer bottlenecks.

Summary updated

BibTeX
@misc{min2025unsupervised,
  author = {Yimeng Min and Carla P. Gomes},
  title = {{Unsupervised Learning for Quadratic Assignment}},
  year = {2025},
  eprint = {2503.20001},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.20001},
}
Figure