Machine learning modeling of lung mechanics: assessing the variability and propagation of uncertainty in respiratory-system compliance and airway resistance
Leverage of machine learning techniques to construct predictive lung function models informed by finite element simulations.
Background and Objective: Traditional assessment of patient response in mechanical ventilation relies on respiratory-system compliance and airway resistance. Clinical evidence has shown high variability in these parameters, highlighting the difficulty of predicting them before the start of ventilation therapy. This motivates the creation of computational models that can connect structural and tissue features with lung mechanics. In this work, we leverage machine learning (ML) techniques to construct predictive lung function models informed by non-linear finite element simulations, and use them to investigate the propagation of uncertainty in the lung mechanical response.
Methods: We revisit a continuum poromechanical formulation of the lungs suitable for determining patient response. Based on this framework, we create high-fidelity finite element models of human lungs from medical images. We also develop a low-fidelity model based on an idealized sphere geometry. We then use these models to train and validate three ML architectures: single-fidelity and multi-fidelity Gaussian process regression, and artificial neural networks. We use the best predictive ML model to further study the sensitivity of lung response to variations in tissue structural parameters and boundary conditions via sensitivity analysis and forward uncertainty quantification.
Results: The low-fidelity model delivers a lung response very close to that predicted by high-fidelity simulations and at a fraction of the computational time. Regarding the trained ML models, the multi-fidelity GP model consistently delivers better accuracy than the single-fidelity GP and neural network models in estimating respiratory-system compliance and resistance (
Conclusions: Our findings unveil the relevance of specific lung tissue parameters and boundary conditions in the respiratory-system response. Furthermore, we highlight the advantages of adopting a multi-fidelity ML approach that combines data from different levels to yield accurate and efficient estimates of clinical mechanical markers. We envision that the methods presented here can open the way to the development of predictive ML models of the lung response that can inform clinical decisions.
results-data
: Figures and related results from processed fromraw-data
andtests
.raw-data
: Input data needed for simulations + data generated fromtests
.src
: Files that implement functions used in simulations.tests
: Code files that implement the described work.
The main results of this research are shown below. Figure 3 shows the airway pressure, flow and volume signals predicted by high and low fidelity models of the lung during PCV simulations.
Figure 1. Construction of high-fidelity and low-fidelity lung finite-element models. (a) Computed-tomography image from which the lung domain is determined, (b) high-fidelity finite-element mesh generated from image lung domain, and (c) finite-element mesh generated for the low-fidelity lung model.
Figure 2. Simulation of lungs under PCV ventilation model. Physiological signals that describe the time evolution of (a) airways pressure, (b) flow, and (c) volume (c) are shown for the high-fidelity (solid lines) and low-fidelity model (dashed lines).
Figure 3. Effect of the equivalent high-fidelity cost (training sample size) on the prediction performance of the multi-fidelity GP, single-fidelity GP, and neural network models. (a) Respiratory-system compliance, and (b) Resistance. Results shown are for the testing set predictions. Dashed lines and error bars denote the average and standard deviation of the RMSE, respectively.
Figure 4. Performance comparison of multi-fidelity GP, single-fidelity GP, and neural network models on the respiratory-system compliance. All units are in ml/cm H$_{\text{2}}$O. Regarding the high-fidelity data for training, each model was trained with a training size of 95% (19 observations). The predictions on the testing set are analyzed using (a) correlation plots, and (b) Bland-Altman plots. In Bland-Altman plots, solid lines represent the mean difference between the high-fidelity simulations and model predictions, while dashed lines represent their corresponding $\pm$1.96 standard deviations.
Figure 5. Performance comparison of multi-fidelity GP, single-fidelity GP and neural network models on the airways resistance. All units are in cm H$_{\text{2}}$O/L/s. Regarding the high-fidelity data for training, each model was trained with a training size of 95% (19 observations). The predictions on the testing set are analyzed using (a) correlation plots, and (b) Bland-Altman plots. In Bland-Altman plots, solid lines represent the mean difference between the high-fidelity simulations and model predictions, while dashed lines represent their corresponding $\pm$1.96 standard deviations.
Figure 6. Sobol total sensitivity indices with respect to lung model parameters [$c$,
Figure 7. Main effects analysis of the respiratory-system compliance. Parameters
Figure 8. Main effects analysis of the airways resistance
Figure 9. Uncertainty propagation of constitutive model parameter
Figure 10. Uncertainty propagation analysis for respiratory-system compliance and airways resistance. Three levels of variability in the input probability distribution are considered:
FeniCS
2019.1.0numpy
scipy
matplotlib
GPy
Emukit
os
sys