should be able to run in serial and in parallel, for debugging/sanity purposes. do simple consensus, and general consensus.
we want to send general messages up to the collecting process. such as local computation of things that will go into the dual variable calculations
we also want to send general messages down to the processor, such as telling them to reset their dual variables to zero, if we detect ripples in the collecting process
http://www.staff.science.uu.nl/~bisse101/Mondriaan/
\begin{align*}
\mbox{minimize}\ &c^T x
\mbox{subject to}\ & Ax = b \
& Gx \leqK h
\end{align*}
\begin{align*}
\mbox{minimize}\ & b^T w + h^T z
\mbox{subject to}\ & A^T w + G^T z = -c \
& z ∈ K^*
\end{align*}
When we transform the primal output from QCML to dual form, and re-pack the matrices into a form that ECOS can handle, we expand the problem size, but that may or may not be a big issue.
We have a program \[ min\sumi=1^n f_i(x_i) s.t. x_i = z ∀ i \]
the iteration becomes
\begin{align*}
x_ik+1 = \mbox{prox}f_i/ρ\left( \bar{x}^k - u_i^k \right)
u_ik+1 = u_i^k + x_ik+1 - \bar{x}k+1
\end{align*}
after an iteration, we can compute the residuals:
\begin{align*}
\| r^k \|^2_2 &= ∑i=1N\|x_i^k - \bar{x}^k \|_2^2
\| s^k \|_2 &= \sqrt{N} ρ \| \bar{x}^k - \bar{x}k-1 \|_2
\end{align*}
but we can reformualte it into something more computationally friendly buy manipulating the indexing time:
\begin{align*}
u_ik+1 &= u_i^k + x_ik - \bar{x}k
x_ik+1 &= \mbox{prox}f_i/ρ\left( \bar{x}^k - u_ik+1 \right)
\end{align*}
Computationally, we see that each node maintains a state of
-
$\bar{x}^k$ is sent to each node - each node updates $u_ik+1$ locally
- each node computes the prox locally to produce $x_ik+1$
- each node sends out $x_ik+1$
- $\bar{x}k+1$ is computed somehow
- repeat
We describe the mapping from local variables to global with
x_ik+1 &= \mbox{prox}f_i/ρ\left( ˜{z}_i^k - u_ik+1 \right)\
z_gk+1 &= \frac{1}{k_g} ∑G(i,j)=g \left(x_ik+1 \right)_j
\end{align*}
Computationally, we have that each node maintains a state of $(x_ik, u_i^k)$. The steps are:
-
$z^k$ is computed in shared memory - each node pulls its
$˜{z}_i^k$ - each node updates $u_ik+1$
- each node updates $x_ik+1$ by computing the prox
- each node sends out its $x_ik+1$
- the $x_ik+1$ are averaged appropriately to produce $zk+1$
The residuals are given by
\begin{align*}
\| r^k \|^2_2 &= ∑i=1N\|x_i^k - ˜{z}_i^k \|_2^2
\| s^k \|_2^2 &= ρ^2 ∑i=1^N \| ˜{z}_i^k - ˜{z}_ik-1 \|_2^2
\end{align*}
\begin{align*}
x_ik+1 &= \mbox{prox}f_i/ρ\left( ˜{z}_i^k - u_ik \right)
z_gk+1 &= \frac{1}{k_g} ∑G(i,j)=g \left(x_ik+1 \right)_j\
u_ik+1 &= u_i^k + x_ik+1 - ˜{z}_ik+1
\end{align*}
Computationally, we have that each node maintains a state of $(x_ik, u_i^k)$. The steps are:
-
$z^k$ is computed in shared memory - each node pulls its
$˜{z}_i^k$ - each node updates $u_ik+1$
- each node updates $x_ik+1$ by computing the prox
- each node sends out its $x_ik+1$
- the $x_ik+1$ are averaged appropriately to produce $zk+1$
The residuals are given by
\begin{align*}
\| r^k \|^2_2 &= ∑i=1N\|x_i^k - ˜{z}_i^k \|_2^2
\| s^k \|_2^2 &= ρ^2 ∑i=1^N \| ˜{z}_i^k - ˜{z}_ik-1 \|_2^2
\end{align*}
if
To reorder the rows, we first store the problem in a modified format
\begin{align*}
\mbox{minimize}\ &c^T x
\mbox{subject to}\ & Rx \leqK s
\end{align*}
where
The below actually gives us a value of the optimal dual
variable
as a good guess for a restart, we would like have each prox stay at the current
xbar. That is, we want to find a
If
the simple algorithm: \[ x_ik+1 = \mbox{prox}f_i/ρ\left(\bar{x}^k + \frac{c}{ρ}\right) \] should converge to the correct solution, no?
NO! Adding the
use direct primal, dual residuals
try ecos with large prox, but few inequalities.
primal and dual, do whole, do consensus. see how fast it goes.
split rows of A and columsn of A^T
try comparing general and simple consensus. we need a data point to show that doing general consensus is the right thing to do.
the prox object should take in reduced (local) socp data and be able to return the prox.
the constructor should take in socp_data, but this data can have None objects for A, G, or c
- we should wrap these objects with an xupdate
- also wrap with a global variable index
this should allow us to use the same code for simple consensus, general consensus, and set intersection
- add something to compute the residuals
- add a hook for computing progress (like cross validation progress, or distance to a known solution)
- adding something to compute residuals will allow us to work with the new problem form for set intersection
- add the set intersection code
We transform a problem from the ECOS input format to a pure convex
intersection problem by requiring primal and dual feasibility, and
zero duality gap. We store the problem in the form
The resulting system is
(org mode)
c^T | b^T | h^T | = | 0 |
A | 0 | 0 | = | b |
G | 0 | 0 | \leq | h |
0 | A^T | G^T | = | -c |
0 | 0 | -I | \leq | 0 |
(latex)
\[
\begin{bmatrix}
c^T & b^T & h^T
A & 0 & 0 \
G & 0 & 0 \
0 & A^T & G^T \
0 & 0 & -I
\end{bmatrix}
\begin{bmatrix}
x \
y_1 \
y_2
\end{bmatrix}
\begin{matrix}
=\
=\
\leq\
=\
\leq
\end{matrix}
\begin{bmatrix}
0\
b\
h\
-c\
0
\end{bmatrix}
\]