# Single Exposure Quantitative Phase Imaging with a Conventional Microscope
using Diffusion Models

Gabriel della Maggiora1,2, Luis Alberto Croquevielle3, Harry Horsley4, Thomas
Heinis3, Artur Yakimovich1,2,5

1 Center for Advanced Systems Understanding (CASUS), Görlitz, Germany
2 Helmholtz-Zentrum Dresden-Rossendorf e. V. (HZDR), Dresden, Germany
3 Department of Computing, Imperial College London, London, United Kingdom
4 Bladder Infection and Immunity Group (BIIG), UCL Centre for Kidney and
Bladder Health,
4 Division of Medicine, University College London,
4 Royal Free Hospital Campus, London, United Kingdom
5 Institute of Computer Science, University of Wrocław, Wrocław, Poland

###### Abstract

Phase imaging is gaining importance due to its applications in fields like
biomedical imaging and material characterization. In biomedical applications,
it can provide quantitative information missing in label-free microscopy
modalities. One of the most prominent methods in phase quantification is the
Transport-of-Intensity Equation (TIE). TIE often requires multiple
acquisitions at different defocus distances, which is not always feasible in a
clinical setting. To address this issue, we propose to use chromatic
aberrations to induce the required through-focus images with a single
exposure, effectively generating a through-focus stack. Since the defocus
distance induced by the aberrations is small, conventional TIE solvers are
insufficient to address the resulting artifacts. We propose Zero-Mean
Diffusion, a modified version of diffusion models designed for quantitative
image prediction, and train it with synthetic data to ensure robust phase
retrieval. Our contributions offer an alternative TIE approach that leverages
chromatic aberrations, achieving accurate single-exposure phase measurement
with white light and thus improving the efficiency of phase imaging. Moreover,
we present a new class of diffusion models that are well-suited for
quantitative data and have a sound theoretical basis. To validate our
approach, we employ a widespread brightfield microscope equipped with a
commercially available color camera. We apply our model to clinical microscopy
of patients’ urine, obtaining accurate phase measurements.

##  1 Introduction

Phase imaging has emerged as a crucial technique in many applications
including biomedical imaging [28], label-free imaging characterization [29],
and modality imaging conversion [37, 48]. Applying this type of imaging
technique to objects with little or no absorption such as biological
structures results in images with enhanced contrast. Additionally, phase
imaging provides quantitative information about the morphology of microscopic
objects like cells, which is typically missing in label-free microscopy [43].
For example, this information can be used to detect morphological changes in
cells [39].

Several techniques have been developed for phase quantification. Among these
methods, the Transport-of-Intensity Equation (TIE) [34] stands out due to its
straightforward approach. TIE does not require the use of phase unwrapping
algorithms and it is easy to integrate into hardware. TIE establishes a
relationship between the lateral gradient of the phase with a through-focus
stack of intensity images facilitating phase retrieval in conditions of
partially coherent illumination [26].

One of the primary challenges in TIE is the presence of low-frequency
artifacts [38, 46, 49] at the center of the frequency space. Addressing these
artifacts often requires capturing multiple through-focus images, which can be
time-consuming and technically demanding, thus limiting practical application
[35, 50]. Alternatively, regularization techniques [19, 3, 22] can be
employed, but these are tailored to specific acquisition scenarios and might
not accurately capture the features of the acquired image [48].

In this work, we propose to perform phase imaging by exploiting the natural
variability in the wavelengths of white light, enabling precise phase
estimation with a single exposure. This quantification can be implemented with
a conventional, widely used microscope frame equipped with a commercially
available polychromatic (RGB) camera. This is a key practical consideration in
clinical settings, and it contrasts with other existing techniques, many of
which require specialized hardware.

However, the use of white light poses two challenges. First, it introduces a
small and fixed effective defocus distance [36], which is a significant
limitation for conventional TIE methods. Second, it introduces blurring in the
captured diffraction pattern due to the inherent incoherence of the source
[48, 49]. To address this, we propose a data-driven approach using a deep
diffusion model [10, 31, 8] trained exclusively on synthetic data [40]. This
paradigm reduces the dependence on real-world data, alleviating the problem of
difficult acquisitions [21, 41]. This model presents a robust and practical
solution for phase retrieval with polychromatic sources. In summary, our main
contributions are:

  * •

We propose a novel way of training deep-learning models for phase retrieval
based on the imaging physics-based data synthesis paradigm [40].

  * •

We show that our solution is robust and leads to accurate results in a real
clinical setting.

  * •

We propose a variation of diffusion models called Zero-Mean Diffusion that
allows for the use of diffusion methods in quantitative fields. Moreover, we
provide a theoretical analysis to explain why Zero-Mean Diffusion can
outperform standard diffusion models for this task.

##  2 Related Work

The induced phase of an object’s incident wave $\varphi$ can be determined by
analyzing its measured diffraction pattern $I$. For a monochromatic plane wave
with wavelength $\lambda$ and wavenumber $k=\frac{2\pi}{\lambda}$, the
Transport-of-Intensity Equation (TIE), under the paraxial approximation
establishes a connection between the rate of change of the image in the
propagation direction and the lateral phase gradient:

$-k\frac{\partial I(x,y;z)}{\partial
z}=\nabla_{(x,y)}{\cdot}\bigg{[}I(x,y;z)\nabla_{(x,y)}\varphi(x,y;z)\bigg{]},$
(1)

where $(x,y)$ are spatial coordinates and $z$ is the defocus distance. Two
distinct approaches exist for recovering the phase $\varphi$ from equation
(1). First, assuming the object is predominantly non-absorptive allows for
treating it as a phase object, such that $I(x,y;z=0)=I_{0}$. Consequently, (1)
becomes:

$-k\frac{\partial I(x,y;z)}{\partial
z}=I_{0}\nabla^{2}_{(x,y)}{\varphi(x,y;z)}.$

On the other hand, for an absorptive object, Teague’s assumption yields an
alternative formulation. In both cases, we can solve for the phase $\varphi$
by using the Fourier transform and differential operators acting on $I(x,y;z)$
(see details in Appendix A). In both cases, however, important numerical
challenges render phase recovery an ill-posed problem.

Techniques such as Tikhonov regularization [32] or Gaussian smoothing [23] can
mitigate instabilities, but they complicate the retrieval of low spatial
frequency components. Additionally, approximating $\frac{\partial
I(x,y;z)}{\partial z}$ through finite differences is susceptible to noise: a
small distance yields better detail recovery at the cost of worse Signal-to-
Noise Ratio (SNR), while larger distances worsen the paraxial approximation
[46, 48]. These issues can be addressed by increasing the number of
acquisitions. While effective, this adds complexity, making the method less
practical for real-world applications.

Another solution is to employ polychromatic illumination, such as white light.
This configuration is useful for phase quantification because the intensity
observed at the defocus plane can be interpreted as imaging at multiple
defocus distances [48], as we show in Figure 1. Nevertheless, a naive
application of this idea results in a blurred diffraction pattern due to the
superposition of the different defocus point spread functions at varying
propagation distances. There is also blurring induced by temporal coherence
arising from the superposition of diffuse spots at different axial propagation
distances, resulting in an image with fewer details. Nonetheless, this
configuration can work by using the wavelength-dependent characteristics of
Fresnel diffraction and an RGB camera [36, 47]. This results in a single-
exposure phase quantification method that effectively alleviates the problem
of mechanical defocusing in TIE phase retrieval.

Recently, deep learning has gained traction as a tool for image reconstruction
problems such as super-resolution [15], inpainting [18], and reconstructing
under-sampled magnetic resonance imaging (MRI) [1] or computerized tomography
[14]. In Quantitative Phase Imaging (QPI) [37], deep learning has been used
successfully to get better phase estimates compared to traditional 2-shot
methods (using two acquisitions) and single-image QPI. Usually, these problems
are solved in a regression manner by minimizing the $L_{1}$ or $L_{2}$ norm or
a pixel-wise notion of distance. While effective in many scenarios, these
methods introduce undesired artifacts [13] and do not yield uncertainty
estimates.

Generative models have gained popularity because they can produce more
realistic reconstructions than regression methods. Additionally, they give
access to an estimate of the distribution of the inverse problem, providing a
way to quantify uncertainty. Diffusion models are generative likelihood-based
models that have been successfully applied to problems like under-sampled MRI
image reconstruction [4], deblurring [16], image denoising [5], and phase
retrieval [20, 45], showing great stability during training and providing
state-of-the-art sample quality.

To obtain the phase of an image, we propose using white light as the image
source with a polychromatic (RGB) camera-based acquisition. Conveniently,
microscopes with such setups are commercially available and widespread even in
clinical imaging. Since white light is polychromatic, we can quantify phase
using the induced defocus stack. Solving the Transport-of-Intensity Equation
(TIE) with these measurements is possible in principle because different
wavelengths can be translated to different defocus distances under the same
wavelength [48, 36]. However, since the effective defocus distance of the
through-focus stack in this scenario is small, and there are blurring
artifacts introduced by the acquisition, the resulting quantification would
result in low SNR. We propose the use of a diffusion model to solve this
problem as an instance of conditioned probability sampling, and quantify the
phase using polychromatic image acquisition with a white light-based source,
achieving high accuracy.

##  3 Methods

Sections 3.1 and 3.2 describe our formulation for TIE and the design of a
sample dataset for learning phase recovery. Sections 3.3 and 3.4 describe our
use of diffusion models to solve phase recovery.

###  3.1 Forward Model

The TIE model given by (1) can be reformulated using an auxiliary variable
$\xi=\lambda z$, since both $z$ and $\lambda$ are related in the equations.
Consequently, the TIE can be expressed in terms of $\xi$ as follows [36]:

$-2\pi\frac{\partial
I(x,y;\xi)}{\partial\xi}=\nabla_{(x,y)}{\cdot}\bigg{[}I(x,y;\xi)\nabla_{(x,y)}\varphi(x,y;\xi)\bigg{]}.$
(2)

The main advantage of this formulation is that it is possible to perform phase
recovery while maintaining a constant defocus plane $z$ [36]. It also
maintains the advantages of the previous TIE formulation, such as only
requiring partial temporal coherence. Thus, the parameter $\lambda$ can be
replaced with a spectrally-weighted mean, as discussed in the next section.
Therefore, the color filtering that any color camera provides should
theoretically be enough to capture differentially defocused intensity images
simultaneously without the problems introduced by capturing multiple defocus
planes.

Figure 1: Example of optical system. The defocus distance $\Delta f$ induced
by chromatic aberration depends on the focal lengths $f_{1}$ and $f_{2}$. The
resulting $\Delta f$ for a specific wavelength $\lambda$ corresponds to
variable $z$ in (3).

Equation (2) can be solved within the near field of a propagated distance $z$
by the Fresnel diffraction integral. For a wavelength $\lambda$ and denoting
${\mathbf{x}}=(x,y)$ this gives

