Skip to main content
© 2026 ePowerAI — free, open courseware. No login required.
CoursesContact
ePOWERAI
CoursesContact
Week 6: Interior-Point Methods
Adv. Optimization

Duality & KKT

  1. 01Week 1: Optimality Conditions Revisited
  2. 02Week 2: Lagrangian Duality in Depth
  3. 03Week 3: KKT and Sensitivity

Cones & IPMs

  1. 04Week 4: LP, QP, and Conic Form
  2. 05Week 5: Semidefinite Programming
  3. 06Week 6: Interior-Point Methods
  4. 07Week 7: Proximal Methods and ADMM

Second-order & scale

  1. 08Week 8: Newton and Quasi-Newton
  2. 09Week 9: Variance Reduction
  3. 10Week 10: Large-Batch and Distributed Training

Geometry & training science

  1. 11Week 11: Automatic Differentiation
  2. 12Week 12: Sharpness and SAM
  3. 13Week 13: Landscapes and Implicit Bias

Capstone

  1. 14Week 14: Capstone — Structure Meets Scale
Week 06· Adv. Optimization· Cones & IPMs8 min read

Week 6: Interior-Point Methods

Learning Outcomes
  • Form a log-barrier problem for inequality-constrained programs
  • Describe the central path as t→∞t \to \inftyt→∞ and explain why it leads to the constrained optimum
  • Explain why IPMInterior-Point Method uses Newton steps on the barrier subproblem
  • State what you get from a black-box IPM without implementing one
Prerequisites

Background: Weeks 4–5 (LP, QP, SOCP, SDPSemidefinite Program forms). Newton's method concept (from intermediate Optim Week 11; expanded in Week 8 of this course); KKTKarush–Kuhn–Tucker (optimality conditions) (Week 3). Convex sets and barrier idea from intermediate Optim.

Later weeks: IPM is the default solver for structured convex programs (LPs through SDPSemidefinite Program). Week 7 (prox/ADMM) is the first-order alternative when problems are too large for IPM.

  • Also see: Optimization Week 12: Duality for Practitioners — the primal-dual ideas IPMs exploit.

Why not projected gradient alone#

