Medical Vision Generalist: Unifying Medical Imaging Tasks in Context

Sucheng Ren, Xiaoke Huang, Xianhang Li, Junfei Xiao, Jieru Mei, Zeyu Wang, Alan L. Yuille, Yuyin Zhou

Abstract

This study presents Medical Vision Generalist (MVG), the first foundation model capable of handling various medical imaging tasks -- such as cross-modal synthesis, image segmentation, denoising, and inpainting -- within a unified image-to-image generation framework. Specifically, MVG employs an in-context generation strategy that standardizes the handling of inputs and outputs as images. By treating these tasks as an image generation process conditioned on prompt image-label pairs and input images, this approach enables a flexible unification of various tasks, even those spanning different modalities and datasets. To capitalize on both local and global context, we design a hybrid method combining masked image modeling with autoregressive training for conditional image generation. This hybrid approach yields the most robust performance across all involved medical imaging tasks. To rigorously evaluate MVG's capabilities, we curated the first comprehensive generalist medical vision benchmark, comprising 13 datasets and spanning four imaging modalities (CT, MRI, X-ray, and micro-ultrasound). Our results consistently establish MVG's superior performance, outperforming existing vision generalists, such as Painter and LVM. Furthermore, MVG exhibits strong scalability, with its performance demonstrably improving when trained on a more diverse set of tasks, and can be effectively adapted to unseen datasets with only minimal task-specific samples.

Introduction

In the current landscape of medical AI, "specialist" models are the standard. While highly effective, these models are narrow in scope; a model optimized for liver segmentation in CT scans is typically incapable of denoising an X-ray or performing cross-modal MRI synthesis. This fragmentation creates a significant bottleneck in clinical research, as every new task or dataset requires a custom architecture, specific training protocols, and extensive labeled data.

The Medical Vision Generalist (MVG) addresses this challenge by introducing a foundation model capable of understanding the underlying structure of medical images across diverse modalities—including CT, MRI, X-ray, and micro-ultrasound—without the need for task-specific retraining. By moving toward a generalist approach, MVG aims to provide a versatile tool for a wide array of clinical imaging needs.

The MVG Framework

MVG reformulates diverse medical vision tasks as a conditional image-to-image generation problem. The core of this approach is In-Context Learning, a technique popularized by large language models like GPT-4, now applied to the visual domain. To perform a specific task, the model is provided with a "Prompt Image" and its corresponding "Prompt Label" (serving as an example), followed by the "Task Input" (the new image to be processed).

The MVG framework unifies tasks like segmentation, synthesis, and denoising through in-context visual prompting.

To facilitate this unification, all inputs and outputs are standardized as images. For tasks such as segmentation, MVG utilizes an in-context coloring scheme where masks are treated as single-channel images. A critical component of the training process is the use of random colorization for these masks; this forces the model to learn the dynamic relationship between the prompt and the input rather than simply memorizing fixed class-color mappings.

The architecture is built on a Vision Transformer (ViT) backbone and utilizes a hybrid training strategy. It combines Masked Image Modeling (MIM), which helps the model learn local features by reconstructing missing patches, with Autoregressive (AR) Training, which treats images and labels as a sequence. This hybrid approach was found to be essential for maintaining global anatomical consistency, particularly for complex medical structures.

Benchmark and Evaluation

To rigorously test MVG, the researchers curated a comprehensive benchmark consisting of 13 datasets. This benchmark spans four imaging modalities and covers major anatomical regions including the abdomen, pelvis, brain, and chest. Key datasets included in the evaluation are AMOS (CT/MRI), WORD, BTCV, MicroSegNet, PROMISE, and ACDC. Furthermore, the model's generalization capabilities were tested using the Medical Segmentation Decathlon (MSD) datasets for the liver, spleen, and lung, which were entirely unseen during the initial training phase.

Performance and Scaling

MVG demonstrates substantial performance improvements over existing generalist vision models. It achieved a mean Intersection over Union (mIoU) of 0.735 across all segmentation tasks, significantly outperforming previous benchmarks set by models like Painter and LVM.

Radar chart comparing MVG's performance against Painter and LVM across various medical imaging datasets.

Key insights from the evaluation include:

  • Superior Versatility: Beyond segmentation, MVG showed high proficiency in cross-modal synthesis, inpainting, and denoising, consistently outperforming other generalist baselines.
  • The Power of Autoregression: While MIM is standard in computer vision, the addition of an autoregressive component was crucial for medical imaging, where global context is vital for identifying small anatomical structures.
  • Scalability: MVG exhibits strong scaling laws; as the model is trained on a more diverse set of tasks and datasets, its performance across all tasks improves, suggesting it is building a robust, generalized representation of human anatomy.
  • Few-Shot Adaptation: One of the most significant findings is MVG's ability to adapt to unseen datasets with minimal data. For example, on the unseen MSD-Liver dataset, the model reached 0.84 mIoU using only a single example prompt, demonstrating its potential for immediate clinical application on new data types.

Conclusion and Future Directions

While MVG represents a major advancement toward a generalist medical AI, it currently trails the most specialized models (such as nnU-Net) on certain specific benchmarks. The model's performance is also sensitive to the quality of the provided prompt image. Currently, the framework is limited to 2D processing, whereas much of medical imaging is volumetric (3D). Future research will focus on extending MVG to 3D architectures and exploring the use of "long-context" prompts involving multiple examples to further refine accuracy and reliability in clinical settings.

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 L. 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},
}
Figure