training all four proofs in your browser — this takes a few seconds…
s1-1 · nonlinearity — proof by demonstration

S1-1 · One activation function is the entire difference.

A model with no nonlinearity can only ever carve space with a straight line — it physically cannot separate two concentric rings. Stack one ReLU hidden layer on top of the same inputs, same optimizer, same number of steps, and it wraps the ring cleanly. Nothing else changes.

Linear model
2 weights · 1 bias · no hidden layer
—
train accuracy
—
z = w·x + b  →  σ(z)
ReLU network
2 → 16 → 1 · one hidden layer
—
train accuracy
—
h = ReLU(W₁x + b₁)  ·  z = W₂h + b₂  →  σ(z)

Same 300 noisy points. Same Adam optimizer, same learning rate, same 1500 steps. Only the activation changed between these two models.

next proof
s1-2 · depth & nonlinearity — proof by demonstration

S1-2 · Depth without nonlinearity is a lie.

Stack five linear layers with no activation between them and the composition is still just one affine map — (W₁W₂W₃W₄W₅)·x + b — so it carries exactly the same expressive power as a single layer. It should fail the ring task identically. Slide a ReLU between each of those same five layers and depth finally does something: now it wraps the ring.

1 linear layer
2 → 1 · no hidden layer
—
train accuracy
—
z = w·x + b  →  σ(z)
5 linear layers
2→8→8→8→8→1 · zero activations
—
train accuracy
—
5 linear layers, zero activations  →  one affine map
5 layers + ReLU
2→8→8→8→8→1 · ReLU between every layer
—
train accuracy
—
each hidden layer: h = ReLU(Wh + b)  →  σ(z₅)
bonus proof — multiply the five weight matrices
W₁(2×8) · W₂(8×8) · W₃(8×8) · W₄(8×8) · W₅(8×1) = W_eff (2×1)
matrix product of all 5 layers
—
independently-trained 1-layer model
—
—

Same 300 noisy points. Same Adam optimizer, same learning rate, same number of steps, same 2→8→8→8→8→1 shape for the last two. Only the activation changed between them — and depth alone, without it, never beat the single line.

next proof
s1-3 · embeddings — proof by demonstration

S1-3 · Embeddings learn similarity from nothing but next-token.

An embedding table is just a lookup of numbers — nobody tells it that cat, dog, and cow are related. Train it on exactly one task, predict the next token, in a toy grammar where the object slot is drawn uniformly regardless of verb or species — so "cow eat mango" and "cat chase apple" are both fair game, no real-world meaning involved. The only thing that makes tokens alike is that they're statistically interchangeable. Project the learned 8-dimensional vectors to 2D and the three categories fall into their own corners anyway.

Learned embedding space
embedding(10×8) → linear(8→10) → softmax · trained only on (prev token, next token) pairs
—
same-category nearest neighbors
animals — cat, dog, cow fruits — apple, mango verbs — eat, chase, see
grammar: <S> animal verb noun <E>  ·  noun ~ uniform(animals ∪ fruits), independent of verb or subject

No labels, no similarity targets, no category ever supplied. Only next-token prediction shaped this space — clustering by category is a side effect, not the objective.

next proof
s1-4 · generalization — proof by demonstration

S1-4 · Memorization vs. generalization, and data closes the gap.

Give a high-capacity network only 20 noisy examples and it will happily drive training loss to ~0 — memorizing every quirk, including the noise. On held-out data it does far worse, because noise doesn't repeat. Keep the exact same architecture and the exact same training budget, and just grow the dataset to 200, then 2000: the model can no longer afford to memorize idiosyncrasies, so it gets pushed toward the actual signal — and the train/test gap collapses.

N = 20
2→16→16→1 · ReLU
—
train acc
—
test acc
—
20 training points
N = 200
2→16→16→1 · ReLU
—
train acc
—
test acc
—
200 training points
N = 2000
2→16→16→1 · ReLU
—
train acc
—
test acc
—
2000 training points
Generalization gap vs. dataset size
train accuracy and held-out test accuracy at each N · same model, same training budget
train accuracy test accuracy (held out) ┄ Bayes-optimal ceiling

Same 2→16→16→1 ReLU network, same 1000 training steps, same noisy task at every size — only N changed. The gap between memorizing and generalizing closes almost entirely by N=2000, with both curves converging on the same Bayes-optimal ceiling neither can beat.