A lightweight 1D-CNN for multi-class ECG arrhythmia classification on the MIT-BIH database

Cardiac arrhythmias are a major contributor to cardiovascular mortality, and reliable automatic analysis of electrocardiogram (ECG) signals is essential for large-scale screening and long-term monitoring. However, automated arrhythmia classification remains challenging due to severe class imbalance, potential data leakage during model evaluation, and the complexity of modern deep-learning architectures that limits their deployment on resource-constrained devices. In this work, we propose a lightweight deep-learning framework for five-class heartbeat classification (N, S, V, F, Q) using the preprocessed Massachusetts Institute of Technology-Beth Israel Hospital (MIT-BIH) Arrhythmia Database via Kaggle, which involves downsampling from 360 to 125 Hz, R-peak-centered segmentation, fixed-length 187-sample segments, and Association for the Advancement of Medical Instrumentation (AAMI) labeling. The proposed model employs a shallow three-block 1D convolutional neural network (1D-CNN) designed to efficiently capture morphological ECG features while maintaining a small computational footprint. We adopt a standard training setup with cross-entropy loss and validation-loss-based early stopping, and we implement within-fold normalization through a custom ECGScaler fitted only on training data to prevent preprocessing-induced leakage. However, as with many prior studies on this benchmark, our cross-validation follows sample-based stratification rather than patient-level separation due to the absence of patient identifiers in the preprocessed dataset. Therefore, the reported performance metrics should be interpreted as benchmark-specific and may not directly reflect inter-patient generalization. Experimental results demonstrate that the proposed approach achieves an overall accuracy of 0.9867 and a macro-F1-score of 0.9254, with good performance on minority classes, including F1-scores of 0.8537 for supraventricular beats and 0.8250 for fusion beats. Despite its simplicity, the model achieves performance comparable with many more complex state-of-the-art architectures while requiring significantly fewer parameters and computational resources. These results hint at possible application prospects of lightweight deep-learning models for arrhythmia detection in real-time wearable and remote cardiac monitoring scenarios.

Authors

Institutions

Publication Details

Journal
PeerJ Computer Science
Published
2026-10-26
DOI
https://doi.org/10.7717/peerj-cs.4139
Primary Topic
ECG Monitoring and Analysis
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A lightweight 1D-CNN for multi-class ECG arrhythmia classification on the MIT-BIH database

王敬民, Jin Dong Su, Huakai Luo, Youheng Li
PeerJ Computer Science
ECG Monitoring and Analysis
article

A lightweight 1D-CNN for multi-class ECG arrhythmia classification on the MIT-BIH database

王敬民, Jin Dong Su, Huakai Luo, Youheng Li
article en

Abstract

Cardiac arrhythmias are a major contributor to cardiovascular mortality, and reliable automatic analysis of electrocardiogram (ECG) signals is essential for large-scale screening and long-term monitoring. However, automated arrhythmia classification remains challenging due to severe class imbalance, potential data leakage during model evaluation, and the complexity of modern deep-learning architectures that limits their deployment on resource-constrained devices. In this work, we propose a lightweight deep-learning framework for five-class heartbeat classification (N, S, V, F, Q) using the preprocessed Massachusetts Institute of Technology-Beth Israel Hospital (MIT-BIH) Arrhythmia Database via Kaggle, which involves downsampling from 360 to 125 Hz, R-peak-centered segmentation, fixed-length 187-sample segments, and Association for the Advancement of Medical Instrumentation (AAMI) labeling. The proposed model employs a shallow three-block 1D convolutional neural network (1D-CNN) designed to efficiently capture morphological ECG features while maintaining a small computational footprint. We adopt a standard training setup with cross-entropy loss and validation-loss-based early stopping, and we implement within-fold normalization through a custom ECGScaler fitted only on training data to prevent preprocessing-induced leakage. However, as with many prior studies on this benchmark, our cross-validation follows sample-based stratification rather than patient-level separation due to the absence of patient identifiers in the preprocessed dataset. Therefore, the reported performance metrics should be interpreted as benchmark-specific and may not directly reflect inter-patient generalization. Experimental results demonstrate that the proposed approach achieves an overall accuracy of 0.9867 and a macro-F1-score of 0.9254, with good performance on minority classes, including F1-scores of 0.8537 for supraventricular beats and 0.8250 for fusion beats. Despite its simplicity, the model achieves performance comparable with many more complex state-of-the-art architectures while requiring significantly fewer parameters and computational resources. These results hint at possible application prospects of lightweight deep-learning models for arrhythmia detection in real-time wearable and remote cardiac monitoring scenarios.

PeerJ Computer ScienceVol. 12
Beijing Institute of Technology (CN), Changzhi Medical College (CN)
Openalex Percentile: Top 12%
ECG Monitoring and Analysis
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon