{'fraction_non_alphanumeric': 0.026408402673577958, 'fraction_numerical': 0.0162051561860592, 'mean_word_length': 5.030931227377427, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Machine learning enables noninvasive prediction of atrial fibrillation driver location and acute pulmonary vein ablation success using the 12-lead ECG

Background Atrial fibrillation (AF) is the most common supraventricular arrhythmia, characterized by disorganized atrial electrical activity, maintained by localized arrhythmogenic atrial drivers. Pulmonary vein isolation (PVI) allows to exclude PV-related drivers. However, PVI is less effective in patients with additional extra-PV arrhythmogenic drivers. Objectives To discriminate whether AF drivers are located near the PVs vs extra-PV regions using the noninvasive 12-lead electrocardiogram (ECG) in a computational and clinical framework, and to computationally predict the acute success of PVI in these cohorts of data. Methods AF drivers were induced in 2 computerized atrial models and combined with 8 torso models, resulting in 1128 12-lead ECGs (80 ECGs with AF drivers located in the PVs and 1048 in extra-PV areas). A total of 103 features were extracted from the signals. Binary decision tree classifier was trained on the simulated data and evaluated using hold-out cross-validation. The PVs were subsequently isolated in the models to assess PVI success. Finally, the classifier was tested on a clinical dataset (46 patients: 23 PV-dependent AF and 23 with additional extra-PV sources). Results The classifier yielded 82.6% specificity and 73.9% sensitivity for detecting PV drivers on the clinical data. Consistency analysis on the 46 patients resulted in 93.5% results match. Applying PVI on the simulated AF cases terminated AF in 100% of the cases in the PV class. Conclusion Machine learning–based classification of 12-lead-ECG allows discrimination between patients with PV drivers vs those with extra-PV drivers of AF. The novel algorithm may aid to identify patients with high acute success rates to PVI.


Introduction
Atrial fibrillation (AF) is the most common sustained arrhythmia in clinical practice and a leading cause of hospitalization and death. 1,2 Recent evidence from experimental and clinical studies suggests that AF may be maintained by localized AF drivers, [3][4][5] which are organized reentrant circuits (rotors) 6,7 or focal sources 8 that disorganize into AF.
Catheter ablation is a common nonpharmacological therapy that aims to terminate AF, restoring sinus rhythm. 9,10,1 Typically, "triggers" that start AF and the "substrate" that supports perpetuation are targeted during ablation. Moreover, Narayan and colleagues 11 showed the importance of localizing and ablating rotors, focal source drivers, or organized fibrillation sources to terminate the arrhythmia. 11 However, one of the major limitations of AF ablation is that the mechanisms that sustain AF are not easy to identify, 1,12,13 in contrast to many other arrhythmias in which the perpetuating mechanism is the primary target for ablation. The seminal observations by Haissaguerre and colleagues 10 revealed that AF triggers and sustaining mechanisms are often localized around the pulmonary veins (PVs). 10 Thus, pulmonary vein isolation (PVI) is established as the cornerstone of AF ablation, 1 being highly effective in patients with triggers confined to the PVs. 10,9 Nevertheless, PVI results remain suboptimal in the presence of extra-PV sources maintaining AF. 1,14 Preprocedural information regarding the confinement of the driving mechanism to the PVs would be valuable for decision-making pro/contra ablation and procedure planning. To date, the best available proxy to plan the ablation procedure is the classification of the arrhythmia into paroxysmal/ persistent AF. 15 This classification, however, is based on observed AF episodes, and it might correlate poorly with the actual AF burden-and, consequently, with the extension of substrate remodeling-in many patients. 16 Moreover, in the case of extra-PV drivers, a subsequent classification whether the left atrium (LA) or right atrium (RA) is responsible could lead to prior planning regarding the need for transseptal access or not.
Traditionally, invasive mapping approaches have been applied to identify the location of AF drivers as targets for catheter ablation. 17,18 In contrast, noninvasive methods (ie, the 12-lead electrocardiogram [ECG]) are mostly used for the clinical and automatic detection of AF vs sinus rhythm 19 or other arrhythmia. 20 The use of a noninvasive technique, such as the ECG, could help to guide ablation procedures by identifying the location of the AF drivers pre-procedure, and hence target more specific affected atrial regions for ablation.
In the present work, we sought to discriminate AF drivers located near the PVs compared to extra-PV atrial sites based solely on the 12-lead ECG. Towards this end, we trained an automatic machine learning classifier on data from computer simulations and evaluated its performance on clinical ECGs. Moreover, we assessed the acute success of PVI in the in silico cases to predict whether PVI in cases of AF drivers located near the PVs would be sufficient to terminate AF (ie, restoration of sinus rhythm, or AF conversion into atrial flutter). In this case, AF drivers identified in the PVs could be directly targeted for ablation without prior time-consuming electroanatomic mapping.

Simulation setup
A database of simulated AF scenarios driven by localized rotors and focal sources was computed on 2 volumetric biatrial anatomies generated from segmented magnetic resonance imaging data of healthy subjects (#3 and #5 from ref 21). The atrial geometries were modeled with z11 million tetrahedral elements with fiber direction computed by a semiautomatic rule-based algorithm. 22 Cellular atrial electrophysiology was represented by the Courtemanche-Ramirez-Nattel model, including AF-induced remodeling 23 in 5 regions with different conduction velocities 21 to take into account heterogeneity and anisotropy in the atria. The atrial geometries were considered with and without fibrotic tissue. Transmural fibrotic tissue was modeled as 2 circular patches with a radius of 14 mm in which 50% of the elements were almost nonconductive (conductivity of 10 27 S/m) to model the presence of scar tissue, and the other 50% included ionic changes to represent the effect of cytokines (TGF-b1) as described by Roney and colleagues. 24 AF rotor episodes were induced using the phase singularity distribution method, 25 which consists of placing phase singularities in the atria, estimating an activation time map by solving the Eikonal equation, and using this as an initial state for a monodomain simulation with openCARP. 26,27 In addition, localized focal source episodes were induced by 30 mA cm 2 current applied for 2 ms to a cubic region with edge length of 3 mm centered around the stimulation point in monodomain simulations. The focal source pacing cycle lengths were chosen in the 130-200 ms range following the same distribution observed from the rotor cycle lengths. The phase singularities and the focal stimulation points were placed in 300 uniformly distributed points in the atria, and 3 seconds of activation was computed ( Figure 1A.1 and 1B.1). The following cases were excluded for further analysis: (1) the single rotors were not maintained for the whole simulation time; and (2) the focal source episodes induced reentry that led to the termination of the focal activity. This led to a dataset of 141 biatrial simulations (10 simulations with the AF drivers located in the PVs; 131 simulations located in extra-PV areas, of which 106 were in the RA and 25 in the LA). PV areas were defined as determined by the semiautomatic algorithm used to compute the fiber directions and anatomical labels 22 (Figure 2A).
The monodomain simulations resulted in spatiotemporal transmembrane voltage distributions. The transmembrane voltage distributions were subsequently interpolated on a coarser surface mesh with sufficient resolution for the calculation of body surface potentials 28 (z75,000 triangular elements). Body surface potential maps (BSPMs) were calculated for each AF episode using the boundary element method. 29 For each AF episode BSPMs were computed using 8 different torso models (19,898 triangles on average) generated from segmented magnetic resonance imaging data of healthy male and female subjects ( Figure 1A.2 and B.2). 21 From the BSPM, the 12-lead ECG was extracted with 3second duration ( Figure 1A

Simulated ablation procedures
To assess the effect of PVI procedure on the mechanisms driving AF, nonconducting scars were added circumferentially around ipsilateral PVs in the simulations ( Figure 3A). PVI was applied after the initial 3 seconds of simulation.
After PVI, simulations were continued for another 1 second to check for arrhythmia termination or a change on the driving mechanisms (eg, conversion to atrial flutter). In the cases where PVI did not terminate AF, a roofline (RL) was applied ( Figure 3B). If the RL did not terminate the AF either, an additional ablation scar was applied between the mitral valve and the left PVI line (mitral isthmus [MI], Figure 3C). Prior to applying subsequent ablation lines, the simulations were always computed for 1 second to capture any change of the arrhythmia dynamics.

Feature extraction
One hundred and three features were extracted from the signals using several biosignal processing methods, such as Hjorth descriptors to analyze the spectral moments from the time-domain signals 30,31 ; recurrence quantification analysis (RQA) on the vectorcardiogram, 32 spatial reduced RQA, and individual component RQA 33 to analyze the topological structure of multidimensional dynamical systems; principal component analysis (PCA) eigenvalues to observe the variability shown by the principal components (PCs)  over time and between them; ratio of the PCA eigenvalues to increase and highlight the differences between the PCA eigenvalues; and organization index and spectral entropy to study the variability and stability of these mechanisms in time and frequency domains. 30,34,35 No features were derived for any single ECG leads to avoid an undesirable influence of atria orientation on the resulting calculated ECGs. 36 Hence, all features were averaged over the 12 leads or calculated over the PCs. A summary of the features and more information regarding the feature extraction methods are provided in the Supplemental Material.

Feature selection
Features were selected with a greedy forward selection technique to implement a feature set. This algorithm started with an empty feature set and added, in each iteration, the feature that led to the highest classification performance increase assessed using the geometric mean (G-mean) between sensitivity and specificity of a decision tree classifier (more details about the implemented classifier are discussed in the following section). The algorithm stopped when performance based on the validation set could not be further increased. Candidate features with a correlation coefficient .0.6 with any of the features already included in the set were not considered. This correlation threshold was chosen as a compromise between avoiding redundant information and allowing physiological explanation.

Machine learning classification
In this study, a decision tree classifier was implemented for binary classification (AF drivers located at the PVs vs extra-PV drivers) owing to its simplicity and explainability (similar results obtained with other machine learning algorithms for the binary classification are provided in the Supplemental Material). The decision tree was trained and applied using the MATLAB functions fitctree and predict, respectively.
First, a multifeature classification was performed with the feature set selected as described in the paragraph on feature selection. Hold-out cross-validation was performed randomly, dividing the simulated dataset into a training set, validation set, and test set with a ratio of 70%, 15%, and 15%, respectively. The training set was used to tune classifier parameters, while the validation set was used for the greedy feature selection optimization. To reduce the random division's influence, the process was repeated 100 times (training and validation sets were recalculated at each loop, while the test set was saved and kept the same for all experiments). The classes have been balanced by setting the Prior model parameter in the MATLAB fitctree function to uniform. Sensitivity, specificity, and positive predictive value (PPV) were calculated considering the PV class as positive and the extra-PV class as negative. Lastly, the classifier trained again with all the simulated data and the resulting feature set from the previous analysis was tested on the clinical dataset, which was not used during algorithm development.
Second, binary classification using the same feature set extracted from the first approach was performed with different cross-validation strategies: leave-one-atrium-out (LOAO) and leave-one-torso-out (LOTO). These strategies were applied to verify that the atrial geometries did not have a significant influence on the features extracted from the simulated signals. 36 For LOAO, 1 atrial geometry was used in the training set and the other atrial geometry was used in both the validation and the test set (50% of the ECGs from this geometry in each set). This procedure was repeated twice to cover all permutations of validation and test atrial geometry. The average G-mean of the 2 iterations was used as performance parameter. The same process was applied for LOTO with 8 repetitions, since 8 torso geometries were used in this study.
Finally, thanks to the ground truth given by the simulations, and to estimate how feasibly a machine learning approach can discriminate the position of AF drivers, a classifier was implemented for a 3-class classification. The 3 classes were defined as AF drivers located in the PVs, extra-PV LA areas, and RA areas. A new feature set was selected with the greedy technique similar to the first approach described in this section, and hold-out cross-validation was used on the simulated dataset. The classes have been balanced in a similar manner to the binary classification.

Statistical analysis
Classifier performance was evaluated using the G-mean between sensitivity and specificity metric: Figure 3 Scar lines were applied on the atrial models to simulate several ablation procedures. In the atrial model, the right endocardium is shown in white, the left endocardium in red, both epicardia in blue, and the scar lines in cyan. A: Pulmonary vein isolation (PVI): Scars added circumferentially around ipsilateral PVs. B: PVI1RL: Roofline scar added between the left PVI and the right PVI. C: PVI1RL1MI: Scar added between the left PVI and the mitral valve (mitral isthmus ablation).
The G-mean metric strikes a balance for binary classification performance on both the majority and minority classes. 37 A low G-mean indicates a poor performance in the classification of the positive cases even if the negative cases are correctly classified as such. As such, it can avoid overfitting the negative class and underfitting the positive class and vice versa.
For the third classification approach, the G-mean metric was modified to make it suitable for 3-class classification: with K being the number of classes, and i and j the classes considered as positive and negative, respectively. 38 Patient characteristics were evaluated with the t test between case and control groups (P values , .01 considered significant; Table 1). Multivariate regression analysis was performed on variables that differed between groups with a P value , .1 (Table 1) and our classifier. Age and sex were included in the multivariate model for their clinical relevance.

Clinical data
We retrospectively included a total of 46 consecutive patients (72% persistent AF, 70% male; Table 1) who presented between 2019 and 2020 with spontaneous AF (as baseline rhythm) on admission day and during electrophysiology study and who met the following criteria: first ablation for AF without any prior LA ablations (eg, Wolff-Parkinson-White patients, etc were excluded) and AF termination (sinus rhythm restoration or conversion to atrial flutter) during or within 1 minute after completion of PVI (case group/PV class, n 5 23). Patients meeting the above-mentioned criteria but without termination of AF during/immediately following PVI were included as controls (control group/extra-PV class, n 5 23).
A dataset of 46 clinical AF 12-lead ECGs was used to validate the classifier, which was trained solely on synthetic data generated using the computational framework described above. Three-second clinical ECGs were collected intraprocedurally prior to PVI during ongoing AF. The signals were notch filtered at 50 Hz and bandpass-filtered between 0.05 Hz and 100 Hz (examples of the 12-lead ECGs can be found in the Supplemental Material). The QRS-T complexes were automatically removed and replaced by a sigmoid function to connect the remaining f-wave segments using an interpolation method explained in Pilia and colleagues. 39 All the features extracted and selected from the simulated signals by the feature selection algorithm were extracted from the clinical signals too. A second set of 3-second clinical 12-lead ECGs was collected from the same 46 patients during the same procedure prior to PVI during ongoing AF. This ECG set was also provided to the classifier to check the consistency of the classification.
Patient information was de-identified and the study was exempt from Institutional Review Board approval.

Patient characteristics
Patient characteristics with associated P values between case and control groups are provided in Table 1. The multivariate regression analysis performed between the variables left ventricular ejection fraction, LA dilatation, renal dysfunction, sex, age, and our classifier showed that the classifier is the only significant variable (P 5 .049, hazard ratio 5 11.8), indicating that the classifier has added value beyond the routine clinical parameters for detecting patients who require more than a "PVI-only" approach (the whole multivariate regression analysis table is provided in the Supplemental Material).

Acute ablation outcome
The following results are summarized in Table 2. Virtual PVI was applied in all 141 atrial simulated scenarios ( Figure 3A). In 13 cases, PVI had a consequence on the ongoing arrhythmia; in 6 cases, the arrhythmia was terminated and sinus rhythm restored, whereas the remaining 7 cases converted to different types of atrial flutter. These 13 cases consisted of 10 simulations belonging to the PV class (100% of all scenarios in the PV class, including all 6 simulations where PVI restored sinus rhythm) and 3 simulations belonging to the extra-PV class LA (12.5% of the total extra-PV LA simulations).
RL ablation was applied to the 135 simulations where PVI did not lead to sinus rhythm restoration ( Figure 3B). The additional RL terminated the arrhythmia in 2 cases that had converted to atrial flutter after PVI (1 case in PV class and 1 case in extra-PV LA). MI ablation was then applied to the 133 simulations where PVI1RL did not restore sinus rhythm ( Figure 3C). PVI1RL1MI terminated the arrhythmia in another 3 cases, all of which had become atrial flutter after PVI (1 case in PV class, 2 cases in extra-PV LA).

Binary classification on synthetic data
The decision tree for binary classification (AF drivers located in the PVs vs extra-PV drivers) was repeated 100 times to reduce the random division's influence on the classifier performance. Eleven is the number of features to which the greedy forward selection technique has reached the maximum G-mean, and therefore, it was used as the number of features in the feature set. The 11 most frequently selected features in the 100 iterations were as follows: the recurrence rate extracted with individual component RQA from the second and third PC of the 12-lead ECGs; the variance of the mobility; l 7 , l 5 , l 12 , s l5 , and s l6 ; R PC ; the recurrence rate extracted from the vectorcardiogram, and the organization index averaged over the 12-lead ECG. The selected features can be seen in Figure 4A. All the selected features showed a significant difference between the 2 classes. Extra information regarding the extracted features and a feature importance analysis are provided in the Supplemental Material.
The binary classifier achieved a G-mean of 85.3% 6 9.4% on the in silico test set with a sensitivity of 95.5% 6 1.4% and a specificity of 76.3% 6 13.1% on the simulated dataset (PV considered as the positive class). Classifiers trained using the LOAO and LOTO strategies yielded test G-means of 84.3% 6 2.9% and 85.3% 6 3.7%, respectively.

Three class localization: PV vs extra-PV LA vs RA
The 3-class decision tree achieved 75.1% 6 9.9% test Gmean with a feature set comprising, on average, 13 features. The most often selected features are shown in Figure 4B.

Performance on clinical ECGs
The 11 features shown in Figure 4A were used to train the binary classifier solely on the simulated data. The resulting classifier was subsequently evaluated on the 46 clinical ECGs acquired from 46 patients. On this unseen clinical dataset, the classifier achieved 78.1% G-mean with a sensitivity of 73.9%, a specificity of 82.6%, and PPV of 80.9%. On the clinical dataset extracted for the consistency analysis, the classifier achieved 71.7% G-mean with a sensitivity of 69.6%, a specificity of 73.9%, and PPV of 72.7%. Only 3 cases were classified differently compared to the test performed with the first set, reaching a matching rate of 93.5%. Table 3 shows the confusion matrix obtained from the decision tree classifier on the clinical ECGs (the confusion matrix obtained on the "consistency" ECG dataset is provided in the Supplemental Material).

Discussion
Our results suggest that a noninvasive machine learning approach can discriminate the source area of the mechanisms sustaining AF, which could improve protocols for clinical therapeutic decision-making and ablation procedure planning.
The 12-lead ECG is broadly used for cardiac diagnostics and to discriminate AF from other cardiac rhythms. 20 However, to the best of our knowledge, they have never been used so far to infer AF driver positions, as opposed to invasive intracardiac mapping, which is the most commonly used approach. 17,18 In the present work, we implemented a decision tree classifier to discriminate the location of AF drivers by using only the noninvasive ECG signals (similar results obtained with other machine learning algorithms are provided in the Supplemental Material). An inside-out computational simulation generated 12-lead ECGs from spatially distributed rotors and focal sources sustaining AF with different combinations of atrial and torso geometries. This provided an ideal and controlled environment to generate a consistent ground truth dataset of AF perpetuation mechanisms without This study builds on our previous work 30, 40 and expands to different atrial geometries and different AF driving mechanisms adding focal sources, and presents a first application of the resulting classifier on clinical data. Moreover, an acute ablation procedure outcome analysis was implemented in the in silico cases.

Acute PVI success prediction
PVI is the most common AF ablation therapy 1 owing to the often localized AF drivers in the PVs. 10 Hence, we aimed to identify the PV driving mechanisms using the 12-lead ECG. We also wanted to verify whether AF would be terminated following PVI, or at least converted into more organized rhythms that are often easier to treat, such as atrial flutter.
The results of applying PVI in silico ( Table 2) help to illustrate the efficacy of this ablation procedure in cases where AF is driven by mechanisms located in the PVs. Accordingly, 100% of the cases labeled as PV showed AF organization: 6 terminated and 4 converted to atrial flutter. Interestingly, the extra-PV cases were not affected by the PVI, as expected: only 3 arrhythmias driven by extra-PV LA areas converted into atrial flutter, probably owing to the proximity of the AF driving mechanisms to the PVs even if not labeled as belonging to the PV class. Therefore, the proposed classifier could assist on clinical decision-making for the delineation of the optimum mapping and ablation strategy according to patient-specific characteristics. For instance, if a new case is identified as belonging to the PV class by our classifier, the suggested procedure to treat the fibrillation would be PVI. It could also be considered to use cryoablation, skipping the use of the time-consuming and costly electroanatomical mapping step prior to PVI in these cases, as identified by our novel ECG-based machine learning classifier. On the contrary, for the cases identified as extra-PV class, PVI showed to be not effective to acute sinus rhythm restoration or to atrial flutter conversion. Nevertheless, there are many studies that have certified the benevolent effects of performing PVI, 41,42 even if it does not lead to an acute AF termination. However, based on the indications of our classifier, electrophysiologists would know a priori the need for subsequent ablation procedures in addition to PVI (thus a patient-specific preparation of surgical instrumentation) to achieve acute AF termination.
Finally, the clinical dataset was labeled using the acute PVI success as decision parameter (ie, PVI-terminated AF leads to PV class). The results regarding the PVI procedure on our simulations support the perspective that the labeling on the clinical dataset was properly performed, owing to the obvious link between PV mechanisms and the success of PVI.

Acute RL and MI outcome prediction
In addition to PVI, 2 common post-PVI ablation lines were investigated: RL and MI ( Figure 3B and 3C and Table 2). RL and MI led to the termination of atrial flutter resulting from PVI. However, the additional ablation created during RL and MI had no influence on acute AF mechanism termination by PVI considered in this study, as suggested in  previous work. 43 Nevertheless, it is recognized that these linear ablations can be effective to prevent some postablation atrial flutter (eg, perimitral atrial flutter) segmenting the atria into isolated regions. 44

Feature sets
Compelling results were reported previously for RQA approaches and PCA eigenvalue ratios regarding the characterization and discrimination of different arrhythmias. 32,45,33,40,46 Indeed, RQA and the ratio of PCA eigenvalues were also key features for the binary classification implemented in this study. Nine of the 11 most selected features were obtained with RQA or ratios of PCA eigenvalues ( Figure 4A), probably owing to their sensitivity in detecting changes in the dynamic behavior over time. 47 We observed that AF drivers located in the PVs produced a more regular activity than the extra-PV cases ( Figure 1A-1B.3). In fact, in the simulated episodes, the irregular activity driven by PV cases was limited to a small portion of tissue owing to the presence of anatomical obstacles (eg, the PV sleeves) that prevented the driving mechanisms from meandering to the remaining parts of the atria. Therefore, in the remaining atrial areas, the signal was propagated as an organized single wavefront. Contrarily, AF driving mechanisms located in extra-PV areas were free to meander throughout the tissue owing to the fewer anatomical constraints, which yielded more irregular ECGs. The selected features succeeded in detecting these irregularities and differences between classes. This information was also quantified by the selected RQA and PCA eigenvalue ratio parameters, resulting in significantly higher values for the PV and extra-PV classes, respectively.
Regarding the 3-class classification, 7 out of the 13 most selected features ( Figure 4B) were the same features selected for the binary classification ( Figure 4A). This supports the considerations about the higher regularity of the signals produced by the PV cases compared to the extra-PV cases. The PV cases have been shown more regular than the extra-PV LA, and even more regular than the RA cases owing to fewer anatomical constraints starting from the PV cases and ending with the RA cases. These observations corroborate our previous studies. 30,40 Some of the features are different between the 2 sets, and more features are required to solve the 3class classification, since this represents a consecutive approach more complex than the binary one. Therefore, different information may be required to perform this discrimination task. Accordingly, more features were needed to characterize the increasingly irregular activity generated by the 3 classes, starting from the PVs class up to the RA class. This was the case with s OI and SE, which showed significantly lower and higher values from class PVs to class RA, respectively. However, some features differing between the 2 classification approaches did indeed measure similar characteristics of the signal (and were very correlated), so they could be interchangeable, ie, the average eigenvalue l 7 and the average ratio R 7 from the 3-class and binary classification, respectively. Both these parameters analyze the variability of PC 7 over time, but R 7 emphasizes this variability more than l 7 .

AF driver localization
Previous works have considered ECGs to classify AF from sinus rhythm, 19,48 or to automatically diagnose multiple types of abnormal heart beats. 20,49 To the best of our knowledge, ours represents the first study to use the 12-lead ECG directly for automatic and noninvasive discrimination of the location of AF drivers to guide clinical decision-making and procedure planning (electroanatomical mapping required? LA access required?).
The high performance on the simulated dataset achieved for PV vs extra-PV AF driver classification with old-out cross-validation indicates the potential of using the features extracted in this work to identify the location of the sustaining AF mechanism using only the noninvasive 12-lead ECG signals. The classifier trained in the computational framework was subsequently tested on a clinical dataset, each consisting of 12-lead ECGs acquired from 46 patients (23 labeled as PV class, and 23 as extra-PV class). The G-mean of 78.1% reached on the clinical test set suggests that such a noninvasive classification might provide valuable complementary information in clinical practice. The specificity of 82.6% and PPV of 80.9% indicate the algorithm's robustness in identifying the extra-PV cases, suggesting that a PVI-only approach (eg, using a cryoballoon) might not be sufficient in these patients to treat AF. Instead, physicians may choose an ablation technology that is able to detect non-PV trigger (eg, electroanatomic mapping and additional extra-PVI radiofrequency ablation). Also, the sensitivity of the classifier is comparably high (73.9%), indicating robustness of the classifier in identifying the cases where PVI is sufficient to terminate or convert the arrhythmia (PV class). In these cases, direct cryoablation without prior mapping might suffice to treat the patient. In addition, the consistency test performed on the ECG set of clinical data extracted from the same patients confirmed the nonrandomness of the classification implemented in this project, matching 93.5% of the results between the 2 sets (only 3 more cases were misclassified in the second analysis than in the first one, 2 belonging to the PV class and 1 to the extra-PV class).
The 3-class classifier demonstrated the potential of this machine learning approach to identify the atrial position of the mechanisms sustaining AF even more deeply. The Gmean metric was only slightly lower than the binary classification G-mean (75.1% vs 85.3%). The 3-class approach could provide important information regarding the need to perform a transseptal access to the LA during the electrophysiologic study or whether catheter access to the RA should suffice.

Influence of torso and atrial geometries
From the literature, it is known that the atrial models used to generate ECG signals can have a strong influence on the signals themselves, likely introducing a bias in machine learning approaches based on simulated training data. 36 Such anatomical bias can lead to a misclassification of the signals generated from unseen atrial geometries. Therefore, in the present study, we focused on features that are not prone to be affected by the specific torso and atria models used to simulate the AF mechanisms. We used a multi-lead featureextraction approach to avoid focusing on a single lead, ie, a specific projection of cardiac activity, which could be strongly influenced by atrial geometry and orientation. As such, it is easier for the multi-lead approach to generalize well. The LOAO and LOTO analyses confirmed the good generalization properties of our classifier regarding unseen atrial and torso models.

Limitations
The simulated AF drivers used to train the machine learning classifiers in this study are limited to stable long-standing rotors and focal sources. Thus, the classifier was not specifically trained to localize other drivers such as multi-wavelet reentry, 50,51 meandering rotors, 52 or intramural reentry. 53 Moreover, in silico analysis of acute PVI success in this study may not lead to the same results in clinical practice because of the presence of remodeled tissue. Nevertheless, the performance on the clinical data containing in vivo AF drivers was not markedly lower as on the synthetic dataset.
The AF episodes were simulated with atria-only models without the ventricles. Thus, the QRS-T complex was absent from our simulated signals. Nevertheless, the removal of QRS-T complex and its replacement with a sigmoid function, as done here, or other forms of QRS-T cancellation 54 has proven to robustly extract the f-wave component from the clinical 12-lead ECG, so that the signals can be analyzed by our classifier without relevant disturbance from ventricle activity. Further refinements of the synthetic dataset could focus on including heterogeneous atrial wall thickness 55,56 or extending the dataset to cover even more anatomical torso, atrial, 57 and conduction velocity variability.
Three-second-long signals were simulated and used to train the classifier implemented in this study for computational limitations. As an outlook, a test of the classifier with clinical signals of a longer length could be performed to verify the robustness of the classifier.
A decision tree was chosen as a machine learning classifier for its simplicity. However, other classification algorithms could be optimized and tested to investigate more robust methods (eg, support vector machines or artificial neural networks; Supplemental Material).
To strengthen the statistical power, the classifier could be prospectively applied on further clinical data. Clinical signal labeling (PV and extra-PV classes) was done retrospectively at acute PVI success (termination of AF or conversion to atrial flutter). Nevertheless, there is no exact information about the AF driver mechanisms and their positions. Therefore, the ground truth of the clinical dataset between the extra-PV LA and RA classes could not be labeled. In a follow-up study, the predictive power of the classifier should be tested regarding recurrence of AF after PVI (long-term PVI outcome).

Conclusion
The results presented in this study show that (1) a machine learning classifier to distinguish between AF drivers located in the PVs vs in other atrial regions is feasible (82.6% specificity, 73.9% sensitivity on a clinical dataset using 12-lead ECG; 93.5% of results matching on a set of different ECG segments extracted from the same 46 patients for a consistency analysis); (2) classifiers trained on simulated data for which the ground truth is known can generalize well to unseen clinical data; (3) AF drivers identified in the PVs could be considered to be treated with cryoballoon PVI without prior time-consuming and costly electroanatomic mapping; (4) AF drivers identified in extra-PV areas using the ECG are unlikely to terminate or convert upon PVI. Prospective studies are needed to confirm points 3 and 4.
As such, a machine learning-based classifier leveraging the routinely available noninvasive ECG signal could prove to be valuable for clinical decision-making and increase personalization of therapy.