Skip to main content
Back

Northeastern's VG-MedGen Generates Medical Images 1.77x Faster With 84% Fewer Parameters

A new framework called VG-MedGen splits clinical text into anatomy and style channels using visual priors, cutting model size 85% while beating larger diffusion baselines.

Pro

  • VG-MedGen uses visual features to disentangle clinical text into anatomy and style before feeding a Diffusion Transformer.
  • Beats Med-Art, SDXL, PixArt-α, and MedSegFactory on FID and HFD across HAM10000, Kvasir-SEG, and BUSI.
  • Uses only 833M inference parameters, 84.7% fewer than Med-Art, running 1.77x faster at 1.457s per image.
  • Synthetic samples boost downstream skin-lesion classification F1 to 0.619, the highest among all generative baselines.
  • Pipeline uses LLaVA-Next for structured captioning, ClinicalBERT for text, and PixArt-α with rank-8 LoRA adapters.
  • Code available at github.com/hx111/VG-MedGen; paper at arxiv.org/abs/2603.10519.

A team from Northeastern University and the University of Alberta has released VG-MedGen, a text-to-image system built specifically for medical data that tackles a long-standing problem: clinical prompts are too abstract to control fine anatomical details, and standard text encoders mash structure and style into a single embedding that the diffusion model can't cleanly follow. The fix is to let images teach the text encoder how to separate those two concepts before generation begins.

The result is a lighter, faster model that outperforms much larger baselines on three medical datasets and, crucially, produces synthetic images useful enough to improve downstream disease classification.

Why clinical prompts break diffusion models

The authors argue that generic text-to-image models fail in medicine for two connected reasons. Medical images encode dense spatial and geometric information (lesion shape, boundary, texture) while clinical text is highly compressed, offering thin guidance for fine-grained structure. On top of that, common text encoders produce a global embedding where anatomical structure and imaging modality get averaged together, so prompts like "irregular pigment network" get diluted during the diffusion process.

Their demonstration is blunt: even when given explicit prompts of varying length, models like Med-Art fail to reproduce the requested irregular shapes or internal textures. The structural cues just wash out.

Using vision to teach text how to disentangle

The core insight is that visual features are naturally more separable than textual ones, so the authors use them as supervision to train the text side. The pipeline has four moving parts:

VG-MedGen architecture showing visual attribute captioning, dual-branch encoders, cross-modal alignment, and hybrid feature fusion into a Diffusion Transformer
  1. Visual attribute captioning. Since medical datasets rarely include rich descriptions, LLaVA-Next generates captions using a constrained template that forces the vision-language model to describe two orthogonal dimensions: Anatomy (symmetry, boundary, shape) and Style (color, texture). A T5 model then cleans up the output.
  2. Dual-branch visual encoder. An anatomy encoder based on U-Net is trained with a Dice segmentation loss to focus only on structure. A style encoder takes the image plus the anatomy feature and maps them into a Gaussian latent regularized with a KL divergence loss, so it captures appearance without structure leaking in.
  3. Cross-modal text alignment. With the visual encoders frozen, two small MLPs project a ClinicalBERT embedding into anatomy and style subspaces. Cosine embedding losses force the text-anatomy vector to match the visual-anatomy vector, and same for style. A text auxiliary decoder reconstructs the original embedding to prevent information loss.
  4. Hybrid Feature Fusion Module (HFFM). The two disentangled text vectors get learnable type embeddings attached, then are concatenated and fed through separate channels into the cross-attention layers of a Diffusion Transformer. The DiT itself is PixArt-α, adapted with LoRA at rank 8.

The numbers

Evaluation covers three public datasets: HAM10000 (10,015 dermatoscopic images), Kvasir-SEG (1,000 polyp images), and BUSI (780 breast ultrasound images). VG-MedGen posts the best FID on HAM10000 at 51.56 versus 53.54 for Med-Art and 68.76 for PixArt-α, and it consistently holds the lowest HFD (a high-frequency detail metric) across all three datasets, which matters for preserving diagnostic features like mucosal texture and lesion boundaries.

Comparison of dermoscopic images generated by Med-Art versus VG-MedGen, with parameter and inference speed metrics

The efficiency story is arguably more interesting. VG-MedGen uses 833M inference parameters compared to 7.5B for SDXL, 4.9B for PixArt-α, and 1.425B for MedSegFactory. That's 84.7% fewer parameters than Med-Art and 22% fewer than the smallest baseline. Inference runs at 1.457 seconds per image, roughly 1.77x faster than Med-Art.

Does the synthetic data actually help?

The clinically meaningful test is whether generated images improve a real classifier. When used to augment HAM10000 training, VG-MedGen samples yield the best F1 score (0.619) and balanced accuracy (0.348) among all synthesis methods, beating SDXL, Med-Art, and MedSegFactory. Real data still wins by a wide margin (F1 of 0.816), so this closes the gap without erasing it.

An ablation makes the disentanglement point cleanly: dropping attribute captioning pushes FID from 51.56 to 69.48, and naïvely concatenating features without the alignment module is worse than using only class labels (FID 86.24). The structured alignment is doing real work, not just adding capacity.

Where it falls short

The framework has clear limits. On Kvasir-SEG, PixArt-α actually beats it on FID (67.73 vs 71.97), suggesting the disentanglement advantage is uneven across modalities. SDXL retains a small edge in AUC on the downstream classifier, meaning VG-MedGen samples are more discriminatively varied but not always more diagnostically confident. And the pipeline depends on an LLaVA-Next captioning stage tuned with a specific template, which likely needs re-engineering for modalities beyond the three tested.

Availability

Source code is published at github.com/hx111/VG-MedGen. The framework is built on PyTorch and the Diffusers library, uses PixArt-α at 512×512 as the DiT backbone, and was trained on a single A30 GPU with BF16 mixed precision and gradient checkpointing, which puts reproduction within reach of a modest lab setup.