Tutorials › Statistical Learning (Graduate) › Proof Workshop for Quantizer Consistency

Clustering Risk and Consistency · Tutorial 663 of 989

Proof Workshop for Quantizer Consistency

Learn how compactness, uniform risk control, and separation turn approximate empirical minimization into convergence to the full set of population-optimal quantizers.

Advanced 10 min read

What You'll Learn

  • Define fixed-K quantizer risk and its population minimizing set
  • Use compactness to establish existence and separation of population minimizers
  • Prove uniform convergence of empirical quantizer risk on a compact codebook space
  • Derive set-valued consistency for approximate empirical minimizers
  • Distinguish convergence to an optimal set from convergence to a uniquely labelled codebook

Why a Consistency Proof Needs Several Checks

For a fixed number \(K\) of centers, empirical quantization chooses a codebook that makes the observed distortion small. Consistency asks whether such a codebook also performs nearly optimally under the population distribution. A proof must connect two different objectives, the empirical risk and the population risk, and must account for the possibility that the population optimum is not unique.

The argument has four essential parts: the feasible codebook space is compact; empirical risk converges uniformly to population risk on that space; the selected codebook approximately minimizes empirical risk; and population risk is separated from its minimum away from the full minimizing set. The last step is what converts small excess risk into proximity to an optimum.

Setup and Definitions

Let \(X_1,\ldots,X_n\) be independent and identically distributed random vectors in \(\mathbb{R}^d\), with common distribution \(P\). Assume there is a nonempty compact set \(C\subset\mathbb{R}^d\) such that \(P(X\in C)=1\). Both observations and centers are restricted to \(C\), and \(K\geq 1\) is fixed. An ordered codebook is \(c=(c_1,\ldots,c_K)\in C^K\). For squared Euclidean distortion, define

$$ \rho_c(x)=\min_{1\leq j\leq K}\|x-c_j\|^2,\qquad R(c)=E[\rho_c(X)],\qquad R_n(c)=\frac{1}{n}\sum_{i=1}^n \rho_c(X_i). $$

Here \(R(c)\) is the population risk and \(R_n(c)\) is the empirical risk. Write \(R^*=\inf_{c\in C^K}R(c)\), and define the population minimizing set

$$ \mathcal{M}=\{c\in C^K:R(c)=R^*\}. $$

Use the product maximum metric \(\|c-c'\|_{\max}=\max_j\|c_j-c'_j\|\), and let \(\operatorname{dist}(c,\mathcal{M})=\inf_{m\in\mathcal{M}}\|c-m\|_{\max}\). This distance treats the ordered coordinates as written; if permuting centers gives an equivalent codebook, the minimizing set includes those permutations.

Definition: A measurable, possibly data-dependent codebook \(\hat c_n\) is an approximate empirical minimizer with error \(\varepsilon_n\geq 0\) if \(R_n(\hat c_n)\leq\inf_{c\in C^K}R_n(c)+\varepsilon_n\). The error is negligible asymptotically when \(\varepsilon_n\xrightarrow{p}0\).

Compactness and Uniform Convergence

Let \(D=\sup_{x,y\in C}\|x-y\|\), which is finite by compactness. The distortion is bounded by \(D^2\). It also varies continuously with the codebook, uniformly over \(x\in C\). Indeed, for \(u,v,x\in C\), \(|\|x-u\|^2-\|x-v\|^2|\leq 2D\|u-v\|\). The difference between two minima is at most the largest difference between corresponding entries, so

$$ |\rho_c(x)-\rho_{c'}(x)| \leq 2D\|c-c'\|_{\max}. $$

Taking expectations shows that \(R\) is continuous. Since \(C^K\) is compact, \(R\) attains its minimum and \(\mathcal{M}\) is nonempty and compact.

Theorem: Under the compact-support setup above, \(\sup_{c\in C^K}|R_n(c)-R(c)|\xrightarrow{p}0\).

Proof. Fix a positive tolerance \(a\). For any \(\eta>0\), compactness of \(C^K\) gives a finite \(\eta\)-net \(c^{(1)},\ldots,c^{(J)}\) in the product maximum metric. For any \(c\), choose a net point \(c^{(j)}\) with \(\|c-c^{(j)}\|_{\max}\leq\eta\). The Lipschitz bound, applied once to the empirical average and once to the expectation, gives

$$ |R_n(c)-R(c)| \leq |R_n(c^{(j)})-R(c^{(j)})|+4D\eta. $$

If \(D=0\), every observation and center coincide and the result is immediate. Otherwise choose \(\eta\) so that \(4D\eta<a/2\). At each of the finitely many net points, \(\rho_{c^{(j)}}(X_i)\) are independent, identically distributed, and bounded random variables. The weak law of large numbers therefore implies \(P(|R_n(c^{(j)})-R(c^{(j)})|>a/2)\to0\). A union bound over the \(J\) points shows that the maximum of these deviations exceeds \(a/2\) with probability tending to zero. The displayed inequality then bounds the supremum by \(a\) except on an event whose probability tends to zero. The supremum is measurable: the risk difference is continuous in \(c\), so its supremum over the compact space equals its supremum over a countable dense subset. This proves the claim. \(\square\)

Worked Example: Uniform Convergence for One Center

Let \(C=[0,1]\), \(K=1\), and let \(X\) equal 1 with probability \(p\) and 0 with probability \(1-p\), where \(0<p<1\). For a center \(c\in[0,1]\),

$$ R(c)=(1-p)c^2+p(1-c)^2,\qquad R_n(c)=(1-\hat p_n)c^2+\hat p_n(1-c)^2, $$

where \(\hat p_n=n^{-1}\sum_{i=1}^n X_i\). Subtracting and simplifying gives \(R_n(c)-R(c)=(\hat p_n-p)(1-2c)\). Since \(|1-2c|\leq1\) on \([0,1]\), and equality is attained at \(c=0\) and \(c=1\),

$$ \sup_{c\in[0,1]}|R_n(c)-R(c)|=|\hat p_n-p|. $$

The Bernoulli weak law gives \(\hat p_n\xrightarrow{p}p\), so the empirical risks converge uniformly. This calculation verifies the uniform-convergence conclusion directly in a simple model, rather than checking convergence separately at each center.

Separation and the Consistency Argument

Uniform convergence alone does not say that low-risk codebooks must be close to an optimum. The required bridge is a separation property: for any fixed positive distance from \(\mathcal{M}\), population risk must exceed \(R^*\) by a positive amount. Here that property follows from compactness and continuity, not from an additional curvature assumption.

Theorem: Suppose \(\hat c_n\) is a measurable approximate empirical minimizer and \(\varepsilon_n\xrightarrow{p}0\). Under the compact-support setup, \(\operatorname{dist}(\hat c_n,\mathcal{M})\xrightarrow{p}0\).

Proof. Define \(\Delta_n=\sup_{c\in C^K}|R_n(c)-R(c)|\). The uniform-convergence result gives \(\Delta_n\xrightarrow{p}0\). For any \(\delta>0\), let \(A_\delta=\{c\in C^K:\operatorname{dist}(c,\mathcal{M})\geq\delta\}\). The distance to a nonempty compact set is continuous, so \(A_\delta\) is compact. If it is nonempty, continuity of \(R\) gives a minimum of \(R\) on \(A_\delta\). This minimum is strictly greater than \(R^*\): equality would put a minimizer in \(A_\delta\), contradicting its distance of at least \(\delta\) from \(\mathcal{M}\). Thus there is a number \(\gamma_\delta>0\) such that

$$ c\in A_\delta\quad\Longrightarrow\quad R(c)\geq R^*+\gamma_\delta. $$

If \(A_\delta\) is empty, the event \(\operatorname{dist}(\hat c_n,\mathcal{M})\geq\delta\) is impossible. Otherwise, take any population minimizer \(c^*\in\mathcal{M}\). On the event where \(\hat c_n\in A_\delta\), the approximate-minimization inequality and the definition of \(\Delta_n\) imply

$$ R(\hat c_n) \leq R_n(\hat c_n)+\Delta_n \leq \inf_{c\in C^K}R_n(c)+\varepsilon_n+\Delta_n \leq R_n(c^*)+\varepsilon_n+\Delta_n \leq R^*+\varepsilon_n+2\Delta_n. $$

Combining this upper bound with the separation inequality yields \(\varepsilon_n+2\Delta_n\geq\gamma_\delta\). Therefore

$$ P\{\operatorname{dist}(\hat c_n,\mathcal{M})\geq\delta\} \leq P\{\varepsilon_n+2\Delta_n\geq\gamma_\delta\} \longrightarrow 0. $$

This holds for every \(\delta>0\), proving convergence in probability to the minimizing set. \(\square\)

Worked Example: Two Labelled Optima

Let \(C=\{-1,1\}\), \(K=2\), and let \(X\) equal each point with probability \(1/2\). The codebook \((-1,1)\) has zero distortion at both possible observations, as does \((1,-1)\). Since risks cannot be negative, \(R^*=0\). A codebook has risk zero only if it contains both points: if it omits either point, that observation has positive distance from every center and occurs with positive probability. Hence

$$ \mathcal{M}=\{(-1,1),(1,-1)\}. $$

If the sample contains both values, an empirical minimizer must also contain both, so its distance to \(\mathcal{M}\) is zero. The probability that the sample contains both is \(1-2(1/2)^n=1-2^{1-n}\), which tends to one. Thus empirical minimizers approach the population minimizing set even though there is no single preferred ordering of the centers.

Worked Example: Turning Risk Error into a Center Bound

Let \(C=[-1,1]\), \(K=1\), and let \(X\) equal \(-1\) or 1 with probability \(1/2\) each. Direct calculation gives \(R(c)=1+c^2\), so \(R^*=1\) and \(\mathcal{M}=\{0\}\). In a sample, writing \(\bar X_n=n^{-1}\sum_iX_i\), we have \(R_n(c)=1-2c\bar X_n+c^2\), and therefore \(\Delta_n=2|\bar X_n|\), since \(\sup_{|c|\leq1}2|c\bar X_n|=2|\bar X_n|\).

Suppose at a particular sample size that \(\Delta_n\leq0.02\) and an approximate minimizer has error \(\varepsilon_n\leq0.01\). The proof's risk comparison gives \(R(\hat c_n)-R^*\leq\varepsilon_n+2\Delta_n\leq0.05\). But \(R(\hat c_n)-R^*=\hat c_n^2\), so \(|\hat c_n|\leq\sqrt{0.05}\), approximately \(0.224\). As the uniform error and optimization error tend to zero, this bound tends to zero as well.

Common Pitfall and Practical Meaning

A common mistake is to conclude that small empirical risk, or even small excess population risk, automatically implies convergence to one particular labelled codebook. The argument proves convergence to \(\mathcal{M}\), which may contain several optima, including permutations of the same centers. A unique-codebook conclusion needs an actual uniqueness condition (or a distance that identifies permutations); it does not follow merely from empirical minimization.

A second mistake is to check empirical convergence only at each fixed codebook and then use it as though it were uniform. A selected \(\hat c_n\) depends on the sample, so pointwise convergence does not by itself control the risk at that random choice. The finite-net argument supplies the uniform control needed in the comparison. Finally, compactness matters twice: it ensures an optimum exists and makes risk levels away from the minimizing set positively separated. Without compactness, a sequence can drift while its risk approaches the infimum, so this separation argument may fail.

Key takeaway: The consistency chain is \(\Delta_n\xrightarrow{p}0\), \(\varepsilon_n\xrightarrow{p}0\), and positive separation away from \(\mathcal{M}\), which together imply \(\operatorname{dist}(\hat c_n,\mathcal{M})\xrightarrow{p}0\). Each condition has a distinct role; none should be silently replaced by pointwise risk convergence or by an assumption of uniqueness.

Check Your Understanding

Use the definitions and proof structure above to answer the following.

  1. Why does continuity of \(R\) on compact \(C^K\) guarantee that \(\mathcal{M}\) is nonempty?
  2. In the finite-net proof, where is boundedness of the distortion used, and where is compactness used?
  3. Explain why the separation gap \(\gamma_\delta\) is positive when \(A_\delta\) is nonempty.
  4. What risk comparison changes if \(\varepsilon_n\) does not converge to zero?
  5. Why does set-valued consistency allow the two ordered codebooks in the two-point example?
Clinical Biostats