AugmentedMixing

Documentation for AugmentedMixing.

AugmentedMixing.AugmentedMixing — Module

AugmentedMixing.jl - Implementation of the Augmented Mixing Method for large-scale SDPs

This package implements a Burer-Monteiro factorization-based algorithm for arbitrary semidefinite programs in which the factorization matrices are updated in a column-wise fashion. Users can call augmented_mixing, which solves an SDP specified by a struct SdpData and returns an approximate primal-dual solution together with a WarmStart object to work with extended precision.

Public API

We refer to the preprint https://arxiv.org/abs/2507.20386 for implementation details and in-depth explanations of all parameters.

source
AugmentedMixing.SdpData — Type
struct SdpData{
    T<:AbstractFloat,
    M<:Union{Matrix{T},SparseMatrixCSC{T,Int64}},
    M2<:Union{Matrix{T},SparseMatrixCSC{T,Int64}},
}

Used to specify an SDP that can be solved with augmented_mixing.

An SDP with q blocks reads:

minimize < C_1 , X_1 > + ... + < C_q , X_q > subject to A_1(X_1) + ... + A_q(X_q) = (or >=) b and X_1, ... , X_q are symmetric, positive semidefinite matrices

Notes

All provided matrices must be symmetric. All matrices and vectors must be either of type Matrix{T} or SparseMatrixCSC{T,Int64}.

Inequality constraints are supported. All affine constraints must be ordered such that all equality constraints appear first, followed by all inequality constraints. The argument index_ineq_start must be set to the index of the first inequality constraint. If there are no inequality constraints, then index_ineq_start must be set to length(b) + 1.

The constraint matrices of affine constraints can be specified in two ways:

  1. A vector of symmetric matrices (same length as b). For single-block SDPs, the corresponding container is A::Vector{M} and for multi-block SDPs, the container is As::Vector{Vector{M}}.

  2. A single big matrix in which each row contains the respective vectorized constraint matrix. For single-block SDPs, the corresponding container is A::M and for multi-block SDPs, the container is As_vec::Vector{M}.

For containers with two dimensions, the first dimension always identifies the block.

Constructors

General constructors for multi-block SDPs:

sdp = SdpData(As::Vector{Vector{M}}, b::Vector{T}, Cs::Vector{M2}, index_ineq_start::Int64)
sdp = SdpData(As_vec::Vector{M}, b::Vector{T}, Cs::Vector{M2}, index_ineq_start::Int64)

Constructors for single-block SDPs:

sdp = SdpData(A::M, b::Vector{T}, C::M2, index_ineq_start::Int64)
sdp = SdpData(A::Vector{M}, b::Vector{T}, C::M2, index_ineq_start::Int64)

Converting to a different floating-point type (e.g. Float64 -> BigFloat): WARNING: Use with care! This cannot increase the precision of the SDP data itself.

sdp = SdpData(sdp::SdpData{T,M,M2}, T_new::Type{<:AbstractFloat})
source
AugmentedMixing.WarmStart — Type
struct WarmStart{T<:AbstractFloat}
    mu::T
    Vs::Vector{Matrix{T}}
    y::Vector{T}

Struct to save a state snapshot for warm-starting augmented_mixing.

  • mu: current penalty parameter
  • Vs: block-wise Burer-Monteiro factorization matrices (for each SDP block b, X_b = V_b' * V_b)
  • y: dual multipliers for affine constraints (nonnegative for inequalities)

Two constructors are provided:

  • WarmStart(mu, Vs, y) - not recommended to be used
  • WarmStart(ws::WarmStart{T}, T_new::Type) - convert a struct WarmStart to another floating-point type (e.g. Float64 -> BigFloat)

A struct WarmStart is returned by augmented_mixing and can be fed back via the warm_start keyword to continue a previous run or to refine a solution after promoting to extended precision.

source
AugmentedMixing.augmented_mixing — Method
Xs, y, Zs, status, ws = augmented_mixing(sdp::SdpData{T,M,M2};
                 tol::T = T(1e-12),
                 mu_start::T = T(sqrt(maximum(sdp.ns))),
                 time_limit::Float64 = typemax(Float64),
                 max_iters::Int = typemax(Int),
                 iters_Z::Int = 50,
                 scaling::Bool = true,
                 shuffling::Bool = false,
                 double_sweep::Bool = false,
                 warm_start::Union{WarmStart,Nothing} = nothing,
                 p::T = one(T),
                 delta::T = T(1e-2),
                 epsilon::T = T(1e-2),
                 max_evals::Int = 1000,
                 tau::T = T(1.03),
                 rat_min::T = T(0.8),
                 rat_max::T = T(1.2))

Solve the SDP provided in sdp using the Augmented Mixing Method.

Arguments

  • sdp: SDP problem data. See SdpData.

Optional keyword arguments

  • tol: stopping tolerance
  • mu_start: initial value of penalty parameter
  • time_limit: maximum wall-clock time in seconds
  • max_iters: maximum number of outer iterations
  • iters_Z: frequency for computing psd projections
  • scaling: whether automatic scaling is applied
  • shuffling: whether column update order is randomized
  • double_sweep: whether columns are updated in both forward and reverse order
  • warm_start: can be specified for triggering a warm start
  • p: dual step size
  • delta: relative tolerance for solving subproblems
  • epsilon: absolute tolerance for solving subproblems
  • max_evals: maximum number of function and gradient evaluations per column update
  • tau: factor for updating the penalty parameter
  • rat_min: lower bound for ratio-based balancing of penalty parameter
  • rat_max: upper bound for ratio-based balancing of penalty parameter

Return values

  • Xs::Vector{Matrix{T}}: primal matrices (symmetric and psd)
  • y::Vector{T}: dual multipliers (nonnegative for inequalities)
  • Zs::Vector{Matrix{T}}: dual slack matrices (symmetric and psd)
  • status::Symbol: one of :tol, :time, :iter (reason for termination)
  • ws::WarmStart{T}: struct to allow warm start from last iterate

Notes

We refer to the preprint https://arxiv.org/abs/2507.20386 for implementation details and further explanations of all optional keyword arguments.

source