Hybrid diffusion models: combining supervised and generative pretraining for label-efficient fine-tuning of segmentation models

Bruno Sauvalle, Mathieu SalzmannarXiv 2024 · DOI

Abstract

Training deep learning models for image segmentation is notoriously expensive due to the requirement for meticulous pixel-by-pixel annotation. This paper introduces Hybrid Diffusion Models, a framework that fuses generative diffusion and supervised segmentation into a single pretraining task. By modeling the joint distribution of images and masks, the framework creates superior representations that allow for highly accurate fine-tuning on new, related domains using as few as 20 labeled samples. Evaluation across medical and face segmentation tasks demonstrates that this hybrid approach consistently outperforms purely supervised or unsupervised pretraining methods.

Introduction

The "label bottleneck" in segmentation has traditionally been addressed via two paths: supervised pretraining (transfer learning from large labeled datasets) and unsupervised pretraining (self-supervised tasks like denoising or masked autoencoding). Researchers Bruno Sauvalle and Mathieu Salzmann argue that neither is optimal: supervised learning often ignores the underlying image distribution, while unsupervised diffusion ignores the rich structural information present in source labels. Their proposed hybrid approach seeks to capture the best of both worlds by integrating these tasks.

Methodology: The Hybrid Pretext Task

The core innovation is the Hybrid Diffusion Model. Instead of a standard UNet that predicts only a mask, the architecture is modified to output both a denoised image and a segmentation mask simultaneously.

  • Joint Modeling: During pretraining on a source domain, the model is fed a noisy image. It must simultaneously predict the original clean image (the generative/diffusion part) and the correct segmentation mask (the supervised part).
  • Theoretical Foundation: The authors provide a mathematical proof showing that this approach effectively models the joint distribution $p(x, y)$. This allows the model to be viewed as a generative model for both the image and its label, provided the mapping from image to mask is deterministic.
  • Weighted Loss: A modified Mean Squared Error (MSE) loss function incorporates a weighting factor ($\lambda$) to balance image reconstruction and mask prediction, preventing one task from dominating the other.

Experimental Setup

The researchers evaluated their approach across three distinct imaging categories: skin lesions, chest X-rays, and face segmentation. Crucially, for the fine-tuning stage, they limited the training set to just 20 images to simulate extreme data scarcity.

Table 1: Summary of datasets used for pretraining and fine-tuning across three distinct domains.

Results and Discussion

The hybrid model consistently outperformed models that used only supervised or only unsupervised pretraining across all tested benchmarks.

Table 2: Quantitative results (Jaccard index and mIoU) comparing the hybrid approach against various pretraining and fine-tuning baselines.

Key Findings:

  • Superior Performance: On the DermIS skin lesion dataset, the hybrid model achieved a Jaccard index of 86.76, significantly higher than the unsupervised diffusion baseline (79.67) and the pure supervised baseline (81.45).
  • Robustness in Face Segmentation: For the FFHQ-34 dataset, the hybrid approach reached an mIoU of 56.91, outperforming both the unsupervised (55.08) and supervised (54.49) versions.
  • Efficiency and Scale: The hybrid UNet (138M parameters) proved competitive with, and sometimes superior to, much larger state-of-the-art models like DeepLabv3 and SegFormer that were pretrained on the massive ImageNet-1K dataset.

Limitations and Future Work

While effective, the method currently assumes a deterministic mapping from image to mask, which may be challenged in cases of high inter-observer variability. Additionally, to manage training costs, the authors used a scaled-down version of the standard ADM UNet; further scaling could potentially yield even better results. Finally, the method still requires a substantial labeled dataset for the initial pretraining phase, which remains a hurdle for entirely new domains.

Conclusion

Hybrid diffusion is a natural fit for scenarios where labels are abundant in a source domain but extremely scarce in the target domain. By anchoring generative features to semantic labels early in the training process, the model achieves state-of-the-art label efficiency in complex segmentation tasks.

Summary updated

BibTeX
@misc{sauvalle2024hybrid,
  author = {Bruno Sauvalle and Mathieu Salzmann},
  title = {{Hybrid diffusion models: combining supervised and generative pretraining for label-efficient fine-tuning of segmentation models}},
  year = {2024},
  eprint = {2408.03433},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.03433},
}
Figure