1745

Robustness of Diffusion Model-Based Methods to Distribution Shifts in Medical Imaging
Wei Jiang1, Yang Gao2, Feng Liu1, Nan Ye1, and Hongfu Sun1
1The University of Queensland, Brisbane, Australia, 2Central South University, Changsha, China

Synopsis

Keywords: AI Diffusion Models, Machine Learning/Artificial Intelligence

Motivation: Diffusion model (DM)-based methods demonstrate competitive performance in solving medical imaging inverse problems. However, it remains uncertain whether these methods are vulnerable to distribution shifts, a common issue in traditional learning-based approaches.

Goal(s): Our goal is to conduct experiments to evaluate how well DM-based methods handle distribution shifts in various scenarios.

Approach: We utilize three different sampling methods based on a pretrained Diffusion model and apply them to four clinical tasks without fine-tuning.

Results: Experiments indicate that DM-based methods efficiently address distribution shifts without requiring fine-tuning. They exhibit robustness to many distribution shifts, even when the test data deviates from the training data.

Impact: DM-based methods reduce resource consumption and the need for extensive training datasets, potentially inspiring further development of DM-based techniques for enhancing in-vivo tasks with limited resources.

Introduction

Prior models are crucial for solving Magnetic Resonance Imaging (MRI) inverse problems, though existing models are not perfected. Prior models are utilized to yield desirable outputs due to the ill-posed nature of MRI inverse problems. However, traditional priors, being hand-crafted, often lead to overly smoothed reconstructions because of their simplistic nature6, while learning-based priors offer flexibility but are reliant on large datasets. The Deep Image Prior11(DIP) method emerges as a potential solution, yet is hampered by its slow sampling speeds. Recently, Diffusion Model (DM) based methods10,2 have showcased their generalizability in conventional retrospective experiments. This study aims to explore DM-based methods' generalizability into three other clinical scenarios: noisy measurements, varying anatomies, and complex datasets. Through experiments, this study highlights the potential for DM-based methods to reduce reliance on large datasets, thereby moving a step closer to practical clinical applications.

Methods

In this section, we introduce the MRI inverse problem and Diffusion models, along with two related approaches: projection-based and score-based.

MRI Inverse Problem: The MRI inverse problem's forward model is denoted by \(\mathbf{y} = \mathbf{M}\mathbf{F}\mathbf{x} + \boldsymbol{\epsilon}\), with \(\mathbf{M}\) as the binary under-sampling mask, \(\mathbf{F}\) the forward Fourier transform, and \(\boldsymbol{\epsilon}\) Gaussian noise during signal acquisition.

Diffusion Models: Diffusion models consist of a fixed forward process and a learned reverse process. The forward process transforms an unknown data distribution \(p_{\text{data}}\) towards a noise distribution like Gaussian, by gradually perturbing signals with Gaussian noise across many steps, with the noise standard deviation given by a schedule \(\beta(t)\), where \(t = 1, \ldots, T\). For reverse process, a U-Net is trained to estimate the noise at \({\bf x}_t\) and time \(t\), denoted as \(\boldsymbol{\epsilon}_{\boldsymbol{\theta}}({\bf x}_{t}, t)\). Diffusion models enable random sampling from \(p_{\text{data}}\) by initially sampling from the noise distribution to get \({\bf x}_T\), then iteratively removing estimated noise \(\boldsymbol{\epsilon}_{\boldsymbol{\theta}}({\bf x}_{t}, t)\) to obtain a clean image \({\bf x}_0\), a sample from \(p_{\text{data}}\).

