Skip to main content
Scientific Reports logoLink to Scientific Reports
. 2022 Dec 21;12:22079. doi: 10.1038/s41598-022-25919-3

Localization of magnetocardiographic sources for myocardial infarction cases using deterministic and Bayesian approaches

Vikas R Bhat 1, Basudha Pal 2, H Anitha 2, Ananthakrishna Thalengala 2,
PMCID: PMC9772220  PMID: 36543846

Abstract

In this paper, the inverse problems of cardiac sources using analytical and probabilistic methods are solved and discussed. The standard Tikhonov regularization technique is solved initially to estimate the under-determined heart surface potentials from Magnetocardiographic (MCG) signals. The results of the deterministic method subjected to noise in the measurements are discussed and compared with the probabilistic models. Hierarchical Bayesian modeling with fixed Gaussian prior is employed to quantify the uncertainties in source reconstructions. A novel application of Variational Bayesian inference approach has been presented to estimate the heart sources. The reconstruction results of Variational Bayesian model with non-stationary priors are compared with solutions of simplistic Bayesian approach; and the performances are evaluated using Root Mean Square Error (RMSE) and correlation co-efficient metrics. The Bayesian solutions in the study are also extended to localize the MCG sources for two types of Myocardial infarction cases.

Subject terms: Biomedical engineering, Cardiology, Mathematics and computing

Introduction

The ionic exchange in the cardiac muscle cells creates a potential difference across the fibers known as transmembrane potentials. Due to this exchange, a tiny current flows throughout the heart cells in intra and extra cellular spaces. The spread of electrical activity on the myocardium follows a specific pathway to complete the cardiac cycle. The propagation of these electrical impulses help myocardial fibres to contract and relax. During the process of these contractions and expansions of muscles, the activity is manifested in terms of functional waves characterized as P, QRS and T waves1.

P shape is formed due to the contraction process of the atria and QRS is activated due to the ventricular depolarization; and the T wave is obtained from the relaxation of ventricles. The investigation of these electrophysiological changes in heart functioning is measured by Electrocardiogram (ECG) in terms of potential difference2. Any deviations in the ECG signals from the normal represent cardiac dysfunctions. Clinicians use ECG as a primary diagnostic tool to administer the functionality of heart diseases. Since this tool provides information at the surface level, sometimes clinicians may need further structural markings to confirm or localize the diseases with the help of non-invasive procedures.

In the biomedical society, researchers have contributed many works to minimize the invasive procedures in the diagnosis of heart diseases. Since the cardiac current flow is responsible for generating a tiny magnetic field across the human thorax, researchers3,4 developed a non-contact and non-invasive equipment called Magnetocardiogram (MCG) to record bio-magnetic fields.

MCG offers distinct advantages in analyzing the cardiac signals than ECG. Some advantages are as follows: (1) even though both ECG and MCG measurements are non-invasive, MCG is a non-contact procedure and requires less subject preparation than ECG. (2) The other advantage is that the problem of variations in skin-electrode contact impedance in ECG is circumvented in MCG due to the non-contact nature of the recordings3. (3) Also, the artefacts that may arise due to the fluctuating skin-electrode contacts in the ECG recordings are absent in the MCG. (4) MCG records the field due to primary currents and is least affected by the conductivity profiles of the intervening tissues present between the location of the heart and the thorax surface. This provides an ultimate scope to localize the cardiac sources more precisely within a few millimeters which is often not possible with the surface potentials measured in the ECG5.

However, these measurements can observe and record only at the surface levels and it would have been better for physicians to visualize the problems and diseases specifically at the heart level. Many researchers have contributed their works in non-invasively imaging the cardiac anomalies from the surface level recordings.

Related work

Inverse problems have been solved in various applications, one of them is demonstrated by Qu et al.6 where authors analysed the steady state responses by solving the inverse problems based on Sparse-Bayesian learning.

Pullan et al.7, Hamalainen and Ilmoniemi8, Sarvas et al.9, contributed their works in modeling the heart activities non-invasively using electromagnetic inverse problems in the deterministic approaches.

Fang et al.10 proposed a novel framework to solve the ill posed inverse problems of spatiotemporal ECG using sparse decomposition and total variation method.

In order to solve the inverse problem, one has to model the structural heart and align it with the torso and detectors; and formulate a spatial relation between them using Maxwell’s equations, which is known as forward problem11. Tilg12, Huiskamp et al.13 mathematically assumed action potentials as distributed sources in the forward model. The authors14 used invasively pre-recorded epicardial potentials as cardiac sources and generated the spatial sensitivity in the forward study.

The inverse problem reconstructs the cardiac activation from the MCG signals along with the constructed transfer matrix. These bio-inverse problems are ill-posed since the sources are more in number than the sensors (in practice) and even small errors in the recordings may lead to large variations in the source estimations9. The common technique used to solve the inverse problem in deterministic approach is Tikhonov regularization (optimization methods)13,14. Mohammad-Djafari15 discussed and compared deterministic approach with the probabilistic model in the regularization theory and concluded that the latter method solved better in dealing with uncertainties and inaccuracies.

Zhou et al.16 demonstrated Sparse Bayesian Learning (SBL) (with Gaussian hierarchical priors) method to improve the localization accuracy of the inverse problem for the left-ventricular endocardium. The researchers reconstructed the endocardial potentials from the body surface ECGs and evaluated the results on the patient-specific and normal heart geometry models. The deterministic methods utilize some form of regularization, out of which the most widely used is Tikhonov17, which ensures the stable inverse solutions.

Serinagaoglu et al.18 evaluated the Bayesian approach to estimate the epicardial potentials from the body surface potentials. In this article, the authors solved the inverse ECG using surface measurements, a generic forward model with prior information of epicardial distributions (estimated from previous recordings) and the epicardial signals recorded invasively. The authors also discussed the advantages of Bayesian inference over deterministic methods. Bayesian framework includes error covariance that depends on the probability distribution of the prior sources and noise that effectively helps to yield the inverse solution.The other advantage of the Bayesian inference lies in the automatic estimation of the unknown posteriors by updating the covariance from the minimal knowledge about the hidden models. Whereas in Tikhonov method, one has to manually choose an optimal regularizer with the help of L-curve criterion to determine a good solution fit.

