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
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
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.
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
Taking expectations shows that \(R\) is continuous. Since \(C^K\) is compact, \(R\) attains its minimum and \(\mathcal{M}\) is nonempty and compact.
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
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]\),
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\),
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.
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
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
Combining this upper bound with the separation inequality yields \(\varepsilon_n+2\Delta_n\geq\gamma_\delta\). Therefore
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
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.
Check Your Understanding
Use the definitions and proof structure above to answer the following.
- Why does continuity of \(R\) on compact \(C^K\) guarantee that \(\mathcal{M}\) is nonempty?
- In the finite-net proof, where is boundedness of the distortion used, and where is compactness used?
- Explain why the separation gap \(\gamma_\delta\) is positive when \(A_\delta\) is nonempty.
- What risk comparison changes if \(\varepsilon_n\) does not converge to zero?
- Why does set-valued consistency allow the two ordered codebooks in the two-point example?