The observation that cannot be removed
Worth reading first: A correction cheaper than the problem · The projection and the right angle · A factorisation with nothing to pivot for.
Adding a rank-one term to a Cholesky factor is easy and safe. A sequence of Givens rotations — orthogonal, each of them, and therefore each of them incapable of amplifying anything — takes R to the factor of RᵀR + xxᵀ in 2p² operations, and the result is as accurate as a fresh factorisation.
Removing one is a different problem, and the difference is not a matter of degree.
An orthogonal transformation preserves the Frobenius norm. Removing a term makes the matrix smaller. So no sequence of orthogonal transformations can perform a downdate, and the algorithm that does is built from rotations that are not orthogonal:
[ c −s ] with c² − s² = 1 rather than c² + s² = 1
[ −s c ]
a hyperbolic rotation. It preserves a² − b² instead of a² + b², which is exactly what removing a
term needs. And the property that made the orthogonal version safe — that ‖G‖ = 1, so nothing it
touches can grow — is precisely the property it has given up. c and s are both unbounded.
The measurement
A 40×6 design matrix, with the leverage of its first row set rather than measured — the row is scaled until h takes a chosen value, so the axis is an input. The Gram matrix G = AᵀA is factorised; then aaᵀ is removed from it two ways.
| h | ‖R̄ᵀR̄ − (G − aaᵀ)‖ / ‖·‖, downdated | refactorised | κ(G − aaᵀ) |
|---|---|---|---|
| 0.3 | 2.1·10⁻¹⁶ | 1.2·10⁻¹⁶ | 4.3 |
| 0.99 | 3.6·10⁻¹⁵ | 1.6·10⁻¹⁶ | 3.3 |
| 1 − 10⁻⁴ | 8.0·10⁻¹³ | 6.8·10⁻¹⁷ | 4.0 |
| 1 − 10⁻⁷ | 3.5·10⁻¹⁰ | 1.8·10⁻¹⁶ | 4.3 |
The fitted slope of the downdate against 1/(1 − h) is 1.04.
And the last column is the finding. The matrix being produced has a condition number of about four at every row of that table. It is not a hard matrix. A fresh factorisation of it is exact to rounding at every leverage. The difficulty belongs entirely to the route.
The number under the square root
The mechanism is one line of algebra and it is the reason this essay exists.
Downdating G by aaᵀ begins by solving Rᵀp = a. The first hyperbolic rotation’s coefficients are 1/√(1 − pᵀp), and
pᵀp = ‖R⁻ᵀa‖² = aᵀ(RᵀR)⁻¹a = aᵀ(AᵀA)⁻¹a = h
which is the leverage of the row a — the diagonal of the hat matrix H = A(AᵀA)⁻¹Aᵀ, a quantity every regression package computes and every regression textbook plots.
So the algorithm’s amplification factor is 1/√(1 − h), its breakdown condition is h ≥ 1, and both are the statistician’s warning written in a different alphabet. A leverage near one means this observation is the only thing determining some direction of the fit; the downdate says the same thing by having no real square root.
Neither field states it in the other’s language. Numerical analysis texts derive the downdate and observe that it fails when the result is not positive definite. Statistics texts define leverage, prove it sums to p, and warn about points near one. They are the same number and the two derivations never meet.
The statistic that is the same downdate
Leave-one-out cross-validation asks: refit without observation i, and how badly does the fit predict it? Doing that honestly is m refits. The closed form everybody uses instead is
e₍ᵢ₎ = eᵢ / (1 − hᵢ)
— one division per observation, and it is a rank-one downdate written as arithmetic. Every package that reports a studentised or deleted residual is running this.
It agrees with refitting. Measured against forty actual refits on a forty-observation problem, the worst relative disagreement is 1.3·10⁻¹². That agreement is what licenses the shortcut, and it is worth having as a measurement rather than as a derivation, because the derivation is exact and the question is arithmetic.
And the divisor is 1 − h. At h = 0.999 the closed form multiplies the residual by a thousand, and the thousand is correct — that observation really does drag the fit onto itself, and removing it really does move the prediction that far. What is not correct at that point is any digit past the fourth, because the numerator was computed against a fit that observation dominated.
Why the closed form is everywhere and the downdate is not
There is an asymmetry between the two halves of this essay worth accounting for. The leave-one-out formula is in every statistics package; the hyperbolic downdate is in LINPACK, in a handful of signal processing libraries, and almost nowhere else.
The reason is that the two are doing different amounts of work. eᵢ/(1 − hᵢ) produces one number —
what the fit would have predicted at observation i without it — and needs the leverages, which cost one
triangular solve each and are usually wanted anyway. The downdate produces a whole factor, which is
what a caller needs when the reduced problem is going to be solved again: a sliding window, a recursive
least squares with a forgetting factor, an active-set method releasing a constraint.
So the closed form is the cheap special case of the general operation, and it is the one that has a denominator a user can look at. The downdate has the same denominator buried inside a square root inside a loop, where nothing reports it.
That is worth naming as a general habit rather than a fact about these two routines. A shortcut whose
dangerous quantity appears in the output is safer than one whose dangerous quantity appears in an
intermediate, even when the arithmetic is identical — because a caller can see the first and cannot
see the second. eᵢ/(1 − hᵢ) at h = 0.999 announces itself by returning a residual a thousand times
the others. A downdate at h = 0.999 returns a factor that looks like every other factor.
The three quantities that agree, and one that does not
Three routes to h, sharing no arithmetic:
The triangular solve. ‖R⁻ᵀa‖², from a forward substitution against the Cholesky factor. The inverse. aᵀG⁻¹a, forming G⁻¹ explicitly — one of the legitimate uses of an inverse, since the entries are the answer. The hat matrix. The (i, i) entry of A(AᵀA)⁻¹Aᵀ, from the projection itself.
They agree to 10⁻⁸ at every leverage tested, which is the site’s two routes habit applied to a quantity that has three.
And one that does not agree, which is the sum rule: Σhᵢ = p, exactly. Not approximately — the trace of a projection onto a p-dimensional subspace is p, and the measurement returns 5.999999999999998 for a six-column fit. Adding a column adds exactly one unit of leverage to be shared out, whatever the data looks like, so the average leverage is p/m and depends on nothing.
That last fact is worth pausing on because it says what leverage is. The response y does not appear in it anywhere. Leverage is a property of the design — of where the observations were taken — and not of what was measured there.
When the downdate simply fails
Past a leverage the arithmetic can distinguish from one, a step’s discriminant a² − b² comes out negative and the algorithm stops. That is the honest outcome and it is worth separating into two cases.
h > 1 genuinely. Impossible: leverage is a projection diagonal and lies in [0, 1]. So a negative discriminant is never a correct report of an impossible downdate for a Gram matrix.
h < 1 but not distinguishably. At h = 1 − 10⁻¹⁶ the stored value of 1 − h is a rounding error, and the algorithm refuses a downdate that is mathematically fine. The result it refuses to produce is, once again, a well-conditioned matrix a fresh factorisation would return without complaint.
A refusal is much better than a wrong answer, and it is the behaviour a caller can act on. What it is not is a statement about the problem, and the temptation to read it as one — this downdate is ill-posed — is exactly the misattribution this site exists to separate.
What to do instead, and what it costs
The alternative is a refactorisation, and the cost is worth being exact about because it is smaller than it looks.
Downdating a p×p factor is 2p² operations. Refactorising G − aaᵀ from the Gram matrix is p³/3 — at p = 6 that is 72 against 72, which is to say nothing at all. The saving only becomes real when the Gram matrix itself has to be reassembled from a large A, at mp² operations, and that is a saving of a factor of m rather than of p.
So for a small model on a large dataset — the usual case in a sliding-window or leave-one-out setting — the downdate is worth having, and it is worth having with a guard: compute the leverage first. It costs one triangular solve, it is a number worth looking at for its own sake, and it decides whether the shortcut is safe before the shortcut is taken.
Where the leverage is high, the honest options are to refactorise, or to notice that the answer being asked for is a fit with one direction supported by a single observation, and that the numerical question is the smaller of the two problems.
The mechanism, twice
This is the second algorithm in two essays whose error is governed by the object it routed through rather than by the problem it answers, and the two share no arithmetic.
Sherman–Morrison’s four quantities are solves against A, so its error is κ(A)u while the answer’s condition number is one. A hyperbolic downdate’s rotations are built from R, so its error is proportional to 1/(1 − h) — a property of the original Gram matrix and the row being removed — while the matrix it produces has a condition number of four.
One formula, one sweep of rotations; one governed by a condition number, one by a leverage. The general statement is the phase’s second finding: where a method reaches its answer through an intermediate, the intermediate’s conditioning is what it charges, and the answer’s conditioning is what a reader checks.
The sliding window, which is a downdate at every step
The setting where downdating is not an occasional operation but the whole algorithm is recursive least squares, and it is worth describing because it turns the leverage question from a diagnostic into a design parameter.
A recursive least-squares filter maintains a fit over the most recent w observations. At each step one row arrives and one leaves: an update and a downdate, both rank one, both at 2p² operations against a refactorisation’s mp². For a filter running at kilohertz over a model of six parameters, that is the difference between running and not.
The exponentially weighted variant is the same thing done continuously. Instead of dropping a row, every existing row is multiplied by √λ with λ slightly below one — a forgetting factor — so the influence of old data decays geometrically. Written as a factorisation update it is R ← √λ R followed by an ordinary Givens update for the new row, and there is no downdate in it at all. The hyperbolic rotations are gone, the algorithm is orthogonal throughout, and the whole of this essay’s difficulty disappears.
What it costs is that the window is soft. The effective number of observations is 1/(1 − λ), which is a statement about a geometric weighting rather than a count, and a filter that must forget an exact number of samples cannot use it. So the choice between a sliding window and a forgetting factor is a choice between a hard boundary computed unstably and a soft one computed stably — which is a modelling decision being made by a numerical constraint, and worth recognising as one.
And the leverage is the design parameter. In a sliding window the row about to leave has a leverage determined by how much of the fit it was holding up, and a window short enough that individual rows carry high leverage is a window in which the downdate is unstable and the fit is dominated by individual observations. Those are the same statement. A filter whose downdate is in trouble is a filter whose window is too short for its model, and the numerical diagnostic and the statistical one agree because they are the same number.
What is worth carrying
An orthogonal sweep cannot make a matrix smaller, and the sweep that can has no bound on its coefficients. That is not an accident of one algorithm; it is what removing a term costs, and every downdating method pays it in some form.
The breakdown condition is the leverage, exactly, which means the diagnostic already exists and is already plotted in a different field. Compute h before downdating; it is one triangular solve and it is the number that decides.
A dangerous quantity in the output beats the same quantity in an intermediate. The leave-one-out formula divides by 1 − h where a reader can see it; the downdate takes its square root inside a loop where nobody does. Same number, same danger, and only one of them announces itself.
And a leverage near one is not ill-conditioning of the answer. The downdated matrix has a condition number of four at every leverage measured here. What a high leverage says is that one observation was holding a direction of the fit up, which is a statement about the design and a much more interesting one than a numerical warning.
The next essay leaves updates behind and asks a question the phase has been circling: what is a function of a matrix, and is the definition a method? A function of a matrix is not a function of its entries.
What links here
Computed from the collection, not written here: the essays that point at this one.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A condition number for one eigenvalue — both name condition number, orthogonality
- An iteration that only multiplies — both name condition number, orthogonality
- An orthogonalisation nobody calls one — both name condition number, orthogonality
- Changing the condition number on purpose — both name cholesky, condition number
- Orthogonal is a number — both name condition number, orthogonality
- The condition number is an amplifier — both name condition number, orthogonality
Named objects
A flat tag is an object no other essay names yet.
CholeskyCondition numberGivens rotationLeast squaresLeverageLow-rank updateMatrix inverseOrthogonality