France19 studied Bayesian approach to quantify difference in L2 norm solutions that arise from conductivity and mesh discretization in the inverse problem of ECG. Even though the L2 norm solution provides satisfactory deterministic results, Bayesian not only estimate an equivalent maximum a-posteriori (MAP), but also capable of providing a distribution to study the sources of uncertainty. The Gaussian priors has been used to model the prior source activities.

The inverse problems addressed by Arinbjarnarson20 discuss for various types of Bayesian approaches in the context of Electroencephalography (EEG) domain. The Gaussian type models have been assumed to design the hyper-prior distributions in the inverse study.

The literature on Bayesian approach has been found to be confined to solving the bioelectric inverse problems; however, the framework could be extended to address the inverse problems in biomagnetism. This is the basic motivation to apply Bayesian modeling techniques for MCG.

The above mentioned Bayesian methods assume stationary Gaussian distribution and therefore estimate the unknown parameters from the observed measurements. The method fails to model non-stationary distributions.

Bishop21 explained about the competitive framework called Variational Bayes that imposes non-stationary distributions on the priors and hyper-prior models (distributions) to infer the unknowns with the help of Kullback–Leibler (KL) divergence. Tzikas et al.22 introduced Variational Bayesian Linear Regression (VBLR) approach where non-stationary Gaussian priors for hyperparameters were explored. The main idea of this method is to fit blue estimate the prior distribution with the help of varying family of distributions rather than a single prior in the simplistic Bayesian models. It has been reported that the solution quality of the VBLR approach is better than the stationary Bayesian models23.

Similar supporting work experimented by Rahimi et al.24 where a multiple-model Bayesian approach was proposed and utilized to solve the inverse problem of ECG data. The ill-posed nature was regularized by a fixed evaluation criteria which constrains the source distribution to follow a fixed prior structure rather than time varying sources. The issue has been addressed by multiple-prior models that uses time varying prior sources.The study was applied on the synthetic and real data experiments.

The experimental results demonstrated that the combination of different priors can be employed for assessing the complex source structures. Also, the proposed multiple model investigates the impact of different prior distributions which helps in reducing the poor fit of assumed model.

One of the objectives of this paper is to reconstruct epicardial sources using Bayesian frameworks to address the uncertainties that occur in the deterministic approach. The other objective is to apply Hierarchical models using the simplistic Bayesian and the novel (in this domain) Variational Bayesian methods in solving the inverse problem of epicardial activities. Further, the proposed inverse models have been analyzed based on noise-free and noisy MCG signals of normal and Myocardial Infarction cases.

Methodology

In this section, the forward model of MCG has been described which discusses the source models, the explanation of the Lead Field/Transfer Matrix followed by the mathematical depiction of the forward model. In the next subsection, the inverse problem is described and solved using the standard Tikhonov method, the Hierarchical Bayesian method and the Variational Bayesian Linear Regression method. Two different heart models have been used, one for the forward problem and the other to solve the inverse problem in order to avoid the ‘inverse crime’.

Forward problem

Source model

The source model is designed based on the prior knowledge of the electrophysiological nature of the heart. The source parameters assumed in the current study consisted of a ventricular surface model extracted from ECGsim25, covered by Q=257 nodal locations with each discretized node assigned to epicardial potentials. The thorax model of size (25, 45, 45) cm consisting of 300 nodes with 596 tetrahedral meshes is considered in the study. The heart mesh was placed inside the thorax model at a location (0.3, 0.3,0) cm that lay in the realistic anatomical position between the lungs and behind the sternum13 (geometrical models were assembled in SCIRun software26,27). The volume of the thorax were filled with assumed conductivity σ values of 0.6, 0.04 and 0.2 S/m for the ventricles, the lungs and the torso, respectively28.

The discretized model of the heart is defined as the vector of q=(q1,q2,qQ) sources. The ventricular surface nodes at q points oriented in a^q directions have been assigned with epicardial potentials. In this study, two types of Myocardial infarction (MI) cases are simulated using ECGsim software25. The activations are created at a node with 1.5 cm potential spread (shown as patch in the inset of Fig. 1a) near the anterior left ventricular wall by varying the transmembrane potentials waves: (1) ST elevated MI is simulated by decreasing the magnitudes of the transmembrane potentials wave by 48%29, and (2) the time instants of the transmembrane potentials wave was shortened to get increased T peak MI case. The amplitudes of the abnormal epicardial potentials are shown in Fig. 1c.

Figure 1.

Figure 1

Source modeling and simulation: (a,b) Heart and Torso models aligned with MCG detectors (inset: ruptured cells patch considered in the study), (c) simulated epicardial potentials at the selected node (vertical lines indicate the desired time instants in ms).

The current inverse study is tested on another heart model (all simulations were designed and executed in SCIRUN/BioPSE software26) and the models were imported from ECGSim software25 as source with the same diseased cases as shown in Fig. 1b. The model consisted of 585 discretized nodes with 1156 triangular surface mesh elements. The source sampling in this structure is more than the previous heart model. The reason for performing the inverse study on this test model is explained in the succeeding sections.

Transfer matrix

After modeling the structural and functional prior assumptions of the heart aligned with the torso, the spatial detector vector m=(m1,m2,mM) are placed in parallel to the thorax. The MCG detectors are collected from a set of 9×9 observation points (M=81) with 3 cm intervals in between (available in ECGsim25). Now, a transfer matrix is designed to construct the spatial sensitivity between Q sources and M detectors. The generic field is recorded by placing unit current dipole vectors a^q at the nodes of the myocardium with the help of Biot-Savarts law. The magnetic field observed at sensor array (position vector in three dimensional Cartesian coordinates denoted by rm=(r1,r2,r3,rM)) due to unit dipoles at rq=(r1,r2,r3,rQ) heart points are appended for all the sources to construct a lead field spatial tensor of dimension M×Q×3:

L(rm,rq,a^q)=μ04πrm-rqrm-rq3×a^q 1

The tensor L(rm,rq,a^q) is expressed as:graphic file with name 41598_2022_25919_Figa_HTML.jpg

