Class Prior Estimation in Positive Unlabeled Learning

19 concepts19 papers1 proposal

Imagine you are building a machine learning model to detect tax evasion. You have a list of confirmed tax evaders (the Positive class) and a massive pool of unverified citizens (the Unlabeled pool). Crucially, the unlabeled pool is a mystery box: it contains both honest taxpayers and undiscovered tax evaders.

To train an accurate classifier, you face a fundamental mathematical roadblock: you do not know the class prior ($\pi$), which is the true proportion of positive instances hidden within the unlabeled pool. Without this single number, a model cannot distinguish between a low labeling rate (e.g., tax auditors are thorough but understaffed) and a low true prevalence of the crime. As Mansouri et al. establish, standard theoretical guarantees for learning from positive and unlabeled (PU) data break down if this parameter is missing.

Class Prior Estimation (CPE)—sometimes framed broadly as mixture proportion estimation by Sugiyama—is the task of recovering this hidden proportion using only the labeled positives and the mixed unlabeled data.

Why Simple Matching Fails: The Overlap Problem

Intuitively, you might try to estimate the prior by matching the distribution of your known positives to the unlabeled mixture. If the unlabeled distribution looks $30\%$ similar to the positive distribution, you might guess that $\pi = 0.3$.

However, as Marthinus et al. demonstrate, standard divergence-matching techniques systematically overestimate the class prior whenever the positive and negative classes overlap in feature space.

To understand why, consider the mixture equation that governs PU learning:

$$p_U(x) = \pi p_P(x) + (1-\pi) p_N(x)$$

where $p_U$, $p_P$, and $p_N$ are the probability densities of the unlabeled, positive, and negative data, respectively. If you try to fit $p_P(x)$ into $p_U(x)$ without knowing $p_N(x)$, any region where the true negative distribution overlaps with the positive distribution can be mistakenly absorbed into your estimate of the positive class. The optimization framework will greedily maximize $\pi$ by assuming that the negative density drops to zero in those overlapping regions, leading to severe overestimation.

Mechanism 1: Penalized Divergence Matching

To fix this systematic overestimation, researchers shifted from pure distribution matching to regularized or penalized matching.

du Plessis et al. and Niu et al. introduced a framework utilizing properly penalized $f$-divergences, such as a penalized $L_1$-distance. The core intuition is to introduce a mathematical penalty that punishes the estimated negative distribution if it behaves erratically or dips below zero. By enforcing this constraint, the algorithm is prevented from artificially inflating $\pi$. Using an $L_1$-distance yields a computationally efficient, analytic solution that bypasses the need for slow, iterative optimization.

In parallel, du Plessis et al. developed a single-step method leveraging Pearson (PE) divergence and Fenchel duality. Instead of performing difficult, high-dimensional density estimation for $p_U(x)$ and $p_P(x)$ first and then dividing them, their approach estimates the density ratio directly in a single optimization step. This prevents errors from compounding in high-dimensional spaces and remains robust even under extreme class imbalances.

Mechanism 2: Hunting for Pure Subspaces

An alternative geometric intuition bypasses density equations entirely by searching for "pure" regions in the data. If you can find a pocket of the feature space where only positive samples exist (meaning $p_N(x) = 0$), then within that specific pocket, the ratio of labeled positives to total unlabeled samples directly reveals the global class prior.

Feature Space:
[ Negative Class ]  --> Overlap Region <--  [ Pure Positive Pocket ]
                                            (p_N(x) = 0)
                                            Ratio here = Global Prior

The authors of TIcE (Tree Induction for $c$ Estimation), Bekker et al., operationalize this using decision trees. The algorithm recursively splits the data to isolate subtrees that maximize the concentration of labeled positive samples. Once a sufficiently pure subtree is found, the local ratio is used to compute a fast, highly scalable estimate of the global prior.

Taking a non-parametric approach, Zeiberg et al. developed DistCurve. Instead of building trees, it analyzes the distribution of distances between known positive samples and their nearest unlabeled neighbors. By plotting these distances, the algorithm identifies a distinct "elbow point"—the exact geometric threshold where the positive distribution ends and the negative distribution begins—to read off the class prior.

From Theory to Real-World Impact

Accurately estimating the class prior is not just a theoretical exercise; it is the linchpin that enables machine learning to function in partially labeled environments.

  • Loss Calibration in Deep Learning: When training deep neural networks on massive text collections for document expansion, Jacovi et al. showed that models fail to balance precision and recall without an accurate prior. Knowing $\pi$ allows the model to correctly weight the contribution of unlabeled samples in the loss function.
  • Algorithmic Fairness: In administrative data, certain demographic groups may under-report features or incidents due to systemic factors. Chouldechova et al. demonstrated that this "hidden missingness" introduces severe algorithmic bias. By adapting PU learning to estimate these unknown group-specific reporting rates, they created augmented loss functions that successfully mitigate demographic disparities.
  • Domain Applications: Whether catching tax evaders (Cao et al.), predicting protein functions from incomplete gene ontologies (Zhapa-Camacho et al.), or training unbiased recommendation engines from implicit user clicks (Wang et al.), class prior estimation bridges the gap between raw, incomplete real-world data and robust, unbiased predictive models.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_class_prior_estimation_7cd32f28,
  title = {class prior estimation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/class-prior-estimation/rdr_7cd32f28cfcc418ba0e783cf84329bf5},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-26},
}

This exact version (version 1, frozen text):

@misc{lacuna_class_prior_estimation_7cd32f28_v1,
  title = {class prior estimation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/class-prior-estimation/rdr_7cd32f28cfcc418ba0e783cf84329bf5/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-26},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake