ptbxl-ecg-anomaly-detection-eval
Multi-scale Masked Autoencoder for Electrocardiogram Anomaly Detection — Ya Zhou et al. (arXiv:2502.05494, 2025)
What this evaluates
This evaluation probes a model's ability to detect cardiovascular anomalies in 12-lead electrocardiogram (ECG) signals and localize the specific temporal regions where abnormalities occur. It tests the model's capacity to capture both global and local temporal dependencies in raw, unsegmented time-series data without relying on traditional R-peak detection or heartbeat segmentation.
Datasets
- PTB-XL — total 10327; splits: train (8167), test (2160)
Metrics
AUC(primary) — range: [0, 1]- Area Under the Receiver Operating Characteristic Curve. Computed by plotting the true positive rate against the false positive rate across all classification thresholds and calculating the area under the resulting curve.
Input / output format
Input: Raw 12-lead ECG recordings (500 Hz, 10 seconds) divided into non-overlapping segments of length 125, forming a sequence of T=40 segments. Multi-scale masking is applied during training.
Output: A scalar anomaly score/probability per recording for detection, and a sequence of anomaly scores/points per recording for localization.
Scoring recipe
def compute_auc(predictions, labels):
# predictions: array of anomaly scores (0-1)
# labels: array of ground truth binary labels (0=normal, 1=abnormal)
fpr, tpr, _ = roc_curve(labels, predictions)
auc_score = auc(fpr, tpr)
return auc_score
Common pitfalls
- The method explicitly avoids R-peak detection and heartbeat segmentation, unlike many prior ECG baselines; assuming segmentation is required will lead to incorrect preprocessing.
- Localization performance is only evaluated on a subset of 400 recordings with point-level annotations, not the full test set, which may overestimate general localization capability.
- The test set is imbalanced (912 normal vs 1,248 abnormal); using accuracy instead of AUC would yield misleading results.
Evidence (verbatim from paper)
Performance is evaluated using the Area Under the Receiver Operating Characteristic Curve (AUC), following Jiang et al. ([2023]) and Bui et al. ([2024]).
Citation
@misc{zhou2025mmae_ecg,
title={Multi-scale Masked Autoencoder for Electrocardiogram Anomaly Detection},
author={Ya Zhou et al.},
year={2025},
note={arXiv:2502.05494}
}
- arXiv: 2502.05494