A stop that knows the distance
Worth reading first: A nearest point that is not there · An iteration that walks out of the set.
A fit with no answer to find fitted rank-two decompositions to random 2 × 2 × 2 tensors whose slice pencil has a complex pair — tensors of rank three, which have no best rank-two approximation. The fit did not wander. Its error settled at a number, and that number was the tensor’s distance to the surface where its pencil has a double eigenvalue, the boundary of the closure of the rank-two set, computed by Newton’s method with no fitting at all. Meanwhile the fit’s terms grew without limit, cancelling each other, and the error’s excess over the distance fell like the inverse square of their size.
The essay’s open question turned that into a stopping rule. “If the distance can be computed, a fit can be stopped when its error is within a stated fraction of it, before its terms have grown. The prediction with a sign is that at a tolerance of one per cent the terms are still within a factor of three of the tensor’s norm on every draw at n = 2, because the excess falls as the square of the size and one per cent is reached early.”
The figure at the top is each draw’s largest term at the stop, over the tensor’s norm, against the tolerance. At one per cent the median term is about seven times the norm and the smallest 3.8. No draw is within three. The stop works — it ends the fit at a stated distance from the best achievable error — but it does not end it before the terms have grown, and the reason is the law the prediction cited.
The stop
The draws are the first twenty-four seeded random 2 × 2 × 2 tensors, from seed 200, whose pencil has a complex pair; their distances to the boundary run from 0.0057 to 0.21 of their norms. For each, the distance comes from the earlier essay’s Newton solve on the discriminant’s zero set, and the fit is alternating least squares from one fixed random start, run for 20,000 sweeps. The stop at tolerance τ is the first sweep at which the fit’s relative error is at most , for τ of a tenth, three hundredths, a hundredth, three thousandths and a thousandth. At each stop the record is the sweep and the size of the largest rank-one term — the product of its three factor columns’ norms — over the tensor’s norm.
One draw of the twenty-four is set aside, and why is its own small result. On seed 266 the computed distance is 0.559, and the fit’s error falls below it at the first sweep and settles at 0.181. A fit’s error cannot fall below the true distance to the closure of the rank-two set, so the Newton solve there converged to a point of the surface that is not the nearest one. The fit caught it.
Twenty-three draws sit on the diagonal or just above it, as they should. Seed 266 sits far below. The Newton solve starts from the point where the tensor’s own gradient step reaches the surface and then solves the conditions for a stationary distance, which a nearest point satisfies and so do farther ones; on this tensor it converged to one of the farther ones. A stopping rule that trusts a computed distance needs that check, and the check is free: a fit’s error below the distance means the distance is wrong.
One per cent is not early enough
On the twenty-three remaining draws, every one reaches a tenth of the distance within 20,000 sweeps, with terms 1.6 to 7.3 times the norm. Twenty-one reach a hundredth, with terms 3.8 to 12.9 times the norm; seventeen reach three thousandths, at 6.9 to 17.5; thirteen reach a thousandth, at 11.9 to 23.3. The median term roughly triples for each tenfold tightening of τ.
The shape of every draw’s run is the earlier essay’s law, and the dial shows four of them. On log axes the excess error over the distance against the term size is a straight line of slope minus two: the excess is for a constant belonging to the tensor. A stop at is where the excess, relative to , equals , so the term size there is
The prediction read the law as saying one per cent comes early, because an inverse square falls fast. It does fall fast — the excess drops a hundredfold for a tenfold growth in the terms — but it starts high. At a term size equal to the tensor’s norm the excess is already , and is about three per cent of the norm; for a tensor at distance 0.1, an excess of one per cent of the distance is a thousandth of the norm, thirty times smaller than , and the terms have to grow by , past five times the norm, to get there.
The law’s constant
The constant is not one number but it is not far from one. Over the twenty-one draws that reach one per cent, runs from 0.016 to 0.044, median 0.032 — under a factor of three, across tensors whose distances differ thirtyfold. And a tenfold tighter τ multiplies the size by 2.5 to 3.8, around , on every draw that reaches both. Those two facts make the size at any stop predictable before the fit is run: with the distance computed, a target τ gives a term size of to within a factor of 1.2 above and 1.4 below.
The constant shows no trend with the distance. The three smallest values, 0.016, 0.017 and 0.020, belong to tensors at distances 0.031, 0.081 and 0.025; the three largest, 0.044, 0.043 and 0.043, to tensors at 0.175, 0.046 and 0.056. Whatever sets it is a property of the tensor that the distance does not capture — plausibly how the pencil’s complex pair sits relative to the two eigenvalues the fit is forcing together, which the earlier essay saw closing on each other at the rate the terms grow — and it is narrow enough across these draws that its median is a usable planning number.
What the law says plainly is that the terms at a fixed relative stop grow as the distance shrinks, like . A tensor near the boundary — nearly of rank two — is the one whose fit must grow the largest terms to come within a given fraction of its small distance. The relative tolerance is the wrong kind for this: one per cent of a small distance is a small absolute error, and absolute error is what costs size.
Close tensors are slow
The same tensors pay in sweeps too. Every draw with a distance above 0.1 reaches one per cent within 700 sweeps, most within 200. The two closest — distances of 0.0165 and 0.0057 — do not reach it in 20,000, and the closest takes 13,622 sweeps to reach even a tenth. The earlier essay found the terms growing like the square root of the sweep count, so sweeps go as the square of the size, and with the size at the stop going as the sweeps go roughly as , with a constant that varies more from draw to draw than the size’s does: the scatter in the figure is a factor of five at a given distance.
So the stop is cheap for the tensors that are easy anyway and expensive for the ones near the boundary. That is the opposite of what a stop is wanted for. A fit to a tensor of distance 0.2 settles in a few hundred sweeps under any sensible rule; the stop earns its keep where the fit would otherwise run on, and there it is the slowest.
The stall test lands in the same place
The stop a code actually makes is not the distance stop, which needs a distance; it is a stall test — stop when the error changes by less than a small fraction of itself from one sweep to the next. At a threshold of it stops 22 of the 23 fits, at terms 8.2 to 12.4 times the norm and excess errors from 0.12 to 1.5 per cent of the distance: in the same range as the one-per-cent stop, by accident, because a run whose excess falls as and whose size grows as the square root of the sweep count has an error that changes by about a millionth per sweep somewhere in that range. At it stops none of them in 20,000 sweeps.
A still error is not a settled one found a stall test stopping a fit with one term too many before it had converged; here the same test is all that ends a fit with nothing to converge to, and where it ends it says nothing about how close the fit is. The figure puts the stall stops across a decade of excess — from a tenth of a per cent to one and a half — at nearly the same term size. The distance stop at least states its excess.
A stop in the tensor’s units
If the trouble with the relative stop is that one per cent of a small distance is a small absolute error, the remedy is to state the tolerance in the tensor’s units instead: stop when the error is within ε of the distance, ε a fraction of the tensor’s norm. The law then gives a term size of , with the distance gone from it.
Measured on the same runs, it does what the law says. Stopped within of the norm, all twenty-three draws stop — including the two the one-per-cent stop never reached — with terms between 4.1 and 6.6 times the norm, a spread of 1.6 against the relative stop’s 3.4, in 122 to 6,395 sweeps. Within of the norm they stop at 1.5 to 4.5 times the norm in at most 234 sweeps. The price is visible in the closest tensor: at distance 0.0057, an absolute is eighteen per cent of its distance, so its fit stops further from its best than a relative stop would allow. That is the trade stated honestly. A relative stop promises a fixed fraction of the best achievable error and charges near-boundary tensors in size and sweeps; an absolute stop promises a fixed error and a nearly fixed size, and charges them in how close to the best the fit comes.
A fit that has an answer and cannot stop met the mirror image of this choice on a tensor with a best approximation and a spare term; there too the question a stopping rule answers had to be stated in the units the caller cares about, because the iteration itself would not supply one. And a rank that is not a property of the tensor found the same eight numbers of rank three over the reals and two over the complexes; near the boundary there is a third dependence, on the tolerance. A tensor at distance 0.0057 is of rank three, and to any tolerance above that distance it is a rank-two tensor, which is the choice between the two stops in other words.
What the distance buys
The distance stop is the first rule in this field that says how far a fit to a tensor of this kind is from the best it could do, and that is worth having. The test that is a deadline found an indicator that fires on fits with nothing to reach and cannot say how near the end they are; a nearest point that is not there established that the infimum exists and is not attained. With the distance in hand, a fit can report its error as a multiple of the infimum, and a caller can choose τ knowing what it costs: in term size, roughly in sweeps.
What it does not buy is small terms. The terms at any useful τ are several times the tensor’s norm, and the decomposition at the stop is two large terms that mostly cancel — a representation whose factors carry digits the tensor does not, which is what one term too many found for a spare term and an iteration that walks out of the set found for the sequence as a whole. A user who needs a usable rank-two factorisation of a rank-three tensor needs a different answer: a constraint that keeps the terms bounded, accepting an error above the distance in exchange, or a rank-three decomposition, which is exact.
The bounded alternative, priced
The law suggests a price for that alternative without running it, on one assumption. The unconstrained fit passes through term size with error ; if a fit constrained to terms no larger than times the norm can do no better than that — if the fit’s own path is the best trade between size and error, which nothing here proves — then a bound of three times the norm costs an excess of about of the norm: for a tensor at distance 0.1, an error 3.6 per cent above the distance; for one at 0.02, eighteen per cent above it. The near-boundary tensor is again the one that pays, now in error rather than size, and the same quantity, , sets the price in both currencies.
What a library could report
None of this needs the stopping rule to be adopted to be useful. A rank- fitting routine that can compute, or be given, the distance to the boundary can report two numbers at whatever point it stops: its error as a multiple of the distance, and its largest term as a multiple of the tensor’s norm. The first says how much better any rank- fit could be; the second says how much the representation has paid to get there. On the runs here the stall stop at would have reported excesses of 0.12 to 1.5 per cent and term ratios of 8 to 12 — a caller seeing those knows the decomposition is two large cancelling terms near the best achievable error, and can decide whether that is what they wanted, which a bare “converged” never tells them.
What twenty-three tensors do not show
One size, , where the boundary is the zero set of a single quadratic discriminant and its distance can be computed by Newton’s method in nine unknowns; one random start per tensor; and one family of random tensors. At and above the boundary’s equation has degree and the distance is not computed here, so the stop does not yet exist there. The one wrong distance in twenty-four is a warning that the Newton solve needs either several starts or the fit’s check before its answer is trusted.
Still open: the distance at n = 3, and a bounded fit
The distance at n = 3. The boundary for 3 × 3 × 2 tensors is where the pencil has a double eigenvalue, and the distance to it can be found by Newton on the eigenvalue-coincidence condition rather than on the discriminant polynomial. The prediction with a sign is that the fits’ common error at equals that distance to within two per cent, as at , and that the size at a one-per-cent stop follows the same with a constant in the same range.
A fit with its terms bounded. Add a penalty on the term sizes to the least-squares objective and the fit has a best answer again. The prediction is that the penalised fit’s error at a term bound of three times the norm sits within ten per cent of , the unconstrained law’s value at that size, so that the law prices the bounded alternative before it is run.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- The rank a sweep can vouch for — both name alternating least-squares, border-rank, cp decomposition, degeneracy, stopping criterion, tensor rank
- A tensor that cannot be decomposed — both name alternating least-squares, border-rank, cp decomposition, tensor rank
- The rank that stops being typical — both name border-rank, cp decomposition, matrix pencil, tensor rank
- A factorisation that is unique for once — both name alternating least-squares, cp decomposition, tensor rank
- The repair that costs exactly itself — both name alternating least-squares, border-rank, cp decomposition
- The orthogonality that cannot be diagonal — both name cp decomposition, tensor rank
Named objects
A flat tag is an object no other essay names yet.
Alternating least-squaresBorder-rankCP decompositionDegeneracyMatrix pencilStopping criterionTensor rank