A Fast Semidefinite Approach to Solving Binary Quadratic Problems

Peng Wang, Chunhua Shen, Anton van den Hengel

Abstract

Many computer vision problems can be formulated as binary quadratic programs (BQPs). Two classic relaxation methods are widely used for solving BQPs, namely, spectral methods and semi definite programming (SDP), each with their own advantages and disadvantages. Spectral relaxation is simple and easy to implement, but its bound is loose. Semi definite relaxation has a tighter bound, but its computational complexity is high for large scale problems. We present a new SDP formulation for BQPs, with two desirable properties. First, it has a similar relaxation bound to conventional SDP formulations. Second, compared with conventional SDP methods, the new SDP formulation leads to a significantly more efficient and scalable dual optimization approach, which has the same degree of complexity as spectral methods. Extensive experiments on various applications including clustering, image segmentation, co-segmentation and registration demonstrate the usefulness of our SDP formulation for solving large-scale BQPs.

Introduction

Binary Quadratic Problems (BQPs) are fundamental to computer vision, underpinning tasks like image segmentation, graph matching, and Markov Random Field (MRF) optimization. In these scenarios, the goal is to find an optimal configuration of binary variables to minimize a specific cost function. However, BQPs are NP-hard, forcing researchers to choose between two suboptimal relaxation strategies:

  1. Spectral Methods: Efficient (based on Eigen-decompositions) but often yield loose bounds and struggle with additional constraints.
  2. Semidefinite Programming (SDP): Provides tight, high-quality bounds but suffers from extreme computational costs ($O(n^{6.5})$), rendering them impractical for large-scale image data.

This paper introduces SDCut, a novel SDP formulation that achieves the accuracy of traditional SDP solvers with the scalability of spectral methods.

Methodology: The SDCut Formulation

The core innovation of SDCut lies in reimagining the SDP relaxation. The authors observe that the non-convex rank-one constraint inherent in BQPs can be related to a spherical constraint on a spectrahedron. By relaxing this into a penalty term within the objective function, the "hard" rank constraint becomes a manageable "soft" constraint.

Qualitative comparison of SDCut against NCut and RatioCut on synthetic datasets. Top: Concentric circles. Bottom: Data with an outlier.

Instead of solving the massive primal problem directly, SDCut utilizes a simplified dual formulation. This approach offers several advantages:

  • Reduced Variable Count: The number of dual variables corresponds to the number of constraints ($m$), typically much smaller than the $n^2$ variables in the original matrix.
  • First-Order Optimization: The dual problem is solved using efficient gradient-based methods like L-BFGS-B.
  • Eigen-decomposition Core: Each iteration involves finding negative eigenvalues, allowing the use of fast tools like ARPACK. This results in a complexity of $O(kn^3)$, placing SDCut in the same complexity class as spectral methods.

Experimental Evaluation

The authors evaluated SDCut across diverse benchmarks, including artificial 2D/3D data, the Berkeley Segmentation Dataset (BSDS), and classic 3D meshes like the Stanford Bunny.

Speed and Scalability

Quantitative results demonstrate that SDCut significantly outperforms traditional solvers like SeDuMi and SDPT3. In graph bisection tasks, SDCut was 11.5x to 17x faster. On the Stanford Bunny registration task—involving over 3 million variables—SDCut converged in 412 seconds, while standard solvers failed to produce results within 3 hours. Furthermore, SDCut maintains high memory efficiency, requiring only 100MB of RAM for a 1,000-vertex graph compared to 700MB for traditional solvers.

Computational efficiency of SDCut compared to standard SDP solvers (SeDuMi, SDPT3) across varying graph sizes (left) and the impact of edge density on SDCut performance (right).

Quality and Flexibility

Unlike spectral methods like Normalized Cut (NCut), SDCut can easily incorporate linear or quadratic inequality constraints. This flexibility is crucial for vision tasks requiring prior knowledge (e.g., "must-not-link" constraints). As shown in qualitative tests, SDCut correctly identifies clusters in concentric circles and remains robust to outliers where spectral methods fail. In image segmentation, SDCut achieved lower objective values than Biased Normalized Cut (BNCut) by effectively leveraging these constraints.

Conclusion

SDCut bridges the long-standing gap between spectral and semidefinite relaxations for BQPs. By providing a tight bound with $O(kn^3)$ complexity, it enables the application of high-quality optimization to large-scale computer vision problems that were previously computationally inaccessible.

Summary updated

BibTeX
@inproceedings{wang2013fast,
  author = {Peng Wang and Chunhua Shen and Anton van den Hengel},
  title = {{A Fast Semidefinite Approach to Solving Binary Quadratic Problems}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2013},
  url = {https://openreview.net/forum?id=B1VWpJG_-S},
}
Figure