Projection-based Methods: The projection \({\bf x}_{t}\) onto the set of images consistent with \({\bf y}_{t}\) ensures data consistency, which denoted as \({\bf P}_{{\bf y}_{t}}({\bf x}_{t})={\bf F}^{-1}[{\bf M}{\bf y}_{t}+({\bf I}-{\bf M}){\bf F}{\bf x}_{t}]\), where \({\bf y}_{t}=\alpha(t){\bf y}+\beta(t){\bf A}{\bf z}_t\), \({\bf z}_t\sim \mathcal{N}({\bf 0},{\bf I})\), and \(\alpha(t)\) related to \(\beta(t)\). In DDPM5, \(\alpha(t)\) and \(\beta(t)\) are \(\sqrt{\bar{\alpha}_t}\) and \(\sqrt{1-\bar{\alpha}_t}\), respectively. Both Song's method10 and Prediction-Projection-Noising (PPN) are projection-based; Song's method performs projection at \({\bf x}_{t}\), while PPN at \({\bf x}_{0}\). PPN's denoising is defined as \({\bf x}_{t-1}=\sqrt{\bar{\alpha}_{t-1}}\cdot{\bf P}_{{\bf y}}\left({\bf x}_{t}-\sqrt{1-\bar{\alpha}_{t}}\cdot\boldsymbol{\epsilon}_{\boldsymbol{\theta}}({\bf x}_{t},t)/\sqrt{\bar{\alpha}_{t}}\right)+\sqrt{1-\bar{\alpha}_{t-1}}\cdot{\bf z}_t\), illustrated in Figure 1.

Score-based Method: Diffusion Posterior Sampling (DPS)1 utilizes a Langevin dynamics-style sampling defined by \({\bf x}_{t+1}={\bf x}_{t}+\eta_{t}\nabla_{{\bf x}_{t}}\log p({\bf x}_{t}|{\bf y})+\sqrt{2\eta_{t}}{\bf z}_t\), with \(\eta_{t}\) as the step size and \({\bf z}\sim \mathcal{N}({\bf 0},{\bf I})\). The posterior score \(\nabla_{{\bf x}_{t}}\log p({\bf y}|{\bf x}_{t})\) can be approximated by \(-\frac{1}{\sigma^{2}}\nabla_{{\bf x}_{t}}\|{\bf y}-{\bf A}\hat{{\bf x}}_{0}\|_{2}^{2}\), with \(\hat{{\bf x}}_{0}=\left({\bf x}_{t}-\sqrt{1-\bar{\alpha}_{t}}\boldsymbol{\epsilon}_{\boldsymbol{\theta}}({\bf x}_{t},t)\right)/\sqrt{\bar{\alpha}_{t}}\) using Tweedie’s approach4,7.

In this study, a pretrained Diffusion Model (DM) is utilized as a prior for solving medical inverse problems. We test three reconstruction methods: PPN, Song's method10, and DPS1, all sharing a similar structure. Starting with a Gaussian-drawn sample \({\bf x}_T\) at noise level \(T\), we iteratively apply a denoising and a data-consistent step, either projection or score-based, to obtain a noise-free, \({\bf y}\)-consistent image \({\bf x}_0\).

Experiments

We utilize ADM8,3 as the DM implementation, training it unsupervisedly on the fastMRI12 knee dataset, then test it on two datasets: fastMRI knee and brain, without fine-tuning. Our baselines include zero-filled, total variation (TV), and U-Net methods9, with a 0.1 regularization parameter for TV, and U-Net trained supervisedly on the fastMRI knee dataset. Additionally, we incorporate three diffusion model-based methods: PPN, DPS1 and Song's method10, with a step size of 1.0 for DPS and \( \lambda \) set to 1.0 for Song's method. For results, refer to Figures 2 to 5.

Discussion

Overall, DM-based methods outperformed the baselines in most scenarios except for complex measurements, notably excelling in retrospective subsampling experiments and those involving varying anatomies. Reconstructions with Poisson masks yielded better results during accelerated sampling. While the performance gap diminished in noisy measurements, DM-based methods generated fewer artifacts compared to the baselines. However, DM-based methods did not perform well in the context of complex measurements.

Conclusion

This study investigates the utility of Diffusion Models in addressing distribution shift challenges in medical imaging. Our results demonstrate that DM-based methods adapt well to retrospective subsampling experiments, noisy measurements, and diverse anatomies. However, they underperform on complex test sets. Future work should explore complex in-vivo datasets to advance DM-based methods towards clinical applications.

Acknowledgements

The first author gratefully acknowledges the financial support provided by the Dr F & Mrs ME Zaccari Scholarship.

