GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Contents
  • Current events
  • Random article
  • About Wikipedia
  • Contact us
  • Help
  • Learn to edit
  • Community portal
  • Recent changes
  • Upload file
  • Special pages
  • Search
  • Donate

This view

  • Original page
  • New address

GeezerVison is showing en.wikipedia.org β€” Quadratic unconstrained binary optimization - Wikipedia

Quadratic unconstrained binary optimization (QUBO), also known as unconstrained binary quadratic programming (UBQP), is a combinatorial optimization problem with a wide range of applications from finance and economics to machine learning.[1] QUBO is an NP hard problem, and for many classical problems from theoretical computer science, like maximum cut, graph coloring and the partition problem, embeddings into QUBO have been formulated.[2][3] Embeddings for machine learning models include support-vector machines, clustering and probabilistic graphical models.[4] Moreover, due to its close connection to Ising models, QUBO constitutes a central problem class for adiabatic quantum computation, where it is solved through a physical process called quantum annealing.[5]

Definition

Let 𝔹={0,1} the set of binary digits (or bits), then 𝔹n is the set of binary vectors of fixed length nβˆˆβ„•. Given a symmetric or upper triangular matrix π‘Έβˆˆβ„nΓ—n, whose entries Qij define a weight for each pair of indices i,j∈{1,…,n}, we can define the function f𝑸:𝔹n→ℝ that assigns a value to each binary vector 𝒙 through

f𝑸(𝒙)=π’™βŠΊπ‘Έπ’™=βˆ‘i=1nβˆ‘j=1nQijxixj.

Alternatively, the linear and quadratic parts can be separated as

f𝑸′,𝒒(𝒙)=π’™βŠΊπ‘Έβ€²π’™+π’’βŠΊπ’™,

where π‘Έβ€²βˆˆβ„nΓ—n and π’’βˆˆβ„n. This is equivalent to the previous definition through 𝑸=𝑸′+diag⁑[𝒒] using the diag operator, exploiting that x=xβ‹…x for all binary values x.

Intuitively, the weight Qij is added if both xi=1 and xj=1. The QUBO problem consists of finding a binary vector π’™βˆ— that minimizes f𝑸, i.e., βˆ€π’™βˆˆπ”Ήn: f𝑸(π’™βˆ—)≀f𝑸(𝒙).

In general, π’™βˆ— is not unique, meaning there may be a set of minimizing vectors with equal value w.r.t. f𝑸. The complexity of QUBO arises from the number of candidate binary vectors to be evaluated, as |𝔹n|=2n grows exponentially in n.

Sometimes, QUBO is defined as the problem of maximizing f𝑸, which is equivalent to minimizing fβˆ’π‘Έ=βˆ’f𝑸.

Properties

QUBO is scale invariant for positive factors Ξ±>0, which leave the optimum π’™βˆ— unchanged:

fα𝑸(𝒙)=π’™βŠΊ(α𝑸)𝒙=Ξ±(π’™βŠΊπ‘Έπ’™)=Ξ±f𝑸(𝒙).

In its general form, QUBO is NP-hard and cannot be solved efficiently by any known polynomial-time algorithm.[6] However, there are polynomially-solvable special cases, where 𝑸 has certain properties,[7] for example:

  • If all coefficients are positive, the optimum is trivially π’™βˆ—=(0,…,0)⊺. Similarly, if all coefficients are negative, the optimum is π’™βˆ—=(1,…,1)⊺.
  • If 𝑸 is diagonal, the bits can be optimized independently, and the problem is solvable in π’ͺ(n). The optimal variable assignments are simply xiβˆ—=1 if Qii<0, and xiβˆ—=0 otherwise.
  • If all off-diagonal elements of 𝑸 are non-positive, the corresponding QUBO problem is solvable in polynomial time.[8]

QUBO can be solved using integer linear programming solvers like CPLEX or Gurobi Optimizer. This is possible since QUBO can be reformulated as a linear constrained binary optimization problem. To achieve this, substitute the product xixj by an additional binary variable zijβˆˆπ”Ή and add the constraints xiβ‰₯zij, xjβ‰₯zij and xi+xjβˆ’1≀zij. Note that zij can also be relaxed to continuous variables within the bounds zero and one.

Applications

QUBO is a structurally simple, yet computationally hard optimization problem. It can be used to encode a wide range of optimization problems from various scientific areas.[9]

Maximum cut

Given a graph G=(V,E) with vertex set V={1,…,n} and edges EβŠ†VΓ—V, the maximum cut (max-cut) problem consists of finding two subsets S,TβŠ†V with T=Vβˆ–S, such that the number of edges between S and T is maximized.

The more general weighted max-cut problem assumes edge weights wijβ‰₯0 βˆ€i,j∈V, with (i,j)βˆ‰Eβ‡’wij=0, and asks for a partition S,TβŠ†V that maximizes the sum of edge weights between S and T, i.e.,

