,
Kazumi Kasaura
,
Yuma Mizuno
,
Kei Tsukamoto
,
Naoto Onda
Creative Commons Attribution 4.0 International license
Understanding and certifying the generalization performance of machine learning algorithms - i.e. obtaining theoretical estimates of the test error from the training error - is a central theme of statistical learning theory. Among the many complexity measures used to derive such guarantees, Rademacher complexity yields sharp, data-dependent bounds that apply well beyond classical VC-dimension theory. In this study, we formalize the generalization error bound by Rademacher complexity in Lean 4, building on measure-theoretic probability theory available in the Mathlib library. Our development provides a mechanically-checked pipeline from the definitions of empirical and expected Rademacher complexity, through a formal symmetrization argument and a bounded-differences analysis, to high-probability uniform deviation bounds via a formally proved McDiarmid inequality. A key technical contribution is a reusable mechanism for lifting results from countable hypothesis classes (where measurability of suprema is straightforward in Mathlib) to separable topological index sets via a reduction to a countable dense subset. As worked applications of the abstract theorem, we mechanize standard empirical Rademacher bounds for linear predictors under 𝓁₂ and 𝓁₁ regularizations, and we also formalize a Dudley-type entropy integral bound based on covering numbers and a chaining construction.
@InProceedings{sonoda_et_al:LIPIcs.ITP.2026.8,
author = {Sonoda, Sho and Kasaura, Kazumi and Mizuno, Yuma and Tsukamoto, Kei and Onda, Naoto},
title = {{Lean Formalization of Generalization Error Bound by Rademacher Complexity and Dudley’s Entropy Integral}},
booktitle = {17th International Conference on Interactive Theorem Proving (ITP 2026)},
pages = {8:1--8:17},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-436-9},
ISSN = {1868-8969},
year = {2026},
volume = {382},
editor = {Komendantskaya, Ekaterina and Nipkow, Tobias},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ITP.2026.8},
URN = {urn:nbn:de:0030-drops-269824},
doi = {10.4230/LIPIcs.ITP.2026.8},
annote = {Keywords: Lean, generalization error bound, Rademacher complexity, McDiarmid’s inequality, Hoeffding’s lemma, symmetrization arguments, chaining, Dudley’s entropy integral}
}
archived version
archived version