$I({\mathbf{x}};z,\lambda)=\left\lvert\sqrt{I_{0}}e^{i\varphi}\ast\frac{e^{ikz}}{i\lambda
z}e^{i\frac{k}{2z}\left\lVert{\mathbf{x}}\right\rVert_{2}^{2}}\right\rvert^{2}.$
(3)

###  3.2 Dataset Simulation

Consider a thin object with transmittance function
$T({\mathbf{x}})=A({\mathbf{x}})e^{i\phi({\mathbf{x}})}$, measured in $z=0$.
Then, the equation for the intensity image under partially incoherent
illumination [48] is

$I({\mathbf{x}};z,\lambda)=\int S(\mathbf{u})\bigg{|}\int
T({\mathbf{x}}^{\prime})h_{z,\lambda}({\mathbf{x}}-{\mathbf{x}}^{\prime})e^{i2\pi\mathbf{u}{\mathbf{x}}^{\prime}}d{\mathbf{x}}^{\prime}\bigg{|}^{2}d\mathbf{u}=\int
S(\mathbf{u})I_{\mathbf{u}}({\mathbf{x}})d\mathbf{u},$

where $S(\mathbf{u})$ and $I_{\mathbf{u}}$ correspond to the Fourier
transforms of the source and the image, respectively, and $h$ is the system’s
impulse response. This suggests that the observed intensity image is a
superposition of all the coherent images obtained from the source. Under the
paraxial approximation and assuming that the source is a coherent plane wave,
that is, $S(\mathbf{u})=\delta(\mathbf{u})$, the image can be obtained by the
Fresnel integral given by equation (3).

In polychromatic acquisitions, the sensor is usually sensitive to a specific
bandwidth. Generally speaking, a polychromatic sensor is built as an array of
monochromatic sensors sensitive to three main components: red, green, and
blue. Each has a different sensitivity to each wavelength. The sensor’s
quantum efficiency determines how much energy each frequency transforms into a
signal. Given this model, the system can be expressed as a function of the
power spectral distribution (PSD) $S_{\lambda}(\mathbf{u})$ [48]. Then, the
intensity image is given by

$I({\mathbf{x}};z)=\iint S_{\lambda}(\mathbf{u})\bigg{|}\int
T({\mathbf{x}}^{\prime})h_{z,\lambda}({\mathbf{x}}-{\mathbf{x}}^{\prime})e^{i2\pi\mathbf{u}{\mathbf{x}}^{\prime}}d{\mathbf{x}}^{\prime}\bigg{|}^{2}d\mathbf{u}d\lambda=\iint
S_{\lambda}(\mathbf{u})I_{\mathbf{u},\lambda}({\mathbf{x}})d\mathbf{u}d\lambda.$

This means that the resulting intensity image is equal to the superposition of
the different power densities within the defined bandwidth, i.e., the average
of all images produced by the different coherent wavelength components.

To simulate polychromatic acquisitions, we use the ImageNet dataset [7]. Each
image undergoes a grayscale conversion and is treated as a pure phase object.
Then, we simulate the image under a fixed defocus distance $z$ randomly
selected between $0.1\mu$m and $3\mu$m. For the simulation, we use the Fresnel
propagator for each wavelength ranging from $400$nm to $700$nm, discretizing
with $6$nm increments. For each increment, the source is viewed as a coherent
plane wave. Since the quantum efficiency of the sensor influences the signal
captured by the detector, we simulate a Gaussian distribution for each channel
centered at $\lambda_{r}=630$nm, $\lambda_{g}=550$nm, and $\lambda_{b}=450$nm.
The quantum efficiency of each component is modeled by:

$Q_{c}(\lambda)=e^{-\frac{(\lambda-\lambda_{c})^{2}}{2\sigma_{c}^{2}}}$

where $\sigma_{c}$ is a parameter representing the sensitivity of the sensor
to the corresponding wavelength. Finally, each component is calculated as:

$I_{c}(x,y;z)=\frac{1}{W}\sum_{i=1}^{W}Q_{c}(\lambda_{i})I(x,y;z,\lambda_{i}),$

where $c$ denotes the respective channel. Finally, white Gaussian noise is
added to the image to simulate the noise in the real acquisitions. This
procedure allows us to construct a dataset of polychromatic acquisitions along
with the correspondent phase of the images. We can use this dataset to train a
deep learning model for phase reconstruction. Our methodology is based on
diffusion models and explained in Sections 3.3 and 3.4.

###  3.3 Conditional Denoising Diffusion Probabilistic Models

Phase recovery is considered ill-posed, meaning that a given acquisition may
be consistent with multiple different phases. Hence, we frame the problem as
an instance of conditioned sampling, which takes explicitly into account the
uncertainty of the recovery. Suppose we have access to a dataset of input-
output pairs, denoted as $\mathcal{D}=\\{(X_{i},Y_{i})\\}_{i=1}^{N}$. We model
these samples as coming from an unknown joint distribution
$q_{\text{data}}(X,Y)$. In our context, $X$ corresponds to a sample drawn from
polychromatic image acquisition, and $Y$ corresponds to the phase of the
image.

Our objective then becomes to learn an approximate way of sampling $Y\sim
q_{\text{data}}(\cdot|X)$, for any given $X$. To do this we propose the use of
Conditional Variational Diffusion Models (CVDM) [20]. In this framework, the
basic setup is the existence of a forward process $\\{Y_{t}\\}_{t\in[0,T]}$,
where $Y_{0}\sim q_{\text{data}}(\cdot|X)$ and the evolution of the process is
given by the following stochastic differential equation (SDE) [33]:

$dY_{t}=-\frac{1}{2}\beta(t,X)Y_{t}dt+\sqrt{\beta(t,X)}dW_{t},$ (4)

where $\beta(t,X)$ is a variance schedule function. The intuitive idea is that
noise is gradually added to an initial sample $Y_{0}\sim
q_{\text{data}}(\cdot|X)$, such that $Y_{T}$ at the end of the process is
close to a $\mathcal{N}(0,I)$ variable. For this process, we denote the
density at time $t$ by $q_{t}(\cdot|X)$. The interesting part is learning to
(approximately) reverse this forward process. This gives rise to a reverse
process $\\{Z_{t}\\}_{t\in[0,T]}$, whose density at time $t$ we denote by
$p_{t}(\cdot|X)$, where the idea is to have $p_{t}\approx q_{T-t}$.

Specifically, the reverse process starts with $p_{0}(\cdot|X)=q_{T}(\cdot|X)$.
It is known that $q_{T}$ approximates a $\mathcal{N}(0,I)$ distribution, so
this step is usually implemented as $Z_{0}\sim\mathcal{N}(0,I)$. After
sampling $Z_{0}$, the reverse dynamics (given by a different SDE) are
simulated until we get $Z_{T}\sim p_{T}(\cdot|X)\approx
q_{\text{data}}(\cdot|X)$. This can be done in different ways [10, 33],
usually via a score or noise-prediction model. In CVDM, a noise-prediction
model is learned, and the reverse process is simulated via ancestral sampling
[20].

We now explain the way in which CVDM learns and simulates the reverse process.
Given equation (4) it can be shown [20] that the process $\\{Y_{t}\\}$
conditioned on $Y_{0}$ evolves such that

$q_{t}(\cdot|Y_{0}=Y,X)=\mathcal{N}\left(\sqrt{\gamma(t,X)}Y,(1-\gamma(t,X))I\right),$
(5)

where $\gamma(t,X)=e^{-\int_{0}^{t}\beta(s,X)ds}$. Here, $\gamma$ is also
referred to as a variance schedule function. It captures the longer-term
dynamics of the forward process, while $\beta$ controls the instantaneous rate
of change according to (4). Interestingly, for any $s<t$ we have that
$q_{t}(\cdot|Y_{s}=y_{s},X)$ is also normally distributed, and Bayes’ theorem
implies that the posterior distribution is a Gaussian too [12, 20]:

$\displaystyle q_{s}(\cdot|Y_{t}=y_{t},Y_{0}=Y,X)$
$\displaystyle=\mathcal{N}\Big{(}\alpha(y_{t},Y,s,t,X),\sigma(s,t,X)I\Big{)}$
(6) for $s<t$. The functions $\alpha$ and $\sigma$ are known and have an
explicit form in terms of the schedule functions $\beta$ and $\gamma$. In
CVDM, this motivates the modeling of the reverse process such that
$\displaystyle p_{T-s}(\cdot|Z_{T-t}=y_{t},X)$
$\displaystyle=\mathcal{N}\Big{(}\alpha(y_{t},Y_{\nu},s,t,X),\sigma(s,t,X)I\Big{)}$
(7)

for $s<t$. The only difference between (6) and (7) is that $Y$ is unavailable
in (7) and hence replaced by a learned model $Y_{\nu}(y_{t},t,X)$. Equation
(7) is the key tool used in CVDM to simulate the reverse process. Concretely,
first a partition $(t_{0},\ldots,t_{N})$ of $[0,T]$ is chosen. Then,
$Z_{0}\sim\mathcal{N}(0,I)$ is sampled. Finally, equation (7) is used to
iteratively sample $Z_{t_{i+1}}$ given $Z_{t_{i}}$, until getting
$Z_{T}=Z_{t_{N}}$.

The main thing left to explain is how the predictor $Y_{\nu}$ is trained.
First, notice that equation (5) leads to the following parameterization.
Conditioned on $Y_{0}=Y$, the variable $Y_{t}$ can be written as

$Y_{t}(Y,\varepsilon)=\sqrt{\gamma(t,X)}Y+\sqrt{1-\gamma(t,X)}\varepsilon\>\>\>\text{with}\>\>\>\varepsilon\sim\mathcal{N}(0,I).$
(8)

A natural approach to learn $Y_{\nu}$ is to maximize the log-likelihood term
$\mathbb{E}_{(X,Y)\sim q_{\text{data}}}\left[p_{T}(Y|X)\right]$. CVDM and
other diffusion models use a variational lower bound to get a more tractable
expression. In the end, a diffusion loss term is obtained, which after some
simplification corresponds to [20]:

$\mathcal{L}_{\text{diff}}(X,Y)=\frac{1}{2}\mathbb{E}_{\varepsilon\sim\mathcal{N}(0,I),t\in\text{Unif}([0,T])}\left[\left\lVert
Y-Y_{\nu}(Y_{t}(Y,\varepsilon),t,X)\right\rVert_{2}^{2}\right].$

This essentially measures how well we can guess $Y$ given the value of
$Y_{t}$, when the process starts from $Y_{0}=Y$. The goal then becomes to
minimize $\mathbb{E}_{(X,Y)\sim
q_{\text{data}}}\left[\mathcal{L}_{\text{diff}}(X,Y)\right]$. Experimental
results [10] show that re-parameterizing the model to guess the Gaussian noise
$\varepsilon$ improves accuracy. Hence, CVDM learns a noise-prediction model
$\varepsilon_{\nu}$, using a loss term $\mathcal{L}_{\text{noise}}$
essentially equivalent to $\mathcal{L}_{\text{diff}}$.

