Fast MOR-Based Approach to Uncertainty Quantification in ... · Fast MOR-Based Approach to...

4
IEEE TRANSACTIONS ON MAGNETICS, VOL. 52, NO. 3, MARCH 2016 7200904 Fast MOR-Based Approach to Uncertainty Quantification in Transcranial Magnetic Stimulation Lorenzo Codecasa 1 , Luca Di Rienzo 1 , Konstantin Weise 2 , Stefanie Gross 3 , and Jens Haueisen 3 1 Dipartimento di Elettronica, Informazione e Bioingegneria, Politecnico di Milano, Milan 20133, Italy 2 Department of Advanced Electromagnetics, Technische Universitaet Ilmenau, Ilmenau 98693, Germany 3 Institute of Biomedical Engineering and Informatics, Technische Universitaet Ilmenau, Ilmenau 98693, Germany We propose a new technique based on parametric model order reduction to efficiently calculate the polynomial chaos expansion of the induced electric field in the human brain in the framework of transcranial magnetic stimulation. A comparison to the traditional non-intrusive method based on regression is provided. The relative differences of the mean and the standard deviation less than 0.1% show the accuracy of the proposed method. The new algorithm accelerates the computations by more than two orders of magnitude. In this way, the computational overhead in the case of uncertainty quantification is considerably decreased with respect to the standard methods. Index Terms—Model order reduction (MOR), polynomial chaos expansion (PCE), transcranial magnetic stimulation (TMS), uncertainty. I. I NTRODUCTION T HE quantification of uncertainty can play an important role in transcranial magnetic stimulation (TMS) [1], [2], and there is an essential need for more effective techniques due to the increasing model complexity. In most cases, the Monte Carlo methods are too expensive, and the techniques based on polynomial chaos expanion (PCE) are favorable. In this paper, a novel approach based on parametric model order reduction (PMOR) is proposed, which allows reducing the computational costs of the PCE approaches. Drissaoui et al. [14] proposed somehow similar approaches for different applications. II. METHODS A. TMS Deterministic Modeling In the deterministic modeling phase, we use a realistic head model [3], which is shown in Fig. 1. It contains five different tissues, namely, scalp, skull, cerebrospinal fluid (CSF), gray matter (GM), and white matter (WM). The model is discretized using approximately N = 2.8 × 10 6 linear tetrahedral finite elements. The excitation coil is a Magstim 70 mm double coil with nine windings, which is placed above the motor cortex area M1 (Brodman area 4) at a distance of 4 mm from the scalp. The coil is approximated by means of 2712 magnetic dipoles constituted in three layers [4]. The electromagnetic problem at hand is simplified due to the low electrical con- ductivities and the moderate excitation frequencies, which are in the range of 2–3 kHz, so that the secondary magnetic field from the induced eddy currents can be neglected [5]. In this way, the magnetic field can be expressed in terms of the magnetic vector potential a c produced by the excitation Manuscript received June 25, 2015; accepted August 23, 2015. Date of publication August 31, 2015; date of current version February 17, 2016. Corresponding author: L. Di Rienzo (e-mail: [email protected]). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/TMAG.2015.2475120 Fig. 1. FEM model of the human head used for uncertainty quantification (available online [3]). coil (b c =∇× a c and ∇· a c = 0). Considering the current conservation law, this reduces solving the following equation at an angular frequency ω with the Neumann conditions on the boundary of the spatial domain : ∇· (σ(r, p)ϕ(r, p)) = i ω ∇· (σ (r, p)a c (r)) (1) where the unknown ϕ(r, p) is the electric potential, a c (r) is the known magnetic vector potential, and σ(r, p) is the electrical conductivity; the latter can be assumed to be a linear combination of the P parameters p i , forming vector p σ(r, p) = σ 0 (r) + P i =1 σ i (r) p i . (2) As it is well known, the finite element method (FEM) discretization is achieved by rewriting the electromagnetic 0018-9464 © 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

