ML2026
MedFusion-Diff
A pixel-space conditional diffusion model (Conditional U-Net with cross-attention, DDPM) synthesising brain tumour MRI slices from BraTS 2023, conditioned on patient metadata including age, gender, diagnosis and WHO grade.
- Training slices
- ~9.5K
- Conditioning variables
- 4
- Mixed-precision training
- RTX 4090
The problem
Brain tumour imaging datasets are small, hard to access and unevenly distributed across the conditions that matter. A rare WHO grade may have only a handful of examples. Augmentation does not solve it, because rotating an existing scan does not create a new patient. What helps is generation you can steer, so you can ask for the underrepresented case directly.
The approach
A DDPM operating directly in pixel space, with a Conditional U-Net whose cross-attention layers consume patient metadata. Conditioning on age, gender, diagnosis and WHO grade makes the model steerable, so you request a slice matching a specific clinical profile instead of sampling blindly.
Medical imaging research is throttled by scarce, privacy-locked scans. I wanted to prove a conditional diffusion model could generate realistic, metadata-controllable MRI slices that expand training sets without exposing a single real patient.
Architecture
- 01
Data pipeline
Scans pulled directly from Synapse, preprocessed into roughly 9,500 training slices from BraTS 2023.
- 02
Conditional U-Net
Cross-attention layers inject patient metadata (age, gender, diagnosis, WHO grade) into the denoising path.
- 03
DDPM training
Pixel-space denoising diffusion, mixed-precision AMP on RunPod RTX 4090 GPUs.
- 04
Sampling
Metadata-conditioned generation. Request a clinical profile, get a matching slice.
Stack
- Architecture
- Conditional U-Net · DDPM · cross-attention
- Data
- BraTS 2023 via Synapse
- Compute
- RunPod RTX 4090 · CUDA · AMP
- PyTorch
- DDPM
- U-Net
- Cross-Attention
- BraTS 2023
- RunPod
- CUDA
- AMP
- NumPy
Outcome
A working conditional DDPM over BraTS 2023 producing metadata-steerable MRI slices. The useful result is control rather than raw fidelity. Being able to ask for a specific clinical profile is what makes synthetic imaging worth using to balance a training set.