A key advantage of CVDM in comparison to SR3 [30] and other conditioning
diffusion methods [8] is that it allows for automatically learning the
schedule functions. This avoids the need to fine-tune $\beta$ and $\gamma$ by
hand, which is costly. However, learning these functions means ensuring some
basic properties, which are encoded in a $\mathcal{L}_{\beta}(X)$ loss term.
An additional loss term $\mathcal{L}_{\text{prior}}(X,Y)$ is used to ensure
$q_{T}$ is as similar as possible to a $\mathcal{N}(0,I)$ variable. Finally, a
regularization term $\mathcal{L}_{\gamma}(X)$ is needed to avoid pathological
schedules. The final loss function used in CVDM is hence given by

$\mathcal{L}_{\text{CVDM}}=\mathbb{E}_{(X,Y)\sim
q_{\text{data}}}\left[\mathcal{L}_{\beta}(X)+\mathcal{L}_{\text{prior}}(X,Y)+\mathcal{L}_{\text{noise}}(Y,X)+a\mathcal{L}_{\gamma}(X)\right],$

where $a$ is the weight of the regularization term $\mathcal{L}_{\gamma}$. In
practice, a Monte Carlo estimator of $\mathcal{L}_{\text{CVDM}}$ is optimized
by using the available $\\{(X_{i},Y_{i})\\}_{i=1}^{N}$ samples. For more
details, please see Appendix B.

###  3.4 Zero-Mean Diffusion

A standard practice in diffusion models is to normalize all data to the
$[-1,1]$ interval. This improves numerical stability but becomes an issue for
quantitative imaging, because the reconstructed data loses direct physical
interpretation. In this work, we propose an alternative to normalization
called Zero-Mean Diffusion (ZMD) which avoids this problem and has an
interesting theoretical basis.

Concretely, we use a simple regression model to learn the expected value of
the sample data, in conjunction with a diffusion model to predict the
difference between the regression model and the actual sample. This type of
strategy has been used before, with several works showing that modeling
residuals instead of the full objective can be simpler and lead to better
results [15, 42]. In addition, theoretical analysis suggests a deeper reason
for the high reconstruction quality achieved by ZMD.

As explained in Section 3.3, we are interested in sampling from a conditional
distribution $q_{\text{data}}(\cdot|X)$. The approach via diffusion models is
to define a stochastic forward process $\\{Y_{t}\\}_{t\in[0,T]}$, which
evolves according to (4) and such that
$q_{0}(\cdot|X)=q_{\text{data}}(\cdot|X)$. The forward process can be
approximately reversed, by starting at $Z_{0}\sim p_{0}(\cdot|X)$ with
$p_{0}=\mathcal{N}(0,I)\approx q_{T}$, and then simulating the reverse
dynamics until we get $Z_{T}\sim p_{T}(\cdot|X)$ with $p_{T}\approx
q_{0}=q_{\text{data}}$, which is the distribution of interest.

We now formally describe ZMD. We define a new stochastic (forward) process
$\big{\\{}\tilde{Y}_{t}\big{\\}}$ given by $\tilde{Y}_{t}=Y_{t}-\mu_{t}$ for
$t\in[0,T]$ where $\mu_{t}=\mathbb{E}_{q_{t}(\cdot|X)}\left[Y_{t}\right]$ is
the expected value of $Y_{t}$. Notice that, similar to our convention with
$Y_{t}$ and $Z_{t}$, we omit explicit reference to $X$ when talking about
$\tilde{Y}_{t}$ and $\mu_{t}$. We do this to simplify notation, since the
conditioning data $X$ remains fixed. An important property of the centered
process $\big{\\{}\tilde{Y}_{t}\big{\\}}$ is that it also evolves according to
(4).

######  Proposition 1.

The process $\big{\\{}\tilde{Y}_{t}\big{\\}}$ given by
$\tilde{Y}_{t}=Y_{t}-\mu_{t}$ evolves according to the following SDE:

$d\tilde{Y}_{t}=-\frac{1}{2}\beta(t,X)\tilde{Y}_{t}dt+\sqrt{\beta(t,X)}dW_{t}.$
(9)

The proof can be found in Appendix C. Proposition 1 provides an alternative
sampling scheme for $q_{0}(\cdot|X)$ via diffusion models. The idea is to use
CVDM as outlined in the previous section, but applied now to the
$\big{\\{}\tilde{Y}_{t}\big{\\}}$ process. We use analogous notation for this
version of the method, so that $\tilde{q}_{t}(\cdot|X)$ denotes the density
for this process at time $t$. Our main goal is learning to simulate a reverse
process $\big{\\{}\tilde{Z}_{t}\big{\\}}$, characterized at time $t$ by a
density $\tilde{p}_{t}(\cdot|X)$ and where the key property is
$\tilde{p}_{t}\approx\tilde{q}_{T-t}$.

Proposition 1 guarantees that the dynamics of
$\big{\\{}\tilde{Y}_{t}\big{\\}}$ are exactly the same as those of
$\\{Y_{t}\\}$, which means CVDM can be theoretically implemented in the same
way as before, that is, by using the same parameterization and minimizing the
loss function $\mathcal{L}_{\text{CVDM}}$. Nonetheless, there is an important
caveat. As described in the previous section, in practice a Monte Carlo
estimator of $\mathcal{L}_{\text{CVDM}}$ is minimized by using the available
$\\{(X_{i},Y_{i})\\}_{i=1}^{N}$ samples. For ZMD, the Monte Carlo estimator
would need access to $\\{(X_{i},Y_{i}-\mu_{0})\\}_{i=1}^{N}$ samples. Hence,
ZMD needs the value of $\mu_{0}$, or at least a good estimate.

Our solution is to define a learnable function $\mu_{\theta}(X)$ to
approximate $\mu_{0}$. To make sure the approximation is accurate, we use the
following loss term

$\mathcal{L}_{\text{mean}}=\mathbb{E}_{(X,Y)\sim
q_{\text{data}}}\left[\left\lVert
Y-\mu_{\theta}(X)\right\rVert_{2}^{2}\right]$

This term is now included in the full ZMD loss function, given by

$\mathcal{L}_{\text{ZMD}}=\mathcal{L}_{\text{CVDM}}+\omega\mathcal{L}_{\text{mean}},$
(10)

where $\omega$ controls the relative weights of the terms. For
$\mathcal{L}_{\text{mean}}$, the expected value is calculated with respect to
$(X,Y)\sim q_{\text{data}}$. On the other hand, for
$\mathcal{L}_{\text{CVDM}}$ the expected value is with respect to
$(X,\tilde{Y})\sim\tilde{q}_{\text{data}}$, where $\tilde{q}_{\text{data}}$
represents the distribution of $(X,Y-\mu_{0})$. This is because CVDM is now
learning to reverse the centered process $\big{\\{}\tilde{Y}_{t}\big{\\}}$. In
practice, we optimize over many iterations. For each one, we simulate
$(X,\tilde{Y})\sim\tilde{q}_{\text{data}}$ by sampling $(X,Y)$ from our
dataset, and setting $\tilde{Y}=Y-\mu_{\theta}(X)$. As $\mu_{\theta}$
improves, this procedure becomes increasingly better at approximating the
sampling we need.

Once all models have been trained, we can use ZMD to approximately sample from
$q_{0}(\cdot|X)=q_{\text{data}}(\cdot|X)$ by following an almost identical
procedure as that of standard CVDM:

  1. 1.

Equation (9) implies $\tilde{q}_{T}\approx\mathcal{N}(0,I)$. Hence, a good
approximation for $\tilde{p}_{0}$ is $\mathcal{N}(0,I)$.

  2. 2.

After choosing a time discretization $(t_{0},\ldots,t_{N})$ of the $[0,T]$
interval, equation (7) can be used used to iteratively sample
$\tilde{Z}_{t_{i+1}}$ given $\tilde{Z}_{t_{i}}$, until getting
$\tilde{Z}_{T}=\tilde{Z}_{t_{N}}$. If the noise-prediction model
$\tilde{\varepsilon}_{\nu}$ is accurate, then it holds that
$\tilde{Z}_{T}\sim\tilde{p}_{T}$ with $\tilde{p}_{T}\approx\tilde{q}_{0}$.

The previous two steps produce a sample
$\tilde{Z}_{T}\mathrel{\dot{\sim}}\tilde{q}_{0}$. To get an (approximate)
sample from the distribution of interest $q_{0}(\cdot|X)$, we compute
$\tilde{Z}_{T}+\mu_{\theta}(X)$. This can be understood intuitively. Since
$\mu_{0}$ (or its estimate $\mu_{\theta}$) is subtracted at the start of the
forward process, it needs to be added back at the end of the reverse process.
For the mathematical formalization of this idea, please see Appendix C.

As shown in Section 4, ZMD works very well as an alternative to the standard
practice of normalizing data to the $[-1,1]$ interval. Hence, it provides a
robust way of using diffusion models for quantitative data. Besides these
strong empirical results, there is a deeper theoretical consideration
underlying the performance of ZMD. To explain this, we will use
$\tilde{p}_{T}^{\mu_{0}}$ to denote the distribution of the random variable
$\tilde{Z}_{T}+\mu_{0}$ where $\tilde{Z}_{T}\sim\tilde{p}_{T}$.

Standard CVDM (Section 3.3) can be used to sample from a distribution $p_{T}$,
while ZMD can be used to sample from a distribution $\tilde{p}_{T}^{\mu_{0}}$.
Both $p_{T}$ and $\tilde{p}_{T}^{\mu_{0}}$ should approximate
$q_{0}(\cdot|X)=q_{\text{data}}(\cdot|X)$, so it is natural to ask which
method leads to a better approximation. To answer this question, we could
compare $D_{\text{KL}}(q_{0}||p_{T})$ with
$D_{\text{KL}}(q_{0}||\tilde{p}_{T}^{\mu_{0}})$. While these divergences
cannot be computed analytically, there are known upper bounds for them, which
we denote $M(p_{T})$ and $M(\tilde{p}_{T}^{\mu_{0}})$, respectively. Our main
theoretical result is that the upper bound for ZMD is always better.

######  Theorem 1.

For the stochastic processes as defined in Sections 3.3 and 3.4, and for any
distribution $q_{0}$, it holds that $M(\tilde{p}_{T}^{\mu_{0}})\leq M(p_{T})$.

The proof can be found in Appendix C. We conjecture that this theoretical
advantage of using a centered forward process may be one of the reasons for
the good performance we get when using ZMD. Notice that this only holds if we
have access to an accurate model $\mu_{\theta}$ of $\mu_{0}$.

##  4 Results

To evaluate our model, we conduct three distinct experiments. First, we
generate a set of synthetic samples analogous to those in the training set.
Second, we acquire four through-focus stacks (which allow us to compute a
ground truth) and subsequently test our method on these images. Finally, we
use an uncurated clinical dataset comprised of real-world clinical images.
While ground truth data is unavailable for this dataset, we compare our
results with reference values reported in the literature. For the first two
experiments, we include 2-shot acquisition methods as additional reference
values.

###  4.1 Synthetic Images