The elements of the constructed spatial transfer tensor L(rm,rq,a^q)= [Lx(rm,rq,a^q),Ly(rm,rq,a^q), Lz(rm,rq,a^q)] has the dimension RM×Q×3; includes the locations and orientations of the sources, denoted as L in further discussions.

Forward linear model

The forward magnetic fields (MCG) with dimensions RM×t×3 are defined as an array of M detector coils, Bf(rm,t)=[Bfx(rm,t),Bfy(rm,t),Bfz(rm,t)] which are computed from the lead field matrix L and prior scalar epicardial potential distributions s(rq,a^q,t)RQ×t. In further discussions throughout the article, Bf(rm,t) and s(rq,a^q,t) are denoted as Bf and s, respectively. The following equation represents the linear model to construct the forward magnetic field:

Bf=Ls 2

The MCG waves are simulated for normal and abnormal cases and considered as true observed signals in the inverse problem. But, the usage of the same model to obtain the inverse solution leads to a problem called ‘inverse crime’  i.e., the results may yield best estimates which could be equivalent to the truth. One can overcome this problem by adding noise to the linear forward problem30. However, the actual modeling error of using the same models (unrealistic scenarios) in the inverse estimations is still a ‘crime’ and the results may end up providing over-estimated solutions31,32.

In our study, it has been attempted to solve the ‘inverse crime’. First the forward calculated magnetic field intensity (subjecting to uncertainties) is distorted by Gaussian noise with substantial amount of Signal-to-Noise Ratio (SNR) levels (ranging from 6 to 16 dB) and then the hidden potentials are determined. However as explained before, this does not solve the inverse crime so we further utilized the forward model of the different heart structure and the forward calculated magnetic field intensity obtained from the first source to estimate the unknowns.

Figure 2a,b represent the MCG maps at mid ST instants of normal and ST elevated MI case from the first heart model, respectively. Similarly, MCG fields at increased T peak maps of normal and abnormal of model 1 are illustrated in Fig. 2d,e, respectively. The forward calculated magnetic field intensity from the second source model (shown in Fig. 1b) are mapped in Fig. 2c,f depicting the ST elevated and increased T instants, respectively. The variations in the amplitudes of the field intensities can be visualized in the maps.

Figure 2.

Figure 2

MCG signals mapped on to the detectors plane: (a) normal MCG map (model 1), and (b) ST elevated MCG of model 1 at 85 ms. (c) ST elevated MCG of model 2 at 85 ms. (d) Normal MCG (model 1) and (e) increased T maps captured of model 1 at 125 ms instant, and (f) increased T maps of model 2 captured at 125 ms instant (dark/red: maximum magnetic field intensities, light/blue: minimum magnetic field intensities).

The linear forward field (Bf) representing the cardiac cycle from t=1s to t=Ts, subjected to noise n(rm,t) denoted as n is formulated to get Bfn and is expressed as:

Bfn=Bf+n 3

The noise n of time frame Ts is derived from the SNR dB with signal power Ps=1Tt=1T|Bf|2dt and noise power Pn=1Tt=1T|n|2dt is given by:

SNR(dB)=10log10PsPn 4

Since the noise power is not known, the parameter of a specific noise amplitude is formed using the above equation that reduces to

Pn=Ps10SNR10 5

for a range of SNR from 6 to 16 dB. The obtained noise power amplitude Pn is then multiplied with the random noise sequence of the length similar to the signal’s time points.

Inverse problem

The ill-posed inverse problems are solved after establishing the forward model. In this paper, Deterministic and Probabilistic approaches for inverse problems are implemented and their efficiencies in noiseless and noisy conditions compared.

Deterministic approach: Tikhonov regularization

The unknown source activations are estimated with the help of transfer matrix L and from known observations B(rm,t) denoted as B using squared error function14. The general cost function to be minimized is computed using:

F(·)=B-Bfn2 6

Since the system is under-determined (M<Q), it causes over-fitting in the function. In order to overcome this problem, a penalty term called solution norm (L2 norm) is introduced that contains squared magnitude of the epicardial source weights. The standard Tikhonov (L2 norm) regularization implemented in the study, is expressed as:

F(·)=B-(Ls+n)2+λRs2 7

where λR is the regularization parameter which controls and helps in fitting the sources by minimizing the cost function.

Hierarchical Bayesian framework

In the Bayesian estimation, the magnitudes of unknown source activities are estimated, which are priorly assumed to be random with known prior distributions. The joint probability density function (pdf) of the magnetic field data B and source activities s are assumed to be normally distributed. In this, p(s) is the prior distribution of s and p(Bs) is the likelihood function of MCG conditioned on the sources s. The posterior distribution to estimate the activities is written as:

p(sB)=p(Bs)·p(s)p(B) 8

where p(B) in the denominator is the normalizing factor of observed signals.

The conditional probability of the complete MCG cardiac cycle from ith detector Bit=B(rm=ri,t) with time points (t=1,,T) given the whole latents of the epicardial potentials sqt=s(rq,a^q,t) considering the lead field (L) is given by,

p(Bs)=t=1Tp(Bitsqt)t=1TN(BitLiqsqt,Λ-1) 9

We assume the noise n (Eq. 3) is Gaussian with zero mean and is i.i.d across time expressed as

nN(n0,Λ-1) 10

Here, Λ is a diagonal precision matrix in which the diagonal entries are equal to the inverse of the noise variances for the corresponding observed MCG data.

The forward likelihood over the MCG at M detectors in an instant is defined as:

p(Bs)|Λ|122πM2exp-Λ2B-(Ls+n)2 11

Similarly, the prior distribution of the epicardials sjt for a jth source is assumed to be Gaussian and i.i.d across time and the model for the entire time series of sjt (t=1,T) is given by

p(s)=t=1Tp(sjt)t=1TN(sjt0,Φ-1) 12

Here, Φ is the precision or covariance matrix which contains the inverse of the source variances (σs2).

The explicit form of the Gaussian distribution of the epicardial priors at Q sources in a specific instant is given by

p(s)|Φ|122πQ2exp-Φ2s2 13

