Application of Deep Learning to Predict RF Heating of Cardiac Leads During Magnetic Resonance Imaging at 1.5 T and 3 T

Purpose: Predicting magnetic resonance imaging (MRI)-induced heating of elongated conductive implants such as leads in cardiovascular implantable electronic devices (CIEDs) is essential to assessing patient safety. Phantom experiments and electromagnetic simulations have been traditionally used to estimate radiofrequency (RF) heating of implants, but they are notably time-consuming. Recently, machine learning has shown promise for fast prediction of RF heating of orthopedic implants, when the position of the implant within the MRI RF coil was predetermined. Here we explored whether deep learning could be applied to predict RF heating of conductive leads with variable positions/orientations during MRI at 1.5 T and 3 T. Methods: Models of 600 cardiac leads with clinically relevant trajectories were generated and electromagnetic simulations were performed to calculate the maximum of 1g-averaged SAR at the tips of lead models during MRI at 1.5 T and 3 T. Deep learning algorithms were trained to predict the maximum SAR at the lead’s tip from the knowledge of coordinates of points along the lead’s trajectory. Results: Despite the large range of SAR values (~200 W/kg-~3300 W/kg), the RMSE of predicted vs ground truth SAR remained at 223W/kg and 206 W/kg, with the 𝑅 ! scores of 0.89 and 0.85 on the testing set for T and 3 T models, respectively. Conclusion: Machine learning shows promise for fast assessment of RF heating of lead-like implants with only the knowledge of the lead’s geometry and MRI RF coil features.


Introduction
With sixty million scans performed annually worldwide, magnetic resonance imaging (MRI) is the fastest growing imaging modality for an expanding range of neurological, cardiac, and musculoskeletal disorders 1 . Although MRI is generally safe, its application in patients with conductive implants is associated with several hazards, including the risk of radiofrequency (RF) heating of the tissue surrounding the implant 2 . RF heating is most dominant in devices with elongated leads, such as deep brain stimulators or cardiovascular implantable electronic devices (CIEDs) [3][4][5][6][7][8] . The mechanism of generating RF heating in these devices is through the antenna effect, where the electric field of the MRI transmit coil couples with the lead and induces currents on conductive lead wires which in turn amplify the specific absorption rate (SAR) of radiofrequency energy in the tissue surrounding the lead's tip [9][10][11][12] . Fatal injuries have underscored the severity of this problem 13 . In response, extensive effort has been dedicated to quantifying and mitigating the problem of MR-induced RF heating. Following regulatory recommendations, these efforts heavily rely on electromagnetic (EM) simulations that represent details of the human body 2,14 , implant structure 15,16 , and MRI coil features [17][18][19] . These simulations are notoriously cumbersome; even with today's high-power computing clusters it typically takes tens of hours to complete a single simulation scenario with enough degrees of complexity to provide good agreement with measurements 20 .
With the rapid advancement of machine learning, it has been applied to various domains in radiology research, including MRI safety assessment 21 . In the context of implant RF heating, one group has recently shown that neural networks could be trained to predict the worst-case heating of orthopedic fixation plates in an MRI environment when only the knowledge of the implant's geometrical features is in hand 22,23 . In this work, however, the implant's position was fixed within the MRI RF coil and thus the effect of electric field variation due to changes in implant's location and orientation was not considered. This is an important factor in the assessment of RF heating of elongated leads, as the lead's trajectory and orientation with respect to the MRI electric field substantially affects its RF heating [24][25][26][27][28][29] .
A traditional approach for evaluating MR-induced RF heating of elongated leads is through the concept of the lead's transfer function. Here, the response of the lead to a stepwise tangential electric field applied locally along the length of the lead is calculated and used to estimate the response of the lead to an arbitrary incident electric field 30 . That is: where the function ( , ) is the scattered electric field at point P per unit tangential electric field over unit distance at location as depicted in Figure 1. Although the transfer function approach can give an estimation of local power deposition in the surrounding tissue, it is calculated for a straight lead and thus ignores the coupling effect of adjacent current sources on implants with folded or looped trajectories. This drawback is quite consequential as clinically relevant lead trajectories tend to have overlapping segments, and these loops and folds substantially affect the phenomenology of MR-induced RF heating 4,31 . The application of Eq.1, therefore, has been accompanied by a large uncertainty margin 32 . Figure 1. The tangential component of incident electric field Etan can be used to estimate the RF heating of a lead at its tip through the concept of the lead transfer function. P is the evaluation point where the scattered field is evaluated, τ is the distance between the field excitation point to the end of the exposed lead tip.
The objective of this work was to explore whether a fundamentally new approach based on machine learning could provide a fast and reliable tool to predict SAR at a lead's tip when only the knowledge of MRI RF coil features and the lead's trajectory is in hand. Specifically, we investigated whether a deep neural network could be trained to use the knowledge of a lead's trajectory within a specific MRI coil as a surrogate for the incident E field (i.e., Etan in Eq. 1), and directly map it to the SAR at the lead's tip.
As a proof-of-concept, we generated 600 models of lead wires with clinically relevant trajectories according to what is seen in patients with cardiac pacemakers, and performed electromagnetic (EM) simulations to calculate the maximum of 1g-averaged SAR at lead tips (referred to as Max1gSAR) during MRI at 1.5 T and 3 T. We then trained two feed-forward deep neural networks (one for each field strength) to predict the Max1gSAR at the lead tip based on the input of coordinates of points along the lead's path.
In what follows, we provide the methods for construction of the lead models, details of EM simulations to calculate the Max1gSAR, input features of the neural network, and constructing the algorithm. We then present the resulting architecture of the neural network and discuss its performance in predicting the Max1gSAR at the lead's tip for different classes of lead trajectories and at different MRI field strengths. Finally, we discuss the limitations and opportunities for future work.