To validate the model’s performance, we first estimate the phase with images
using the HCOCO [6] dataset. Table 1(a) shows the results, and Figure 2(a)
shows a qualitative comparison of the methods.

((a)) QPI methods assessed using synthetic images from HCOCO.

((b)) QPI methods assessed using clinical images. Scale bar (upper leftmost
image) is 50 $\mu$m.

Figure 2: Comparison of QPI methods. In each subfigure, from left to right:
defocused image at distance $d$ ($I_{d}$) with corresponding ground truth (GT)
below; reconstructions and error images follow. Table 1: Performance metrics
for QPI Synthetic HCOCO and QPI Through-Focus Brightfield Images. “2s” stands
for the 2-shot modality (using two images to measure the phase), while “p”
stands for the polychromatic (single exposure) modality.

((a)) Performance metrics for Synthetic HCOCO. Metric / Model | US TIE (2-shot) | US TIE (polychrom) | ZMD (2-shot) | ZMD (polychrom)
---|---|---|---|---
MS-SSIM ($\uparrow$) | 0.907 | 0.810 | 0.940 | 0.968
MAE ($\downarrow$) | 0.110 | 0.143 | 0.079 | 0.059

((b)) MS-SSIM on Through-Focus Brightfield Images.  Sample | US TIE (2s) | US TIE (p) | ZMD (2s) | ZMD (p)
---|---|---|---|---
1 | 0.610 | 0.651 | 0.910 | 0.823
2 | 0.625 | 0.781 | 0.862 | 0.891
3 | 0.739 | 0.676 | 0.811 | 0.883
4 | 0.783 | 0.744 | 0.752 | 0.864

((c)) MAE on Through-Focus Brightfield Images. Sample | US TIE (2s) | US TIE (p) | ZMD (2s) | ZMD (p)
---|---|---|---|---
1 | 0.199 | 0.098 | 0.042 | 0.080
2 | 0.268 | 0.066 | 0.057 | 0.053
3 | 0.181 | 0.128 | 0.107 | 0.097
4 | 0.178 | 0.104 | 0.104 | 0.095

###  4.2 Through-focus Images

We evaluate our method using four stacks of clinical urine microscopy samples,
each one being a through-focus acquisition. The ground truth phase is
determined by computing $\partial I(x,y;z)/\partial z$ using a 20th-order
polynomial fit for each pixel in the stack, as described in [35]. This fitting
is performed at distances $d=\pm 2k\mu$m, with $k$ ranging from 1 to 20. The
gradient of the polynomial is then used to apply US TIE [44] to generate
ground truth data. We compare our polychromatic method, using a defocus
distance of $z=2\mu$m, to the 2-shot ZMD and US TIE methods, evaluated at
defocus distances of $z=\pm 2\mu$m. The diffusion models were tested in a
zero-shot scenario using synthetic experiments. Figures 2(b) and 5(b) show the
reconstruction for all stacks, while Tables 1(b) and 1(c) show the MS-SSIM and
MAE scores for each sample and method, with sample numbers corresponding to
the rows in the figures. The first two correspond to Figure 2(b), and the next
two correspond to Figure 5(b).

###  4.3 Clinical microscopy dataset

To evaluate the applicability of our proposed methodology to a real-world
clinical context, we conduct experiments using the Urinary Tract Infection
(UTI) dataset as outlined in [17]. The images in this dataset were acquired
for UTI patient condition evaluation in a point-of-care clinical setting.
Image acquisition was performed using an Olympus BX41F microscope frame, U-5RE
quintuple nosepiece, U-LS30 LED illuminator, U-AC Abbe condenser, and two
types of objectives an Olympus Plan 20x/0.40 Infinity/0.17 (used in Figure 7)
and a UPlanFL N 20x/0.5 UIS2 Infinity/0.17/OFN26.5 (used in Figures 2(b), 3, 4
5(b), 6). Polychromatic images were taken with a commercially available
digital scientific 16-bit color camera (Infinity 3S-1UR, Teledyne Lumenera)
connected to the frame of the microscope using a 0.5x C-mount adapter. We
calculate the phase on images with both a small and a high number of objects.
Figure 3 shows the phase quantification performed by our model. Figure 4 shows
the reconstruction for red blood cells using three different polychromatic
methods: US TIE, Mean Prediction (essentially, the regression part of ZMD
without the residual prediction), and ZMD. Crucially, our quantitative results
are consistent with the values reported in the literature [27, 24].

Figure 3: Phase quantification performed on clinical images. Regions of the
images are enlarged to better show the objects in the image. Scale bar (upper
leftmost image) is 200 $\mu$m. Figure 4: Urine sample with red blood cells.
From left to right: US TIE phase reconstruction, Mean Prediction, and Zero-
Mean Diffusion prediction. Regions of the image are enlarged to better show
reconstruction details. Phase reconstructions are quantitative, with values
between 0 and 2.5 radians.

##  5 Discussion

Our method was tested in two modalities, 2-shot and polychromatic. In the
latter modality, Zero-Mean Diffusion (ZMD) shows considerably better
performance than US TIE (see Tables 1 and 2(b)). This significant improvement
highlights the direct applicability of ZMD in clinical settings. We used two
microscopes with different objectives to validate our findings, ensuring
robustness across various optical systems. Figures 2(b), 3, 4 5(b), 6 uses a
UPlanFL N 20x/0.5 UIS2 Infinity/0.17/OFN26.5 objective and Figure 7 use a an
Olympus Plan 20x/0.40 Infinity/0.17 objective.

The primary reason for the improvement over the traditional 2-shot modality is
the model’s ability to use the three measurements provided by the RGB camera.
We hypothesize that access to three instead of the usual two measurements
enables the model to handle the noise better. The additional measurement
offers a way to estimate the through-focus gradient more reliably, allowing
the model to distinguish signal from noise and enhance overall image quality
more effectively.

As expected, US TIE leads to the presence of cloud artifacts in the
reconstructions, as can be seen in Figures 2(b) and 4. On the other hand, one
disadvantage observed for our method is that polychromatic acquisitions
introduce spatial and temporal incoherence, leading to some blurring of image
details (for instance, see Figure 2(b)). This is a trade-off for the improved
noise handling and overall performance gains observed with the polychromatic
modality. Despite this, the clinical applicability and robustness of ZMD in
diverse imaging conditions showcase its potential as a valuable tool in
medical imaging.

##  6 Conclusions

We present a novel method for reliably quantifying phase using chromatic
aberrations rather than a purposely acquired through-focus stack. To solve
this problem, we apply a denoising diffusion model designed for quantitative
tasks. We show that this technique achieves high accuracy using a standard
microscope frame with an RGB (color) camera, and our method’s applicability is
validated on clinical samples. As all necessary hardware is commercially
available and commonly present in clinical microscopy setups, our approach
holds significant promise for real-world clinical adoption.

The success of using deep learning for phase estimation can be extended in the
future to the application of Physics-Informed Neural Networks (PINNs) to solve
the Helmholtz equation, which models the diffraction phenomenon, without
relying on the paraxial approximation. PINNs can provide a more accurate and
comprehensive representation of wave propagation, thereby helping to address
current limitations and enabling the generation of more realistic simulations
of the physical phenomenon.

