NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Compression, Generalization and Learning

Marco C. Campi, Simone Garatti · DOI

Abstract

Estimating the generalization risk of machine learning models without relying on expensive hold-out sets or restrictive distributional assumptions is a long-standing challenge. This paper presents a novel theoretical framework that utilizes the concept of "compression" to bound statistical risk. By analyzing the cardinality of a compressed dataset (e.g., support vectors in an SVM), the authors derive distribution-free upper and lower bounds that are significantly tighter than previous theoretical results. These bounds form a "lenticular" region that converges to the ratio of compressed elements to total samples as the dataset size increases. This work provides a rigorous foundation for observation-driven model evaluation and hyper-parameter tuning.

Introduction

The fundamental goal of machine learning is generalization: the ability of a model trained on a finite dataset to perform accurately on unseen data. Traditionally, practitioners estimate this "risk" using a hold-out test set. However, in domains where data is scarce or expensive, splitting the dataset is often impractical. While theoretical generalization bounds exist to provide risk estimates without a test set, they frequently suffer from two primary limitations: they are often too conservative (loose) for engineering utility, and they often require specific assumptions about the underlying data distribution or geometric properties (such as non-degeneracy).

This research bridges the gap between theory and practice by introducing a framework where the size of a compressed dataset acts as a highly accurate, distribution-free estimator of true statistical risk.

Theoretical Framework: The Power of Compression

The authors approach the problem by studying compression functions in isolation. A compression function $c$ reduces a large dataset to a smaller subset that retains the essential information required by the learning algorithm. To derive tight bounds, the framework identifies three critical properties:

  1. Preference (Stability): This property ensures that if a specific subset is not selected as the compressed set for a given dataset, it will not become the compressed set simply by adding more data points.
  2. Non-associativity: This condition dictates that if adding elements individually does not alter the compression, adding them simultaneously should also leave the compression unchanged.
  3. Non-concentrated Mass: A technical requirement ensuring that no single data point has a non-zero probability of being drawn, a condition typically satisfied by continuous distributions.

By framing the probability of a "change in compression" as a variational optimization problem and solving its dual, the authors derive exact functions, $\varepsilon_k$ and $\bar{\varepsilon}_k$. These functions provide the upper and lower bounds for risk based solely on the cardinality ($k$) of the compressed set and the total number of samples ($N$).

The "Sandwich" of Generalization

A central insight of this work is that the size of the compressed set ($k$) is a sufficient statistic for risk. The specific nature of the data is secondary; the number of "essential" points used by the model provides the necessary information to estimate performance.

The relationship between compression size and risk is visualized as a "lenticular region"—a lens-shaped area bounded by the derived upper and lower limits. As the dataset size $N$ grows, this lens narrows, effectively "sandwiching" the true risk. The authors prove that the ratio $k/N$ is a strongly consistent estimator of risk, meaning that regardless of the data distribution, the ratio of compressed points to total points converges to the true error rate.

Empirical and Theoretical Validation

The paper validates these bounds through both mathematical application and synthetic simulations:

  • Synthetic Monte-Carlo Simulations: Using points in $\mathbb{R}^3$ drawn from Gaussian and uniform distributions, the authors demonstrate that the actual risk of a convex hull algorithm falls perfectly within the predicted lenticular region.
  • Algorithmic Applications: The bounds are applied to established algorithms, including Support Vector Machines (SVM), Support Vector Regression (SVR), and the Guaranteed Error Machine (GEM).
  • Performance Metrics: For finite samples (e.g., $N=2000$), the bounds are shown to be significantly tighter than previous state-of-the-art results, such as those proposed by Bousquet et al. (2020). Asymptotically, the upper and lower bounds merge toward the $k/N$ ratio at a rate of $O(\sqrt{\ln(N)/N})$.

Discussion and Limitations

While the framework offers unprecedented tightness, it relies on specific algorithmic properties. The "Preference" property is essential for the tightest results; while satisfied by SVMs, it may be more difficult to define or prove for modern deep learning architectures. Similarly, the "Non-associativity" required for the lower bound presents a challenge for complex, non-convex optimization problems. Furthermore, while the paper suggests these bounds are ideal for hyper-parameter tuning, the development of a fully automated framework for this purpose remains a subject for future research.

Conclusion

This work establishes a new "observation-driven" methodology for machine learning. By demonstrating that the data itself—through the lens of compression—reveals the reliability of a model, the authors provide a path toward more rigorous and practical model selection. The "sandwich" of generalization ensures that as we collect more data, our understanding of model risk becomes increasingly precise, independent of the underlying distribution.

Summary updated

BibTeX
@article{campi2023compression,
  author = {Marco C. Campi and Simone Garatti},
  title = {{Compression, Generalization and Learning}},
  journal = {J. Mach. Learn. Res.},
  year = {2023},
}
Figure