 Research
 Open Access
 Published:
Evaluation and optimization of novel extraction algorithms for the automatic detection of atrial activations recorded within the pulmonary veins during atrial fibrillation
BMC Medical Informatics and Decision Making volume 22, Article number: 225 (2022)
Abstract
Background and objective
The automated detection of atrial activations (AAs) recorded from intracardiac electrograms (IEGMs) during atrial fibrillation (AF) is challenging considering their various amplitudes, morphologies and cycle length. Activation time estimation is further complicated by the constant changes in the IEGM active zones in complex and/or fractionated signals. We propose a new method which provides reliable automatic extraction of intracardiac AAs recorded within the pulmonary veins during AF and an accurate estimation of their local activation times.
Methods
First, two recently developed algorithms were evaluated and optimized on 118 recordings of pulmonary vein IEGM taken from 35 patients undergoing ablation of persistent AF. The adaptive mathematical morphology algorithm (AMM) uses an adaptive structuring element to extract AAs based on their morphological features. The relativeenergy algorithm (RelEn) uses short and longterm energies to enhance and detect the AAs in the IEGM signals. Second, following the AA extraction, the signal amplitude was weighted using statistics of the AA sequences in order to reduce over and undersensing of the algorithms. The detection capacity of our algorithms was compared with manually annotated activations and with two previously developed algorithms based on the Teager–Kaiser energy operator and the AF cycle length iteration, respectively. Finally, a method based on the barycenter was developed to reduce artificial variations in the activation annotations of complex IEGM signals.
Results
The best detection was achieved using RelEn, yielding a false negative rate of 0.76% and a false positive rate of only 0.12% (total error rate 0.88%) against expert annotation. The postprocessing further reduced the total error rate of the RelEn algorithm by 70% (yielding to a final total error rate of 0.28%).
Conclusion
The proposed method shows reliable detection and robust temporal annotation of AAs recorded within pulmonary veins in AF. The method has low computational cost and high robustness for automatic detection of AAs, which makes it a suitable approach for online use in a procedural context.
Background and objective
Atrial fibrillation (AF) is the most common arrhythmia in clinical practice. Morbidity and mortality associated with AF place a considerable burden on society related mostly to thromboembolic and hemodynamic complications. Catheterbased ablation has now evolved to become an important treatment option for many patients with AF. The analysis of intracardiac electrograms (IEGMs) during ablation procedures provides important information in order to identify potential ablation targets and predict ablation outcome. More specifically, characteristics such as the AF cycle length (CL) of atrial activations (AAs), and its dynamic patterns, have been shown to help identify critical ablation targets or anticipate ablation outcome [1,2,3,4,5]. Similarly, the recording of intermittent rapid atrial activities in the pulmonary veins (PVs) has been shown to identify arrhythmogenic foci that trigger AF [6, 7]. The analysis of PVs activity may also provide clues to better define ablation targets and ablation endpoint in chronic forms of AF [8, 9].
In order to perform analysis of the AF CL and of the patterns of AA times series, an effective automatic extraction algorithm is the first step needed. Various algorithms based on amplitude thresholds [10, 11], energy operators [12] or template matching [13] have been proposed, but automatic detection of individual activations is technically challenging when dealing with AF IEGMs exhibiting a large patient and timedependent spectrum of morphologies, amplitudes and frequencies.
Another limitation is the technical difficulty of correctly estimating the local activation times (LATs) of the detected AAs. The constant changes in the IEGM active zones observed in complex and/or fractionated signals will induce variations in the temporal analysis of AA sequences. The maximum and/or minimum peaks or the maximum slope have been traditionally used to estimate LATs [14, 15]. These methods may provide unreliable or biased estimates of the LAT sequence, especially in the presence of complex or fractionated signal morphologies, such as in AF recordings.
We recently developed two algorithms to extract biomedical events in realtime/online applications [16, 17]. The purpose of our study is therefore to (1) evaluate these two approaches in order to identify an algorithm able to provide reliable automatic extraction of intracardiac AAs recorded within the pulmonary veins during AF, and (2) propose a robust method to estimate the LATs of the detected AA sequences in the presence of complex and/or fractionated signals. We compared our methods with manually annotated activations and with two other previously developed algorithms based on the TeagerKaiser energy operator [18] and the AF cycle length iteration [19], respectively.
Methods
To obtain the raw AA detections from IEGM, we applied two innovative algorithms: (1) a shortterm event extraction algorithm named RelativeEnergy (RelEn) [16], and (2) a mathematical morphology approach with an adaptive structuring element called Adaptive Mathematical Morphology (AMM) [17]. Following the raw AA detection, we further used the statistics of the extracted AA intervals to reduce the over and undersensing of AA detections. Then, we used a barycenterbased method to correctly estimate the LAT. Figure 1 illustrates the workflow used in the present study.
Electrogram dataset
The electrogram dataset consisted of 118 intracardiac bipolar recordings collected in 35 patients (Age [IQR]: 61 [59–68] years old) undergoing first time ablation of persistent AF (sustained duration of AF 12 [7–24] months) in three different hospitals (CHUV, Lausanne, Switzerland; Inselspital, Bern, Switzerland; CHU de Bordeaux, Bordeaux, France). All patients provided written informed consent and the study was approved by the Local Human Research Ethics Committees.
The recordings were made using a 20pole variable circumferential Lasso® catheter (Biosense Webster, Diamond Bar, CA) with closely spaced electrodes (2–6–2 mm) placed in the PVs prior to radiofrequency ablation. The data were obtained via the EP recording system (Labsystem Pro, Boston Scientific, Lowell, MA, for Bordeaux data; and Axiom Sensis XP®, Siemens, Berlin, Germany, for Lausanne and Bern data). The bipolar IEGMs were recorded during the electrophysiological protocol at a sampling rate of 1 or 2 kHz (bandpass filtered 30–300 Hz, 50 Hz notch filtered). The 118 IEGM segments had a mean duration of 43 ± 18 s (median 49 s; range 9–75 s).
In order to test the performance of the algorithms, a blinded clinical electrophysiology expert manually annotated the exact LATs on the recordings using an inhouse Matlabbased graphical user interface. These manual annotations were used as the ground truth. The database was randomly distributed into a training cohort (22 patients, 78 recordings, total IEGM duration of 3525 s, total number of 28,136 AAs) to optimize the algorithm, and a validation cohort (13 patients, 40 recordings, total IEGM duration of 1527 s, total number of 19,090 AAs) to compute detection efficiency. The two cohorts were created patientwise while aiming to keep a 2:1 ratio in the number of recordings (i.e. each cohort contains IEGM signals from different patients). Random patients (using builtin uniform random generator in Matlab) were assigned to the validation cohort until the number of recordings reached 1/3 of the total number. Clinical characteristics were similar between the two cohorts and are presented in Table 1. The significance of any difference between subgroups was analysed with the Mann‐Whitney U test for continuous variables, and with Fisher’s exact test for categorical variables.
Raw detection of atrial activations
Relative energy algorithm
The relativeenergy (RelEn) algorithm is an original shortterm event detection algorithm proposed recently [16]. In this approach, illustrated in Fig. 2, the input signal is enhanced by multiplication with a signalderived coefficient to allow easier and more accurate detection of the AA. The enhancing coefficient signal \(c\left( \cdot \right)\) is computed as the ratio between the short and longterm energies of the input signal \(x\left( \cdot \right)\):
where \(s_{win}\) and \(l_{win}\) represent the halflength of the short and long sliding windows, respectively. The windowing is performed using a Hamming window. While the shortterm window duration allows for the extraction of the AA, the longterm window duration reflects the local baseline behavior of the electrogram. The parameter p denotes the exponent. Since the AAs can be intermixed with complex and/or fractionated signals, small values of p can lead to a high number of false positives. In contrast, a larger p has the tendency to improve the extraction of the AAs when higher levels of perturbation are present, but this may lead to missed detections of low amplitude AAs. In the present study the exponent parameter p was set to 4, as it was shown in [16] that the detection error rate does not drastically change around the optimal parameter. Finally, the output signal is computed as:
AAs are detected on \(x_{RE}\) signal using a minimum threshold \(TH_{P}\) ad hoc, defined as the \(P\)th percentile of the amplitude distribution of \(x_{RE}\). The three parameters \(s_{win}\), \(l_{win}\) and \(P\) are signaldependent and need to be tuned to achieve efficient detection. To avoid the detection of multiple peaks during one activation, a minimum interval between two consecutive activations must be defined. A 70 ms interval was selected based on the shortest reported interval physiologically recorded in PVs [20].
Adaptive mathematical morphology algorithm
The adaptive mathematical morphology (AMM) algorithm has been thoroughly presented in previous papers aiming at either extraction of QRS complexes from the surface ECG [17] or detection of AA sequences from intracardiac signals [21]. Briefly, the AAs are extracted using a structuring element (SE) which is continuously updated for each new AA based on the topological features of the previous detected AA. The AMM algorithm consists of the following steps (Fig. 3A):

