Grounding Multimodal Large Language Models with Quantitative Skin Attributes: A Retrieval Study

Max Torop, Masih Eskandar, Nicholas Kurtansky, Jinyang Liu, Jochen Weber, Octavia Camps, Veronica Rotemberg, Jennifer Dy, Kivanc KosearXiv 2025

TL;DR

Multimodal Large Language Models (MLLMs) often struggle with "number sense" when analyzing images. This paper demonstrates that fine-tuning an MLLM on quantitative skin lesion attributes (such as area and border irregularity) successfully grounds its embedding space, enabling highly accurate, attribute-specific image retrieval to support evidence-based clinical decisions.

What Problem Does This Paper Address?

Deep learning models have achieved remarkable accuracy in diagnosing skin cancers like melanoma, but their "black box" nature severely limits clinical adoption. Dermatologists adhere to an evidence-based reasoning model where every diagnosis must be justified by identifiable visual features—such as lesion size, color asymmetry, and border jaggedness.

Current explainability tools like saliency maps (e.g., Grad-CAM) are notoriously unreliable and fail to provide semantic explanations that make sense to a clinician. While MLLMs offer a promising alternative by providing interactive natural language reasoning, they inherently lack "number sense"—frequently struggling with spatial dimensions, areas, or volumes in images. This paper tackles how to ground MLLMs in these critical, human-understandable quantitative attributes to build clinical trust.

Methods

The authors fine-tune a state-of-the-art MLLM (Qwen 2 VL 7B) using Low-Rank Adaptation (LoRA) to predict 16 distinct numerical skin lesion attributes. To evaluate how well the model internalizes these concepts, they explore content-based image retrieval (CBIR) using two distinct embedding techniques derived from the model's decoder:

  1. Image-Only Embeddings ($h^{(im)}$): Created by averaging the last-layer embeddings of the image tokens, capturing broad visual similarity.
  2. Image-Text Embeddings ($h^{(im, a)}$): Extracted from the final token embedding after prompting the model with an attribute-specific question (e.g., "What is the area in mm²?"). This leverages the decoder's self-attention mechanism to blend visual features with textual intent, specializing the search.
Figure 1: Exemplar illustration of the image-only and area-specific image-text embedding functions. The image-only embedding, h(im)(I), encodes general visual attributes by averaging all last-layer image token embeddings (the image is divided into 4 patches for illustrative purposes). The last-layer embedding of the final token draws information from all previous tokens: i.e., both the image and the area-specific question tokens. Thus, we use this embedding for h(im,area)(I), in order to specialize the image-text embedding towards lesion area.

To overcome the massive storage overhead of maintaining separate databases for every single attribute, they introduce a Hierarchical Retrieval strategy: first filter a broad set of visually similar images using image-only embeddings, then dynamically rerank them on the fly using the specialized image-text embeddings.

Datasets

The study utilizes the SLICE-3D dataset, which contains 401,059 total body photography images of cropped skin lesions.

  • Training Set: 282,564 images (802 patients)
  • Test Set: 118,495 images (240 patients)

The dataset is strictly split by patient to prevent data leakage. Each image is annotated with 16 metadata attributes spanning dimensions, perimeter, border irregularity, and color contrast.

Table 1: Subset of quantitative attributes from the SLICE-3D dataset [8] that are considered in this study. These attributes were selected following consultation with medical domain experts and a recent study detailing the efficacy of various attributes for diagnostic prediction [10].

Key Insights and Ideas

  • Injecting Number Sense: While standard MLLMs are notoriously bad at geometry and scale, targeted fine-tuning successfully injects a precise "number sense" into their internal representations.
  • Decoder-Based Composed Search: Unlike CLIP-like architectures that use separate text and image encoders, MLLM decoders can naturally fuse text prompts and images into a single embedding space. The final token acts as a highly flexible, task-specific feature extractor.
  • Efficiency via Hierarchy: The hierarchical retrieval approach proves that you don't need massive storage overhead to perform specialized searches; coarse visual filtering followed by fine-grained attribute reranking preserves retrieval quality perfectly while saving compute.

Key Results

High Prediction Accuracy

The fine-tuned model achieved impressive $R^2$ values on the test set for attribute prediction, ranging from 0.71 for border jaggedness (area_perim_ratio) to 0.96 for color contrast metrics (deltaB, deltaL, deltaLB). This proves the model effectively learned to compute these values directly from raw pixels.

Figure 2: Test set attribute prediction R2 values for our fine-tuned model.

Superior Attribute Retrieval

In image retrieval tasks, the specialized Image+Text and Hierarchical methods significantly outperformed image-only baselines, untuned models, and MONET (a specialized CLIP-based dermatology model). It successfully retrieved lesions matching the exact quantitative profile of the query image.

Figure 3: Qualitative retrieval results. The left shows query images Iq, the right the top-5 retrieved images. Top rows corresponds to image-only search; bottom rows to image-text search specialized to lesion area (using Q(area) for the text). Lesion area is shown above each image.

As shown in the quantitative evaluation below, the Image+Text and Hierarchical methods consistently achieved the lowest percentile ranks (where lower means the retrieved images are closer to the query's true attribute value) across all 16 metrics.

Figure 4: Retrieval results for each attribute. We visualize the distribution of the percentile of the difference in retrieved attribute value from query attribute value (↓better) achieved by four Qwen based embedding strategies (a) Image + Text, (b) Hierarchical (c) Image (d) Image Untuned and the image encoder from one CLIP-like model (e) MONET [6].

Limitations and Future Work

  • Single-Attribute Focus: The current retrieval framework specializes in one attribute at a time. Real-world clinical workflows often require multi-attribute retrieval (e.g., finding a lesion that is both exactly 5mm² and highly asymmetric).
  • Interactive Integration: The authors note that future work will combine this grounded embedding space with conversational training data. This will pave the way for a fully interactive, conversational AI assistant capable of walking clinicians through its diagnostic evidence step-by-step.

Summary updated

BibTeX
@misc{torop2025grounding,
  author = {Max Torop and Masih Eskandar and Nicholas Kurtansky and Jinyang Liu and Jochen Weber and Octavia Camps and Veronica Rotemberg and Jennifer Dy and Kivanc Kose},
  title = {{Grounding Multimodal Large Language Models with Quantitative Skin Attributes: A Retrieval Study}},
  year = {2025},
  eprint = {2508.20188},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.20188},
}
Figure