STFT-Based Multiclass Heart Sound Classification Using BiLSTM and CNN-BiLSTM Models

Keywords: Heart sound classification, PCG, Deep learning, CNN, BiLSTM, STFT, Spectrogram, Multiclass classification

Abstract

Cardiovascular diseases require early and reliable screening because manual auscultation may be affected by noise, subjective interpretation, and inter-observer variability. This study aimed to develop an STFT-based deep learning framework for multiclass phonocardiogram (PCG) classification. The proposed framework was designed to provide a reproducible evaluation procedure by combining standardized preprocessing, time–frequency feature extraction, and deep learning-based classification under the same experimental conditions. Unlike approaches that may evaluate segmented signals without clearly preserving recording-level separation, this study emphasizes a leakage-free splitting strategy to reduce the risk of overestimated performance and to provide a more reliable assessment of model generalization. The Yaseen PCG dataset, consisting of 1000 recordings from five classes (AS, MR, MS, MVP, and Normal), was divided using a leakage-free recording-level split before segmentation and spectrogram generation. After preprocessing, 2-second PCG segments with 50% overlap were converted into 128 × 128 STFT spectrograms and classified using BiLSTM and CNN-BiLSTM models. Both models were trained and tested using the same dataset split, preprocessing pipeline, and evaluation metrics, including accuracy, precision, recall, F1-score, specificity, and confusion matrices. The BiLSTM model achieved 92.36% accuracy in the final independent test run, while the CNN-BiLSTM model achieved 95.83%. Across three repeated runs, BiLSTM achieved 93.85% ± 1.47%, whereas CNN-BiLSTM achieved 95.94% ± 0.71%. These results show that CNN-BiLSTM provides higher and more stable classification performance for five-class PCG classification, while BiLSTM remains a simpler alternative for lightweight implementation. Overall, the proposed STFT-based framework provides a reliable approach for automated heart sound classification and may support future computer-aided cardiac screening applications.

Downloads

Download data is not yet available.

References

Y. Zheng, X. Guo, Y. Yang, H. Wang, K. Liao, and J. Qin, “Phonocardiogram transfer learning-based CatBoost model for diastolic dysfunction identification using multiple domain-specific deep feature fusion,” Comput. Biol. Med., vol. 156, 2023, doi: 10.1016/j.compbiomed.2023.106707.

E. Partovi, A. Babic, and A. Gharehbaghi, “A review on deep learning methods for heart sound signal analysis,” 2024. doi: 10.3389/frai.2024.1434022.

M. Kalimuthu and C. Hemanth, “Preliminary Study on Real-Time Phonocardiogram Signal Acquisition and Analysis Using Machine Learning and IoMT for Digital Stethoscope,” IEEE Access, vol. 13, 2025, doi: 10.1109/ACCESS.2025.3560763.

S. Ismail, B. Ismail, I. Siddiqi, and U. Akram, “PCG classification through spectrogram using transfer learning,” Biomed. Signal Process. Control, vol. 79, 2022, doi: 10.1016/j.bspc.2022.104075.

P. Narváez and W. S. Percybrooks, “Synthesis of normal heart sounds using generative adversarial networks and empirical wavelet transform,” Applied Sciences (Switzerland), vol. 10, no. 19, 2020, doi: 10.3390/app10197003.

C. Liu et al., “An open access database for the evaluation of heart sound algorithms,” Physiol. Meas., vol. 37, no. 12, pp. 2181–2213, Nov. 2016, doi: 10.1088/0967-3334/37/12/2181.

T. H. Chowdhury, K. N. Poudel, and Y. Hu, “Time-Frequency Analysis, Denoising, Compression, Segmentation, and Classification of PCG Signals,” IEEE Access, vol. 8, 2020, doi: 10.1109/ACCESS.2020.3020806.

L. Orozco-Reyes, M. A. Alonso-Arévalo, E. García-Canseco, R. F. Ibarra-Hernández, and R. Conte-Galván, “A Deep-Learning Approach to Heart Sound Classification Based on Combined Time-Frequency Representations,” Technologies (Basel)., vol. 13, no. 4, 2025, doi: 10.3390/technologies13040147.

