References: Biegler (2010), Nonlinear Programming, §§5.5–5.8, pp.109–130; Nocedal and Wright (2006), Numerical Optimization, §§15.4–15.6, pp.435–446 and Theorem 17.3, p.507. Use the Biegler errata. This reference supplies the complete penalty, filter, composite-step and second-order-correction details behind Lecture 22. The SQP implementation uses these ideas in an actual algorithm.
Two quantities to improve¶
Consider subject to . Use the row Jacobian , the sign convention , gradient , and Hessian . A step should reduce constraint violation and eventually improve the objective on the feasible set. Raw objective decrease alone can reward moving away from the constraints. Raw violation decrease alone can converge to a feasible nonoptimal point.
The equality QP has objective and constraint . Its KKT multiplier is the updated multiplier :
Equality Newton owns the derivation, normal/tangential decomposition and multiplier increment distinction. Independent rows and positive reduced curvature make the equality QP a unique minimization problem. A merit function combines progress in one scalar; a filter keeps the two goals separate. Neither supplies a global-minimum certificate for a nonconvex NLP.
Quadratic penalties and conditioning¶

The smooth quadratic penalty is
Stationarity gives . Thus estimates the multiplier. With a nonzero limiting multiplier, the residual must remain nonzero at finite weight; the constraint is approached as the weight grows. This motivates penalty algorithms, but a weight tending to infinity is inconvenient for an acceptance function intended to permit a fast local Newton rate.
For and , the constrained minimum is with . Cauchy’s inequality gives , so the quadratic-penalty minimum is on the negative diagonal , . It solves
At that point the Hessian is . Its tangential and normal eigenvalues are and . The former approaches1 while the latter grows like . Better feasibility therefore comes with increasing anisotropy and condition number. The numerical table below computes the actual radial roots and both eigenvalues.
A general smooth residual-only penalty , with and , has . At a feasible point its gradient is exactly . It cannot have an unconstrained local minimum there when . This is a qualified obstruction, not a statement that smooth penalties are never exact. For , the penalty is exact for every positive weight. Its constrained multiplier and objective gradient vanish.
import numpy as np
from scipy.optimize import brentq
print(f"{'rho_pen':>10} {'t':>12} {'|h|':>12} {'rho*h':>12} {'lambda_t':>12} {'lambda_n':>12} {'condition':>12}")
for rho_pen in [.25,.5,1,10,100,1000]:
t=brentq(lambda t:4*rho_pen*t*(t*t-1)-1,1,5)
residual=2*t*t-2
lambda_t=2*rho_pen*residual
lambda_n=lambda_t+8*rho_pen*t*t
assert abs(1-2*rho_pen*residual*t)<1e-9
print(f"{rho_pen:10g} {t:12.7f} {residual:12.5g} {rho_pen*residual:12.7f} {lambda_t:12.7f} {lambda_n:12.4g} {lambda_n/lambda_t:12.4g}") rho_pen t |h| rho*h lambda_t lambda_n condition
0.25 1.3247180 1.5098 0.3774388 0.7548777 4.265 5.649
0.5 1.1914879 0.83929 0.4196434 0.8392868 6.518 7.766
1 1.1071599 0.45161 0.4516060 0.9032119 10.71 11.86
10 1.0122731 0.049394 0.4939378 0.9878757 82.96 83.98
100 1.0012477 0.0049938 0.4993769 0.9987539 803 804
1000 1.0001250 0.00049994 0.4999375 0.9998750 8003 8004
Augmented Lagrangians and variable multipliers¶
The augmented Lagrangian is
At a feasible KKT point with the fixed true multiplier, its gradient vanishes and its Hessian is . Under LICQ and SOSC, this matrix is positive definite for sufficiently large finite weight. To see why, use orthonormal bases for the normal and tangent spaces. The tangent block is positive definite. The normal block receives , positive definite under full row rank. Its Schur complement after eliminating the tangent block is positive definite once this growing normal term dominates the bounded original block and coupling. Thus the fixed-multiplier augmented function has a strict local minimum at the constrained solution. Biegler p.110 states this with LICQ and SOSC.
The true multiplier is unknown; practical augmented-Lagrangian algorithms alternate primal solves and multiplier updates rather than minimize jointly in . A nonzero constraint residual makes the multiplier term linear and unbounded below in some multiplier direction, so joint unconstrained minimization is the wrong problem.
Where has full row rank, a smooth least-squares multiplier estimate is
Substituting this into a multiplier-dependent merit function gives a Fletcher-type differentiable construction, rather than a residual-only penalty. Its smoothness requires rank locally and its derivatives include derivatives of the multiplier estimate. Dropping those terms changes the construction. This approach is distinct from simply freezing the multiplier in an augmented Lagrangian. See Biegler Eq.5.58 p.110 and Nocedal–Wright p.436. Nonsmooth exact penalties avoid these derivative costs.
Exact nonsmooth penalties: statement, proof and boundary case¶

