M1 · ADMM, from zero
Chapter 10 (notes §10.6–10.7) · about 75–90 min · Goal: given any problem "$f_1 + f_2$", you can write the ADMM iteration and derive the exact formula for each step. He said he wants a "hard problem" on exactly this.
It's a story: each section uses only what came before. Formulas appear after the idea they express. Small Check boxes let you test yourself as you go (answers hidden). The one-page summary is at the very end; use it for revision, not for learning.
Notation used: $\|v\|^2=v_1^2+\dots+v_n^2$ (squared length) · $\|v\|_1=|v_1|+\dots+|v_n|$ (sum of absolute values) · $\arg\min_z g(z)$ = "the $z$ that makes $g$ smallest" · "const" = a term that doesn't involve the variable we're minimising over, so it can't change where the minimum is.
0. Why ADMM exists (the problem it solves)
Suppose you fit a model: find $x$ so that $Mx\approx b$. The classic way is least squares, minimise $\frac12\|Mx-b\|^2$. That's smooth, and the answer comes from a linear system (set the gradient to zero).
Now you also want $x$ to be sparse (many entries exactly 0: a simpler model). The standard trick is to add $\gamma\|x\|_1=\gamma\sum_i|x_i|$, which pushes entries to zero. That gives the LASSO:
$$\min_x\ \underbrace{\tfrac12\|Mx-b\|^2}_{\text{smooth, easy alone}}\;+\;\underbrace{\gamma\|x\|_1}_{\text{has corners, easy alone}}$$Each piece on its own is easy:
- The least-squares piece alone: set the gradient to zero and solve a linear system.
- The $|\cdot|$ piece alone (plus a simple square, as we'll see): it has a one-line formula, soft thresholding.
Together they're awkward. $|x_i|$ has a corner at 0, so "set the gradient to zero" doesn't work. And $M$ mixes all the entries together, so you can't solve one entry at a time.
ADMM stands for Alternating Direction Method of Multipliers. "Alternating direction" means you minimise over one block of variables, then the other. "Method of multipliers" means a Lagrange multiplier (a price) gets updated every round.
Split the problem so each piece gets its own copy of the variable, solve the two easy pieces one after the other, and use a price ($\lambda$) that grows whenever the two copies disagree, until they agree.
Roadmap: A builds the two tools every ADMM step uses. B builds the method. C runs it by hand on a 1-variable problem. D and E do the two examples from his notes. F gives the exam recipe.
A. Two easy building blocks
Every ADMM step you'll ever write turns into one of two problems: "$f$ + a squared distance to some point". So first learn those two tools.
A1. "Absolute value + square" has a one-line answer: soft thresholding
The problem. Given a number $y$ and a weight $\tau>0$, find
$$z^*=\arg\min_z\ \Big[\ \tau|z|+\tfrac12(z-y)^2\ \Big].$$Read it as a tug of war. The square $\frac12(z-y)^2$ wants $z$ to sit at $y$. The term $\tau|z|$ wants $z$ at 0. Who wins?
- If $y$ is far from 0, the square wins, but $\tau|z|$ still drags $z$ towards 0 by exactly $\tau$. For $y>0$: $z^*=y-\tau$.
- If $y$ is close to 0 ($|y|\le\tau$), the pull to 0 wins completely: $z^*=0$ exactly. This is where the sparsity comes from.
- Take $y>0$. If $z<0$, both terms get bigger as $z$ moves further left (both $|z|$ and $(z-y)^2$ grow). If $z>y$, both get bigger as $z$ moves right. So the minimum is somewhere in $[0,y]$; in particular $z^*\ge0$.
- On $z\ge0$ we have $|z|=z$, so the problem becomes "minimise the smooth function $\tau z+\frac12(z-y)^2$ over $z\ge0$". No corner any more.
- Ignore the constraint and set the derivative to 0: $\tau+(z-y)=0$, so $\hat z=y-\tau$.
- If $\hat z\ge0$ (i.e. $y\ge\tau$), it satisfies the constraint, so $z^*=y-\tau$.
- If $\hat z<0$ (i.e. $0<y<\tau$), the parabola's bottom is to the left of 0, so on $[0,\infty)$ the function only goes up. Its smallest value there is at $z=0$: $z^*=0$.
- $y<0$ is the mirror image: $z^*=y+\tau$ if $y\le-\tau$, else 0.
Putting the cases together gives the soft-thresholding function:
$$S_\tau(y)=\operatorname{sign}(y)\,\max(|y|-\tau,\,0)=\begin{cases}y-\tau,&y>\tau\\0,&|y|\le\tau\\y+\tau,&y<-\tau\end{cases}$$The version you'll actually meet has a general weight on the square: $\gamma|z|+\frac{\beta}{2}(z-y)^2$. Divide everything by $\beta$ (dividing by a positive number doesn't move the minimum) to get $\frac{\gamma}{\beta}|z|+\frac12(z-y)^2$. So:
$$\arg\min_z\ \gamma|z|+\tfrac{\beta}{2}(z-y)^2=S_{\gamma/\beta}(y).\qquad\text{Threshold }=\frac{\text{weight on }|z|}{\text{weight on the square}}.$$For vectors, $\gamma\|z\|_1+\frac{\beta}{2}\|z-y\|^2=\sum_i\big[\gamma|z_i|+\frac{\beta}{2}(z_i-y_i)^2\big]$ is a sum of separate 1-variable problems, so you apply $S_{\gamma/\beta}$ to each entry.
Show answer
$2$, $0$, $-1.5$, $0$ (exactly on the threshold counts as the dead zone).
Cousin: a hard constraint instead of $|z|$ (projection). What if, instead of a soft pull to 0, $z$ must lie in a set $C$ (for example $0\le z\le B$)? Write this as a function too: the indicator $P(z)=0$ if $z\in C$, $+\infty$ if not (an infinite cost forbids leaving $C$; more in E1). Then "$\min \frac{\beta}{2}\|z-y\|^2$ over $z\in C$" just asks for the point of $C$ nearest to $y$, called the projection $\Pi_C(y)$. For a box $[0,B]$ it's clipping: below 0 → 0, above $B$ → $B$, otherwise unchanged. (We'll use this in section E.)
A2. Completing the square: turning "linear + square" into "square around a new centre"
In ADMM you keep seeing expressions like $\lambda(z-c)+\frac{\beta}{2}(z-c)^2$: a square centred at $c$, plus a tilt $\lambda(z-c)$. A tilted parabola is still a parabola, just with its bottom shifted. Completing the square tells you where the bottom is.
$4(z-1)+(z-1)^2$. Let $w=z-1$: $4w+w^2=(w+2)^2-4$. So it's $(z+1)^2-4$: a square centred at $z=-1$, plus a constant.
Here $\lambda=4$, $\beta=2$ (since $\frac{\beta}{2}=1$), $c=1$, and the new centre is $-1=1-\frac{4}{2}=c-\frac{\lambda}{\beta}$.
In general (expand the right side to check):
$$\lambda(z-c)+\frac{\beta}{2}(z-c)^2=\frac{\beta}{2}\Big(z-\big(c-\tfrac{\lambda}{\beta}\big)\Big)^2-\frac{\lambda^2}{2\beta}.$$The last term doesn't contain $z$, so it's "const". Same for vectors: $\lambda^T(z-c)+\frac{\beta}{2}\|z-c\|^2=\frac{\beta}{2}\|z-(c-\lambda/\beta)\|^2+\text{const}$.
Write the tilt as $g^T(z-c)$, where $g$ is whatever multiplies $z$. Then centre $=c-g/\beta$.
- Tilt $\lambda^T(z-c)$: $g=\lambda$, so centre $c-\lambda/\beta$.
- Tilt $\lambda^T(c-z)=(-\lambda)^T(z-c)$: $g=-\lambda$, so centre $c+\lambda/\beta$.
Sanity check: the derivative of $g(z-c)+\frac{\beta}{2}(z-c)^2$ is $g+\beta(z-c)$, which is zero at $z=c-g/\beta$.
Show answer
Here the coefficient of $(z-c)$ is $\lambda=-6$, with $\beta=3$, $c=2$: $a=c-\lambda/\beta=2-(-6)/3=4$. Check: the derivative $-6+3(z-2)=0$ gives $z=4$ ✓.
Why this matters: after completing the square, every ADMM sub-step is "$f_i$ + $\frac{\beta}{2}\|z-\text{centre}\|^2$". If $f_i$ is $\gamma\|z\|_1$ the answer is soft thresholding (A1). If $f_i$ is an indicator of a set (0 inside, $+\infty$ outside), the answer is projection (A1 cousin). If $f_i$ is smooth, set the gradient to zero.
B. The ADMM idea, built step by step
B1. Give each piece its own copy of the variable
Rewrite $\min_x f_1(x)+f_2(x)$ as
$$\min_{x_1,\,x_2}\ f_1(x_1)+f_2(x_2)\quad\text{subject to}\quad x_1-x_2=0.$$It's the same problem: the constraint forces the copies to be equal. But now the cost separates: $f_1$ only sees $x_1$, $f_2$ only sees $x_2$. Only the constraint links them.
His notes write the general form with any linear link: $\min f_1(x_1)+f_2(x_2)$ s.t. $A_1x_1+A_2x_2-b=0$, abbreviated $A(x_1,x_2)=0$. "Copies agree" is the special case $A_1=I$, $A_2=-I$, $b=0$.
(His notes also say the $f_i$ are "proper, closed, convex" and may take the value $+\infty$. In plain words: convex, never $-\infty$, no weird jumps, and $+\infty$ is allowed as a way to forbid points. That's how constraints get written into $f_i$, in section E.)
B2. First attempt: just penalise disagreement (it fails, and seeing why is the key)
Drop the constraint and add a cost for disagreeing: minimise $f_1(x_1)+f_2(x_2)+\frac{\beta}{2}\|x_1-x_2\|^2$, alternating between $x_1$ and $x_2$.
$\min_x\ \frac12(x-3)^2+|x|$. True answer: for $x>0$ the derivative is $(x-3)+1=0$, so $x^*=2$ (equivalently $S_1(3)=2$).
Split: $f_1(x_1)=\frac12(x_1-3)^2$, $f_2(x_2)=|x_2|$. Minimise $\frac12(x_1-3)^2+|x_2|+\frac{\beta}{2}(x_1-x_2)^2$ alternately:
- over $x_1$ (smooth, derivative $=0$): $(x_1-3)+\beta(x_1-x_2)=0$, so $x_1=\dfrac{3+\beta x_2}{1+\beta}$;
- over $x_2$ ($|x_2|+\frac{\beta}{2}(x_2-x_1)^2$, i.e. A1 with weight 1 on $|\cdot|$ and $\beta$ on the square): $x_2=S_{1/\beta}(x_1)$.
Where does it settle? Assume $x_2>0$, so $x_2=x_1-1/\beta$. Substitute into the first update: $x_1=\frac{3+\beta x_1-1}{1+\beta}$, which gives $x_1=2$ and $x_2=2-1/\beta$:
| $\beta$ | $x_1$ | $x_2$ | gap $x_1-x_2$ |
|---|---|---|---|
| 1 | 2 | 1 | 1 |
| 4 | 2 | 1.75 | 0.25 |
| 10 | 2 | 1.9 | 0.1 |
The copies never agree. $x_1=2$ happens to be right, but $x_2$, the copy that carries $|x|$, is wrong by $1/\beta$, and the constraint $x_1=x_2$ is violated. A bigger $\beta$ shrinks the gap but never to zero. A huge $\beta$ also makes every step numerically touchy, because the penalty term swamps $f_1$ and $f_2$.
Why it fails: $x_2$ is pulled by $|x_2|$ towards 0 with a constant force (slope 1). The penalty can only balance that force by keeping a gap: the penalty's pull is $\beta\times$gap, so the gap settles at $1/\beta$. To have zero gap and balance the force, we need a pull that doesn't depend on the gap. That's a price.
B3. Add a price $\lambda$ that learns the missing force
Add a linear term $\lambda^T(x_1-x_2)$. Think of $\lambda$ as a price per unit of disagreement: it pushes $x_1$ and $x_2$ towards each other with a fixed force $\lambda$, even when the gap is zero. Together with the penalty this gives the augmented Lagrangian:
$$L_A(x_1,x_2,\lambda)=f_1(x_1)+f_2(x_2)+\underbrace{\lambda^T(x_1-x_2)}_{\text{price (Lagrangian part)}}+\underbrace{\tfrac{\beta}{2}\|x_1-x_2\|^2}_{\text{penalty ("augmented")}}$$General form (his notation): $L_A=f_1(x_1)+f_2(x_2)+\lambda^TA(x_1,x_2)+\frac{\beta}{2}\|A(x_1,x_2)\|^2$, with fixed $\beta>0$.
How do we find the right price? We don't know it in advance, so we learn it, like a thermostat: after each round, look at the disagreement $r=x_1-x_2$ and raise the price in that direction:
$$\lambda\leftarrow\lambda+\beta\,r.$$If the copies still disagree, $\lambda$ changes. When they agree, $r=0$ and $\lambda$ stops changing. So at the end, the copies agree and the price is exactly the force needed.
Step size β. Look at step 2's optimality condition. $x_2$ minimises $f_2(x_2)+\lambda^{(k)T}(x_1-x_2)+\frac{\beta}{2}\|x_1-x_2\|^2$, so at the new $x_2$ the "slope of $f_2$" must equal $\lambda^{(k)}+\beta(x_1^{(k+1)}-x_2^{(k+1)})$. That is exactly $\lambda^{(k+1)}$. So with step $\beta$, the new price always equals the force $f_2$ exerts at its new point. (In C below: after round 1, $\lambda=1$ = slope of $|x|$ at $x_2=0.5>0$.)
The sign. The rule is: $\lambda\leftarrow\lambda+\beta\times$(whatever $\lambda$ multiplies in $L_A$). With $+\lambda^T(x_1-x_2)$ the update is $\lambda+\beta(x_1-x_2)$. If you write $\lambda^T(x_2-x_1)$ instead, the update is $\lambda+\beta(x_2-x_1)$ and every centre flips sign. Both are fine, but stay consistent. His notes use $\lambda^TA(x_1,x_2)$ with $A=A_1x_1+A_2x_2-b$.
Link to KKT (KKT conditions are taught from scratch in M2, section D; you don't need them to follow ADMM). When ADMM stops changing: step 1's optimality gives $\nabla f_1(x_1)+\lambda=0$, step 2 gives "slope of $f_2$ at $x_2$" $=\lambda$, and $r=0$ gives $x_1=x_2$. These are exactly the KKT conditions of $\min f_1(x_1)+f_2(x_2)$ s.t. $x_1-x_2=0$, with multiplier $\lambda$. So ADMM is a way of solving the KKT system piece by piece.
Link to Ch 7 (duality is taught in M3, sections D–F): $\lambda$ is literally the Lagrange multiplier of the constraint $x_1-x_2=0$. The dual function $q(\lambda)=\inf_{x_1,x_2}L(x_1,x_2,\lambda)$ is "the best cost when the constraint is priced at $\lambda$ instead of enforced", and the update $\lambda+\beta r$ is a step uphill on it. Dual ascent is exactly that method without the penalty: minimise the plain Lagrangian over $x$, then move $\lambda$ uphill on $q$, and repeat. It can be slow and its $x$-steps may be ill-defined. The penalty makes each step well-behaved: that's why it's "augmented".
B4. The three steps of one ADMM round
Minimising $L_A$ over $x_1$ and $x_2$ together would bring back the hard joint problem. So do them one at a time (that's the "alternating direction"), then update the price (the "method of multipliers"):
How to actually do steps 1 and 2: write out $L_A$, throw away every term that doesn't contain the variable you're minimising over, complete the square (A2), and you get "$f_i$ + squared distance to a centre": one of the easy problems from A. His notes name these functions $f_{1,k}(z)=L_A(z,x_2^{(k)},\lambda^{(k)})$ and $f_{2,k}(z)=L_A(x_1^{(k+1)},z,\lambda^{(k)})$.
- Step 2 uses $x_1^{(k+1)}$ (new), not $x_1^{(k)}$.
- Steps 1 and 2 both use $\lambda^{(k)}$ (old); $\lambda$ changes only in step 3.
- The price step size is $\beta$, the same $\beta$ as in the penalty.
Start: any $\lambda^{(0)}$ (usually 0), and $x_2^{(0)}$ where $f_2$ is finite (usually 0). You don't need $x_1^{(0)}$, because step 1 computes it.
C. One example, completely by hand
Same toy problem: $\min_x \frac12(x-3)^2+|x|$, answer $x^*=2$. Split $f_1(x_1)=\frac12(x_1-3)^2$, $f_2(x_2)=|x_2|$, constraint $x_1-x_2=0$, $\beta=1$.
$$L_A=\tfrac12(x_1-3)^2+|x_2|+\lambda(x_1-x_2)+\tfrac12(x_1-x_2)^2.$$- Step 1 (over $x_1$): keep the terms with $x_1$: $\frac12(x_1-3)^2+\lambda(x_1-x_2)+\frac12(x_1-x_2)^2$. Everything is smooth, so set the derivative to 0: $(x_1-3)+\lambda+(x_1-x_2)=0$, giving $$x_1=\frac{3+x_2-\lambda}{2}.$$
- Step 2 (over $x_2$): keep the terms with $x_2$: $|x_2|+\lambda(x_1-x_2)+\frac12(x_1-x_2)^2$. Here $x_2$ appears with a minus sign in the tilt, so by A2 the centre is $x_1+\lambda$: this is $|x_2|+\frac12(x_2-(x_1+\lambda))^2+$ const. By A1: $$x_2=S_1(x_1+\lambda).$$
- Step 3: $\lambda\leftarrow\lambda+(x_1-x_2)$.
Start with $x_2=0$, $\lambda=0$:
| round | step 1: $x_1=\frac{3+x_2-\lambda}{2}$ | step 2: $x_2=S_1(x_1+\lambda)$ | step 3: $\lambda$ | $x_1$'s distance to 2 |
|---|---|---|---|---|
| 1 | $(3+0-0)/2=1.5$ | $S_1(1.5)=0.5$ | $0+(1.5-0.5)=1$ | 0.5 |
| 2 | $(3+0.5-1)/2=1.25$ | $S_1(2.25)=1.25$ | $1+0=1$ | 0.75 |
| 3 | $(3+1.25-1)/2=1.625$ | $S_1(2.625)=1.625$ | 1 | 0.375 |
| 4 | $1.8125$ | $1.8125$ | 1 | 0.1875 |
| 5 | $1.90625$ | $1.90625$ | 1 | 0.094 |
What you're seeing:
- After one round the price jumps to $\lambda=1$, and from then on the copies agree every round. The price has learned the missing force.
- Compare B2: the penalty-only method got stuck at $x_2=1$ with a gap. Here there's no gap, and the iterates head to the true answer 2. Round 2 briefly moves away (1.25) while $\lambda$ settles in; from round 2 on, the error halves every round.
- Why $\lambda$ ends at exactly 1: at the answer $x=2$, step 1 says $(2-3)+\lambda+0=0$, so $\lambda=1$. That's the slope of $|x|$ at $x=2$: the final price equals the force the $|x|$ piece exerts.
Show answer
$x_1=(3+4\cdot0-0)/5=0.6$; $x_2=S_{1/4}(0.6)=0.35$; $\lambda=0+4(0.6-0.35)=1$. (Round 2: $x_1=(3+1.4-1)/5=0.68$, $x_2=S_{1/4}(0.68+0.25)=0.68$.)
D. Example 1 from his notes: LASSO (same steps, now with vectors)
$\min_x \frac12\|Mx-b\|^2+\gamma\|x\|_1$, with $M\in\mathbb{R}^{d\times n}$, $\gamma>0$. Exactly section C with vectors; read the two side by side.
- Split. $f_1(x_1)=\frac12\|Mx_1-b\|^2$, $f_2(x_2)=\gamma\|x_2\|_1$, constraint $x_1-x_2=0$ (so $A_1=I$, $A_2=-I$, $b=0$). Equivalent to LASSO because the constraint forces $x_1=x_2$.
- Augmented Lagrangian. $L_A=\frac12\|Mx_1-b\|^2+\gamma\|x_2\|_1+\lambda^T(x_1-x_2)+\frac{\beta}{2}\|x_1-x_2\|^2$.
- Step 1 ($x_1$). Keep the $x_1$-terms: $f_{1,k}(z)=\frac12\|Mz-b\|^2+\lambda^{(k)T}(z-x_2^{(k)})+\frac{\beta}{2}\|z-x_2^{(k)}\|^2$. Complete the square (tilt $+$, so centre $c-\lambda/\beta$): $$f_{1,k}(z)=\tfrac12\|Mz-b\|^2+\tfrac{\beta}{2}\|z-a_k\|^2+\text{const},\qquad a_k=x_2^{(k)}-\lambda^{(k)}/\beta.$$ Smooth, so set the gradient to zero. (The gradient of $\frac12\|Mz-b\|^2$ is $M^T(Mz-b)$; the gradient of $\frac{\beta}{2}\|z-a\|^2$ is $\beta(z-a)$.) $$M^T(Mz-b)+\beta(z-a_k)=0\ \Longrightarrow\ (M^TM+\beta I)z=M^Tb+\beta a_k.$$ Since $\beta a_k=\beta x_2^{(k)}-\lambda^{(k)}$: $$\boxed{(M^TM+\beta I)\,x_1^{(k+1)}=M^Tb+\beta x_2^{(k)}-\lambda^{(k)}}$$ $M^TM+\beta I$ is positive definite (since $\beta>0$), so this has exactly one solution. (Compare C: there $M=1$, $b=3$, $\beta=1$, giving $2x_1=3+x_2-\lambda$.)
- Step 2 ($x_2$). Keep the $x_2$-terms: $f_{2,k}(z)=\gamma\|z\|_1+\lambda^{(k)T}(x_1^{(k+1)}-z)+\frac{\beta}{2}\|z-x_1^{(k+1)}\|^2$. Now $z$ enters the tilt with a minus sign, so the centre is $x_1+\lambda/\beta$: $$f_{2,k}(z)=\gamma\|z\|_1+\tfrac{\beta}{2}\|z-y\|^2+\text{const},\qquad y=x_1^{(k+1)}+\lambda^{(k)}/\beta.$$ It splits by entries, so by A1: $\boxed{x_{2,i}^{(k+1)}=S_{\gamma/\beta}(y_i)}$.
- Step 3. $\boxed{\lambda^{(k+1)}=\lambda^{(k)}+\beta\,(x_1^{(k+1)}-x_2^{(k+1)})}$.
So one round = one linear solve + one soft thresholding + one price update. Each is cheap, which is the whole point.
E. Example 2 from his notes: adding a constraint
E1. How to put a constraint inside a function: the indicator
To force $x\in C$ (say a box), define a function that is free inside $C$ and infinitely expensive outside:
$$P(x)=\begin{cases}0,&x\in C\\+\infty,&x\notin C\end{cases}$$Adding $P(x)$ to the cost means no minimiser will ever pick $x\notin C$. So "$\min f(x)$ s.t. $x\in C$" = "$\min f(x)+P(x)$". This is why ADMM allows $f_i$ to take the value $+\infty$.
And the step it creates is easy: $\arg\min_v\ P(v)+\frac{\beta}{2}\|v-y\|^2$ = the point of $C$ nearest $y$ = $\Pi_C(y)$ (A1 cousin). It's unique when $C$ is nonempty, closed and convex.
Why clipping is right (he said you can prove it with the Ch 6 first-order condition, taught in M2, section C): per coordinate, minimise $(v-y)^2$ on $[0,B]$. If $y$ is inside, $v=y$ (derivative zero). If $y>B$, the function decreases all the way to $B$, so $v=B$ (the active bound). Same at 0.
E2. The problem: LASSO + constraint, with two copies
$\min_x \|Mx-b\|^2+\gamma\|x\|_1+P(x)$. Careful: no ½ on the data term here. There are now three pieces. Use two copies of $x$ inside the second block: $x_2=\begin{bmatrix}u\\v\end{bmatrix}$, with $u$ carrying the $\|\cdot\|_1$ term and $v$ carrying the constraint.
- Split. $f_1(x_1)=\|Mx_1-b\|^2$, $f_2(u,v)=\gamma\|u\|_1+P(v)$, constraints $x_1-u=0$ and $x_1-v=0$, i.e. $\begin{bmatrix}x_1\\x_1\end{bmatrix}-x_2=0$. In the general form: $A_1=\begin{bmatrix}I\\I\end{bmatrix}$, $A_2=-I_{2n}$, linking constant $=0$. (The letter $b$ here is only the data vector in $\|Mx-b\|^2$.) Prices $\lambda=\begin{bmatrix}\lambda_u\\\lambda_v\end{bmatrix}$, one per constraint.
Why it's still two-block ADMM: there are only two blocks, $x_1$ and $x_2=(u,v)$. $f_2$ happens to split into a $u$-part and a $v$-part, so step 2 breaks into two small independent problems, but it's still one step. - $L_A$ $=\|Mx_1-b\|^2+\gamma\|u\|_1+P(v)+\lambda_u^T(x_1-u)+\lambda_v^T(x_1-v)+\frac{\beta}{2}\|x_1-u\|^2+\frac{\beta}{2}\|x_1-v\|^2$.
- Step 1 ($x_1$). Complete the square in each pair: centres $a_k=u^{(k)}-\lambda_u^{(k)}/\beta$ and $c_k=v^{(k)}-\lambda_v^{(k)}/\beta$: $f_{1,k}(z)=\|Mz-b\|^2+\frac{\beta}{2}\|z-a_k\|^2+\frac{\beta}{2}\|z-c_k\|^2+$ const. Gradient (note the 2: no ½ on the data term): $$2M^T(Mz-b)+\beta(z-a_k)+\beta(z-c_k)=0\ \Longrightarrow\ \boxed{(M^TM+\beta I)\,z=M^Tb+\tfrac{\beta}{2}(a_k+c_k)}$$
- Step 2 ($u$ and $v$, independently). Centres $y_u=x_1^{(k+1)}+\lambda_u^{(k)}/\beta$, $y_v=x_1^{(k+1)}+\lambda_v^{(k)}/\beta$.
- $u$: $\gamma\|u\|_1+\frac{\beta}{2}\|u-y_u\|^2$ → $\boxed{u^{(k+1)}=S_{\gamma/\beta}(y_u)}$ entrywise.
- $v$: $P(v)+\frac{\beta}{2}\|v-y_v\|^2$ → $\boxed{v^{(k+1)}=\Pi_C(y_v)}$ (clip for a box).
- Step 3. $\lambda_u^{(k+1)}=\lambda_u^{(k)}+\beta\big(x_1^{(k+1)}-u^{(k+1)}\big)$, $\ \lambda_v^{(k+1)}=\lambda_v^{(k)}+\beta\big(x_1^{(k+1)}-v^{(k+1)}\big)$.
- Writing $+\beta(a_k+c_k)$ instead of $+\frac{\beta}{2}(a_k+c_k)$. Redo the gradient every time; never copy the LASSO formula over.
- With a ½ on the data term the system would be $(M^TM+2\beta I)z=M^Tb+\beta(a_k+c_k)$. The ½ changes the answer.
F. The exam recipe, plus the bits of theory he mentioned
- Split: name $f_1$, $f_2$ and the linking constraint ($A_1$, $A_2$, $b$). Put constraints into $f_2$ as an indicator. Say why the split is equivalent.
- Write $L_A$ in full.
- Step 1: keep only the $x_1$-terms → complete the square (state the centre) → smooth: gradient = 0 → linear system (say why its matrix is PD).
- Step 2: keep only the $x_2$-terms (new $x_1$, old $\lambda$) → complete the square → recognise the easy problem: $\|\cdot\|_1$ → soft threshold $S_{\gamma/\beta}$; indicator → projection; separable → say "componentwise".
- Step 3: $\lambda\leftarrow\lambda+\beta\times$(your residual $A_1x_1+A_2x_2-b$).
- Box the three final formulas.
When the linking matrix is not $I$ (e.g. $Dx_1-x_2=0$ to handle $\|Dx\|_1$): in step 1 don't complete the square, just differentiate. The gradient of $\lambda^T(Dz-w)+\frac{\beta}{2}\|Dz-w\|^2$ is $D^T\lambda+\beta D^T(Dz-w)$. Practice Q9 does this.
When $f_1$ is not smooth (e.g. it's the $\|\cdot\|_1$ or indicator piece): step 1 is then solved the same way as step 2. Complete the square and use soft thresholding or projection instead of "gradient = 0". The recipe is symmetric: whichever block holds the corner or the constraint gets the A1 tool.
Theory he touched on (likely MCQ / short answer)
- Primal recovery (links to Ch 7; taught in full in M3, section I). "Strong duality" means the best primal cost $p^*$ equals the best dual value $d^*$ (M3 section G). If strong duality holds with both optima attained and $\lambda^*$ is a dual optimum, then every primal optimum minimises the ordinary Lagrangian $L(\cdot,\lambda^*)$. But not every minimiser of $L(\cdot,\lambda^*)$ is feasible. A feasible minimiser is primal optimal, and if the minimiser is unique it is the primal optimum. A sufficient condition for uniqueness: the objective is strictly convex in all the variables being minimised. In the split form that means $f_1$ strictly convex in $x_1$ and $f_2$ strictly convex in $x_2$ (the $\lambda$-term is linear, so it can't help or hurt). His notes phrase it as "strict convexity of the full objective".
- Why augment: plain dual ascent can converge slowly, and its $x$-steps may be unbounded or not unique. The penalty fixes both. (Section B2 showed why the penalty alone isn't enough: you need the price too.)
- Why alternate: each block step is easy (a linear solve, a soft threshold, a projection), while the joint step is not.
- Convergence: under standard assumptions (convex $f_i$; the Lagrangian has a saddle point, i.e. a pair $(x^*,\lambda^*)$ where $x^*$ minimises $L(\cdot,\lambda^*)$ and $\lambda^*$ maximises $L(x^*,\cdot)$, which for convex problems is the same as "primal and dual optima exist with zero gap"; sub-steps solved exactly, fixed $\beta$), the residual → 0, the cost → optimal, and $\lambda$ → a dual optimum. He said he won't ask this.
What the professor said about this
In ADMM we can ask interesting problem… I want hard problem from ADMM for the final exam
Ch 9 lec 1 [57:30] → expect a full ADMM derivation as a big question.In the exam, the f1, f2, I can give different examples that can be minimized one step… I will ask you to derive these steps… exact formula for these steps
Ch 10 lec 1 [24:00] → "here are $f_1, f_2$: derive the 3 updates in closed form". Practise new pairs (below).For the exam point of view, the basic three-step scheme… you should be able to write the iteration… That's all for the exam
Ch 10 lec 1 [31:30]This convergence condition, I'm not going to ask you
Ch 10 lec 1 [31:00]- Completing the square:
you should be able to do it
Ch 10 lec 1 [38:00]; verify by expanding:These are the exercises you should do
Ch 10 lec 2 [13:00] This topic is important for the final exam
Ch 10 lec 2 [00:30]; the constraint exampleis also important… makes your understanding for ADMM complete
[03:00]In the exam, I will not give some arbitrary C
: a box → projection is clipping Ch 10 lec 2 [16:00], provable with the Ch 6 first-order condition [17:00]- Soft thresholding
is important because… handling non-differential cost function using graphical arguments
Ch 10 lec 2 [25:30] → be able to reproduce the argument in A1. Exam point of view, syllabus is over
Ch 10 lec 2 [17:30] → ADMM (§10.6–10.7) is all of Ch 10.
Practice (try first, then open the answer)
No past paper has had an ADMM question yet, so these are new, built from the class examples. Q1–Q6 are quick checks; Q7–Q13 are exam level. Do Q7, Q9 and Q11 fully on paper.
For fixed $\lambda$, $\beta>0$ and $w$, the function $\lambda^T(z-w)+\frac{\beta}{2}\|z-w\|^2$ equals $\frac{\beta}{2}\|z-a\|^2+$ const with
- (a) $a=w+\lambda/\beta$
- (b) $a=w-\beta\lambda$
- (c) $a=w-\lambda/\beta$
- (d) $a=w-\lambda$
Show answer
(c). Expanding $\frac{\beta}{2}\|z-w+\lambda/\beta\|^2$ gives $\frac{\beta}{2}\|z-w\|^2+\lambda^T(z-w)+\frac{\|\lambda\|^2}{2\beta}$. (a) is the centre when the tilt is $\lambda^T(w-z)$, which is the step-2 situation. (b) and (d) have the wrong scaling: the shift must be $\lambda/\beta$ so that $\beta\times$shift $=\lambda$.
With $\gamma=1$, $\beta=2$: $S_{\gamma/\beta}$ applied entrywise to $y=(1.2,\,-0.3,\,-2,\,0.5)$ gives
- (a) $(0.2,\,0,\,-1,\,0)$
- (b) $(0.7,\,0,\,-1.5,\,0)$
- (c) $(0.7,\,-0.3,\,-1.5,\,0)$
- (d) $(0.7,\,0.2,\,-2.5,\,0)$
Show answer
(b). The threshold is $\gamma/\beta=0.5$. $1.2\to0.7$; $|-0.3|\le0.5\to0$; $-2\to-1.5$; $|0.5|\le0.5\to0$. (a) used threshold $\gamma=1$. (c) forgot to zero the small entry. (d) pushes away from zero, the wrong direction.
In one ADMM round, the $x_2$-update minimises
- (a) $L_A(x_1^{(k+1)},x_2,\lambda^{(k)})$
- (b) $L_A(x_1^{(k)},x_2,\lambda^{(k)})$
- (c) $L_A(x_1^{(k+1)},x_2,\lambda^{(k+1)})$
- (d) $L(x_1^{(k+1)},x_2,\lambda^{(k)})$ (the ordinary Lagrangian)
Show answer
(a). New $x_1$, old $\lambda$. (b) uses the stale $x_1$ (that would be a parallel, Jacobi-style update, not ADMM). (c): $\lambda^{(k+1)}$ hasn't been computed yet. (d) drops the penalty, so the step may be unbounded or not unique.
Let $C=[0,2]^3$ and $P$ its indicator. Then $\arg\min_v\ P(v)+\frac{\beta}{2}\|v-y\|^2$ for $y=(-1,\,0.4,\,3)$ is
- (a) $(0,\,0.4,\,3)$
- (b) $(-1,\,0.4,\,2)$
- (c) depends on $\beta$
- (d) $(0,\,0.4,\,2)$
Show answer
(d). $P$ forces $v\in C$, so this is "nearest point of the box" = clip each entry to $[0,2]$. $\beta>0$ only scales the objective, so it doesn't move the minimiser. (a) and (b) clip only one side.
For $\min\|Mx-b\|^2+\gamma\|x\|_1+P(x)$ (no ½ on the data term), split with $x_2=(u,v)$ and $\begin{bmatrix}x_1\\x_1\end{bmatrix}=x_2$. With centres $a_k=u^{(k)}-\lambda_u^{(k)}/\beta$, $c_k=v^{(k)}-\lambda_v^{(k)}/\beta$, the $x_1$-update solves
- (a) $(M^TM+\beta I)z=M^Tb+\beta(a_k+c_k)$
- (b) $(M^TM+2\beta I)z=M^Tb+\beta(a_k+c_k)$
- (c) $(M^TM+\beta I)z=M^Tb+\frac{\beta}{2}(a_k+c_k)$
- (d) $(2M^TM+\beta I)z=2M^Tb+\beta(a_k+c_k)$
Show answer
(c). Gradient: $2M^T(Mz-b)+\beta(z-a_k)+\beta(z-c_k)=0$, so $(2M^TM+2\beta I)z=2M^Tb+\beta(a_k+c_k)$; divide by 2. (d) forgot there are two penalty terms. (b) is right only if the data term had a ½. (a) mixes the two.
Assume strong duality with both optima attained, and let $\lambda^*$ be dual optimal. Which statement is correct in general?
- (a) Every minimiser of $L(\cdot,\lambda^*)$ is primal optimal.
- (b) If $L(\cdot,\lambda^*)$ has a unique minimiser, it is primal optimal.
- (c) Primal recovery needs both $f_1$ and $f_2$ to be differentiable.
- (d) A minimiser of $L(\cdot,\lambda^*)$ is always feasible.
Show answer
(b). Every primal optimum minimises $L(\cdot,\lambda^*)$; if that minimiser is unique, the primal optimum must be it. (a) and (d) are false: for $\min x$ s.t. $-x\le0$ (Ch 7), $L(\cdot,\mu^*)$ is constant, so every $x$ minimises it, including infeasible ones. (c) is irrelevant: the result uses only optimality and attainment.
Box-constrained least squares: $\min_x \frac12\|Mx-b\|^2$ s.t. $x\in[0,B]^n$. (a) Write it as two-block ADMM (state $f_1$, $f_2$, $A_1$, $A_2$, $b$). (b) Write $L_A$. (c) Derive closed-form $x_1$-, $x_2$- and $\lambda$-updates.
Hint
Put the constraint into $f_2$ as an indicator (E1). Step 2 is then a projection.
Show answer
- (a) $f_1(x_1)=\frac12\|Mx_1-b\|^2$, $f_2(x_2)=P(x_2)$ = indicator of $C=[0,B]^n$. Constraint $x_1-x_2=0$: $A_1=I$, $A_2=-I$, $b=0$. Equivalent since $x_1=x_2\in C$.
- (b) $L_A=\frac12\|Mx_1-b\|^2+P(x_2)+\lambda^T(x_1-x_2)+\frac{\beta}{2}\|x_1-x_2\|^2$.
- (c) $x_1$: $\frac12\|Mz-b\|^2+\frac{\beta}{2}\|z-a_k\|^2+$ const with $a_k=x_2^{(k)}-\lambda^{(k)}/\beta$. Gradient $=0$: $\boxed{(M^TM+\beta I)x_1^{(k+1)}=M^Tb+\beta x_2^{(k)}-\lambda^{(k)}}$ (PD matrix, so unique).
- $x_2$: $P(z)+\frac{\beta}{2}\|z-y\|^2+$ const with $y=x_1^{(k+1)}+\lambda^{(k)}/\beta$, so $\boxed{x_{2,i}^{(k+1)}=\min\big(\max(y_i,0),B\big)}$ (clip).
- $\boxed{\lambda^{(k+1)}=\lambda^{(k)}+\beta(x_1^{(k+1)}-x_2^{(k+1)})}$.
Checked numerically: the iteration converges to the same answer as a bounded least-squares solver.
Redo section C's table yourself without looking: $\min_x \frac12(x-3)^2+|x|$, $\beta=1$, $x_2^{(0)}=0$, $\lambda^{(0)}=0$, three rounds. Then explain in one sentence why $\lambda$ ends at 1.
Show answer
Rounds: $(x_1,x_2,\lambda)=(1.5,0.5,1)$, $(1.25,1.25,1)$, $(1.625,1.625,1)$, heading to $x^*=2$. At the answer, step 1's condition $(x-3)+\lambda=0$ with $x=2$ gives $\lambda=1$: the slope of $|x|$ at $x=2$, i.e. the force the $|x|$ piece exerts.
Let $D\in\mathbb{R}^{(n-1)\times n}$ be the difference matrix $(Dx)_i=x_{i+1}-x_i$. Consider $\min_x \frac12\|x-c\|^2+\gamma\|Dx\|_1$ ("total variation" denoising). Split as $f_1(x_1)=\frac12\|x_1-c\|^2$, $f_2(x_2)=\gamma\|x_2\|_1$, $Dx_1-x_2=0$. Derive all three updates.
Hint
Here $A_1=D$. In step 1 differentiate directly: the gradient of $\frac{\beta}{2}\|Dz-w\|^2$ is $\beta D^T(Dz-w)$.
Show answer
- $L_A=\frac12\|x_1-c\|^2+\gamma\|x_2\|_1+\lambda^T(Dx_1-x_2)+\frac{\beta}{2}\|Dx_1-x_2\|^2$.
- $x_1$: the gradient $(z-c)+D^T\lambda^{(k)}+\beta D^T(Dz-x_2^{(k)})=0$ gives $$\boxed{(I+\beta D^TD)\,x_1^{(k+1)}=c+D^T\big(\beta x_2^{(k)}-\lambda^{(k)}\big)}$$ ($I+\beta D^TD$ is PD, so unique).
- $x_2$: $\gamma\|z\|_1+\frac{\beta}{2}\|z-y\|^2+$ const with $y=Dx_1^{(k+1)}+\lambda^{(k)}/\beta$, so $\boxed{x_2^{(k+1)}=S_{\gamma/\beta}\big(Dx_1^{(k+1)}+\lambda^{(k)}/\beta\big)}$.
- $\boxed{\lambda^{(k+1)}=\lambda^{(k)}+\beta\big(Dx_1^{(k+1)}-x_2^{(k+1)}\big)}$.
Why split this way: $\|Dx\|_1$ doesn't separate into entries of $x$, so soft thresholding can't be applied to $x$ directly. Giving $Dx$ its own variable makes it separable.
Suppose $f_2(x_2)=\gamma\|x_2\|_1+\frac{\varepsilon}{2}\|x_2\|^2$ ("elastic net"), with the LASSO split $x_1-x_2=0$. Show that the $x_2$-update is $x_2^{(k+1)}=S_{\gamma/(\varepsilon+\beta)}\!\Big(\frac{\beta}{\varepsilon+\beta}\,y\Big)$, where $y=x_1^{(k+1)}+\lambda^{(k)}/\beta$.
Show answer
Per entry: $\gamma|z|+\frac{\varepsilon}{2}z^2+\frac{\beta}{2}(z-y)^2$. The two squares merge: $\frac{\varepsilon}{2}z^2+\frac{\beta}{2}(z-y)^2=\frac{\varepsilon+\beta}{2}\big(z-\frac{\beta y}{\varepsilon+\beta}\big)^2+$ const. So it's $\gamma|z|+\frac{c}{2}(z-\tilde y)^2$ with $c=\varepsilon+\beta$, $\tilde y=\beta y/(\varepsilon+\beta)$, and the threshold rule from A1 gives $S_{\gamma/c}(\tilde y)$. (Check: $\gamma=1,\varepsilon=2,\beta=1,y=4$ → $\tilde y=4/3$, threshold $1/3$, answer $1$ ✓.)
$\min_x \frac12\|Mx-b\|^2+\gamma\,\mathbf{1}^Tx$ s.t. $x\ge0$. Use $f_1(x_1)=\frac12\|Mx_1-b\|^2$, $f_2(x_2)=\gamma\mathbf{1}^Tx_2+P_{\ge0}(x_2)$, $x_1-x_2=0$. Derive the updates. (On $x\ge0$, $\gamma\mathbf{1}^Tx=\gamma\|x\|_1$, so this is non-negative LASSO.)
Show answer
- $x_1$: same as LASSO: $(M^TM+\beta I)x_1^{(k+1)}=M^Tb+\beta x_2^{(k)}-\lambda^{(k)}$.
- $x_2$: per entry, $\min_{z\ge0}\ \gamma z+\frac{\beta}{2}(z-y_i)^2$ with $y=x_1^{(k+1)}+\lambda^{(k)}/\beta$. The unconstrained minimiser is $\hat z=y_i-\gamma/\beta$. If it's $\ge0$, take it; otherwise the parabola only rises on $[0,\infty)$, so take 0 (the same argument as A1): $\boxed{x_{2,i}^{(k+1)}=\max(y_i-\gamma/\beta,\,0)}$, a one-sided soft threshold.
- $\lambda^{(k+1)}=\lambda^{(k)}+\beta(x_1^{(k+1)}-x_2^{(k+1)})$.
Also correct: Example 2's two-copy split ($u$ for the linear term, $v$ for the constraint). Both are valid two-block ADMMs; this one is shorter.
Without subgradients, show that $\arg\min_z\ \tau|z|+\frac12(z-y)^2=S_\tau(y)$ for $\tau>0$.
Show answer
Follow A1: (i) for $y>0$ the function increases for $z<0$ and for $z>y$, so $z^*\in[0,y]$; (ii) so $z^*$ minimises the smooth $\tau z+\frac12(z-y)^2$ over $z\ge0$; (iii) the unconstrained critical point is $y-\tau$: if it's $\ge0$ it's the answer, otherwise the function rises on $[0,\infty)$ and the answer is 0; (iv) mirror for $y<0$; (v) combine into $\operatorname{sign}(y)\max(|y|-\tau,0)$. Draw the graph with its dead zone $[-\tau,\tau]$.
Derive the complete ADMM iteration for $\min_x \|Mx-b\|^2+\gamma\|x\|_1$ s.t. $0\le x_i\le B$ using the two-copy split $x_2=(u,v)$. Explain why it is two-block even though $x_2\in\mathbb{R}^{2n}$.
Show answer
- $f_1(x_1)=\|Mx_1-b\|^2$, $f_2(u,v)=\gamma\|u\|_1+P_{[0,B]^n}(v)$, constraints $x_1-u=0$ and $x_1-v=0$. Multipliers $\lambda_u,\lambda_v$.
- $x_1$: $(M^TM+\beta I)x_1^{(k+1)}=M^Tb+\frac{\beta}{2}\big(u^{(k)}-\lambda_u^{(k)}/\beta+v^{(k)}-\lambda_v^{(k)}/\beta\big)$.
- $u^{(k+1)}=S_{\gamma/\beta}\big(x_1^{(k+1)}+\lambda_u^{(k)}/\beta\big)$; $v^{(k+1)}_i=\min\big(\max(x_{1,i}^{(k+1)}+\lambda_{v,i}^{(k)}/\beta,0),B\big)$.
- $\lambda_u^{(k+1)}=\lambda_u^{(k)}+\beta(x_1^{(k+1)}-u^{(k+1)})$, $\lambda_v^{(k+1)}=\lambda_v^{(k)}+\beta(x_1^{(k+1)}-v^{(k+1)})$.
- Two-block: there are exactly two blocks, $x_1$ and $x_2=(u,v)$, each minimised once per round. $f_2$ separates into $u$ and $v$ parts, so step 2 splits into two independent problems. Three-block ADMM would update $x_1$, $u$, $v$ one after another with three separate functions, which is a different method.
Self-test (no looking)
In one sentence: why do we need both the penalty and the price $\lambda$?
Show answer
The penalty alone leaves a gap of size about $1/\beta$ between the copies; the price learns the exact force needed so the gap goes to zero, while the penalty keeps each step well-behaved.
Write $L_A$ for the general two-block problem.
Show answer
$f_1(x_1)+f_2(x_2)+\lambda^T(A_1x_1+A_2x_2-b)+\frac{\beta}{2}\|A_1x_1+A_2x_2-b\|^2$.
Write the three ADMM steps. Which iterates does each one use?
Show answer
$x_1$: argmin of $L_A(\cdot,x_2^{(k)},\lambda^{(k)})$; $x_2$: argmin of $L_A(x_1^{(k+1)},\cdot,\lambda^{(k)})$; $\lambda^{(k+1)}=\lambda^{(k)}+\beta(A_1x_1^{(k+1)}+A_2x_2^{(k+1)}-b)$.
$S_\tau(t)$ in three cases. What is the threshold for $\gamma|z|+\frac{\beta}{2}(z-y)^2$?
Show answer
$t-\tau$ ($t>\tau$); 0 ($|t|\le\tau$); $t+\tau$ ($t<-\tau$). The threshold is $\gamma/\beta$.
LASSO: the three closed-form updates.
Show answer
$(M^TM+\beta I)x_1=M^Tb+\beta x_2^{(k)}-\lambda^{(k)}$; $x_2=S_{\gamma/\beta}(x_1^{(k+1)}+\lambda^{(k)}/\beta)$; $\lambda\leftarrow\lambda+\beta(x_1-x_2)$.
How do you write "$x\in C$" inside an $f_i$, and what does the corresponding step become for a box?
Show answer
Use the indicator $P$ (0 on $C$, $+\infty$ outside). The step becomes the projection onto $C$; for a box that's clipping each entry. It's unique because $C$ is nonempty, closed and convex.
When is a minimiser of $L(\cdot,\lambda^*)$ guaranteed to be primal optimal?
Show answer
Under strong duality with attainment: if it is feasible, or if it is the unique minimiser (e.g. when the full objective is strictly convex in all its variables).
Summary card (for revision; the formula sheet copies this)
- Problem: $\min f_1(x_1)+f_2(x_2)$ s.t. $A(x_1,x_2)=A_1x_1+A_2x_2-b=0$. Each piece gets its own copy; only the constraint links them.
- Augmented Lagrangian ($\beta>0$ fixed): $L_A=f_1(x_1)+f_2(x_2)+\lambda^TA(x_1,x_2)+\frac{\beta}{2}\|A(x_1,x_2)\|^2$ (price + penalty).
- One round: $x_1^{(k+1)}=\arg\min L_A(\cdot,x_2^{(k)},\lambda^{(k)})$; $x_2^{(k+1)}=\arg\min L_A(x_1^{(k+1)},\cdot,\lambda^{(k)})$; $\lambda^{(k+1)}=\lambda^{(k)}+\beta A(x_1^{(k+1)},x_2^{(k+1)})$. New $x_1$, old $\lambda$ in step 2.
- Completing the square: $\lambda^T(z-c)+\frac{\beta}{2}\|z-c\|^2=\frac{\beta}{2}\|z-(c-\lambda/\beta)\|^2+$ const. With $\lambda^T(c-z)$ the centre is $c+\lambda/\beta$.
- Soft threshold: $\arg\min_z\gamma|z|+\frac{\beta}{2}(z-y)^2=S_{\gamma/\beta}(y)$, $S_\tau(t)=\operatorname{sign}(t)\max(|t|-\tau,0)$.
- Indicator → projection: $\arg\min_v P_C(v)+\frac{\beta}{2}\|v-y\|^2=\Pi_C(y)$; box = clip, orthant = $\max(y_i,0)$.
- LASSO ($\frac12\|Mx-b\|^2+\gamma\|x\|_1$, split $x_1=x_2$): $(M^TM+\beta I)x_1=M^Tb+\beta x_2^{(k)}-\lambda^{(k)}$; $x_2=S_{\gamma/\beta}(x_1^{(k+1)}+\lambda^{(k)}/\beta)$; $\lambda\leftarrow\lambda+\beta(x_1-x_2)$.
- Example 2 ($\|Mx-b\|^2$ with no ½, $+\gamma\|x\|_1+P_C(x)$; two copies $u,v$; prices $\lambda_u,\lambda_v$): with $a_k=u^{(k)}-\lambda_u^{(k)}/\beta$, $c_k=v^{(k)}-\lambda_v^{(k)}/\beta$: $(M^TM+\beta I)x_1^{(k+1)}=M^Tb+\frac{\beta}{2}(a_k+c_k)$; with $y_u=x_1^{(k+1)}+\lambda_u^{(k)}/\beta$, $y_v=x_1^{(k+1)}+\lambda_v^{(k)}/\beta$: $u=S_{\gamma/\beta}(y_u)$, $v=\Pi_C(y_v)$; then $\lambda_u\mathrel{+}=\beta(x_1-u)$, $\lambda_v\mathrel{+}=\beta(x_1-v)$.
- Price update sign: $\lambda\leftarrow\lambda+\beta\times$(whatever $\lambda$ multiplies in $L_A$).