---
title: Sample Compression Scheme
url: https://www.emergentmind.com/topics/sample-compression-scheme
type: topic
---

# Sample Compression Scheme

Sample compression schemes are formal mechanisms for replacing a finite labeled sample by a smaller representation—typically a subsample together with auxiliary information—from which a hypothesis can be reconstructed that agrees with the labels of the entire original sample. They were introduced by Littlestone and Warmuth as an abstraction of the structure underlying learning algorithms. Compression size measures the retained information rather than the original sample size, and bounded compression yields PAC-learning and generalization guarantees under appropriate measurability conditions. The central unresolved problem is whether every binary concept class of VC dimension $d$ admits a scheme of size $O(d)$.

## 1. Formal framework and variants

A concept space is a pair $(X,\mathcal C)$, where $X$ is a domain and $\mathcal C\subseteq 2^X$ is a family of concepts. A finite labeled sample is a finite partial function
\[
f:D\to\{0,1\},\qquad D\in[X]^{<\infty},
\]
that is the restriction of some concept $C\in\mathcal C$. A hypothesis $H\subseteq X$ is consistent with $f$ when $f\sqsubseteq H$, meaning that $H$ agrees with every label in the sample.

For $d\in\mathbb N$, an unlabelled sample compression scheme of size $d$ is a map
\[
H:[X]^{\le d}\to 2^X
\]
such that every finite labeled sample has a compression set $A$ consisting of at most $d$ domain points from the sample and
\[
f\sqsubseteq H(A).
\]
The compression map uses the labels to choose $A$, but the reconstruction map receives only the selected points. A labelled scheme instead reconstructs from a compressed labeled restriction. In the standard formulation for binary classes, a compression map and reconstruction map satisfy
\[
\kappa(Y,y)=((Z,z),i),\qquad Z\subseteq Y,\quad z=y|_Z,
\]
where $i$ is auxiliary side information and the reconstruction hypothesis agrees with $y$ on all of $Y$ [1503.06960].

A scheme is **proper** if reconstruction returns a member of the original concept class. It is **improper** if the reconstruction hypothesis need only be a consistent labeling. Properness is a substantive additional requirement: many general existence theorems produce consistent hypotheses that are not concepts in the original class. Schemes may also be **stable**, meaning that deleting sample points outside the compressed set does not change the compression output, or **majority-vote schemes**, whose reconstructions are finite majority votes of concepts from the class [2410.13012].

The framework extends beyond ordinary binary classification. Distributional compression schemes reconstruct probability distributions from a subsequence of observations and bits; robust versions permit samples drawn from distributions near a target model [1710.05209]. For real-valued regression, compression may require uniform approximate reconstruction,
\[
\max_i|\widehat h(x_i)-h^*(x_i)|\le \varepsilon,
\]
or approximate empirical-loss optimality [1805.08254; 1810.01864]. High-arity schemes compress samples whose labels are arrays indexed by tuples rather than independent point labels [2605.12465].

## 2. Combinatorial foundations and compactness

For a finite set $A\subseteq X$, the trace of $\mathcal C$ on $A$ is
\[
\mathcal C\sqcap A=\{C\cap A:C\in\mathcal C\}.
\]
The VC dimension is the maximum cardinality of a set shattered by $\mathcal C$. An unlabelled compression scheme of size $d$ implies
\[
\operatorname{VC}(\mathcal C)\le d,
\]
because a shattered set of size $d+1$ has $2^{d+1}$ labelings but only
\[
\binom{d+1}{\le d}<2^{d+1}
\]
possible compression subsets. For labelled schemes, the corresponding general background bound is $\operatorname{VC}(\mathcal C)\le 5d$.

The Ben-David–Litman compactness theorem states that a concept space has a sample compression scheme of size $d$ if and only if every finite subspace has one of size $d$. The original proof uses compactness from predicate logic. An alternative proof constructs finite schemes
\[
H_B:[B]^{\le d}\to 2^B
\]
and combines them using an ultrafilter on the finite subsets of $X$. For each compressed set $A$ and point $x$, the global value $H(A)(x)$ is defined as the ultralimit of the finite-stage values $H_B(A)(x)$.

