Comparative Evaluation of LSTM and Metaheuristic-Optimized Neural Networks for ECG Prediction under Limited Data Conditions
Abstract
This study presents a comparative evaluation of Deep Feedforward Neural Network (DFFNN) models optimized using single-stage metaheuristic approaches, including Genetic Algorithm (GA), Particle Swarm Optimization (PSO), and Grey Wolf Optimization (GWO), as well as a multi-stage hybrid optimization strategy (GA+GWO) for ECG-based emotion classification. The experimental dataset consists of ECG recordings collected from three elderly participants using a Sparkfun AD8232 sensor under controlled emotional stimuli, representing a limited-subject and small-data scenario. Feature extraction is conducted using Heart Rate Variability (HRV) parameters derived from both time domain (Mean RR, SDNN, RMSSD, Mean HR, and STD HR) and frequency domain (LF, HF, and LF/HF ratio). Experimental results from six repeated trials demonstrate that the multi-stage DFFNN+GA+GWO model achieves the best optimization performance, yielding the lowest Mean Squared Error (MSE) of 0.01599 and a consistent training accuracy of up to 85.71%. Compared with single-stage optimization methods, the hybrid approach exhibits improved convergence behavior and reduced performance variance, indicating enhanced optimization stability. However, test accuracy remains relatively limited (33.33%–50.00%), reflecting constrained generalization capability due to the small dataset and the absence of subject-wise or external validation. Further statistical analysis using confidence intervals and nonparametric testing confirms that the observed performance improvements are primarily associated with optimization stability rather than statistically significant gains in predictive generalization. Therefore, this study emphasizes the role of metaheuristic optimization in stabilizing neural network training under limited data conditions. The findings should be interpreted as a pilot feasibility study, and future work is required to validate the proposed approach using larger, more diverse datasets and more rigorous validation strategies.
Downloads
References
S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Comput., vol. 9, no. 8, pp. 1735–1780, 1997, doi: 10.1162/neco.1997.9.8.1735.
Q. Xiao et al., “Deep Learning-Based ECG Arrhythmia Classification: A Systematic Review,” Appl. Sci., vol. 13, no. 8, 2023, doi: 10.3390/app13084964.
G. D. Clifford, F. Azuaje, and P. E. McSharry, “Advanced Methods and Tools for ECG Data Analysis,” Adv. Methods Tools ECG Data Anal., pp. 1–400, 2006.
G. N. Chandrika, A. Mitra, V. Satheeswaran, R. Chowdhury, P. Kumar, and E. Glory, “Deep Learning Based Classification of ECG Signals to Detect Heart Diseases Using RNN and LSTM Mechanism,” J. Electron. Electromed. Eng. Med. Informatics, vol. 6, no. 4, pp. 332–342, 2024, doi: 10.35882/jeeemi.v6i4.496.
H. M. Rai and A. Trivedi, “ECG signal classification using wavelet transform and Back Propagation Neural Network,” CODEC 2012 - 5th Int. Conf. Comput. Devices Commun., vol. 3, pp. 212–215, 2012, doi: 10.1109/CODEC.2012.6509183.
H.-C. CHEN and K. HIRASAWA, “Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control and Artificial Intelligence Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control and Artif,” 2006.
S. Mirjalili, S. M. Mirjalili, and A. Lewis, “Grey Wolf Optimizer,” Adv. Eng. Softw., vol. 69, pp. 46–61, 2014, doi: 10.1016/j.advengsoft.2013.12.007.
P. Srinivasu and P. S. Avadhani, “Genetic algorithm based weight extraction algorithm for artificial neural network classifier in intrusion detection,” Procedia Eng., vol. 38, pp. 144–153, 2012, doi: 10.1016/j.proeng.2012.06.021.
B. Rabhi, H. Dhahri, A. M. Alimi, and F. A. Alturki, “Grey wolf optimizer for training elman neural network,” Adv. Intell. Syst. Comput., vol. 552, pp. 380–390, 2017, doi: 10.1007/978-3-319-52941-7_38.
B. Surawicz, R. Childers, B. J. Deal, and L. S. Gettes, “AHA/ACCF/HRS Recommendations for the Standardization and Interpretation of the Electrocardiogram. Part III: Intraventricular Conduction Disturbances A Scientific Statement From the American Heart Association Electrocardiography and Arrhythmias Committee, ,” J. Am. Coll. Cardiol., vol. 53, no. 11, pp. 976–981, 2009, doi: 10.1016/j.jacc.2008.12.013.
B. J. Drew et al., “Practice standards for electrocardiographic monitoring in hospital settings: An American Heart Association scientific statement from the councils on cardiovascular nursing, clinical cardiology, and cardiovascular disease in the young,” Circulation, vol. 110, no. 17, pp. 2721–2746, 2004, doi: 10.1161/01.CIR.0000145144.56673.59.
McSharry, P. E., Clifford, G. D., Tarassenko, L., and Smith, L. A., “A Dynamical Model for Generating Synthetic Electrocardiogram Signals,” IEEE Transactions on Biomedical Engineering, vol. 50, no. 3, pp. 289–294, 2003. doi: 10.1109/TBME.2003.808805.
I. Goodfellow, “Front Matter,” Linear Algebr., pp. i–ii, 2014, doi: 10.1016/b978-0-12-391420-0.09987-x.
O. Faust, Y. Hagiwara, T. J. Hong, O. S. Lih, and U. R. Acharya, “Deep learning for healthcare applications based on physiological signals: A review,” Comput. Methods Programs Biomed., vol. 161, no. April, pp. 1–13, 2018, doi: 10.1016/j.cmpb.2018.04.005.
M. M. A. Rahhal, Y. Bazi, H. Alhichri, N. Alajlan, F. Melgani, and R. R. Yager, “Deep learning approach for active classification of electrocardiogram signals,” Inf. Sci. (Ny)., vol. 345, pp. 340–354, 2016, doi: 10.1016/j.ins.2016.01.082.
M. S. Shaikh et al., An intelligent hybrid grey wolf-particle swarm optimizer for optimization in complex engineering design problem, vol. 15, no. 1. 2025. doi: 10.1038/s41598-025-02154-0.
M. Mitchell, “An Introduction to Genetic Algorithms,” An Introd. to Genet. Algorithms, pp. 115–123, 1996, doi: 10.7551/mitpress/3927.001.0001.
P. A. Thompson, “An MSE statistic for comparing forecast accuracy across series,” Int. J. Forecast., vol. 6, no. 2, pp. 219–227, 1990, doi: 10.1016/0169-2070(90)90007-X.
M. Srinivas and L. M. Patnaik, “Genetic Algorithms: A Survey,” Computer (Long. Beach. Calif)., vol. 27, no. 6, pp. 17–26, 1994, doi: 10.1109/2.294849.
S. Mirjalili, “How effective is the Grey Wolf optimizer in training multi-layer perceptrons,” Appl. Intell., vol. 43, no. 1, pp. 150–161, 2015, doi: 10.1007/s10489-014-0645-7.
A. H. Gandomi, X. S. Yang, S. Talatahari, and A. H. Alavi, Metaheuristic Algorithms in Modeling and Optimization, no. May 2017. 2013. doi: 10.1016/B978-0-12-398364-0.00001-2.
G. D. Prenata, E. S. Pane, A. D. Wibawa, and M. H. Purnomo, “Analysis of negative emotion using HRV based ECG signal of elder people,” Proc. - 2017 2nd Int. Conf. Inf. Technol. Inf. Syst. Electr. Eng. ICITISEE 2017, vol. 2018–Janua, pp. 444–449, 2017, doi: 10.1109/ICITISEE.2017.8285547.
P. S. Addison, “Wavelet transforms and the ECG: A review,” Physiol. Meas., vol. 26, no. 5, 2005, doi: 10.1088/0967-3334/26/5/R01.
H. Zacarias, J. A. L. Marques, V. Felizardo, M. Pourvahab, and N. M. Garcia, “ECG Forecasting System Based on Long Short-Term Memory,” Bioengineering, vol. 11, no. 1, pp. 1–17, 2024, doi: 10.3390/bioengineering11010089.
F. Huang, T. Qin, L. Wang, and H. Wan, “Hybrid Prediction Method for ECG Signals Based on VMD, PSR, and RBF Neural Network,” Biomed Res. Int., vol. 2021, 2021, doi: 10.1155/2021/6624298.
Pressman, S. D., and Cohen, S., “Does positive affect influence health?,” Psychological Bulletin, vol. 131, no. 6, pp. 925–971, 2005. doi: 10.1037/0033-2909.131.6.925.
Gross, J. J., “Emotion Regulation: Conceptual Foundations,” in Handbook of Emotion Regulation, New York: Guilford Press, 2007, pp. 3–24/27.
Kreibig, S. D., “Autonomic nervous system activity in emotion: A review,” Biological Psychology, vol. 84, no. 3, pp. 394–421, 2010. doi: 10.1016/j.biopsycho.2010.03.010.
Naseer, N., and Nazeer, H., “Classification of normal and abnormal ECG signals based on their PQRST intervals,” in Proceedings of the 2017 International Conference on Mechanical, System and Control Engineering (ICMSC), 2017, pp. 388–391. doi: 10.1109/ICMSC.2017.7959507.
Gualsaqui Miranda, M. V., Vizcaíno Espinosa, I. P., and Flores Calero, M. J., “ECG signal features extraction,” in 2016 IEEE ANDESCON, 2016. doi: 10.1109/ETCM.2016.7750859.
Lim, J., Han, D., Nejad, M. P. S., and Chon, K. H., “ECG classification via integration of adaptive beat segmentation and relative heart rate with deep learning networks,” Computers in Biology and Medicine, vol. 181, Art. no. 109062, Oct. 2024. doi: 10.1016/j.compbiomed.2024.109062.
Sharma, M., and Sharma, A., “HRV: A powerful tool in medical diagnosis,” in Handbook of Research on Emerging Trends in Medical Informatics, IGI Global, 2020. doi: 10.4018/978-1-5225-9787-2.ch013.
Guyton, A. C., and Hall, J. E., Textbook of Medical Physiology, 11th ed., Philadelphia, PA: Elsevier Saunders, 2006.
Alam, A., Urooj, S., and Ansari, A. Q., “Human emotion recognition models using machine learning techniques,” in 2023 International Conference on Recent Advances in Electrical, Electronics and Digital Healthcare Technologies (REEDCON), 2023, pp. 329–334. doi: 10.1109/REEDCON57544.2023.10151406.
Zhang, L., and Wang, J., “Design for emotion classification and retrieval of video based on user experience,” in Proceedings of the 2011 International Conference on Electronics, Communications and Control (ICECC), 2011, pp. 205–211. doi: 10.1109/ICECC.2011.6066429.
Kim, J., and André, E., “Emotion recognition based on physiological changes in music listening,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 30, no. 12, pp. 2067–2083, 2008. doi: 10.1109/TPAMI.2008.26.
Xu, Y., and Liu, G., “A method of emotion recognition based on ECG signal,” in Proceedings of the International Conference on Computational Intelligence and Natural Computing (CINC), 2009. doi: 10.1109/CINC.2009.102.
Shu, L., Xie, J., Yang, M., Li, Z., Li, Z., Liao, D., Xu, X., and Yang, X., “A review of emotion recognition using physiological signals,” Sensors, vol. 18, no. 7, Art. no. 2074, 2018. doi: 10.3390/s18072074.
Fikri, M. R., Soesanti, I., and Nugroho, H. A., “ECG signal classification review,” International Journal of Information Technology and Electrical Engineering (IJITEE), vol. 5, no. 1, pp. 15–20, 2021. doi: 10.22146/ijitee.60295.
He, L., Hou, W.-S., Zhen, X., and Peng, C. L., “Recognition of ECG patterns using artificial neural network,” in Proceedings of the International Symposium on Intelligent Data Analysis (ISDA), 2006, pp. 477–481. doi: 10.1109/ISDA.2006.253883.
Guo, H.-W., Huang, Y.-S., Lin, C.-H., Chien, J.-C., Haraikawa, K., and Shieh, J.-S., “Heart rate variability signal features for emotion recognition by using principal component analysis and support vector machine,” in 2016 IEEE 16th International Conference on Bioinformatics and Bioengineering (BIBE), 2016, pp. 274–277. doi: 10.1109/BIBE.2016.40.
Faust, O., Hong, W., Loh, H. W., Xu, S., Tan, R. S., Chakraborty, S., Barua, P. D., Molinari, F., and Acharya, U. R., “Heart rate variability for medical decision support systems: A review,” Computers in Biology and Medicine, vol. 145, Art. no. 105407, 2022. doi: 10.1016/j.compbiomed.2022.105407.
Copyright (c) 2026 Giovanni Dimas Prenata, Ahmad Ridho’i, Mohd Rizal Arshad

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlikel 4.0 International (CC BY-SA 4.0) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).


.png)
.png)
.png)
.png)
.png)