maxSβŠ†Vβˆ‘i∈S,jβˆ‰Swij.

By setting wij=1 for all (i,j)∈E this becomes equivalent to the original max-cut problem above, which is why we focus on this more general form in the following.

For every vertex in i∈V we introduce a binary variable xi with the interpretation xi=0 if i∈S and xi=1 if i∈T. As T=Vβˆ–S, every i is in exactly one set, meaning there is a 1:1 correspondence between binary vectors π’™βˆˆπ”Ήn and partitions of V into two subsets.

We observe that, for any i,j∈V, the expression xi(1βˆ’xj)+(1βˆ’xi)xj evaluates to 1 if and only if i and j are in different subsets, equivalent to logical XOR. Let π‘Ύβˆˆβ„+nΓ—n with Wij=wij βˆ€i,j∈V. By extending above expression to matrix-vector form we find that

π’™βŠΊπ‘Ύ(1βˆ’π’™)+(1βˆ’π’™)βŠΊπ‘Ύπ’™=βˆ’2π’™βŠΊπ‘Ύπ’™+(𝑾1+π‘ΎβŠΊ1)βŠΊπ’™

is the sum of weights of all edges between S and T, where 1=(1,1,…,1)βŠΊβˆˆβ„n. As this is a quadratic function over 𝒙, it is a QUBO problem whose parameter matrix we can read from above expression as

𝑸=2π‘Ύβˆ’diag⁑[𝑾1+π‘ΎβŠΊ1],

after flipping the sign to make it a minimization problem.

Cluster analysis

Binary Clustering with QUBO
20 points with random cluster assignment
A bad cluster assignment.
20 points with sensible cluster assignment
A good cluster assignment.
Visual representation of a clustering problem with 20 points: Circles of the same color belong to the same cluster. Each circle can be understood as a binary variable in the corresponding QUBO problem.

Next, we consider the problem of cluster analysis, where we are given a set of N points in d-dimensional space and want to assign each point to one of two classes or clusters, such that points in the same cluster are similar to each other. For this example we set N=20 and d=2. The data is given as a matrix π‘Ώβˆˆβ„20Γ—2, where each row contains two cartesian coordinates. For two clusters, we can assign a binary variable xiβˆˆπ”Ή to the point corresponding to the i-th row in 𝑿, indicating whether it belongs to the first (xi=0) or second cluster (xi=1). Consequently, we have 20 binary variables, which form a binary vector π’™βˆˆπ”Ή20 that corresponds to a cluster assignment of all points (see figure).

One way to derive a clustering is to consider the pairwise distances between points. Given a cluster assignment 𝒙, the expression xixj+(1βˆ’xi)(1βˆ’xj) evaluates to 1 if points i and j are in the same cluster. Similarly, xi(1βˆ’xj)+(1βˆ’xi)xj=1 indicates that they are in different clusters. Let dij>0 denote the Euclidean distance between the points i and j, i.e.,

dij=𝑿iβŠΊπ‘Ώj,

where 𝑿i is the i-th row of 𝑿.

In order to define a cost function to minimize, when points i and j are in the same cluster we add their positive distance dij, and subtract it when they are in different clusters. This way, an optimal solution tends to place points which are far apart into different clusters, and points that are close into the same cluster.

Let π‘«βˆˆβ„NΓ—N with Dij=dij/2 for all i,j∈{1,…,n}. Given an assignment π’™βˆˆπ”ΉN, such a cost function is given by

f(𝒙)=π’™βŠΊπ‘«π’™βˆ’π’™βŠΊπ‘«(1βˆ’π’™)βˆ’(1βˆ’π’™)βŠΊπ‘«π’™+(1βˆ’π’™)βŠΊπ‘«(1βˆ’π’™)=4π’™βŠΊπ‘«π’™βˆ’41βŠΊπ‘«π’™+1βŠΊπ‘«1,

where 1=(1,1,…,1)βŠΊβˆˆβ„N.

From the second line we can see that this expression can be re-arranged to a QUBO problem by defining

𝑸=4π‘«βˆ’4diag⁑[𝑫1]

and ignoring the constant term 1βŠΊπ‘«1. Using these parameters, a binary vector minimizing this QUBO instance 𝑸 will correspond to an optimal cluster assignment w.r.t. above cost function.

Connection to Ising models

QUBO is very closely related and computationally equivalent to the Ising model, whose Hamiltonian function is defined as

H(𝝈)=πˆβŠΊπ‘±πˆ+π’‰βŠΊπˆ=βˆ‘i,jJijΟƒiΟƒj+βˆ‘jhjΟƒj

with real-valued parameters hj,Jij for all i,j. The spin variables Οƒj are binary with values from {βˆ’1,+1} instead of 𝔹. Note that this formulation is simplified, since, in a physics context, Οƒi are typically Pauli operators, which are complex-valued matrices of size 2nΓ—2n, whereas here we treat them as binary variables. Many formulations of the Ising model Hamiltonian further assume that the variables are arranged in a lattice, where only neighboring pairs of variables ⟨i j⟩ can have non-zero coefficients; here, we simply assume that Jij=0 if i and j are not neighbors.

