Medical Image Computing and Computer Assisted Intervention (MICCAI) 2025 — Early Accept (Top 9%)
Seunghoi Kim · Henry F. J. Tregidgo · Matteo Figini · Chen Jin · Sarang Joshi · Daniel C. Alexander
DynamicDPS is a diffusion-based framework that removes hallucinations — spurious structures absent from the ground truth — from the outputs of conditional medical-image-reconstruction models. It refines any conditional model's prediction with an unconditional diffusion prior and a data-consistency constraint, is model-agnostic and fine-tuning-free, and reaches high fidelity using only ~5% of the usual sampling steps.
Status — pre-trained checkpoint released; training and inference demo code available.
- Overview
- Why It Works
- Method
- Results
- Installation
- Pre-trained Model
- Usage
- Configuration
- Repository Structure
- Citation
- Acknowledgements
Hallucinations — spurious structures not present in the ground truth — are a critical failure mode of data-driven conditional models for medical image reconstruction, where an invented lesion or vessel can directly cause misdiagnosis. DynamicDPS investigates this phenomenon and mitigates it while improving both reconstruction fidelity and efficiency, demonstrated here on low-field MRI enhancement.
A purely conditional reconstruction model maps a degraded measurement directly to a clean image. When the measurement is ambiguous, the model fills the gap with whatever its training distribution deems likely — which is exactly how a plausible-but-nonexistent structure gets painted in. It has no mechanism to check its output against the physics of the measurement.
DynamicDPS reframes reconstruction as an inverse problem solved under two constraints that pull in complementary directions:
- The diffusion prior keeps the image on the manifold of realistic anatomy, rather than trusting the conditional model blindly.
- Data consistency (
‖y − A·x‖) anchors every step to the actual measurement, so the solution cannot drift into structures the observed signal does not support.
Because the conditional model's output is only a starting point that is then re-examined against the measurement, hallucinated structures — which are unsupported by the data — are progressively suppressed, while genuine detail is preserved. Two design choices make this practical instead of merely correct: the process starts partway down the diffusion chain (chosen per-sample), and Wolfe line search adapts the step size on the fly — together cutting the work to a small fraction of standard diffusion sampling.
DynamicDPS pairs a conditional model with an unconditional diffusion prior in a single inference-time pipeline — no retraining of either:
| Stage | What happens |
|---|---|
| 1. Initial reconstruction | A conditional model produces a first enhanced estimate from the measurement. |
| 2. Adaptive start (skip early steps) | Instead of sampling from pure noise, the pipeline injects noise into the conditional estimate and starts from a per-sample optimal timestep, chosen from the data likelihood against a reference memory bank. This is where most of the speed-up comes from. |
| 3. Guided refinement | The unconditional diffusion model denoises the estimate while a posterior-sampling guidance term enforces data consistency with the measurement at every step. |
| 4. Wolfe line search | The guidance step size is set adaptively via Wolfe's conditions, stabilising the refinement and removing manual tuning. |
The test_src/ variant additionally performs on-the-fly measurement-parameter estimation (operator.fit_A), so the degradation operator is calibrated per scan rather than assumed fixed.
On both synthetic and real low-field MR scans, DynamicDPS reduces hallucinations from conditional-model outputs and improves downstream tissue-volume estimation by over 15% for critical structures — while using only ~5% of the sampling steps of standard diffusion solvers.
Visual comparisons on real low-field MR scans: DynamicDPS reconstructs faithfully with fewer hallucinated features.
Python ≥ 3.9 with a CUDA-capable GPU is recommended. The codebase builds on OpenAI's guided-diffusion.
# clone, then install the guided_diffusion package in editable mode
pip install -e .Before running, unzip the motion-blur kernels:
unzip motionblur.zipDownload the score-matching model checkpoint and set its path via --model_path:
- Checkpoint: Google Drive
python image_train.pypython test.pyThe test_src/ pipeline (2026.04 update) adds per-scan estimation of the degradation parameters, so the measurement operator is calibrated rather than assumed:
cd test_src
python test.pyBefore running — edit the paths at the top of the script /
configs.yamlto point at your model checkpoint and data directory, and set--model_pathto the downloaded checkpoint.
Inference is driven by configs.yaml (and test_src/configs.yaml). The key knobs:
| Key | Meaning |
|---|---|
skip_timestep |
start from an adaptively chosen timestep instead of pure noise (the core speed-up) |
line_search |
use Wolfe line search to set the guidance step size adaptively |
tau |
exponent on the data-likelihood term used to pick the starting timestep |
fine_tune |
resume training from an existing checkpoint |
conditioning.method |
measurement-guidance method (ps = posterior sampling) |
measurement.operator |
forward degradation model (e.g. gaussian_blur with kernel_size, intensity) |
measurement.noise |
measurement noise model (e.g. gaussian with sigma) |
norm / mean / std |
intensity normalisation applied to the MR volumes |
├── image_train.py # train the unconditional score-matching diffusion model
├── test.py # DynamicDPS inference (memory-bank timestep selection)
├── test_src/ # updated inference + on-the-fly measurement-parameter estimation
├── configs.yaml # normalisation, sampling, operator and noise settings
├── reference_memorybank.csv # per-timestep likelihood reference for adaptive-start selection
├── motionblur.zip # motion-blur kernels (unzip before use)
├── guided_diffusion/ # diffusion backbone: U-Net, gaussian_diffusion, measurements, ...
├── scripts/ # original guided-diffusion train/sample utilities
├── datasets/ # dataset preparation helpers
├── evaluations/ # FID / evaluation utilities
└── setup.py # installs the guided_diffusion package
If you find this work useful, please consider citing:
@InProceedings{KimSeu_Tackling_MICCAI2025,
author = {Kim, Seunghoi AND Tregidgo, Henry F. J. AND Figini, Matteo AND Jin, Chen AND Joshi, Sarang AND Alexander, Daniel C.},
title = {{Tackling Hallucination from Conditional Models for Medical Image Reconstruction with DynamicDPS}},
booktitle = {Proceedings of Medical Image Computing and Computer Assisted Intervention -- MICCAI 2025},
year = {2025},
publisher = {Springer Nature Switzerland},
volume = {LNCS 15963},
month = {September},
pages = {593--603}
}This code builds upon OpenAI's guided-diffusion and the DPS (Diffusion Posterior Sampling) framework. We thank the authors for releasing their code.
For questions, contact Seunghoi Kim — seunghoi.kim.17@ucl.ac.uk.
