Composite objectives#
Many machine learning problems have a composite structure: a smooth loss plus a nonsmooth regulariser:
where is smooth (e.g., squared loss, logistic loss) and is convex but possibly nonsmooth (e.g., norm, indicator of a convex set, nuclear norm). The prototypical example is the lasso:
Gradient descent on the full objective fails because is not differentiable — the subgradient of at a coordinate where is the entire interval , giving no unique direction.
Proximal operator#
The proximal operator of a convex function is:
The prox evaluates at while penalising distance from . Intuitively, it takes a step toward minimising but stays close to the reference point , with controlling the trade-off. The prox is well-defined for any closed convex , even nondifferentiable ones.
Key examples:
-
(lasso penalty): , where the soft-thresholding operator is applied coordinate-wise.
-
(indicator of closed convex set ): , the Euclidean projection onto .
-
: — prox of zero is the identity.
Worked soft-threshold example. Let , . Then . For with : (shrunk to exactly zero). The threshold acts as a "kill zone": any is mapped to zero, implementing sparsity.
ISTA and FISTA#
The Iterative Shrinkage-Thresholding Algorithm (ISTA) is the proximal equivalent of gradient descent for composite problems:
Each iteration: take a gradient step on the smooth , then apply the prox of the nonsmooth . For lasso with and :
ISTA converges at rate — the same as gradient descent on smooth problems. This is remarkable: the nondifferentiable term does not degrade the worst-case rate.
FISTA (Fast ISTA) adds Nesterov momentum to achieve — the optimal rate for first-order methods on this class:
where is the Nesterov sequence. The acceleration comes from extrapolation — evaluating the gradient at a point beyond the current iterate, extrapolated in the direction of recent progress.
Why slow convergence is acceptable for lasso. Lasso is typically solved once per for a fixed dataset of moderate dimension. with a well-tuned step size converges to high accuracy in hundreds of iterations — seconds in practice. The simplicity of ISTA/FISTA (no linear system solve) makes them the go-to first-order choice for structured convex problems.
Operator splitting and ADMM#
Splitting rewrites the problem as subject to , then alternates two cheap proximal steps with a dual nudge. When and each have a closed-form prox, the whole iteration is cheap — that is the appeal over a monolithic IPM.
ADMM (Alternating Direction Method of Multipliers) solves problems of the form:
where and are convex (possibly nonsmooth). The variables and are decoupled in the objective but coupled through a linear constraint. ADMM iterates:
where is a penalty parameter and is the scaled dual variable. Each - and -subproblem involves only one of the two objective terms — this is the splitting that gives ADMM its power. When and have simple proximal operators (e.g., is a quadratic, is ), each subproblem is cheap.
Consensus ADMM. A common pattern is and enforces consensus for all . Each can be handled independently (in parallel), then the -update averages the results. This maps directly to distributed optimisation.
When ADMM helps:
- Problems that decompose naturally into two blocks with cheap prox operators (e.g., lasso in consensus form across data shards).
- Distributed settings where the -update can be parallelised.
- Problems where an IPM is too expensive but ISTA on the monolithic problem converges slowly due to coupling.
When ADMM is slower: For tightly coupled objectives where the - and -updates are as hard as the original problem, ADMM adds overhead (the penalty parameter and dual variable ) without reducing per-iteration cost.
Choosing Prox vs IPM vs SGD#
A quick decision guide for structured problems:
| Situation | Method |
|---|---|
| Small-medium LP/QP/SOCP, need high accuracy | IPM |
| Composite with simple | ISTA / FISTA |
| Multi-block, distributed, or consensus structure | ADMM |
| Nonconvex, huge data, general structure | SGD / Adam |
| / nuclear norm regularisation with known | ISTA / FISTA |
The patterns repeat across applications: find the structure, match it to the method, and exploit cheap proximal operators when they exist.
Knowledge Check#
Soft-threshold soft(v, t) applied to v = 0.8 with t = 1.5 produces ____.
The proximal operator of an indicator function g of a closed convex set C is:
Browser lab#
Compare GD on ridge regression (smooth) vs ISTA on lasso (composite) on a synthetic dataset. Plot objective value per iteration to contrast convergence behaviour.
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(42)
n, d = 100, 50
X = np.random.randn(n, d)
beta_true = np.zeros(d)
beta_true[:5] = [3, -2, 1.5, -1, 0.5] # sparse
y = X @ beta_true + 0.5 * np.random.randn(n)
lam = 0.5
def soft_thresh(v, t):
return np.sign(v) * np.maximum(np.abs(v) - t, 0)
# Ridge: smooth objective, GD
def ridge_grad(beta):
return X.T @ (X @ beta - y) / n + lam * beta
# Lasso ISTA
def lasso_grad_smooth(beta):
return X.T @ (X @ beta - y) / n
# GD on ridge
eta_ridge = 0.1
n_iter = 200
beta_ridge = np.zeros(d)
ridge_obj = []
for _ in range(n_iter):
beta_ridge = beta_ridge - eta_ridge * ridge_grad(beta_ridge)
obj = 0.5 * np.sum((X @ beta_ridge - y)**2) / n + 0.5 * lam * np.sum(beta_ridge**2)
ridge_obj.append(obj)
# ISTA on lasso
eta_lasso = 0.1
beta_lasso = np.zeros(d)
lasso_obj = []
for _ in range(n_iter):
beta_lasso = soft_thresh(beta_lasso - eta_lasso * lasso_grad_smooth(beta_lasso), eta_lasso * lam)
obj = 0.5 * np.sum((X @ beta_lasso - y)**2) / n + lam * np.sum(np.abs(beta_lasso))
lasso_obj.append(obj)
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 5))
ax1.semilogy(ridge_obj, "b-", linewidth=1.5, label="GD on Ridge")
ax1.semilogy(lasso_obj, "r-", linewidth=1.5, label="ISTA on Lasso")
ax1.set_xlabel("Iteration")
ax1.set_ylabel("Objective (log scale)")
ax1.set_title("Convergence: Ridge (GD) vs Lasso (ISTA)")
ax1.legend()
ax1.grid(True, alpha=0.3)
ax2.stem(range(d), beta_lasso, linefmt="r-", markerfmt="ro", basefmt="k-", label="Lasso (ISTA)")
ax2.stem(range(d), beta_true, linefmt="b--", markerfmt="b^", basefmt="k-", label="True")
ax2.set_xlabel("Coefficient index")
ax2.set_ylabel("Value")
ax2.set_title("Recovered vs True Coefficients (Lasso)")
ax2.legend()
plt.tight_layout()
plt.show()
print(f"Lasso nonzero coefficients: {np.sum(np.abs(beta_lasso) > 1e-4)}")
print(f"True nonzero coefficients: {np.sum(np.abs(beta_true) > 1e-4)}")
print(f"Estimation error ||beta - beta_true||: {np.linalg.norm(beta_lasso - beta_true):.4f}")
print("Notice: lasso selects exactly 5 nonzero coefficients, matching the 5 true ones, with estimation error 1.2149.")
Key takeaways#
- Composite problems with smooth and nonsmooth are handled by the proximal operator, which minimises while staying near a reference point.
- For the prox is soft thresholding, with a kill zone: any maps to exactly zero. That is the source of sparsity.
- The prox of an indicator function is Euclidean projection, which is why projected gradient descent is a proximal method in disguise.
- ISTA is a gradient step on followed by the prox of , and it keeps the rate despite the nonsmooth term. FISTA adds Nesterov momentum for .
- ADMM splits subject to into two cheap prox updates plus a dual ascent, and maps naturally to distributed and consensus settings.
- Match the structure: IPM for small high-accuracy cones, ISTA/FISTA for composite prox-friendly objectives, ADMM for multi-block or distributed problems, SGD/Adam for huge nonconvex ones.
Further reading#
- Neal Parikh & Stephen Boyd, Proximal Algorithms (Foundations and Trends in Optimization, 2014) — free online; the reference for prox operators and splitting.
- Stephen Boyd, Neal Parikh, Eric Chu, Borja Peleato & Jonathan Eckstein, "Distributed Optimization and Statistical Learning via ADMM" (Foundations and Trends in Machine Learning, 2011) — the ADMM paper.
- Amir Beck & Marc Teboulle, "A Fast Iterative Shrinkage-Thresholding Algorithm for Linear Inverse Problems" (SIAM Journal on Imaging Sciences, 2009) — ISTA and FISTA.
Reading is free. PDF and ePub unlock with the newsletter. Join once and every lesson opens in this browser.