← Research

Two Minds, One Model

Notes on HealthGPT: how one medical model learns to read scans and draw them, without the two jobs fighting.

— Manish Ram

readdraw
Fig. 0 — One model, reading and drawing read draw

1. Reading and drawing are different jobs

Medical AI has split into two camps. Comprehension models look at an image and answer questions about it: is there a fracture, what organ is this, what does this slide show. Generation models make images: turn a CT into an MRI, sharpen a blurry scan, fill in a reconstruction. Over the past few years each camp has produced strong models, but almost never one that does both.

Putting both in one model runs into two problems:

  1. Data. Medical data is scarce because of privacy, and there was no large dataset covering both kinds of task.
  2. Conflict. Even with the data, the two tasks pull the model in different directions, and each gets worse.

The paper takes on both. The rest of these notes follow its answers.


2. Feeding both: VL-Health

For the data problem, the authors assembled VL-Health from existing public medical datasets: about 765K comprehension samples and 783K generation samples, so the two halves are almost exactly balanced. The comprehension half spans eleven named imaging modalities, from CT and MRI to fundus photos and histology slides. The generation half covers five tasks, with reconstruction the largest.

Fig. 1VL-Health · about 1.5M samples
Comprehensionimage + question → answer
765K
  • CT
  • MRI
  • X-ray
  • Ultrasound
  • Fundus
  • OCT
  • Microscopy
  • Histology
  • Dermoscopy
  • Endoscopy
  • Digital photography
  • Other
Generationinstruction (+ image) → image
783K
  • Reconstruction
  • Super-resolution
  • CT → MRI
  • MRI → CT
  • Text → image

Counts from the paper’s Figure 4. Reconstruction is by far the largest generation task; CT and MRI the largest comprehension modalities.


3. The tug of war

The second problem is subtler. In the authors’ words, comprehension tasks “strip away visual details to focus on abstraction, while generation tasks require detailed preservation”. To say “this is a fractured radius”, a model can throw away texture. To draw the MRI version of a CT slice, it needs every edge.

One way to picture it: with shared weights , each training step follows the sum of both tasks’ gradients,

and whenever , part of every step that helps one task undoes progress on the other. The paper measures the effect directly. Hold one task’s data fixed, add more of the other, and watch the fixed task decline:

Fig. 2The tug of war
10203040506070255075100Generation data ratio (%)Score
  • Comprehension, shared weights
  • Generation, shared weights
  • Comprehension, HealthGPT
  • Generation, HealthGPT

Comprehension data fixed. More generation data drags shared comprehension from 62 to 48.

With shared weights (solid lines), adding generation data pulls comprehension down from about 62 to 48, and adding comprehension data pulls generation down from about 54 to 47. With HealthGPT (dashed), more data of either kind helps or does nothing. That is exactly what you want from a unified model.


4. Plugins, not one brain

The fix starts from LoRA. Instead of fine-tuning a big weight matrix , LoRA freezes it and learns a small low-rank update:

A LoRA is cheap and detachable, which makes it a natural “plugin”. MoELoRA goes further and keeps such experts, mixed by a router :

That sum is the catch: each expert is a separate pair of matrix multiplies, so training time grows with . HealthGPT’s H-LoRA concatenates the experts into one wide pair,

stretches the router’s weights so each one covers its expert’s columns, and applies them inside a single multiply:

Mathematically it’s the same mixture. Computationally it costs about the same as one LoRA. With four experts, the paper reports H-LoRA needs about 67% of MoELoRA’s training time, and the gap widens as grows:

Fig. 3Same experts, one multiply

MoELoRA

4 separate multiplies per layer

H-LoRA

one multiply, router weights applied inside

MoELoRA1.49×
H-LoRA1.00×

Training time relative to plain LoRA (the tick at 1×), from the paper’s Table 10.

The second half of the trick is a hard router at the task level. Comprehension and generation each get their own H-LoRA plugin, and , and the task type decides which one is plugged in. The two never share low-rank weights, so they can’t fight over them.


5. Seeing at two depths

The same split happens on the vision side. A vision transformer (here CLIP-L/14) builds up its picture in layers: early layers keep edges and textures, later layers hold abstract concepts. HealthGPT calls this hierarchical visual perception and picks the layers to match the job:

In practice that’s the second layer’s hidden states for drawing (concrete detail) and the penultimate layer’s for reading (abstract meaning), each through its own small adapter. It’s a neat idea: rather than forcing one set of visual features to serve both tasks, use the fact that a ViT already computes both kinds.


6. Pictures as words

To draw with a language model, images have to become tokens. HealthGPT uses a VQGAN (the f8-8192 version): it compresses an image 8× in each direction and replaces each patch with one of 8,192 codebook entries. A 256-pixel-square image, for example, becomes a 32 × 32 grid, or 1,024 tokens. Those codes join the language model’s vocabulary, so generating an image is just next-token prediction:

where is the instruction (and any input image) and are the image’s code indices. Training minimises the usual cross-entropy, , and a VQ decoder turns the codes back into pixels. Put all of this together and you get the full architecture. Switch tasks to see the path the router picks:

