  Learning representations from electrocardiogram (ECG) signals can serve as a
fundamental step for different machine learning-based ECG tasks. In order to
extract general ECG representations that can be adapted to various downstream
tasks, the learning process needs to be based on a general ECG-related task
which can be achieved through self-supervised learning (SSL). However, existing
SSL approaches either fail to provide satisfactory ECG representations or
require too much effort to construct the learning data. In this paper, we
propose the T-S reverse detection, a simple yet effective self-supervised
approach to learn ECG representations. Inspired by the temporal and spatial
characteristics of ECG signals, we flip the original signals horizontally
(temporal reverse), vertically (spatial reverse), and both horizontally and
vertically (temporal-spatial reverse). Learning is then done by classifying
four types of signals including the original one. To verify the effectiveness
of the proposed method, we perform a downstream task to detect atrial
fibrillation (AF) which is one of the most common ECG tasks. The results show
that the ECG representations learned with our method achieve remarkable
performance. Furthermore, after exploring the representation feature space and
investigating salient ECG locations, we conclude that the temporal reverse is
more effective for learning ECG representations than the spatial reverse.