The finite-dimensional consistency argument is straightforward: for a finite sample with domain $D$, each finite $B\supseteq D$ supplies some compression set in $[D]^{\le d}$. Since $[D]^{\le d}$ is finite, one compression set occurs on an ultrafilter-large collection of finite spaces and yields a globally consistent hypothesis. Thus finite compressibility implies global compressibility as a combinatorial statement [1205.5819].

The compactness theorem does not automatically preserve measurability. An ultralimit of measurable $\{0,1\}$-valued functions indexed by an arbitrary ultrafilter need not be measurable. This matters because the error
\[
P(H\triangle C)
\]
is defined only when $H\triangle C$ is measurable, and because the map from samples to hypotheses must itself satisfy suitable measurability conditions.

For a standard Borel space $X$ and a $d$-maximum, universally separable concept class $\mathcal C$, measurable compactness is recovered: there exists an unlabelled size-$d$ scheme whose hypotheses are universally Borel measurable [1205.5819]. The proof reduces to a countable universally dense subclass, refines the Polish topology so that this subclass consists of clopen sets, and applies descriptive-set-theoretic compactness to pointwise limits.

## 3. General existence bounds and the compression conjecture

The Floyd–Warmuth sample compression conjecture asserts that every binary concept class of VC dimension $d$ has a compression scheme of size $O(d)$. The conjecture remains unresolved. Before 2015, general bounds typically depended on the sample size or on the cardinality of the concept class. Moran and Yehudayoff proved that every binary class of VC dimension $d$ admits a labelled scheme of size
\[
2^{O(d)}.
\]

Their construction uses the dual class
\[
C^*=\{f_x:C\to\{0,1\}:f_x(c)=c(x)\}.
\]
If $d^*=\operatorname{VC}(C^*)$, then the scheme has total size
\[
O(k\log k),\qquad k=O(dd^*).
\]
Assouad’s inequality gives
\[
\operatorname{VC}(C^*)<2^{d+1}
\]
whenever $\operatorname{VC}(C)\le d$, yielding the exponential bound. The proof combines a proper $O(d)$-sample learner, minimax duality, and a low-dual-VC small-support approximation. The result is existential rather than computationally efficient [1503.06960].

A recent construction proves the first general polynomial bound. Every binary VC class of dimension $d$ admits a labelled scheme with
\[
k=O(d^2\log^2 d)
\]
retained examples and
\[
b=O(d\log^2 d)
\]
side-information bits [2611.25011]. The construction uses sample-induced cells, representative concepts, entropy refinement, maximal lotteries, linear-programming duality, and multiplicative-weights aggregation. A set of unlabeled sample points induces a pool of representatives of cardinality at most $(|W|+1)^d$ by Sauer–Shelah. An additional $O(d\log d)$ labeled examples encode a weighted majority vote over this pool.

The resulting scheme is generally improper: the reconstructed hypothesis is a weighted majority vote of at most $(k+1)^d$ concepts from the class and need not itself belong to the class. The theorem establishes the polynomial-size version of the conjecture but not the conjectured $O(d)$ bound, properness, computational efficiency, or an optimal unlabelled scheme.

The embedding route toward the conjecture also has a fundamental limitation. Extremal classes have optimal compression of size equal to their VC dimension, but some VC-$d$ classes cannot be embedded into any extremal class of dimension below $2^d-1$. The obstruction follows from dual VC dimension: every extremal class of VC dimension $d$ has dual VC dimension at most $2d+1$, whereas general classes may attain dual dimension $2^{d+1}-1$ [2405.17120]. This rules out a generally efficient Floyd–Warmuth embedding strategy without disproving the compression conjecture itself.

## 4. Structured classes and optimal compression

Maximum and extremal classes provide important positive cases. A class is $d$-maximum when every finite trace has cardinality
\[
\left|\mathcal C\sqcap A\right|=\binom{|A|}{\le d}.
\]
Maximum classes are extremal, also called ample, lopsided, or shattering-extremal, and possess strong cubical structure.

Every maximum class has a proper unlabelled compression scheme of size equal to its VC dimension. A representation map assigns each concept $c$ a shattered coordinate set $r(c)$ of size at most $d$ such that distinct concepts do not clash on the union of their representation sets:
\[
c|_{r(c)\cup r(c')}\ne c'|_{r(c)\cup r(c')}.
\]
This yields compression by selecting $r(c)$ for the unique concept compatible with the sample. The construction applies even to maximum classes with no corners [1812.02099].

Corner peeling is therefore not equivalent to optimal compression. A maximum class of VC dimension $3$ with no corners exists, derived from a nonextendable partial shelling of a 12-dimensional cross-polytope. Nonetheless, it admits a proper unlabelled scheme through a recursive representation-map construction. The broader question whether every ample class admits such a representation map remains open [1812.02099].

Oriented matroids provide another broad family with optimal schemes. The topes of an oriented matroid have VC dimension equal to its rank, and every oriented matroid admits a proper unlabelled scheme of size at most this VC dimension. The proof uses convex subsets of the tope graph, reconstructible maps, oriented matroid programs, and corners. It extends to affine oriented matroids and to complexes of oriented matroids possessing corner peelings [2206.13254].

A stronger labelled result holds for all complexes of oriented matroids (COMs): the topes of a COM of VC dimension $d$ admit a proper labelled compression scheme of size $d$ [2110.15168]. The proof interprets samples as convex subgraphs of partial-cube tope graphs, recursively selects at most $d$ distinguishing coordinates, and uses a realizer—a common compatible tope for all samples with the same compressed representation—for reconstruction.

Other structured examples include graph balls. For balls in trees, proper schemes of size $2$ exist; cycles admit size $3$; interval graphs size $4$; trees of cycles size $6$; and cube-free median graphs size $22$ [2206.13254]. For graphs of treewidth or cliquewidth at most $t$, graph balls admit proper schemes of size
\[
O(t\log t),
\]
with array schemes of sizes $4t+7$ and $4t+3$, respectively [2604.02949]. The treewidth bound is tight up to the logarithmic factor because there are treewidth-$t$ ball classes with VC dimension at least $t$.

Intersection-closed classes of VC dimension $d$ admit unlabelled schemes of size at most $11d$. The proof embeds such a class into an intersection-closed, shortest-path-closed extremal class of VC dimension at most $11d$ [2210.05455].

## 5. Compression, learning, and measurability

A consistent compression scheme induces a learner: compress the sample and reconstruct the corresponding hypothesis. If the scheme has size $d$, the number of possible compressed descriptions on a sample of size $m$ is controlled by
\[
\sum_{i=0}^d\binom{m}{i}
\]
times the number of side-information strings. A union bound then gives PAC generalization. Under suitable measurability assumptions, a standard bound is
\[
P^m\!\left(
\exists A,\ |A|\le d:
P(H(A)\triangle C)>\varepsilon,\ 
H(A)|_S=C|_S
\right)
\le
\sum_{n=0}^d\binom{m}{n}(1-\varepsilon)^{m-n}.
\]
This gives sample complexity of order
\[
O\!\left(
\frac{d\log(1/\varepsilon)+\log(1/\delta)}{\varepsilon}
\right)
\]
in the displayed formulation [1205.5819].

Measurability has several levels. Requiring every reconstructed hypothesis to be measurable is weaker than requiring the parameterized map
\[
(x_1,\ldots,x_i,x_{i+1})
\mapsto H(\{x_1,\ldots,x_i\})(x_{i+1})
\]
to be measurable. The latter condition is often called (M5) and is sufficient for standard compression bounds. Universal Borel measurability is weaker than Borel measurability but guarantees measurability under every Borel probability measure.

Compression and learnability are related but not equivalent in every setting. For binary classes, finite VC dimension yields a bounded compression scheme through the Moran–Yehudayoff theorem. For multiclass classes with infinitely many labels, this fails dramatically: there is a learnable total class of DS dimension exactly $1$ for which every compression scheme has size
\[
\Omega\!\left((\log m)^{1-o(1)}\right)
\]
on samples of size $m$ [2308.06424]. The obstruction uses partial concepts, biclique partitions, large chromatic number, and private labels that preserve low DS dimension while forcing large disambiguating families.

Reductions transfer binary compression to multiclass learning, regression, and robust learning. A binary scheme of size $f(d_{\mathrm{VC}})$ yields multiclass schemes of size
\[
O(f(d_G)\log|Y|)
\]
for general schemes, and $O(f(d_G))$ for proper, majority-vote, or stable schemes. For real-valued classes, threshold lifting gives approximate regression compression controlled by pseudo-dimension; for adversarial perturbation sets of maximum size $M$, robust compression has size $O(f(d_{\mathrm{VC}})\log M)$ in general and $O(f(d_{\mathrm{VC}}))$ under stability [2410.13012].

## 6. Real-valued, distributional, robust, and emerging extensions

Real-valued compression distinguishes realizable uniform reconstruction from agnostic approximate loss minimization. For $F\subseteq[0,1]^X$, fat-shattering dimension replaces VC dimension as the principal complexity measure. Generic agnostic schemes previously had size governed by a primal–dual product,
\[
\widetilde O\!\left(
\operatorname{fat}(F,c\alpha)
\operatorname{fat}^*(F,c\alpha)
\right),
\]
which can be exponentially larger than the primal dimension [1810.01864].

For bounded linear regression, approximate compression has size
\[
O\!\left(d\log\frac{p}{\alpha}\right)
\]
for finite $p$ and
\[
O\!\left(d\log\frac1\alpha\right)
\]
for $\ell_\infty$. Exact affine regression is possible with $d+1$ points for $\ell_1$ and $d+2$ points for $\ell_\infty$, because both objectives admit linear-program formulations. In contrast, for every $1<p<\infty$, exact bounded-size agnostic compression is impossible even for constant functions: the unique empirical minimizer depends on the number of zero and one labels and can take $m+1$ distinct values [1810.01864].

A recent squared-loss construction removes the dual fat-shattering factor entirely. For every $F\subseteq[0,1]^X$ and $\alpha\in(0,1]$, it stores
\[
O\!\left(
\operatorname{fat}(F,c'\alpha)\log^3(2/\alpha)
\right)
\]
original labeled examples and bits, independently of the sample size, and reconstructs $\hat f$ satisfying
\[
L_2(\hat f,S)
\le
\inf_{f\in F}L_2(f,S)+\alpha.
\]
The proof uses tolerant weak learning, median boosting, quantized synthetic labels, and average rather than uniform approximation. Avoiding uniform approximation eliminates the dual-dimension sparsification step [2609.29696].

Distributional compression applies the same principle to classes of probability densities. If a distribution class admits robust compression with $\tau(\varepsilon)$ retained samples and $t(\varepsilon)$ bits, then it can be agnostically learned with sample complexity controlled by
\[
\tau(\varepsilon)+t(\varepsilon)
\]
rather than by a global metric entropy. Products and mixtures preserve compression with explicit parameter transformations. This yields near-optimal sample complexity for Gaussian mixtures:
\[
\widetilde O\!\left(\frac{kd^2}{\varepsilon^2}\right)
\]
for general $d$-dimensional Gaussian mixtures and
\[
\widetilde O\!\left(\frac{kd}{\varepsilon^2}\right)
\]
for axis-aligned mixtures, including robust and agnostic settings [1710.05209].

Compression also regularizes nearest-neighbor methods. A net-based multiclass learner selects a scale, retains a metric net, replaces labels by Voronoi-cell majorities, and applies 1-nearest-neighbor prediction to the compressed set. It is strongly Bayes-consistent in finite doubling dimension and weakly consistent in a particular infinite-dimensional metric space where every $k$-NN rule with $k_n/n\to0$ is inconsistent [1705.08184].

Finally, high-arity compression extends the framework to hypotheses on $k$-tuples, where labels are dependent arrays rather than independent point labels. If the effective description complexity is sublinear—specifically,
\[
\log h_m+k\,s_m\log m=o(m)
\]
in the partite setting, or
\[
\log h_m+s_m\log m=o(m)
\]
in the non-partite setting—then the reconstructed hypothesis is high-arity PAC learnable. The proof replaces independent-sample concentration with Doob martingales and Azuma’s inequality [2605.12465]. These developments preserve the principal role of compression while broadening its scope from binary consistent learning to regression, distribution learning, robust prediction, metric methods, and product-space learning.

Source: https://www.emergentmind.com/topics/sample-compression-scheme