A still error is not a settled one
Worth reading first: An iteration that walks out of the set · A parameter that counts steps.
Alternating least squares fits a tensor with a sum of rank-one terms by solving for one factor at a time, and every sweep lowers the error. An iteration that walks out of the set showed that it can lower it forever without arriving, when the nearest point of that rank does not exist. The test that is a deadline looked for a quantity that separates that swamp from slow convergence and found one that fires on both, at very different sweeps. The rank a sweep can vouch for decided a tensor’s rank by fitting at one rank after another and found that the simplest rule — stop at the first rank past which one more term improves the error by less than a fifth — was right on all twenty-four tensors it was given.
Then a fit that has an answer and cannot stop found where that rule’s cost goes. Fitted with one term too many, a noisy tensor produces a fit whose error is within five per cent of its final value by sweep 150 and which never meets the usual stopping test: that test waits for the error to stop changing in its sixteenth digit, and the fit’s near-cancelling pair of terms slides along a nearly flat valley for thousands of sweeps, moving the error by parts in a million. The rank sweep capped those fits at 1,500 sweeps and spent most of its budget there.
That essay’s open question was whether a test stated in the tolerance of the decision the fit serves — a few per cent for a rank — could stop those fits early without knowing the decision in advance. The obvious test reads only the error: stop when the error has fallen by less than δ of itself over the last ten sweeps. This essay measures it on the fits it was proposed for, and on a second family it was not: fits that have an answer, reach it, and are merely slow getting there.
The test works on the first family at any tolerance. On the second it cannot tell a plateau from a floor, and at the tolerance a rank decision would state it gives the wrong rank.
The window test
At sweep s the test compares the error with its value ten sweeps earlier. If the fall is less than δ times the current error, the fit stops. It needs no parameter but δ and the window, and it reads nothing the iteration does not already compute.
Because it reads only past errors, it can be applied to a run already made: the run the test would have made is the stored run cut off at the sweep where the test fires. Every measurement below does exactly that, on runs made with the usual test — whose stored traces are the runs the window test would have produced up to its own stopping sweep.
Four tolerances are measured: , the few per cent a rank decision needs; ; ; and . The window is ten sweeps throughout.
On the fits it was proposed for
The four-term fit at 1% noise falls from an error of 0.27 after one sweep to 0.0085 by sweep ten, and then barely moves. The window test stops it at sweep 19 with δ = , at 21 with , 22 with and 25 with . The four stops are within six sweeps of one another, because the error’s fall ends abruptly: by sweep 25 it is falling by less than a part in a hundred thousand per ten sweeps, and every tolerance measured is met within a few sweeps of the others.
The dial shows the same thing at the other two noise levels, with one exception that is worth noticing. At 0.1% noise the four tolerances stop the fit between sweeps 22 and 27, at an error four thousandths of a per cent above the error at sweep 6,000. At 3% the three loosest stop it between sweeps 18 and 22, 2.3% above; the tightest, , does not stop it until sweep 5,914. At that noise level the crawl along the valley is itself fast enough to move the error by more than a part in a hundred thousand every ten sweeps — which is the 2.3% the other three leave behind, spread over six thousand sweeps. A tight enough window test is the usual test again, and at 3% noise is tight enough.
That is the behaviour the previous essay predicted from the settling times, and it holds across the whole rank study: six planted rank-three tensors at four noise levels from none to 3%, each fitted at ranks two to five from five starting points, the rank named by the ratio of consecutive errors.
The usual test spends 311,458 sweeps and names rank three on all twenty-four. The window test names rank three on all twenty-four at every tolerance, and spends 30,250 sweeps at , 36,475 at , 69,261 at and 150,591 at . The loosest tolerance costs under a tenth of the usual test; the tightest costs half.
And the errors it stops at are close to the ones the usual test reaches. Over every tensor, rank and tolerance the best start’s error at the window test’s stop is at most 8.5% above the usual test’s, and the rule it feeds only needs to tell a factor near 0.95 from a factor of seven or more. On the noisy tensors the savings are almost all at ranks four and five, where the usual test runs to its cap: a noisy tensor that cost the usual test around fifteen thousand sweeps costs the window test at between four hundred and sixteen hundred. On the noise-free tensors, whose fits converge to rounding and then stop, the window test saves between a tenth and two fifths.
So far the proposal looks finished: state the test in the decision’s tolerance, and the fits that could not stop do.
On a fit that is slow and does finish
The test that is a deadline kept a second kind of hard fit beside the swamp: a genuinely rank-three tensor whose factor columns lean towards one another, so that the small system each sweep solves is badly conditioned. Alternating least squares on such a tensor sits on a plateau for hundreds or thousands of sweeps and then converges, and that essay’s elasticity test fired on every one of them at sweep 758 — mistaking slowness for a boundary.
The window test has the same problem in a sharper form.
From the first starting point the error falls to about within twenty sweeps, sits there until about sweep 300, steps down near sweep 500, and then falls ten orders over the next three thousand sweeps to at sweep 3,456. The window test at stops it at sweep 25 with an error of ; at , at sweep 41 with . Only at does it wait for the answer, stopping at sweep 3,444 at .
On a plateau the error is still. The window test asks whether the error is still, and has no way of asking whether it will stay still. What made the noisy overfit safe to stop — its error had reached the value it would keep — is exactly what a plateau imitates.
At cosine 0.9 the window test at stops five starts of six on the plateau, at errors between and times the answer each run goes on to reach. At it still stops two of six there. At and it stops none early: every start runs to its answer. At cosine 0.99 the fits are slower still and none has converged by sweep 6,000, so the multiple is against an error that is itself not the answer; even so, the loosest tolerance stops all six at between two and twenty-two times the error they reach, and stops two of them early.
That is the claim this essay refuses: that an error which has stopped moving by a per cent over ten sweeps is within a tenth of where the fit will end. On the noisy overfits it is, by construction of the valley they crawl along. On the slow fits it is wrong by ten orders of magnitude.
Whether the rank survives it
A single stopped start is not a rank decision. The rank sweep takes the best of five starts at each rank, and if any start escapes its plateau before the window test fires, the best of five is right. So the question that matters is whether the rank named changes.
With the usual test the rule names rank three on five of the six. On the fifth, even 6,000 sweeps do not bring the rank-three fits below , while rank five reaches , and the rule names five — a failure of the sweep budget rather than of the rule, and one that every tolerance of the window test repeats.
With the window test at the rule names rank three on one tensor of six. On three it names four and on two it names five. On the first tensor the five rank-three starts are stopped with a best error of , while a rank-four start escapes its plateau and reaches ; the ratio of the two says a fourth term improves the fit by a factor of two hundred million, and the rule believes it. The fourth term is not fitting structure. It is fitting the time the rank-three starts were not given.
At the rule names what the usual test names on all six tensors, although single starts are still stopped on plateaus: the best of five is enough to carry one start past it at each rank. At and it names the same again. The sweeps tell the rest: the usual test spends 586,347 over the six tensors, the window test at spends 72,402 and gets four wrong, at it spends 290,226 and gets none wrong, and at 479,432.
A tenth of the decision’s tolerance
Put the two families side by side. On the noisy overfits every tolerance measured keeps every decision, and the loosest saves a factor of ten. On the slow fits the loosest changes four decisions of six, and a tolerance ten times tighter keeps all of them while still halving the cost. The tolerance that serves both is : it keeps all thirty decisions, costs 36,475 sweeps against 311,458 on the noisy family and 290,226 against 586,347 on the slow one.
So the test can be stated without knowing the decision in advance, which was the open question, but not in the decision’s tolerance. The decision needs the error to a few per cent. The stopping test needs δ a factor of ten below that, and the factor is not about the decision’s accuracy at all. It is the depth of the plateaus: a slow fit’s error on its plateau falls by between a part in ten thousand and a part in a thousand over ten sweeps, and a δ above that stops it there.
There is nothing universal in the number ten. It is what these plateaus measure, on these tensors, at this window. A flatter plateau — more nearly parallel factors — would need a smaller δ, and at cosine 0.99 even stopped two starts early. What the measurement establishes is the direction: a window test tuned to the tolerance of the decision is tuned to the wrong thing, and needs a margin set by the slowest fit the procedure will meet.
What the window cannot see, and what could
The window test fails on slow fits because it looks only at how much the error moved. A stopping test is a race described a stopping test as a race between the iteration’s progress and a threshold, and a tolerance that reads its own residual found inexact Newton’s forcing rule doing better by reading the ratio of successive residuals than by reading any single one. Something similar is available here and is not measured: a plateau is not only still, it is still while the fit’s terms are growing towards each other, and the collinearity of the terms, which one term too many used to see a degenerate fit, rises on a plateau and falls when the fit leaves it.
A different route changes the fit rather than the test. The repair that costs exactly itself put a ridge on every subproblem and found that it stopped a swamp’s terms from growing and brought a run that never finished to an end in 798 sweeps, at a cost in error equal to the ridge. A plateau is a badly conditioned subproblem as much as a swamp is, and a ridge may shorten it; whether it shortens it enough to change what the window test sees is not measured here.
A second route costs more and needs nothing new. The rank sweep already runs five starts at each rank. A window test that stops a start only when two starts at the same rank agree on the error — the agreement that the rank-sweep essay found never wrong when it could decide — would refuse to stop a lone start on a plateau while its neighbours are below it.
What this rests on
Planted rank-three tensors of size : six with Gaussian noise at 0.1%, 1% and 3% and without noise, and six without noise whose factor columns lean together at cosine 0.9, with a second family at 0.99 for the single-fit measurements. Alternating least squares with a ridge of , five starts per rank, the usual test at a relative change of capped at 1,500 sweeps for the noisy study and 6,000 for the slow one. A window of ten sweeps and four tolerances; other windows are not measured. The window test’s runs are the usual test’s stored runs cut at the window test’s stop, which is exactly what the window test would have produced.
The claim that has to fail
The claim is that an error which has fallen by less than a per cent of itself over ten sweeps is within a tenth of where the fit will end. On the slow tensor at cosine 0.9, five of six starts are stopped at errors near that go on to reach to . The refusal is fed the claim that every start stops within a tenth of its final error, and fails.
Still open: plateaus the window can recognise, and the depth of a plateau
A window that also reads the terms. The collinearity of the fitted terms rises on a plateau and falls when the fit escapes it, while on a noisy overfit it is high and stays high. A test that stops only when the error is still and the collinearity is not changing would separate the two families on this evidence, and whether it keeps every decision at is one pass over the same stored traces.
Agreement among starts as the stopping signal. Stopping a start only when another start at the same rank has reached the same error would prevent a lone start from being stopped on a plateau. Its cost is the waiting of the fastest start for the second fastest, and whether that is less than the tenfold tightening measured here is not known.
How deep a plateau can be. The factor of ten between the decision’s tolerance and the test’s is the fall of the error across ten sweeps of a plateau at cosine 0.9. At 0.99 the plateaus are flatter and was not enough. Measuring that fall against the cosine of the factors would say how the margin has to grow as the tensor becomes harder, and whether any fixed δ can serve a procedure that does not know how nearly parallel its answer’s terms are.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A factorisation that is unique for once — both name alternating least-squares, cp decomposition, swamp, tensor rank
- A tensor that cannot be decomposed — both name alternating least-squares, cp decomposition, tensor rank
- A run that is over at step five — both name convergence rate, stopping criterion
- A spectral radius that grows first — both name convergence rate, stopping criterion
- The orthogonality that cannot be diagonal — both name cp decomposition, tensor rank
- The tolerance that buys no agreement — both name convergence rate, stopping criterion
Named objects
A flat tag is an object no other essay names yet.
Alternating least-squaresConvergence rateCP decompositionDegeneracyStopping criterionSwampTensor rank