Generator

train-ranks

One function in the ttrain library, called 15 times across 9 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 7 claims it put to the test while drawing them, and where it stands against the rule this site is named for.

At its defaults it draws train ranks at each of the 5 cuts of a 6-index tensor on 6 points a side, four families. Cut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 5 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2, 2, 2, 2. The reciprocal family climbs to 10, the product family is one everywhere, and independent normal entries reach 216, which is the largest rank the cut allows. Storage runs sinsum 120, reciprocal 1,800, product 36, noise 95,976 against 46,656 entries.

train-ranks is one function in lib/figures/ttrain.js — the train — one rank per cut of the index list, and the iterate that must be cut back. Everything below came out of it during this build, at arguments taken from the essays rather than invented for this page. A figure here is the figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Drawn even though every essay passes arguments — which on this site is every essay, at 100% of placements since the standard pass. A default nothing exercises is a trap for the next essay to call this with none, and this is the page where a default that has drifted from the figures around it becomes visible.

Train ranks at each of the 5 cuts of a 6-index tensor on 6 points a side, four familiesCut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 5 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2, 2, 2, 2. The reciprocal family climbs to 10, the product family is one everywhere, and independent normal entries reach 216, which is the largest rank the cut allows. Storage runs sinsum 120, reciprocal 1,800, product 36, noise 95,976 against 46,656 entries.012345603672108144180216cut after index krank of the reshapesinsum · 2 2 2 2 2reciprocal · 6 9 10 9 6product · 1 1 1 1 1noise · 6 36 216 36 65 cuts, 5 rankssinsum stored120reciprocal stored1800product stored36noise stored9.6·10⁴entries4.7·10⁴one rank per cutand one of them is a theorem

Cut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 5 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2, 2, 2, 2. The reciprocal family climbs to 10, the product family is one everywhere, and independent normal entries reach 216, which is the largest rank the cut allows. Storage runs sinsum 120, reciprocal 1,800, product 36, noise 95,976 against 46,656 entries.

d: 5

The arguments are the ones A decomposition made only of SVDs passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

Train ranks at each of the 4 cuts of a 5-index tensor on 6 points a side, four familiesCut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 4 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2, 2, 2. The reciprocal family climbs to 9, the product family is one everywhere, and independent normal entries reach 36, which is the largest rank the cut allows. Storage runs sinsum 96, reciprocal 1,206, product 30, noise 10,440 against 7,776 entries.012345061218243036cut after index krank of the reshapesinsum · 2 2 2 2reciprocal · 6 9 9 6product · 1 1 1 1noise · 6 36 36 64 cuts, 4 rankssinsum stored96reciprocal stored1206product stored30noise stored10⁴entries7776one rank per cutand one of them is a theorem

Cut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 4 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2, 2, 2. The reciprocal family climbs to 9, the product family is one everywhere, and independent normal entries reach 36, which is the largest rank the cut allows. Storage runs sinsum 96, reciprocal 1,206, product 30, noise 10,440 against 7,776 entries.

d: 4

The arguments are the ones An iterate that must be made smaller passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

Train ranks at each of the 3 cuts of a 4-index tensor on 6 points a side, four familiesCut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 3 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2, 2. The reciprocal family climbs to 9, the product family is one everywhere, and independent normal entries reach 36, which is the largest rank the cut allows. Storage runs sinsum 72, reciprocal 720, product 24, noise 2,664 against 1,296 entries.01234061218243036cut after index krank of the reshapesinsum · 2 2 2reciprocal · 6 9 6product · 1 1 1noise · 6 36 63 cuts, 3 rankssinsum stored72reciprocal stored720product stored24noise stored2664entries1296one rank per cutand one of them is a theorem

Cut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 3 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2, 2. The reciprocal family climbs to 9, the product family is one everywhere, and independent normal entries reach 36, which is the largest rank the cut allows. Storage runs sinsum 72, reciprocal 720, product 24, noise 2,664 against 1,296 entries.

d: 3

The arguments are the ones An iterate that must be made smaller passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

Train ranks at each of the 2 cuts of a 3-index tensor on 6 points a side, four familiesCut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 2 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2. The reciprocal family climbs to 6, the product family is one everywhere, and independent normal entries reach 6, which is the largest rank the cut allows. Storage runs sinsum 48, reciprocal 288, product 18, noise 288 against 216 entries.012301234567cut after index krank of the reshapesinsum · 2 2reciprocal · 6 6product · 1 1noise · 6 62 cuts, 2 rankssinsum stored48reciprocal stored288product stored18noise stored288entries216one rank per cutand one of them is a theorem

Cut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 2 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2. The reciprocal family climbs to 6, the product family is one everywhere, and independent normal entries reach 6, which is the largest rank the cut allows. Storage runs sinsum 48, reciprocal 288, product 18, noise 288 against 216 entries.

d: 6

The arguments are the ones The format that does not notice the dimension passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

Train ranks at each of the 5 cuts of a 6-index tensor on 6 points a side, four familiesCut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 5 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2, 2, 2, 2. The reciprocal family climbs to 10, the product family is one everywhere, and independent normal entries reach 216, which is the largest rank the cut allows. Storage runs sinsum 120, reciprocal 1,800, product 36, noise 95,976 against 46,656 entries.012345603672108144180216cut after index krank of the reshapesinsum · 2 2 2 2 2reciprocal · 6 9 10 9 6product · 1 1 1 1 1noise · 6 36 216 36 65 cuts, 5 rankssinsum stored120reciprocal stored1800product stored36noise stored9.6·10⁴entries4.7·10⁴one rank per cutand one of them is a theorem

