A DUAL-STREAM DEEP TRANSFORMER NETWORK FOR ROBUST MULTI-LEAD ECG INTERPRETATION: CROSS PATIENT ECG REPRESENTATION LEARNING FOR ARRHYTHMIA DETECTION USING A SELF-SUPERVISED CONTRASTIVE METHOD
DOI:
https://doi.org/10.4238/mcgmqe32Keywords:
Electrocardiogram (ECG); Arrhythmia Detection; Deep Transformer Network; Dual-Stream Architecture; Self-Supervised Learning; Contrastive Representation Learning; NT-Xent Loss; Cross-Patient Generalisation; Cross-Lead Attention; Explainable AI; Grad-CAM; Biomedical Signal ProcessingAbstract
Despite its importance in the non-invasive diagnosis of cardiac arrhythmia, the ECG is still the major tool for routine clinical diagnosis which relies on large manual artifact-based interpretation of 12 simultaneous leads and the ability to resolve a detailed morphology from a short-term rhythm behaviour usually lasting no more than 5 seconds. The efforts for this process are labour intensive, inter-observer dependent and not suitable for the amount of data collected while subjects are in continuous ambulatory and wearable monitoring. Most of the models proposed for automatic arrhythmia detection exploit beat-level annotations and are fully fed supervisedly (intra patient partitions); this translates into a high convincing factor for the clinical performance, since most of the beats in the test set are the same subject's every beat, appearing in both training and test data. These models can be transferred to different subjects, but since the subject-specific idiosyncrasy of waveforms is captured in the model, it fails to accurately model the pathology when the other patient comes into view. In this paper, we present a dual stream deep transformer network with the aim of achieving robust insight on multiple leads as to improve the interpretation of ECG in most cases. Through proposed dual-stream deep transformer, this paper presents a strategy to learn a cross-patient representation using self-supervised contrastive training, with an ultimate goal of robust multi-lead ECG interpretation. The architecture features a two-stream processing paradigm – one stream of the architecture is called the morphology stream, where a one-dimensional (1D) convolutional tokenizer followed by a local-window transformer encoder captures the shape of P-QRS-T. The other stream is referred to as a rhythm stream in the architecture, where a global transformer encoder processes an RR-interval token sequence to capture long-range temporal dependence. A cross-lead attention fusion module merges the two streams, giving different weight to the twelve different leads based on the information they hold, instead of giving them an equal weight. The encoder is trained end-to-end for an NT-Xent contrastive objective where positives are views of the same cardiac segment across the same subject, but negatives are across patients (see S. Chandra et al., 2021) to order the embedding space by the rhythm class of the training subject instead of by the identity of the subject. After the lightweight classification head is trained on a small number of labelled beats, the head is further fine-tuned to be tuned to create an arrhythmia class and a calibrated confidence value, and attention-rollout and Grad-CAM visualisations shed light on the signal intervals and leads on which each classification was based. It formulates the problem, designates the system architecture, mathematically describes each processing stage and proposes an evaluation protocol in terms of macro-averaged F1 score of a strictly separated inter-patient partition, silhouette coefficient of an embedding space learned by the neural network, and localisation accuracy against the intervals annotated by cardiologists. We propose to develop an alternative to the traditional supervised ECG classification that is patient-independent and clinically interpretable and can be labelled efficiently.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