HS acknowledges support from the Australian Research Council (DE210101297, DP230101628).

References

1. Chung H, Kim J, Mccann MT, et al. Diffusion posterior sampling for general noisy inverse problems. arXiv preprint arXiv:2209.14687. 2022 Sep 29.

2. Chung H, Ye JC. Score-based diffusion models for accelerated MRI. Medical image analysis. 2022 Aug 1;80:102479.

3. Dhariwal P, Nichol A. Diffusion models beat gans on image synthesis. Advances in neural information processing systems. 2021 Dec 6;34:8780-94.

4. Efron B. Tweedie’s formula and selection bias. Journal of the American Statistical Association. 2011 Dec 1;106(496):1602-14.

5. Ho J, Jain A, Abbeel P. Denoising diffusion probabilistic models. Advances in neural information processing systems. 2020;33:6840-51.

6. Jin KH, McCann MT, Froustey E, Unser M. Deep convolutional neural network for inverse problems in imaging. IEEE transactions on image processing. 2017 Jun 15;26(9):4509-22.

7. Kim K, Ye JC. Noise2score: tweedie’s approach to self-supervised image denoising without clean images. Advances in Neural Information Processing Systems. 2021 Dec 6;34:864-74.

8. Nichol AQ, Dhariwal P. Improved denoising diffusion probabilistic models. InInternational Conference on Machine Learning 2021 Jul 1 (pp. 8162-8171). PMLR.

9. Ronneberger O, Fischer P, Brox T. U-net: Convolutional networks for biomedical image segmentation. InMedical Image Computing and Computer-Assisted Intervention–MICCAI 2015: 18th International Conference, Munich, Germany, October 5-9, 2015, Proceedings, Part III 18 2015 (pp. 234-241). Springer International Publishing.

10. Song Y, Shen L, Xing L, Ermon S. Solving inverse problems in medical imaging with score-based generative models. arXiv preprint arXiv:2111.08005. 2021 Nov 15.

11. Ulyanov D, Vedaldi A, Lempitsky V. Deep image prior. InProceedings of the IEEE conference on computer vision and pattern recognition 2018 (pp. 9446-9454).

12. Zbontar J, Knoll F, Sriram A,, et al. fastMRI: An open dataset and benchmarks for accelerated MRI. arXiv preprint arXiv:1811.08839. 2018 Nov 21.

Figures

An illustration of one step of the sampling process for PPN (Prediction-Projection-Noising). The process starts at \( x_t \). First, use the diffusion model to predict \( x_{0|t} \). Next, obtain \( \hat{x}_{0|t} \) by projecting it onto the set of images consistent with \( y \). It is possible that \( \hat{x}_{0|t} \) may drift outside the manifold; therefore, the final noising step is employed to return to \( x_{t-1} \) for the purpose of repeating the process.

Conventional retrospective experiment. These results are tested to examine the influence of different masks with two different accelerations on Diffusion models. The result show that Diffusion-based methods outperform the baseline methods. Among them, PPN achieves the highest scores.

Reconstructions from a Different Anatomy: FastMRI Brain. Diffusion-based methods achieved better results than the baselines. Among them, PPN achieved the highest scores. Results obtained using the Poisson mask outperformed those using the Cartesian mask.

Reconstructions from Different Noisy Measurements: Gaussian Noise with Standard Deviations \( \sigma \) of 0.05 and 0.1. When \( \sigma \) is 0.05 (first two rows), the DM-based methods outperformed the baseline methods, producing cleaner reconstructions. When \( \sigma \) is 0.1 (last two rows), DM-based methods still surpassed the baselines, with DPS being especially effective. While the reconstructions from DM-based methods appeared noisy, they did not exhibit the artifacts present in the baseline methods.

Reconstructions from Single-Coil Complex Measurements: These measurements are emulated from a multi-coil dataset and are used to simulate complex dataset. The diffusion-based methods did not perform as well as the baseline methods in this case.

Proc. Intl. Soc. Mag. Reson. Med. 32 (2024)
1745
DOI: https://doi.org/10.58530/2024/1745