(1)
A synthesized SE with an AAlike morphology is empirically defined using the IEGM at hand (Fig. 3B). The SE is defined by five fiducial points representing the onset, offset, peak, the minimum between the onset and the peak, and the minimum between the peak and the offset. The amplitude of the synthesized SE is computed as the difference between the maximum and the minimum value of the first 500 ms of the IEGM. The duration of the synthesized SE is empirically chosen. In the present work, we will test a range of SE lengths to find the optimal duration for an efficient AA detection (Section III Results).

(2)
The IEGM is split in 200ms nonoverlapping sliding windows. Using the SE, the average of the mathematical morphology operators tophat and bottomhat is calculated on each 200ms IEGM epoch (Eq. 3). The tophat and bottomhat operators are based on two basic morphological operation, dilation and erosion, and the combined operators opening and closing [22]. The first 200ms IEGM window is filtered using the synthesized SE, afterwards the following windows are filtered using an updated SE (step 4). Figure 3C shows that each filtering phase results in a feature signal \(x_{MM}\) which consists in nonzero values at the times of AA and zero otherwise.
$$x_{MM} = x  \frac{x \circ SE + x \cdot SE}{2},$$(3)where x represents the 200ms IEGM to which the mathematical morphology filtering is applied, the symbols ∘ and ⦁ denote the opening and closing operation respectively.

