Keywords

1 Introduction

Fetal lung parenchyma maldevelopment may lead to life-threatening physiologic dysfunction due to pulmonary hypoplasia and pulmonary hypertension [10]. Accurate assessment of lung maturation before delivery is critical in determining pre-natal and post-natal care and potential interventions [2]. In current clinical practice, the non-invasive assessment of fetal lung parenchyma development relies upon fetal lung volume estimation from either ultrasonography [12], or anatomical magnetic resonance imaging (MRI) [5] data. However, these modalities are limited in providing an insight into lung function and are therefore suboptimal in assessing fetal lung maturity and in providing relevant biomarkers for fetal lung parenchyma maldevelopment.

Diffusion-weighted MRI (DWI) is a non-invasive imaging technique sensitive to the random movement of individual water molecules. The displacement of individual water molecules results in signal attenuation in the presence of a magnetic field encoding gradient pulses. This attenuation increases with the degree of sensitization-to-diffusion of the MRI pulse sequence (the “b-value”) [1]. Quantitative analysis of the DWI data (qDWI) has been suggested previously for functional assessment of fetal lung parenchyma development [1, 13]. The qDWI analysis is performed by a least-squares fitting of a signal decay model describing the DWI signal attenuation as a function of the b-value to the acquired DWI data. Commonly, a mono-exponential signal decay model of the form of:

$$\begin{aligned} S_{i} = {S_{0}}\cdot e^{-b_i\cdot ADC} \; \end{aligned}$$
(1)

where \(S_i\) is the signal at b-value \(b_i\), \(S_0\) is the signal without sensitizing the diffusion gradients, and ADC is the apparent diffusion coefficient, which represents the overall diffusivity, is used in clinical practice [8].

However, qDWI analysis is intrinsically highly susceptible to gross motion between the acquisition of the different b-value images [1]. Hence, the irregular and unpredictable motion of the fetus, in addition to the maternal respiratory and abdominal motion, causes misalignment between image volumes, acquired at multiple b-values, and impairs the accuracy and robustness of the signal decay parameter estimation [9].

Specifically, Afacan et al. [1] examined the influence of the presence of motion during the DWI data acquisition on the correlation between the overall diffusivity characterized by the ADC parameter and the gestational age (GA). They found that the dependence of the ADC parameter on the GA is of an exponential saturation type, with an R-squared \((R^2)\) value of 0.71 for fetal DWI data that was not affected by fetus motion. However, when fetal DWI data with gentle motion were included, the \(R^2\) dropped to 0.232, and when fetal DWI data with severe motion were included, the \(R^2\) dropped to 0.102.

We introduce qDWI-Morph, an unsupervised deep-neural-network model for motion-compensated qDWI analysis. Our specific contributions are: 1) unsupervised deep-neural-network (DNN) model for simultaneous motion compensation and qDWI analysis, 2) Introduction of a bio-physically-informed loss function incorporating registration loss with qDWI model fitting loss, and 3) improved correlation between qDWI analysis by means of the ADC parameter and GA demonstrated using in-vivo DWI data of fetal lungs.

1.1 Background

Fetal Lung Development. The normal fetal lung parenchyma development starts in the second trimester and progresses through multiple phases before becoming fully functional at full term. The first phase of development, the embryonic and pseudo glandular stage, is followed by the canalicular phase, which starts at 16 weeks, then the saccular stage, which starts at 24 weeks, and ends with the alveolar stage, which starts at 36 weeks gestation. [14]. The formation of a dense capillary network and a progressive increase in pulmonary blood flow, leading to reduced extra-cellular space on the one hand and increased perfusion on the other hand, characterizes the progression through these phases [6]. Hence, changes in the overall tissue diffusivity are thought to serve as a functional indicator of lung development.

Diffusion-Weighted MRI. DWI is a non-invasive imaging technique sensitive to the random movement of individual water molecules. The movement of water molecules depends on tissue micro-environments and results from two phenomena: diffusion and perfusion [6]. The water molecule mobility attenuates the DWI signal according to the degree of sensitivity-to-diffusion, the “b-value", used in the acquisition. Typically, DWI images are acquired at multiple b-values, and the signal decay rate parameters are quantified per voxel by least-squares model fitting [9]. DWI can potentially be a functional biomarker for lung maturity since it results from diffusion and perfusion. According to the mono-exponential model, the signal of a particular voxel decreases exponentially with an increasing b-value (Eq. 1), with a decay rate that depends on the overall diffusivity of the voxel, the ADC, encapsulating both pure diffusion and perfusion influence on the DWI signal. Quantifying the ADC out of the measurements is done by applying \(log(\cdot )\) on both sides of Eq. 1:

$$\begin{aligned} log(S_{i}) = log(S_{0})-b_i\cdot ADC \; \end{aligned}$$
(2)

A set of B equations is obtained by scanning with B different b-values. This linear set of equations can be solved by linear least-squares regression (LLS) [15]. The solution is given by:

$$\begin{aligned} \hat{x}_{LS}&= \mathop {\mathrm {\arg \!\min }}\limits _{S_0,ADC}\sum _{i\in B}|\log {(S_i)}-\log {(S_0)}+b_{i}ADC|^2 \; \end{aligned}$$
(3)
$$\begin{aligned}&= (A^TA)^{-1}A^T\beta \end{aligned}$$
(4)

where:

$$\begin{aligned} A = \begin{pmatrix} 1 &{} -b_0\\ \vdots &{} \vdots \\ 1 &{} -b_B \end{pmatrix},{} & {} \beta = \begin{bmatrix} log(S_0),&\cdots ,&log(S_B) \end{bmatrix}^T,{} & {} x = \begin{bmatrix} log(S_0),&ADC \end{bmatrix}^T \end{aligned}$$
(5)

In order to be stable against outliers in the acquired DWI signals, a more robust solution can be obtained by using an iterative-least squares algorithm [4]. This is an iterative method in which each step involves solving a weighted least squares problem:

$$\begin{aligned} \hat{x}_{IRLS}^{(t)}&= \mathop {\mathrm {\arg \!\min }}\limits _{S_0,ADC}\sum _{i\in B}w_i^{(t)}|\log {(S_i)}-\log {(S_0)}+b_{i}ADC|\end{aligned}$$
(6)
$$\begin{aligned}&= (A^TW^{(t)}A)^{-1}A^TW^{(t)}b \end{aligned}$$
(7)

where \(W^{(t)}\) is a diagonal matrix of weights, with all elements set initially to:

$$\begin{aligned} \left\{ w_i^{(0)}\right\} _{i\in B} = 1 \end{aligned}$$
(8)

and updated after each iteration to:

$$\begin{aligned} \left\{ w_i^{(t)}\right\} _{i \in B} = \frac{1}{\max \left\{ |Ax^{(t-1)}-b|_i, 0.0001 \right\} } \end{aligned}$$
(9)

As shown In Fig. 1, the IRLS is more accurate and ignores outliers by setting them a low weight. On the other hand, the IRLS algorithm is computationally expensive and time-consuming.

Fig. 1.
figure 1

LLS Vs. IRLS fitting of DWI Signal.

1.2 Fetal Lung Maturity Assessment with qDWI

Assessing fetal lung maturation using qDWI was first suggested by Moore et al. [13] in 2001. More recently, Afacan et al. [1] demonstrated a strong association between ADC and GA in fetuses with normal lung development. The ADC is quantified per voxel by LLS regression (Eq. 4). Then, the averaged ADC in the lung can indicate the GA of the fetus according to the saturation-exponential model suggested by [1]:

$$\begin{aligned} ADC = ADC_{sat}(1-e^{-\alpha \cdot GA}) \; \end{aligned}$$
(10)

Since the ADC quantification is done voxel-wise, it is sensitive to potential misalignment between image volumes acquired at different b-values, which accrue from fetal motion. Previous techniques for motion compensation include post-acquisition motion compensation based on image registration to bring the volumes acquired at different b-values into the same physical coordinate space before fitting a signal decay model [7, 11]. However, each b-value image has a different contrast. As a result, independent registration of different b-value images to a b = 0 s/mm\(^2\) image may result in suboptimal registration, especially for high b-value images where the signal is significantly attenuated and the signal-to-noise ratio is low [9].

2 Method

We hypothesize that simultaneous qDWI analysis and fetal motion compensation will result in improved quantification of the ADC, which will correlate better with fetal lung maturity compared to qDWI analysis without compensating for motion and to motion compensated approach which does not account for the signal decay model fit quality.

We define the simultaneous qDWI analysis and motion compensation problem as follows:

$$\begin{aligned} \widehat{\varPhi },\widehat{ADC} = \mathop {\mathrm {\arg \!\min }}\limits _{\varPhi ,ADC} \sum _{i \in B}\Vert \phi _i \circ S_i-S_0\exp (-b_i\cdot ADC)\Vert ^2 \end{aligned}$$
(11)

where \(\varPhi =\{\phi \}_{i \in B}\) is the set of transformations that align the different b-value images to the images predicted by the model, and B is the number of b-values used during the DWI acquisition.

Taking an unsupervised DNN-based perspective, the optimization problem seeks to find the DNN weights that minimize the following:

$$\begin{aligned} \widehat{\varTheta } = \mathop {\mathrm {\arg \!\min }}\limits _{\varTheta } \sum _{i \in B}\Vert f_{\varTheta }(\{b_i,S_i\}_{i \in B})[0] \circ S_i-S_0\exp (-b_i\cdot f_{\varTheta }(\{b_i,S_i\}_{i \in B})[1])\Vert ^2 \end{aligned}$$
(12)

where \(\varTheta \) are the DNN parameters to be optimized, \(f_{\varTheta }(\{b_i,S_i\}_{i=0}^{B})[0]\) is the first output of the DNN model, represents the set of transformations \(\varPhi \) between the different b-value images \(\{S_i\}_{i \in B}\), and \(f_{\varTheta }(\{b_i,S_i\}_{i \in B})[1])\) is the second output of the DNN model represents the predicted ADC.

2.1 DNN Architecture

Figure 2 presents our qDWI-Morph architecture used for the optimization of Eq. 12. The qDWI-Morph model is composed of two sub-networks: a qDWI model fitting sub-network and an image registration sub-network. Our method is iterative, where the motion-corrected images from the previous iteration enter as input to the next iteration until convergence. We normalize the input in each iteration k by the maximal value of the signal at the previous iteration \(S_0^{(k-1)}\). The input to the model at each iteration k is a set of 3D images from the same patient, each scanned with a different b-value along with their corresponding b-values \(\left\{ b_i,S_i \right\} _{i \in B}^{(k)}\). The output of our model is composed of the set of motion-corrected images forced pixel-wise to the mono-exponential model (Eq. 1).

Fig. 2.
figure 2

Overall architecture of our proposed framework.

Quantitative DWI Model Fitting Sub-network. first layer is a LLS layer for quantifying the ADC at each pixel using Eq. 4. The second layer is a reconstruction layer that generates a new set of 3D images, \(\left\{ R_b \right\} _{b \in B}^{(k)}\), by calculating the model pixel-wise using Eq. 1. The reconstructed set, \(\left\{ R_b \right\} _{b \in B}^{(k)}\), is retreated as fixed images and is an input for the second sub-network, the registration network.

Registration Sub-network. is based on the publicly available deep learning framework for deformable medical image registration, VoxelMorph [3]. The moving images are \(\left\{ S_b \right\} _{b \in B}^{(k)}\), and the fixed one are \(\left\{ R_b \right\} _{b \in B}^{(k)}\). The output of the VoxelMorph network is a registration field, \(\phi \), that can be applied to the moving images to get the next motion-compensated images, \(\left\{ S_b \right\} _{b \in B}^{(k+1)} \). The registration is done between corresponding b-values images from the moving and fixed images. For example, the moving image \(S_0\) will be registered to the fixed image \(R_0\). This way, we overcome the differences in contrast between b-values and use prior knowledge that the resulting compensated image needs to follow the mono-exponential model.

2.2 Convergence Criteria

In each iteration, we calculate the averaged ADC of the lung at the given region of interest (ROI). We quantify the ADC by the IRLS algorithm from Eq. 7. We define convergence of the model after five iterations without change in the calculated ADC. We leverage our prior knowledge of the model (Eq. 1) to choose the best iteration as the iteration with the highest \(R^2\) from the IRLS fitting.

2.3 Bio-physically-informed Loss Function

Our bio-physically-informed loss function consists of 3 terms.

$$\begin{aligned} L = L_{similarity} + \alpha _1 L_{smooth} +\alpha _2 L_{Model\, fit} \end{aligned}$$
(13)

L\(\boldsymbol{_{similarity}}\) is a \(L_1\) loss applied to corresponding b-values images from fixed and wrapped moving images, averaged over the B b-values images:

$$\begin{aligned} L(R^{(k)},S^{(k)}\circ \phi _i^{(k)}) = \frac{1}{B} \frac{1}{|\varOmega |}\sum _{i\in B}\sum _{p\in \varOmega }|R_i^{(k)}(p)-[S_i^{(k)}\circ \phi _i^{(k)}](p)| \end{aligned}$$
(14)

where \(\varOmega \) is the image dimension. Minimizing \(L_{similarity}\) will encourage \(\left\{ S_i \right\} _{b \in B}^ {(k)} \circ \phi _i^{(k)}\) to approximate \(\left\{ R_i \right\} _{b \in B}^{(k)}\), but may generate a non-smooth \(\phi \) that is not physically realistic [3].

L\(\boldsymbol{_{smooth}}\) is a regularization term introduced by Balakrishnan et al. [3]. This loss term encourages a smooth displacement field \(\phi \) using a diffusion regularize on the spatial gradients of displacement u:

$$\begin{aligned} L_{smooth}(\varPhi ) = \sum _{p\in \varOmega } \left\| \nabla u(p) \right\| ^2 \end{aligned}$$
(15)

L\(\boldsymbol{_{model\ fit}}\) is the loss that responsible for forcing each voxel to act according to the mono-exponential model from Eq. 2. This loss is an MSE loss on the least square residual:

$$\begin{aligned} L_{model\ fit}(ADC) = \frac{1}{B}\frac{1}{\left| \varOmega ^* \right| }\sum _{i\in B}\sum _{p \in \varOmega ^*} (log(S_0)-b_i\cdot ADC-log(S_i))^2 \end{aligned}$$
(16)

where \(\varOmega ^*\) is a subset of the image, including only voxels from the lung, as we assume the mono-exponential model can describe them, contrary to the background, which doesn’t present a mono-exponential decay of the DWI signal.

3 Experiments

3.1 Clinical Data-Set

Legacy fetal DWI data was used in the study. The data acquisition was performed on a Siemens 3T Skyra scanner equipped with an 18-channel body matrix coil. Each patient was scanned with a multi-slice, single shot, echo-planar imaging (EPI) sequence that was used to acquire diffusion-weighted scans of the lungs. The in-plane resolution was 2.5 mm \(\times \) 2.5 mm for each study, and the slice thickness was set at 3 mm. Echo time (TE) was 60 ms, whereas repetition time (TR) ranged from 2 s to 4.4 s depending on the number of slices required to cover the lungs. Each patient was scanned with 6 different b-values (0, 50, 100, 200, 400, 600 s/mm\(^2\)) in axial and coronal planes. A region of interest (ROI) was manually drawn for each case in the right lung [1]. We cropped each image to a shape: \(96 \times 96 \times 16\) and normalized it by the maximal value at \(S_0\). The data includes 38 cases with a range of minor misalignment between the different b-values image volumes.

3.2 Experiment Goals

The objectives of the experiment are: 1) To analyze the effect of quantitative DWI motion-compensation on the correlation between the ADC parameter and GA. 2) To analyze the contribution of our proposed model fitting quality loss in addition to the registration loss in improving the observed correlation between the ADC parameter and GA.

3.3 Experimental Setup

Our baseline method is ADC quantification without motion compensation. We compared the baseline method to our suggested method with: 1) Registration loss solely, and 2) Our hybrid loss combining both registration loss and a model fitting quality loss. For each of the three methods, we quantified the averaged ADC in the right lung of each subject by IRLS algorithm. We used an exponential saturation model suggested by Afacan et al. [1] described in Eq. 10 above.

3.4 Implementation Details

We implemented our models on PyCharm 2021.2.3, Python 3.9.12 with PyTorch 1.11.0.