Projected gradient descent (intermediate Optim Week 9) works for constrained convex problems but has a fundamental weakness: the projection operation itself can be expensive. For a polyhedron defined by mmm linear inequalities, projection is a QP that may be as hard as the original problem. For the PSD cone, projection requires an eigendecomposition (as in Week 5's lab) — feasible but O(n3)O(n^3)O(n3) per step.

More critically, projected gradient produces iterates on the boundary — it bounces along constraint faces. Boundary iterates mean some constraints are active, which means the gradient may be discontinuous when a constraint joins or leaves the active set. This active-set chattering slows convergence and makes the method unreliable for high-accuracy solutions.

Interior-point methods (IPMs) take the opposite approach: stay strictly inside the feasible region, and gently approach the boundary only in the limit. They solve a sequence of unconstrained (or equality-constrained) smooth approximations, each of which is solved by Newton's method. The result is polynomial-time convergence to high accuracy for LP, QP, SOCP, and SDP.

Logarithmic barrier#

The main idea of an IPM is to replace each inequality constraint hj(x)≤0h_j(x) \leq 0hj​(x)≤0 with a barrier term that penalises approaching the boundary:

ϕ(x)=−∑j=1plog⁡(−hj(x))\phi(x) = -\sum_{j=1}^p \log(-h_j(x))ϕ(x)=−∑j=1p​log(−hj​(x))

As hj(x)→0−h_j(x) \to 0^-hj​(x)→0− (approaching the boundary from inside), −log⁡(−hj(x))→+∞-\log(-h_j(x)) \to +\infty−log(−hj​(x))→+∞ — the barrier explodes, preventing the iterates from ever touching or crossing the boundary. The feasible set's interior is the domain of ϕ\phiϕ.

The barrier problem for a fixed parameter t>0t > 0t>0 is:

min⁡x  tf(x)+ϕ(x)s.t.gi(x)=0\min_x \; t f(x) + \phi(x) \quad \text{s.t.} \quad g_i(x) = 0minx​tf(x)+ϕ(x)s.t.gi​(x)=0

where the equality constraints remain explicit. For a pure inequality-constrained problem:

min⁡x  tf(x)−∑j=1plog⁡(−hj(x))\min_x \; t f(x) - \sum_{j=1}^p \log(-h_j(x))minx​tf(x)−∑j=1p​log(−hj​(x))

The parameter ttt controls the trade-off: when ttt is small, the barrier dominates and the minimiser is forced toward the "analytic centre" of the feasible set (the point that maximises the product of distances to all constraint boundaries). When ttt is large, the tf(x)t f(x)tf(x) term dominates and the minimiser approaches the true constrained optimum.

Worked 1D example. min⁡  x\min \; xminx subject to x≥0x \geq 0x≥0 (i.e., h(x)=−x≤0h(x) = -x \leq 0h(x)=−x≤0).

Barrier: ϕ(x)=−log⁡(x)\phi(x) = -\log(x)ϕ(x)=−log(x) for x>0x > 0x>0. The barrier problem is min⁡x>0  tx−log⁡(x)\min_{x > 0} \; t x - \log(x)minx>0​tx−log(x).

Set derivative to zero: t−1/x=0⇒x∗(t)=1/tt - 1/x = 0 \Rightarrow x^*(t) = 1/tt−1/x=0⇒x∗(t)=1/t. As t→∞t \to \inftyt→∞, x∗(t)→0x^*(t) \to 0x∗(t)→0, the true optimum. The path x∗(t)=1/tx^*(t) = 1/tx∗(t)=1/t for t>0t > 0t>0 is the central path for this trivial problem.

Central path#

The central path is the set {x∗(t)∣t>0}\{x^*(t) \mid t > 0\}{x∗(t)∣t>0} where x∗(t)x^*(t)x∗(t) is the minimiser of the barrier problem with parameter ttt. Under mild conditions (convexity, Slater, self-concordance), the central path is a smooth curve that converges to the primal optimum x∗x^*x∗ as t→∞t \to \inftyt→∞. Simultaneously, the dual variables λj∗(t)=1/(t⋅(−hj(x∗(t))))\lambda_j^*(t) = 1/(t \cdot (-h_j(x^*(t))))λj∗​(t)=1/(t⋅(−hj​(x∗(t)))) converge to the optimal dual variables λj∗\lambda_j^*λj∗​.

Central path in KKT terms. The barrier subproblem's KKT conditions give a perturbed complementary slackness:

λj(t)⋅hj(x(t))=−1/t\lambda_j(t) \cdot h_j(x(t)) = -1/tλj​(t)⋅hj​(x(t))=−1/t

As t→∞t \to \inftyt→∞, the right-hand side →0\to 0→0, recovering exact complementary slackness. The IPM follows the central path by solving a sequence of Newton systems that track this perturbation toward zero.

Primal-dual IPMs. Modern IPMs solve the primal and dual simultaneously, taking Newton steps on the perturbed KKT system. At each iteration, the barrier parameter ttt is increased (e.g., t←μtt \leftarrow \mu tt←μt with μ>1\mu > 1μ>1), and one or a few Newton steps solve the updated subproblem. The method terminates when the duality gap m/tm/tm/t (where mmm is the number of inequalities) is below tolerance — typically 10−810^{-8}10−8 or tighter.

Newton on the barrier#

Why does Newton work well on the barrier subproblem? The log barrier has a remarkable property called self-concordance: its third derivative is bounded by a constant times its second derivative to the power 3/23/23/2:

∣ϕ′′′(x)∣≤2(ϕ′′(x))3/2|\phi'''(x)| \leq 2 (\phi''(x))^{3/2}∣ϕ′′′(x)∣≤2(ϕ′′(x))3/2

This property, discovered by Nesterov and Nemirovskii, ensures that Newton's method on self-concordant functions converges in a predictable number of iterations independent of the problem conditioning — the Newton decrement provides a reliable step-size and stopping criterion. This is the mathematical engine behind IPM's polynomial-time guarantees.

Practical Newton step for IPM. The barrier gradient and Hessian are:

∇ϕ(x)=∑j1−hj(x)∇hj(x)\nabla \phi(x) = \sum_j \frac{1}{-h_j(x)} \nabla h_j(x)∇ϕ(x)=∑j​−hj​(x)1​∇hj​(x) ∇2ϕ(x)=∑j1(−hj(x))2∇hj(x)∇hj(x)T+1−hj(x)∇2hj(x)\nabla^2 \phi(x) = \sum_j \frac{1}{(-h_j(x))^2} \nabla h_j(x) \nabla h_j(x)^T + \frac{1}{-h_j(x)} \nabla^2 h_j(x)∇2ϕ(x)=∑j​(−hj​(x))21​∇hj​(x)∇hj​(x)T+−hj​(x)1​∇2hj​(x)

The Newton direction solves (∇2ϕ−equality projections)Δx=−∇ϕ(\nabla^2 \phi - \text{equality projections}) \Delta x = -\nabla \phi(∇2ϕ−equality projections)Δx=−∇ϕ. For LP (∇2hj=0\nabla^2 h_j = 0∇2hj​=0), the Hessian simplifies and the system can be reduced to the normal equations form ADATA D A^TADAT, where DDD is a diagonal scaling derived from the barrier.

Solver practice#

When you call a production IPM solver (e.g., commercial LP/QP/SDP solvers or open-source equivalents), you get:

  1. Approximate primal solution xxx: feasible to within tolerance.
  2. Approximate dual solution (λ,ν)(\lambda, \nu)(λ,ν): provides sensitivity/shadow price information.
  3. Duality gap: p∗−d∗p^* - d^*p∗−d∗ (or its estimate), converging to zero.
  4. Status flags: Optimal, Infeasible, Unbounded, or numerical difficulties.

IPM vs first-order for ML. IPMs excel for moderate-sized problems (thousands to low millions of variables) where high accuracy matters. For large-scale ML training with millions of parameters and billions of data points, first-order methods (SGD/AdamAdaptive Moment Estimation (optimizer)) dominate because:

  • IPM requires solving a linear system at each iteration — O(d3)O(d^3)O(d3) for dense, intractable for d=107d = 10^7d=107 deep net parameters.
  • ML objectives are typically nonconvex, where IPM's global guarantees do not apply.
  • High accuracy (8+ digits) is irrelevant when generalisation is the real goal.

IPMs are the tool for structured, moderate-scale convex problems — the "structure path" in Week 14's decision flow.

Knowledge Check#

Exercise · Fill in the blank

As you approach the boundary hⱼ(x) = 0 from the interior, −log(−hⱼ(x)) tends to ____.

Question 1 of 3

What is the central path?

The gradient descent trajectory
The set of minimisers of t·f + φ for t > 0
The boundary of the feasible set
The Newton step direction

Browser lab#

Consider min⁡x,y  x+y\min_{x,y} \; x + yminx,y​x+y subject to x≥0,y≥0,x+y≥1x \geq 0, y \geq 0, x + y \geq 1x≥0,y≥0,x+y≥1. Trace the barrier subproblem minimisers for increasing ttt via gradient descent on the barrier objective, and visualise the central path.

python · runs in browser
import numpy as np
import matplotlib.pyplot as plt

def barrier_obj(xy, t):
    """t*(x + y) - log(x) - log(y) - log(x + y - 1)"""
    x, y = xy
    if x <= 0 or y <= 0 or x + y <= 1:
        return np.inf
    return t * (x + y) - np.log(x) - np.log(y) - np.log(x + y - 1)

def barrier_grad(xy, t):
    """Gradient of the barrier objective."""
    x, y = xy
    if x <= 0 or y <= 0 or x + y <= 1:
        return np.array([np.inf, np.inf])
    d_barrier_x = -1/x - 1/(x + y - 1)
    d_barrier_y = -1/y - 1/(x + y - 1)
    return np.array([t + d_barrier_x, t + d_barrier_y])

# Trace central path for increasing t
t_values = [0.5, 1, 2, 4, 8, 16, 32, 64]
path = []

for t in t_values:
    # Minimise barrier via GD from a feasible start
    xy = np.array([2.0, 2.0])  # feasible: x>0, y>0, x+y>1
    for _ in range(2000):
        g = barrier_grad(xy, t)
        # Step with a small fixed rate; check the domain before accepting
        xy_new_feasible = xy - 0.005 * g / (np.linalg.norm(g) + 1e-8)
        if np.all(xy_new_feasible > 0) and (xy_new_feasible[0] + xy_new_feasible[1] > 1):
            xy = xy_new_feasible
        else:
            xy = xy - 0.001 * g / (np.linalg.norm(g) + 1e-8)
    path.append(xy.copy())
    print(f"t={t:4.0f}: minimiser = ({xy[0]:.4f}, {xy[1]:.4f}), obj = {xy[0]+xy[1]:.4f}")

path = np.array(path)

# Plot the central path on the feasible set
fig, ax = plt.subplots(figsize=(7, 6))
# Feasible region: x >= 0, y >= 0, x + y >= 1
x_plot = np.linspace(-0.1, 3, 300)
y_plot = np.linspace(-0.1, 3, 300)
X, Y = np.meshgrid(x_plot, y_plot)
feasible = (X >= 0) & (Y >= 0) & (X + Y >= 1)
ax.contourf(X, Y, feasible.astype(float), levels=1, colors=["lightgreen"], alpha=0.3)

# Plot objective contours
Z = X + Y
ax.contour(X, Y, Z, levels=8, colors="gray", alpha=0.4, linestyles="--")

ax.plot(path[:, 0], path[:, 1], "o-", color="tab:red", linewidth=2, markersize=6, label="Central path")
for i, t in enumerate(t_values):
    ax.annotate(f"t={t}", (path[i, 0] + 0.05, path[i, 1] + 0.05), fontsize=8)

# True optimum: x* = 0.5, y* = 0.5 (symmetric problem)
ax.plot(0.5, 0.5, "*", color="black", markersize=14, label="Optimum (0.5, 0.5)")

ax.set_xlim(-0.1, 3)
ax.set_ylim(-0.1, 3)
ax.set_xlabel("x")
ax.set_ylabel("y")
ax.set_title("Central path for $\\min x+y$ s.t. $x,y \\geq 0,\\; x+y \\geq 1$")
ax.legend()
ax.set_aspect("equal")
ax.grid(True, alpha=0.3)
plt.show()

print("Notice: the central path walks from (3.19, 3.19) in toward the analytic center (0.5, 0.5) of the optimal face x + y = 1 as t grows.")

Key takeaways#

  • Interior-point methods stay strictly inside the feasible region, replacing each inequality with a log barrier −log⁡(−hj(x))-\log(-h_j(x))−log(−hj​(x)) that blows up at the boundary.
  • For each barrier parameter ttt, the minimiser traces the central path, which converges to the constrained optimum as t→∞t \to \inftyt→∞.
  • The barrier's KKT conditions give perturbed complementary slackness λjhj(x)=−1/t\lambda_j h_j(x) = -1/tλj​hj​(x)=−1/t, which recovers exactness in the limit.
  • Newton on the barrier works because the log barrier is self-concordant, giving iteration counts that do not depend on the conditioning.
  • A production IPM returns primal and dual solutions, a duality gap, and status flags — the dual solution is the sensitivity information.
  • IPMs excel on structured, moderate-scale convex problems. For large nonconvex training, first-order methods win because each IPM iteration solves a dense O(d3)O(d^3)O(d3) linear system.

Further reading#

  • Stephen J. Wright, Primal-Dual Interior-Point Methods (SIAM, 1997) — the standard reference for the primal-dual algorithms behind modern solvers.
  • Yurii Nesterov & Arkadi Nemirovskii, Interior-Point Polynomial Algorithms in Convex Programming (SIAM, 1994) — the self-concordance theory this lecture sketches.
  • Stephen Boyd & Lieven Vandenberghe, Convex Optimization (Cambridge University Press, 2004) — the log-barrier and central-path development.

Reading is free. PDF and ePub unlock with the newsletter. Join once and every lesson opens in this browser.

← Previous
Week 5: Semidefinite Programming
Next →
Week 7: Proximal Methods and ADMM
On this page
  • Why not projected gradient alone
  • Logarithmic barrier
  • Central path
  • Newton on the barrier
  • Solver practice
  • Knowledge Check
  • Browser lab
  • Key takeaways
  • Further reading