Define
Exactness here means that a constrained local minimizer is also a local minimizer of this unconstrained merit function for a finite penalty weight. It does not mean that every stationary point is feasible or that every minimum anywhere solves the NLP.
With data, a feasible KKT pair , LICQ and SOSC, every makes a strict local minimum of . The dual norm appears through Hölder’s inequality. Strictness needs the curvature assumption: satisfies LICQ and KKT with zero multiplier, but is flat along the entire feasible axis. Nocedal–Wright Theorem 17.3 p.507 explicitly distinguishes its local-minimum conclusion from the additional SOSC conclusion. Do not infer strictness from a multiplier threshold alone.
Here is a complete contradiction proof of the SOSC statement. Suppose distinct satisfy . Write and . Fix the true multiplier in . Stationarity and Taylor’s theorem give
Put . Hölder gives
Bounded curvature and the assumed nonpositive left side imply . Extract a convergent subsequence of unit directions, . The first-order constraint expansion divided by yields and . Divide the merit inequality by and discard its nonnegative residual term. In the limit it asserts , contradicting SOSC. For the empty tangent space, the unit tangent conclusion itself is impossible. This proves strict local exactness.
For the circle example and , write :

The radial illustration is supported by the all-direction Cauchy bound above. The strict theorem uses as a sufficient bound. In this particular example, equality is also exact and strictly minimizing. At , for , and for . Both are positive off1; Cauchy equality selects the negative diagonal. A zero right derivative is first-order flatness, not a flat set of minima. For smaller weights, moving radially outward reduces the merit function.
Infeasible stationarity: what it does and does not show¶
A stationary point of every penalty weight need not be a least-infeasible point. At , and , the smooth local branch has derivative zero for every positive weight, but is a strict local maximum of violation. Feasible points exist. The quadratic penalty also has zero gradient at0. Thus stationarity cannot establish local violation minimality, global infeasibility, or an excessive number of constraints.
Even a genuine positive-residual local minimum of a restoration objective only describes that local search region; feasibility may exist elsewhere. Investigate derivative correctness, scaling, starts and the constraint structure. Full row rank guarantees that a nonzero residual can be reduced in the linear model by a right-inverse step, so an infeasible stationary violation point also warns that the regularity needed by such a model may be absent. This is diagnostic evidence, not a global proof.
One-sided directional derivatives¶

Use the forward derivative
For the residual, data imply
A kink may arise when an individual residual component is zero, even if the whole residual vector is nonzero. Composition can remove a kink, as in .
For an exact linearized-feasibility step ,
Indeed , and the reverse and ordinary triangle inequalities bound the norm error by . With data, the remainder is . At feasibility, and the residual contribution is zero. If the tangent objective slope is nonnegative, increasing the penalty weight cannot repair it: revise the direction/curvature model. A regularized equality row or truncated normal step may not satisfy ; evaluate the actual derivative or actual model reduction instead.
Choosing the weight: full positive curvature versus reduced curvature¶
QP stationarity gives
When , Hölder and give strict merit descent except at the zero residual/zero step. This is Biegler p.117’s full positive-definite case. The updated QP multiplier is not generally interchangeable with the first-order multiplier estimate.
Only reduced positivity is needed for a unique equality QP, but then the full quadratic form can be negative. A concrete counterexample uses
The QP returns and , while the reduced curvature is1. Choosing gives . It is therefore not a valid general reduced-space descent rule.
For a normal step with , tangent basis , positive , reduced gradient and coupling , the QP tangent is . Then
For , taking the weight above plus a positive margin yields descent. This is the full coupling-aware Biegler 5.71 p.116 expression, with the missing gradient in5.70 restored by the errata. When coupling is zero, the book permits a bound using its first-order multiplier from Eq.5.21. Check which multiplier the implementation has computed. Directly checking the slope also avoids silently extending the full-PD rule.
A common monotone update can remain bounded yet change at every iteration: take . A bounded monotone sequence need not become constant. If the proof needs finitely many changes, enforce a minimum jump: when a required bound exceeds the current weight, set with fixed . A bounded required bound then permits only finitely many changes. Flexible decrease rules require their own acceptance/convergence safeguards; the monotone proof does not automatically apply.
Filters: entries, rejected region, and sufficient progress¶

