Label-Aware Federated Learning Improves ECG Classification in Heterogeneous Hospital Settings

Tizian Claus Dege and Christoph Hoog Antink
TU Darmstadt


Abstract

Deep learning-based ECG classification has become an important tool for supporting clinical decision-making. However, robust neural networks require large and diverse datasets, which are often difficult to share across institutions because of privacy, regulatory, and governance constraints. Federated learning (FL) addresses this limitation by enabling collaborative model training without exchanging raw patient data. In practice, however, standard FL methods are challenged by the substantial heterogeneity between hospitals, including differences in patient populations, acquisition conditions, and diagnostic label distributions. In this work, we present a training pipeline for multi-label, multi-class 12-lead ECG classification using four hospital-like clients derived from the PhysioNet/Computing in Cardiology Challenge 2020 collection. Our framework compares centralized training with federated strategies, with particular emphasis on conventional Federated Averaging (FedAvg) and label-aware aggregation (FedLA). The pipeline includes hospital-wise train/validation/hold-out splits and client-specific class filtering to better reflect realistic inter-site variability and label imbalance. Model performance is primarily assessed using macro-averaged F1 score, which is well suited for imbalanced multi-label ECG classification. Our label-aware strategy revisits previous work by weighting client updates according to local label statistics, with the goal of improving robustness under non-identically distributed conditions. Our results show that heterogeneity-aware federated training is a promising alternative to centralized learning for privacy-preserving ECG analysis across institutions that cannot share their data. In particular, FedLA improves the macro-F1 score on the withheld test set by approximately 8% compared with FedAvg when using a simple CNN backbone. These findings suggest that incorporating label-distribution information during aggregation can substantially improve cross-site robustness in ECG classification in heterogeneous hospital settings.