## References

  * [1] Emmanuel Ahishakiye et al.  “A survey on deep learning in medical image reconstruction”  In _Intelligent Medicine_ 1.3 Elsevier BV, 2021, pp. 118–127  DOI: 10.1016/j.imed.2021.03.003
  * [2] J Benton, VD Bortoli, A Doucet and G Deligiannidis  “Nearly d-linear convergence bounds for diffusion models via stochastic localization”  In _The Twelfth International Conference on Learning Representations_ OpenReview, 2024
  * [3] Emrah Bostan et al.  “Variational Phase Imaging Using the Transport-of-Intensity Equation”  In _IEEE Transactions on Image Processing_ 25.2 Institute of ElectricalElectronics Engineers (IEEE), 2016, pp. 807–817  DOI: 10.1109/tip.2015.2509249
  * [4] Hyungjin Chung and Jong Chul Ye  “Score-based diffusion models for accelerated MRI”, 2022  arXiv:2110.05243 [eess.IV]
  * [5] Hyungjin Chung et al.  “Diffusion Posterior Sampling for General Noisy Inverse Problems”, 2023  arXiv:2209.14687 [stat.ML]
  * [6] Wenyan Cong et al.  “Image Harmonization Dataset iHarmony4: HCOCO, HAdobe5k, HFlickr, and Hday2night”  arXiv, 2019  DOI: 10.48550/ARXIV.1908.10526
  * [7] Jia Deng et al.  “ImageNet: A large-scale hierarchical image database”  In _2009 IEEE Conference on Computer Vision and Pattern Recognition_ IEEE, 2009  DOI: 10.1109/cvpr.2009.5206848
  * [8] Prafulla Dhariwal and Alex Nichol  “Diffusion Models Beat GANs on Image Synthesis” arXiv:2105.05233 [cs, stat]  arXiv, 2021  DOI: 10.48550/arXiv.2105.05233
  * [9] Giulio Franzese et al.  “How Much Is Enough? A Study on Diffusion Times in Score-Based Generative Models”  In _Entropy_ 25.4, 2023  DOI: 10.3390/e25040633
  * [10] Jonathan Ho, Ajay Jain and Pieter Abbeel  “Denoising Diffusion Probabilistic Models”  In _Advances in Neural Information Processing Systems_ 33 Curran Associates, Inc., 2020, pp. 6840–6851  URL: https://proceedings.neurips.cc/paper/2020/hash/4c5bcfec8584af0d967f1ab10179ca4b-Abstract.html
  * [11] I. Karatzas and S. Shreve  “Brownian Motion and Stochastic Calculus”, Graduate Texts in Mathematics (113) (Book 113)  Springer New York, 1991  URL: https://books.google.co.uk/books?id=ATNy_Zg3PSsC
  * [12] Diederik Kingma, Tim Salimans, Ben Poole and Jonathan Ho  “Variational diffusion models”  In _Advances in neural information processing systems_ 34, 2021, pp. 21696–21707
  * [13] Jaakko Lehtinen et al.  “Noise2Noise: Learning Image Restoration without Clean Data”, 2018  arXiv:1803.04189 [cs.CV]
  * [14] Disen Li et al.  “A comprehensive survey on deep learning techniques in CT image quality improvement”  In _Medical & Biological Engineering & Computing_ 60.10 Springer ScienceBusiness Media LLC, 2022, pp. 2757–2770  DOI: 10.1007/s11517-022-02631-y
  * [15] Haoying Li et al.  “SRDiff: Single Image Super-Resolution with Diffusion Probabilistic Models” arXiv: 2104.14951  In _arXiv:2104.14951 [cs]_ , 2021  URL: http://arxiv.org/abs/2104.14951
  * [16] Xin Li et al.  “Diffusion Models for Image Restoration and Enhancement – A Comprehensive Survey”, 2023  arXiv:2308.09388 [cs.CV]
  * [17] Natasha Liou et al.  “A clinical microscopy dataset to develop a deep learning diagnostic test for urinary tract infection”  In _Scientific Data_ 11, 2024, pp. 155  DOI: 10.1038/s41597-024-02975-0
  * [18] Andreas Lugmayr et al.  “RePaint: Inpainting using Denoising Diffusion Probabilistic Models”  In _2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_ IEEE, 2022  DOI: 10.1109/cvpr52688.2022.01117
  * [19] Michael Lustig, David Donoho and John M. Pauly  “Sparse MRI: The application of compressed sensing for rapid MR imaging”  In _Magnetic Resonance in Medicine_ 58.6, 2007, pp. 1182–1195  DOI: 10.1002/mrm.21391
  * [20] Gabriel Maggiora et al.  “Conditional Variational Diffusion Models”, 2024  arXiv:2312.02246 [cs.CV]
  * [21] Gabriel della Maggiora et al.  “DeepSPIO: Super Paramagnetic Iron Oxide Particle Quantification Using Deep Learning in Magnetic Resonance Imaging”  In _IEEE Transactions on Pattern Analysis and Machine Intelligence_ 44.1 Institute of ElectricalElectronics Engineers (IEEE), 2022, pp. 143–153  DOI: 10.1109/tpami.2020.3012103
  * [22] Christopher A. Metzler, Philip Schniter, Ashok Veeraraghavan and Richard G. Baraniuk  “prDeep: Robust Phase Retrieval with a Flexible Deep Network”, 2018  arXiv:1803.00212 [stat.ML]
  * [23] Nobuharu Nakajima  “Phase-retrieval system using a shifted Gaussian filter”  In _Journal of the Optical Society of America A_ 15.2 Optica Publishing Group, 1998, pp. 402  DOI: 10.1364/josaa.15.000402
  * [24] Tan H. Nguyen et al.  “Halo-free Phase Contrast Microscopy”  In _Scientific Reports_ 7.1 Springer ScienceBusiness Media LLC, 2017  DOI: 10.1038/srep44034
  * [25] Frank Nielsen  “On the Kullback-Leibler divergence between location-scale densities”  In _arXiv preprint arXiv:1904.10428_ , 2019
  * [26] D. Paganin and K.. Nugent  “Noninterferometric Phase Imaging with Partially Coherent Light”  In _Phys. Rev. Lett._ 80 American Physical Society, 1998, pp. 2586–2589  DOI: 10.1103/PhysRevLett.80.2586
  * [27] Han Sang Park et al.  “Quantitative phase imaging of erythrocytes under microfluidic constriction in a high refractive index medium reveals water content changes”  In _Microsystems & Nanoengineering_ 5.1 Springer ScienceBusiness Media LLC, 2019  DOI: 10.1038/s41378-019-0113-y
  * [28] YongKeun Park, Christian Depeursinge and Gabriel Popescu  “Quantitative phase imaging in biomedicine” Number: 10 Publisher: Nature Publishing Group  In _Nature Photonics_ 12.10, 2018, pp. 578–589  DOI: 10.1038/s41566-018-0253-x
  * [29] Yair Rivenson et al.  “PhaseStain: the digital staining of label-free quantitative phase microscopy images using deep learning” Number: 1 Publisher: Nature Publishing Group  In _Light: Science & Applications_ 8.1, 2019, pp. 23  DOI: 10.1038/s41377-019-0129-y
  * [30] Chitwan Saharia et al.  “Image Super-Resolution via Iterative Refinement”, 2021  arXiv:2104.07636 [eess.IV]
  * [31] Chitwan Saharia et al.  “Palette: Image-to-Image Diffusion Models”  In _Special Interest Group on Computer Graphics_ Vancouver BC Canada: ACM, 2022, pp. 1–10  DOI: 10.1145/3528233.3530757
  * [32] Bruno Sixou, Valentina Davidoiu, Max Langer and Francoise Peyrin  “Absorption and phase retrieval with Tikhonov and joint sparsity regularizations”  In _Inverse Problems &; Imaging_ 7.1 American Institute of Mathematical Sciences (AIMS), 2013, pp. 267–282  DOI: 10.3934/ipi.2013.7.267
  * [33] Yang Song et al.  “Score-Based Generative Modeling through Stochastic Differential Equations” arXiv: 2011.13456  In _arXiv:2011.13456 [cs, stat]_ , 2021  URL: http://arxiv.org/abs/2011.13456
  * [34] Michael Reed Teague  “Deterministic phase retrieval: a Green’s function solution”  In _J. Opt. Soc. Am._ 73.11 Optica Publishing Group, 1983, pp. 1434–1441  DOI: 10.1364/JOSA.73.001434
  * [35] Laura Waller, Lei Tian and George Barbastathis  “Transport of Intensity phase-amplitude imaging with higher order intensity derivatives”  In _Opt. Express_ 18.12 Optica Publishing Group, 2010, pp. 12552–12561  DOI: 10.1364/OE.18.012552
  * [36] Laura Waller, Shan Shan Kou, Colin J.. Sheppard and George Barbastathis  “Phase from chromatic aberrations” Publisher: Optica Publishing Group  In _Optics Express_ 18.22, 2010, pp. 22817–22825  DOI: 10.1364/OE.18.022817
  * [37] Kaiqiang Wang et al.  “On the use of deep learning for phase recovery” Number: 1 Publisher: Nature Publishing Group  In _Light: Science & Applications_ 13.1, 2024, pp. 4  DOI: 10.1038/s41377-023-01340-x
  * [38] Xiaofeng Wu et al.  “Physics-informed neural network for phase imaging based on transport of intensity equation” Publisher: Optica Publishing Group  In _Optics Express_ 30.24, 2022, pp. 43398–43416  DOI: 10.1364/OE.462844
  * [39] Artur Yakimovich et al.  “Label-free digital holo-tomographic microscopy reveals virus-induced cytopathic effects in live cells”  In _MSphere_ 3.6 Am Soc Microbiol, 2018, pp. 10–1128
  * [40] Qinqin Yang et al.  “Physics-Driven Synthetic Data Learning for Biomedical Magnetic Resonance: The imaging physics-based data synthesis paradigm for artificial intelligence”  In _IEEE Signal Processing Magazine_ 40.2, 2023, pp. 129–140  DOI: 10.1109/MSP.2022.3183809
  * [41] Qinqin Yang et al.  “Physics-Driven Synthetic Data Learning for Biomedical Magnetic Resonance: The imaging physics-based data synthesis paradigm for artificial intelligence”  In _IEEE Signal Processing Magazine_ 40.2 Institute of ElectricalElectronics Engineers (IEEE), 2023, pp. 129–140  DOI: 10.1109/msp.2022.3183809
  * [42] Ruihan Yang, Prakhar Srivastava and Stephan Mandt  “Diffusion Probabilistic Modeling for Video Generation” arXiv:2203.09481 [cs, stat]  arXiv, 2022  DOI: 10.48550/arXiv.2203.09481
  * [43] Thomas A Zangle and Michael A Teitell  “Live-cell mass profiling: an emerging approach in quantitative biophysics”  In _Nature methods_ 11.12 Nature Publishing Group US New York, 2014, pp. 1221–1228
  * [44] Jialin Zhang et al.  “On a universal solution to the transport-of-intensity equation” Publisher: Optica Publishing Group  In _Optics Letters_ 45.13, 2020, pp. 3649–3652  DOI: 10.1364/OL.391823
  * [45] Yuhe Zhang et al.  “PhaseGAN: a deep-learning phase-retrieval approach for unpaired datasets” Publisher: Optica Publishing Group  In _Optics Express_ 29.13, 2021, pp. 19593–19604  DOI: 10.1364/OE.423222
  * [46] Yunhui Zhu et al.  “Low-noise phase imaging by hybrid uniform and structured illumination transport of intensity equation” Publisher: Optica Publishing Group  In _Optics Express_ 22.22, 2014, pp. 26696–26711  DOI: 10.1364/OE.22.026696
  * [47] Chao Zuo et al.  “Lensless phase microscopy and diffraction tomography with multi-angle and multi-wavelength illuminations using a LED matrix”  In _Optics Express_ 23.11 The Optical Society, 2015, pp. 14314  DOI: 10.1364/oe.23.014314
  * [48] Chao Zuo et al.  “Transport of intensity equation: a tutorial”  In _Optics and Lasers in Engineering_ 135, 2020, pp. 106187  DOI: 10.1016/j.optlaseng.2020.106187
  * [49] Chao Zuo et al.  “Transport of intensity phase retrieval and computational imaging for partially coherent fields: The phase space perspective”  In _Optics and Lasers in Engineering_ 71, 2015, pp. 20–32  DOI: 10.1016/j.optlaseng.2015.03.006
  * [50] Chao Zuo, Qian Chen, Yingjie Yu and Anand Asundi  “Transport-of-intensity phase imaging using Savitzky-Golay differentiation filter - theory and applications”  In _Optics Express_ 21.5 The Optical Society, 2013, pp. 5346  DOI: 10.1364/oe.21.005346

##  Appendix A Solving the Transport-of-Intensity Equation

As explained in Section 2, the Transport-of-Intensity Equation (TIE)
establishes a connection between the rate of change of the image in the
propagation direction and the lateral phase gradient, a connection summarized
in equation (1). This equation can be solved for the phase $\varphi$ by
assuming certain properties of the intensity pattern $I$. The simplest case is
to consider a pure phase (non-absorptive) object under constant illumination
$I_{0}$. Then, the in-focus intensity image is given by $I(x,y;z=0)=I_{0}$. In
this case, it is possible to solve the equation by employing a pair of Fourier
transforms:

$\varphi=\mathcal{F}^{{-}1}\bigg{\\{}\frac{1}{4\pi^{2}(k_{x}^{2}+k_{y}^{2})}\mathcal{F}\bigg{\\{}\frac{-k}{I_{0}}\frac{\partial
I(x,y;z)}{\partial z}\bigg{\\}}\bigg{\\}},$

where $k_{x}$ and $k_{y}$ denote the spatial coordinates in the Fourier space.
For a general absorptive object, $I(x,y;z)$ is not a constant and it is
necessary to use Teague’s assumption to obtain a solution:

$\varphi=-k\nabla^{-2}\bigg{\\{}\nabla\cdot\bigg{\\{}\frac{1}{I(x,y;z)}\nabla\nabla^{-2}\bigg{[}\frac{\partial
I(x,y;z)}{\partial z}\bigg{]}\bigg{\\}}\bigg{\\}},$ (11)

where the $\nabla^{-2}$ operator is defined as:

$\nabla^{-2}g(x,y)=\mathcal{F}^{{-}1}\bigg{\\{}\frac{1}{-4\pi^{2}(k_{x}^{2}+k_{y}^{2})}\mathcal{F}\bigg{\\{}g(x,y)\bigg{\\}}\bigg{\\}}.$
(12)