Let a stored list contain pairs , where is a violation value, not the course’s convex-combination weight. A trial passes this axis-margin filter if, for every stored pair,
The list and its rejected region are different sets. The rejected region is the union of the upper-right rectangles
A trial passes when its pair lies outside , not merely when it differs from the finitely many stored pairs. This strict-outside convention puts boundary points in the rejected set. Some algorithm statements use non-strict progress tests and a corresponding boundary convention; implement one convention consistently. Fletcher et al. (2002), Eq. 2.5, uses the stored violation in the objective margin; Eq. 2.6 is a distinct slanted-margin rule using trial violation. Do not combine their diagrams and tests inadvertently.
Take stored pairs , , , and current pair . TrialA passes the filter but increases ; trialB passes both; trialC decreases and passes the current-pair margin, but fails the last stored pair: and . History prevents accepting it. Scalar merit and filter acceptance can differ in both directions.
Switching, restoration and a line-search outline¶
Historical acceptance and progress relative to the current point are both needed. Near feasibility, a pure violation-or-objective test can accept feasible nonoptimal stagnation. A switching test selects objective-type steps when and
For those steps, require objective Armijo along with historical acceptance. Otherwise require sufficient improvement relative to the current pair. Non-objective-type accepted steps add the old point’s margin region to the filter. The implementation must state all constants, its maximum violation region, boundary conventions and restoration trigger; the basic dominance picture alone is not the algorithm. Biegler Algorithm 5.4 pp.120–121 gives an equality line-search version. Wächter–Biegler (2006), §2.3, adds a near-feasibility test and uses the barrier objective for its interior-point version; they are distinct formulations.
For a merit line search: evaluate derivatives, form an appropriate equality step, verify its derivative and update the weight, then backtrack from until
Both sides use the same current weight. If near-solution rejection has the Maratos signature, first try the second-order correction below. If that corrected trial fails, discard the correction and continue backtracking. The SQP notebook supplies the actual active-set/QP/BFGS implementation rather than a second duplicate algorithm here.
A filter line search restores feasibility when backtracking cannot find an acceptable step. Restoration seeks a sufficiently feasible point acceptable to the filter, then returns to the optimization phase. It need not find a globally minimum violation point.
For interpreting actual Ipopt output, the printed objective is the original objective and printed inf_pr is the original-model violation; acceptance can use the barrier objective and internal scaled/slack residual. Both printed quantities can rise during a valid step. A local-infeasibility status describes a local violation minimum; another start can reach feasibility. A nearly feasible restoration failure can involve degeneracy, scaling or derivative errors and is not a diagnosis of one cause. See the official Ipopt output and status documentation. Interior-point details belong with the barrier-method material.
What a global-convergence argument proves¶

Here is the precise telescoping mechanism, not an unconditional algorithm guarantee. Suppose after some index the weight is fixed, accepted step lengths satisfy , the merit function is bounded below, and
where is the orthogonal tangent projector. Armijo yields . Summing gives , hence . Compact iterates supply cluster points. Full row rank at each such point makes continuous nearby, so every cluster point is feasible and has zero tangent gradient; the least-squares multiplier gives KKT stationarity.
A standard step/backtracking analysis must separately establish uniform derivative bounds, a uniformly well-conditioned right inverse, uniformly positive and bounded reduced curvature, bounded coupling/bases, a suitable penalty rule and a uniform step-length bound. Pointwise positivity and pointwise rank alone are not uniform constants. Biegler Assumptions I and Theorem 5.10 pp.118–119 motivate this analysis, but the displayed residual/telescoping argument does not by itself prove convergence of the entire sequence to one point. It also does not prove second-order optimality or a global minimum. For example, points with all have zero residual but do not converge; this illustrates the logical gap and is not asserted to be the trajectory of a particular algorithm.
Filter conclusions depend on the exact algorithm and restoration assumptions. Biegler Theorems 5.11/5.13 state feasibility convergence and a liminf stationarity conclusion, assuming no unsuccessful restoration termination. A liminf conclusion is weaker than stationarity of every cluster point. Fletcher et al. (2002), Theorem 7, gives alternatives involving finite KKT termination, restoration failure, or a feasible cluster point that is KKT or fails MFCQ. Do not promote any of these into an unqualified whole-sequence or global-optimum promise.
Trust-region feasibility and minimum-distance normal steps¶