Transcript of Fast MOR-Based Approach to Uncertainty Quantification in ... · Fast MOR-Based Approach to...

Page 1: Fast MOR-Based Approach to Uncertainty Quantification in ... · Fast MOR-Based Approach to Uncertainty Quantification in Transcranial Magnetic Stimulation Lorenzo Codecasa1, Luca

IEEE TRANSACTIONS ON MAGNETICS, VOL. 52, NO. 3, MARCH 2016 7200904

Fast MOR-Based Approach to Uncertainty Quantificationin Transcranial Magnetic Stimulation

Lorenzo Codecasa1, Luca Di Rienzo1, Konstantin Weise2, Stefanie Gross3, and Jens Haueisen3

1Dipartimento di Elettronica, Informazione e Bioingegneria, Politecnico di Milano, Milan 20133, Italy2Department of Advanced Electromagnetics, Technische Universitaet Ilmenau, Ilmenau 98693, Germany

3Institute of Biomedical Engineering and Informatics, Technische Universitaet Ilmenau, Ilmenau 98693, Germany

We propose a new technique based on parametric model order reduction to efficiently calculate the polynomial chaos expansion ofthe induced electric field in the human brain in the framework of transcranial magnetic stimulation. A comparison to the traditionalnon-intrusive method based on regression is provided. The relative differences of the mean and the standard deviation less than 0.1%show the accuracy of the proposed method. The new algorithm accelerates the computations by more than two orders of magnitude.In this way, the computational overhead in the case of uncertainty quantification is considerably decreased with respect to thestandard methods.

Index Terms— Model order reduction (MOR), polynomial chaos expansion (PCE), transcranial magnetic stimulation (TMS),uncertainty.

I. INTRODUCTION

THE quantification of uncertainty can play an importantrole in transcranial magnetic stimulation (TMS) [1], [2],

and there is an essential need for more effective techniquesdue to the increasing model complexity. In most cases, theMonte Carlo methods are too expensive, and the techniquesbased on polynomial chaos expanion (PCE) are favorable.In this paper, a novel approach based on parametricmodel order reduction (PMOR) is proposed, which allowsreducing the computational costs of the PCE approaches.Drissaoui et al. [14] proposed somehow similar approachesfor different applications.

II. METHODS

A. TMS Deterministic Modeling

In the deterministic modeling phase, we use a realistic headmodel [3], which is shown in Fig. 1. It contains five differenttissues, namely, scalp, skull, cerebrospinal fluid (CSF), graymatter (GM), and white matter (WM). The model is discretizedusing approximately N = 2.8 × 106 linear tetrahedral finiteelements. The excitation coil is a Magstim 70 mm double coilwith nine windings, which is placed above the motor cortexarea M1 (Brodman area 4) at a distance of 4 mm from thescalp. The coil is approximated by means of 2712 magneticdipoles constituted in three layers [4]. The electromagneticproblem at hand is simplified due to the low electrical con-ductivities and the moderate excitation frequencies, which arein the range of 2–3 kHz, so that the secondary magneticfield from the induced eddy currents can be neglected [5].In this way, the magnetic field can be expressed in terms ofthe magnetic vector potential ac produced by the excitation

Manuscript received June 25, 2015; accepted August 23, 2015. Date ofpublication August 31, 2015; date of current version February 17, 2016.Corresponding author: L. Di Rienzo (e-mail: [email protected]).

Color versions of one or more of the figures in this paper are availableonline at http://ieeexplore.ieee.org.

Digital Object Identifier 10.1109/TMAG.2015.2475120

Fig. 1. FEM model of the human head used for uncertainty quantification(available online [3]).

coil (bc = ∇ × ac and ∇ · ac = 0). Considering the currentconservation law, this reduces solving the following equationat an angular frequency ω with the Neumann conditions onthe boundary ∂� of the spatial domain �:

∇ · (−σ(r,p)∇ϕ(r,p)) = iω∇ · (σ (r,p)ac(r)) (1)

where the unknown ϕ(r,p) is the electric potential, ac(r) isthe known magnetic vector potential, and σ(r,p) is theelectrical conductivity; the latter can be assumed to be a linearcombination of the P parameters pi , forming vector p

σ(r,p) = σ0(r)+P∑

i=1

σi (r) pi . (2)

As it is well known, the finite element method (FEM)discretization is achieved by rewriting the electromagnetic

0018-9464 © 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

Page 2: Fast MOR-Based Approach to Uncertainty Quantification in ... · Fast MOR-Based Approach to Uncertainty Quantification in Transcranial Magnetic Stimulation Lorenzo Codecasa1, Luca

7200904 IEEE TRANSACTIONS ON MAGNETICS, VOL. 52, NO. 3, MARCH 2016

problem in the weak form (problem D)∫

�∇ϕ′(r) · σ(r,p)∇ϕ(r,p) dr

= iω∫

�∇ϕ′(r) · σ(r,p)ac(r) dr (3)

for all functions ϕ′(r), in which both ϕ′(r) and ϕ(r,p) belongto the linear tetrahedral finite element space X of dimension|X | = N whose degrees of freedom (DoFs) form vector x(p).

B. TMS Stochastic Modeling

The electrical conductivities of the scalp and the skin aremodeled as deterministic, since they poorly affect the inducedelectric field inside the human brain. On the other hand,the conductivities of the CSF, the GM, and the WM showa wide spread across individuals and measurements andare then modeled as uniform distributed random variables.The conductivity values are defined by collecting the datafrom primary sources [6]. The deterministic conductivityvalues (in siemens per meter) were set for the scalpto 0.34 [7] and for the skull to 0.025 [8], [9]. The stochasticconductivities were chosen to vary in the case of theCSF between 1.432 and 2.148 [10], for the GM between0.153 and 0.573 [6], [11], [12], and for the WM between0.094 and 0.334 [6], [11], [12].

In a PCE analysis, the electric potential ϕ(r,p) is approxi-mated in the form

ϕ(r,p) =∑

|α|≤Q

ϕα(r)ψα(p) (4)

where α are the multi-indices of the P elements and ψα(p) arethe polynomials of degrees less than a chosen Q, formingan orthonormal basis in the probability space of the randomvariable pi . The number of coefficients in a maximum orderPCE is given by

M =(

P + Q

P

). (5)

Both intrusive and non-intrusive approaches to PCE can beused. Non-intrusive approaches are commonly adopted as themost efficient alternatives to the Monte Carlo technique. In thisway, the coefficients ϕα(r) are determined from the solutionsϕ(r,p) of the deterministic problem D for all the values of pin a proper set G. However, even using sparse grids [13], theset G becomes very large when the number of parameters Por the polynomial degree Q increases. Thus, the number ofdeterministic problems to be solved can become unfeasible.

C. Parametric Model Order Reduction Approach

The alternative Algorithm 1 is proposed, which constructs areduced order model tailored to a PCE analysis solving a muchsmaller number of deterministic problems with respect to thenon-intrusive PCE approaches. Moreover, the computationalcost of the solution to these deterministic problems is muchsmaller with respect to the non-intrusive approaches, sincethe accurate estimations of the solution to these deterministicproblems are derived from the reduced order model solutions

Algorithm 1 PMOR-Based Algorithm

Set k := 0 (dimension of the reduced model)Set ϑ := 0 (norm of the residual)Set linear space S0 := ∅Choose vector p in GSet ϕ(r,p) := 0repeat

Set k := k + 11 Solve problem (3) for ϕ(r,p) using ϕ(r,p) as initial

estimation in the iterative technique2 Generate an orthonormal basis of the linear space Sk

spanned by Sk−1 and ϕ(r,p)3 Generate reduced order model Rk(p), projecting

problem D onto space Sk

