Abstract
Rapid progress has been made in instruction-learning for image editing with natural-language instructions. In biomedicine, such methods can be applied to counterfactual image generation, which helps differentiate causal structure from spurious correlation and facilitates robust image interpretation for disease progression modeling. We present BiomedJourney, a novel method for counterfactual biomedical image generation by instruction-learning from multimodal patient journeys. By leveraging GPT-4 to process longitudinal imaging reports, we generate natural language descriptions of disease progression. These descriptions, paired with prior images, are used to train a latent diffusion model. Experiments on the MIMIC-CXR dataset demonstrate that BiomedJourney substantially outperforms prior state-of-the-art methods in instruction-based image editing and medical image generation.
Introduction
In clinical radiology, a single image rarely tells the complete story. Clinicians rely on "patient journeys"—the evolution of pathologies over time—to make informed decisions. However, most AI models for medical image generation are static, creating images from scratch rather than evolving them from a patient's specific history. This paper addresses the challenge of counterfactual generation: simulating how a specific patient's scan would look if their disease state changed (e.g., "What if this effusion worsened?").
Existing models like InstructPix2Pix lack medical domain knowledge, while text-to-image models like RoentGen often fail to preserve patient-specific anatomical invariants, such as bone structure or heart shape. This leads to "hallucinations" that make longitudinal comparison clinically useless. BiomedJourney bridges this gap by learning to simulate disease progression while strictly preserving a patient’s unique anatomical identity.
Methods
BiomedJourney treats counterfactual generation as an instruction-learning task. The framework utilizes a Latent Diffusion Model (LDM) conditioned on both a prior image and a textual progression description.
Data Synthesis with GPT-4
To overcome the scarcity of high-quality instructional data, the researchers used GPT-4 to analyze pairs of radiology reports from the same patient at different time points. GPT-4 synthesizes a concise "progression description" (e.g., "There is an increasing right pleural effusion") that captures the clinical changes between the two reports.
Architecture and Training
The model architecture consists of an image encoder (VQGAN) for the prior image and a text encoder (BiomedCLIP) for the progression instruction. These inputs condition a U-Net-based denoising network to generate the target image.
The authors employed a two-stage curriculum learning strategy:
- Stage 1 (Pretraining): The model is pretrained on ~157,000 single image-report pairs from the MIMIC-CXR dataset using a "dummy" prior image to learn general medical image features.
- Stage 2 (Fine-tuning): The model is fine-tuned on ~11,600 "patient journey" triples consisting of a prior image, a progression description, and the subsequent real image.
Results
The researchers proposed the Counterfactual Medical Image Generation (CMIG) score, which balances pathology accuracy with the retention of patient features. BiomedJourney achieved a CMIG score of 83.23, vastly outperforming RoentGen (66.08) and InstructPix2Pix (42.12).
Key findings include:
- Anatomical Alignment: The model achieved a Dice score of 81.05 for anatomical overlap, indicating exceptional preservation of the patient's unique physical structure.
- Diagnostic Accuracy: Generated images maintained high diagnostic utility, with AUROC scores for conditions like Atelectasis or Edema nearly matching those of real clinical images.
- Instruction Following: Replacing standard CLIP with BiomedCLIP (trained on PubMed) significantly improved the model's ability to interpret complex clinical instructions.
Discussion and Conclusion
BiomedJourney represents a significant advancement in realistic longitudinal medical simulation. By leveraging LLMs for data synthesis and domain-specific encoders, the model achieves superior anatomical alignment and clinical relevance. While currently limited by image resolution (256x256), future work aims to scale the framework to higher resolutions and 3D modalities like CT and MRI. The release of the instruction-learning code and pretrained models will facilitate further research in counterfactual medical generation.
Citation: Gu, Y., Yang, J., et al. (2023). BiomedJourney: Counterfactual Biomedical Image Generation by Instruction-Learning from Multimodal Patient Journeys. arXiv:2310.10765v3.
Summary updated