TL;DR
Imagine placing $n$ factories onto $n$ plots of land to minimize shipping costs—and once you place a factory, you can never move it. This paper introduces CIMP, a neural network that tackles the notoriously brutal Quadratic Assignment Problem (QAP) in a single, irreversible forward pass, slashing error rates by 64% over standard greedy rules and even beating iterative neural solvers. Along the way, the authors uncover a fascinating trap: giving the model more synthetic training data actually ruins its ability to generalize to weird, real-world layouts.
What Problem Does This Paper Address?
The Quadratic Assignment Problem (QAP) asks how to assign $n$ facilities to $n$ locations to minimize total flow-times-distance costs—think laying out circuits on a chip or departments in a hospital. It is famously NP-hard, and even moderate sizes bring exact solvers to their knees.
In neural combinatorial optimization, most high-performing models cheat a little at test time: they generate a rough draft and spend compute iteratively swapping, searching, or refining it. The authors ask the opposite question: how much QAP-solving intuition can we bake directly into a fixed, "constructive" policy? That means the network builds a solution one irreversible step at a time, with zero search or take-backs.
Two things make this tough. First, every choice changes the value of all future choices (placing Facility A next to Location 1 suddenly makes Location 2 prime real estate for Facility B). Second, hard problems often have multiple equally great solutions, so forcing a network to imitate just one reference answer throws away valuable supervision.
Methods
CIMP (Constructive policy via Imitation from Multi-expert teachers with a Pairwise pre-block) combines standard graph learning with two clever twists in architecture and training.
- Static Encoder + Dynamic Pairwise Pre-Block: A standard GraphGPS encoder embeds the flow and distance graphs once per problem. The novelty happens at each decoding step: an explicit pairwise pre-conditioning block builds representations for every remaining valid
(facility, location)pair. Crucially, it injects classic QAP-specific mathematical signals—the immediate marginal cost of the move, plus lower/upper bounds (including a classic Gilmore–Lawler bound) on the remaining unassigned problem. A bidirectional cross-attention decoder blends learned graph similarity with these algorithmic signals to pick the next assignment. - Multi-Expert Sequence Distillation: Instead of imitating a single trajectory, the authors run six classic metaheuristics (like tabu search and genetic algorithms) to build a pool of elite solutions, then use a Determinantal Point Process (DPP) to pick $k=3$ high-quality, diverse "teachers."
At step 1, all three teachers vote on the next move. Once an action is sampled, any teacher who disagrees with that move drops out of the "active set" for the rest of the rollout. This gives the model rich, multimodal guidance early on without averaging incompatible strategies later.
Datasets
- 500-small (Training/Validation/Test): A synthetic split introduced by the authors containing 400 training, 50 validation, and 50 test instances, all tiny ($n \le 25$). It blends five structural families (uniform, normal, block-correlated, QAP-SAT-style, and Gaussian-copula).
- QAPLIB (Zero-Shot Evaluation): The gold-standard benchmark library of 133 real and structured QAP instances with published reference values, scaling all the way up to $n = 256$. QAPLIB is never seen during training.
Key Insights and Ideas
- Neither math priors nor deep learning can do it alone: You might wonder if those mathematical bounds ($LB, UB, GLB$) are doing all the heavy lifting. Nope! A non-learned greedy rule using those exact signals gets a ~29.9% optimality gap. A neural policy without the signals gets 22.6%. Put them together, and the gap plunges to 11.02%—the network learns how to weigh mathematical bounds against current context.
- Architectural choices matter 5x–27x more out-of-distribution: Removing the pairwise pre-block barely hurts on the synthetic test set (+3.0 percentage points), but causes a catastrophic collapse on QAPLIB (+21.8 pp). Good inductive biases are transfer insurance.
- More synthetic data can secretly hurt transfer: Scaling the synthetic training set from 400 to 4,000 instances steadily improves in-distribution scores, yet degrades QAPLIB performance (especially on ultra-sparse matrices with 76–92% zeros). Over longer training runs, the model over-specializes to its synthetic generator—and standard validation sets completely fail to detect the rot.
Key Results
Evaluated zero-shot in a single pass taking just 0.1 to 3.1 seconds per instance:
- Across all 133 QAPLIB instances: CIMP achieves an 11.02 ± 0.94% mean optimality gap (median 4.15%), a 64% reduction compared to the incremental greedy baseline (30.74%).
- Beating iterative neural solvers: On the 108 instances ($12 \le n \le 64$) tested by SAWT—a "learn-to-improve" neural method trained on 12x more data (5,120 instances) that iteratively refines answers at test time—CIMP's single pass hits 12.29%, handily beating SAWT (26.8%), RGM (35.8%), and NGM (62.4%).
Limitations and Future Work
- Search still wins when given time: If you give a classical tabu search the exact same 0.1–3.1 second budget per instance, it crushes CIMP (achieving a 2.81% gap vs. ~10%). CIMP is a study in amortized intuition, not a replacement for test-time search.
- Scaling bottlenecks: Building explicit pair representations takes $O(n^2 d)$ memory and up to $O(n^4 \log n)$ worst-case time for a full construction, while the CPU-bound Gilmore–Lawler bound eats up 36% of inference time at $n=150$.
- Future directions: Because imitation keeps the student capped by its teachers, adding a reinforcement learning phase after distillation could let it surpass them. Furthermore, designing out-of-distribution validation sets from structurally distinct generators could solve the sneaky checkpoint-selection trap.
Summary updated