Medical Vision Generalist: Unifying Medical Imaging Tasks in Context

Sucheng Ren, Xiaoke Huang, Xianhang Li, Junfei Xiao, Jieru Mei, Zeyu Wang, Alan Yuille, Yuyin Zhou · Submission to ICLR 2025 · Withdrawn

TL;DR

Medical Vision Generalist (MVG) is a foundation model that unifies diverse medical imaging tasks—including segmentation, cross-modality synthesis, inpainting, denoising, and lesion detection—into a single image-to-image framework. By conditioning predictions on prompt image–label pairs rather than relying on task-specific heads, MVG learns tasks "in context" and outperforms previous generalist vision models across multiple imaging modalities.

What Problem Does This Paper Address?

Deep learning in medical imaging has historically been dominated by "specialist" models: networks like U-Net or nnU-Net fine-tuned for a single organ, pathology, or modality. While accurate within their narrow slice of clinical data, specialists require bespoke heads, separate training pipelines, and often fail when shifted to new imaging regimes.

Existing generalist medical models (such as MedSAM or UniverSeg) took a step toward unification, but they remain almost exclusively confined to segmentation. MVG addresses the lack of a universal visual foundation model that can handle both visual recognition (e.g., segmentation and detection) and generative tasks (e.g., image denoising, synthesis, and inpainting) within a single architecture.

Methods

MVG casts every medical imaging task as conditional image-to-image generation:

  • Unified Input/Output Spaces: All inputs and outputs are standardized as $H \times W$ images. For multi-class segmentation, MVG uses random colorization—mapping semantic classes to randomly chosen colors during each training iteration so that prompt labels and task labels share identical colors. This prevents the model from memorizing fixed color palettes and forces it to rely on in-context reasoning.
  • Hybrid Training (Autoregressive + Masked Image Modeling):
  • Autoregressive (AR) Training: Pairs of prompt images/labels and task images/labels are arranged into sequential visual tokens ($[P_{x1}, P_{y1}, \dots, X, Y]$) with supervision applied only to label prediction. AR preserves global anatomical geometry, which prevents tiny anatomical structures (e.g., the pancreas or gallbladder) from being obscured.
  • Masked Image Modeling (MIM): Prompt and task image pairs are concatenated into a $2 \times 2$ grid with random masking. While suboptimal for segmentation, MIM excels at refining fine local textures needed for inpainting and CT denoising.
  • MVG applies 100% AR training for segmentation, and a mixture (90% MIM, 10% AR) for generative restoration tasks.
  • Architecture & Objective: Uses a standard Vision Transformer (ViT) encoder coupled with a lightweight two-layer convolutional prediction head, trained with a smooth $L_1$ loss.
  • Inference Strategy: To ensure spatial consistency across 3D scans, the prompt slice is dynamically matched to the relative z-depth position of the target slice.

Datasets

The authors curated a unified benchmark spanning 13 datasets across 4 human anatomical regions (Abdomen, Pelvis, Brain, Chest, and Whole Body) and 4 modalities (CT, MRI, micro-ultrasound, X-ray), comprising over 2.5 million training slices:

  • Segmentation: AMOS (CT & MRI), WORD (CT), BTCV (CT), MicroSegNet (Micro-US), PROMISE (MRI), Chest Defect Detection (X-ray), ACDC (MRI), and LA (MRI).
  • Cross-Modal Synthesis & Inpainting: BraTS-GLI (MRI synthesis) and BraTS-Local (brain MRI inpainting).
  • Denoising: Low-Dose CT Grand Challenge.
  • Detection: DeepLesion (CT, framing bounding boxes as visual overlays).
  • Out-of-Distribution Evaluation: Medical Segmentation Decathlon (MSD: Liver, Spleen, Lung).

Key Insights and Ideas

  • Why Masked Modeling Struggles with Medical Segmentation: In standard vision generalists (like Painter), random patch masking frequently erases small organs entirely from prompt images, depriving the network of essential reference context. Autoregressive sequence modeling retains the complete global image, leading to massive gains on segmentation.
  • Color Permutation Prevents Shortcut Learning: Pre-assigning fixed colors to organ classes caused the network to overfit to color values. Randomizing color-to-class assignments per batch boosted abdominal segmentation by 0.123 mIoU, proving the model truly learned to extract correspondence from the prompt.
  • Cross-Task Synergy: Training a single unified model across all 13 datasets beat training 13 isolated MVG models on individual datasets by 0.14 mIoU, demonstrating positive transfer across disparate clinical tasks and imaging modalities.

Key Results

  • Segmentation: MVG achieved an average of 0.79 mIoU across all segmentation benchmarks, outperforming generalist baselines by large margins:
  • Beats Painter (0.55 mIoU) by +0.24.
  • Beats SegGPT (0.70 mIoU) by +0.09.
  • Beats UniverSeg (0.44 mIoU) by +0.35 (even though UniverSeg was tested with 64 prompt shots vs. MVG's 1-shot prompt).
  • Synthesis, Inpainting, and Denoising: Outperformed Painter across all metrics (e.g., cross-modal synthesis PSNR reached 24.72 dB vs. 24.03 dB; inpainting PSNR reached 34.52 dB vs. 33.60 dB).
  • Few-Shot Adaptation to Unseen Datasets: On the out-of-distribution MSD benchmark, MVG achieved 0.84 mIoU on MSD-Liver without any fine-tuning, and reached 0.87 mIoU on MSD-Spleen with just a single fine-tuning instance.

Limitations and Future Work

  • Gap Behind Specialized Models: While leading among generalists, MVG still trails domain-specialized, highly tuned networks like nnU-Net (which achieves ~0.90+ mIoU on several segmentation benchmarks).
  • Prompt Capacity: Current evaluations primarily utilize 1-shot in-context prompts; scaling to multi-shot prompt contexts without excessive compute overhead remains open.
  • Broader Annotation Types: While the authors showed proof-of-concept lesion bounding box prediction, future work is needed to support heterogeneous clinical prompt markers (such as freehand scribbles, crosses, and ellipses) seamlessly within the visual token stream.

Summary updated

BibTeX
@misc{ren2024medical,
  author = {Sucheng Ren and Xiaoke Huang and Xianhang Li and Junfei Xiao and Jieru Mei and Zeyu Wang and Alan Yuille and Yuyin Zhou},
  title = {{Medical Vision Generalist: Unifying Medical Imaging Tasks in Context}},
  year = {2024},
  eprint = {2406.05565},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.05565},
}

Loading related content...

Figure