W. Chen et al., “Classifying Heart-Sound Signals Based on CNN Trained on MelSpectrum and Log-MelSpectrum Features,” Bioengineering, vol. 10, no. 6, 2023, doi: 10.3390/bioengineering10060645.

F. Li, H. Tang, S. Shang, K. Mathiak, and F. Cong, “Classification of heart sounds using convolutional neural network,” Applied Sciences (Switzerland), vol. 10, no. 11, 2020, doi: 10.3390/app10113956.

F. Noman, S. H. Salleh, C. M. Ting, S. B. Samdin, H. Ombao, and H. Hussain, “A Markov-Switching Model Approach to Heart Sound Segmentation and Classification,” IEEE J. Biomed. Health Inform., vol. 24, no. 3, 2020, doi: 10.1109/JBHI.2019.2925036.

T. Jat, P. Bhat, and N. Patil, “Detection of Heart Abnormality with Stethoscope Sounds,” SN Comput. Sci., vol. 6, no. 6, 2025, doi: 10.1007/s42979-025-04235-3.

S. Tiwari, A. Jain, A. K. Sharma, and K. Mohamad Almustafa, “Phonocardiogram signal based multi-class cardiac diagnostic decision support system,” IEEE Access, vol. 9, pp. 110710–110722, 2021, doi: 10.1109/ACCESS.2021.3103316.

G. Singh, A. Verma, L. Gupta, A. Mehta, and V. Arora, “An automated diagnosis model for classifying cardiac abnormality utilizing deep neural networks,” Multimed. Tools Appl., vol. 83, no. 13, 2024, doi: 10.1007/s11042-023-16930-5.

M. Morshed and S. A. Fattah, “A Deep Neural Network for Heart Valve Defect Classification From Synchronously Recorded ECG and PCG,” IEEE Sens. Lett., vol. 7, no. 9, 2023, doi: 10.1109/LSENS.2023.3307053.

A. Harimi, M. A. Ameri, S. Sarkar, and M. W. Totaro, “Heart sounds classification: Application of a new CyTex inspired method and deep convolutional neural network with transfer learning,” Smart Health, vol. 29, 2023, doi: 10.1016/j.smhl.2023.100416.

M. S. Khan, F. A. Khan, K. N. Khan, S. I. Rana, and M. A. A. A. Al-Hashemi, “Advanced Deep Learning for Heart Sounds Classification,” in Studies in Computational Intelligence, vol. 1124, 2023. doi: 10.1007/978-3-031-46341-9_9.

A. Barnawi, M. Boulares, and R. Somai, “Simple and Powerful PCG Classification Method Based on Selection and Transfer Learning for Precision Medicine Application,” Bioengineering, vol. 10, no. 3, 2023, doi: 10.3390/bioengineering10030294.

S. A. Singh, N. D. Devi, K. N. Singh, K. Thongam, B. R. D, and S. Majumder, “An ensemble-based transfer learning model for predicting the imbalance heart sound signal using spectrogram images,” Multimed. Tools Appl., vol. 83, no. 13, 2024, doi: 10.1007/s11042-023-17186-9.

H. K. Alkahtani, I. U. Haq, Y. Y. Ghadi, N. Innab, M. Alajmi, and M. Nurbapa, “Precision Diagnosis: An Automated Method for Detecting Congenital Heart Diseases in Children From Phonocardiogram Signals Employing Deep Neural Network,” IEEE Access, vol. 12, 2024, doi: 10.1109/ACCESS.2024.3395389.

J. S. Khan, M. Kaushik, A. Chaurasia, M. K. Dutta, and R. Burget, “Cardi-Net: A deep neural network for classification of cardiac disease using phonocardiogram signal,” Comput. Methods Programs Biomed., vol. 219, 2022, doi: 10.1016/j.cmpb.2022.106727.

Z. Tariq, S. K. Shah, and Y. Lee, “Feature-Based Fusion Using CNN for Lung and Heart Sound Classification†,” Sensors, vol. 22, no. 4, 2022, doi: 10.3390/s22041521.

Y. Al-Issa and A. M. Alqudah, “A lightweight hybrid deep learning system for cardiac valvular disease classification,” Sci. Rep., vol. 12, no. 1, 2022, doi: 10.1038/s41598-022-18293-7.

