44.04.03 · optimization-control / 04-constrained-nonlinear

Sequential Quadratic Programming

shipped3 tiersLean: none

Anchor (Master): Nocedal & Wright 2006 Numerical Optimization 2e (Springer) Ch. 18 (§18.1 local SQP and the KKT-Newton equivalence, §18.2 inequality constraints via the QP working set / IQP, §18.3 the Lagrangian Hessian and Powell's damped BFGS update, §18.4 line-search and trust-region SQP, §18.5 the ℓ1 and augmented-Lagrangian merit functions, the Maratos effect, and second-order corrections, §18.6 the Hessian of the Lagrangian and reduced-Hessian SQP); Boggs & Tolle 1995 Sequential quadratic programming (Acta Numerica 4, 1-51) — the survey treatment of local convergence, globalization, and the merit-function/filter alternatives

Intuition Beginner

Suppose you must find the lowest point of a curved landscape while staying exactly on a set of curved paths painted on the ground. Two things are hard at once: the cost curves, so you cannot just slide downhill, and the paths curve, so you cannot just walk in a straight line. Sequential quadratic programming handles both by refusing to solve the real, hard problem directly. Instead, at wherever you currently stand, it builds a simpler stand-in problem it can solve in one shot, takes the step that solves it, and then rebuilds a fresh stand-in at the new spot.

The stand-in is built from two approximations. The curved paths are replaced by their straight-line tangents at your current point — easy to stay on. The curved cost is replaced by a bowl-shaped model that captures both the downhill direction and the local bend. Crucially, the bend used is not the bend of the cost alone but the bend of the cost adjusted by how much each path is pulling on you; that adjusted bend is what makes the step aim correctly when constraints are active. A bowl over straight tangents is the simplest constrained problem with real curvature — the quadratic program of the previous unit — and it has a one-shot solution.

Each round you solve one such quadratic program, move by its answer, and repeat. As you near the true solution the tangents hug the real paths and the bowl matches the real cost, so the rounds need fewer and fewer corrections. Near the end the method doubles its accurate digits each round, the same fast finish Newton's method gives on unconstrained problems. This is the workhorse method for general smooth constrained optimization.

Visual Beginner

Picture a curved cost over a single curved constraint path. At your current point you draw the straight tangent to the path and a bowl-shaped model of the cost. The corner of "lowest bowl point on the tangent line" is your next point — closer to where the real cost is lowest along the real path.

   real curved constraint path  ~~~~~~\
                                        \____
   x_k *----.                                ~~~~~~  (path curves away)
            |\  tangent line (straightened constraint)
            | \________________________________
            |        \
   bowl     |         * x_{k+1}  = lowest bowl point on the tangent
   model    |        /          (the QP subproblem's answer)
   of cost  |       /
            v      /
        downhill + local bend of the (Lagrangian-adjusted) cost

   one round:  straighten the paths  +  bowl-model the cost
               -> solve the quadratic program  -> step to its answer
               -> rebuild at the new point  -> repeat

ingredient of the real problem what SQP uses instead why
curved constraint paths straight tangent lines at the current point a line is an equality the QP can hold
curved cost a bowl: downhill slope plus local bend gives a one-shot minimizer
the bend (curvature) bend of cost adjusted by constraint pull aims the step right when constraints press
the whole hard problem one quadratic program per round solvable exactly each round

The takeaway: SQP turns a hard curved-cost, curved-constraint problem into a sequence of easy quadratic programs, each built fresh at the current point, and the sequence converges fast.

Worked example Beginner

Minimize the cost while staying on the circle . The true answer is the point on the circle farthest into the down-left direction, , where the cost is . We take one SQP round from a starting guess and watch it move toward that point.

Step 1. Start. Begin at , which sits on the circle since . The cost there is — the worst point on the circle, the high corner.

Step 2. Straighten the constraint. The constraint is . Its tangent direction at comes from the slopes and , so the straightened rule on a step is , i.e. . The step must move equally in opposite directions.

Step 3. Model the cost and step. The cost slope is in both directions, so on the line the cost change is — flat to first order. The bowl model's bend (here from the constraint pull) selects the step that most reduces cost while staying on the tangent; solving the small quadratic program gives the step , landing at before a feasibility correction pulls it back onto the circle.

Step 4. Rebuild. The next round straightens the circle at the corrected point, which now lies down-left of , and repeats. Each round slides farther toward .

What this tells us. One SQP round replaced the circle by a line and the cost by a simple model, solved a one-shot problem, and moved decisively from the worst point toward the best. Repeating the round drives the guess to with cost , the true constrained minimum.

Check your understanding Beginner

Formal definition Intermediate+

Consider the nonlinear program (NLP)

with twice continuously differentiable. The Lagrangian is , with gradient-in- block where is the Jacobian whose rows are , and Hessian-in- block . The first-order KKT conditions of 44.02.02 are stationarity , primal feasibility, dual feasibility for , and complementary slackness .

Definition (SQP subproblem, equality case). At an iterate with the equality-only NLP s.t. , the SQP step and the new multiplier solve the quadratic program (QP) subproblem

whose objective is the quadratic model of the Lagrangian and whose constraints are the linearized NLP constraints. This QP is solved by the equality-constrained-QP machinery of 44.04.01: its own KKT system is the symmetric saddle-point linear system

Definition (SQP for inequalities, IQP). For the full NLP the subproblem is the inequality-constrained QP

solved by the active-set QP method of 44.04.01; the QP's working set is SQP's guess of the active set of the NLP, and near the solution it identifies that active set exactly. The new symbols (Lagrangian), (Hessian of the Lagrangian), (constraint Jacobian), and the merit functions , below are recorded in _meta/NOTATION.md.

Definition (quasi-Newton Hessian, Powell's damped BFGS). When is unavailable or indefinite, SQP maintains a positive-definite approximation updated from the Lagrangian secant pair , . Since can be nonpositive (the Lagrangian Hessian need not be positive definite, unlike the unconstrained case of 44.03.04), Powell's damping replaces by with

which forces , so the BFGS update with keeps by the hereditary-positivity theorem of 44.03.04.

Definition (merit functions). Globalization measures progress on the merit function , where , and on the augmented-Lagrangian merit function in the equality case. The penalty parameter trades feasibility against optimality; an SQP step is acceptable when it sufficiently reduces the chosen merit function.

Counterexamples to common slips

  • The QP objective Hessian is the Lagrangian's Hessian, not the objective's. Using in place of destroys quadratic convergence whenever constraints are curved, because the missing term is exactly what the KKT-Newton linearization requires.
  • A positive-definite does not make positive definite. Curved constraints with nonzero multipliers can render the Lagrangian Hessian indefinite; SQP needs it positive definite only on the null space of the active constraint Jacobian (the second-order sufficiency condition of 44.02.02), which is why Powell damping or reduced-Hessian SQP is used rather than demanding global positivity.
  • The unit SQP step need not decrease a merit function even when it improves both objective and feasibility. This is the Maratos effect: the quadratic curvature of the constraints, invisible to the linearized QP, can make rise on a step that genuinely advances the iterate, blocking the unit step and the fast local rate unless a second-order correction is added.

Key theorem with proof Intermediate+

The signature result is that the SQP step is exactly the Newton step on the nonlinear KKT system. This identification is the source of SQP's local quadratic convergence and the reason the QP subproblem must use the Hessian of the Lagrangian rather than of the objective. It is the precise sense in which SQP is "Newton for constrained optimization" [Nocedal & Wright §18.1].

Theorem (SQP is Newton's method on the KKT system; local quadratic convergence). For the equality-constrained NLP s.t. , let F(x, \lambda) = \begin{psmallmatrix}\nabla f(x) - A(x)^\top\lambda \\ c(x)\end{psmallmatrix} be the KKT map. The SQP step defined by the QP subproblem solves the Newton system F'(x_k, \lambda_k)\begin{psmallmatrix} p_k \\ \lambda_{k+1} - \lambda_k\end{psmallmatrix} = -F(x_k, \lambda_k). If satisfies the LICQ and the second-order sufficiency condition of 44.02.02, then is nonsingular, and the SQP iteration converges q-quadratically to from any sufficiently close start.

Proof. The Jacobian of is

since differentiating in gives and in gives , while differentiating in gives . The Newton system F'(x_k, \lambda_k)\begin{psmallmatrix} p_k \\ \delta_\lambda\end{psmallmatrix} = -F(x_k, \lambda_k) with reads

Substituting into the first row collapses the terms: . The pair therefore solves

which is exactly the KKT system of the QP subproblem of the Formal definition. So the SQP step equals the Newton step on .

Nonsingularity of : with of full row rank (LICQ) and positive definite on (second-order sufficiency), the inertia condition of 44.04.01 makes the saddle-point matrix nonsingular — indeed its inertia is . Newton's method on a map with Lipschitz Jacobian and nonsingular Jacobian at a root converges q-quadratically locally by the standard analysis of 44.03.03: writing , , and Taylor expansion of about with gives for near , where bounds times the Lipschitz constant of .

Bridge. This theorem builds toward the inequality-constrained and quasi-Newton SQP of the Advanced results, where the same KKT-Newton step is computed with an active-set QP and a damped-BFGS Lagrangian Hessian, and it appears again in interior-point NLP, which applies Newton to a barrier-perturbed version of this very map . This is exactly the constrained lift of Newton's method 44.03.03: where unconstrained Newton solves by linearizing the gradient, SQP solves the KKT map by linearizing it, and the QP subproblem is nothing but that linearization re-expressed as a minimization. The foundational reason the Hessian of the Lagrangian must appear — not the Hessian of the objective — is that contains the term whose -derivative is precisely , so the QP that reproduces Newton's step inherits the full . Putting these together, SQP generalises the active-set QP solve of 44.04.01 from a single fixed quadratic problem to a sequence of QPs whose data are relinearized each step, and the working set of the inner QP is dual to the active-set guess of the KKT conditions of 44.02.02: the inner QP's complementary slackness is SQP's running estimate of which nonlinear constraints are active at the solution, and convergence is the fixed point where the QP active set, the multipliers, and the linearization all agree.

Exercises Intermediate+

Advanced results Master

The KKT-Newton step, exactness, and the choice of Hessian

The equality-constrained SQP step solves the saddle-point system \begin{psmallmatrix}\nabla^2_{xx} L_k & -A_k^\top \\ A_k & 0\end{psmallmatrix}\begin{psmallmatrix} p_k \\ \lambda_{k+1}\end{psmallmatrix} = \begin{psmallmatrix}-\nabla f_k \\ -c_k\end{psmallmatrix}, and the identification of this with the Newton step on the KKT map forces the (1,1) block to be and nothing else [Nocedal & Wright §18.1]. The matrix is nonsingular under LICQ ( full row rank) and second-order sufficiency ( for a basis of ), the inertia condition of 44.04.01; the reduced-Hessian form solves for the -dimensional tangential component, the reduced-Hessian SQP that needs only the projected Lagrangian curvature. Local q-quadratic convergence follows from Newton's analysis: under a Lipschitz and nonsingular , [Boggs & Tolle 1995]. When the exact is replaced by a quasi-Newton , the rate drops to q-superlinear exactly when the Dennis-Moré condition holds along the steps, the constrained analogue of the unconstrained result of 44.03.04.

Quasi-Newton Lagrangian Hessians and Powell damping

The Lagrangian Hessian is generically indefinite — curved constraints with nonzero multipliers contribute , which can have any inertia — so a naive BFGS update of may fail the curvature condition that the hereditary-positivity theorem of 44.03.04 requires. Powell's damped BFGS modifies the secant pair to , guaranteeing and hence , at the cost of biasing toward positive definiteness even where the true reduced Hessian is the relevant object [Nocedal & Wright §18.3]. The cleaner alternative maintains a positive-definite approximation of the reduced Hessian only, which second-order sufficiency does guarantee to be positive definite at the solution, so no damping is needed; this is the basis of reduced-Hessian SQP solvers. The SR1 update, tolerant of indefiniteness, suits trust-region SQP where the subproblem absorbs negative curvature, paralleling its unconstrained role.

Globalization: merit functions, the Maratos effect, and filters

Local SQP converges only from near the solution; globalization forces progress from arbitrary starts. The merit function (with the negative-part penalty on inequalities) is exact: for , a local minimizer of the NLP is a local minimizer of , and the SQP step is a descent direction for under that threshold [Nocedal & Wright §18.5]. Nonsmoothness of is the price of exactness; the smooth augmented-Lagrangian merit function avoids nonsmoothness but needs a multiplier estimate. The Maratos effect is the obstruction: a unit step improving both and can increase because the linearized constraints miss the feasibility error of the curved constraints, so the merit-function line search rejects the very step that gives quadratic convergence. The cures are the second-order correction — an extra step with restoring feasibility to higher order — and watchdog / nonmonotone strategies that tolerate occasional merit increases. Filter methods sidestep the penalty parameter entirely: a trial point is accepted if it improves either or the constraint-violation measure relative to a filter of past pairs, treating optimization as a biobjective problem and avoiding both the -estimation problem and much of the Maratos difficulty [Fletcher & Leyffer 2002].

Line-search versus trust-region SQP and inconsistent linearizations

Line-search SQP computes the QP step and then a step length along it to reduce the merit function, requiring a positive-definite (or damped) Hessian so the step is a descent direction. Trust-region SQP instead bounds in the QP and accepts or rejects by a gain ratio, allowing indefinite and exploiting negative curvature, but it faces inconsistent linearized constraints: the linearized feasible set can be empty. The Byrd-Omojokun composite-step approach splits into a normal step reducing linearized infeasibility within the trust region and a tangential step reducing the model on the linearized-constraint null space; the Sℓ1QP / SLQP approach relaxes the constraints into the penalty so the QP is always feasible. These constructions make trust-region SQP robust on highly nonlinear or degenerate problems where line-search SQP stalls.

Synthesis. Sequential quadratic programming is exactly Newton's method 44.03.03 applied to the KKT map of 44.02.02, and the central insight of this unit is that this single identification dictates everything downstream: the QP subproblem's objective Hessian must be because that is the block of the KKT Jacobian, the subproblem is solved by the active-set QP of 44.04.01 because that is the inner Newton solve, and the local rate is q-quadratic because Newton's rate is q-quadratic under a nonsingular Jacobian — nonsingular here by the inertia condition that LICQ and second-order sufficiency supply. The foundational reason SQP needs globalization at all is that Newton's quadratic rate is only local, so a merit function or filter must measure global progress, and this is exactly where the Maratos effect intrudes: the linearized constraints discard the curvature that the merit function then charges back, cured by a second-order correction that restores feasibility to .

Putting these together, SQP generalises the active-set QP solve from one fixed quadratic problem to a relinearized sequence, the inner working set is dual to the running estimate of the NLP active set, and the quasi-Newton damped-BFGS Hessian generalises the unconstrained BFGS of 44.03.04 to an indefinite Lagrangian by forcing positivity on the reduced space. The bridge is the KKT system itself: it appears again in interior-point NLP, where the same map is perturbed by a barrier and solved by Newton along a central path, so SQP and interior-point methods are two linearizations of one set of optimality conditions — SQP discretizing the active set combinatorially, interior-point methods smoothing it analytically — and both rest on the saddle-point linear algebra proved nonsingular here and in 44.04.01.

Full proof set Master

Proposition 1 (SQP step equals the Newton-KKT step). For the equality NLP s.t. with KKT map , the QP-subproblem solution solves F'(x_k,\lambda_k)\begin{psmallmatrix} p_k \\ \lambda_{k+1} - \lambda_k\end{psmallmatrix} = -F(x_k,\lambda_k).

Proof. Block-differentiate : , , , , so F' = \begin{psmallmatrix}\nabla^2_{xx} L & -A^\top \\ A & 0\end{psmallmatrix}. The Newton system with has top row . Adding to both sides and combining with the on the left gives ; the bottom row is . These two equations are the QP KKT system, whose solution is .

Proposition 2 (nonsingularity of the KKT Jacobian at a regular solution). If has full row rank (LICQ) and is positive definite on (second-order sufficiency), then is nonsingular with inertia .

Proof. This is the inertia theorem of 44.04.01 applied to K = \begin{psmallmatrix}\nabla^2_{xx} L^\star & -A^{\star\top} \\ A^\star & 0\end{psmallmatrix} (the sign of the off-diagonal block does not affect inertia, being a symmetric congruence by ). With a basis of , ; second-order sufficiency makes , i.e. , so , which has no zero eigenvalues. Hence is nonsingular.

Proposition 3 (local q-quadratic convergence of exact-Hessian SQP). Under the hypotheses of Proposition 2 with and Lipschitz near , the exact-Hessian SQP iteration converges q-quadratically to from any sufficiently close start.

Proof. By Proposition 1 the iteration is Newton's method on , and with nonsingular (Proposition 2). Write , . The Newton update gives . The bracket is the Taylor remainder, bounded by with the Lipschitz constant of . For in a neighborhood where (continuity of the inverse), . Choosing the neighborhood radius below makes the iteration a contraction in the quadratic sense, so q-quadratically.

Proposition 4 (Powell damping preserves positive definiteness). With , and as defined, the BFGS update using yields .

Proof. By the computation of Exercise 5, since and . The BFGS update then satisfies the hypotheses of the hereditary-positivity theorem of 44.03.04 (current matrix positive definite, curvature product ), so . Moreover , a damped secant equation interpolating the true secant pair and the prediction .

Proposition 5 ( exactness and descent of the SQP step). Let be a KKT point of the equality NLP satisfying second-order sufficiency. For , is a strict local minimizer of , and at a feasible-or-infeasible the SQP step with on has directional derivative unless .

Proof. Exactness: at , and for any feasible direction (so to first order), . The KKT stationarity and make the linear term in any infeasible direction dominated by the penalty , while second-order sufficiency makes strictly increase along feasible directions; together has a strict local minimum at (the standard exact-penalty argument). Descent: the one-sided directional derivative of along is because moves each toward at unit rate, so . The QP KKT row gives , so . Thus by Hölder. With on and , both terms are nonpositive and not simultaneously zero unless and .

Connections Master

  • Newton's method for optimization 44.03.03 is the direct parent: SQP is Newton's method applied to the KKT map rather than to alone, so the unconstrained quadratic-convergence analysis transfers verbatim once the KKT Jacobian is shown nonsingular. The modified-Newton safeguards that repair an indefinite objective Hessian reappear here as Powell damping and reduced-Hessian SQP, which secure positive definiteness on the tangent space that second-order sufficiency controls, and the whole local theory is the constrained lift of the single-equation Newton iteration.

  • The KKT conditions and constraint qualifications of 44.02.02 supply both the equations SQP linearizes and the regularity hypotheses for its convergence: stationarity, feasibility, dual feasibility, and complementary slackness are the four conditions the KKT map encodes, LICQ is the full-row-rank hypothesis on making nonsingular, and second-order sufficiency is the reduced-Hessian positivity that fixes the inertia at . The inner QP's complementary slackness is SQP's combinatorial estimate of which nonlinear constraints are active, so SQP terminates at the fixed point where the QP active set and the NLP active set coincide.

  • Active-set methods for quadratic programming 44.04.01 are the inner engine SQP calls at every outer iteration: each SQP subproblem is precisely the equality- or inequality-constrained QP that unit solves, the inertia condition guaranteeing a well-posed QP step is inherited as the regularity hypothesis for the SQP step, and the warm-starting advantage of dual active-set QP is what makes the SQP inner loop cheap, since successive relinearized subproblems differ only slightly. SQP is the active-set QP solve repeated over a sequence of relinearized data.

  • Quasi-Newton methods 44.03.04 provide the Lagrangian-Hessian approximation: the secant pair is formed from gradients of the Lagrangian rather than the objective, the hereditary-positivity theorem of that unit is what Powell damping arranges to satisfy despite an indefinite true Hessian, and the Dennis-Moré characterization there governs the q-superlinear rate of inexact-Hessian SQP. The augmented-Lagrangian merit function ties SQP to the augmented-Lagrangian / method-of-multipliers approach (unit 44.04.02), whose penalty-plus-multiplier objective is the smooth merit function SQP can use for globalization and whose multiplier updates parallel the SQP multiplier estimates .

Historical & philosophical context Master

Sequential quadratic programming originated with the 1963 doctoral thesis of Robert B. Wilson at Harvard, who proposed solving a nonlinear program by a sequence of quadratic-programming subproblems built from the second-order Lagrangian model; the method was for a time called the Wilson-Han-Powell method [Wilson 1963]. The approach lay relatively dormant until the mid-1970s, when Shih-Ping Han gave the first convergence analysis and connected the method to quasi-Newton updating and the exact penalty function in two influential papers [Han 1976] (Mathematical Programming 11, 263-282), and Michael J. D. Powell supplied the damped-BFGS update that keeps the Lagrangian Hessian approximation positive definite and proved global convergence with the merit function [Powell 1978]. Powell's 1978 contribution is the reason robust SQP became practical, and the damping rule still bears his name.

The Maratos effect — the failure of the unit step to reduce a merit function near the solution — was identified by N. Maratos in his 1978 thesis [Maratos 1978], and the second-order correction and watchdog techniques curing it were developed through the 1980s by Mayne, Polak, Chamberlain, and others. The standard surveys and software-oriented treatments are due to Paul Boggs and Jon Tolle [Boggs & Tolle 1995] and Philip Gill, Walter Murray, and Michael Saunders, whose SNOPT solver implements line-search SQP with a limited-memory damped-BFGS Lagrangian Hessian. The penalty-free filter alternative was introduced by Roger Fletcher and Sven Leyffer in 2002 [Fletcher & Leyffer 2002], reframing globalization as a biobjective acceptance test and influencing the interior-point solver IPOPT. The unifying synthesis in Nocedal and Wright [Nocedal & Wright §18] presents SQP and interior-point methods as the two dominant families for general nonlinear programming, both linearizations of the same KKT system.

Bibliography Master

@book{nocedalwright2006sqp,
  author    = {Nocedal, Jorge and Wright, Stephen J.},
  title     = {Numerical Optimization},
  edition   = {2},
  series    = {Springer Series in Operations Research and Financial Engineering},
  publisher = {Springer},
  year      = {2006}
}

@article{boggstolle1995,
  author  = {Boggs, Paul T. and Tolle, Jon W.},
  title   = {Sequential quadratic programming},
  journal = {Acta Numerica},
  volume  = {4},
  year    = {1995},
  pages   = {1--51}
}

@phdthesis{wilson1963,
  author = {Wilson, Robert B.},
  title  = {A simplicial algorithm for concave programming},
  school = {Harvard University, Graduate School of Business Administration},
  year   = {1963}
}

@article{han1976,
  author  = {Han, Shih-Ping},
  title   = {Superlinearly convergent variable metric algorithms for general nonlinear programming problems},
  journal = {Mathematical Programming},
  volume  = {11},
  number  = {1},
  year    = {1976},
  pages   = {263--282}
}

@incollection{powell1978,
  author    = {Powell, Michael J. D.},
  title     = {A fast algorithm for nonlinearly constrained optimization calculations},
  booktitle = {Numerical Analysis (Dundee 1977)},
  series    = {Lecture Notes in Mathematics},
  volume    = {630},
  publisher = {Springer},
  year      = {1978},
  pages     = {144--157}
}

@phdthesis{maratos1978,
  author = {Maratos, Nicholas},
  title  = {Exact penalty function algorithms for finite-dimensional and control optimization problems},
  school = {Imperial College, University of London},
  year   = {1978}
}

@article{fletcherleyffer2002,
  author  = {Fletcher, Roger and Leyffer, Sven},
  title   = {Nonlinear programming without a penalty function},
  journal = {Mathematical Programming},
  volume  = {91},
  number  = {2},
  year    = {2002},
  pages   = {239--269}
}