Foundations to Frontier
Tests
A. Mathematical Foundations › A6 Optimization › Convex optimization

The Alternating Direction Method of Multipliers (ADMM)

ADMM splits a hard problem into easy pieces, solves them one at a time, and reconciles them with prices (dual variables). It combines the decomposability of dual ascent with the robustness of the augmented Lagrangian, and it powers OSQP (the QP solver inside many MPC controllers), large-scale lasso and distributed estimation. You will derive ADMM from the augmented Lagrangian, implement it for the lasso, monitor primal and dual residuals, tune the penalty ρ, and let five robots agree on a map estimate without sharing raw data.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Divide the work, then agree

Two teams each solve their half of a job their own way. A coordinator compares the results. Where they disagree, the coordinator sets a “penalty price” for disagreement and sends both teams back to redo their halves. After a few rounds the teams agree, and the agreed answer solves the whole job.

That’s ADMM. Each half is easy alone (a linear solve, a simple shrink), and the price makes the halves consistent.

ADMM: split, solve the easy pieces, and reconcile with prices
1e-101e-61e-2primal ‖x − z‖dual ρ‖Δz‖iterations to 1e-6 (log) vs log₁₀ ρ-202
ρ = 1.000: both residuals below 10⁻⁶ after 70 iterations · best ρ in the sweep: 10^0 (70 iterations)
Each ADMM iteration solves a ridge-like linear system for x (factored once), soft-thresholds for z, and updates the scaled price u by the disagreement x − z. A small ρ barely penalizes disagreement, so the primal residual decays slowly. A large ρ glues x to z but takes tiny steps in the objective, so the dual residual lingers. Practical solvers (OSQP, SCS) adapt ρ to balance the two residuals.
Why engineers care

OSQP, the QP solver used in many robot and drone MPC stacks, is ADMM. Large imaging and estimation problems, multi-robot mapping and federated learning use ADMM to split data or variables across processors or agents, communicating only small summaries.

📝 Quick check (Level 0)
0/3 answered
  1. 1. ADMM's main idea is to…
  2. 2. Disagreement between the pieces is handled by…
  3. 3. OSQP, a popular MPC solver, is based on…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

Problem form

min⁡x,z f(x)+g(z)s.t.Ax+Bz=c\min_{x, z}\ f(x) + g(z)\quad\text{s.t.}\quad Ax + Bz = c

For example, the lasso min⁡12∥Ax−b∥2+λ∥x∥1\min\frac12\|Ax - b\|^2 + \lambda\|x\|_1 becomes f(x)=12∥Ax−b∥2f(x) = \frac12\|Ax - b\|^2, g(z)=λ∥z∥1g(z) = \lambda\|z\|_1, with the constraint x−z=0x - z = 0.

Scaled-form ADMM (for x − z = 0)

xk+1=arg⁡min⁡x f(x)+ρ2∥x−zk+uk∥2zk+1=prox⁡g/ρ(xk+1+uk)uk+1=uk+xk+1−zk+1\begin{aligned}x^{k+1} &= \arg\min_x\ f(x) + \tfrac\rho2\|x - z^k + u^k\|^2\\ z^{k+1} &= \operatorname{prox}_{g/\rho}(x^{k+1} + u^k)\\ u^{k+1} &= u^k + x^{k+1} - z^{k+1}\end{aligned}

Here uu is the running sum of disagreements (a scaled price), and ρ>0\rho > 0 is the penalty. For the lasso, the x-step is a ridge solve (A⊤A+ρI)−1(A⊤b+ρ(z−u))(A^\top A + \rho I)^{-1}(A^\top b + \rho(z - u)), factored once, and the z-step is soft-thresholding at λ/ρ\lambda/\rho.

📝 Quick check (Level 1)
0/3 answered
  1. 1. In scaled ADMM, u accumulates…
  2. 2. For the lasso, the z-update is…
  3. 3. The x-update's matrix (AᵀA + ρI) can be factored…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.

Where ADMM comes from

