---
title: Disciplined Biconvex Programming (DBCP)
url: https://www.emergentmind.com/topics/disciplined-biconvex-programming-dbcp
type: topic
---

# Disciplined Biconvex Programming (DBCP)

Disciplined Biconvex Programming (DBCP) is a modeling and solution framework for specifying and solving biconvex optimization problems. Biconvex problems are nonconvex optimization problems in which variables can be partitioned into two blocks so that, when one block is fixed, the objective and constraints are convex in the other block. The DBCP framework extends the principles of Disciplined Convex Programming (DCP) to the biconvex setting, providing a syntax and verification mechanism that guarantees biconvexity by construction, and enabling automatic generation and solution of the resulting subproblems via alternate convex search (ACS). DBCP is implemented as an open-source extension to the Python package CVXPY.

## 1. Formal Structure of Biconvex Problems

Let $\mathcal X \subseteq \mathbb R^n$ and $\mathcal Y \subseteq \mathbb R^k$ be nonempty closed convex sets. A set $B \subseteq \mathcal X \times \mathcal Y$ is biconvex if all slices $B_y = \{ x \in \mathcal X \mid (x,y) \in B \}$ are convex for each fixed $y \in \mathcal Y$, and all $B_x = \{ y \in \mathcal Y \mid (x,y) \in B \}$ are convex for each fixed $x \in \mathcal X$. An extended-real-valued function $f : \mathcal X \times \mathcal Y \to \mathbb R \cup \{+\infty\}$ is biconvex if its effective domain is biconvex and both $f_y(x)$ and $f_x(y)$ are convex in $x$ and $y$ for fixed $y$ and $x$, respectively.

A canonical biconvex optimization problem is:

\[
\begin{array}{ll}
\text{minimize}_{x \in \mathcal X, \; y \in \mathcal Y}& f_0(x,y) \\
\text{subject to} & f_i(x,y) \le 0,\quad i=1,\dots,m, \\
& h_j(x,y) = 0,\quad j=1,\dots,p \\
\end{array}
\]

where each $f_i$ is biconvex and each $h_j$ is biaffine (affine in $(x,y)$). The feasible set is thus biconvex, but globally solving such problems is generally NP-hard. Practical algorithms target stationary or partially optimal points.

Arithmetic and composition rules extend from convex analysis: non-negative weighted sums and pointwise maxima of biconvex functions are biconvex; if $h : \mathbb R^m \to \mathbb R$ is convex and nondecreasing in each argument and $g : \mathcal X \times \mathcal Y \to \mathbb R^m$ is biaffine, then $h \circ g$ is biconvex.

## 2. Syntax and Verification Rules in DBCP

DBCP extends DCP with a carefully restricted product rule to express admissible biconvex terms. In DCP, objective and constraint expressions are recursively constructed from atomic operations with known curvature and monotonicity, strictly forbidding arbitrary products unless one operand is a constant or of known sign. DBCP introduces the following product rule:

A product $p(x,y)=u\cdot v$ is permitted if $u$ and $v$ are DCP-compliant and one of the following ensures biconvexity:
1. $u$ and $v$ are both affine in $(x,y)$.
2. $u$ is affine, nonnegative, and $v$ is convex.
3. $u$ is affine, nonpositive, and $v$ is concave.
4. $u$ is convex, nonnegative, and $v$ is convex, nonnegative.
5. $u$ is concave, nonpositive, and $v$ is concave, nonpositive.

Additionally, the variable-interaction graph (nodes are variables, edges indicate variables on opposite sides of a product) must be acyclic and bipartite, preventing cyclic "multi-block" dependencies that would destroy biconvexity.

Variables are partitioned into two blocks, $\mathbf{x}$ and $\mathbf{y}$. Any remaining variables that only appear in convex expressions may be left outside the partition as these do not participate in alternation.

## 3. Automatic Problem Transformation and Solver Generation

Once a compliant DBCP problem is specified, the problem is automatically split into two DCP subproblems according to the supplied partition. The solution loop is an instance of alternate convex search (ACS), also known as block coordinate descent in this setting.

Given an initial feasible $(x^{(0)}, y^{(0)})$, the iterates are:
\[
\begin{aligned}
x^{(k+1)} &= \arg\min_{x} \left\{ f_0(x, y^{(k)}) \mid f_i(x, y^{(k)}) \le 0, \; h_j(x, y^{(k)}) = 0 \right\} \\
y^{(k+1)} &= \arg\min_{y} \left\{ f_0(x^{(k+1)}, y) \mid f_i(x^{(k+1)}, y) \le 0, \; h_j(x^{(k+1)}, y) = 0 \right\}
\end{aligned}
\]

Each subproblem is DCP-compliant and can be solved with any conic, QP, or SOCP solver supported by CVXPY (e.g., ECOS, OSQP).

A generic ACS implementation in pseudocode:

```
initialize x = x⁽⁰⁾, y = y⁽⁰⁾ feasibly
k ← 0
repeat
  solve (P_x): minimize f₀(x, yᵏ) subject to f_i(x, yᵏ) ≤ 0, h_j(x, yᵏ) = 0
  let xᵏ⁺¹ ← solution of (P_x)
  solve (P_y): minimize f₀(xᵏ⁺¹, y) subject to f_i(xᵏ⁺¹, y) ≤ 0, h_j(xᵏ⁺¹, y) = 0
  let yᵏ⁺¹ ← solution of (P_y)
  k ← k+1
until stopping criterion
```