Construction of Cardiac Lead Models
We used the ANSYS human body model 33 for the purpose of anatomical guidance and generation of lead trajectories. We enlarged the heart by 50% to accommodate the wide variety of sizes seen in the population 34 .
We used the Grasshopper plugin of the Rhino3D® CAD tool (Robert McNeal and Associates, Seattle, WA) to pseudo-randomly generate 600 trajectory lines following typical clinical paths of lead trajectories observed in X-ray thoracic photographs of pacemaker leads 35 . Specifically, we created random curve segments in the pectoral region, vena cava, and the heart's left and right ventricle and atrium, which were then joined to create a unique trajectory. From these trajectories, half were associated with a left-sided implantable pulse generator (IPG) and half had a right-sided IPG (see Figure 2). Trajectories were all 58 cm long corresponding to MRI SureScan pacing leads (Medtronic 5076, Medtronic 4076 and Medtronic 4074) 36 .

Electromagnetic Simulations
The power deposition in the tissue-surrounding tips of implanted leads during MRI was quantified with the maximum of the 1g-averaged SAR referred to as Max1gSAR. The ground-truth SAR was calculated by performing finite element method (FEM) simulations in ANSYS Electronics Desktop 2019 R2 (ANSYS, Canonsburg, Pennsylvania, USA) using a homogeneous human body model with average tissue properties ( = 0.47 / , ' = 80). For simplicity, the heart was only used to guide the creation of the trajectory lines and was excluded from FEM simulations. Coordinates of lead trajectories were exported from Rhino3D and used to create solid wires in ANSYS made of 90%:10% platinum-iridium (Pt:Ir, = 4 × 10 ( S/m, diameter = 1 mm) with polyurethane insulations ( ' = 3.5, diameter = 2 mm) and 2 mm exposed tip.
Models of MRI RF coils were created based on the information provided by the vendor to mimic Siemens 1.5 T Aera and 3 T Prisma scanners (Siemens Healthineers, Erlangen, Germany). The 1.5 T coil was a 16rung high-pass birdcage (diameter = 714 mm, height = 420 mm) tuned to 63.6 MHz, and the 3 T coil was a 32-rung high-pass birdcage (diameter = 626 mm, height = 400 mm) tuned to 123.2 MHz. Both coils were excited in circularly polarized (CP) mode by means of two input ports on the top end-ring which were 90° apart in-phase and position. The human body with the implanted lead was positioned within MRI coils with the chest at the coils' iso-center, and the Max1gSAR was calculated using the HFSS built-in SAR module. Figure 3 gives details of the simulation setup and Table 1 gives mesh statistics for a typical simulation.
A total of 1200 simulations were performed (600 lead trajectories at each field strength). For all simulations, the input power of the coil was adjusted to produce the whole-body SAR of 4 W/kg which corresponds to the first level operating mode 37 . The initial mesh was set such that the maximum element size was < 10 mm for the RF coils. Within the body volume, the mesh size was restricted to be < 20 mm, with the exception of the cubic volumes of 20 mm × 20 mm × 20 mm surrounding implant tips which enforced a mesh element length of < 2 mm. Mesh size on the surface of lead wires and their insulations were set to be < 0.5 mm and < 2 mm, respectively. ANSYS HFSS follows an adaptive mesh scheme with a successive refinement of an initial mesh between iterative passes. At each adaptive pass, scattering parameters (S-parameters) are evaluated at each port and compared to the previous pass. The change in the magnitude of the S-parameters between two consecutive passes is called 'Delta S'. The maximum magnitude Delta S is defined as )* @ )* + − )* +,-@ where i and j cover all ports and N represents the number of iterative passes.
Simulations were considered to be converged when the maximum Delta S fell below a set threshold of 0.02. Simulations typically converged with 2 adaptive passes.
The maximum of 1g-averaged SAR within the high-resolution cubic area surrounding the tips was recorded as Max1gSAR and used as the input to train the algorithm. Simulations were run on a Dell

