Importance Weighting for Unlabeled-unlabeled Learning under Distribution Shift

Atsutoshi Kumagai, Tomoharu Iwata, Hiroshi Takahashi, Taishi Nishiyama, Kazuki Adachi, Yasuhiro Fujiwara

TL;DR

This paper introduces a novel framework for "unlabeled-unlabeled" (UU) learning that remains robust even when the data distribution changes between training and testing. By extending importance weighting to work with unlabeled data, the authors provide a unified, principled solution for various weak-supervision tasks—like PU and noisy label learning—under distribution shift.

What Problem Does This Paper Address?

In the real world, labeled data is expensive and often impossible to collect. Researchers often turn to "weak supervision," such as Unlabeled-unlabeled (UU) learning, where a classifier is trained using two sets of unlabeled data that simply have different proportions of positive and negative samples (class priors).

However, a major hurdle remains: distribution shift. Most existing UU methods assume that the training data and the real-world test data come from the exact same distribution. In practice, environments change—new types of cyberattacks emerge, or data collection sensors are upgraded—causing these models to fail. Existing solutions for distribution shift typically require labeled data or make restrictive assumptions about the type of shift (e.g., covariate shift), which are often unrealistic in practice.

Methods

The authors propose a distribution shift adaptation method based on Importance Weighting. The core idea is to re-weight training samples so the model focuses on data points that most closely resemble the test distribution.

Key technical contributions include:

  • Principled UU Importance Weighting: The authors prove that importance weights (the ratio between test and training densities) can be estimated directly from UU data using only class priors, without needing any labeled samples.
  • Relative Density-Ratio Estimation: To avoid numerical instability where training density is low, they use a relative ratio $w_\alpha(x, y)$ that bounds the weights, improving training robustness.
  • Dynamic Neural Training: For complex data like images, they use a dynamic approach (Algorithm 1) where a weight-estimating network and the classifier network are trained iteratively. They share a common feature extractor to ensure the weights are learned in a relevant latent space.
  • Risk Correction: They employ non-negative risk estimators and lower-bound corrections to prevent the empirical loss from becoming negative—a common mathematical artifact in UU and PU learning that leads to severe overfitting.
Overview of the UU learning problem setting under distribution shift.

Datasets

The method was evaluated on several real-world benchmarks:

  • Image Datasets: MNIST, FashionMNIST (FMNIST), and CIFAR10.
  • Tabular Datasets: DIABETES and FOODSTAMP (a large-scale dataset where shift occurs due to geographic differences).

The researchers manually constructed two challenging types of shifts for the image data: support shift (where the range of inputs changes, a form of covariate shift) and input-output relation shift (concept shift, where the relationship between features and labels changes).

Key Insights and Ideas

  • The "Super-Framework" Advantage: UU learning is highly general; by simply adjusting class-prior values, it can represent Positive-Unlabeled (PU), Positive-Negative (PN), and noisy label learning. Solving the distribution shift problem for UU learning effectively solves it for all these sub-fields simultaneously.
  • Weighting Without Labels: The "aha moment" is the mathematical proof that the test risk can be rewritten using only training UU data and estimated importance weights. This allows for domain adaptation in scenarios where traditional methods would be "blind" due to a lack of labels.
  • Shift-Agnostic Adaptation: Unlike many domain adaptation techniques that fail if they misidentify the shift type, this method requires no assumptions about whether the shift is covariate or concept-based. It simply uses a small "calibration" set of UU data from the test distribution to adjust.

Key Results

The proposed method consistently outperformed or matched state-of-the-art UU baselines and general domain adaptation methods across all datasets.

  • Significant Accuracy Gains: On CIFAR10 under support shift, the proposed method achieved 82.94% accuracy, vastly outperforming the standard test-distribution UU learner (69.29%).
  • Robustness to Supervision Types: The method proved flexible enough to handle different types of supervision between phases—for example, training on noisy labels and adapting using a few clean positive/negative (PN) samples in the test phase, where it again outperformed all baselines.
  • Stability: The use of relative density-ratios and risk corrections allowed the model to maintain high performance even as the number of available test-domain samples increased.

Limitations and Future Work

The primary limitation is the reliance on knowing the class priors ($\pi, \theta$) for both distributions. While the authors demonstrated that the method is somewhat robust to noise in these priors (up to a point), in many real-world applications, these values are unknown.

Future research directions suggested by the work include:

  1. Developing methods to automatically estimate class priors in the presence of distribution shift.
  2. Exploring how this framework could be extended to multi-class classification beyond the binary case.

Summary updated

BibTeX
@inproceedings{kumagai2025importance,
  author = {Atsutoshi Kumagai and Tomoharu Iwata and Hiroshi Takahashi and Taishi Nishiyama and Kazuki Adachi and Yasuhiro Fujiwara},
  title = {{Importance Weighting for Unlabeled-unlabeled Learning under Distribution Shift}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2025},
  url = {https://openreview.net/forum?id=Aoydm8ZwkC},
}
Figure