An iteration that walks out of the set
Worth reading first: A nearest point that is not there · The road that squares the problem.
The model this essay fits is the one the first two essays of this field are about: a sum of r rank-one terms, whose least r is the tensor’s rank.
Fix every factor but one and the model is linear in what is left, so each of the d subproblems is an ordinary least-squares solve — the object this collection has had from the beginning. Sweep round the modes until nothing moves. Every step is the exact minimiser of its own subproblem, so the objective can only fall, and the method has been the default for four decades.
What it does not have is a limit.
One sweep
The arithmetic is worth writing out, because the whole of the essay’s numerical caveat is in one line of it.
For mode k, the model’s unfolding is A_k · (⊙_{i≠k} A_i)ᵀ, where ⊙ is the Khatri–Rao product — the column-wise Kronecker product of the other factor matrices, which is n^{d−1} × r. The least-squares solution for A_k is therefore
A_k = M_k · KR · (⊛_{i≠k} A_iᵀA_i)⁻¹
where M_k is the tensor’s mode-k unfolding and ⊛ is the entrywise product of the small Gram matrices.
The inverse there is of an r × r matrix, and it is formed through the normal equations of that system rather than through a decomposition of the tall Khatri–Rao matrix. That is the road this collection has a whole essay warning about, and it is taken here deliberately: the matrix being squared is r × r with r at most five, and the alternative is a decomposition of an n^{d−1} × r matrix at every step of every sweep.
The consequence is stated rather than hidden. A ridge of the machine epsilon times the trace is added, and what it is for is precisely the case this essay is about — a swamp is a run in which that matrix becomes singular by design, and without the ridge the run would end with a division rather than with a measurement.
The objective can only fall
The first measurement is the reassuring one and it is worth having because it establishes what the failure is not.
A rank-three fit to a tensor built from random rank-three factors stops itself after fifty-eight sweeps: the error runs from 0.487 to 9.7·10⁻¹⁵ and every sweep is at least as good as the one before it, which the assertion checks sweep by sweep rather than end to end. There is nothing wrong with the method’s monotonicity, and there is nothing wrong with its arithmetic.
The largest rank-one term over the same run does not move at all: 12.202 at sweep twenty and 12.202 at sweep two hundred, to five figures.
And it can fall for ever
The same code, at rank two, on the tensor whose rank is three and whose distance to the rank-two set is zero.
Over twenty thousand sweeps the error goes from 0.614 to 1.4·10⁻³ and the largest rank-one term goes from 3.98 to 10.15. Neither has finished. The error is still falling at the last sweep and the term is still growing, and a run of two hundred thousand would produce the same picture with both axes extended.
That is a swamp, and it is not a numerical accident, a bad starting point or a precision problem. It is the geometry of the previous essay arriving as a plateau in an iteration count: the sequence of iterates is a sequence of rank-two tensors approaching a rank-three limit, and there is nothing in the set for it to converge to.
The measurement that separates the two readings
A long plateau at a small residual looks the same as slow convergence, and the objective alone cannot tell them apart. What can is the size of the terms.
The trace records, per sweep, the magnitude of each rank-one term — the product of its columns’ norms — rather than the largest column norm. That distinction matters: a single factor’s norm can be held at one by rescaling the others, without changing the model at all, so a plot of column norms can be made to show anything. The product is invariant under that rescaling and is the quantity that has to diverge.
Fitted over two hundred points, the relation between them is
error ∝ (term size)^{−2.03}
which is not the relation the explicit sequence of the previous essay gives. That sequence has error √3/n against a term size of n, so a product that is constant. The path an alternating fit takes is better — at a term size of 10.15 the explicit sequence’s error would be 0.17 and this fit’s is 0.0014 — and it is still walking out of the set rather than converging inside it.
Both statements are useful. The first says the diagnostic is real: a run whose terms are growing in proportion to its residual’s fall is not converging. The second says the rate is a property of the path rather than of the geometry, so quoting the explicit sequence’s constant as a prediction would be wrong.
What a practitioner sees
It is worth being concrete about what the failure looks like from outside, because none of the usual stopping rules catch it.
A relative change test stops early and reports success. The error changes by less than 10⁻⁶ between sweeps for tens of thousands of sweeps, so any rule of the form stop when the objective stops moving fires almost immediately, at a residual that looks respectable.
A residual test reports success too. The fit reproduces the data to a fraction of a per cent, which on real data is well inside the noise.
The factors are the output, and they are the artefact. The returned terms have magnitude 10.15 against data of magnitude 1.7, and they cancel. Reading them as components — which is the entire reason for preferring this model to a matrix factorisation — reads the cancellation as structure.
So the diagnostic has to be the term size, it costs one line, and it is the number this page exists to put on a figure.
Why the objective is the wrong thing to watch
The general point is worth separating from the tensor that occasions it, because it applies to every descent this collection runs.
A monotone objective proves that an algorithm is behaving. It proves nothing about whether the problem has an answer, and the two are usually conflated because for most problems the second is not in doubt. Least squares on a matrix has an answer; a linear system with a non-singular matrix has an answer; conjugate gradients on a positive definite operator has an answer. In every one of those the objective falling is the whole story.
Here it is half the story, and the missing half is a property of the parameters rather than of the objective. That is a shape this collection has met before under other names. The sequence field measures a Newton iteration whose residual falls onto a plateau that is the linearisation’s own error rather than the answer’s. The iterative field measures a conjugate gradient run whose reported residual goes below the unit roundoff while the true residual does not. In both, a quantity that looks like progress is measuring something other than the distance to the answer.
The rule that comes out of all three is the same: report the size of the thing being returned beside the size of what is left over. It costs one line, it is scale-free once the terms are measured as products, and it is the only number on this page that distinguishes the two runs.
The near-boundary case, which is the common one
A target exactly on the boundary is a measure-zero event. What happens near it is the practical version and it is worse in one respect and better in another.
Near the boundary the best rank-two approximation exists — the set is closed except at the boundary itself, and a target at distance δ from a rank-three tensor with δ > 0 has a nearest rank-two point. So the iteration converges. What it converges at is a rate that degrades as the target approaches the boundary, and to factors whose size grows as the distance shrinks.
The error field’s essay on the conditioning of a decomposition measures exactly that: the condition number of the map from tensor to factors, along a sequence approaching the boundary, is 2n² + 1 — so a target ten times closer has a decomposition a hundred times more sensitive. And the practical consequence measured there is severe: every tensor on that sequence is exactly rank two, with its two terms written down in closed form, and a three-hundred-sweep fit from a random start does not find them.
The seed, and what it decides
Every run above starts from random factors, so the natural next question is how much of the answer is the starting point.
On a target with a rank-r answer, every seed reaches it and every seed reaches the same factors — which is the next essay’s subject and is the one direction in which a tensor is better behaved than a matrix. On a target without one, the seeds do not agree about anything except that the residual falls, because there is no answer for them to agree about.
That is a cleaner separation than the randomised field’s, where the seed moves an answer that exists. Here it decides which member of a non-convergent family the run happens to be walking along, and the spread between seeds is not an error bar on an estimate — it is the absence of a thing to estimate.
Where the model is still the right one
None of this is an argument against the model, and it is worth saying so plainly because the previous sections read as one.
The reason to fit a sum of rank-one terms rather than a subspace format is that the terms mean something. A chemical spectrum measured at several excitation wavelengths and several times is a mixture of components, and a rank-r fit is supposed to return the components. A subspace format returns a basis for the space they span, which is not the same information and is not what was asked.
And the model delivers that, under a condition that is checkable and generically true — which is the next essay. What this page establishes is the other side of the same coin: the delivery is conditional, the condition can fail, and when it fails the failure is silent under every stopping rule anyone normally uses.
The pair is the honest description. A CP fit is the only decomposition in this field whose output is interpretable, and the only one that can return an artefact while reporting success.
What to do instead
Three answers, and this collection has essays about two of them.
Fit a different rank. The target has rank three; a rank-three fit reaches 10⁻¹⁵ in fifty sweeps and its terms do not move. If the rank is what is being estimated, a swamp is evidence that the rank is wrong, and the term size is the evidence.
Fit a different model. The multilinear rank and the train ranks are ranks of matrices; their sets are closed; and a projection onto them exists, is computable, and is quasi-optimal. Three essays of this field are about that trade, and what it gives up is the interpretability of the terms.
Constrain the factors. Requiring non-negativity, or orthogonality in one mode, or bounded norms, makes the feasible set closed and removes the phenomenon outright. What it does not do is make the original question well posed; it answers a different one, and the answer is a projection onto a set the data was not asked about.
The refusal
The claim under test is the one every stopping rule implicitly makes: that a plateau is slow convergence, and the remedy is patience.
The assertion that the largest term stays within half again of its value at sweep ten is fed the twenty-thousand-sweep trace of the border-rank run. It fails, at a growth of 2.16.
The refusal is worth having in this direction rather than the other. It would be easy to assert that the terms do grow, and that assertion would pass on a run that had diverged for any reason at all — including a bug. What is asserted instead is the flattering reading, on the run where it is false, so what the gate is protecting is the diagnostic rather than the phenomenon.
The file’s other two refusals guard the neighbours. One is fed the 2 × 2 × 2 rank-three case and required to refuse the claim that every CP decomposition is unique, which is the next essay’s boundary. The other is fed a benign run and required to refuse the claim that alternating least squares can go uphill, which is what keeps the monotonicity measurement from being read as a claim about the method’s convergence.
At other settings
Reads more easily once this is understood
Essays that name this one as worth reading first.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A tensor that cannot be decomposed — both name alternating least squares, border rank, condition squaring, cp decomposition, ill posed problem, tensor rank
- A factorisation that is unique for once — both name alternating least squares, cp decomposition, low-rank approximation, swamp, tensor rank
- A rank that is not a property of the tensor — both name border rank, low-rank approximation, tensor rank
- The orthogonality that cannot be diagonal — both name cp decomposition, low-rank approximation, tensor rank
- A decomposition made only of SVDs — both name alternating least squares, low-rank approximation
- Sketching what is never unfolded — both name khatri–rao product, low-rank approximation
Named objects
A flat tag is an object no other essay names yet.
Alternating least squaresBorder rankCondition squaringCP decompositionIll posed problemKhatri–Rao productLow-rank approximationNormal equationsSwampTensor rank