---
title: 'Condor Refine: High-Precision Conic Optimization'
url: https://www.emergentmind.com/topics/condor-refine
type: topic
---

# Condor Refine: High-Precision Conic Optimization

Condor Refine is a lightweight, high-precision solution-polishing step for conic optimization problems, focused on substantially improving the accuracy of approximate solutions obtained by standard first-order or operator-splitting methods. Condor Refine operates at regular points of the homogeneous primal-dual embedding of conic programs, using a matrix-free Newton-like approach implemented with the LSQR conjugate gradient solver and analytic derivatives of projections onto the relevant cones. This method is efficient, robust, and compatible with large-scale or abstract-operator problem settings, consistently yielding 10× to 100× reductions in residual norm at marginal computational cost [1811.02157].

## 1. Homogeneous Primal–Dual Embedding and Residual Formulation

Condor Refine is constructed for the solution of generic conic programs in primal-dual form:
- **Primal:** $\min\;c^Tx$ subject to $A x + s = b$, $s \in \mathcal{K}$
- **Dual:** $\min\;b^Ty$ subject to $A^Ty + c = 0$, $y \in \mathcal{K}^*$

The homogeneous self-dual embedding introduces auxiliary variables and combines primal and dual feasibility into a single feasibility problem:
\[
u-v=0,\qquad  u\in\tilde\K,\;v\in\tilde\K^*,\;u_{m+n+1}+v_{m+n+1}>0
\]
where 
\[
\tilde\K = \mathbb{R}^n \times \mathcal{K}^* \times \mathbb{R}_+, \quad
\tilde{\mathcal{K}}^* = \{0\}^n \times \mathcal{K} \times \mathbb{R}_+
\]
and $Q\in\mathbb{R}^{(m+n+1)\times(m+n+1)}$ is skew-symmetric, encoding $A$, $b$, $c$.

The **residual map** is then
\[
R(z) = Q\Pi(z) + \Pi^*(z) = [(Q - I)\Pi + I]z
\]
where $\Pi$ is the Euclidean projection onto $\tilde\K$ and $\Pi^*=I-\Pi$. Any $z$ such that $R(z)=0$ and $z_{m+n+1}\neq 0$ corresponds exactly to a certificate or solution of the original conic program [1811.02157].

## 2. Differentiability and Jacobian Structure

At a “regular” point—where $R$ is differentiable and its Jacobian is invertible—the method employs a Newton-like refinement:

\[
J = \nabla R(z) = (Q-I) \nabla\Pi(z) + I
\]

Here $\nabla\Pi(z)$, the derivative of the projection, is block-diagonal across the Cartesian product structure of $\tilde\K$, allowing per-cone analytic forms:
- **Nonnegative orthant:** $\nabla\Pi(x) = \mathrm{diag}(\mathbf{1}_{x>0})$
- **Second-order cone:** Formulae based on the value of $\|y\|$ vs. $t$, including full derivatives for points on or near the boundary
- **Semidefinite cone:** Uses the eigendecomposition $X=U\mathrm{diag}(\lambda)U^T$ and structured Jacobian expressions in terms of $U$, $\lambda$
- **Exponential cone:** Involves solving a $4\times 4$ KKT system for the local projection Jacobian [1811.02157]

This modular structure permits efficient, local application of cone-derivative routines without constructing or storing large Jacobian matrices.

## 3. Matrix-Free Refinement via LSQR

Given an approximate $z_0$ with $r_0 = R(z_0)$, one solves the regularized normal equations:

\[
\min_\delta\;\|\,r_0+J\,\delta\|_2^2\;+\;\lambda\|\delta\|_2^2
\]
which is equivalent to
\[
(J^TJ+\lambda I)\delta = -J^T r_0
\]

Condor Refine leverages the LSQR algorithm—a matrix-free, iterative least-squares solver. Only the action of $J$ and $J^T$ as matvecs is required, which are applied as follows:
- Compute $\nabla\Pi(z_0)$ per cone block for a vector
- Matricially multiply by $Q-I$ via operator calls to $A$ and $A^T$ as needed
- Add the identity term

A line search in $\{1, 1/2, 1/4, \ldots\}$ is employed to guarantee monotonic reduction in residual norm. The procedure is optionally iterated a small number of times [1811.02157].

### Condor Refine Pseudocode

```
REFINE(z0, A, b, c, cones; λ, maxLSQR, maxBack):
 r0 = R(z0)
 define mat-vec: v ↦ J(z0)*v, adjoint: w ↦ J(z0)^T*w
 Use LSQR to solve [J; sqrt(λ)I] δ ≈ [−r0; 0] ≤ maxLSQR iters
 for p=0,…,maxBack:
    t = 2^{-p}
    if ||R(z0 + tδ)|| < ||r0||: return z0+tδ
 return z0
```

## 4. Computational Efficiency and Scaling

Each LSQR iteration requires one application of $J$ and one of $J^T$, corresponding to one call each to $A$, $A^T$, the projection $\Pi$, and its derivative $\nabla\Pi$. Default values are $N_{\mathrm{LSQR}}=30$ and typically two refinement cycles (i.e., $60$ applications total).

Comparative metrics:
- **Condor Refine:** 5–20 ms per moderate-sized, sparse conic instance
- **Full solve:** 100 ms to 1 s for the original optimization using first-order or operator-splitting solvers
- **Interior-point methods:** Incur dense- or sparse-matrix factors scaling as $O(n^3)$ or $O(n^{1.5})$ per iteration

Thus, Condor Refine achieves substantial accuracy improvement at a small computational fraction of the original solution effort [1811.02157].

## 5. Implementation Design and Reference Code

The open-source implementation (Python, see https://github.com/cvxgrp/cone_prog_refine) employs:
- SciPy CSC sparse matrices for $A$, NumPy arrays for $b$, $c$
- A Python dict structure to describe $\{\mathrm{zero},\mathrm{nonneg},\mathrm{socp},\mathrm{psd},\mathrm{exp}\}$ cones
- Numba JIT-compiled projection and projection-derivative routines for efficiency
- Built-in SciPy LSQR with custom matvec/adjoints, default tolerance $1\times 10^{-6}$
- Levenberg–Marquardt stabilization parameter $\lambda=10^{-8}$
- Up to 10 line-search steps, two refinement passes

This approach ensures the method and its extensions are compatible with both explicit and abstract linear operators [1811.02157].

## 6. Empirical Results and Operational Characteristics

Numerical experiments on instances with mixed linear, second-order, semidefinite, and exponential cones demonstrate:
- Residual norms are improved by $10\times$ to $100\times$ in the majority of cases
- Success with limited passes of refinement and negligible increase in runtime relative to the cost of acquiring the original approximate answer

The regularity assumption (Jacobian invertibility) is typically satisfied in practical instances; nonregular points are rare in contemporary applications.

Condor Refine is positioned as a robust, systematic polishing layer that can be appended to most first-order or embedded conic solution routines. It delivers substantial value in obtaining certificate-grade solutions in high-precision or reliability-critical deployments [1811.02157].

Source: https://www.emergentmind.com/topics/condor-refine