Two scalar parameters α and β called hyperparameters are introduced to control the distribution of the parameter s. The hyperparameters supporting the precision matrices are assumed as Φ=αI and Λ=βI for prior source and noise covariances, respectively.

These precision hyperparameters decide the variance estimates of the posterior distribution. The posterior distribution of the epicardial weights (Gaussian) for any source at rq is formed as

p(s^jtBit,sjt,α,β)t=1TN(sjts^jt,Σ-1) 14

where the mean and variance are given by

s^jt=βΣ-1LBit
Σ-1=αI+βLL

The values of the hyperparameters are unknown and are derived from the data. This can be done by introducing prior distributions over the hyperparameters α and β, and predicting the posteriors by marginalizing with respect to these hyperparameters and epicardial weights s.

We employed the method of evidence approximation, since the complete marginalization over s, α, and β by integrating analytically is not tractable21,30.

If the hyperpriors are modeled over α and β, the predictive distribution by marginalizing over s, α, and β gives

p(sB)=p(s,α,βB)dαdβ=p(sα,β,B)p(α,βB)dαdβ 15

If the hyperposteriors p(α,βB) are most probable around the values α^ and β^, the posterior distribution of epicardials is computed by marginalizing over s with α^ and β^. From Bayes’ theorem, hyperposteriors are expressed as

p(α,βB)p(Bα,β)p(α,β) 16

Thus, by maximizing the p(Bα,β) provides the evidence for α and β.

The marginal likelihood of the MCG data p(Bα,β) is obtained by integrating over the sources s,

p(Bα,β)=p(Bs,β)p(sα)ds 17

From Eqs. (9) and (12), the evidence function is written in the form

p(Bα,β)=β2πM2α2πQ2exp{-E(s)}ds 18

where

E(s)=β2B-(Ls+n)2+α2s2 19

The expression exp{-E(s)}ds cannot be obtained analytically and practical solution of the same over s is larger. To simplify this, Taylor expansion of E(s) is considered around the minimum value by retaining up to the second order23. The expansion of E(s) around its minimum value is given by

E(s)=EsMP+11!f(EsMP)(s-sMP)+12!(s-sMP)f(EsMP)(s-sMP) 20

where sMP denotes the most probable solution (epicardial potentials). The second term in the expansion is the minimum value and can be discarded or equated to zero. The second order derivative function is

f(EsMP)=βLL+αI

and

EsMP=β2B-(LsMP+n)2+α2sMP2

By differentiating the log evidence of Eq. (18) with respect to α, we get,

α^=γ2sMP2 21

where γ=λiλi+α & λi(i=1,,Q) are the eigen values of βLL.

Similarly, by maximizing the log evidence with respect to β, results in

β=M-γ2B-(LsMP+n)2 22

The Algorithm 1 explains the source estimation procedure by updating the hyper-parameters in iterative manner until it reaches to a convergence criteria. graphic file with name 41598_2022_25919_Figb_HTML.jpg

Variational Bayesian linear regression

The Variational Bayesian linear regression method is a probabilistic algorithm previously used in solving other applications as seen in33. So in this paper, this method has been explored for the first time to localize the sources from MCG signals.

Bayesian model

The linear model explained in the forward model (Eq. 2) that assumes linear relation between Q dimensional s sources and M dimensional MCG observations with independent noise at the detectors is considered in the inverse procedure. The magnetic field intensity likelihood of the observations B (similar to the previous approach) is assumed with constant-variance Gaussian noise distribution Λ=βI20, defined as:

p(BL,s,β)N(BLs,Λ-1) 23

The graphical representation of Bayesian models is illustrated in Fig. 3a,b to understand the relationships between variables.

Figure 3.

Figure 3

Graphical models representing the relationship between the variables: (a) Bayesian model with Gaussian priors, (b) Variational Bayesian linear model with Normal inverse-gamma priors.

Priors and hyper-priors

In the previous section (simplistic Bayesian approach), the prior source weights in the linear model were assumed to be Gaussian distribution. Due to this stationary prior, it is possible to estimate marginal likelihood and obtain posteriors19. It is also important to extract the sparser characteristics of the unknown signals such as region of abnormal spread estimations in the epicardial potentials that appear to be smoother solutions in stationary prior. To overcome this problem, a non-stationary conjugate normal inverse-gamma distribution is assumed on the prior sources s and variance Λ=βI, parametrized by hyper prior Φ=αI graphically represented in Fig. 3. The prior source distribution is modeled as:

p(s,βα)N(s0,(βα)-1I)·Gam(βa0,b0) 24

In this prior, β acts as inverse variance on s with zero-mean. Due to imposition of Gamma on β, β-1 is defined as the inverse-gamma function with shape a0 and scale b0 and is expressed as:

p(s,βα)=α2πQ2b0a0Γ(a0)βQ2+a0-1exp-η 25

where η=β2(αss)+2b0

The convergence criteria of the algorithm 1 is evaluated by checking the change in updates of hyperparameters. This is done by setting a stop threshold ϵ=10-3 value to track the difference between the hyperparameter updates. Then the algorithm is constrained to stop at iteration j if P(j)<ϵ where:

P(j)=max{|α(j)-α(j-1)|,|β(j)-β(j-1)|} 26

Variational inference

The final step is to estimate the cardiac sources in terms of variational posteriors termed as p(s,β,αB). Since it is difficult to obtain the closed form of posteriors, a distribution g(s,β,α) is introduced in the model to solve it as variational approximation. With the help of Kullback-Leibler (KL) divergence, the difference between g(s,β,α) and posterior p(s,β,αB) is minimized, defined as:

KL(gp)=s,β,αg·lngpdsdβdα 27

where g=g(s,β,α) and p=p(s,β,αB). The distribution g(·) is computed by minimizing the KL divergence:

g=argming(s,β)g(α)KL(gp) 28

The main idea is to find the distribution g that is closer to the distribution p. The divergence in Eq. (27) reduces to:

KL(gp)=-L(g)+lnp(B) 29

Now, with the help of known lnp(B), the variational posteriors g(s,β) and g(α) are estimated by maximizing the variational lower bound L(g)23 (equivalent to minimizing the KL divergence function in Eq. (28)).

The variational posteriors for s and β, with fixed g(α) is given by:

