  Electrocardiogram (ECG) is a widely used diagnostic tool for detecting heart
conditions. Rare cardiac diseases may be underdiagnosed using traditional ECG
analysis, considering that no training dataset can exhaust all possible cardiac
disorders. This paper proposes using anomaly detection to identify any
unhealthy status, with normal ECGs solely for training. However, detecting
anomalies in ECG can be challenging due to significant inter-individual
differences and anomalies present in both global rhythm and local morphology.
To address this challenge, this paper introduces a novel multi-scale
cross-restoration framework for ECG anomaly detection and localization that
considers both local and global ECG characteristics. The proposed framework
employs a two-branch autoencoder to facilitate multi-scale feature learning
through a masking and restoration process, with one branch focusing on global
features from the entire ECG and the other on local features from
heartbeat-level details, mimicking the diagnostic process of cardiologists.
Anomalies are identified by their high restoration errors. To evaluate the
performance on a large number of individuals, this paper introduces a new
challenging benchmark with signal point-level ground truths annotated by
experienced cardiologists. The proposed method demonstrates state-of-the-art
performance on this benchmark and two other well-known ECG datasets. The
benchmark dataset and source code are available at:
\url{https://github.com/MediaBrain-SJTU/ECGAD}
