MaskedCLIP: Bridging the Masked and CLIP Space for Semi-supervised Medical Vision-Language Pre-training

Lei Zhu, Jun Zhou, Rick Siow Mong Goh, Yong Liu

TL;DR

MaskedCLIP is a novel semi-supervised pre-training framework that bridges the gap between self-supervised masked image modeling (MIM) and vision-language contrastive learning (CLIP). By using a "bridge transformer" to reconcile incompatible feature spaces, it effectively leverages both paired image-text data and unpaired medical images to create highly generalizable foundation models for retinal disease diagnosis.

What Problem Does This Paper Address?

In medical imaging, researchers typically build "foundation models" using one of two strategies:

  1. Vision-Language Pre-training (VLP): Learning from paired image-text data (e.g., CLIP). This captures high-level semantic concepts but is limited by the scarcity of high-quality medical reports.
  2. Self-Supervised Pre-training (SSP): Learning from unlabeled images by predicting masked-out patches (e.g., MAE). This learns excellent general visual features but lacks the specific semantic guidance provided by language.

The authors identify a "feature incompatibility" problem: the feature space of a masked reconstruction task is fundamentally different from the semantic space of a CLIP-style task. Naively combining them leads to poor performance. MaskedCLIP aims to solve this by creating a unified framework that harnesses both data types simultaneously.

Methods

The MaskedCLIP architecture consists of five modules: an image encoder, a text encoder, an image decoder (for reconstruction), a feature decoder (for distillation), and a bridge transformer.

Key innovations include:

  • The Bridge Transformer: This module acts as a connector. It maps the general features from the image encoder into the more specific semantic space required for CLIP-style contrastive learning. This allows the model to maintain "general" features for reconstruction while extracting "semantic" features for language alignment.
  • Masked Knowledge Distillation (MKD): Beyond just reconstructing pixels, the model uses a momentum-updated version of itself to predict the CLIP-space features of masked image patches. This "distills" high-level semantic knowledge back into the local patch representations.
  • Label-Guided Contrastive Learning: Recognizing that medical datasets often have categorical labels (e.g., "Diabetic Retinopathy") rather than full sentences, the authors use a loss function that treats these labels as text prompts, ensuring images with the same diagnosis are pulled together in the feature space.

Datasets

The authors assembled a massive pre-training corpus for retinal image analysis:

  • Total Images: 348,481 color fundus images.
  • Data Sources: 15 public datasets (including ODIR-5K, AIROGS, and EYEPACS) and 10 private datasets.
  • Paired Data: 142,249 images were used for vision-language/label-guided training.
  • Evaluation: The model was tested on 7 public downstream datasets covering diabetic retinopathy grading, glaucoma detection, and multi-disease diagnosis (e.g., APTOS, IDRID, MESSIDOR-2).

Key Insights and Ideas

  • The "Semantic Hierarchy" Hypothesis: The authors argue that VLP features are "semantic-specific" while SSP features are "general." The bridge transformer is necessary because it respects this hierarchy rather than forcing a single encoder to do two different jobs simultaneously.
  • Mutual Interaction: The framework is "mutually interactive." The CLIP features benefit from the structural understanding gained via masking, while the masked features benefit from the semantic labels provided by CLIP.
  • Superior Data Efficiency: MaskedCLIP is exceptionally "label-efficient." In experiments where only 10% of downstream labels were used, MaskedCLIP significantly outperformed models like RETFound, which were pre-trained on much larger datasets.

Key Results

The model was compared against heavyweights like MAE, DINOv2, CLIP, and RETFound.

  • 10% Labeled Data Scenario: MaskedCLIP achieved an average ROC of 82.1% and PRC of 57.8% across seven tasks. For comparison, the previous state-of-the-art (RETFound) achieved 78.0% ROC and 52.3% PRC.
  • 100% Labeled Data Scenario: Even with full data, MaskedCLIP maintained a lead, particularly in complex tasks like multi-disease diagnosis (JSIEC dataset), where it achieved a 99.5% ROC.
  • Ablation Success: Removing the bridge transformer or the distillation loss led to a noticeable drop in performance, confirming that the "bridging" mechanism is the primary driver of the model's success.

Limitations and Future Work

  • Domain Specificity: While highly effective for retinal (fundus) images, the paper does not explore if this "bridge" architecture generalizes to other modalities like MRI or CT scans, where text descriptions might be more complex.
  • Computational Cost: The addition of a bridge transformer and a feature decoder increases the training complexity and memory footprint compared to a standard MAE or CLIP setup.
  • Future Directions: The authors suggest that this unified approach could be a stepping stone toward more generalist medical AI that can handle a wider variety of semi-supervised tasks across different clinical domains.
BibTeX
@inproceedings{zhu2025maskedclip,
  author = {Lei Zhu and Jun Zhou and Rick Siow Mong Goh and Yong Liu},
  title = {{MaskedCLIP: Bridging the Masked and CLIP Space for Semi-supervised Medical Vision-Language Pre-training}},
  booktitle = {MedAGI},
  year = {2025},
  url = {https://openreview.net/forum?id=iBnfLUH6LM},
}

Loading related content...