Feed-forward Neural Network Architecture
Two feed-forward neural networks were trained with the same structure but different hyperparameters to predict Max1gSAR at tips of the leads during MRI at 1.5 T and 3 T, with the Max1gSAR calculated by simulations set as the ground truth. The (x, y, z) coordinates of points along lead trajectories (with respect to the coil's iso-center) were sampled at 5 mm intervals, creating 116 points per trajectory (leads were 58 cm in length). These 116 × 3 coordinate data were concatenated into a vector of 348 × 1 before being fed to the neural network ( Figure 4). The data were split randomly but the same number of left-sided and rightsided IPGs were included for training, validation, and testing. The percentage of the training set was 64%, the validation set was 16% and the testing set was 20%.
The feed-forward neural network had one input layer followed by 5 hidden layers and one output layer. Each hidden layer was activated by a rectified linear unit (ReLU) function and included dropout in the training process to prevent over-fitting. The output of the network was the predicted Max1gSAR value which was further compared with the ground truth to evaluate the network's performance. The hyperparameters were turned by Ray Tune, which is a Python library for scalable machine learning experiments and hyperparameter tuning. The tuning algorithm was the Bayesian Optimization HyperBand (BOHB), which has the advantages of high searching speed and robustness by combining the Hyperband with Bayesian optimization 38 .
The optimized parameters for the feed-forward deep network for 1.5 T data had 256, 512, 512, 512, and 16 neurons in each hidden layer and the same dropout rate of 0.5. For the neural network optimized for 3 T data, the neurons in each hidden layer were 512, 256, 256, 256, 32, and the dropout rate was 0.5.

Simulation Results
The distributions of simulated Max1gSAR at 1.5 T and 3 T are shown in Figure 5 as a box plot.
The mean ± standard deviation of the ground truth Max1gSAR was 590 ± 192 W/kg for the cases with the IPG at the right pectoral region and 1735 ± 447 W/kg for the IPG at the left pectoral region at 1.5T. At 3 T, the values were 653 ± 267 W/kg and 1245 ± 550 W/kg respectively.
A Mann-Whitney test revealed significantly higher SAR for the cases with left-sided IPG at both 1.5 T and 3 T with p-values lower than 10 ,. . The highest Max1gSAR for a lead with IPG at left was 3217 W/kg at 1.5 T and 3313 W/kg at 3 T. The highest Max1gSAR for a lead with right-sided IPG was 1308 W/kg at 1.5 T and 1678 W/kg at 3 T. The loss function for the feed-forward neural network was the mean-squared error (MSE) of ground truth vs. predicted Max1gSAR as: where ) is the "0 simulated Max1gSAR and I ) is the "0 predicted Max1gSAR in the testing set. The optimizer was the AdaMax algorithm which is a variant of Adam-based on infinity norm 39 . Figure 6 shows the predicting results on the testing set for both 1.5 T and 3 T with the statistics in Table 2. The coefficient of determinations ( 2 value) and the RMSE of Max1gSAR were also computed. ! was 0.89 for the 1.5 T model but only 0.85 for the 3 T model. For cases with a right-sided IPG, the RMSE was 247 W/kg at 1.5 T and 192 W/kg at 3 T. For cases with a left-sided IPG, the RSME was 195 W/kg at 1.5 T and 220 W/kg at 3 T. Figure 6 shows the histogram of error distribution for both models evaluated on the testing set.
Ground-truth of the testing dataset (W/kg)

