Contents · Convex Optimization
Part 0 · Convexity
Part 1 · Quadratic Programs
Part 2 · Duality
Part 3 · Cones
Part 4 · Descent
- Descent: Gradient, Newton, Interior-Point
Part 4 · Descent
Descent: Gradient, Newton, Interior-Point
Every physics solver and every control step is an optimizer wearing a costume. A contact solve, a QP for a torque, an MPC horizon: each reduces to move the current guess downhill until the residual is small. How fast that happens is set by two choices, how much curvature you use and how you respect constraints.
Gradient descent: first order
Gradient descent follows the steepest slope with a scalar step ,
On a strongly convex quadratic with eigenvalues and , the optimal fixed step contracts the error by a fixed factor each step,
A single scalar cannot match two different curvatures at once. As the rate and the iterates zigzag across the narrow valley, taking many steps to crawl along its floor.1
Newton: second order
Newton's method rescales the gradient by the local curvature,
Multiplying by makes the step affine invariant: it is unchanged if you rescale the coordinates, so the condition number stops mattering. On a quadratic the model is exact and Newton reaches the minimum in one step from any start, independent of .2
A quadratic, by hand
Take , so , with and . Start at , where .
One gradient step with gives
The stiff coordinate () is solved, but the soft coordinate () barely moved. Pushing up to fix faster overshoots : stability caps , yet the soft axis wants . That gap is .
Newton uses and each coordinate gets its own curvature,
One step, exactly on the minimum, for any .
Interior-point: descend from strictly inside
Contacts, friction cones, and actuator limits are inequality constraints . An interior-point method replaces them with a smooth log barrier that blows up at the boundary,
For finite the barrier keeps every iterate strictly feasible; the minimizer traces the central path. Raising shrinks the barrier's pull, and approaches the true optimum from inside the feasible set. Each recentering is a Newton solve, so a QP needs only a handful of outer iterations.2
- gradient descent
- 25 steps
- Newton
- 1 step
- interior-point
- 8 steps
What runs inside a solver
This is the machinery behind a contact or control step, not an analogy for it. Projected Gauss-Seidel, the sequential-impulse method from the constraint-solvers article, updates one impulse at a time using the diagonal of the Delassus operator: it is coordinate-wise descent on the contact LCP. Its rate is governed by the conditioning of , and a tall stack or a large mass ratio makes huge, which is exactly why PGS crawls: like gradient descent on the stretched quadratic, it needs about one sweep per unit of coupling. Newton and convex solvers instead use the full curvature to take affine-invariant steps that do not degrade with , and interior-point is what a QP contact model or an MPC step runs to keep non-penetration and cone constraints satisfied while descending from strictly inside. The engine's choice of solver is a bet on how badly conditioned its constraints are.
Footnotes
-
Nocedal & Wright, Numerical Optimization (2006). ↩
-
Boyd & Vandenberghe, Convex Optimization (2004). ↩ ↩2