Applying the identity Οƒ=1βˆ’2x yields an equivalent QUBO problem [10]

πˆβŠΊπ‘±πˆ+π’‰βŠΊπˆ=(1βˆ’2𝒙)βŠΊπ‘±(1βˆ’2𝒙)+π’‰βŠΊ(1βˆ’2𝒙)=4π’™βŠΊπ‘±π’™βˆ’41βŠΊπ‘±π’™+1βŠΊπ‘±1βˆ’2π’‰βŠΊπ’™+π’‰βŠΊ1=π’™βŠΊ(4𝑱)π’™βˆ’(4π‘±βŠΊ1+2𝒉)βŠΊπ’™+1βŠΊπ‘±1+π’‰βŠΊ1⏟const.,

whose weight matrix 𝑸 is given by

𝑸=4π‘±βˆ’diag⁑[4π‘±βŠΊ1+2𝒉],

again ignoring the constant term, which does not affect the minization. Using the identity x=(1βˆ’Οƒ)/2, a QUBO problem with matrix 𝑸 can be converted to an equivalent Ising model using the same technique, yielding

𝑱=𝑸/4,𝒉=βˆ’(𝑸1+π‘ΈβŠΊ1)/4,

and a constant offset of 1βŠΊπ‘Έ1/4.[10]

References

  1. ↑ Kochenberger, Gary; Hao, Jin-Kao; Glover, Fred; Lewis, Mark; Lu, Zhipeng; Wang, Haibo; Wang, Yang (2014). "The unconstrained binary quadratic programming problem: a survey" (PDF). Journal of Combinatorial Optimization. 28: 58–81. doi:10.1007/s10878-014-9734-0. S2CID 16808394.
  2. ↑ Glover, Fred; Kochenberger, Gary (2019). "A Tutorial on Formulating and Using QUBO Models". arXiv:1811.11538 [cs.DS].
  3. ↑ Lucas, Andrew (2014). "Ising formulations of many NP problems". Frontiers in Physics. 2: 5. arXiv:1302.5843. Bibcode:2014FrP.....2....5L. doi:10.3389/fphy.2014.00005.
  4. ↑ MΓΌcke, Sascha; Piatkowski, Nico; Morik, Katharina (2019). "Learning Bit by Bit: Extracting the Essence of Machine Learning" (PDF). LWDA. S2CID 202760166. Archived from the original (PDF) on 2020-02-27.
  5. ↑ Tom Simonite (8 May 2013). "D-Wave's Quantum Computer Goes to the Races, Wins". MIT Technology Review. Archived from the original on 24 September 2015. Retrieved 12 May 2013.
  6. ↑ A. P. Punnen (editor), Quadratic unconstrained binary optimization problem: Theory, Algorithms, and Applications, Springer, Springer, 2022.
  7. ↑ Γ‡ela, E., Punnen, A.P. (2022). Complexity and Polynomially Solvable Special Cases of QUBO. In: Punnen, A.P. (eds) The Quadratic Unconstrained Binary Optimization Problem. Springer, Cham. https://doi.org/10.1007/978-3-031-04520-2_3
  8. ↑ See Theorem 3.16 in Punnen (2022); note that the authors assume the maximization version of QUBO.
  9. ↑ Ratke, Daniel (2021-06-10). "List of QUBO formulations". Retrieved 2022-12-16.
  10. 1 2 MΓΌcke, S. (2025). Quantum-Classical Optimization in Machine Learning. Shaker Verlag. https://d-nb.info/1368090214

External links

  • QUBO Benchmark (Benchmark of software packages for the exact solution of QUBOs; part of the well-known Mittelmann benchmark collection)
  • Endre Boros, Peter L Hammer & Gabriel Tavares (April 2007). "Local search heuristics for Quadratic Unconstrained Binary Optimization (QUBO)". Journal of Heuristics. 13 (2). Association for Computing Machinery: 99–132. doi:10.1007/s10732-007-9009-3. S2CID 32887708. Retrieved 12 May 2013.
  • Di Wang & Robert Kleinberg (November 2009). "Analyzing quadratic unconstrained binary optimization problems via multicommodity flows". Discrete Applied Mathematics. 157 (18). Elsevier: 3746–3753. doi:10.1016/j.dam.2009.07.009. PMC 2808708. PMID 20161596.
  • Hiroshima University and NTT DATA Group Corporation : "QUBO++ with ABS2 GPU QUBO Solver" # Software.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Quadratic_unconstrained_binary_optimization&oldid=1367476812"
Category:
  • Machine learning algorithms
Hidden categories:
  • Articles with short description
  • Short description matches Wikidata
You are visitor 01402503 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.