Cut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 5 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2, 2, 2, 2. The reciprocal family climbs to 10, the product family is one everywhere, and independent normal entries reach 216, which is the largest rank the cut allows. Storage runs sinsum 120, reciprocal 1,800, product 36, noise 95,976 against 46,656 entries.

d: 7

The arguments are the ones The format that does not notice the dimension passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

Train ranks at each of the 6 cuts of a 7-index tensor on 4 points a side, four familiesCut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 6 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2, 2, 2, 2, 2. The reciprocal family climbs to 9, the product family is one everywhere, and independent normal entries reach 64, which is the largest rank the cut allows. Storage runs sinsum 96, reciprocal 1,084, product 28, noise 25,120 against 16,384 entries.0123456701122334455cut after index krank of the reshapesinsum · 2 2 2 2 2 2reciprocal · 4 7 9 9 7 4product · 1 1 1 1 1 1noise · 4 16 64 64 16 46 cuts, 6 rankssinsum stored96reciprocal stored1084product stored28noise stored2.5·10⁴entries1.6·10⁴one rank per cutand one of them is a theorem

Cut the index list after position k, put the first k indices on the rows and the rest on the columns, and take the rank of the matrix that results. There are 6 such cuts and each rank is an ordinary matrix rank. sin(x₁ + … + x_d) has rank exactly two at every one of them, for every d, because the addition formula separates it into two terms at every cut — a rank written down rather than measured, and the computed values are 2, 2, 2, 2, 2, 2. The reciprocal family climbs to 9, the product family is one everywhere, and independent normal entries reach 64, which is the largest rank the cut allows. Storage runs sinsum 96, reciprocal 1,084, product 28, noise 25,120 against 16,384 entries.

What it checked while drawing

Every figure above asserted its own claims on the way to being drawn, and a claim that failed would have failed the build rather than drawn a wrong picture. Those assertions used to leave no trace at all: a passing one returned true and the only evidence the figure had checked anything was that nothing crashed. The list below is what they actually said, collected by running this generator with an observer installed — not a description of what it is believed to check.

7 distinct claims across 6 sets of arguments, grouped below by shape — because most of them are one sentence with a different number in it, and how many separate times that sentence was put to the test is the informative part.

a number of indices the tensor can be formed at

and stores 4n(d − 1) numbers

sin of a sum has rank two at every cut

the noise train reproduces its tensor

the product train reproduces its tensor

the reciprocal train reproduces its tensor

the sinsum train reproduces its tensor

Against the rule

It draws a decomposition and prints its residual. It calls ttSvd, and every figure above carries the badge — which residualcheck verifies by looking for it in the emitted SVG rather than by finding the call that builds one. A badge that is constructed and then left out of the body is the failure that check exists for.

Across the library: the rule bites on 146 of 287 generators — 131 print a residual and 15 are exempt with a published reason; 141 factorise nothing. Read from lib/residual-rule.js, which is the same body the gate enforces from, and the gate's last check fails the build if this page and it disagree about any generator.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

When the index is a tuple

A decomposition made only of SVDs

Everything the definition of tensor rank loses comes back if the SVD's algorithm is carried across instead of its definition — take the leading left singular subspace of every unfolding and project onto all of them. It exists, it costs d matrix decompositions, and its error is within √d of the best there is.

When the index is a tuple

A factorisation that is unique for once

A rank-r factorisation of a matrix is never unique — AB is (AM)(M⁻¹B) for any invertible M, so no factor means anything on its own. For three indices a checkable condition on the factors' k-ranks makes the decomposition unique up to permuting and scaling the terms, and it holds generically.

When the index is a tuple

A nearest point that is not there

Eckart and Young guarantee that a matrix has a best rank-k approximation and that the truncated SVD is it. For three indices the guarantee is false in the strongest available way — there are tensors whose distance to the rank-two set is zero and which no rank-two tensor equals.

Iterating, instead of factorising

An iterate that must be made smaller

Applying a Kronecker-sum operator to a low-rank iterate multiplies its ranks by d and adding two of them adds their ranks, so a solver in a compressed format cannot keep what it produces. Every step is followed by a truncation — and whether that truncation is a floor on the residual depends on the right-hand side rather than on the truncation.

When the index is a tuple

An iteration that walks out of the set

Every sweep of alternating least squares is the exact minimiser of its own subproblem, so the objective can only fall. What it cannot do is converge, when the target's nearest rank-r point is not in the rank-r set — and a plateau at a small residual looks identical to slow convergence unless the size of the terms is plotted beside it.

When the index is a tuple

The format that does not notice the dimension

A Tucker core is r^d numbers, so the format that repaired the definition still cannot go past five indices. Cutting between the indices rather than across them gives d − 1 ranks instead of d, storage linear in the number of indices, and a family whose ranks are two everywhere by an addition formula.

Sparsity, and what elimination costs

The order that was right last time

A pivot order computed once and reused across a sequence saves the symbolic phase, and the price is that a pivot which was large may now be small. Replacing it with √u·‖A‖ costs eight orders of backward error and iterative refinement recovers a factor of 8.8 of them. Divide each row by its largest entry first and the same reuse costs nothing at all.

Where the flop count stopped predicting the time

The order the products are taken in

The sparsity field's first essay says the elimination order decides the memory. This is the same sentence about arithmetic: a contraction of several tensors over shared indices has one value and many evaluation orders, and on the inner product of two trains they differ by a factor of two million.

When the index is a tuple

The orthogonality that cannot be diagonal

A matrix decomposition hands over orthonormal factors and a diagonal middle at once. For three indices the two come apart, and there is no arrangement that has both — so the question stops being which decomposition to use and becomes which of the two properties the computation needs.

The whole library · All essays · What must fail