s Attention Really All You need? - Study of a Transformer-Inspired Data-Driven Diagnostic Algorithm for Automatic Detection of Cardiac Arrhythmia in 12-Lead ECG-Signals

  • Tom Denker

Student thesis: Master of Philosophy


Classifiers based on a deep neural architecture inspired by the transformer, as proposed by Vaswani et al. (2017)[Advances in neural information processing systems (pp. 5998-6008)], were developed and studied with regards to their performance on the task of detecting different types of cardiac arrhythmia in 12-lead ECG signals. All classifiers were trained on the Shaoxin People’s Hospi- tal 12-lead ECG database and further evaluated on the PTB-XL database. Two different labelling regimes were employed. Performance on the Shaoxin test set (96.5±0.3% and 92.6±0.45% overall accuracy) was found to slightly exceed that of a simple CNN benchmark (95.9 ± 0.4% and 90.25 ± 0.55% overall accuracy) as well as the performance of the DNN-LSTM model proposed and reported by Yildirim et al. (2020) [Computer methods and programs in biomedicine, 197, 105740] (96.13% and 92.24% overall accuracy) for both labelling regimes. Evaluated on synthetic sequences of concatenated examples from the Shaoxin database, the proposed algorithm showed superior ability to generalise to longer sequences and mixed labels compared to the CNN-benchmark, although perfor- mance generally decreased with the the length of the sequences. Performance on the PTB-XL database was low and approaching random guessing, presumably due to a combined effect of poor mapping of the different labelling regimes, dif- ferences in the underlying populations, the presence of mixed labels, differences in signal quality and potentially unknown artifacts.
Date of Award31 Dec 2022
Original languageEnglish
Awarding Institution
  • The University of Manchester
SupervisorJian Lu (Supervisor) & Henggui Zhang (Supervisor)


  • transformer
  • attention mechanism
  • cardiac arrhythmia
  • diagnostic algorithm
  • physiological signal
  • deep learning
  • time-series
  • classification
  • machine learning
  • ECG

Cite this