(3)
Following the filtering phase of each window, the feature signal \(x_{MM}\) is scrutinized to extract the AAs. The nonzero segments are identified and processed as follows:

The most significant peak in the extracted segment is defined as the AA. To prevent false AA extraction, the distance between two successive detected AAs must be at least 70 ms (physiological limit).

Onset and offset of the newly detected AA are considered as the start and end of the nonzero segment.

The minimum between the onset and the significant peak, together with the minimum between the significant peak and the offset are extracted for the SE update (step 4).


(4)
The location indices and amplitude values of the five fiducial points (AA onset, offset, and peak, and the local minima around the onset and offset) extracted at step (3) are used to update the SE so that it best represents the actual AA morphology of the subject:
$$\begin{aligned} NewLocation & = \left( {1  \alpha } \right) \cdot CurrentLocation \\ & \quad + \alpha \cdot ExtractedLocation \\ NewAmplitude & = \left( {1  \alpha } \right) \cdot CurrentAmplitude \\ & \quad + \alpha \cdot ExtractedAmplitude \\ \end{aligned}$$(4)
CurrentLocation and ExtractedLocation represent the location indices of the first minimum, peak, second minimum and offset of the current SE and the extracted AA, respectively. The CurrentLocation is computed as the distance from the fiducial point to the onset of the current SE, and the ExtractedLocation is computed as the distance from the fiducial point to the onset of the extracted AA (the onset of the nonzero segment). CurrentAmplitude and ExtractedAmplitude represent the amplitude of the offset, first minimum, peak, second minimum and offset of the current SE and the extracted AA, respectively. Using NewLocation and NewAmplitude, SE is updated by means of linear interpolation. The newly updated SE is then used for filtering of the next IEGM window. An α value of 0.5 was used as learning coefficient to avoid excessive variations of SE, for instance in case of large AA amplitude changes.
Reduction in over and undersensing of atrial activations
Due to the various morphologies of the AAs in AF and the beattobeat variability in morphology and amplitude, a substantial amount of activations may be missed, or noise, artifacts or farfield components may be considered as activations. We therefore aimed to design a postprocessing method able to reduce the oversensing, undersensing, and total error rate of the detection algorithms. To this end, the signal amplitude before and after a detected activation is weighted in order to spot a missed or false detection according to the probability that it represents a true activation. Two weight functions, one linear (\(w_{l}\)) and one nonlinear (\(w_{n}\)), are computed based on the statistical information extracted from the raw AA detections:
where \(meanAA\) and \(\sigma_{AA}\) represent the mean and standard deviation of the AA intervals, respectively. \(P_{70}\) and \(P_{meanAA}\) represent the weighting factor at time \(t = 70\) ms and \(t = meanAA\) ms.
The linear weight function \(w_{l}\) is a ramp signal which starts from the value \(P_{70}\) at time \(t = 70\) ms and reaches the value \(P_{meanAA}\) at \(t = meanAA\) ms. The nonlinear weight function \(w_{n}\) is a truncated Gaussian distribution of mean \(meanAA\) and standard deviation \(\sigma_{AA}\), centered at \(t = meanAA\) ms and enlarged by a factor \(E\). For both weight functions, the null value during the first 70 ms ensures that no new activation is detected during this interval (physiological limit).
The postprocessing is performed in two steps: false detections are removed first, and then, missed AAs are screened.
Correction of false atrial activations
As a first step and for each new AA detection, the two weight functions (Eq. 5) are computed for the preceding and succeeding interval around the current activation (LAT_{0}). The amplitude of the previous and the next activation around the current activation is further multiplied by the weight functions. For the RelEn algorithm, a detection is considered false and will be removed if the amplitude of the weighted activation is smaller than the threshold \(TH_{P}\). For the AMM algorithm, the weighted signal is reprocessed by the detection algorithm and an AA detected on the original signal is considered false if it is no longer present on the weighted signal.
An example of an artifact falsely detected as an AA with the RelEn algorithm, and adequately removed using the weight functions is shown in Fig. 4. The weight functions (Eq. 5) are computed for the preceding interval \(\left[ {LAT_{  1} , LAT_{0} } \right]\) and succeeding interval \(\left[ {LAT_{0} ,LAT_{1} } \right]\) around the activation detected at time \(LAT_{0}\). A value of these functions greater than 1 will result in an amplification of the signal, while a value smaller than 1 will result in a dampening of the signal. As shown in Fig. 4, a shorter time interval between \(LAT_{0}\) and \(LAT_{1}\) compared to the mean value estimated on all raw AAintervals will result in a decrease in the amplitude by the weight functions at \(LAT_{1}\) which will fall below the detection threshold \(TH_{P}\). It will therefore be considered as a false detection and will be removed from the AA detections sequence.
Correction of missed atrial activations
As a second step, the interval between two consecutive activations at times \(LAT_{i}\) and \(LAT_{i + 1}\) is scrutinized to identify possible missed AA. The amplitude of the signal between the two activations is multiplied by the weight functions computed for the interval \(\left[ {LAT_{i} , LAT_{i + 1} } \right]\):
where \(x\) is the signal between the two activations, \(w_{ln}\) denotes the linear and nonlinear weight function, respectively, and \(TR(w_{ln} \left( k \right))\) represents the timereversed version of \(w_{ln} \left( k \right)\). For the RelEn algorithm, an activation is considered as missed at the time \(LAT_{i} + k\) if the value of \(x_{weighted} \left( k \right)\) is greater than the threshold \(TH_{P}\). For the AMM algorithm, the weighted signal is reprocessed by the detection algorithm to spot a possible missed activation.
An example of a detection missed by the RelEn algorithm and corrected using the weight functions is shown in Fig. 5. After a first pass by the RelEn algorithm, the signal is multiplied by the combined linear and nonlinear weight functions. A value of the combined weight functions above 1 will result in amplification of the signal, while a value below 1 will result in dampening of the signal. As shown in Fig. 5, the first interval [LAT_{−1}, LAT_{0}] is longer than the mean value of the AA intervals (231 ms). This results in an amplification of the central part of the interval. The weighted version may hence cross the detection threshold, unmasking a missed activation. The newly detected activation will then be added to the AA sequence.
Comparison with existing algorithms
Our method was compared with two published algorithms on the validation cohort. Firstly, we applied the Cycle Length Iteration algorithm proposed by Ng et al. [19]. This method searches the peaks iteratively in the EGMs based on their amplitude. An adhoc criterion is proposed to determine the end of the detection. A postprocessing step based on the AA intervals allows reducing the number of missed detections. Secondly, we used the Non Linear Energy Operator algorithm proposed by Nguyen et al. [18]. This method uses Teager operator to compute the energy of the signal. An adaptive threshold is applied on this energy signal to delimit the active zones of the signal corresponding to the AAs.
Annotation correction
The presence of multiple peaks or fractionated signals on the IEGM may induce fluctuations in the timings of the AA detection. The temporal analysis of the AAs sequence is affected by these artificial variations. In order to reduce this effect, we propose a beatbybeat correction of the AA annotation based on the following steps:

Extract a portion of the signal around the AA

Compute the envelope of the absolute value of the signal

Reject low amplitude tails of the activation with a cutoff on the envelope

Define the corrected annotation as the barycenter of the power of the remaining signal
The corrected annotation is computed on the squared signal, rather than on the signal itself, to enhance the influence of high amplitude peaks.
Since the exact times of the annotations are unknown, we use the variance of the AAs sequence to evaluate the result of the correction. Indeed, if we assume that the fluctuations of the annotations are independent of the AA, we have:
where \(LAT\left( \cdot \right)\) is the sequence of AA times originally detected with the RelEn or AMM algorithm, \(LAT_{0} \left( \cdot \right)\) is the sequence of the true AA times, \(e_{t} \left( \cdot \right)\) the sequence of the errors due to imprecisions in the estimation of the AA times and \(e\left( \cdot \right)\) the sequence regrouping any other errors. Since the variance is positive, a reduction in the variance of the LAT sequence, \(var\left( {LAT} \right)\), after the correction process corresponds to a reduction in the variance of \(e_{t}\) sequence, i.e. the error due to the estimation of AA times. Due to the inherent nonstationarity of AF, the variance of the AA intervals is expected to be large. Our method corrects the annotations on a beattobeat basis, without considering the other activations. Therefore, with the hypothesis that the imprecisions of the detections are uncorrelated to the true variations of the AA sequences, the measured decrease in variance in the AA sequence indicates a reduction of this imprecision.
Results
Raw detection
Raw detection tuning
The RelEn and AMM algorithms were optimized on the training cohort. The performances of the algorithms were assessed using the false negative/positive rates (number of missed/false detections divided by the number of activations) and the total detection error rate (the sum of false positive and negative rates). The impact of the parameters of the two algorithms on the detection error rates is displayed in Fig. 6.
Relativeenergy algorithm. For the RelEn algorithm, we simultaneously examined (grid search) the small and long window durations and the percentile value P. The small window \(s_{win}\) was tested from 20 to 120 ms, the long window \(l_{win}\) was tested from 100 to 1000 ms and the percentile value \(P\) was tested from the 6th to 13th percentiles. The best parameters were defined as the ones yielding the fewest detection errors (i.e. false negative and false positive) on our training cohort.
Figure 6a–c show that the best result was obtained using \(s_{win} = 100\;{\text{ms}}\), \(l_{win} = 400\;{\text{ms}}\) and \(P = 11th\) percentile. As shown in Fig. 6b the long window parameter \(l_{win}\) has the largest influence on the total error rate in the vicinity of the optimal value for the RelEn algorithm.
Adaptive mathematical morphology algorithm. Figure 6d shows the effect of the duration of the synthetized SE on the detection error rate. The length of SE was tested from 10 to 200 ms and the optimal duration giving the fewest detection errors was 20 ms.
Raw detection: comparison of the algorithms
Using the optimal parameters derived from the training cohort, we applied both algorithms on our validation cohort and computed the detection errors. The best detection was achieved using the RelEn algorithm, yielding a false negative rate of 0.76% and a false positive rate of only 0.12%. The total error rate was 0.88%. The AMM algorithm yielded a poorer detection, achieving a false negative rate of 2.65% and a false positive rate of 0.84%. The total error rate was 3.49%. Results are summarized in Table 2.
Reduction in over and undersensing
After raw detection, post processing of AAs sequences was performed in order to reduce the detection errors. Parameters defining the weight functions were optimized on the training cohort for the results provided by both detection algorithms.
For the linear weight, the value at 70 ms (\(P_{70}\)) was tested from 0 to 0.4 and the value at the mean value of the AA sequence (\(P_{meanAA}\)) was tested from 1 to 3. For the nonlinear weight, the max weight value (\(P_{meanAA}\)) was tested from 1 to 3 and the enlargement parameter E was tested from 1 to 3.
RelEn algorithm
For the RelEn algorithm, the combinations of parameters providing the largest reduction in the detection errors were \(P_{70} = 0\) and \(P_{meanAA} = 2.1\) for the linear weight, and \(E = 1.25\) and \(P_{meanAA} = 3\) for the nonlinear weight.
Table 3 summarizes the results achieved on the validation cohort using optimal parameters for both linear and nonlinear weight functions. The linear weight provided a reduction of almost 50% in the false detection rate and 40% in the missed detection rate. The nonlinear function yielded an even better improvement with an almost 70% reduction in both detection rates. The final total error rate using the nonlinear weight fell to only 0.28%.
AMM algorithm
For the AMM algorithm, the combinations of parameters providing the largest reduction in the detection errors were \(P_{70} = 0.4\) and \(P_{meanAA} = 2.2\) for the linear weight, and \(E = 1.25\) and \(P_{meanAA} = 3\) for the nonlinear weight.
Results achieved on the validation cohort using optimal parameters for both linear and nonlinear weight shapes are summarized in Table 3. Both linear and nonlinear weight functions increased the false detection rate while decreasing the missed detection rate of the algorithm. This resulted in a decreased total error rate in both cases. The linear weight performed slightly better than the nonlinear weight. The reduction in total error rate obtained by the linear weight for the AMM was 5.2% compared to the raw algorithm.
Comparison with existing algorithms
Two existing detection algorithms (CLI and NLEO) were applied on the validation cohort. The performances of the RelEn algorithm after reduction of over and undersensing were compared to the those obtained with these two algorithms. The results are summarized in Table 4. The NLEO algorithm achieved a total error rate of 3.01% and the CLI algorithm achieved 3.63%. Both algorithms yielded higher rates of false positive and false negative detection compared to the RelEn algorithm (p value < 0.05).
Annotation correction
In order to reduce the artificial variations in timings of the AA detection, a correction of these annotations was implemented on the optimized RelEn algorithm. Figure 7 shows an example of the correction process in the case of fractionated signals (a) and in the presence of multiple peaks (b). The green dots represent the originally detected AAs, whereas the corrected annotations are displayed by red dots. The new annotations are less dependent on the shapes of the AAs, which lessens the artificiallyinduced variability in the AAintervals sequence.
On the validation cohort, a reduction of 5.4 ± 7.8% in the variance of the corrected AAinterval sequence was obtained compared to the original time series obtained by the RelEn algorithm. In 17 records (42.5%), the reduction in the artificial variation was greater than 5%. In a single record, the correction process led to the opposite outcome, and resulted in an increase in variance greater than 5%. A histogram of the relative changes in variance is shown in Fig. 8a. The relative and absolute variance changes of each recording are displayed with respect to the original AAs variance of the recording on panels (b) and (c), respectively. Note that the recordings with a large variance display a small relative change even if the corresponding absolute change is large.
Discussion
The present study proposes a novel iterative approach to automatically detect AAs and provide accurate CL estimations from bipolar IEGM recorded during persistent AF. The method is based on the following steps (illustrated in Fig. 1): (1) raw detection of AA complexes using a lowcomplexity algorithm recently developed by our group for the automatic extraction of events from biomedical signals; (2) correction for over and undersensing of AA detections using a novel processing technique consisting in a statisticalbased weighting of the signal amplitude around each raw AA detection; (3) correction for the artificial variations in beattobeat CL estimations using a method based on the barycenter of the power of the AAs.
Our study shows that the proposed 3step method is efficient for automatically detecting AAs and provides accurate beattobeat CL estimations on AF electrograms with complex activations and fractionation. Considering the marginal error rate achieved (0.28%), our method may be used for the automatic annotation of AAs on large database, allowing a huge timesaving compared to a manual verification. Furthermore, the low complexity of the signal processing techniques makes the proposed approach suitable for use in realtime/online settings. The RelEn can be computed with a delay related to the length of the longterm window (400 ms) and the statistics used during the postprocessing step could be updated in a buffer or computed along a sliding window.
The relative timings and morphologies of the activation patterns during AF are constantly changing which precludes the use of automated detection of individual AAs. Various methods have been previously proposed to automatically detect AAs from electrograms in AF. Thresholdbased detection algorithms [10, 11], will invariably be prone to over and undersensing due to the range of signal morphologies and amplitudes in AF. Ng et al. [19] introduced a new algorithm which uses a mean and median CL convergence criterion to detect atrial complexes. While the CLbased method may have advantages for IEGM with large beattobeat variations in CL, a thresholdbased approach would be more appropriate for variable AA amplitudes. The TeagerKaiser energy operator [12, 23], was proposed to detect abrupt changes in the signal amplitude and detect highfrequency events. This method is however sensitive to fractionation. More robust methods such as template matching [13] or wavelet transform have been proposed to deal with contaminated signals. However, the problem remains partially unsolved when dealing with signals with a large patient and timedependent spectrum of shapes, amplitudes and frequencies as is the case for intracardiac recordings of AF. Compared to these methods, our iterative approach has some advantages mainly due to the fact that the detection algorithms can be easily tailored for robust detection even for IEGMs with significant beattobeat variation both in CL and in AA morphology. Moreover, our detection algorithms require only a limited number of parameters to be optimized, and are easy to implement and computationally uncostly as demonstrated by Orlandic et al. [24]. In their study, a realtime ECG Rpeak detection algorithm based on RelEn produced comparable accuracy results with around one third less memory consumption compared to three stateoftheart methods. The two window durations of the RelEn algorithm can be intuitively selected based on the physiological constraints of the signals at hand. The RelEn algorithm achieved the best performance for an optimal shortterm and longterm window of 100 ms and 400 ms, respectively, which fits with the physiological constraints of the AA complexes in persistent AF. Moreover, due to the elementwise multiplication of the coefficient signal with the signal at hand, the algorithm is robust against spurious peaks as in the case of doublepeak or fractionated activations. The AMM algorithm has been used in several previous studies and has already shown good results, especially in the detection of QRS complexes in ECG recordings. However, the variety of shapes in the intracardiac recordings alongside with the presence of impulsive and high frequency noise impair the performances of the algorithm. On the other hand, RelEn is a recently developed algorithm aiming to enhance the events of interest in different types of physiological recordings, such as EEGs, PPG, etc. The high consistency shown by RelEn in the automatic detection of activations against manually marked activations demonstrates the potential of our algorithm for the automatic detection of AAs during persistent AF. This has been confirmed by comparing the performances of our detection with two published algorithms. The RelEn obtained superior results both in terms of false negative and false positive detection on the same set of recordings.
The RelEn and AMM detection algorithms both showed significantly higher false negative than false positive rates. This is likely related to the high heterogeneity of AA morphology in persistent AF. Although the original algorithms yielded few false detections or missed activations, we further attempted to reduce the undersensing and oversensing. The proposed novel postprocessing approach corrected almost all missed activations or false detections. The high correction efficiency may be explained by the fact that the approach is tailored to the processed IEGM. The two weight functions used to enhance the signal before and after each raw detected activation are computed using the mean value of the raw AA intervals. While using contextual information enables high correction efficiency, adequate recording length is needed for accurate estimation of mean CL. Recently, Ng et al. [19] also showed that the undersensing, oversensing and total error rate of their mean CLbased detection algorithm reached a stabilized level at an IEGM duration > 10 s.
Importantly, alongside a high sensitivity and specificity, the accurate estimation of the LATs is also a desired feature of the detection algorithms. The barycenter approach [25, 26], was proposed as a robust alternative to the classical peak or maximum slope annotation of the LAT. The main drawback of the barycenter approach is the estimation of the onset and offset of the activation for the barycenter determination. In the present study, we circumvented this barycenterrelated issue by focusing on large amplitude portion of the activation, considering that the tails (or low amplitude parts) of the activation will only have a small influence in the LAT computation. This aspect was even reinforced by working with the squared envelope of the signal.
Limitations
Our study may be limited by the size of the study population and by the fact that the detection approach was optimized and validated on a multicenter cohort consisting only of IEGMs recorded from the PVs. Since IEGM characteristics (including amplitude, fractionation, activation morphology) may vary depending on the structural and electric complexity of the underlying myocardium [27], our findings may not necessarily apply to highly fragmented or continuous signals recorded in the atria. Our database however includes electrograms of varied complex activation and morphological patterns, with heterogeneous signal amplitude and fractionation, but still with clearly present isoline. Furthermore, we also showed that variations in the algorithm parameters outside of the optimal values did not affect significantly the detection performance. Finally, a further limitation may relate to the fact that single expert annotation was used as ground truth.
Conclusion
In the present study we propose a novel iterative approach to automatically detect atrial activations and provide accurate CL estimations from bipolar IEGMs recorded during persistent AF. By providing both a reliable detection and a robust temporal annotation of AAs, the added value of our proposed method resides in the fact that it addresses two main limitations encountered in the temporal analysis of AF activations. Considering the marginal error rate achieved and the low complexity of the signal processing technique, our proposed method may be used in realtime settings for the automatic annotation of AA on large databases.
Availability of data and materials
Data are available upon request.
Abbreviations
 AA:

Atrial activation
 AF:

Atrial fibrillation
 AMM:

Adaptive mathematical morphology algorithm
 LAT:

Local activation time
 CL:

Cycle length
 CLI:

Cycle length iteration algorithm
 IEGM:

Intracardiac electrogram
 NLEO:

Nonlinear energy operator algorithm
 PV:

Pulmonary vein
 RelEn:

Relativeenergy algorithm
References
Di Marco LY, Raine D, Bourke JP, Langley P. Characteristics of atrial fibrillation cycle length predict restoration of sinus rhythm by catheter ablation. Hear Rhythm. 2013;10(9):1303–10. https://doi.org/10.1016/j.hrthm.2013.06.007.
Haïssaguerre M, et al. Changes in atrial fibrillation cycle length and inducibility during catheter ablation and their relation to outcome. Circulation. 2004;109(24):3007–13. https://doi.org/10.1161/01.CIR.0000130645.95357.97.
Hocini M, et al. Disparate evolution of right and left atrial rate during ablation of longlasting persistent atrial fibrillation. J Am Coll Cardiol. 2010;55(10):1007–16. https://doi.org/10.1016/j.jacc.2009.09.060.
Luca A, et al. Severe and uniform biatrial remodeling measured by dominant frequency analysis in persistent atrial fibrillation unresponsive to ablation. J Interv Card Electrophysiol. 2019;59(2):431–40. https://doi.org/10.1007/S10840019006811.
Sanders P, et al. Frequency mapping of the pulmonary veins in paroxysmal versus permanent atrial fibrillation. J Cardiovasc Electrophysiol. 2006;17(9):965–72. https://doi.org/10.1111/j.15408167.2006.00546.x.
O’Donnell D, Furniss SS, Bourke JP. Paroxysmal cycle length shortening in the pulmonary veins during atrial fibrillation correlates with arrhythmogenic triggering foci in sinus rhythm. J Cardiovasc Electrophysiol. 2002;13(2):124–8. https://doi.org/10.1046/j.15408167.2002.00124.x.
Oral H, et al. Pulmonary vein isolation for paroxysmal and persistent atrial fibrillation. Circulation. 2002;105(9):1077–81. https://doi.org/10.1161/hc0902.104712.
Pascale P, et al. Pulmonary veins to left atrium cycle length gradient predicts procedural and clinical outcomes of persistent atrial fibrillation ablation. Circ Arrhythmia Electrophysiol. 2014;7(3):473–82. https://doi.org/10.1161/CIRCEP.113.001264.
Seitz J, et al. Active or passive pulmonary vein in atrial fibrillation: Is pulmonary vein isolation always essential? Hear Rhythm. 2014;11(4):579–86. https://doi.org/10.1016/j.hrthm.2014.01.009.
Faes L, Nollo G, Antolini R, Gaita F, Ravelli F. A method for quantifying atrial fibrillation organization based on wavemorphology similarity. IEEE Trans Biomed Eng. 2002;49(12 I):1504–13. https://doi.org/10.1109/TBME.2002.805472.
Holm M, Johansson R, Bertil Olsson S, Brandt J, Lührs C. A new method for analysis of atrial activation during chronic atrial fibrillation in man. IEEE Trans Biomed Eng. 1996;43(2):198–210. https://doi.org/10.1109/10.481989.
Kaiser JF. On a simple algorithm to calculate the ‘energy’ of a signal. ICASSP IEEE Int Conf Acoust Speech Signal Process Proc. 1990;1:381–4. https://doi.org/10.1109/icassp.1990.115702.
Houben RPM, de Groot NMS, Lindemans FW, Allessie MA. Automatic mapping of human atrial fibrillation by template matching. Hear Rhythm. 2006;3(10):1221–8. https://doi.org/10.1016/j.hrthm.2006.06.009.
Cantwell CD, Roney CH, Ng FS, Siggers JH, Sherwin SJ, Peters NS. Techniques for automated local activation time annotation and conduction velocity estimation in cardiac mapping. Comput Biol Med. 2015;65:229. https://doi.org/10.1016/J.COMPBIOMED.2015.04.027.
Pieper CF, Blue R, Pacifico A. Activation time detection algorithms used in computerized intraoperative cardiac mapping: a comparison with manually determined activation times. J Cardiovasc Electrophysiol. 1991;2(5):388–97. https://doi.org/10.1111/J.15408167.1991.TB01338.X.
Yazdani S, Fallet S, Vesin JM. A novel shortterm event extraction algorithm for biomedical signals. IEEE Trans Biomed Eng. 2018;65(4):754–62. https://doi.org/10.1109/TBME.2017.2718179.
Yazdani S, Vesin JM. Extraction of QRS fiducial points from the ECG using adaptive mathematical morphology. Digit Signal Process A Rev J. 2016;56:100–9. https://doi.org/10.1016/j.dsp.2016.06.010.
Nguyen MP, Schilling C, Dössel O. A new approach for automated location of active segments in intracardiac electrograms. IFMBE Proc. 2009;25(4):763–6. https://doi.org/10.1007/9783642038822_203.
Ng J, Sehgal V, Ng JK, Gordon D, Goldberger JJ. Iterative method to detect atrial activations and measure cycle length from electrograms during atrial fibrillation. IEEE Trans Biomed Eng. 2014;61(2):273–8. https://doi.org/10.1109/TBME.2013.2290003.
Nault I, Wright M, Hocini M, HaÏssaguerre M, JaÏs P. Extreme firing in a pulmonary vein during atrial fibrillation. J Cardiovasc Electrophysiol. 2009;20(6):696. https://doi.org/10.1111/j.15408167.2008.01386.x.
Yazdani S, Buttu A, Pruvot E, Vesin JM, Pascale P. Extracting atrial activations from intracardiac signals during atrial fibrillation using adaptive mathematical morphology. Comput Cardiol. 2015;42:913–6. https://doi.org/10.1109/CIC.2015.7411060.
Maragos P, Schafer RW. Morphological systems for multidimensional signal processing. Proc IEEE. 1990;78(4):690–710. https://doi.org/10.1109/5.54808.
Cervigón R, Moreno J, Millet J, Castells F. Teager energy based approach to detect atrial peaks to predict atrial fibrillation recurrence. Comput Cardiol. 2015;42:509–12. https://doi.org/10.1109/CIC.2015.7410959.
Orlandic L, De Giovanni E, Arza A, Yazdani S, Vesin JM, Atienza D. REWARD: design, optimization, and evaluation of a realtime relativeenergy wearable Rpeak detection algorithm. In: Proceedings of the annual international conference of the IEEE engineering in medicine and biology society, EMBS, 2019, pp. 3341–3347. https://doi.org/10.1109/EMBC.2019.8857226.
El Haddad M, Houben R, Stroobandt R, Van Heuverswyn F, Tavernier R, Duytschaever M. Algorithmic detection of the beginning and end of bipolar electrograms: implications for novel methods to assess local activation time during atrial tachycardia. Biomed Signal Process Control. 2013;8(6):981–91. https://doi.org/10.1016/j.bspc.2012.11.005.
Ravelli F, et al. Wave similarity mapping shows the spatiotemporal distribution of fibrillatory wave complexity in the human right atrium during paroxysmal and chronic atrial fibrillation. J Cardiovasc Electrophysiol. 2005;16(10):1071–6. https://doi.org/10.1111/j.15408167.2005.50008.x.
De Bakker JMT, Wittkampf FHM. The pathophysiologic basis of fractionated and complex electrograms and the impact of recording techniques on their detection and interpretation. Circ Arrhythm Electrophysiol. 2010;3(2):204–13. https://doi.org/10.1161/CIRCEP.109.904763.
Acknowledgements
The authors wish to thank Ms Anna McCann for her linguistic assistance with this article.
Funding
This work was supported by the Swiss National Science Foundation under Grant 320030_192720.
Author information
Authors and Affiliations
Contributions
Y.P., A.L., S.Y., JM.V. and P.P. processed the data and drafted the manuscript. N.D., P.J., L.R., B.B., E.P. and P.P. contributed to data collection and critical revision of the manuscript. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Ethics approval and consent to participate
All patients provided written informed consent and the study was approved by the Local Human Research Ethics Committees. All methods of the present study were performed following the relevant guidelines and regulations of the Local Ethics Committees.
Consent for publication
Not applicable.
Competing interests
The authors declare that they have no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated in a credit line to the data.
About this article
Cite this article
Prudat, Y., Luca, A., Yazdani, S. et al. Evaluation and optimization of novel extraction algorithms for the automatic detection of atrial activations recorded within the pulmonary veins during atrial fibrillation. BMC Med Inform Decis Mak 22, 225 (2022). https://doi.org/10.1186/s12911022019695
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s12911022019695
Keywords
 Biomedical signal processing
 Nonlinear signal processing
 Atrial fibrillation
 Intracardiac electrograms
 Activation detection