for all q ∈ G do4 Solve the reduced order model Rk(q) obtaining

ϕ(r,q) as an approximation for ϕ(r,q)5 Estimate the approximation residual η

if η > ϑ thenSet ϑ := η

6 Set p := q

until ϑ > εSet K := k

7 Determine the PCE expansion of the solution to thereduced order model RK (p) and reconstruct the PCEexpansion of ϕ(r,p)

taken as starting points in the adopted iterative methods forsolving linear systems. The PCE expansion of the solution tothe original problem is then obtained from such a reducedorder model.

In Algorithm 1, at step 1, the FEM discretization of theelectromagnetic deterministic problem (3) is solved for eachselected value of p. A preconditioned conjugate gradientmethod is used, and the number of iterations is reducedby assuming as initial point the ϕ(r,p) estimation providedby the previously computed compact model. At step 2,an orthonormal basis of space Sk is generated, computing a setof functions vh(r), with h = 1, . . . , k, spanning all functionsϕ(r,p) computed at step 1 and forming the column vector

v(r) = [vh(r)].At step 3, the reduced order model Rk(p) is constructed. Thismodel is obtained from (3) assuming that the X space issubstituted by its subspace, spanned by functions vh(r), withh = 1, . . . , k. In this way, the compact model takes the form

(S0 +

P∑

i=1

pi Si

)x(p) = iω

(u0 +

P∑

i=1

pi ui

)(6)

where Si , with i = 1, . . . , P , are the square matrices ofdimension k given by

Si =[∫

�∇vh(r) · σi (r)∇vl(r) dr

], i = 0, . . . , P

Page 3: Fast MOR-Based Approach to Uncertainty Quantification in ... · Fast MOR-Based Approach to Uncertainty Quantification in Transcranial Magnetic Stimulation Lorenzo Codecasa1, Luca

CODECASA et al.: FAST MOR-BASED APPROACH TO UNCERTAINTY QUANTIFICATION IN TMS 7200904

Fig. 2. Mean μE , standard deviation σE , and absolute differences of both the methods in the sagittal plane under the excitation coil determined by PMORand REG.

and ui , with i = 0, . . . , P , are the column vectors of k rows

ui =[∫

�∇vh(r) · σi (r)ac(r) dr

].

Vector x(p) allows to approximate the solution ϕ(r,p) to (3)as (step 4)

ϕ(r,p) =k∑

h=1

xh(p)vh(r) = vT (r)x. (7)

At step 5, η represents the residual when ϕ(r,q) is substitutedby ϕ(r,q) in (3). At step 6, the value of q in G maximizingthe value of η becomes the candidate p for solving thedeterministic problem (3) at next step 1. At step 7, an intrusivePCE approach is applied to the reduced order model RK .Thus, x(p) is approximated by its PCE

x(p) =∑

|α|≤Q

yαψα(p). (8)

Substituting this expansion into (6), multiplying (6) by ψβ(p),with |β| ≤ M , and applying the expected value operator E[·],it results in(1M ⊗ S0 +

P∑

i=1

Pi ⊗ Si

)vec(Y) =

(e1 ⊗ u0 +

P∑

i=1

Pi e1 ⊗ ui

)

where

Pi = [E[piψα(p)ψβ(p)]

]

are the square matrices of order M , ⊗ indicates Kronecker’stensor product, Y = [ yα] is a K × M matrix, vec(Y ) is thevector of the stacked columns of Y , and e1 is a column vectorof M rows made of all zeros except the first element that isone. In these and all the following definitions of matrices andvectors, the entries are indexed by organizing the multi-indicesin a lexicographical order.

This linear system of equations in the unknowns vec(Y)has reduced dimension with respect to that of the stan-dard intrusive PCE approach, so that it can be solved at

negligible cost. From the PCE expansion of x(p), the PCEexpansion of ϕ(r,p) approximating the PCE of ϕ(r,p) isstraightforwardly obtained as

