PSO-Enhanced LSTM for ECG-Based Medical Time-Series Prediction
Abstract
Medical time-series data prediction requires exact methods that enable doctors to track patient health and detect medical issues early. The heart’s electrical signals, which the electrocardiogram (ECG) records, show intricate time-based patterns because they contain nonlinear elements and include brief intense changes. The ECG time-series modeling process often use LSTM networks because these networks effectively track extended temporal patterns which exist in the signal data. The performance of LSTM models heavily depends on hyperparameter selection, and researchers who manually choose parameters often end up with oversmoothed predictions which fail to include vital clinical waveform characteristics. This research proposes Particle Swarm Optimization–enhanced LSTM (PSO-LSTM) framework as a new solution for ECG time-series prediction. The PSO algorithm conducts automatic hyperparameter optimization through its process of optimizing hidden layer sizes and network depth and learning rate values while maintaining the core LSTM structure. The MIT-BIH Arrhythmia Database provides ECG signals for experiments which undergo identical preprocessing operations and evaluation procedures throughout all testing runs. The proposed PSO-LSTM model is compared with a baseline LSTM under identical training conditions. The research evaluates prediction accuracy by using three performance metrics which consist of mean squared error (MSE) and root mean squared error (RMSE) and mean absolute error (MAE). Results show that the PSO-LSTM model achieves lower prediction errors across all metrics compared to the baseline LSTM. The research shows that metaheuristic-based hyperparameter optimization techniques boost LSTM prediction accuracy for medical time-series data through optimization methods which do not require additional model components.
References
- Mayo Clinic, “Electrocardiogram (ECG), ” [Online]. Available: https: //www.mayoclinic.org/tests-procedures/ecg /about/pac-20384983 [Accessed: 2025].
- Y. Ansari, D. Perera, T. Huynh, and H. Nguyen, “Deep learning for ECG arrhythmia detection and classification: An overview of progress for period 2017–2023, ”Frontiers in Physiology, vol. 14, Article 1246746, 2023, doi: 10.3389/fphys.2023.1246746.
- S. Hochreiter and J. Schmidhuber, “Long short-term memory, ”Neural Computation, vol. 9, no. 8, pp. 1735–1780, 1997, doi: 10.1162/neco.1997.9.8.1735.
- S. Hong, Y. Zhou, J. Shang, C. Xiao, and J. Sun, “Opportunities and challenges of deep learning methods for electrocardiogram data: A systematic review, ”Computers in Biology and Medicine, vol. 122, Article 103801, 2020, doi: 10.1016/j.compbiomed.2020.103801.
- J. Kennedy and R. Eberhart, “Particle swarm optimization, ”Proceedings of ICNN’95 – International Conference on Neural Networks, Perth, WA, Australia, 1995, vol. 4, pp. 1942–1948, doi: 10.1109/ICNN.1995.488968.
- R. Poli, J. Kennedy, and T. Blackwell, “Particle swarm optimization, ”Swarm Intelligence, vol. 1, no. 1, pp. 33–57, 2007, doi: 10.1007/s11721-007-0002-0.
- R. Poli, “Analysis of the publications on the applications of particle swarm optimisation, ”Journal of Artificial Evolution and Applications, vol. 2008, Article ID 685175, 2008, doi: 10.1155/2008/685175.
- F. Azuaje, G. Clifford, and P. McSharry, Advanced Methods and Tools for ECG Data Analysis.Norwood, MA, USA: Artech House, 2006.
- J. F. Ruma, L. Jayasinghe, and K. Perera, “Particle swarm optimization based LSTM networks for water level forecasting: A case study on Bangladesh river network, ”Results in Engineering, vol. 17, Article 100951, 2023, doi: 10.1016/j.rineng.2023.100951.
- A. L. Goldberger, L. A. N. Amaral, L. Glass, J. M. Hausdorff, P. C. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E. Stanley, “PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals, ”Circulation, vol. 101, no. 23, pp. e215–e220, 2000, doi: 10.1161/01.CIR.101.23.e215.