lng(s,β)=lnp(BL,s,β)+Eαlnp(s,βα)+constant 30

The posterior on sources with variance g(s,β) reduces to:

lng(s,β)=lnN(ss^,β-1C^)·Gam(βa^,b^) 31

where C is the covariance matrix of sources, a and b are the shaping and scaling parameters influencing the hypers β. Similarly, by differentiating the lower bound L(g) with respect to α by keeping s and β as constant:

lng(α)=Es,βlnp(s,βα)+lnp(α)+constant 32

The variational posteriors on α reduces to:

lng(α)=lnGam(αc^,d^) 33

Algorithm 2 explains the reconstruction of epicardial potentials from MCG observation using Variational Bayesian linear regression technique. graphic file with name 41598_2022_25919_Figc_HTML.jpg

The hyperparameter update is terminated when the variational lower bound L(g) remains unchanged for more than 0.001% between the two successive iterations.

Results and discussion

In this section, the performance of algorithms 1 and 2 for epicardial source reconstructions are compared with that of deterministic method in noise-free and noisy conditions. The inverse algorithms are computed in MATLAB and the results are visualized in SCIRun software25,30. The true epicardial maps were generated using the geometry of model 1 (mappings at t= 85ms and t= 125 ms shown in Fig. 4A.i,B.i, respectively) while the transfer matrix generated from the geometry of model 2 was used to solve the inverse problem. Due to this reason the inverse crime was avoided however it led to some significant modeling errors. The results obtained from the Tikhonov approach in noiseless condition ranged from − 1.4 to 2.9 mV; where the region of spread showed a similar kind of ruptured information as that of true potentials (shown in Fig. 4A.a). The magnitudes of the spread regions of the Bayesian inference (Fig. 4A.b) yielded a reasonable amount of improvement in the results than the Tikhonov method and the solutions ranged from − 1.4 to 3 mV in noise-free case. The main study was to visualize and evaluate the results for uncertainty conditions.

Figure 4.

Figure 4

Results of epicardial map estimations obtained from inverse algorithms at the desired time instant: (A.i) reference map of model 1 at t = 85 ms (inset: epicardial of the diseased node with time point t = 85 ms shown as a dotted vertical line ) Inverse solutions solved on model 2 at noise-free condition from (a) Tikhonov, (b) Bayesian and, (c) VBLR methods, whereas the second row shows the results obtained for (d) Tikhonov, (e) Bayesian and, (f) VBLR in 8 dB SNR. Similarly, the results of the increased T peak solutions at t = 125 ms are represented in (B).

This is performed by adding a noise of 8 dB SNR to the forward magnetic field intensity and solving the inverse problems. It can be observed from the Fig. 4A.d that the Tikhonov method in the noisy cases produced the contorted reconstruction spread at the diseased node. Figure 4A.e represents the Bayesian estimation results where the distributed area surrounding the diseased node was noticeable with magnitude ranges [− 3.8 3.2] mV. The VBLR approach performed well in both noise-free and noisy conditions evident from the maps shown in Fig. 4A.c,A.f, respectively. Similarly, Fig. 4B.a–c describe the estimations solved by Tikhonov, Bayesian inference, and VBLR methods, respectively at t = 125 ms. Also, the inverse solutions obtained at this instant from Tikhonov, Bayesian inference, and VBLR techniques due to the impact of noises in the forward field are shown in Fig. 4B.d–f, respectively.

Figure 5 depicts the time series reconstructions of the heart surface potentials at the desired node index. The potentials activated in the model 1 (shown in Fig. 5A.i,B.i) are considered as the reference truth values for ST elevated and increased T cases, respectively. As compared to the true values, the amplitudes reconstructed by the VBLR were less than the Bayesian solutions (visually—for elevated ST case shown in Fig. 5A.iii,iv); but the temporal RMSEs of the VBLR method outperformed the Bayesian method in both noisy and noise-free conditions which are later discussed in Table 2.

Figure 5.

Figure 5

(A.i) True epicardial potentials of ST elevated MI (model 1) at the diseased node (vertical dotted line: time stamp at t = 85ms), (B.i) True heart potentials of T elevated case from model 1 (vertical dotted line: time stamp at t = 125 ms). Results of the epicardial estimations obtained from inverse algorithms on the model 2 with respect to time for both the cases (A,B): (ii) standard Tikhonov regularization, (iii) Bayesian modeling with Gaussian priors and (iv) variational Bayesian inference in noise free conditions, and reconstructions from (v) Tikhonov regularization, (vi) Bayesian modeling, and (vii) Variational Bayesian inference method for 8 dB SNR, respectively.

Table 2.

Evaluation of hyper-posterior means with respect to RMSE at different noise levels.

SNR dB Bayesian VBLR
αβ RMSE Eβ,s(βss) RMSE
8 4.714E−15 0.6004 1077.9 0.5384
10 2.65E−16 0.547 1083.9 0.5382
12 5.5E−15 0.5463 1084.2 0.5381
14 4.4E−15 0.5463 1084.2 0.5381
16 4.95E−15 0.5463 1084.2 0.5381

It can be observed that the Tikhonov approach attempted to produce good solution as shown in Fig. 5A.v,B.v visually, but the amplitudes are not satisfactory which still showed the elements of noise present in the estimated results. This shows that uncertainties in the forward magnetic field intensity are less handled by deterministic methods. The solution of the Bayesian inference (Fig. 5A.vi,B.vi) traced out better estimates than the Tikhonov method. The temporal reconstruction of the potentials showed remarkably better results in VBLR method even under 8 dB SNR (Fig. 5A.vii,B.vii) than the other methods.

Choice of regularization parameter

In the regularization theory, the selection of an optimum value is a tricky and challenging task that provides a good solution of fit. L-curve is the commonly used approach to choose an optimum regularization parameter in the Tikhonov estimation. The parametric L-curve graph is the log-log plot of the regularized solution norm (s) versus the norm of the corresponding residuals (B-(Ls+n)) shown for ST elevated solution in Fig. 6. As the regularization parameter is varied, the graphical tool displays the trade-off occurring between the regularized solution and its fit to the observed data. In the work, the regularization parameter was varied from λ=1E-10 to λ=10 with 100 linearly spaced vectors in between them. The optimal regularizer can be found at a corner of the curve isolating the horizontal and vertical lines in the log-log scale.