T Model 3 T Model Predicted
of the testing dataset (W/kg)  Table 2. Statistical properties of ground truth SAR and predicted SAR on the testing dataset.

Discussion
RF heating of conductive implants in MRI environment poses a significant safety risk to patients. As the number of patients with active implantable medical devices increases and MRI becomes more readily available, the number of cases where MRI is indicated in a patient with an existing conductive implant also is increasing rapidly. Consequently, extensive effort has been dedicated to estimating the magnitude of MRinduced RF heating in this patient population via electromagnetic simulations and phantom experiments both of which are known to be notably time consuming 20,[40][41][42][43][44][45] . A fast method for the real-time prediction of MRI-induced RF heating of implants to allow patient-by-patient risk assessment will be highly valuable but is currently missing.
The phenomenology of MR-induced RF heating in the human body with the presence of conductive implants has a large parameter space with multiple interplaying factors. These include MRI RF coil's geometry and frequency 18,46,47 , the implants' material 16,48 , position, and geometrical features 29,43 , as well as electrical properties of the tissue surrounding the implant 44,45 . In the case of elongated implants, such as leads in neuromodulation and cardiac devices, the distribution of MRI electric field E along the length of the implant has been shown to play a determinant role in the prediction of RF heating at the lead's tip 7,30 . This fact has been indeed exploited to introduce MRI field-shaping methods that manipulate the electric field of MRI transmitter to reduce its interaction with implanted leads 25, [49][50][51][52] , and in lead management techniques that attempt to modify lead trajectories to achieve the same purpose 3,53 .
In this work, we investigated the feasibility of applying deep learning to predict the power absorbed in the tissue around the tips of implanted leads when only the trajectory of the lead inside the MRI RF coil was at hand. Our central hypothesis was that the knowledge of the trajectory of an elongated lead within a specific MRI coil, which implicitly includes the knowledge of the coil's E field along the implant's path, should allow one to predict the power absorption in the tissue surrounding the tip. Our results indicate that deep learning algorithms were capable of predicting the Max1gSAR at tips of implanted leads with relatively high fidelity at both 1.5 T and 3 T. Specifically, the algorithms correctly predicted the statistical distribution of the Max1gSAR for cardiac leads with left-sided vs right-sided IPGs which showed a significantly higher SAR for leads with the IPG in the left pectoral region. We observed, however, that the learning performance at 3 T was inferior to the performance at 1.5 T. This could be due to the fact that MRI fields were less homogeneous at 3 T and thus a larger data set would be required to capture the variability of field distribution along possible lead trajectories.
The current study has several limitations. First, simulations were performed in a homogeneous body model, whereas the human body is heterogeneous. Although the patient's body composition is shown to affect RF heating of implants that pass a large cross-section of the body, in the case of elongated leads the lead trajectory is the dominant factor affecting the RF heating. In such cases, the industry standard is to assess RF heating of devices with leads when thousands of possible lead trajectories are valuated in a few body models which are representative of the larger population (e.g., average, thin and obese, or male and female models). If the application of AI-based SAR prediction proves to be viable, similar techniques can be applied to train different algorithms for each type of body model. Second, we have only investigated leads with a fixed overall length. As RF heating is a resonance phenomenon which is directly affected by the ratio of lead's length to the RF wavelength in the tissue, it is not evident if a single algorithm could be trained to predict RF heating of leads with a range of different lengths. Theoretically, this could be possible considering that the resonance phenomenon can be explained by the knowledge of incident E field distribution along the leads' length. However, more work is needed to accurately evaluate this issue. Finally, we have only investigated a relatively simple network architecture. A natural next step will be the application of capsule networks 54 which are shown to be more robust and trustable networks.

Author contributions
XC and CZ equally contributed as the first author and performed EM simulations, designed and trained the neural network, and wrote the first draft of the manuscript. BTN and PS helped with EM simulations. KC and XB provided vendor-specific models of MRI coils that were used in simulations. BE was involved in conceptualizing the idea.
LG conceptualized the idea, assisted in EM simulations, evaluated the results, and drafted the final version of the manuscript. All authors reviewed and commented on the manuscript.

Competing interests
Authors LG and BE have filed a PCT International patent application (PCT/US2021/028558) on the use of machine learning to predict RF heating of implants during MRI.