Weakly-Supervised Domain Adaptation with Proportion-Constrained Pseudo-Labeling

Takumi Okuo, Shinnosuke Matsuo, Shota Harada, Kiyohito Tanaka, Ryoma Bise

TL;DR

Standard domain adaptation methods fail when the ratio of classes differs between the source and target datasets. This paper introduces a weakly-supervised approach that leverages aggregate target class proportions—information often readily available in medical statistics—to constrain pseudo-labeling, outperforming semi-supervised methods without requiring any manual target-domain annotations.

What Problem Does This Paper Address?

Domain shift is a classic machine learning challenge, particularly in medical imaging. A model trained on endoscopic images from one hospital (source domain) often performs poorly when deployed at another hospital (target domain) due to differences in camera equipment, lighting, or patient demographics.

Unsupervised Domain Adaptation (UDA) attempts to solve this by aligning the feature distributions of the source and target domains. However, standard UDA algorithms break down when the class proportions differ between hospitals (e.g., a specialized clinic might see a much higher percentage of severe cases than a general hospital). When overall distributions are forced to align despite a class mismatch, the decision boundaries become severely skewed, leading to poor generalization.

An example of class proportion mismatch between source and target domains, showing how decision boundaries become inconsistent even when overall distributions are aligned.

While Semi-Supervised Domain Adaptation (SSDA) can fix this by labeling a small fraction of the target data, manual annotation by medical experts is expensive and time-consuming.

Methods

The authors propose a weakly-supervised framework called Proportion-Constrained Pseudo-Labeling. Instead of requiring individual image labels, it relies only on the overall percentage of each class in the target domain—a statistical metric often easily extracted from hospital reports or epidemiological studies.

The pipeline operates in two main phases:

  1. Source Pre-training: A standard feature extractor and classifier are trained on the fully labeled source dataset.
  2. Proportion-Constrained Iterative Retraining: The model is adapted to the target domain using an iterative optimization loop:
  3. Centroid Distance Calculation: The target images are mapped to the feature space, and their distances to the source class centroids are calculated.
  4. Constrained Optimization: Instead of simply assigning each target sample to its nearest centroid (which introduces class bias), pseudo-labels are assigned by solving an optimization problem. This problem minimizes total distance to the centroids subject to the hard constraint that the resulting label distribution must exactly match the known target class proportions.
  5. Linear Programming Relaxation: Because this integer programming problem is NP-hard, the authors relax it into a linear programming problem, allowing it to be solved efficiently in polynomial time.
  6. Model Update: The network is retrained using cross-entropy loss on both the source data and the newly pseudo-labeled target data, with oversampling applied to mitigate class imbalance.
Fig. 2. Overview of our method approach. (a) Training using only the source domain. (b) Calculating scores based on the distance between the source domain centroids and individual instances. (c) Assigning pseudo-labels by minimizing the scores under the constraint of satisfying class proportions. (d) Training using the pseudo-labels.

Datasets

The method was validated on two distinct endoscopic image datasets for Ulcerative Colitis (UC) severity classification, using the 4-class Mayo Endoscopy Score (MES 0 to 3):

  • LIMUC: A public dataset containing 11,276 images (54.14% Mayo 0 / healthy, 7.67% Mayo 3 / severe).
  • Private Dataset: A dataset containing 10,265 images with a noticeably different distribution (65.06% Mayo 0, 1.92% Mayo 3).

Key Insights and Ideas

  • Macro-level Statistics vs. Micro-level Labels: In clinical settings, getting a radiologist to label 500 images is difficult, but getting a report stating "roughly 2% of our historical patient base has severe UC" is trivial. This paper demonstrates that macro-level statistical priors can be just as effective as micro-level sample annotations.
  • Preserving Relative Geometry: The core intuition is that while domain shift moves data around in the feature space, the relative positioning of classes usually remains stable. By anchoring the target data to source centroids but forcing the proportions to match the target domain, the decision boundary naturally corrects itself.

Key Results

The authors evaluated performance using accuracy and macro-F1 score (mF1), which is highly sensitive to minority classes in imbalanced datasets.

  • Outperforming Unsupervised Methods: In the "LIMUC to Private" adaptation task, standard unsupervised adaptation (ADDA) achieved an mF1 of just 0.318. The proposed method achieved an mF1 of 0.559—a massive leap forward.
  • Beating Semi-Supervised Baselines: Remarkably, the proposed method outperformed state-of-the-art semi-supervised methods (like $S^3D$ and MME) even when those methods were given 5% fully labeled target data (~400 manually annotated images).
  • Robustness to Noise: To simulate real-world conditions where statistical reports might be slightly inaccurate, the authors added Dirichlet noise to the target proportions. Even with a 10% total deviation from the true proportions, the model's performance degraded only slightly, remaining competitive with 3% semi-supervised learning.

Limitations and Future Work

  • Dependence on Proportion Accuracy: While robust to minor noise, if the target class proportions provided are radically incorrect, the model will overfit to those faulty proportions, leading to degraded classification performance.
  • Future Directions: The authors aim to explicitly incorporate the noise distribution of the target proportions into the optimization step to prevent overfitting to imperfect statistical data. They also plan to explore how target proportions can be integrated directly into existing semi-supervised frameworks to get the best of both worlds.

Summary updated

BibTeX
@inproceedings{okuo2025weakly,
  author = {Takumi Okuo and Shinnosuke Matsuo and Shota Harada and Kiyohito Tanaka and Ryoma Bise},
  title = {{Weakly-Supervised Domain Adaptation with Proportion-Constrained Pseudo-Labeling}},
  booktitle = {IJCNN},
  year = {2025},
  doi = {10.1109/ijcnn64981.2025.11227355},
}
Figure