Research
MedPixel: A Unified Pixel-Language Model for Medical Reasoning and Segmentation
Overview Research area: Medical computer vision, specifically unified vision-language models that combine clinical language understanding, reasoning, and pixel-level segmentation of medical images. Te
- arXiv
- 2608.09818
- Published
- 2026-08-10
- Authors
- Haoyu Yang, Meixing Shi, Zengjie Chen, Haoran Sun, Haitao Leng, Xiaoming Shi, Yuxiang Cai, Yankai Jiang
AI summary
Overview
- Research area: Medical computer vision, specifically unified vision-language models that combine clinical language understanding, reasoning, and pixel-level segmentation of medical images.
- Technical level: Advanced. The paper assumes familiarity with multimodal large language models, promptable segmentation architectures (SAM2), supervised fine-tuning, and Direct Preference Optimization.
- Scope: The paper describes MedPixel, a model built on Qwen2.5-VL and SAM2 that handles five medical task formats through a shared
<SEG>language–mask interface, trained on a newly synthesized 440K-sample pixel-language dataset (MedPLG-440K) with a two-stage recipe of multi-task supervised fine-tuning followed by Pixel-Level Preference Optimization (PLPO).
What This Paper Is About
Medical vision-language models can discuss images but usually cannot point to precise regions, while medical segmentation models can produce precise masks but typically need a predefined category name or an exact point/box prompt. The underlying obstacle is a supervision mismatch: segmentation datasets offer accurate masks with almost no language, and medical vision-language datasets offer rich questions and answers with almost no dense spatial annotation. The paper's goal is to close that divide by recycling existing segmentation masks as a scalable source of pixel-language training data and by training one model that both reasons in language and localizes in pixels.
Key Contributions
- MedPLG-440K. A dataset of approximately 440K pixel-language task samples (444,297 records in the appendix breakdown) spanning four grounded interaction formats, synthesized from existing medical segmentation annotations through a clinically motivated process that uses deterministic image–mask measurements and predefined templates, without external LLM annotation.
- MedPixel. A unified medical pixel-language model based on Qwen2.5-VL and SAM2 that supports explicit grounding, implicit reasoning, spatial interaction, grounded explanation, and medical VQA through a shared language–mask interface built on a special
<SEG>token (and a<REF>token for interactive inputs). - Pixel-Level Preference Optimization (PLPO). A second training stage that uses ground-truth masks as offline verifiers: candidate responses are scored by the Dice quality of the masks they induce, converted into response preference pairs, and optimized with Direct Preference Optimization — without an external reward model or online rollouts.
- Empirical results. Reported leading localization and response-generation performance across the five task formats, zero-shot transfer to two external benchmarks, and robustness to imperfect box prompts relative to SAM-family specialists.
Main Findings
- Referring segmentation (T1): MedPixel-7B reaches 85.0 Dice and 61.7 NSD, exceeding BiomedParse by 5.0 and 6.7 points respectively. MedPixel-3B reaches 84.3 Dice and 60.4 NSD.
- Reasoning segmentation (T2): MedPixel-7B reaches 66.7 Dice, 53.4 NSD, 51.3 METEOR, and 70.8 target grounding accuracy (TGA), an improvement of 29.2 Dice over the strongest baselines. MedPixel-3B reaches 62.7 Dice, 49.5 NSD, 50.2 METEOR, 64.1 TGA.
- Interactive segmentation (T3): MedPixel-7B reaches 76.0 Dice, 52.1 NSD, 40.4 METEOR (results averaged over point and box protocols), competitive with specialized promptable segmenters while supporting a broader interaction format. MedSAM2, for comparison, reports 75.7 Dice and 52.4 NSD.
- Explanatory segmentation (T4): MedPixel-7B reaches 76.5 Dice, 55.2 NSD, 42.3 METEOR, an improvement of 40.7 Dice over the strongest baselines. MedPixel-3B reaches 73.9 Dice, 52.2 NSD, 40.4 METEOR.
- Medical VQA (T5): MedPixel-7B achieves 47.5 image-based and 58.1 text-based multiple-choice accuracy, surpassing the strongest baselines by 5.5 and 7.0 points. MedPixel-3B achieves 42.9 and 52.5.
- Effect of scaling: Going from 3B to 7B improves most tasks, with particularly clear gains on T2, T4, and T5; T1 improves modestly and T3 remains essentially unchanged.
- PLPO ablation: PLPO improves Dice and NSD on T2 and T4 at both scales while METEOR stays broadly stable. At 3B, T2 goes from 58.2 Dice / 46.5 NSD to 62.7 / 49.5; at 7B, from 62.9 / 49.8 to 66.7 / 53.4. Larger gains appear on reasoning segmentation. The segmentation projector and mask decoder are frozen during Stage 2, so the gains reflect better alignment between generated
<SEG>representations and pixel-level outcomes. - Dice–reasoning alignment: Using gpt-5.6-sol to label whether each reasoning trace identifies the ground-truth target, reasoning-correct responses achieve much higher mean Dice than incorrect ones — 84 vs. 34 before PLPO and 87 vs. 42 after PLPO. Among preference pairs, 83.6% favor a reasoning-correct response over an incorrect one, while 0.4% show the reverse.
- Zero-shot transfer to MeCoVQA-G+: MedPixel-7B achieves 41.1 slice-level micro and 47.4 modality-level macro Dice, 26.8 / 33.5 NSD, and 152.3 / 123.0 HD95. This improves over BiomedParse by +5.3 Dice at the slice level and +3.4 Dice at the modality level, and reduces HD95 from 224.3/177.1 to 152.3/123.0. MedPLIB-7B, which is trained on MeCoVQA-G+ and is reported only as a benchmark-trained reference, scores 47.2 / 36.0 Dice, 37.1 / 27.3 NSD, and 220.7 / 378.2 HD95.
- Zero-shot transfer to U-MRG-14K: MedPixel-7B achieves 37.91 Dice, comparable to MedReasoner-7B at 37.78 Dice, while producing masks within a single unified model.
- Robustness to box perturbations: Scaling box width and height by a factor s with the center fixed, SAM specialists perform strongly with exact boxes but degrade markedly as s deviates from 1, whereas MedPixel remains stable over a broad range of scales.
- Not reported: The paper does not report the numerical value of the number of sampled candidates N in Stage 2, the specific values of the threshold constants τ_min and τ_gap, the size of the final preference dataset, or HD95 for the T1–T4 in-house evaluations.
Methodology in Plain English
The researchers start from a simple observation: a segmentation mask is not only a training target, it is also a spatial anchor that links what is visible in an image to language. From each existing annotated mask they compute nine numerical measurements (centroid location, relative area, aspect ratio, fill ratio, connected components, contour circularity, convex-hull ratio, perimeter ratio, foreground-to-background contrast, and within-region variation) and convert these into seven language descriptors covering location, size, shape, components, boundary, contrast, and uniformity. Appearance wording is adapted to the imaging modality — density for CT, signal intensity for MRI, echogenicity for ultrasound, opacity for X-ray. These descriptors plus the original category and metadata are then fed through task-specific templates to produce four interaction formats: a direct named reference (T1), an indirect clinical query that requires inferring the target before locating it (T2), a point or box prompt paired with a short region description (T3), and an explanation grounded in the region (T4). Each synthesized sample keeps the original ground-truth mask. Medical VQA data is added separately to preserve image-level understanding.
The model itself pairs Qwen2.5-VL, which handles multimodal understanding and text generation, with a SAM2 mask decoding branch. A special <SEG> token marks where a mask is needed; a learnable projection maps that token's hidden state into SAM2's prompt embedding space, and the SAM2 decoder produces the mask. For interactive tasks, a <REF> token carries the point or box: a trainable prompt encoder converts the spatial reference and projects it into the language model's hidden dimension, replacing the token embedding at that position so spatial guidance enters the same sequence as image and text.
Training happens in two stages. Stage 1 is joint multi-task supervised fine-tuning on a 1.84M-sample mixture of medical VQA (64%), segmentation (32%), and clinical reasoning (4%), combining a language modeling loss with a segmentation loss formed from focal, Dice, IoU, and objectness terms; the mask term is omitted for samples without mask supervision. Stage 2 addresses a mismatch the authors identify: standard fine-tuning never compares the spatial consequences of alternative wordings, so similarly plausible responses can produce very different masks. PLPO samples candidate responses, decodes the mask each one induces, scores it by Dice against the ground-truth mask, discards empty or invalid responses, keeps the highest-scoring response as chosen and a lower-scoring valid one as rejected, and retains a pair only if the chosen response's score meets τ_min and the gap between chosen and rejected meets τ_gap. These pairs are optimized with DPO plus an NLL anchor term. Ground-truth masks are used only for offline scoring and never exposed during candidate generation, and the segmentation projector and SAM2 decoder stay frozen in Stage 2, so preference optimization reshapes the response distribution and <SEG> representations while preserving the decoding pathway learned in Stage 1.
Implementation details: MedPixel is trained at 3B and 7B scales on Qwen2.5-VL. LoRA is applied to the q/k/v/o attention projections of both the language model and the Qwen vision tower with r=128 and α=256, while base weights stay frozen. Stage 1 optimizes the language adapters, multimodal projector, special token embeddings, segmentation projector, spatial reference modules, and the SAM2 branch.
Why This Matters
- Impact on research: The paper reframes existing segmentation masks as an underused source of structured pixel-language supervision, showing that diverse grounded interaction formats can be derived without per-format expert annotation or external LLM labeling. It also introduces a preference-optimization signal for generation that is grounded in pixel-level correctness rather than text similarity, which is relevant beyond medicine to any model that emits a spatial output.
- Real-world applications:
- Clinical decision support that answers a plain-language question about a scan and marks the exact region being discussed.
- Interactive annotation tools where a clinician gives an approximate box or point and the model uses the accompanying language to resolve the intended target.
- Radiology or pathology reporting workflows that pair generated findings with region-level masks for review.
- Educational and quality-assurance tools that need grounded explanations of what a region looks like and why it matters.
- Industry relevance: Medical imaging vendors and health AI companies require zero-shot or few-shot transfer across modalities and institutions. The reported zero-shot results on MeCoVQA-G+ (2,719 samples, eight modalities) and U-MRG-14K (2,480 samples, ten modalities), plus the stability under loose or tight boxes, speak directly to deployment conditions where prompts and acquisition protocols vary. The authors state that code and model checkpoints will be released at https://github.com/yhy-whu/Medpixel.
Future Directions
- Broader data coverage. Because MedPLG-440K repurposes existing segmentation annotations, its coverage is limited to the anatomical structures and imaging modalities present in the source datasets. Extending to more anatomy and modalities is an open step.
- More natural language supervision. The synthesized text comes from rules and templates and is less diverse than natural clinical interactions, so generating or collecting more natural phrasing without sacrificing scalability is an open problem.
- Removing the ground-truth-mask requirement. PLPO depends on ground-truth masks for offline preference mining, which limits its use where pixel-level supervision is unavailable.
- Volumetric, longitudinal, and multi-turn settings. The evaluation mainly covers 2D or slice-based images and single-turn interactions, leaving 3D volumes, follow-up studies, and multi-turn pixel-language reasoning underexplored.
- Beyond reference-based text metrics. The authors note that reference-based language metrics cannot fully assess the clinical correctness and completeness of generated explanations and call for further evaluation by clinical experts.
Target Audience
Researchers and practitioners working on multimodal medical AI, particularly those interested in reasoning segmentation, pixel-level grounding, and preference optimization. It is also relevant to applied teams building clinical imaging assistants that must both explain and localize, and to readers studying data-efficient supervision strategies for grounding tasks — though the density of model names, metrics, and optimization details makes it most useful to readers already comfortable with vision-language model training.
Authors’ abstract
Reliable medical image understanding requires models to connect clinical language and visual reasoning with pixel-level grounding. Yet medical vision-language models often lack precise localization, whereas medical segmenters typically rely on explicit target categories or precise spatial prompts. This divide is reinforced by a supervision mismatch: segmentation datasets provide precise masks but little language supervision, whereas medical vision-language data rarely pair language with dense spatial annotations. To address this gap, we present MedPixel, a unified medical pixel-language model built around a shared language--mask interface. To provide scalable supervision, we introduce MedPLG-440K, comprising approximately 440K pixel-language task samples constructed through a clinically motivated synthesis process without external LLM annotation. MedPixel is trained with joint multi-task supervised fine-tuning followed by Pixel-Level Preference Optimization, which uses ground-truth masks as offline verifiers to derive response preferences from mask quality. MedPixel supports a broad spectrum of tasks spanning explicit grounding, implicit reasoning, spatial interaction, grounded explanation, and medical VQA. Across this task spectrum, MedPixel achieves strong performance in both pixel-level prediction and response generation, together with effective zero-shot transfer to external grounding benchmarks and robustness to imperfect spatial prompts. Code and model checkpoints will be released at https://github.com/yhy-whu/Medpixel.