Skip to main content
QUICK REVIEW

[Paper Review] A GPU implementation of the Simulated Annealing Heuristic for the Quadratic Assignment Problem

Gerald Paul|arXiv (Cornell University)|Aug 13, 2012
Vehicle Routing Optimization MethodsEngineering15 references6 citations
TL;DR

This paper presents a GPU-accelerated implementation of the simulated annealing heuristic for the quadratic assignment problem (QAP), leveraging the delta-matrix approach to compute all swap costs in parallel. The method achieves 50–100× speedup over a highly optimized non-parallel CPU implementation for large iteration counts, with up to 10,000× improvement over traditional SA due to combined algorithmic and hardware optimization.

ABSTRACT

The quadratic assignment problem (QAP) is one of the most difficult combinatorial optimization problems. An effective heuristic for obtaining approximate solutions to the QAP is simulated annealing (SA). Here we describe an SA implementation for the QAP which runs on a graphics processing unit (GPU). GPUs are composed of low cost commodity graphics chips which in combination provide a powerful platform for general purpose parallel computing. For SA runs with large numbers of iterations, we find performance 50-100 times better than that of a recent non-parallel but very efficient implementation of SA for the QAP

Motivation & Objective

  • To accelerate the solution of the NP-hard quadratic assignment problem (QAP), one of the most challenging combinatorial optimization problems.
  • To implement the simulated annealing heuristic efficiently on a GPU to enable large-scale iteration counts required for high-quality solutions.
  • To maintain algorithmic fidelity by preserving the original SA logic while exploiting GPU parallelism.
  • To overcome the performance bottleneck of traditional SA implementations that recompute swap costs from scratch.

Proposed method

  • Adopt the delta-matrix approach to precompute and maintain the cost change Δi,j for all possible swaps (i,j) in parallel.
  • Implement the SA heuristic on an NVIDIA Tesla C2070 GPU using CUDA, with each thread handling one swap computation.
  • Use barrier synchronization within thread blocks to coordinate updates to shared data structures like the permutation and delta matrix.
  • Limit the number of thread blocks to the number of SMs to prevent inter-block deadlock during synchronization.
  • Update the permutation and delta matrix in-place after each accepted swap, ensuring consistency across all threads.
  • Apply a cooling schedule to the temperature T and use uniform random variates r to probabilistically accept cost-increasing swaps.

Experimental results

Research questions

  • RQ1Can the simulated annealing heuristic for the QAP be effectively parallelized on a GPU to achieve significant performance gains?
  • RQ2How does the performance of a GPU-based SA implementation compare to a highly optimized non-parallel CPU version for large iteration counts?
  • RQ3Does the delta-matrix approach, which enables parallel swap cost computation, remain efficient under GPU memory and synchronization constraints?
  • RQ4What is the maximum performance gain achievable by combining algorithmic optimization (delta-matrix) with GPU parallelism for QAP?
  • RQ5Can the GPU implementation produce statistically identical results to the traditional CPU version without modifying the heuristic logic?

Key findings

  • The GPU implementation achieves a 50–100× performance improvement over a highly optimized non-parallel CPU implementation of the delta-matrix SA heuristic for large iteration counts (I ≥ 10^4).
  • Performance improvement plateaus at approximately 10^7 iterations, where the overhead of initial low-acceptance-rate phases becomes negligible.
  • The GPU version outperforms the traditional SA implementation (without delta-matrix) by up to 10,000× due to the combined effect of algorithmic and hardware acceleration.
  • The delta-matrix approach enables efficient parallelization by allowing all swap cost computations to be executed simultaneously across GPU threads.
  • Synchronization between thread blocks is managed via a custom mechanism that prevents deadlock by limiting the number of blocks to the number of SMs.
  • The GPU implementation produces statistically identical results to the original CPU-based SA heuristic, confirming algorithmic correctness despite hardware-level parallelization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.