A Link between Coding Theory and Cross-Validation with Applications
Tapio Pahikkala, Parisa Movahedi, Ileana Montoya, Havu Miikonen, Stephan Foldes, Antti Airola, Laszlo Major
TL;DR
This work formalizes a precise bridge between cross-validation performance and error-detecting codes, showing that the maximal number of labelings allowing zero LPOCV errors equals the maximal size of a constant-weight code of length $n$, weight $w$, and distance $4$, and extends the theory to $W$-light codes for bounded errors. By recasting LPOCV outcomes as orientations of Johnson graphs, the authors derive upper and lower bounds on the maximal LPOCP capacity and introduce extended Bose-Rao constructions to achieve large code sizes, providing practical tools for LPOCV-based significance tests for AUC that hold for any learning algorithm. The paper also presents simulations and a real MRI dataset to illustrate how empirical critical values can be estimated and how test power depends on data separability and learner choice. These results offer a theoretically grounded framework for hypothesis testing in learning that is robust to the unknowns of the learning algorithm and data distribution, with potential practical impact on model evaluation and validation. The work points to future directions including leveraging algorithmic classes for tighter tests, extending to larger hold-out schemes, and exploring more powerful, code-based tests beyond the current LPOCV setup.
Abstract
How many different binary classification problems a single learning algorithm can solve on a fixed data with exactly zero or at most a given number of cross-validation errors? While the number in the former case is known to be limited by the no-free-lunch theorem, we show that the exact answers are given by the theory of error detecting codes. As a case study, we focus on the AUC performance measure and leave-pair-out cross-validation (LPOCV), in which every possible pair of data with different class labels is held out at a time. We show that the maximal number of classification problems with fixed class proportion, for which a learning algorithm can achieve zero LPOCV error, equals the maximal number of code words in a constant weight code (CWC), with certain technical properties. We then generalize CWCs by introducing light CWCs, and prove an analogous result for nonzero LPOCV errors and light CWCs. Moreover, we prove both upper and lower bounds on the maximal numbers of code words in light CWCs. Finally, as an immediate practical application, we develop new LPOCV based randomization tests for learning algorithms that generalize the classical Wilcoxon-Mann-Whitney U test.
