Interior-Point Methods
The simplex method crawls along the boundary of the feasible set. Interior-point methods cut through the middle: they follow a smooth curve, the central path, from the interior of the feasible region to the optimum, taking Newton steps. They have polynomial worst-case complexity, need only a few dozen iterations regardless of problem size, and extend directly to quadratic, conic and general convex problems.
The barrier idea
Replace the inequality constraints with a logarithmic barrier that blows up at the boundary:
For each the minimizer is strictly feasible; as it approaches the true optimum. The curve is the central path. Each point of it gives a dual-feasible point with duality gap exactly , so the barrier method knows how accurate it is:
A barrier method for an LP
Solve s.t. : for minimize with damped Newton, starting from the previous solution.
import numpy as np
# max 3a + 5b s.t. a + 2b <= 8, 2a + b <= 10, a >= 0, b >= 0 (as min with A x <= b)
c = np.array([-3.0, -5.0])
A = np.array([[1.0, 2.0], [2.0, 1.0], [-1.0, 0.0], [0.0, -1.0]]); b = np.array([8.0, 10.0, 0.0, 0.0])
m = len(b)
x = np.array([1.0, 1.0]) # strictly feasible start
t = 1.0
while m / t > 1e-8:
for _ in range(50): # centering: Newton on t c^T x + barrier
s = b - A @ x # slacks, all > 0
g = t * c + A.T @ (1 / s)
H = A.T @ np.diag(1 / s**2) @ A
dx = -np.linalg.solve(H, g)
lam2 = -g @ dx # Newton decrement squared
if lam2 / 2 < 1e-10:
break
step = 1.0
while np.any(b - A @ (x + step * dx) <= 0) or \
t * c @ (x + step * dx) - np.sum(np.log(b - A @ (x + step * dx))) > t * c @ x - np.sum(np.log(s)) - 0.25 * step * lam2:
step *= 0.5
x = x + step * dx
print(f"t = {t:9.0f}: x = {np.round(x, 6)}, objective = {-c @ x:.6f}, gap bound m/t = {m / t:.0e}")
t *= 10t = 1: x = [2.652486 2.47193 ], objective = 20.317106, gap bound m/t = 4e+00
t = 10: x = [3.814969 2.0713 ], objective = 21.801408, gap bound m/t = 4e-01
t = 100: x = [3.981428 2.007145], objective = 21.980011, gap bound m/t = 4e-02
t = 1000: x = [3.998143 2.000714], objective = 21.998000, gap bound m/t = 4e-03
t = 10000: x = [3.999814 2.000071], objective = 21.999800, gap bound m/t = 4e-04
t = 100000: x = [3.999981 2.000007], objective = 21.999980, gap bound m/t = 4e-05
t = 1000000: x = [3.999998 2.000001], objective = 21.999998, gap bound m/t = 4e-06
t = 10000000: x = [4. 2.], objective = 22.000000, gap bound m/t = 4e-07
t = 100000000: x = [4. 2.], objective = 22.000000, gap bound m/t = 4e-08
Each outer step multiplies by 10 and gains one digit; the centering steps are cheap because Newton starts close to the next point on the path.
Primal-dual interior-point methods
Production solvers use primal-dual methods instead. They apply Newton's method to the KKT conditions with complementary slackness relaxed to :
and drive adaptively (Mehrotra's predictor-corrector). They typically need 20 to 60 iterations for LPs of any size; each iteration solves one sparse symmetric linear system, which dominates the cost.
import numpy as np
from scipy.optimize import linprog
rng = np.random.default_rng(0)
for n in (50, 200, 800):
m = 2 * n
A = rng.uniform(0, 1, size=(m, n)); b = A @ np.ones(n) + rng.uniform(1, 2, size=m)
c = -rng.uniform(0, 1, size=n)
ipm = linprog(c, A_ub=A, b_ub=b, bounds=[(0, None)] * n, method="highs-ipm")
ds = linprog(c, A_ub=A, b_ub=b, bounds=[(0, None)] * n, method="highs-ds")
print(f"n = {n:4d}: interior point {ipm.nit:3d} iterations, dual simplex {ds.nit:5d} iterations, same optimum: {np.isclose(ipm.fun, ds.fun)}")n = 50: interior point 11 iterations, dual simplex 39 iterations, same optimum: True
n = 200: interior point 16 iterations, dual simplex 131 iterations, same optimum: True
n = 800: interior point 24 iterations, dual simplex 627 iterations, same optimum: True
The interior-point iteration count barely grows with size; simplex pivots grow roughly with the number of constraints, but each pivot is much cheaper. Which is faster depends on the problem; modern solvers run both concurrently.
Simplex versus interior point
| Simplex | Interior point | |
|---|---|---|
| path | along edges, vertex to vertex | through the interior, along the central path |
| worst case | exponential | polynomial |
| typical iterations | grows with problem size | 20–60, nearly constant |
| solution | an exact vertex (basis) | near-optimal interior point, then crossover |
| warm start after changes | excellent | poor |
| extends to | LP (and QP) | QP, SOCP, SDP, general convex |
In software
linprog(method="highs-ipm"), MOSEK, Gurobi's barrier, CPLEX's barrier; for nonlinear problems IPOPT, and for conic problems Clarabel, ECOS and SCS (a first-order alternative).- Karmarkar's 1984 algorithm started the field; Nesterov and Nemirovski's theory of self-concordant barriers extended it to all convex cones.
Exercises
Exercise 1: The gap bound
A barrier method with 40 inequality constraints is at on the central path. How far from optimal is it at most?
Answer
.
Solution
.
Exercise 2: One-dimensional central path
For s.t. (barrier ), find .
Answer
.
Solution
Minimize : the derivative gives , which tends to the optimum 0, with gap exactly for .
Exercise 3: Central path points (code)
For the LP in the barrier example, compute the barrier minimizer at (almost no objective). Where is it?
Answer
Near the analytic centre of the polygon, the point that maximizes the product of the slacks.
Solution
import numpy as np
c = np.array([-3.0, -5.0]); A = np.array([[1.0, 2.0], [2.0, 1.0], [-1.0, 0.0], [0.0, -1.0]]); b = np.array([8.0, 10.0, 0.0, 0.0])
x, t = np.array([1.0, 1.0]), 0.01
for _ in range(100):
s = b - A @ x; g = t * c + A.T @ (1 / s); H = A.T @ np.diag(1 / s**2) @ A
dx = -np.linalg.solve(H, g); step = 1.0
while np.any(b - A @ (x + step * dx) <= 0):
step *= 0.5
x = x + 0.5 * step * dx
print(np.round(x, 4))[1.6011 1.4275]
As grows the central path leaves this centre and bends toward the optimal vertex .
Test yourself
On the central path of a barrier method with inequalities, the duality gap is…
- 0
- unknown
Interior-point methods take…
- Newton steps on a barrier or on relaxed KKT conditions
- pivots between bases
- random steps
- only gradient steps
An advantage of simplex over interior point is…
- polynomial worst case
- fast warm starts after small changes
- fewer iterations on huge problems
- it handles SDPs