A topic in the Open Knowledge Graph — a free, open map of 15,495 topics and the order to learn them in.

VC Dimension

Research Depth 108 in the knowledge graph ☐ I know this ☆ Set as goal
29topics build on this
598prerequisites beneath it
See this on the map →
Growth Function and ShatteringPAC Learning Framework+1 more→→Agnostic PAC LearningBias-Complexity Tradeoff (Formal)+7 more
learning-theory capacity generalization

Core Idea

The Vapnik-Chervonenkis (VC) dimension measures the expressive capacity of a hypothesis class by finding the largest set of points the class can shatter — that is, classify in all 2n possible ways. A hypothesis class with VC dimension d can shatter some set of d points but no set of d+1 points. The VC dimension is the key quantity in the fundamental theorem of statistical learning: a class is PAC-learnable if and only if its VC dimension is finite, and the sample complexity for learning scales linearly with the VC dimension.

How It's Best Learned

Draw it. Warm up with thresholds on a line, which shatter one point but not two. Then sketch three non-collinear points with all 8 labelings and a separating line for each. Next try four points both ways: in convex position, the labeling that splits the two diagonals fails. With one point inside the triangle of the others, giving that point the opposite label fails.

Common Misconceptions

Explainer

Building on the PAC framework, we now need a way to measure how "complex" a hypothesis class is, because this complexity determines how many training examples are needed to learn. The Vapnik-Chervonenkis dimension provides exactly this measure. Rather than counting parameters or describing the functional form, VC dimension asks a combinatorial question: what is the largest number of data points that the hypothesis class can classify in every possible way?

The formal definition centers on the concept of shattering. A hypothesis class H shatters a set of points S = {x_1, ..., x_n} if for every possible labeling of these points (every assignment of +1 or -1 to each point), there exists some hypothesis h in H that perfectly classifies them according to that labeling. Since n points have 2n possible labelings, shattering requires that H is expressive enough to realize all 2n dichotomies. The VC dimension of H is the largest n for which there exists some set of n points that H can shatter. If H can shatter arbitrarily large sets, its VC dimension is infinite.

The canonical example is linear classifiers in Rd, which have VC dimension d+1. In R2, lines can shatter 3 points in general position: for each of the 8 labelings, you can draw a line separating the positives from the negatives. But no set of 4 points can be shattered — by Radon's theorem, any 4 points in the plane contain a partition whose convex hulls overlap, creating a labeling that no line can achieve. This result generalizes: hyperplanes in Rd shatter d+1 points but not d+2, giving VC dimension d+1. The connection to the number of "free parameters" (d+1 coefficients for a hyperplane in Rd) is suggestive but coincidental in general — the sine function counterexample, with one parameter but infinite VC dimension, shows parameters alone do not determine capacity.

The profound consequence is the fundamental theorem of statistical learning: a hypothesis class is PAC-learnable if and only if its VC dimension is finite. When VC dimension is d, the sample complexity for achieving error epsilon with confidence 1-delta is O((d/epsilon) * log(1/epsilon) + (1/epsilon) * log(1/delta)). This is a tight characterization — no measure other than VC dimension (and its equivalents) captures learnability so precisely. For practitioners, VC dimension explains why models with too much capacity overfit (they can shatter the training data, memorizing noise) and why controlling capacity — through regularization, architecture constraints, or explicit complexity penalties — is essential for generalization.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Combining Small Groups Within 5 → Number Bonds Within 5 → Number Bonds to 10 → Tens and Ones Place Value → Reading and Writing Three-Digit Numbers → Comparing Three-Digit Numbers → Comparing and Ordering Three-Digit Quantities → Comparing and Ordering Whole Numbers → Comparing Numbers 1 to 20 → Ordering Numbers to 20 → Number Line 0 to 20 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Multiplying Binomials (FOIL) → Factoring Trinomials → Factoring Completely → Introduction to Rational Expressions → Simplifying Radical Expressions → Segments and Distance → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Similar Right Triangles and the Geometric Mean → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Special Right Triangles: 30-60-90 → Trigonometric Ratios Review → Radian Measure → Converting Between Degrees and Radians → The Unit Circle → Graphing Sine and Cosine → Graphing Tangent and Reciprocal Trigonometric Functions → Derivatives of Trigonometric Functions → Antiderivatives → Indefinite Integrals → Basic Integration Rules → Riemann Sums → Definite Integral Definition → Probability Density Functions and Continuous Distributions → Cumulative Distribution Functions → Continuous Random Variables → Probability Density Functions → Expected Value → Weak Law of Large Numbers → Probability Axioms and Rules → Conditional Probability → Law of Total Probability → Bayes' Theorem → PAC Learning Framework → Growth Function and Shattering → VC Dimension

Longest path: 109 steps · 598 total prerequisite topics

Prerequisites (3)

Leads To (9)