arXiv:2610.41244cs.LGOct 2026

Manuscript Offprint

arXiv:2610.41244

A Unified Framework for Probability Estimation of Data-Dependent Events

Vitaly Feldman, Satyen Kale, Vinod Raman, Kunal Talwar, Ambuj Tewari

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study the general problem of estimating D(G(S))D(\mathcal{G}(S)), the probability that an unknown distribution DD assigns to an event determined by a sample SS of nn i.i.d. draws from DD through a known mapping G\mathcal{G}. The estimation algorithm knows G\mathcal{G} and SS but does not have access to any additional samples from DD. This formulation captures classical missing mass, the data-dependent targets of adaptive data analysis and post-selection inference, and the test error of a data-trained predictor, whose estimation was recently studied by Gastpar et al. (2024a,b). Within this framework we examine the two classical approaches to estimation. The error of the empirical plug-in estimator is exactly a generalization gap, so generalization bounds transfer to it directly. The leave-one-out estimator, which recovers the Good–Turing estimator, is accurate for every mapping that is stable under the deletion of one sample point, including new structured examples such as neighborhoods of the sample and pierced sets.

The main application of our framework is to error estimation for a predictor that combines a base classifier with memorized exceptions, a structure common in theory and in practice. For it, the empirical estimator is identically zero and the leave-one-out estimator can fail. The test error is exactly the missing mass restricted to the error region of the base classifier, a region selected by the same sample. We formulate the general problem of adaptive missing mass estimation to address such dependence and propose a natural hybrid estimator, the Good–Turing estimator restricted to the selected region. We show that the generalization of the base classifier alone does not guarantee the accuracy of this estimator, and derive two bounds on its error: the first one based on the VC dimension of possible error regions and another based on the mutual information of the selected region with the sample.

1 Introduction

Estimating the probability mass assigned by an unknown distribution to a data-dependent set is a basic problem that appears in several guises across probability, statistics, and learning theory. In supervised learning, for example, a training sample determines a classifier, and hence determines an error region whose probability under the data distribution is the test error. In classical missing mass estimation, the sample determines the set of unseen outcomes, and the goal is to estimate the probability of drawing a new point from this unseen set. Although these examples are usually studied with different tools, they share a common structure: the target of estimation is not a fixed

*Work done when the author was an intern at Apple and a student at the University of Michigan, Ann Arbor.

functional of the distribution alone, but a random quantity chosen as a function of the observed sample.

The classical theory has developed powerful estimators for several important special cases. Uniform-convergence and stability arguments justify the empirical plug-in estimator for many learning-theoretic error estimates. Good-Turing-style estimators, and their leave-one-out variants, estimate the missing mass and related k-occurrence or heavy-hitter functionals, even in regimes where the empirical plug-in estimator is identically zero or badly biased [Good, 1953, McAllester and Schapire, 2000, McAllester and Ortiz, 2003]. These successes raise a natural broader question: When can one estimate the probability of an event that is itself chosen as a function of the observed sample?

In this work, we study this question through a unified framework for data-dependent probability estimation. Given i.i.d. samples S∼DnS \sim D^n from an unknown distribution DD over a domain X\mathcal{X}, and a known mapping

G:X⋆→{0,1}X\mathcal{G}:\mathcal{X}^\star \to \{0,1\}^{\mathcal{X}}

that assigns to each sample an event, specified by its {0,1}\{0,1\}-valued indicator function on X\mathcal{X} (and, more generally, a [0,1][0,1]-valued query), the goal is to estimate the random quantity D(G(S))D(\mathcal{G}(S)). The estimator is given G\mathcal{G} and SS, but not any additional fresh samples from DD. Thus the same sample both determines the event and is used to estimate its probability (given fresh samples, the fraction of them that lies in G(S)\mathcal{G}(S) would be an accurate estimate). This formulation subsumes classical missing mass estimation, heavy-hitter estimation, and test-error estimation for learning algorithms.

For the error of a classifier produced by a known learning algorithm, this question was recently posed by Gastpar et al. [2024a,b], who refer to the existence of an accurate estimator of the error as estimability of the algorithm and use it to study when generalization bounds can be tight. The error region of a classifier is a data-dependent event and, conversely, every data-dependent event is the error region of a classifier over a suitably labeled domain, so the notion of learning algorithm estimability and our notion of event estimatability point to the same fundamental problem. In Section 3.3 we give a detailed comparison and discuss some of the differences in the specific formulation we use.

Our guiding example and the main application of our framework is estimation of the error of a predictor that combines structured generalization with memorization. Such predictors are classical in learning theory, where memorizing exceptions is used to derive Occam (compressing) algorithms from PAC learning [Board and Pitt, 1990, Blumer et al., 1987], and common in practice, where deployed models are augmented with local patches, residual memories, and edit modules populated by specific errors [Kauschke and Fürnkranz, 2018, Yang et al., 2023, Mitchell et al., 2022]. For such exception-memorizing predictors both classical approaches to error estimation fail. The empirical estimator is identically zero and therefore does not give useful information about the true error. The leave-one-out estimate, in turn, requires retraining the base learner nn times and comes with no guarantee when that learner is unstable. The quantity to be estimated nonetheless has a clean description: the true error is exactly the missing mass restricted to the error region of the base classifier, the probability that a fresh point is unseen and falls into a region that was itself selected by the sample. To address this problem, in Section 6, we formulate this more generally as an adaptive missing mass estimation task and give a hybrid estimator that combines the empirical and leave-one-out estimator. We show that the generalization of the base classifier alone does not guarantee the accuracy of the hybrid estimator, but prove guarantees for it when either the error region of the base classifier has limited mutual information with the sample or the class of possible error regions has low VC dimension.

Sample-dependent regions whose missing mass is of interest arise well beyond this example. A deployed language model may decline to answer prompts that fail a filter trained on the same data, so that hallucination in the sense of Kalai and Vempala [2024], the mass of facts unseen in training, must be measured on a region chosen by the data. An analyst may ask how many distinct values remain unseen in a subpopulation defined by a predicate chosen after inspecting the sample [Haas et al., 1995, Charikar et al., 2000].

References (76)