Abstract
Positive and unlabeled (PU) learning is a fundamental task in many applications, which trains a binary classifier from only PU data. Existing PU learning methods typically assume that training and test distributions are identical. However, this assumption is often violated due to distribution shifts, and identifying shift types such as covariate and concept shifts is generally difficult. In this paper, we propose a distribution shift adaptation method for PU learning without assuming shift types by using a few PU data in the test distribution and PU data in the training distribution. Our method is based on the importance weighting, which learns the classifier in a principled manner by minimizing the importance-weighted training risk that approximates the test risk. Although existing methods require positive and negative data in both distributions for the importance weighting without assuming shift types, we theoretically show that it can be performed with only PU data in both distributions. Based on this finding, our neural network-based classifiers can be effectively trained by iterating the importance weight estimation and classifier learning. We show that our method outperforms various existing methods with seven real-world datasets.
Introduction
In many real-world scenarios, such as personalized advertising or medical diagnosis, we often only have access to "positive" examples (e.g., ads clicked, confirmed cases) and a large pool of "unlabeled" data. This is the core of Positive-Unlabeled (PU) learning. A significant challenge in this field is distribution shift, where the data distribution changes between training and testing (e.g., shifting user preferences or changing demographics). Most existing PU learning tools assume identical environments or require knowledge of the specific shift type (covariate vs. concept shift), which is often unavailable in practice.
Methods
The proposed method adapts to distribution shifts using importance weighting, which reweights training samples to better reflect the test distribution.
PU-only Importance Weighting
Traditionally, calculating importance weights requires both positive and negative data from both distributions. A key theoretical breakthrough in this work is the proof that this density ratio can be recovered using only PU data. This allows for adaptation without ever seeing confirmed negative examples.
Dynamic Learning and Shared Features
To avoid the error propagation common in traditional "two-step" processes (where weights are estimated once before training), the authors employ a dynamic approach. The model iterates between weight estimation and classifier training. Both components share a neural network backbone for feature extraction, enabling the weight estimator to handle complex data like images effectively.
Risk Correction
PU learning is prone to "negative empirical risk," leading to severe overfitting. The authors integrate absolute value and lower-bound corrections into the importance-weighted loss function to maintain training stability.
Experimental Results
The method was evaluated on seven datasets, including image data (MNIST, FMNIST, CIFAR10) and tabular data (DIABETES, FoodStamp). Shifts were simulated by flipping labels or altering the support of sub-categories.
Performance Comparison
The proposed method consistently outperformed eight state-of-the-art baselines across various shift types. On CIFAR10 with a support shift, it achieved 85.72% accuracy, notably higher than the next best baseline (84.52%). On the DIABETES dataset, it reached 0.7242 accuracy, surpassing standard domain adaptation methods like DAPU.
Efficiency and Robustness
Despite the iterative learning process, training time remains practical (e.g., ~244 seconds for MNIST on an A100 GPU). The introduction of a hyperparameter $\beta$ allows the model to balance risk between the small test PU set and the larger reweighted training set, proving more robust than relying on either alone.
Conclusion and Future Work
While highly effective, the method faces challenges when test PU data is extremely scarce (e.g., only a few instances), where importance weighting can become unstable. Future work may explore meta-learning for few-shot scenarios. Additionally, while the model is robust to errors in class prior estimates, developing a version that automatically estimates these priors under distribution shift remains an open research challenge.
Summary updated