Equation (11) only holds when the vector field
$I\nabla\varphi=-k\nabla\nabla^{-2}\big{[}\frac{\partial I(x,y;z)}{\partial
z}\big{]}$ is conservative. However, this assumption does not always hold.
This is especially true in regions of significant absorption changes, such as
those caused by dust, rendering the approximation invalid [44]. Furthermore,
dark regions within $I(x,y;z)$ can introduce instability to the fractional
term. Additionally, in both cases, solving TIE implies estimating the
$\frac{\partial I(x,y;z)}{\partial z}$ term. This is usually done using finite
differences [38], or via an interpolated polynomial whose derivative is then
evaluated around $z=0$ [35]. However, since the acquired images have noise,
using the outlined solutions will produce low-frequency noise amplification
around the singularity, rendering phase recovery an ill-posed problem.

##  Appendix B More details on Conditional Variational Diffusion Models

In this section, we fill in some of the details of the Conditional Variational
Diffusion Models (CVDM) framework [20]. As mentioned in Section 3.3, a key
distinction of CVDM in comparison to other conditioning diffusion methods [30,
8] is that it allows for automatically learning the schedule functions during
the training process. This avoids the need to fine-tune $\beta$ and $\gamma$
by hand, a time-consuming task which leads to possibly suboptimal results. On
the other hand, learning these functions during training means the need to
ensure some basic properties. First, $\beta$ and $\gamma$ are made dependent
on the conditioning variable $X$, so that the schedule may be tailored to each
instance. Second, any variance-preserving schedule needs to satisfy [20]:

$\frac{\partial\gamma(t,X)}{\partial t}=-\beta(t,X)\gamma(t,X).$ (13)

Additionally, from equation (8), we get the two natural conditions
$\gamma(0,X)\approx 1$ and $\gamma(T,X)\approx 0$, which ensure that the
forward process starts at $q_{\text{data}}(\cdot|X)$ and ends in
$\mathcal{N}(0,I)$, respectively. These conditions are encoded in the
following loss function:

$\mathcal{L}_{\beta}(X)=\mathbb{E}_{t\sim\text{Unif}([0,T])}\left[\left\lVert\frac{\partial\gamma(t,X)}{\partial
t}+\beta(t,X)\gamma(t,X)\right\rVert_{2}^{2}\right]+\left\lVert\gamma(0,X)-1\right\rVert_{2}^{2}+\left\lVert\gamma(T,X)-0\right\rVert_{2}^{2}.$

An additional loss term $\mathcal{L}_{\text{prior}}(X,Y)$ is used to ensure
$q_{T}$ is as similar as possible to a $\mathcal{N}(0,I)$ variable. Finally, a
regularization term for $\gamma$ is needed to avoid pathological schedules
[20]:

$\mathcal{L}_{\gamma}(X)=\mathbb{E}_{t\sim\text{Unif}([0,T])}\left[\left\lVert\frac{\partial^{2}\gamma(t,X)}{\partial
t^{2}}\right\rVert_{2}^{2}\right]$

Grouping all these terms, the final loss function used in CVDM is given by

$\mathcal{L}_{\text{CVDM}}=\mathbb{E}_{(X,Y)\sim
q_{\text{data}}}\left[\mathcal{L}_{\beta}(X)+\mathcal{L}_{\text{prior}}(X,Y)+\mathcal{L}_{\text{noise}}(Y,X)+a\mathcal{L}_{\gamma}(X)\right],$

where $a$ is the weight of the regularization term $\mathcal{L}_{\gamma}$. As
explained in Section 3.3, a Monte Carlo estimator of
$\mathcal{L}_{\text{CVDM}}$ is optimized by using the available
$\\{(X_{i},Y_{i})\\}_{i=1}^{N}$ dataset of samples.

##  Appendix C Proofs for Section 3.4

In this section, we provide all necessary proofs supporting the theoretical
discussion in Section 3.4. Throughout, our main object of study is the
stochastic process $\big{\\{}\tilde{Y}_{t}\big{\\}}$ given by
$\tilde{Y}_{t}=Y_{t}-\mu_{t}$. Recall that $\mu_{t}$ is defined as
$\mu_{t}=\mathbb{E}_{q_{t}(\cdot|X)}\left[Y_{t}\right]$, that is, as the
expected value of $Y_{t}$ when the forward process is conditioned on $X$. We
start by proving the following auxiliary result, which gives an explicit
expression for $\mu_{t}$ in terms of $\mu_{0}$.

######  Lemma 1.

For every $t\in[0,T]$ it holds that $\mu_{t}=\mu_{0}\sqrt{\gamma(t,X)}$.

###### Proof.

Starting from the definition of $\mu_{t}$ we get

$\displaystyle\mu_{t}$ $\displaystyle=\int y\>q_{t}(y|X)\>dy$
$\displaystyle=\int y\int q_{t}(y|Y_{0}=y_{0},X)\>q_{0}(y_{0}|X)\>dy_{0}\>dy$
$\displaystyle=\int q_{0}(y_{0}|X)\int y\>q_{t}(y|Y_{0}=y_{0},X)\>dy\>dy_{0}$
By equation (5) we know $q_{t}(y|Y_{0}=y_{0},X)$ is Gaussian with expected
value $\sqrt{\gamma(t,X)}\>y_{0}$: $\displaystyle=\int
q_{0}(y_{0}|X)\left(\sqrt{\gamma(t,X)}\>y_{0}\right)dy_{0}$
$\displaystyle=\sqrt{\gamma(t,X)}\int y_{0}\>q_{0}(y_{0}|X)\>dy_{0}$
$\displaystyle=\sqrt{\gamma(t,X)}\>\mu_{0}.$

∎

We now provide the proof for Proposition 1. This result shows that the
stochastic process $\big{\\{}\tilde{Y}_{t}\big{\\}}$ evolves according to the
same stochastic differential equation (SDE) as $\\{Y_{t}\\}$.

###### Proof of Proposition 1.

Define the function $F(y,t)=y-\mu_{t}$. By Ito’s Rule ([11]) we know that

$dF(Y_{t},t)=\left[-\frac{1}{2}\beta(t,X)Y_{t}\frac{\partial F}{\partial
y}(Y_{t},t)+\frac{\partial F}{\partial
t}(Y_{t},t)+\frac{1}{2}\beta(t,X)\frac{\partial^{2}F}{\partial
y^{2}}(Y_{t},t)\right]dt+\sqrt{\beta(t,X)}\frac{\partial F}{\partial
y}(Y_{t},t)dW_{t}$

It is easy to see that $\frac{\partial F}{\partial y}=1$,
$\frac{\partial^{2}F}{\partial y^{2}}=0$ and $\frac{\partial F}{\partial
t}=-\frac{\partial\mu_{t}}{\partial t}$. Now, using Lemma 1 we get

$\displaystyle-\frac{\partial\mu_{t}}{\partial t}$
$\displaystyle=-\frac{\partial\left(\mu_{0}\sqrt{\gamma(t,X)}\right)}{\partial
t}$ $\displaystyle=-\mu_{0}\frac{\partial\sqrt{\gamma(t,X)}}{\partial t}$
$\displaystyle=-\mu_{0}\frac{1}{2\sqrt{\gamma(t,X)}}\frac{\partial\gamma(t,X)}{\partial
t}$ Using equation (13) to replace $\frac{\partial\gamma(t,X)}{\partial t}$:
$\displaystyle=\mu_{0}\frac{1}{2\sqrt{\gamma(t,X)}}\gamma(t,X)\beta(t,X)$
$\displaystyle=\frac{1}{2}\beta(t,X)\mu_{0}\sqrt{\gamma(t,X)}$
$\displaystyle=\frac{1}{2}\beta(t,X)\mu_{t}.$

Replacing all partial derivatives in the expression for $dF(Y_{t},t)$:

$\displaystyle dF(Y_{t},t)$
$\displaystyle=\left[-\frac{1}{2}\beta(t,X)Y_{t}+\frac{1}{2}\beta(t,X)\mu_{t}\right]dt+\sqrt{\beta(t,X)}dW_{t}$
$\displaystyle=-\frac{1}{2}\beta(t,X)(Y_{t}-\mu_{t})dt+\sqrt{\beta(t,X)}dW_{t}$
$\displaystyle=-\frac{1}{2}\beta(t,X)F(Y_{t},t)dt+\sqrt{\beta(t,X)}dW_{t}.$

Substituting $\tilde{Y}_{t}$ for $F(Y_{t},t)$ finishes the proof. ∎

We now work our way towards proving our main theoretical result, Theorem 1.
First, we prove a straightforward relationship between the density functions
$\\{q_{t}\\}$ (characterizing the standard forward process $\\{Y_{t}\\}$) and
the density functions $\\{\tilde{q}_{t}\\}$ (characterizing the centered
forward process $\big{\\{}\tilde{Y}_{t}\big{\\}}$).

######  Lemma 2.

For all $t\in[0,T]$ it holds that $\tilde{q}_{t}(y|X)=q_{t}(y+\mu_{t}|X)$.

###### Proof.

For a given $X$, recall that $Y_{t}$ is the random variable resulting from
sampling $Y_{0}\sim q_{\text{data}}(\cdot|X)$ and then evolving the stochastic
process according to the SDE given by (4). Its density is denoted as
$q_{t}(\cdot|X)$. Since $\tilde{Y}_{t}$ is defined as $Y_{t}-\mu_{t}$ this
lemma is a straightforward application of the change-of-variables formula in
probability. That is, for any bijective and differentiable transformation
$\tilde{Y}_{t}=G(Y_{t})$ the density $\tilde{q}_{t}(\cdot|X)$ of
$\tilde{Y}_{t}$ is given by:

$\tilde{q}_{t}(y|X)=q_{t}\big{(}G^{-1}(y)|X\big{)}\left\lvert\text{det}\left(\mathbf{J}G^{-1}(y)\right)\right\rvert,$

where $G^{-1}$ is the inverse function and $\mathbf{J}$ denotes the Jacobian
operator. In our case, $G^{-1}(y)=y+\mu_{t}$ and the determinant term is $1$
because $\mu_{t}$ is fixed (not dependent on $y$). This gives the result. ∎

We need to prove three more results in a similar vein to Lemma 2. The first
one involves the density function when conditioning on $\tilde{Y}_{0}$.

######  Lemma 3.

For all $t\in[0,T]$ it holds that
$\tilde{q}_{t}\big{(}y|\tilde{Y}_{0}=y_{0},X\big{)}=q_{t}(y+\mu_{t}|Y_{0}=y_{0}+\mu_{0},X)$.

###### Proof.

By Proposition 1 we know that $\big{\\{}\tilde{Y}_{t}\big{\\}}$ evolves
according to the SDE given by (4). Hence, equation (5) implies that
$\tilde{q}_{t}\big{(}\cdot|\tilde{Y}_{0}=y_{0},X\big{)}$ has a
$\mathcal{N}\big{(}\sqrt{\gamma(t,X)}y_{0},(1-\gamma(t,X))I\big{)}$
distribution. This leads to the following calculation, where we use $\gamma$
in place of $\gamma(t,X)$ to simplify notation:

$\displaystyle\tilde{q}_{t}\big{(}y|\tilde{Y}_{0}=y_{0},X\big{)}$
$\displaystyle=\mathcal{N}\big{(}y;\sqrt{\gamma}y_{0},(1-\gamma)I\big{)}$
$\displaystyle=\frac{1}{(2\pi)^{\frac{d}{2}}(1-\gamma)^{\frac{d}{2}}}e^{-\frac{1}{2(1-\gamma)}(y-\sqrt{\gamma}y_{0})^{T}(y-\sqrt{\gamma}y_{0})}$
$\displaystyle=\frac{1}{(2\pi)^{\frac{d}{2}}(1-\gamma)^{\frac{d}{2}}}e^{-\frac{1}{2(1-\gamma)}(y+\mu_{t}-\mu_{t}-\sqrt{\gamma}y_{0})^{T}(y+\mu_{t}-\mu_{t}-\sqrt{\gamma}y_{0})}$
By Lemma 1 we know that $\mu_{t}=\sqrt{\gamma(t,X)}\mu_{0}$. Replacing above:
$\displaystyle=\frac{1}{(2\pi)^{\frac{d}{2}}(1-\gamma)^{\frac{d}{2}}}e^{-\frac{1}{2(1-\gamma)}(y+\mu_{t}-\sqrt{\gamma}\mu_{0}-\sqrt{\gamma}y_{0})^{T}(y+\mu_{t}-\sqrt{\gamma}\mu_{0}-\sqrt{\gamma}y_{0})}$
$\displaystyle=\frac{1}{(2\pi)^{\frac{d}{2}}(1-\gamma)^{\frac{d}{2}}}e^{-\frac{1}{2(1-\gamma)}\big{(}(y+\mu_{t})-\sqrt{\gamma}(y_{0}+\mu_{0})\big{)}^{T}\big{(}(y+\mu_{t})-\sqrt{\gamma}(y_{0}+\mu_{0})\big{)}}$
$\displaystyle=\mathcal{N}\big{(}y+\mu_{t};\sqrt{\gamma}(y_{0}+\mu_{0}),(1-\gamma)I\big{)}$
$\displaystyle=q_{t}\big{(}y+\mu_{t}|Y_{0}=y_{0}+\mu_{0},X\big{)}.$

∎

Our last results of this form involve the score of the density functions
$\\{q_{t}\\}$, which play a significant role in diffusion models [33]. For the
forward process $\\{Y_{t}\\}$, the score function at time $t$ is given by
$\nabla\log q_{t}(y|X)$, where $\nabla$ represents the gradient with respect
to the $y$ variable. This notation means that the gradient of $\log
q_{t}(\cdot|X)$ is evaluated at $y$. For the centered forward process
$\big{\\{}\tilde{Y}_{t}\big{\\}}$ the score functions are defined analogously.
The following result relates the scores of the two processes.

######  Lemma 4.

For all $t\in[0,T]$ it holds that $\nabla\log\tilde{q}_{t}(y|X)=\nabla\log
q_{t}(y+\mu_{t}|X)$.

###### Proof.

By Lemma 2 we know $\tilde{q}_{t}(y|X)=q_{t}(y+\mu_{t}|X)$ for any $y$. This
means that:

$\displaystyle\nabla\log\tilde{q}_{t}(y|X)$
$\displaystyle=\frac{1}{\tilde{q}_{t}(y|X)}\nabla\tilde{q}_{t}(y|X)$
$\displaystyle=\frac{1}{q_{t}(y+\mu_{t}|X)}\nabla\tilde{q}_{t}(y|X)$
$\displaystyle=\frac{1}{q_{t}(y+\mu_{t}|X)}\big{(}\nabla
q_{t}(\cdot|X)J\big{)}(y+\mu_{t}).$ Here, $J$ is the Jacobian matrix of the
transformation $y\to y+\mu_{t}$, and hence equal to $I$:
$\displaystyle=\frac{1}{q_{t}(y+\mu_{t}|X)}\nabla q_{t}(y+\mu_{t}|X)$
$\displaystyle=\nabla\log q_{t}(y+\mu_{t}|X).$

∎

Now, imagine the forward process $\big{\\{}\tilde{Y}_{t}\big{\\}}$ conditioned
on $\tilde{Y}_{0}=y_{0}$. This gives rise to a new set of densities
$\tilde{q}_{t}(\cdot|\tilde{Y}_{0}=y_{0},X)$, and thus new score functions
$\nabla\log\tilde{q}_{t}(\cdot|\tilde{Y}_{0}=y_{0},X)$. The following result
relates the scores of the two forward processes when they are conditioned on
the starting variable of the respective process.

######  Lemma 5.

For all $t\in[0,T]$ it holds that

$\nabla\log\tilde{q}_{t}(y|\tilde{Y}_{0}=y_{0},X)=\nabla\log
q_{t}(y+\mu_{t}|Y_{0}=y_{0}+\mu_{0},X).$

###### Proof.

We know that both forward processes evolve according to the SDE given by (4).
Hence, equation (5) implies the following equalities, where we use $\gamma$ in
place of $\gamma(t,X)$ to simplify notation:

$\displaystyle q_{t}\big{(}\cdot|Y_{0}=y_{0}+\mu_{0},X\big{)}$
$\displaystyle=\mathcal{N}\big{(}\sqrt{\gamma}(y_{0}+\mu_{0}),(1-\gamma)I\big{)},$
$\displaystyle\tilde{q}_{t}\big{(}\cdot|\tilde{Y}_{0}=y_{0},X\big{)}$
$\displaystyle=\mathcal{N}\big{(}\sqrt{\gamma}y_{0},(1-\gamma)I\big{)}.$

Then, by replacing the density function of the multivariate Gaussian, we can
apply the logarithm and then compute the gradient to get

$\displaystyle\nabla\log\tilde{q}_{t}(y|\tilde{Y}_{0}=y_{0},X)$
$\displaystyle=-\frac{1}{(1-\gamma)}(y-\sqrt{\gamma}y_{0})$
$\displaystyle=-\frac{1}{(1-\gamma)}(y+\mu_{t}-\mu_{t}-\sqrt{\gamma}y_{0})$
Using Lemma 1 to replace $\mu_{t}=\sqrt{\gamma}\mu_{0}$:
$\displaystyle=-\frac{1}{(1-\gamma)}(y+\mu_{t}-\sqrt{\gamma}\mu_{0}-\sqrt{\gamma}y_{0})$
$\displaystyle=-\frac{1}{(1-\gamma)}\big{(}(y+\mu_{t})-\sqrt{\gamma}(y_{0}+\mu_{0})\big{)}$
$\displaystyle=\nabla\log q_{t}\big{(}y+\mu_{t}|Y_{0}=y_{0}+\mu_{0},X\big{)}.$

∎

We can now proceed to the proof of Theorem 1. Recall from Sections 3.3 and 3.4
that standard CVDM allows us to sample from a distribution $Z_{t}\sim
p_{T}(\cdot|X)$. On the other hand, ZMD allows us to sample
$\tilde{Z}_{t}\sim\tilde{p}_{T}(\cdot|X)$ and then add $\mu_{0}$ to
$\tilde{Z}_{t}$, effectively simulating a different distribution
$\tilde{p}_{T}^{\mu_{0}}$. Both $p_{T}(\cdot|X)$ and
$\tilde{p}_{T}^{\mu_{0}}(\cdot|X)$ should approximate
$q_{0}(\cdot|X)=q_{\text{data}}(\cdot|X)$. To study the quality of the
approximation, we can analyze the terms $D_{\text{KL}}(q_{0}||p_{T})$ with
$D_{\text{KL}}(q_{0}||\tilde{p}_{T}^{\mu_{0}})$, where we have omitted the
dependence on $X$ to simplify notation.

Notice that $\tilde{q}_{0}(\cdot|X)$ and $q_{0}(\cdot|X)$ are related by the
following variable transformation: if
$\tilde{Y}_{0}\sim\tilde{q}_{0}(\cdot|X)$, then
$\big{(}\tilde{Y}_{0}+\mu_{0}\big{)}\sim q_{0}(\cdot|X)$. This is the exact
transformation that relates $\tilde{p}_{T}$ and $\tilde{p}_{T}^{\mu_{0}}$.
Since the Kullback–Leibler divergence $D_{\text{KL}}$ is invariant under
diffeomorphisms [25] (such as the $y\to y+\mu_{0}$ mapping), this means that

$D_{\text{KL}}(q_{0}||\tilde{p}_{T}^{\mu_{0}})=D_{\text{KL}}(\tilde{q}_{0}||\tilde{p}_{T}).$
(14)

Equation (14) allows us to study the quality of approximation for
$q_{0}(\cdot|X)$ by comparing $D_{\text{KL}}(q_{0}||p_{T})$ with
$D_{\text{KL}}(\tilde{q}_{0}||\tilde{p}_{T})$. This is simpler than comparing
$D_{\text{KL}}(q_{0}||p_{T})$ with
$D_{\text{KL}}(q_{0}||\tilde{p}_{T}^{\mu_{0}})$, because it involves two
similar terms: $D_{\text{KL}}(q_{0}||p_{T})$ represents how accurately the
forward process $\\{Y_{t}\\}$ can be reversed, and
$D_{\text{KL}}(\tilde{q}_{0}||\tilde{p}_{T})$ has the exact same
interpretation for the forward process $\big{\\{}\tilde{Y}_{t}\big{\\}}$. In a
sense, all that matters is how well the respective forward process can be
reversed: the operation of subtracting $\mu_{0}$ and adding it back has no
effect in the capacity to approximate $q_{0}(\cdot|X)$.

We use the following strategy to indirectly compare
$D_{\text{KL}}(q_{0}||p_{T})$ and
$D_{\text{KL}}(\tilde{q}_{0}||\tilde{p}_{T})$. Although these terms are
challenging to analyze, there are known upper bounds for them. In particular,
we use the following result [9]:

$D_{\text{KL}}(q_{0}||p_{T})\leq
D_{\text{KL}}(q_{T}||\mathcal{N}(0,I))+\frac{1}{2}(I_{\nu}+I)$ (15)

where

$\displaystyle I_{\nu}$
$\displaystyle=\int_{0}^{T}\gamma(t,X)\int\int\left\lVert
s_{\nu}(y,t,X)-\nabla\log
q_{t}(y|Y_{0}=y_{0},X)\right\rVert_{2}^{2}\>q_{t}(y|Y_{0}=y_{0},X)\>q_{0}(y_{0}|X)dy\>dy_{0}\>dt$
$\displaystyle I$
$\displaystyle=\int_{0}^{T}\gamma(t,X)\int\int\left\lVert\nabla\log
q_{t}(y|X)-\nabla\log
q_{t}(y|Y_{0}=y_{0},X)\right\rVert_{2}^{2}\>q_{t}(y|Y_{0}=y_{0},X)\>q_{0}(y_{0}|X)dy\>dy_{0}\>dt.$

Here, $s_{\nu}$ represents the learned function that approximates the score,
that is, a function that after training should satisfy
$s_{\nu}(y,t,X)\approx\nabla\log q_{t}(y|X)$. There is an explicit
relationship between $s_{\nu}$ and the noise-prediction model
$\varepsilon_{\nu}$ learned by CVDM. Now, we can bound
$D_{\text{KL}}(q_{T}||\mathcal{N}(0,I))$ by using the derivation in [2] to
change the bound in (15) into:

$D_{\text{KL}}(q_{0}||p_{T})\leq\frac{1}{2}\left(\gamma(t,X)\mathbb{E}_{q_{0}(\cdot|X)}\left[\big{\lVert}Y_{0}\big{\rVert}_{2}^{2}\right]+d(1-\gamma(t,X))\right)+\frac{1}{2}\big{(}I_{\nu}+I\big{)},$
(16)

where $d$ denotes the dimension of the $\\{Y_{t}\\}$ and
$\big{\\{}\tilde{Y}_{t}\big{\\}}$ variables. The centered process follows the
same dynamics as the standard forward process (that is, equation (4)), so
analogously we have

$D_{\text{KL}}(\tilde{q}_{0}||\tilde{p}_{T})\leq\frac{1}{2}\left(\gamma(t,X)\mathbb{E}_{\tilde{q}_{0}(\cdot|X)}\left[\big{\lVert}\tilde{Y}_{0}\big{\rVert}_{2}^{2}\right]+d(1-\gamma(t,X))\right)+\frac{1}{2}\big{(}\tilde{I}_{\nu}+\tilde{I}\big{)}.$
(17)

Here, $\tilde{I}_{\nu}$ and $\tilde{I}$ are defined in exactly the same way as
$I_{\nu}$ and $I$, replacing $q_{t}$ by $\tilde{q}_{t}$ and using an
approximate score function $\tilde{s}_{\nu}(y,t,X)$ learned for the centered
process $\big{\\{}\tilde{Y}_{t}\big{\\}}$. Notice that the right-hand sides of
equations (16) and (17) are the upper bounds referred to as $M(p_{T})$ and
$M(\tilde{p}_{T}^{\mu_{0}})$ in Section 3.4, respectively. We now show that
these two terms are related such that $M(\tilde{p}_{T}^{\mu_{0}})\leq
M(p_{T})$.

First, suppose an approximate score function $s_{\nu}$ has been learned for
the process $\\{Y_{t}\\}$. Then, we can define an approximate score function
$\tilde{s}_{\nu}$ for the process $\big{\\{}\tilde{Y}_{t}\big{\\}}$ as
$\tilde{s}_{\nu}(y,t,X)=s_{\nu}(y+\mu_{t},t,X)$. Now, the following equality
can be derived:

$\displaystyle\tilde{I}_{\nu}$
$\displaystyle=\frac{1}{2}\int_{0}^{T}\gamma(t,X)\int\int\Big{(}\Big{\lVert}\tilde{s}_{\nu}(y,t,X)-\nabla$
$\displaystyle\log\tilde{q}_{t}(y|\tilde{Y}_{0}=y_{0},X)\Big{\rVert}_{2}^{2}\cdot$
$\displaystyle\tilde{q}_{t}(y|\tilde{Y}_{0}=y_{0},X)\tilde{q}_{0}(y_{0}|X)\Big{)}\>dy\>dy_{0}$
Applying Lemmas 2, 3 and 5:
$\displaystyle=\frac{1}{2}\int_{0}^{T}\gamma(t,X)\int\int\Big{(}\Big{\lVert}\tilde{s}_{\nu}(y,t,X)-\nabla$
$\displaystyle\log
q_{t}(y+\mu_{t}|Y_{0}=y_{0}+\mu_{0},X)\Big{\rVert}_{2}^{2}\cdot$
$\displaystyle
q_{t}(y+\mu_{t}|Y_{0}=y_{0}+\mu_{0},X)q_{0}(y_{0}+\mu_{0}|X)\Big{)}\>dy\>dy_{0}$
Replacing $\tilde{s}_{\nu}(y,t,X)=s_{\nu}(y+\mu_{t},t,X)$ and using the
substitutions $u=y+\mu_{t}$ and $u_{0}=y_{0}+\mu_{0}$ for the inner integrals:
$\displaystyle=\frac{1}{2}\int_{0}^{T}\gamma(t,X)\int\int\Big{(}\Big{\lVert}s_{\nu}(u,t,X)-\nabla$
$\displaystyle\log q_{t}(u|Y_{0}=u_{0},X)\Big{\rVert}_{2}^{2}\cdot$
$\displaystyle q_{t}(u|Y_{0}=u_{0},X)q_{0}(u_{0}|X)\Big{)}\>du\>du_{0}$
$\displaystyle=I_{\nu}.$

Analogously we can prove that $\tilde{I}=I$, where the only difference in the
proof is that we need to use Lemma 4 to replace
$\nabla\log\tilde{q}_{t}(y|X)=\nabla\log q_{t}(y+\mu_{t}|X)$ before performing
the substitutions inside the inner integrals. Notice what this implies. On the
one hand, $\tilde{I}=I$ are always equal. On the other hand, for any learned
score $s_{\nu}$ we can construct $\tilde{s}_{\nu}$ in such a way that
$\tilde{I}_{\nu}=I_{\nu}$. These means that in the upper bounds $M(p_{T})$ and
$M(\tilde{p}_{T}^{\mu_{0}})$, there is no general difference that can be
established between the terms $(I_{\nu}+I)$ and $(\tilde{I}_{\nu}+\tilde{I})$.
Furthermore, the $d(1-\gamma(t,X))$ term is exactly the same in both cases
too. Hence, to differentiate between both upper bounds we need to focus on the
terms:

$\mathbb{E}_{q_{0}(\cdot|X)}\left[\big{\lVert}Y_{0}\big{\rVert}_{2}^{2}\right],\>\>\mathbb{E}_{\tilde{q}_{0}(\cdot|X)}\left[\big{\lVert}\tilde{Y}_{0}\big{\rVert}_{2}^{2}\right],$

which can be compared via the following derivation

$\displaystyle\mathbb{E}_{\tilde{q}_{0}(\cdot|X)}\left[\big{\lVert}\tilde{Y}_{0}\big{\rVert}_{2}^{2}\right]$
$\displaystyle=\int\left\lVert
y_{0}\right\rVert_{2}^{2}\>\tilde{q}_{0}(y_{0}|X)\>dy_{0}$ By Lemma 2:
$\displaystyle=\int\left\lVert
y_{0}\right\rVert_{2}^{2}\>q_{0}(y_{0}+\mu_{0}|X)\>dy_{0}$ Using the
substitution $u_{0}=y_{0}+\mu_{0}$ for the integral:
$\displaystyle=\int\left\lVert
u_{0}-\mu_{0}\right\rVert_{2}^{2}\>q_{0}(u_{0}|X)\>dy_{0}$
$\displaystyle=\int\left(\left\lVert
u_{0}\right\rVert_{2}^{2}+\left\lVert\mu_{0}\right\rVert_{2}^{2}-2\mu_{0}^{T}u_{0}\right)\>q_{0}(u_{0}|X)\>dy_{0}$
$\displaystyle=\int\left\lVert
u_{0}\right\rVert_{2}^{2}\>q_{0}(u_{0}|X)\>dy_{0}+\left\lVert\mu_{0}\right\rVert_{2}^{2}\int\>q_{0}(u_{0}|X)\>dy_{0}-2\mu_{0}^{T}\int
u_{0}\>q_{0}(u_{0}|X)\>dy_{0}$
$\displaystyle=\mathbb{E}_{q_{0}(\cdot|X)}\left[\big{\lVert}Y_{0}\big{\rVert}_{2}^{2}\right]+\left\lVert\mu_{0}\right\rVert_{2}^{2}-2\left\lVert\mu_{0}\right\rVert_{2}^{2}$
$\displaystyle=\mathbb{E}_{q_{0}(\cdot|X)}\left[\big{\lVert}Y_{0}\big{\rVert}_{2}^{2}\right]-\left\lVert\mu_{0}\right\rVert_{2}^{2}$
$\displaystyle\leq\mathbb{E}_{q_{0}(\cdot|X)}\left[\big{\lVert}Y_{0}\big{\rVert}_{2}^{2}\right].$

This finishes the proof of Theorem 1. When comparing the bounds in equations
(16) and (17), we have shown that all terms are or can be made to be equal,
except for the second moment terms, for which the above inequality shows that
the standard (non-centered) process has a value at least as big as the
centered process. In other words, we conclude that
$M(\tilde{p}_{T}^{\mu_{0}})\leq M(p_{T})$.

##  Appendix D Additional Experiments

To further validate our method, we conduct additional experiments by acquiring
three through-focus stacks of red blood cells using a microscope equipped with
a plan objective. We perform comparative analyses between our method and the
US TIE technique. The results demonstrate that our method successfully
recovers structural details that are not captured by any of the US TIE
reconstructions. For instance, notice the black dots at the center of red
blood cells in the enlarged images from Figure 6, successfully recovered by
ZMD but absent in the US TIE solution. Our method thus provides enhanced
accuracy and reliability in the reconstruction of red blood cell morphology.
These findings underscore the superior performance of our method in extracting
critical structural information. Figure 7 shows the results of the different
methods, and Table 2(b) presents the MS-SSIM and MAE scores for each sample
and method, with sample numbers corresponding to the rows in Figure 7.

((a)) QPI methods assessed using synthetic images from HCOCO.

((b)) QPI methods assessed using clinical images. Scale bar (upper leftmost
image) is 50 $\mu$m.

Figure 5: Comparison of QPI methods. In each subfigure, from left to right:
defocused image at a distance $d$ ($I_{d}$) with corresponding ground truth
(GT) below; reconstructions and error images follow. Figure 6: Urine sample
with red blood cells. From left to right: US TIE phase reconstruction, Mean
Prediction, and Zero-Mean Diffusion prediction. Regions of the image are
enlarged to better show the reconstruction details. Table 2: Performance
metrics for QPI Through-Focus Brightfield Images for red blood cells. “2s”
stands for the 2-shot modality (using two images to measure the phase), while
“p” stands for the polychromatic (single exposure) modality.

((a)) MS-SSIM on Through-Focus Brightfield Images. Sample | US TIE (2s) | US TIE (p) | ZMD (2s) | ZMD (p)
---|---|---|---|---
1 | 0.902 | 0.672 | 0.834 | 0.804
2 | 0.774 | 0.520 | 0.714 | 0.830
3 | 0.792 | 0.473 | 0.664 | 0.901

((b)) MAE on Through-Focus Brightfield Images. Sample | US TIE (2s) | US TIE (p) | ZMD (2s) | ZMD (p)
---|---|---|---|---
1 | 0.11 | 0.165 | 0.079 | 0.078
2 | 0.082 | 0.238 | 0.076 | 0.056
3 | 0.063 | 0.246 | 0.136 | 0.061

Figure 7: Comparison of QPI methods. In each subfigure, from left to right:
defocused image at a distance $d$ ($I_{d}$) with corresponding ground truth
(GT) below; reconstructions and error images follow. All phase images are
quantitatively interpretable, with values between 0 and 2.5 radians.