The equality QP with can be infeasible even when the original constraints are feasible. With full-row-rank , the minimum-norm normal step is
Every solution of is , with an orthogonal null basis. Orthogonality gives . Thus the linearized equality intersects the ball exactly when . An arbitrary right-inverse coordinate step may be longer and cannot establish infeasibility. For , the minimum step has length.7071; the coordinate step has length1. A radius.8 is feasible despite excluding the coordinate step.
Composite steps, prediction and acceptance¶

Byrd–Omojokun first solves a normal problem
Under full row rank this is strictly convex in normal coordinates. It reduces linearized violation but need not reach zero: the smaller ball may prevent that. An inexact normal solve should satisfy a specified fraction-of-Cauchy decrease, rather than be accepted solely because it is inside the ball.
Then solve the tangent problem with :
The coupling term is retained. Exact positive reduced curvature is not mandatory for a globally solved bounded trust subproblem; negative curvature can be handled by the trust-region solver. Positive-definite approximations can be useful globalization choices, but they do not preserve an indefinite full Hessian’s normal curvature. They are perfectly legitimate when the true full Hessian is itself positive definite.
For the merit model,
Let and . Then
If , increase the weight as necessary so , e.g. to make the non-tangential contribution at least for chosen:
The full book 5.98 bound includes as well when targeting the total prediction; state which inequality is enforced. If , do not divide by it: tangent decrease or a restoration/stationarity branch must handle the case. If approximated full normal curvature is omitted from the model, consistently omit it from the bound and prediction; do not mix exact and approximate formulas.
For positive prediction, accept when exceeds a small threshold; shrink on poor agreement and enlarge on strong agreement when the step reaches the boundary. A high ratio does not justify unbounded radius growth independently of the chosen algorithm safeguards. Stop only when both primal and stationarity residuals satisfy their tolerances; a small step alone is not convergence. Biegler Algorithm 5.5 pp.125–126 gives the detailed scheme; its convergence theorem needs its stated regularity and step-quality assumptions.
An explicit truncated example uses , , start, . The full linearized equality is distance2 away. The normal step is, leaving violation1.2. The tangent optimum is, so has length.9434. At weight2, current merit is4 and trial merit is3.27; prediction and actual reduction are both.73 and the ratio is1. The accepted composite step makes progress without making the linearized constraints exactly feasible.
A filter trust-region method instead uses restoration to find a filter-acceptable iterate whose linearized constraints intersect the current ball, then solves the equality trust QP and applies historical/current-pair and objective-model tests. This is distinct from always computing a truncated composite step. Biegler Algorithm 5.6 pp.126–127 gives one formulation; its model-reduction notation should be evaluated at step0 and the trial step, with a consistent positive predicted reduction.
Constrained quasi-Newton information¶
The constrained secant pair uses a single fixed updated multiplier for both gradients:
Changing the multiplier between the two terms adds constraint-gradient/multiplier variation that is not the intended fixed-multiplier curvature measurement. Damped BFGS enforces its curvature test before updating a positive-definite approximation. The complete unconstrained update derivation belongs to Quasi-Newton Methods, and the actual constrained update is in SQP. A full positive-definite approximation imposes more than positive reduced curvature; reduced-space updates can preserve the weaker local requirement. This is a modeling/linear-algebra choice, not a theorem that full BFGS always fails.
The Maratos effect and a second-order correction¶
Powell’s example is , , , , and . At a feasible point , use that identity Hessian in the equality QP. The solve returns
Put . Then , so the full trial’s error is exactly half the old error squared. Nevertheless, and . For , every positive-weight merit increases by , and the current-pair filter margin also rejects it. This occurs arbitrarily near the minimum. Do not say it occurs at every nonzero angle: at or multiples of, the sine-based strict inequalities fail.
Evaluate the constraint at the full trial and compute a minimum-normal increment
For the circle, , the corrected error is , and the corrected residual is exactly . Thus the error is the old error to the fourth power divided by8. Biegler’s norm equality after 5.111 p.129 has an incorrect coefficient; this is the corrected exact expression. For a fixed finite weight, Armijo constant , and sufficiently small nonzero , the corrected trial satisfies sufficient decrease and restores full steps. In fact and ; dividing by gives a limiting decrease ratio of . Mere merit decrease at an arbitrary angle is not enough to assert Armijo acceptance: at, weight2 and Armijo constant.1, this particular correction decreases merit but fails that Armijo test.

