In many real-world classification tasks, we lack a balanced dataset of labeled examples. Instead, we often find ourselves with a small set of confirmed "positive" instances and a massive sea of "unlabeled" data that contains both hidden positives and negatives. This is the Positive-Unlabeled (PU) learning problem.
Traditional approaches to PU learning often rely on a two-step heuristic: first, identify "reliable negative" samples from the unlabeled pool, and then train a standard classifier. However, this is inherently error-prone. If the initial heuristic misidentifies a hidden positive as a negative, the error propagates through the entire training process.
A more robust family of methods, pioneered by researchers like Masashi Sugiyama and Joey Tianyi Zhou, shifts the focus from identifying individuals to modeling distributions. By estimating the density ratio between the positive data and the unlabeled data, we can derive a classifier that is mathematically principled and remarkably robust.
The Intuition of the Ratio
To understand why this works, consider the relationship between three probability densities: the positive distribution $p_P(x)$, the negative distribution $p_N(x)$, and the marginal (unlabeled) distribution $p_U(x)$.
The unlabeled data is simply a mixture of the two classes: $$p_U(x) = \pi p_P(x) + (1 - \pi) p_N(x)$$ where $\pi$ is the "class prior"—the proportion of positive samples in the unlabeled set.
The core insight of density ratio estimation is that we don't need to know $p_N(x)$ to find the decision boundary. If we can estimate the ratio $r(x) = \frac{p_P(x)}{p_U(x)}$, we have found a proxy for the probability that a sample is positive. As Haiyang Zhang notes in Document Set Expansion with Positive-Unlabeled Learning, this ratio allows us to rank items by their relevance without ever explicitly defining what a "negative" document looks like.
Prior Invariance and Robustness
A significant hurdle in PU learning is the class prior $\pi$. Most algorithms require you to know exactly what percentage of your unlabeled data is positive. If this estimate is wrong—or if the proportion changes between training and testing (a "class-prior shift")—the model fails.
Masashi Sugiyama and Shota Nakajima addressed this in Positive-Unlabeled Classification under Class-Prior Shift by developing DRPU (Density Ratio estimation for PU learning). They demonstrated that the density ratio $p_P(x)/p_U(x)$ can be learned using objective functions that are prior-invariant.
Because the ratio captures the fundamental structural relationship between the "known positives" and the "general population," the resulting model remains valid even if the frequency of positives fluctuates. The ratio acts as a universal ranking function; the specific threshold for classification can be adjusted post-hoc if the prior changes.
From Ratios to Optimal Classifiers
While the ratio itself is useful for ranking, we often need a hard classifier. Atsutoshi Kumagai and colleagues show in Meta-learning for Positive-unlabeled Classification that a Bayes optimal classifier can be reconstructed by combining this density ratio with a class-prior estimate.
This decomposition is powerful because it separates the structural learning (what makes a positive sample unique?) from the statistical learning (how many positives are there?). This separation is what allows Dmitry Ivanov to create "plug-and-play" methods like DEDPUL (Method for Mixture Proportion Estimation and Positive-Unlabeled Classification based on Density Estimation). DEDPUL treats density estimation as a post-processing step, allowing it to improve the accuracy of any base classifier by recalibrating its outputs based on the estimated density of hidden positives.
Applications in Search and Discovery
The density ratio approach is particularly effective in "needle-in-a-haystack" scenarios. In Document Set Expansion with Positive-Unlabelled Learning Using Intractable Density Estimation, Haiyang Zhang applies this to scientific literature discovery. When a researcher provides a few "seed" papers, the system doesn't try to guess which other papers are "definitely irrelevant." Instead, it models the density of the seeds relative to the entire library.
Similarly, in active learning, Alireza Ghasemi and Hamid R. Rabiee use these ratios in ALPUD to identify the most informative samples to label. By looking for regions where the density ratio is most uncertain, the system can query the user for labels that provide the maximum information gain, all without requiring an initial set of negative examples.