◄ WORLD II · THE FOLDTHE OCHO · blue builds │ the machine │ red breaks

THE VC DIMENSION

The capacity of a model, counted not in parameters but in freedom: the largest set of points the model can label every possible way at all. For half-planes in the plane the number is 3 — a triangle can be split into +/− all 8 ways, but no four points can. Down the center, data flows: a point set and a labeling go in, the shattering engine decides realizable-or-not, the capacity comes out. The blue team builds and defends it; the red team tries to break it.

source V. N. Vapnik & A. Ya. Chervonenkis, On the Uniform Convergence of Relative Frequencies of Events to Their Probabilities (1971), Theory Probab. Appl. 16(2):264 — epubs.siam.org/doi/10.1137/1116025. Rendered, not quoted.

◧ blue team · builds & defends
3

THE MODEL — shattering

A hypothesis class H shatters a set S of points if for every one of the 2|S| labelings, some h ∈ H realizes it. The VC dimension is the size of the largest set H shatters.

For half-planes in R2 (a hypothesis is w·x + b ≥ 0 → +), a labeling is realizable iff the + points and − points are linearly separable — iff their convex hulls are disjoint. The engine decides that by the separating-axis test over integer coordinates: exact, no floats-that-drift.

VC ≥ 3: a triangle is shattered (all 8 labelings realizable). VC ≤ 3: any 4 points admit a partition whose hulls meet — Radon's theorem (1921) not enumerated in-engine; the engine checks the two canonical quadruples exactly. So VC = 3.

5

THE LINEAGE — the missing number AVAN

Empirical risk minimization picks the hypothesis that fits the sample best — but nothing there says whether fitting the sample means anything for the unseen. The missing ingredient is capacity.

VC dimension is that number, and it is the hinge of PAC learning: a class with finite VC is learnable, its generalization gap bounded by √(d/n)-style terms; infinite VC and the sample can be memorized without ever generalizing. Each sphere is the next one's premise.

7

THE WITNESS live

The blue team's live check: recompute the realizable-labeling count for all four configurations and confirm them against the known truth (8 / 14 / 14 / 3). If red tampers, this badge is where it shows.

▼ the machine ▼
4

DATA IN — points & labels in ↓

Two things go in: a finite point set and a labeling (a +/− assignment to each point). The class asked to realize it is the half-planes. Four configurations:

setpoints2n
triangle3, general position8
square4, convex position16
triangle+inside4, one interior16
line2, threshold class4

Shattered means every labeling in the 2n column is realizable. That is the whole game — and it is what you feed the panel below.

▼   feed the set into the engine   ▼
0

▣ THE PANEL — the engine LIT

Every labeling — click a row to draw its separator (or see that none exists):

labelingrealizable?

Realizability is computed live from convex-hull disjointness (or, for the line, a one-sided threshold), never looked up.

▼   the engine emits the capacity   ▼
8

DATA OUT — the capacity out ↓

What the machine proves: half-planes in R2 have VC dimension = 3. The triangle is shattered (8/8 = 23); no quadruple is (14/16 for both the square and the triangle-plus-inside — exactly two labelings unrealizable); a one-sided threshold on the line has VC = 1 (shatters 1 point, only 3/4 labelings of 2 points).

The blue team's witness (left) confirms these counts live; the red team (right) tries to make them wrong.

red team · attacks & breaks ◨
1

THE ADVERSARY

WALL VC dimension is distribution-free and worst-case. It ignores the data distribution and the margin, so its bounds are notoriously loose — a 1-nearest-neighbour rule or the one-parameter family sin(αx) has infinite VC yet can generalize fine under a benign distribution. Rademacher complexity and margin bounds are tighter. VC is the first capacity notion, not the last.

And capacity is a property of the class, not any one hypothesis: it tells you how much the class could fit, not what your fit will do on this data.

2

THE GRAVEYARD

“VC dimension = the number of parameters.” Cut. The one-parameter family sin(αx) has infinite VC; parameters and capacity are not the same quantity.

“Four corners, four points — half-planes in the plane have VC 4.” Cut. The corners of a square already fail: the diagonal (XOR) split is not linearly separable. VC = 3, and Radon proves no quadruple survives.

“High VC is bad.” Kept, corrected. Capacity only bounds the generalization gap; you need enough of it to fit the signal. The craft is matching capacity to sample size — structural risk minimization.

6

THE TAMPER — break it

The red team's move: claim VC = 4 for planar half-planes — force the engine to report every 4-point labeling as realizable, pretending the square is shattered (16/16). The blue team's witness (window 7) is watching.

Claim VC = 4 and the engine calls the XOR corner-split realizable — but no half-plane realizes it (the diagonals cross). The witness recomputes, the counts disagree with the known truth, and it turns red. Nothing is faked; the attack is real and it is caught.