+ Summary
+ We have developed UncertainSCI
+ (UncertainSCI,
+ 2020) as an open-source tool designed to make modern
+ uncertainty quantification (UQ) techniques more accessible in
+ biomedical simulation applications. UncertainSCI is implemented in
+ Python with a noninvasive interface to meet our software design goals
+ of 1) numerical accuracy, 2) simple application programming interface
+ (API), 3) adaptability to many applications and methods, and 4)
+ interfacing with diverse simulation software. Using a Python
+ implementation in UncertainSCI allowed us to utilize the popularity
+ and low barrier-to-entry of Python and its common packages and to
+ leverage the built-in integration and support for Python in common
+ simulation software packages and languages. Additionally, we used
+ noninvasive UQ techniques and created a similarly noninvasive
+ interface to external modeling software that can be called in diverse
+ ways, depending on the complexity and level of Python integration in
+ the external simulation pipeline. We have developed and included
+ examples applying UncertainSCI to relatively simple 1D simulations
+ implemented in Python, and to bioelectric field simulations
+ implemented in external software packages, which demonstrate the use
+ of UncertainSCI and the effectiveness of the architecture and
+ implementation in achieving our design goals. UnceratainSCI differs
+ from similar software, notably
+ UQLab,
+ Uncertainpy,
+ and
+ Simnibs,
+ in that it can be efficiently and non-invasively used with external
+ simulation software, specifically with high resolution 3D simulations
+ often used in Bioelectric field simulations.
+ [fig:pipeline]
+ illustrates the use of UncertainSCI in computing UQ with modeling
+ pipelines for bioelectricity simulations.
+
+ User pipeline for UncertainSCI. After the user inputs
+ parameter distributions, UncertainSCI will compute an efficient
+ sampling scheme. The parameter samples are run through the targeted
+ modeling pipeline, which can be implemented in external software
+ tools. The computed solutions are collected and compiled into
+ relevant statistics with UncertainSCI.
+
+
+
+
+
+ Statement of need
+ Biomedical computer models include many input parameters that do
+ not have precisely defined values, for example because their value
+ defines physiological processes that are not uniform across patients.
+ As such, any simulation output necessarily has some uncertainty
+ associated with the uncertain value of the input parameter.
+ Exploration and quantification of this model output uncertainty is
+ challenging when more than a single parameter is present; biomedical
+ computer models often have 5-20 such parameters. Quantification of
+ this uncertainty through UQ techniques provides statistics and
+ sensitivity information, a critical component when evaluating the
+ relative impact of parameter variation on the solution accuracy. While
+ the need and importance of UQ in clinical modeling is generally
+ accepted, automated tools for implementing UQ techniques remain
+ evasive for many researchers. UncertainSCI has been used to quantify
+ uncertainty in multiple modeling pipelines, including: cardiac tissue
+ modeling
+ (Bergquist
+ et al., 2021;
+ Rupp
+ et al., 2020,
+ 2021),
+ electrocardiographic (ECG) simulation
+ (Geneser
+ et al., 2005;
+ Swenson
+ et al., 2011), ECG imaging (ECGI)
+ (Tate
+ et al., 2019), transcranial current stimulation (tCS) modeling
+ (Rampersad
+ et al., 2021;
+ Tate
+ et al., 2021), and electrocorticography (ECoG) stimulation
+ (Rampersad
+ et al., 2021;
+ Tate
+ et al., 2021).
+
+
+ Mathematics
+ In UncertainSCI, we quantify forward parametric uncertainty in
+ cardiac simulations using polynomial chaos expansions (PCE)
+ (Xiu,
+ 2010). Although we also have an implementation of Monte Carlo
+ sampling, and we intend to expand to UncertianSCI to include other UQ
+ methods, such as Guassian process emulators
+ (Rasmussen,
+ 2004), Markov Chain Monte Carlo
+ (Rahimi
+ et al., 2016) and Bayesian
+ inference(Xu
+ et al., 2014), we primarily focused on PCE due to its
+ non-invasive formulation and computational efficiency. PCE
+ approximates the dependence of a quantity of interest (QoI) that is
+ the model output from the forward simulation on a finite number of
+ random parameters via a multivariate polynomial function of those
+ parameters. With
+
+ u
+ the QoI (scalar-valued for simplicity), and
+
+
+ p∈ℝd
+ the vector of uncertain parameters, the PCE approach builds the
+ function
+
+ uN,
+ given as,
+
+ u(p)≈uN(p)=∑j=1Ncjϕj(p),
+ where the
+
+ {ϕj}j=1N
+ functions are multivariate polynomials, and the coefficients
+
+
+ {cj}j=1N
+ are learned through an ensemble of collected data,
+
+
+ {pj}j=1M→Forward model u{u(pj)}j=1M→Emulator training{cj}j=1N.
+ Typically one seeks convergence of
+
+ uN
+ to
+
+ u
+ in an
+
+ L2-type
+ norm weighted by the probability density of the parameters
+
+
+ p.
+ The polynomial function
+
+ uN
+ constitutes an emulator for QoI
+
+ u,
+ from which statistics of the QoI, including the mean, variance, and
+ parameter sensitivities, are efficiently computed from the polynomial.
+ UncertainSCI uses a particular type of pseudo-random sampling for the
+ parameter design
+
+ {pj}j=1M,
+ along with a particular weighted least-squares approach for emulator
+ training, both of which are recently developed advances in
+ high-dimensional approximation. The entire procedure
+ 1 is non-intrusive, since
+ the forward model need only be queried at a particular set of
+ samples.
+ The efficiency of PCE for analysis of UQ in a forward simulation
+ depends on efficient selection of parameter samples
+
+
+ {pj}j=1M.
+ The goal is to use as few samples
+
+ M
+ as possible while still ensuring that
+
+ uN
+ is an accurate emulator for
+
+ u.
+ UncertainSCI uses a two-step approach to strategically sample the
+ parameter space: 1. A discrete candidate set is generated via random
+ sampling with respect to a ‘’biased’’ probability measure
+
+
+ μ,
+ that is distinct from (but related to) the probability distribution of
+ the parameter
+
+ p.
+ 2. A weighted D-optimal design is sought by subsampling this discrete
+ candidate set. UncertainSCI uses a greedy approach to produce an
+ approximation to such a design.
+ The probability measure
+
+ μ
+ that must be randomly sampled is a distribution that exploits a
+ concentration of measurable phenomena to provably increase the quality
+ of the candidate set
+ (Cohen
+ & Migliorati, 2017). Sampling from this distribution when
+ the components of the parameter vector
+
+ p
+ are independent is computationally efficient, having complexity that
+ is linear in the number of parameters
+
+ d
+ (Narayan,
+ 2018). The relatively large candidate set generated from this
+ random sampling is pruned via subsampling using a weighted D-optimal
+ design optimization. UncertainSCI’s algorithm for this approach
+ approximately computes a weighted D-optimal design via the weighted
+ approximate Fekete points (WAFP) procedure
+ (Burk
+ et al., 2020;
+ Guo
+ et al., 2018), which greedily maximizes a weighted matrix
+ determinant. The result is a geometrically unstructured parameter
+ design of
+
+ M
+ samples for use in the pipeline
+ 1.
+ Once the experimental design is created through the WAFP procedure,
+ an ensemble of forward simulations
+
+ {u(pj)}j=1M
+ is collected from the simulation software, and UncertainSCI produces a
+ PCE emulator
+
+ uN
+ through a (weighted) least-squares procedure. From this emulator,
+ UncertainSCI can compute statistics, sensitivities, residuals, and
+ cross-validation metrics, and can adaptively tune the complexity of
+ the PCE emulator based on a user-prescribed tolerance and/or
+ computational budget.
+
+