Abstract
Visual-language models have advanced the development of universal models, yet their application in medical imaging remains constrained by specific functional requirements and limited data. Current general-purpose models are typically designed with task-specific branches and heads, which restricts the shared feature space and the flexibility of the model. To address these challenges, we have developed a decomposed-composed universal medical imaging paradigm (UniMed) that supports tasks at all levels. We propose a decomposed decoder that predicts pixel and semantic outputs based on a defined input queue, alongside a composed decoder that standardizes task annotations into a discrete token format. This coupled design enables the model to flexibly combine tasks and mutual benefits. Moreover, our joint representation learning strategy leverages large amounts of unlabeled data, achieving efficient one-stage pretraining. Experimental results show that UniMed achieves state-of-the-art performance on eight datasets across three tasks and exhibits strong zero-shot and 100-shot transferability.
Introduction
In medical AI, the prevailing paradigm has been to develop specialized models for specific tasks, such as detecting polyps, segmenting tumors, or classifying diseases. Even existing "universal" models often rely on task-specific "heads" or branches. This architectural rigidity limits the model's flexibility and prevents different tasks from effectively sharing knowledge.
Furthermore, medical data is notoriously difficult to aggregate due to inconsistent annotation formats—one dataset might provide bounding boxes, while another provides pixel-level masks. Expert annotation is also expensive and scarce, leaving a massive amount of unlabeled medical video and imagery untapped. UniMed addresses these issues by moving away from the traditional "one head per task" architecture toward a fluid, compositional approach.
The UniMed Framework
UniMed introduces a novel architecture that replaces task-specific branches with a unified decomposed-composed decoder system.
Decomposed and Composed Decoders
Instead of branching by task (e.g., a dedicated "Detection Branch"), UniMed branches by output type. The Decomposed Decoder predicts two fundamental components: Pixel-level outputs for masks and Semantic-level outputs for labels, text, and coordinates.
The Composed Decoder then standardizes all medical annotations into a unified discrete token format:
- Classification: Represented as text tokens.
- Detection: Represented by four coordinate tokens plus a category token.
- Segmentation: Uses pixel-level masks encoded into discrete tokens.
This "unity through decomposition" allows the model to perform detection and segmentation simultaneously without needing separate architectures, treating almost every medical imaging task as a combination of "what is it?" (semantics) and "where is it?" (pixels).
Joint Representation Learning
UniMed employs a one-stage pre-training strategy that handles labeled and unlabeled data simultaneously. It uses a supervised loss for labeled data and a dense contrastive learning loss for unlabeled data. This allows the model to learn robust visual features from raw, unannotated medical videos, which acts as a powerful regularization mechanism and helps the model learn general anatomical features.
Experimental Results
The researchers evaluated UniMed on 12 different datasets covering detection (SUN), classification (ColonCG), and segmentation (CVC-ClinicDB, Kvasir-SEG, etc.). UniMed outperformed both specialized state-of-the-art (SOTA) models and existing general-purpose models like GLIPv2 and X-Decoder.
- Detection: Achieved 56.8 mAP on the SUN dataset, a +3.2 improvement over the previous best specialized model (Dyhead).
- Segmentation: Showed significant gains, specifically a +6.6 Dice score improvement on the challenging ETIS-LaribPolypDB dataset.
- Zero-Shot Transfer: When tested on tasks it wasn't explicitly fine-tuned for, UniMed outperformed other universal models by roughly 6-7% in both detection and classification accuracy.
- Data Efficiency: The model demonstrated strong "100-shot" performance, reaching near-SOTA levels with only a tiny fraction of labeled data.
Discussion and Limitations
While UniMed represents a significant step toward universal medical AI, some hurdles remain. The current framework focuses almost exclusively on endoscopic imaging; further validation is required for grayscale modalities like X-ray, CT, or MRI. Additionally, "task interference" was observed, where training classification tasks alongside segmentation led to a slight dip in classification accuracy on specific datasets. Finally, the use of high-resolution visual transformers (Swin-L) requires significant computational resources for the initial pre-training phase.
Conclusion
UniMed demonstrates that by standardizing medical imaging tasks into a compositional token format and leveraging large-scale unlabeled data, it is possible to build a truly universal model. By using language as the interface, the model becomes interactive, allowing clinicians to toggle between tasks or ask for specific findings using natural language prompts, paving the way for more flexible clinical workflows.
Summary updated