K. N. Khan et al., “Deep learning based classification of unsegmented phonocardiogram spectrograms leveraging transfer learning,” Physiol. Meas., vol. 42, no. 9, 2021, doi: 10.1088/1361-6579/ac1d59.

Yaseen, G.-Y. Son, and S. Kwon, “Classification of heart sound signal using multiple features,” Applied Sciences, vol. 8, no. 12, Art. no. 2344, 2018: 10.3390/app8122344.

J. B. Allen and L. R. Rabiner, “A Unified Approach to Short-Time Fourier Analysis and Synthesis,” Proceedings of the IEEE, vol. 65, no. 11, 1977, doi: 10.1109/PROC.1977.10770.

N. Ream, “Discrete-Time Signal Processing,” Electronics and Power, vol. 23, no. 2, 1977, doi: 10.1049/ep.1977.0078.

M. T. Nguyen, W. W. Lin, and J. H. Huang, “Heart Sound Classification Using Deep Learning Techniques Based on Log-mel Spectrogram,” Circuits Syst. Signal Process., vol. 42, no. 1, 2023, doi: 10.1007/s00034-022-02124-1.

I. Ait Ichou, S. Elouaham, B. Nassiri, and J. Isknan, “Deep multimodal learning for heart sound classification using CNN, Transformer, and BiLSTM with attention,” Symmetry, vol. 18, no. 4, Art. no. 556, 2026, doi: 10.3390/sym18040556.

S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, 1997,doi:.org/10.1162/neco.1997.9.8.1735.

A. Graves and J. Schmidhuber, “Framewise phoneme classification with bidirectional LSTM and other neural network architectures,” Neural Networks, vol. 18, no. 5–6, pp. 602–610, 2005, doi: 10.1016/j.neunet.2005.06.042.

M. Schuster and K. K. Paliwal, “Bidirectional recurrent neural networks,” IEEE Transactions on Signal Processing, vol. 45, no. 11, pp. 2673–2681, 1997, doi: 10.1109/78.650093.

H. Jiang, S. A. Salehi, M. D. Riedel, and K. K. Parhi, “Discrete-time signal processing with DNA,” ACS Synth. Biol., vol. 2, no. 5, 2013, doi: 10.1021/sb300087n.

A. D. Poularikas and Z. M. Ramadan, “Discrete-time signal processing,” in Adaptive Filtering Primer With Matlab®, 2019. doi: 10.1201/9781315221946-2.

S. Liang, Y. Khoo, and H. Yang, “Drop-Activation: Implicit Parameter Reduction and Harmonious Regularization,” Communications on Applied Mathematics and Computation, vol. 3, no. 2, 2021, doi: 10.1007/s42967-020-00085-3.

B. Althaph and N. P. Challa, “Explainable attention-based deep learning for classification and interpretation of heart murmurs using phonocardiograms,” Sci. Rep., vol. 15, no. 1, 2025, doi: 10.1038/s41598-025-21971-x.

Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521, no. 7553, pp. 436–444, 2015, doi: 10.1038/nature14539.

S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” in Proceedings of the 32nd International Conference on Machine Learning, ICML, 2015, pp. 448–456. arXiv:1502.03167

D. P. Kingma and J. L. Ba, “Adam: A method for stochastic optimization,” in 3rd International Conference on Learning Representations, ICLR 2015 - Conference Track Proceedings, 2015. https://doi.org/10.48550/arXiv.1412.6980.

M. Sokolova and G. Lapalme, “A systematic analysis of performance measures for classification tasks,” Information Processing & Management, vol. 45, no. 4, pp. 427–437, 2009,doi: 10.1016/j.ipm.2009.03.002.

Published
2026-08-03
How to Cite
[1]
N. S., E. A. Hussein, and L. A. Abdul-Rahaim, “STFT-Based Multiclass Heart Sound Classification Using BiLSTM and CNN-BiLSTM Models ”, j.electron.electromedical.eng.med.inform, vol. 8, no. 4, pp. 1296-1313, Aug. 2026.
Section
Medical Engineering