{'fraction_non_alphanumeric': 0.037757882444530946, 'fraction_numerical': 0.02646944336317633, 'mean_word_length': 4.550755939524838, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Improvement of a convolutional neural network using synthetic ECGs for the diagnosis of different atrial rhythms


 
 
 Type of funding sources: None.
 
 
 
 The diagnostic capacity of convolutional neural networks has demonstrated its potential for the diagnosis of different ECG alterations. An important limitation of these networks is that there are classes that are underrepresented in the population, such as the Brugada pattern compared to right bundle branch block or Atrial Flutter (AFL) compared to atrial fibrillation (AF). This asymmetry that exists in any population ECG database is one of the limitations (F1-Score) that could be improved, either with even larger databases (impractical) or by creating synthetic representations of the ECG.
 
 
 
 Using a tool that allows the drawing of specific electrocardiographic patterns first and subsequently, the random creation of different ECGs based on said pattern, the diagnostic capacity of any unbalanced convolutional network could be improved.
 
 
 
 Initially, a database with 95,000 ECGs from our health area was used. From this data set, 5,810 ECGs were taken that were labeled in three classes (1) Sinus Rhythm (SR), 2) AF and 3) AFL by two arrythmologists, 4,637 for training and 1,173 for validation. It was observed that the network was unbalanced (SR: 81.3% of the total, FA: 16.4% of the total and AFL: 2.2% of the total). After having demonstrated the good capacity of the network for the diagnosis of these three atrial rhythms, it was observed that the diagnostic dispersion matrix erred precisely between the ECGs of AF and AFL (figure 1). Based on this idea, it was decided to create a random pattern-based ECG creation tool. Different atrial flutter patterns were created and 2000 ECGs were synthetically created with variations of the ECG frequency, voltages and morphology. A new neural network was subsequently trained with the addition of these ECGs to the original database and its diagnostic capacity was evaluated on the same initial validation set.
 
 
 
 The new network showed a 88,3% sensitivity (vs 82,6%), a 100% specificity (vs 98,5%) and an 92% (vs 87,8%) accuracy. It specially had an improvement in AFL ECGs (70,2% vs 61%) and minor improvements in AF ECGs (90,8% vs 89,4%) and SRs ECGs (100% vs 98,6%) accuracy.
 
 
 
 The creation of synthetic ECGs to improve the diagnostic capacity of neural networks for infrequent events is feasible. This application allows the development of networks applicable in real life, in this case, for the diagnosis of atrial arrhythmias.