This shared illustration and archive are generated by the actual SQP notebook’s model and KKT solver, at, weight2 and Armijo constant.1. Its algorithm experiments also compare trajectories with and without the correction.
A second variant reoptimizes a replacement step:
Test . Its increment is , never the replacement itself. For linear constraints the second QP equals the first and returns, demonstrating why adding both would double the step. Taylor expansion gives under the required extra smoothness; alone gives an remainder. One extra constraint evaluation supplies the quadratic residual information without evaluating its Hessians.
Replacement-QP and minimum-normal correction are different algorithms in general. Their increments satisfy the same linear correction constraint, but the QP also reoptimizes the tangent component. For , , and at the origin, the original step is. The minimum-normal correction yields full step, while the replacement QP yields. Their tangent components differ because of Hessian coupling. They coincide in the identity-Hessian circle example. Either convention is valid when consistently defined and properly safeguarded; equality in one toy is not a universal equivalence theorem.
Optional supplement: nonmonotone watchdog cycles¶
A second-order correction changes the trial point to compensate for constraint curvature. A watchdog instead permits a limited period of merit increase while taking the algorithm’s ordinary directions. It saves an anchor and returns to it if subsequent steps do not earn sufficient progress. Thus it changes acceptance history rather than adding a normal correction. This supplementary topic is outside the fourteen-page classroom sequence.
For the one-relaxed-step variant in Nocedal–Wright Algorithm 15.3, p.445, hold the penalty weight fixed throughout a cycle and choose . Let be the saved anchor, its descent direction, and .
Form the full trial . If , finish the cycle there. Otherwise keep this point temporarily as a relaxed step, retaining the saved anchor and direction.
Compute an ordinary descent direction at the relaxed point and backtrack to , requiring .
Resolve the cycle with the following branches:
If or , keep and finish the cycle.
If neither holds and , roll back to the saved anchor and backtrack along the saved direction. Set with , then finish the cycle.
Otherwise , but the earlier tests did not establish the required recovery. Take one further ordinary descent step from , with its own Armijo line search, and finish the cycle at .
The saved anchor, primal/dual state, direction and weight must remain recoverable until the cycle succeeds; accepted trial state should not overwrite the only rollback copy. In this variant at most three new indices separate the distinguished cycle endpoints. More permissive multi-relaxed-step schemes need their own limits and recovery tests; they are not obtained by simply suppressing Armijo indefinitely.
For an acceptance trace with , a relaxed full trial fails the anchor bound -.1. If the next direction has derivative-1 and step length.5, its own Armijo bound is.15. A second merit-.12 passes that local bound and recovers the anchor’s required decrease, so the two-step cycle succeeds. A different trace with , second-direction derivative-1, step length1 and satisfies its local bound.3 yet remains above the anchor: it must roll back. Local decrease from the relaxed point is not the same as recovery relative to the saved anchor.
A convergence proof analyzes the distinguished cycle endpoints and the underlying direction/line-search assumptions. It does not demand that every intermediate merit value decrease. Local full-step and rate results also require the usual regularity and curvature hypotheses; a finite relaxation window alone proves neither convergence nor a global minimum. Compared with correction, watchdog cycles can avoid the extra correction-specific constraint evaluation, but rollback and extra ordinary steps can still cost evaluations. See Nocedal–Wright §§15.5–15.6, pp.440–446, especially Algorithm15.3; the existing SQP notebook implements second-order correction, not this optional watchdog variant.
Inequality extensions and implementation scope¶
For the convention , an violation measure is . Equality multipliers are unrestricted and inequality multipliers nonnegative; exactness thresholds include their corresponding magnitudes. Directional derivatives for a zero inequality residual use rather than the absolute value used for an equality. Active inequalities, critical-cone curvature, QP feasibility and elastic relaxation need their own assumptions. The equality formulas do not transfer unchanged merely by renaming the residual. Local Optimality, Constraint Qualifications, Second Order Optimality Conditions and the SQP implementation provide the canonical details.
Additional references¶
Fletcher, Leyffer and Toint (2002), “On the global convergence of a filter-SQP algorithm,” SIAM Journal on Optimization13(1), pp.44–59. Equations 2.5/2.6 distinguish margin choices; Theorem 7 states the convergence alternatives. DOI.
Wächter and Biegler (2006), “On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming,” Mathematical Programming106, pp.25–57. Section2.3 specifies the barrier filter, switching and restoration. DOI.
- Fletcher, R., Leyffer, S., & Toint, P. L. (2002). On the Global Convergence of a Filter–SQP Algorithm. SIAM Journal on Optimization, 13(1), 44–59. 10.1137/s105262340038081x