TL;DR
This paper introduces "visual prompt engineering" for Vision-Language Models (VLMs) in radiology, using visual markers like arrows and bounding boxes directly on medical images to improve zero-shot classification. These prompts significantly boost performance and enhance model interpretability by guiding attention to relevant pathologies, offering a practical way to adapt powerful VLMs to the nuanced demands of medical imaging.
What Problem Does This Paper Address?
Medical image classification is vital for diagnosis, but current models often struggle with adaptability. They are typically trained on a fixed set of predefined classes, making it hard to identify new or rare conditions. While large-scale pre-trained models like CLIP have shown promise for zero-shot classification, they tend to focus on the global image content. Radiology, however, requires a more localized understanding of specific, often subtle, pathological findings. Simply cropping images to focus on these regions can lead to a loss of crucial global context. This paper addresses the need for VLMs to effectively interpret and classify localized pathologies in medical images without requiring extensive task-specific fine-tuning or large annotated datasets.
Methods
The core of this work is visual prompt engineering. The authors adapt techniques from natural image processing, where visual markers (like circles, bounding boxes, and arrows) are drawn directly onto images to guide model attention. These markers are integrated into the input images fed to VLMs, specifically models pre-trained on biomedical text-image pairs (like BiomedCLIP and BMCA-CLIP).
The process involves:
- Zero-shot Classification with CLIP: Standard CLIP-based classification is used, where an image and text descriptions of potential classes are embedded into a shared space, and similarity scores determine the classification.
- Visual Prompting: Instead of just the raw image, the input image is augmented with visual markers. These markers are generated based on provided bounding box coordinates for pathologies. Different marker types (arrow, bounding box, circle) and colors are explored.
- Text Prompt Augmentation: To further enhance performance, the text prompts describing the classes are sometimes augmented to explicitly mention the visual marker (e.g., "A chest X-ray with a malignant nodule indicated by a red circle.").
- Explainability Analysis: To understand why the prompts work, the authors use LeGrad to visualize model attention maps, showing where the model focuses its attention with and without visual prompts.
- t-SNE Visualization: t-SNE is used to visualize the feature embeddings, assessing whether visual prompts lead to more distinct and pathology-aligned clusters.
Datasets
The study evaluates its approach on four public chest X-ray datasets:
- Padchest-GR: 4,555 CXR studies with radiology reports and bounding box annotations.
- VinDr-CXR: 18,000 CXR scans with radiologist-annotated bounding boxes for 22 findings.
- Chestx-ray8 (NIH14): 108,948 CXR images labeled with eight common thoracic diseases, with a subset of 983 images having manually annotated bounding boxes.
- JSRT: 154 chest X-rays with lung nodules (malignant and benign), including coordinates and size.
The authors filtered these datasets to ensure fair comparison, particularly by selecting samples with single bounding boxes per pathology when applicable.
Key Insights and Ideas
- Visual Cues are Powerful: Explicitly guiding a VLM's attention with visual markers on the image significantly improves its ability to classify pathologies, even in a zero-shot setting.
- Beyond Global Context: VLMs, while good at global understanding, benefit immensely from localized focus, which is critical for subtle findings in medical imaging.
- Interpretability Boost: Visual prompts not only improve accuracy but also make the model's decisions more interpretable by showing that it's attending to the correct regions.
- Synergy of Text and Visual Prompts: Combining visual markers with text prompts that describe these markers further enhances performance, suggesting a powerful interplay between modalities.
- Robustness to Imperfections: The visual prompting approach shows robustness to moderate spatial shifts and scaling of the markers, making it practical for real-world scenarios where precise annotation might be challenging.
- Small Pathologies Benefit Most: Visual prompts are particularly effective for smaller, more easily overlooked pathologies, as shown by the increased predicted probability for smaller lesions.
Key Results
- AUROC Improvement: Visual markers improved AUROC by up to 0.185 across various datasets and models.
- Marker Effectiveness: Bounding boxes and circles generally emerged as the most robust visual markers, with circle prompts performing particularly well.
- Text Prompt Enhancement: Explicitly mentioning the visual marker in the text prompt further boosted performance in most cases.
- Attention Map Alignment: Qualitative analysis of attention maps confirmed that models with visual prompts focused more on clinically relevant areas.
- Feature Clustering: t-SNE visualizations showed that visual prompts led to more distinct and well-separated pathology clusters, indicating improved feature representation.
- Robustness: Performance remained strong even with spatial shifts of up to 25% and scaling of markers by up to 25%.
Limitations and Future Work
- Bounding Box Assumption: The current approach assumes access to bounding box coordinates for generating visual prompts. Future work could explore methods that don't rely on explicit bounding boxes, perhaps by learning to identify regions of interest from text alone.
- Marker Occlusion Risk: Visual markers, by their nature, can potentially occlude diagnostically relevant features. While the study shows robustness, this remains a consideration.
- Generalizability to Other Modalities: While focused on chest X-rays, future research could investigate the effectiveness of visual prompt engineering across other medical imaging modalities (e.g., CT, MRI).
- Exploring More Complex Scenarios: The paper primarily focuses on single-pathology scenarios or uses single bounding boxes. Extending this to images with multiple overlapping pathologies and complex annotations would be valuable.
- Code and Dataset Release: The authors provide their code and preprocessing pipeline, encouraging further research in localized classification for medical imaging.
Summary updated