Fig. 4The hard router
Medical imagethe input scan
Instructiontext tokens
Vision encoder · frozenCLIP-L/14
Deep featurespenultimate layer: what it is
Comprehension adaptertwo-layer MLP
Fusion embeddingtext, image and VQ tokens in one sequence
LLM decoder blocks × N · frozenthe pretrained language model
Comprehension H-LoRAplugin, 4 experts
Text decoder→ an answer
Ask
Is there a fracture in this X-ray?
Out
Text tokens, one at a time: “Yes, a fracture of the distal radius…”

7. Teaching it in three stages

The last piece is the training schedule. The order matters as much as the architecture: each stage freezes whatever the previous one got right.

Fig. 5Three stages
  • Vision encoderfrozen
  • Visual adapterstrains
  • Language modelfrozen
  • H-LoRA pluginsthe generation plugin trainspartly
  • Embeddings and output head8,192 image codes join the vocabularypartly
Data
Image–text pairs for reading; image–VQ code pairs for drawing
Why
Teach each side to talk to the language model on its own, so neither can disturb the other.

Stage 2 is the clever one. After stage 1, the two plugins were trained separately, so they don’t quite agree on the shared parts of the model. A small mixed dataset, with the plugins frozen, fits the shared embeddings and output head to both at once. Then stage 3 can tune each plugin for real tasks without disturbing the other.


8. The report card

8.1 Reading

On medical visual question answering, HealthGPT beats both the medical models and the general unified ones. Closed-question accuracy on three benchmarks, plus MMMU-Med, OmniMedVQA and the paper’s overall average (which also includes the open questions I’ve left out):

ModelSizeVQA-RADSLAKEPathVQAMMMU-MedOMVQAAvg.
LLaVA-Med7B60.258.462.330.041.347.6
HuatuoGPT-Vision7B66.959.852.942.050.050.7
Llama-3.211B68.972.462.839.363.254.7
Janus-Pro (unified)7B62.951.348.932.754.145.6
Emu3 (unified)8B72.157.354.128.739.547.2
HealthGPT-M33.8B73.774.678.743.368.561.3
HealthGPT-L1414B77.776.485.949.274.466.4
HealthGPT-XL3232B78.183.792.458.077.271.1

The detail I like most: the smallest HealthGPT, at 3.8B parameters, beats every 7B medical model in the table by more than ten points on average.

8.2 Drawing

Image quality is measured against the real target image. Mean squared error and peak signal-to-noise ratio work pixel by pixel:

SSIM compares local brightness, contrast and structure, which is closer to what a radiologist notices:

Higher is better for SSIM and PSNR, lower for MSE and LPIPS (a perceptual distance computed from deep features). On modality conversion, here is SSIM across the four tasks:

ModelCT→MRI brainCT→MRI pelvisMRI→CT brainMRI→CT pelvis
pix2pix71.0959.1778.7972.31
CycleGAN54.7654.5463.7550.54
BBDM71.6957.3786.4079.26
Vmanba69.5463.0179.6377.45
DiffMa71.4762.5679.0078.53
HealthGPT-M379.3871.8185.0684.23
HealthGPT-L1479.7371.9285.3184.96

HealthGPT wins three of the four, with the biggest margin on CT to MRI in the pelvis (about nine points over the next best). The exception is honest and interesting: on MRI to CT in the brain, the diffusion model BBDM still has the best SSIM, though HealthGPT has the best PSNR and MSE there. On super-resolution it wins every metric, and its LPIPS is about 37% lower than the next best:

ModelSSIM ↑PSNR ↑MSE ↓LPIPS ↓
SRGAN71.3432.0141.2724.50
DASR71.5732.3438.2519.17
Real-ESRGAN67.3031.8742.5720.64
LIIF73.2732.1340.1422.93
BSRGAN69.9731.9741.5228.72
HealthGPT-M378.1932.7634.4712.02
HealthGPT-L1477.9432.7135.1912.43

9. What I took from it

The lesson I keep coming back to is that “unified” doesn’t have to mean “shared everything”. HealthGPT shares the expensive part, a frozen language model, and keeps the parts where the tasks disagree separate: which visual layers to look at, and which low-rank plugin to use. The interference curves in Figure 2 are the best argument for that design I’ve seen.


References

  1. Lin et al., “HealthGPT: A Medical Large Vision-Language Model for Unifying Comprehension and Generation via Heterogeneous Knowledge Adaptation”, 2025. arxiv.org/abs/2502.09838
  2. Hu et al., “LoRA: Low-Rank Adaptation of Large Language Models”, 2021. arxiv.org/abs/2106.09685
  3. Esser, Rombach and Ommer, “Taming Transformers for High-Resolution Image Synthesis” (VQGAN), 2021. arxiv.org/abs/2012.09841
  4. Li et al., “LLaVA-Med: Training a Large Language-and-Vision Assistant for Biomedicine in One Day”, 2023. arxiv.org/abs/2306.00890
  5. Wang et al., “Image Quality Assessment: From Error Visibility to Structural Similarity” (SSIM), 2004. doi.org/10.1109/TIP.2003.819861