Interior-Point Methods: an Algorithmic Overview
The ellipsoid method proved that linear programming is in P but is hopeless in practice. Five years later Karmarkar (1984) published a polynomial-time method that was also fast, and it started the field of interior-point methods (IPMs): instead of walking along the boundary like simplex, they move through the interior of the polytope along a smooth curve, the central path, that leads to an optimal face. Today they are one of the two main engines of commercial LP solvers, and since 2019 they have been the backbone of the fastest known algorithms for LP and for maximum flow. This lesson gives the algorithm designer's summary: the barrier, the central path, the iteration bound, and the final rounding step that turns an approximate interior point into an exact vertex. The derivations and convergence proofs in full are in Interior-Point Methods.
Barrier and central path
Take the LP in equational form, , and its dual . Replace the hard constraint by a logarithmic barrier that grows to infinity at the boundary:
For each (if the LP has a strictly feasible point and bounded optimal set) this strictly convex problem has a unique minimizer . Its optimality conditions, together with the dual, are
The curve is the central path. Compare with complementary slackness, : the central path is a smoothed version of the optimality conditions, and every point on it has duality gap exactly . As , the path converges to an optimal solution (the analytic center of the optimal face).
Path following
A primal-dual path-following method keeps an iterate near the central path and shrinks geometrically. Each iteration takes one Newton step for the system above with target for some :
where and are the diagonal matrices of and . The step length is chosen so that and stay positive. The program runs this on the workshop LP (as a minimization in equational form with three slacks), from the infeasible starting point , , with and steps that go 90% of the way to the boundary.
import numpy as np
A = np.array([[2, 1, 1, 0, 0], [1, 3, 0, 1, 0], [1, 0, 0, 0, 1]], dtype=float)
b = np.array([10, 15, 4], dtype=float)
c = -np.array([3, 2, 0, 0, 0], dtype=float) # maximize 3x + 2y == minimize -3x - 2y
m, n = A.shape
x, s, y = np.ones(n), np.ones(n), np.zeros(m)
sigma = 0.1
print(" k mu primal value dual value infeasibility (x, y)")
for k in range(40):
mu = float(x @ s) / n
rp, rd = b - A @ x, c - A.T @ y - s
infeas = float(max(np.abs(rp).max(), np.abs(rd).max()))
shown = f"{infeas:9.1e}" if infeas > 1e-9 else " < 1e-9"
print(f"{k:2} {mu:9.3e} {float(-c @ x):12.6f} {float(-b @ y):11.6f} {shown} ({x[0]:.4f}, {x[1]:.4f})")
if mu < 1e-8 and infeas < 1e-9:
break
K = np.block([[A, np.zeros((m, m)), np.zeros((m, n))],
[np.zeros((n, n)), A.T, np.eye(n)],
[np.diag(s), np.zeros((n, m)), np.diag(x)]])
d = np.linalg.solve(K, np.concatenate([rp, rd, sigma * mu - x * s]))
dx, dy, ds = d[:n], d[n:n + m], d[n + m:]
alpha = 1.0
for v, dv in ((x, dx), (s, ds)):
if (dv < 0).any():
alpha = min(alpha, 0.9 * float(np.min(-v[dv < 0] / dv[dv < 0])))
x, y, s = x + alpha * dx, y + alpha * dy, s + alpha * ds k mu primal value dual value infeasibility (x, y)
0 1.000e+00 5.000000 0.000000 1.0e+01 (1.0000, 1.0000)
1 5.550e-01 7.927540 0.455079 7.4e+00 (1.5343, 1.6623)
2 2.784e-01 12.131403 7.713072 4.0e+00 (2.3216, 2.5833)
3 9.322e-02 15.606718 14.367863 1.2e+00 (2.9285, 3.4105)
4 2.405e-02 16.725457 16.565214 1.9e-01 (3.0282, 3.8204)
5 3.617e-03 16.981171 16.988024 7.7e-03 (3.0057, 3.9820)
6 5.420e-04 16.998259 17.000353 4.2e-04 (3.0005, 3.9983)
7 7.136e-05 16.999834 17.000169 1.5e-05 (3.0000, 3.9998)
8 7.988e-06 16.999984 17.000023 2.0e-07 (3.0000, 4.0000)
9 8.121e-07 16.999998 17.000002 < 1e-9 (3.0000, 4.0000)
10 8.124e-08 17.000000 17.000000 < 1e-9 (3.0000, 4.0000)
11 8.124e-09 17.000000 17.000000 < 1e-9 (3.0000, 4.0000)
The iterates approach from the inside, the primal and dual values close in on 17 from both sides once the infeasibility has been driven out, and from then on drops by a factor of about 10 per iteration ( with full steps). Eleven Newton steps for an accuracy of is typical: IPMs need a few dozen iterations on almost any LP, large or small.
The iteration bound
Theorem (path following; Renegar, 1988; for primal-dual methods Monteiro and Adler, 1989, and Kojima, Mizuno and Yoshise, 1989). A short-step path-following method that starts near the central path with gap and uses for a suitable constant stays near the path and reaches gap after
iterations. For an LP with integer data of bit length , stopping at suffices (next section), so iterations, each dominated by solving one linear system of size ( arithmetic operations with dense linear algebra). Karmarkar's original projective method needed iterations and operations in total; reusing factorizations across iterations brings the total to (Vaidya, 1987; Gonzaga, 1989).
| Method | Iterations | Notes |
|---|---|---|
| Ellipsoid (Khachiyan, 1979) | needs only a separation oracle | |
| Karmarkar (1984) | projective transformations and a potential function | |
| Short-step path following | best known worst-case iteration bound in this framework | |
| Long-step / predictor-corrector (Mehrotra, 1992) | for long-step methods; none proved for Mehrotra's heuristic itself | what solvers run; a few dozen iterations in practice |
In theory, the long-step methods that work best have the worse worst-case bound; the short-step method with the best bound is slow in practice. This gap between theory and practice is the mirror image of the simplex method's.
From an approximate point to an exact vertex
An IPM produces an interior point, not a vertex, and its accuracy is limited by floating point. For LPs with rational data this is no obstacle: two different vertices of a polytope with bit length have objective values differing by at least (their coordinates are ratios of determinants bounded by , by Cramer's rule). So once the duality gap is below that, the optimal face is identified, and a purification or crossover step recovers an exact optimal vertex: guess the basis from the largest coordinates and solve exactly.
from fractions import Fraction as F
# the last iterate of the interior-point run above, rounded to 6 digits
x_ipm = [2.999999, 3.999999, 1e-06, 1e-06, 1.000001]
names = ["x", "y", "s1", "s2", "s3"]
A = [[2, 1, 1, 0, 0], [1, 3, 0, 1, 0], [1, 0, 0, 0, 1]]
b = [10, 15, 4]
basis = sorted(sorted(range(5), key=lambda j: -x_ipm[j])[:3]) # the 3 largest coordinates
print("guessed basis:", [names[j] for j in basis])
M = [[F(A[i][j]) for j in basis] + [F(b[i])] for i in range(3)] # solve A_B x_B = b exactly
for col in range(3):
piv = next(r for r in range(col, 3) if M[r][col] != 0)
M[col], M[piv] = M[piv], M[col]
for r in range(3):
if r != col:
f = M[r][col] / M[col][col]
M[r] = [a - f * p for a, p in zip(M[r], M[col])]
xB = {names[j]: M[i][3] / M[i][i] for i, j in enumerate(basis)}
print("exact vertex:", {k: str(v) for k, v in xB.items()}, " value", 3 * xB["x"] + 2 * xB["y"])guessed basis: ['x', 'y', 's3']
exact vertex: {'x': '3', 'y': '4', 's3': '1'} value 17
The exact vertex with slack and value 17 can then be certified with a dual solution, as in Complementary Slackness. Production solvers do the same in their crossover phase, which hands the IPM's answer to the simplex method for a final clean-up.
IPMs in algorithm design
Interior-point methods are now a tool for combinatorial problems, not only a solver:
- General LP: Cohen, Lee and Song (2019) solve LPs in about the time of matrix multiplication, , by maintaining the Newton systems with randomized data structures.
- Flows: an IPM on the min-cost flow LP has Newton systems that are Laplacian linear systems, solvable in nearly linear time (Spielman and Teng, 2004). This led to algorithms (Lee and Sidford, 2014) and finally to an almost-linear-time algorithm for maximum flow and min-cost flow (Chen, Kyng, Liu, Peng, Probst Gutenberg and Sachdeva, 2022), combining an IPM with dynamic graph data structures.
The multiplicative weights section describes the other route to fast approximate flows, through electrical flows.
Test yourself
What is the duality gap at the point of the central path with parameter , for an LP with variables?
How many iterations does a short-step path-following method need for an LP of bit length ?
Why can an IPM's approximate solution be turned into an exact optimal vertex?
- Because IPMs work in exact arithmetic
- Because distinct vertex values differ by at least , so a small enough gap identifies the optimal face, and the basis can then be solved exactly
- Because every interior point is a vertex
- It cannot