sketch-oversampling
At its defaults it draws the error of a rank-4 tucker representation built from a sketch, against the columns of oversampling. The flat line is the deterministic decomposition — d matrix SVDs — at 8.81·10⁻⁴, and nothing random can go below it, since every curve here is a projection onto a subspace of the same size. The upper two are medians over five seeds: a dense Gaussian sketch, which the randomised field's bounds cover, and a Khatri–Rao sketch, whose columns are outer products of small random vectors and which no bound in that field applies to. With no oversampling the dense sketch is 3.65 times the deterministic answer; at twelve extra columns it is 1.15. The structured one costs 6.8 per cent more at four extra columns and 9.5 per cent at twelve — measured, because there is nothing else to say about it.
sketch-oversampling is one function in lib/figures/tsketch.js —
sketching a tensor — a random matrix larger than the object, and the structured one that is not. 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.
The flat line is the deterministic decomposition — d matrix SVDs — at 8.81·10⁻⁴, and nothing random can go below it, since every curve here is a projection onto a subspace of the same size. The upper two are medians over five seeds: a dense Gaussian sketch, which the randomised field's bounds cover, and a Khatri–Rao sketch, whose columns are outer products of small random vectors and which no bound in that field applies to. With no oversampling the dense sketch is 3.65 times the deterministic answer; at twelve extra columns it is 1.15. The structured one costs 6.8 per cent more at four extra columns and 9.5 per cent at twelve — measured, because there is nothing else to say about it.
r: 4
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.
The flat line is the deterministic decomposition — d matrix SVDs — at 8.81·10⁻⁴, and nothing random can go below it, since every curve here is a projection onto a subspace of the same size. The upper two are medians over five seeds: a dense Gaussian sketch, which the randomised field's bounds cover, and a Khatri–Rao sketch, whose columns are outer products of small random vectors and which no bound in that field applies to. With no oversampling the dense sketch is 3.65 times the deterministic answer; at twelve extra columns it is 1.15. The structured one costs 6.8 per cent more at four extra columns and 9.5 per cent at twelve — measured, because there is nothing else to say about it.
r: 2
The arguments are the ones Sketching what is never unfolded 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.
The flat line is the deterministic decomposition — d matrix SVDs — at 0.0671, and nothing random can go below it, since every curve here is a projection onto a subspace of the same size. The upper two are medians over five seeds: a dense Gaussian sketch, which the randomised field's bounds cover, and a Khatri–Rao sketch, whose columns are outer products of small random vectors and which no bound in that field applies to. With no oversampling the dense sketch is 2.78 times the deterministic answer; at twelve extra columns it is 1.20. The structured one costs 39.4 per cent more at four extra columns and 6.6 per cent at twelve — measured, because there is nothing else to say about it.
r: 8
The arguments are the ones Sketching what is never unfolded 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.
The flat line is the deterministic decomposition — d matrix SVDs — at 4.09·10⁻⁹, and nothing random can go below it, since every curve here is a projection onto a subspace of the same size. The upper two are medians over five seeds: a dense Gaussian sketch, which the randomised field's bounds cover, and a Khatri–Rao sketch, whose columns are outer products of small random vectors and which no bound in that field applies to. With no oversampling the dense sketch is 6.40 times the deterministic answer; at twelve extra columns it is 1.37. The structured one costs 1.9 per cent more at four extra columns and -2.4 per cent at twelve — measured, because there is nothing else to say about it.
r: 6
The arguments are the ones Sketching what is never unfolded 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.
The flat line is the deterministic decomposition — d matrix SVDs — at 7.94·10⁻⁶, and nothing random can go below it, since every curve here is a projection onto a subspace of the same size. The upper two are medians over five seeds: a dense Gaussian sketch, which the randomised field's bounds cover, and a Khatri–Rao sketch, whose columns are outer products of small random vectors and which no bound in that field applies to. With no oversampling the dense sketch is 15.12 times the deterministic answer; at twelve extra columns it is 1.23. The structured one costs 34.8 per cent more at four extra columns and -1.0 per cent at twelve — measured, because there is nothing else to say about it.
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.
10 distinct claims across 5 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.
no sketch beats the decomposition at p = 0 — asserted 6 times
a rank the sketch is asked for
and neither does the structured one
and oversampling closes the gap
matmul shapes agree
Against the rule
It draws a decomposition and prints its residual. It calls
oversamplingSweep,
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.
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.
Randomised, and the guarantee that changes kindSketching what is never unfolded
A range finder multiplies its matrix by a few random vectors. For a mode-k unfolding those vectors have n^{d−1} entries, so the random object is the size of the tensor divided by n — and by six indices it is larger than the tensor it is sketching.
Randomised, and the guarantee that changes kindThe dimension does not appear
A random projection preserves the lengths of a set of vectors to within a distortion that depends on how many vectors there are and not on how many coordinates each one has. That is the fact the whole field rests on, and it is genuinely surprising.