In the ideal world of supervised learning, we have a clear label for every data point. In the real world, we often have to make do with "weak" supervision: Positive-Unlabeled (PU) data where we only know some examples are positive, or complementary labels that tell us what a class isn't.
To learn from this messy data, researchers use Unbiased Risk Estimators (UREs). These are mathematical formulas designed to estimate the true classification error using only the available weak signals. However, when these formulas meet high-capacity models like deep neural networks, they encounter a catastrophic failure mode: the estimated risk can become negative, causing the model to diverge or overfit to mathematical noise.
The Negative Risk Glitch
To understand why risk becomes negative, consider the classic Positive-Unlabeled (PU) setting. We have a set of positive samples ($P$) and a set of unlabeled samples ($U$). The unlabeled set is a mixture of hidden positives and hidden negatives.
To estimate the risk (loss) of the negative class without having any labeled negative samples, researchers like Marthinus Christoffel du Plessis and Masashi Sugiyama developed a "risk rewriting" trick. Mathematically, the risk on negatives can be expressed as the risk on all unlabeled points minus the risk on the hidden positives.
The formula looks roughly like this: $$\text{Risk}_{\text{negative}} \approx \text{Risk}_{\text{unlabeled}} - \pi \cdot \text{Risk}_{\text{positive}}$$ where $\pi$ is the proportion of positive samples in the unlabeled pool.
Theoretically, this is elegant and unbiased. But in practice, especially during a mini-batch update in deep learning, the empirical estimate of $\text{Risk}_{\text{unlabeled}}$ might be smaller than the estimate of $\pi \cdot \text{Risk}_{\text{positive}}$. When this happens, the calculated risk drops below zero. Because deep neural networks are "loss-hungry" optimizers, they will exploit this negative value, driving the loss to negative infinity and destroying the model's predictive power.
Enforcing Physical Reality with nnPU
The breakthrough in making these estimators work for deep learning came from Ryuichi Kiryo, Gang Niu, and colleagues in their work on non-negative risk estimators (nnPU).
The intuition is simple: classification risk is a probability-based expectation of error; it cannot physically be negative. To fix the "glitch," they proposed wrapping the negative-class risk estimate in a rectification function, such as a $\max(0, \cdot)$ operator.
When a mini-batch produces a negative risk estimate, the operator floors it at zero. More importantly, as Kiryo et al. noted, if the risk is negative, the optimizer should actually perform a "gradient ascent" step—moving away from the current parameters to push the risk back into the positive, physically meaningful territory. This prevents the model from overfitting to the specific samples in that mini-batch that caused the mathematical artifact.
Beyond Zero-Clipping: Absolute Value and Flooding
While zero-thresholding was the first successful correction, it can sometimes "kill" the gradient, leaving the model with no direction to learn from. Subsequent research has explored more robust ways to maintain non-negativity while preserving signal:
- Absolute Value Correction: Zayd Hammoudeh and Daniel Lowd argued in Learning from Positive and Unlabeled Data with Arbitrary Positive Shift that taking the absolute value of the risk estimate acts as a natural penalty. If the risk becomes negative, the absolute value turns it into a positive penalty, forcing the model to correct itself without needing complex thresholding.
- Flooding and Wrapping: In the context of multi-label learning, Wei Wang and Gang Niu have utilized "flooding"—setting a small positive threshold instead of zero—to prevent the loss from ever reaching a state where the model can overfit to noise (Rethinking Consistent Multi-Label Classification under Inexact Supervision).
- Gradient Ascent: Takashi Ishida and others demonstrated that for complementary-label learning, explicitly switching to gradient ascent when risk is low is a powerful stabilizer (Complementary-Label Learning for Arbitrary Losses and Models).
A Universal Stabilizer for Weak Supervision
The need for non-negative risk correction has proven to be a universal requirement across diverse weakly supervised tasks. It is no longer just a "PU learning trick."
For instance, in Anomaly Detection, Hiroshi Takahashi and Atsutoshi Kumagai have used non-negative estimators to prevent models from collapsing when training on contaminated unlabeled data (Deep Positive-Unlabeled Anomaly Detection for Contaminated Unlabeled Data). Similarly, in Similarity-Confidence Learning, Lei Feng and Bo An have shown that risk correction is essential when training models on pairs of unlabeled data (Pointwise Binary Classification with Pairwise Confidence Comparisons).
By enforcing the simple physical constraint that "error cannot be less than zero," these techniques have transformed theoretically interesting formulas into robust tools that allow deep neural networks to learn from the vast, unlabeled, and imperfectly labeled data of the real world.