ϕ(r,p) =∑

|β|≤Q

v(r) yαψα(p). (9)

D. Non-Intrusive Approach

In order to compare the numerical results of the newmethod, the PCE coefficients ϕα(r) are also determined using atraditional non-intrusive approach based on regression (REG).The implementation presented in [2] is used.

In such an approach, the computational grid G is constructedas the tensor product of the roots of the Qth-order Legendrepolynomials resulting in a total number of G = Q P . In thisway, the values pβ of the parameter vector are considered,in which multi-index β = (β1, . . . , βP ), with βi = 1, . . . , Qand i = 1, . . . , P .

The solutions ϕ(r,pβ) of the deterministic problems (3) arethen computed for all the chosen values pβ of the parametervector. The N DoFs of each of these solutions, formingvector x(pβ), define the N × G matrix X = [x(pβ)]. ThePCE of the DoF, forming the N × M matrix Y = [ yα],is obtained to solve the overdetermined system of equationsin the least squares sense

YA = X

where A = [ψα(pβ)] is an M × G matrix. From the PCE ofthe DoF, the PCE of the electric potential ϕα(r) ensues.

E. Post-Processing

The PCE of the magnitude E(r,p) of the induced electricfield is determined in a post-processing stage in the form

E(r,p) =∑

|α|≤M

Eα(r)ψα(p). (10)

Since the PCE polynomials are assumed orthonormal,from (10), the statistical mean μE (r) of E(r,p) is directly

Page 4: Fast MOR-Based Approach to Uncertainty Quantification in ... · Fast MOR-Based Approach to Uncertainty Quantification in Transcranial Magnetic Stimulation Lorenzo Codecasa1, Luca

7200904 IEEE TRANSACTIONS ON MAGNETICS, VOL. 52, NO. 3, MARCH 2016

Fig. 3. PDFs of E in three points located right under the excitationcoil determined by the MOR and the REG. The polynomials are sampled1 × 106 times in a post-processing step.

given by the first PCE coefficient. The standard deviationσE (r) is calculated as the sum of the remaining squaredcoefficients

μE (r) = E0(r), σE (r) =√ ∑

0<|α|<Q

E2α(r).

III. NUMERICAL RESULTS

The grid G adopted in both PMOR and REG is composedof G = 53 = 125 nodes, and the chosen polynomialdegree for PCE is P = 5. The spatial distributions ofμE and σE determined by the PMOR (with K = 14) and theREG approaches are shown in Fig. 2. The absolute differencebetween both the approaches shows minor deviations. Theequivalence is underlined by the relative error in the energynorm, which is 4.5 × 10−4% for the mean and 1.7 × 10−2%for the standard deviation. The mean induced electric fieldallows a more general interpretation of the estimated fielddistributions. Moreover, the standard deviation reveals theareas in the GM and the WM, where the electric field showsa wide spread as a result of the uncertain conductivity. Sincethe PCE is performed in the whole brain, it is possible todetermine the probability density function (pdf) of E in everypoint by sampling the polynomials (10). The pdfs of thethree exemplary points located right under the excitation coilare evaluated and shown in Fig. 3 to further illustrate theagreement between the PMOR and the REG approaches. Forall the three pdfs, the relative error between the two approachesis <0.2%. The small differences may origin from the samplingprocedure, since the PMOR and the REG approaches did notshare the same sample set. The pdfs illustrate how the shapeand the spread of the induced electric field vary in space. It canbe observed that the spread is large inside the WM domain,which is surrounded by two domains, namely, GM and CSF,both obeying uncertain conductivities.

A major strength of the PMOR approach is its computa-tional efficiency. It required 0.8 GB of memory and a totalsimulation time of 80 s using a 2.3 GHz Intel Core 7 PC.In contrast, the REG approach required 2.2 GB and finishedafter 250 min on a more powerful computer (4 GHzIntel Core 7 PC). In this way, the PMOR is more than180 times faster than the traditional non-intrusive methods.