Figure 6.

Figure 6

Selection of an optimum regularization parameter using L-curve criterion. (a) Plots of the residual norms and the solution norms, (b) Range of the λ values used in the algorithm (asterisks in a and b represent the trade-off optimal point), (c) L-curve optimization plot for the Tikhonov solution at t = 85 ms (ST elevated case).

The vertical part of the curve in Fig. 6c corresponds to the solutions with small λ values. As the λ values are tuned to the small values, the solution norm starts increasing, thereby decreasing the norm of the residuals as shown in the Fig.  6a,b (for λ=0.01, the values of s=401.582, and the residual norm found was B-(Ls+n)=4.8466).

The solution norm decreases slightly for large λ values causing the solution to over regularize (and increases the residual norm); corresponds to the horizontal part of the L-curve. The corner in Fig. 6c is considered as an optimum value λ=1.6681 that yields a good solution fit for the latent t = 85 ms (mid ST elevated point).

The inverse algorithms are tested by applying different levels of noise (SNR ranging from 6 to 16 dB) to the MCG system and Root Mean Square Error (RMSE) between the true (assumed) and estimated potentials are computed for quantitative evaluations and is defined as:

sRMSE=q=1Qsq-s^q2Q 34

where sq denotes the assumed epicardial potentials for two different heart models with geometrical nodes Q1 and Q2 , and s^q represents the estimated potentials at the same spatial points Q1 and Q2.

Figure 7a,b show the plot of SNR versus sRMSE applied on deterministic and Bayesian algorithms for ST elevated MI and increased T cases, respectively. The sRMSE values obtained in the worst case scenarios (6 dB) for the Tikhonov method at t = 85 ms was 3.8 mV and at t = 125 ms was 8.66 mV. The Bayesian inference performed well in estimating the sources in 6 dB case by reaching to an sRMSE value of 2.50 mV. Both Tikhonov and Bayesian results yielded constant sRMSEs of 0.94 and 0.546, respectively after the noise-levels of 12 dB.

Figure 7.

Figure 7

Performance evaluation of algorithms using sRMSE compared under different levels of noise in forward magnetic field ((a) Case 1: ST elevated at t= 85 ms, (b) Case 2: increased T at t = 125 ms).

It can be seen that both the Bayesian and Tikhonov methods take time to adjust themselves from noisy to less noisy conditions however VBLR always maintains similar values and hence it can be said that it works best even in noisy conditions. The VBLR method thus outperforms the other methods by showing good sRMSEs of 0.5428 mV even in worst cases from 6 to 8 dB and reached to a constant sRMSEs of 0.538 mV after 8 dB.

Similarly, the VBLR showed good estimations in the second case at t = 125 ms, with sRMSEs of 0.347 mV for all the noise levels whereas the hierarchical Bayesian inference provided negligibly better solutions than the Tikhonov approach from 6 to 8 dB and reached constant sRMSEs of 0.3672 mV after 8 dB in both the methods. Thus we can conclude that the VBLR method provides far better estimates of sRMSE values than Tikhonov and Bayesian methods in noisy cases.

Another metric called Correlation Co-efficient (CC) used in the study is tabulated in Table 1. The results of CC obtained for ST elevated case reached to 0.14 which is a very low value and it got improved by 1.7 times in the Bayesian approaches under noisy conditions.

Table 1.

Evaluation of the inverse algorithms in terms of temporal RMSEs in mV and CC.

Condition Cases Tikhonov Bayesian VBLR
tRMSE CC tRMSE CC tRMSE CC
Noise-free Elevated ST 1.1577 0.7840 1.0091 0.8343 1.2627 0.8169
Increased T 1.6185 0.6872 1.414 0.7966 1.0917 0.7817
Noisy: 6 dB SNR elevated ST 22.6499 0.1416 21.5155 0.3832 1.2627 0.3873
Increased T 23.3212 0.2022 21.7024 0.3347 1.8068 0.3348

Along with this, the temporal RMSEs are evaluated to check the performances of the estimated epicardials with respect time formulated as:

tRMSE=t=1Tst-s^t2T 35

As it can be observed from Table 1, the tRMSE values of the VBLR method reached to 1.807 mV for ST elevated case at 6 dB SNR that can be considered as a good estimate, whereas the tRMSEs of the Tikhonov and Bayesian yielded 22.65 mV and 21.52 mV at noisy conditions.

Figure 8a represents the true MCG (range [− 57 25] pT) mapped at 85 ms for ST elevated MI case with epicardial potential spread of abnormal node (model 1 range [− 0.56 4.5] mV ) inside the torso. Now, the observed MCG is considered as the test data to solve the inverse problem for model 2 (shown in Fig.  8e). The results of the epicardial estimations for different conditions are discussed in Fig. 4. Here, we discuss the MCG forward reconstructions from the estimated heart activities (model 2) and the results are mapped on to the detector planes for field visualization. It was found that there were only small deviations in magnitudes of reconstructions from deterministic and Bayesian methods in noise-free conditions as shown in Fig. 8b–d.

Figure 8.

Figure 8

Reconstruction of MCG maps from the estimated epicardials of the model 2 at t = 85 ms, (a) true forward magnetic field intensity (pico Tesla—pT) from the epicardial potentials (milli Volts—mV) of the heart model 1 (shown inside the thorax), (e) utilization of MCG forward calculated magnetic field intensity from model 1 but the objective is to seek the unknown potentials of model 2 at t = 85 ms, (bd) reconstructions of solutions estimated on model 2 for Tikhonov, Bayesian and, VBLR in noise-free environments on model 2, (fh) reconstructions of solutions from model 2 for Tikhonov, Bayesian and, VBLR subjected to 8 dB SNR. (Dark/red: maximum magnetic field intensities, light/blue: minimum magnetic field intensities).

Figure 8f illustrates the reconstruction results of Tikhonov regularization (8 dB SNR) which showed reduction in amplitude range [− 84 27] pT. The MCG waves reconstructed from Bayesian model handled uncertainties and amplitudes appeared near to the range of true maps as shown in Fig. 8g. However, the VBLR reconstructions (Fig. 8h) showed an improvement in the map than Bayesian method and the distribution range found was [− 51 22] pT.

The optimal values of hyperparameters are updated in the simplistic Bayesian modeling by maximizing the measurement likelihood and ratio corresponding to the regularization parameter. The final RMSE measure of Bayesian method in elevated ST case converged to 0.5463 mV, for hyperparameters α= 6.5676 and β= 1.907E15 in noise-free condition. For 6dB, the RMSE reached to 2.5081 mV for α= 0.0232 and β= 5.38E12. But in VBLR method, the distribution function q(α) known as hyperpriors is approximated using KL divergence. The hyperposterior mean (Eα(α)=c^d^) obtained was 0.0023 and (Eβ,s(βss)= 780.3) at 6 dB (lowest SNR) in ST elevated case. To evaluate the hypers, the optimal ratios of αβ are captured at different SNRs along with the converged RMSEs in the hierarchical Bayesian method as tabulated in Table 2. Similarly the means of hyperposteriors are obtained in VBLR technique to study the behaviour at uncertainty conditions. It was observed that there was slight improvement in the RMSE of VBLR method than the Bayesian approach. The nature of variations of αβ (hierarchical Bayesian) and Eα(α) (VBLR) with respect to iterations showed similar activities; where the values of both ratio and hyperparameters increase in noisy signals, whereas decrease in noiseless measurements.

Conclusion

In this paper, we presented inverse problems of MCG using deterministic and probabilistic methods employed on two types of MI cases. The results are estimated in terms of epicardial maps from the observed MCG signals in noisy and noiseless conditions. In competition to the simplistic Bayesian technique, a new method called Variational Bayesian Linear approach is applied which contained non-stationary normal inverse-gamma priors that used KL divergence to approximate the posteriors. The other drawback of selecting the optimal parameter is addressed in Tikhonov regularization. It is shown that the problem is overcome in Bayesian models that learn the posteriors automatically and estimate the unknowns from prior knowledge and observations. The performance of VBLR method is shown to be better than the simplistic Bayesian approach since it uses varying distribution of priors that estimate the posteriors of heart activities which fit well using KL divergence. The current work on inverse algorithms has been tested on different heart shapes. Further, the method assumed zero effect of the conductivity profile to the magnetic measurements in the forward simulation steps, due to which, the transfer matrix was built to map between different heart shapes and the detectors. The complicated electrodynamic design of heart and torso with respiratory movements, skin conductivity profiles, bio-electric and bio-magnetic fields has to be modelled in future studies to mimic a realistic environment for cardiac source localization.

To avoid the inverse crime, two different geometrical models were used. The forward measurements were simulated from the potentials of the first heart model. The observed MCG data was tested on the different heart geometry (model 2) by inverting the forward matrix constructed from the first model in order to determine the source activities.

The current outcome of this research limits its study to the simulations and solving the inverse problems of MCG on different realistic heart models. The future study of this research involves localization of abnormal cardiac sources due to the effect of other artefacts such as realistic noise levels and breathing movements with physically acquired MCG measurements. The results of this paper promise the clinicians an advantage of diagnosing the infarction region or any other cardiac-related diseases as the reconstructed heart surface potential maps on the myocardium. The study provides the advantage of source localization with high accuracy. This serves as an inspiration to design an online system for non-invasive monitoring of inverse solutions during MCG recording where the clinician will be able to view the unknown functional activities on the screen. However, the models depicted in the paper are limited only to generic models. There is a motive to obtain good quality localization for modeling the geometries of sources acquired from the individual Magnetic Resonance Imaging (MRIs) systems. Further, the inverse problems of the cardiac activations presented in this paper from the MCG signals are to be thoroughly investigated for the subject-specific assessments and could be validated with the recorded epicardial potentials of the structurally healthy hearts.

Author contributions

The manuscript has been conceptualized by H.A., development and implementation of algorithms have been carried out by B.P., analysis, implementation, visualization, and interpretation of the results have been performed by V.R.B., and A.T. has done supervision, organization, revision, and editing of the manuscript.

Data availability

The datasets generated during the current study are available in the ECGSIM software https://www.ecgsim.org/index.php and the computations were simulated and analysed using SCIRUN https://www.sci.utah.edu/cibc-software/scirun.html.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Feher JJ. Quantitative Human Physiology: An Introduction. Academic press; 2017. [Google Scholar]
  • 2.Hall, J. Guyton and hall textbook of medical physiology: Enhanced e-book (2010)
  • 3.Andra W, Nowak H. Magnetism in Medicine: A Handbook. Wiley; 1998. [Google Scholar]
  • 4.Malmivuo J, Plonsey R. Bioelectromagnetism: Principles and Applications of Bioelectric and Biomagnetic Fields. Oxford University Press; 1995. [Google Scholar]
  • 5.Mariyappa, N. Development of squid based magnetocardiography system cardiac signal source analysis using ensemble empirical mode decomposition. Ph.D dissertation, Homi Bhabha National Institute (2013). http://hdl.handle.net/10603/37572.
  • 6.Qu M, Chen T, Lu S, Hu J, Wang J, Hu N. Inverse solution of steady-state responses based on sparse Bayesian learning. IEEE Access. 2021;9:15133–15148. doi: 10.1109/ACCESS.2021.3051644. [DOI] [Google Scholar]
  • 7.Pullan AJ, Cheng LK, Buist ML. Mathematically Modelling the Electrical Activity of the Heart: From Cell to Body Surface and Back Again. World Scientific Publishing; 2005. [Google Scholar]
  • 8.Hamalainen MS, Ilmoniemi RJ. Interpreting Measured Magnetic Fields of the Brain: Estimates of Current Distributions. Helsinki University of Technology, Department of Technical Physics; 1984. [Google Scholar]
  • 9.Sarvas J. Basic mathematical and electromagnetic concepts of the biomagnetic inverse problem. Phys. Med. Biol. 1987;32(1):11. doi: 10.1088/0031-9155/32/1/004. [DOI] [PubMed] [Google Scholar]
  • 10.Fang L, Zhuang Q, Mao W, Chen Y, Liu H. TV regularized low-rank framework for localizing premature ventricular contraction origin. IEEE Access. 2019;7:27802–27813. doi: 10.1109/ACCESS.2019.2899696. [DOI] [Google Scholar]
  • 11.Burton, B. M. et al. A toolkit for forward/inverse problems in electrocardiography within the scirun problem solving environment. In 2011 Annual International Conference of the IEEE Engineering in Medicine and Biology Society. IEEE, 2011, 267–270 (2011). [DOI] [PMC free article] [PubMed]
  • 12.Tilg B, Wach P. Magnetic source imaging within the human heart from simulated and measured mcg data. Comput. Cardiol. IEEE. 1995;1995:13–16. [Google Scholar]
  • 13.Huiskamp G, Oosterom AV. The depolarization sequence of the human heart surface computed from measured body surface potentials. IEEE Trans. Biomed. Eng. 1988;35(12):1047–1058. doi: 10.1109/10.8689. [DOI] [PubMed] [Google Scholar]
  • 14.Oostendorp T, Pesola K. Non-invasive determination of the activation sequence of the heart: Validation by comparison with invasive human data. Comput. Cardiol. 1998;25:25. [Google Scholar]
  • 15.Mohammad-Djafari, A. From deterministic to probabilistic approaches to solve inverse problems. In Bayesian Inference for Inverse Problems, vol. 3459, 2–11 (International Society for Optics and Photonics, 1998).
  • 16.Zhou S, Sapp JL, Stovicek P, Horacek BM. Localization of activation origin on patient-specific endocardial surface by the equivalent double layer (EDL) source model with sparse Bayesian learning. IEEE Trans. Biomed. Eng. 2019;66(8):2287–2295. doi: 10.1109/TBME.2018.2887041. [DOI] [PubMed] [Google Scholar]
  • 17.Tikhonov AN, Arsenin VY. Solutions of Ill-Posed Problems. Halsted; 1977. [Google Scholar]
  • 18.Serinagaoglu Y, Brooks DH, MacLeod RS. Improved performance of Bayesian solutions for inverse electrocardiography using multiple information sources. IEEE Trans. Biomed. Eng. 2006;53(10):2024–2034. doi: 10.1109/TBME.2006.881776. [DOI] [PubMed] [Google Scholar]
  • 19.France JJ, Gur Y, Kirby RM, Johnson CR. A Bayesian approach to quantifying uncertainty in Tikhonov solutions for the inverse problem of electrocardiography. Comput. Cardiol. IEEE. 2014;2014:529–532. [Google Scholar]
  • 20.Arinbjarnarson, T. M. Bayesian approach to the ill-posed EEG inverse problem. Ph.D. dissertation, Technical University of Denmark (2007).
  • 21.Bishop CM. Pattern Recognition and Machine Learning. Springer; 2006. [Google Scholar]
  • 22.Tzikas DG, Likas AC, Galatsanos NP. The variational approximation for Bayesian inference. IEEE Signal Process. Mag. 2008;25(6):131–146. doi: 10.1109/MSP.2008.929620. [DOI] [Google Scholar]
  • 23.Drugowitsch, J. Variational Bayesian inference for linear and logistic regression. arXiv:1310.5438 (arXiv preprint) (2013).
  • 24.Rahimi A, Sapp J, Xu J, Bajorski P, Horacek M, Wang L. Examining the impact of prior models in transmural electrophysiological imaging: A hierarchical multiple-model Bayesian approach. IEEE Trans. Med. Imaging. 2016;35(1):229–243. doi: 10.1109/TMI.2015.2464315. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Oosterom AV. ECGSIM: An interactive tool for studying the genesis of QRST waveforms. Heart. 2004;90(2):165–168. doi: 10.1136/hrt.2003.014662. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.MacLeod, R. S. et al.Scirun/biopse: Integrated problem solving environment for bioelectric field problems and visualization. In Biomedical Imaging: Nano to Macro, 2004. IEEE International Symposium on. IEEE, 2004, 640–643 (2004).
  • 27.Parker, S. G. & Johnson, C. R. Scirun: A scientific programming environment for computational steering. In Supercomputing’95: Proceedings of the 1995 ACM/IEEE Conference on Supercomputing, 52 (IEEE, 1995),
  • 28.Oostendorp T, Pesola K. Non-invasive determination of the activation sequence of the heart: Validation by comparison with invasive human data. Comput. Cardiol. 1998;25:313–316. [Google Scholar]
  • 29.Meijs LP, Galeotti L, Pueyo EP, Romero D, Jennings RB, Ringborn M, Warren SG, Wagner GS, Strauss DG. An electrocardiographic sign of ischemic preconditioning. Am. J. Physiol. Heart Circ. Physiol. 2014;307:1. doi: 10.1152/ajpheart.00419.2013. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Petra N, Martin J, Stadler G, Ghattas O. A computational framework for infinite-dimensional Bayesian inverse problems, Part II: Stochastic Newton MCMC with application to ice sheet flow inverse problems. SIAM J. Sci. Comput. 2014;36:4. doi: 10.1137/130934805. [DOI] [Google Scholar]
  • 31.Lucka, F., Burger, M.,Wolters, P.-D. D. C. Hierarchical Bayesian approaches to the inverse problem of EEG/MEG current density reconstruction. Ph.D. dissertation, Westfälische Wilhelms Universität Münster (2011)
  • 32.Kaipio J, Somersalo E. Statistical inverse problems: Discretization, model reduction and inverse crimes. J. Comput. Appl. Math. 2007;198:493–504. doi: 10.1016/j.cam.2005.09.027. [DOI] [Google Scholar]
  • 33.Zhang S, Liu Y, Li X, Bi G. Variational Bayesian sparse signal recovery with LSM prior. IEEE Access. 2017;5:26690–26702. doi: 10.1109/ACCESS.2017.2765831. [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The datasets generated during the current study are available in the ECGSIM software https://www.ecgsim.org/index.php and the computations were simulated and analysed using SCIRUN https://www.sci.utah.edu/cibc-software/scirun.html.


Articles from Scientific Reports are provided here courtesy of Nature Publishing Group

RESOURCES