DBCP supports proximal-regularized subproblems by augmenting the objective with $\lambda\|x - x^{(k)}\|_2^2$ or $\lambda\|y - y^{(k)}\|_2^2$ to promote stability and strong convexity; the proximal weight $\lambda \ge 0$ is user-configurable via the `lbd` keyword.

For initialization, if no feasible $(x^{(0)}, y^{(0)})$ is supplied, DBCP solves a relaxed feasibility problem

\[
\min_{x,y,s,t} \; \sum_{i=1}^m s_i + \sum_{j=1}^p t_j \quad \text{s.t.} \quad f_i(x,y) \le s_i,\, h_j(x,y) = t_j,\, s \ge 0
\]

via ACS until the total slack is zero, producing a feasible point. Alternatively, an infeasible-start penalized ACS variant minimizes $f_0(x,y) + \nu (\sum_i s_i + \sum_j t_j)$ over the same relaxed constraints, controlled by the penalty parameter $\nu$.

## 4. Convergence and Theoretical Properties

Under the assumption that each convex subproblem possesses a unique minimizer or attains its infimum, and that all relevant level sets are compact, the ACS sequence of objective values is monotone nonincreasing and bounded below:

\[
f_0(x^{(k+1)}, y^{(k+1)}) \le f_0(x^{(k)}, y^{(k)})
\]

with $f_0(x^{(k)}, y^{(k)}) \downarrow L$ for some $L \in \mathbb R$. If $(x^{(k)}, y^{(k)}) \to (x^*, y^*)$, the limit is a stationary or partially optimal point of the original biconvex problem. There is no guarantee of finding a global minimum; in general, different initializations may yield convergence to different local optima.

## 5. Practical Implementation in CVXPY/dbcp: Examples

DBCP is implemented as a lightweight extension of CVXPY, under the Python package `dbcp`. Users express biconvex problems at a high level as in DCP, then specify the block partition of variables.

### Example 1: Low-Rank Approximation

```python
import cvxpy as cp
from dbcp import BiconvexProblem

# Block variables X ∈ R^{m×k}, Y ∈ R^{k×n}, Z ∈ R^{m×n}.
X = cp.Variable((m, k))
Y = cp.Variable((k, n))
Z = cp.Variable((m, n))
obj = cp.Minimize(cp.norm(X @ Y + Z - A, "fro"))
constr = [cp.norm(Z, "fro") <= 1]

# declare biconvex problem, partition [[X], [Y]]; Z is DCP-only
prob = BiconvexProblem(obj, [[X], [Y]], constr)
prob.solve(lbd=1e-2, gap_tolerance=1e-6, solver="ECOS")
print("objective value:", prob.value)
print("iterations:", prob.num_iters)
```

### Example 2: Nonnegative Matrix Factorization

```python
X = cp.Variable((m, k), nonneg=True)
Y = cp.Variable((k, n), nonneg=True)
A = ...  # data matrix
obj = cp.Minimize(cp.sum_squares(X @ Y - A))
prob = BiconvexProblem(obj, [[X], [Y]])
prob.solve(lbd=0.1, gap_tolerance=1e-5)
print("NMF objective:", prob.value)
```

### Example 3: $k$-Means Clustering via Soft Assignments

```python
xs = ... # data points R^{m×n}
k = ...
xbars = cp.Variable((k, n))
zs = cp.Variable((m, k), nonneg=True)
dist2 = lambda c: cp.sum(cp.square(xs - c), axis=1)
obj = cp.Minimize(cp.sum(cp.multiply(zs, cp.vstack([dist2(c) for c in xbars]).T)))
constr = [zs <= 1, cp.sum(zs, axis=1) == 1]
prob = BiconvexProblem(obj, [[xbars], [zs]], constr)
prob.solve(lbd=0.5)
```

Infeasible start and relaxation variants can be accessed via `BiconvexRelaxProblem`, allowing penalty-based constraint handling.

## 6. Benefits, Limitations, and Extensions

The DBCP framework centralizes the modeling and solution of biconvex problems:

| Aspect              | DBCP Mechanism                                  | Comment                                         |
|---------------------|------------------------------------------------|-------------------------------------------------|
| Modeling Simplicity | High-level syntax, automated splitting          | No manual ACS coding                            |
| Correctness         | Syntax/graph checks for biconvexity             | Ensures each subproblem is DCP-compliant        |
| Modularity          | User options for proximal weights, penalties    | Easily adapted to problem structure             |
| Expressiveness      | Rapid prototyping of new problem forms          | Swap objectives/constraints in seconds          |

However, DBCP only guarantees locally optimal or stationary points and is sensitive to initialization. Overhead can be high since each ACS iteration invokes an external convex solver. Not all biconvex problems are representable if the DBCP product rule or variable-interaction graph constraints are violated.

Open directions include:
- Extension to multi-convex programming for more than two blocks [1609.03285].
- Heuristic combination with global optimization methods for valid lower and upper bounds.
- Embedded biconvex subproblems within stochastic or dynamic models (e.g., inside EM loops).

Disciplined biconvex programming thus provides a rigorous, modular way to formulate and solve a broad class of biconvex optimization problems in a manner that is robust to user modeling errors and allows rapid experimentation, provided the inherent local nature of the solution landscape is accepted as a fundamental limitation.

Source: https://www.emergentmind.com/topics/disciplined-biconvex-programming-dbcp