The augmented Lagrangian Lρ(x,z,y)=f(x)+g(z)+y⊤(Ax+Bz−c)+ρ2∥Ax+Bz−c∥2L_\rho(x, z, y) = f(x) + g(z) + y^\top(Ax + Bz - c) + \frac\rho2\|Ax + Bz - c\|^2 adds a quadratic penalty to the Lagrangian. The method of multipliers minimizes it jointly in (x,z)(x, z), which is hard because the penalty couples them. ADMM minimizes over xx, then over zz (one Gauss–Seidel pass), then takes a dual ascent step y←y+ρ(Ax+Bz−c)y\leftarrow y + \rho(Ax + Bz - c). Scaling u=y/ρu = y/\rho gives the form above.

Stopping and tuning

  • Primal residual rk=xk−zkr^k = x^k - z^k measures feasibility.
  • Dual residual sk=ρ(zk−zk−1)s^k = \rho(z^k - z^{k-1}) measures optimality.
  • Stop when both are below tolerance.
  • ρ trade-off: small ρ makes the primal residual decay slowly. Large ρ makes the dual residual slow. Adaptive rule: increase ρ if ∥r∥≫∥s∥\|r\|\gg\|s\| and decrease it if ∥s∥≫∥r∥\|s\|\gg\|r\| (rescaling uu accordingly).
  • Convergence: for closed proper convex f,gf, g with a saddle point, ADMM converges for any ρ>0\rho > 0 at an O(1/k)O(1/k) ergodic rate, and linearly under strong convexity. It reaches modest accuracy fast, then improves slowly.

Consensus and sharing

Global consensus: min⁡∑ifi(xi)\min\sum_if_i(x_i) s.t. xi=zx_i = z. Each agent solves its own xix_i-subproblem with private data, then the zz-update is an average of xi+uix_i + u_i. Only averages are communicated. This is the template for distributed estimation, multi-robot SLAM and federated learning.

🐍 Exercise 1: ADMM for the lasso
Implement scaled ADMM for the lasso with primal and dual residuals. Check agreement with a FISTA reference, and compare iteration counts for ρ = 0.01, 1 and 100.
📝 Quick check (Level 2)
0/3 answered
  1. 1. The dual residual in ADMM (x = z) is…
  2. 2. If the primal residual is much larger than the dual, you should…
  3. 3. In consensus ADMM, the z-update is…

Level 3: Advanced

★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.

Deriving the lasso updates

The x-step minimizes 12∥Ax−b∥2+ρ2∥x−z+u∥2\frac12\|Ax - b\|^2 + \frac\rho2\|x - z + u\|^2. Setting the gradient A⊤(Ax−b)+ρ(x−z+u)=0A^\top(Ax - b) + \rho(x - z + u) = 0 gives x=(A⊤A+ρI)−1(A⊤b+ρ(z−u))x = (A^\top A + \rho I)^{-1}(A^\top b + \rho(z - u)). The z-step minimizes λ∥z∥1+ρ2∥z−(x+u)∥2\lambda\|z\|_1 + \frac\rho2\|z - (x + u)\|^2, which is prox⁡(λ/ρ)∥⋅∥1(x+u)=Sλ/ρ(x+u)\operatorname{prox}_{(\lambda/\rho)\|\cdot\|_1}(x + u) = S_{\lambda/\rho}(x + u). ∎

Why consensus averages

The z-step minimizes ∑iρ2∥xi−z+ui∥2\sum_i\frac\rho2\|x_i - z + u_i\|^2 (with g=0g = 0). That’s a sum of squared distances, minimized at the mean of xi+uix_i + u_i. ∎ After the first iteration the uiu_i average to zero, so zz is just the mean of the xix_i.

Optimality at convergence

If r→0r\to0 and s→0s\to0, the fixed point satisfies 0∈∂f(x)+y0\in\partial f(x) + y and 0∈∂g(z)−y0\in\partial g(z) - y with x=zx = z, so 0∈∂f(x)+∂g(x)0\in\partial f(x) + \partial g(x). That’s the optimality condition of the original problem. The scaled dual uu converges to y⋆/ρy^\star/\rho. ∎