IV. CONCLUSION

This paper demonstrates the advantages and the applicabilityof a PMOR approach in uncertainty quantification in theframework of TMS. A modified version of the algorithmallowing GPU-based parallelization is under investigation andwill be presented elsewhere.

ACKNOWLEDGMENT

This work was supported by the DeutscheForschungsgemeinschaft in the framework of the ResearchTraining Group 1567 at the Technische Universitaet Ilmenau,Germany.

REFERENCES

[1] L. J. Gomez, A. C. Yucel, L. Hernandez-Garcia, S. F. Taylor, andE. Michielssen, “Uncertainty quantification in transcranial magneticstimulation via high-dimensional model representation,” IEEE Trans.Biomed. Eng., vol. 62, no. 1, pp. 361–372, Jan. 2015.

[2] K. Weise, L. Di Rienzo, H. Brauer, J. Haueisen, and H. Toepfer,“Uncertainty analysis in transcranial magnetic stimulation using nonin-trusive polynomial chaos expansion,” IEEE Trans. Magn., vol. 51, no. 7,Jul. 2015, Art. ID 5000408.

[3] M. Windhoff, A. Opitz, and A. Thielscher, “Electric field calculationsin brain stimulation based on finite elements: An optimized processingpipeline for the generation and usage of accurate individual headmodels,” Human Brain Mapping, vol. 34, no. 4, pp. 923–935, 2013.

[4] A. Thielscher and T. Kammer, “Electric field properties of two com-mercial figure-8 coils in TMS: Calculation of focality and efficiency,”Clin. Neurophysiol., vol. 115, no. 7, pp. 1697–1708, 2004.

[5] J. Starzynski, B. Sawicki, S. Wincenciak, A. Krawczyk, and T. Zyss,“Simulation of magnetic stimulation of the brain,” IEEE Trans. Magn.,vol. 38, no. 2, pp. 1237–1240, Mar. 2002.

[6] C. Gabriel, A. Peyman, and E. H. Grant, “Electrical conductivity oftissue at frequencies below 1 MHz,” Phys. Med. Biol., vol. 54, no. 16,pp. 4863–4878, 2009.

[7] A. Hemingway and J. F. McClendon, “The high frequency resistance ofhuman tissue,” Amer. J. Physiol., vol. 102, no. 1, pp. 56–59, 1932.

[8] C. Tang et al., “Correlation between structure and resistivity variationsof the live human skull,” IEEE Trans. Biomed. Eng., vol. 55, no. 9,pp. 2286–2292, Sep. 2008.

[9] R. Hoekema et al., “Measurement of the conductivity of skull,temporarily removed during epilepsy surgery,” Brain Topogr., vol. 16,no. 1, pp. 29–38, Sep. 2003.

[10] S. B. Baumann, D. R. Wozny, S. K. Kelly, and F. M. Meno, “The elec-trical conductivity of human cerebrospinal fluid at body temperature,”IEEE Trans. Biomed. Eng., vol. 44, no. 3, pp. 220–223, Mar. 1997.

[11] L. A. Geddes and L. E. Baker, “The specific resistance of biologicalmaterial—A compendium of data for the biomedical engineer andphysiologist,” Med. Biol. Eng., vol. 5, no. 3, pp. 271–293, May 1967.

[12] J. Latikka, T. Kuurne, and H. Eskola, “Conductivity of living intracranialtissues,” Phys. Med. Biol., vol. 46, no. 6, pp. 1611–1616, 2001.

[13] D. Xiu, Numerical Methods for Stochastic Computations: A SpectralMethod Approach. Princeton, NJ, USA: Princeton Univ. Press, 2010.

[14] M. A. Drissaoui et al., “A stochastic collocation method combined with areduced basis method to compute uncertainties in numerical dosimetry,”IEEE Trans. Magn., vol. 48, no. 2, pp. 563–566, Feb. 2012.