We applied our suggested methods with a batch size of one, meaning that each batch is data from one patient with size: \(n_b \times n_x \times n_y \times n_z \), where \(n_b\) is the number of b-values used for scanning the patient, and \(n_x \times n_y \times n_z\) is the image shape. We trained the networks in two epochs so that the earlier cases will be contributed from the later ones. We experimented the affect of training in a wide range of epochs and found that the network converged after the second epoch, and there was no further improvement after that. We used an Adam optimizer with an initial learning rate of 10-4. If the total loss increases compared to the previous iteration, we reduce the learning rate by 10. We limited the number of iterations for each case to 50. The hyper-parameter we used are: \(\alpha _1 = 0.01\), \(\alpha _2 = 1000\). We choose \(\alpha _2\) by a search-grid of the best \(\alpha _2\) in terms of correlation between ADC and GA. For testing the qDWI-Morph method without fit model loss term, we set \(\alpha _2 = 0\).

4 Results

Figure 3 presents an example of DWI data before accounting for motion by the registration. Figure 4 presents our iterative motion-compensation and model estimation. The top row is the motion-compensation b = 0 s/mm\(^2\) images from different iterations, where the top-left image is the input image. The second row is the ADC map result from the LLS layer, and the bottom row is the corresponded reconstructed b = 0 s/mm\(^2\) image. The right column is the convergence iteration. The ADC map (middle row) becomes sharper and more clinically-meaningful as the motion is correct during the iterations. However, the final motion-compensated b-value images become more blurry as a result of the registration wrapping process by the linear interpolation.

Fig. 3.
figure 3

Sample case with ROI. Top row left to right: b = 0, 50, 100 s/mm\(^2\). Bottom row left to right: b-value = 200, 400, 600 s/mm\(^2\).

Fig. 4.
figure 4

The process done by our method, qDWI-Morph, demonstrated over time. Top row: the motion-compensation b = 0 s/mm\(^2\) images. Second row: ADC map result from the LLS layer. Bottom row: the model-reconstructed b = 0 s/mm\(^2\) images.

Figure 5 demonstrates the averaged signal in the ROI as a function of the b-value at different iterations. The lines are the corresponding fit to Eq. 1. At the last iteration, after the motion compensation process (5c), the dots behave according to the expected model and are less scattered.

Figure 6 shows the ADC parameter plotted against GA for all three methods. The data is color-coded by the degree of conformity to the mono-exponential model from Eq. 1 in terms of \(R^2\). The Darker the dot, the higher \(R^2\). Our approach achieved the best correlation (\(R^2=0.32\)) between the ADC and the GA compared to both motion compensation by our qDWI-Morph without adding the model fit loss (\(R^2=0.28\)) and to baseline approach without motion compensation (\(R^2=0.13\)).

Table 1 summarizes the fitted ADC saturation model (Eq. 10) using the different approaches along with the correlation between the ADC and GA in terms of \(R^2\). The fitted model parameters are bout the same for all methods. However, our qDWI-Morph achieved the best correlation between the ADC and the GA, since the average ADC vs. GA is less sparse, as seen in Fig. 6.

Fig. 5.
figure 5

The averaged signal in the ROI for one case, as a function of b-value at different iterations, with a curve fit to the mono-exponential model: (a) Original data, (b) iteration 19, and (c) iteration 38.

Fig. 6.
figure 6

Averaged ADC in the right lung vs. GA with the three methods: (a) Baseline; W.O motion compensation. (b) qDWI-Morph W.O model fit loss. (c) qDWI-Morph. The data is color-coded by the degree of conformity to the mono-exponential model from Eq. 1 in terms of \(R^2\).

Table 1. The correlation of the averaged ADC in the right lung vs. GA by the three methods: W.O M.C; the baseline method, ADC quantification without motion compensation. W.O F.L; qDWI-Morph without model fit loss, and our method: q-DWI-Morph.

5 Conclusions

We introduced qDWI-Morph, an unsupervised deep-neural-networks approach for Motion-compensated quantitative Diffusion-Weighted MRI analysis with application in fetal lung maturity assessment. Our model coupled a registration sub-network with a model fitting sub-network to simultaneously estimate the motion between the different b-value images and the signal decay model parameters. The optimization of the model weights is driven by minimizing a bio-physically-informed loss representing both the registration loss and the fit quality loss. The integration of the fit quality loss encourages the model to produce deformation fields that will lead to bio-physically expected behavior of the signal along the b-value axis, in addition to the standard registration loss, which encourages similarity and smoothness within the deformation field of each b-value image. Our experiments demonstrated an added-value of adding the model-fitting loss in addition to the registration loss for fetal lung maturity assessment. The proposed approach can potentially improve our ability to quantify DWI signal decay model parameter in cases with motion.