Exercise 3.1: One x-update for f(x) = ½(x − 3)²

With ρ=1\rho = 1, z=1z = 1, u=0u = 0: minimize 12(x−3)2+12(x−1)2\frac12(x - 3)^2 + \frac12(x - 1)^2, giving x=2x = 2. In general, x=(a+ρ(z−u))/(1+ρ)x = (a + \rho(z - u))/(1 + \rho).

📝 Quick check (Level 3)
0/3 answered
  1. 1. ADMM converges for convex f, g…
  2. 2. At convergence, ADMM's fixed point satisfies…
  3. 3. One x-update for f = ½(x − 3)², ρ = 1, z = 1, u = 0 gives x =

Level 4: Expert

★★★★★ Expert⏱ 40 minResearchers: original papers and open problems.

Five robots, one map, no shared raw data

Five robots each observe a different subset of landmark coordinates through their own sensors. No single robot can solve for all 12 unknowns, since each robot’s local system is rank-deficient. With consensus ADMM, each robot solves a small local regularized least-squares problem, broadcasts its estimate, and receives the average. After a few hundred rounds all robots hold the centralized least-squares solution, even though no raw measurements were ever pooled. The same pattern runs distributed multi-robot SLAM and federated learning.

🐍 Exercise 2 (research): consensus ADMM across robots
Implement consensus ADMM for distributed least squares. Show that agents with rank-deficient local data converge to the centralized solution.

ADMM in AI, robotics and aerospace

  • OSQP solves the QPs of MPC for drones, legged robots and autonomous cars, with warm starts and adaptive ρ (Stellato et al., 2020).
  • Distributed multi-robot estimation and planning uses ADMM-based consensus (Choudhary et al., 2017, distributed pose-graph optimization; Halsted et al., 2021, survey).
  • Large-scale imaging and signal processing, such as total-variation denoising and compressed sensing (Boyd et al., 2011).
  • Federated learning: FedADMM-style methods train on data that stays on devices (Zhou and Li, 2023).

References

  1. S. Boyd, N. Parikh, E. Chu, B. Peleato, J. Eckstein (2011). “Distributed optimization and statistical learning via the alternating direction method of multipliers.” Foundations and Trends in Machine Learning, 3(1).
  2. D. Gabay, B. Mercier (1976). “A dual algorithm for the solution of nonlinear variational problems via finite element approximation.” Computers & Mathematics with Applications, 2(1).
  3. R. Glowinski, A. Marrocco (1975). “Sur l’approximation… par pénalisation-dualité d’une classe de problèmes de Dirichlet non linéaires.” RAIRO, 9.
  4. J. Eckstein, D. Bertsekas (1992). “On the Douglas–Rachford splitting method and the proximal point algorithm for maximal monotone operators.” Mathematical Programming, 55.
  5. B. He, X. Yuan (2012). “On the O(1/n) convergence rate of the Douglas–Rachford alternating direction method.” SIAM Journal on Numerical Analysis, 50(2).
  6. B. Stellato, G. Banjac, P. Goulart, A. Bemporad, S. Boyd (2020). “OSQP: an operator splitting solver for quadratic programs.” Mathematical Programming Computation, 12.
  7. S. Choudhary et al. (2017). “Distributed mapping with privacy and communication constraints: lightweight algorithms and object-based models.” IJRR, 36(12).
  8. T. Halsted, O. Shorinwa, J. Yu, M. Schwager (2021). “A survey of distributed optimization methods for multi-robot systems.” arXiv:2103.12840.
  9. B. O’Donoghue, E. Chu, N. Parikh, S. Boyd (2016). “Conic optimization via operator splitting and homogeneous self-dual embedding.” JOTA, 169.
  10. M. Hestenes (1969). “Multiplier and gradient methods.” JOTA, 4.