Codec Data Augmentation for Time-domain Heart Sound Classification

Ansh Mishra, Jia Qi Yip, Eng Siong Chng

Abstract

Automated classification of heart sounds via phonocardiograms (PCGs) offers a scalable solution for early detection of valvular heart disease. However, the development of robust deep learning models is often hindered by limited annotated datasets and the complexity of frequency-domain preprocessing. This paper explores a novel data augmentation strategy for time-domain models: codec simulation. By subjecting raw audio to low-bitrate compression, we introduce digital distortions that improve model generalization. Our results demonstrate that a simple 1D convolutional neural network (M5), when trained with codec-augmented data, achieves a Classification Error Rate (CER) of 0.20, significantly outperforming traditional time-domain baselines.

Introduction

Valvular heart disease remains a significant global health challenge, requiring early and accurate diagnosis to improve patient outcomes. While cardiac auscultation is a standard diagnostic tool, its efficacy is highly dependent on the clinician's experience. Digital stethoscopes have enabled the recording of heart sounds as phonocardiograms (PCGs), paving the way for AI-assisted diagnostics.

Despite the potential of deep learning, two primary obstacles remain: data scarcity and the limitations of time-domain architectures. Most state-of-the-art models rely on frequency-domain representations, such as spectrograms, which require additional preprocessing. Time-domain models, which process raw waveforms directly, offer a simpler pipeline but have historically struggled to match the accuracy of their frequency-domain counterparts. This study investigates whether targeted data augmentation can bridge this performance gap.

Methodology

Codec Simulation as Augmentation

The core of our approach is Codec Simulation. Unlike standard augmentation techniques such as additive white noise or pitch shifting, codec simulation mimics the digital artifacts introduced during audio transmission or low-cost digital recording.

Using the ffmpeg software suite, original heart sound recordings were processed through the Opus (OGG) codec at three low bitrates: 4.5k, 5.5k, and 7.7k. This process introduces specific types of digital "smearing" and frequency loss. By training on these degraded samples, the model is forced to ignore brittle, high-frequency details and instead focus on robust, fundamental acoustic features—specifically the rhythmic "lub-dub" patterns and the core characteristics of pathological murmurs.

Model Architecture

We employed the M5 model, a 1D convolutional neural network (CNN) specifically designed for raw audio classification. The M5 architecture is relatively lightweight, making it an ideal candidate for testing the efficacy of data augmentation without the confounding effects of extreme model complexity.

Experimental Setup

Experiments were conducted using the Yaseen 2018 (Y-18) dataset. The dataset consists of 1,000 heart sound recordings, evenly distributed across five categories (200 samples each):

  1. Normal
  2. Aortic Stenosis (AS)
  3. Mitral Stenosis (MS)
  4. Mitral Regurgitation (MR)
  5. Mitral Valve Prolapse (MVP)

The balanced nature of the Y-18 dataset provides a rigorous benchmark for evaluating classification accuracy across multiple valvular conditions.

Results and Discussion

The implementation of codec augmentation resulted in a dramatic improvement in classification performance. The baseline M5 model, trained only on original data, yielded a Classification Error Rate (CER) of 0.80. When the same architecture was trained with the codec-augmented dataset, the CER dropped to 0.20.

This performance represents a significant advancement over previous time-domain benchmarks. For instance, a more complex CNN-BiLSTM architecture previously achieved a CER of 0.68 on the same data. Our results suggest that the quality and variety of training data are more critical than model depth for time-domain heart sound analysis. Furthermore, the augmented model showed improved performance even when testing on clean, original data, indicating that codec simulation acts as an effective regularizer that promotes feature generalization.

Conclusion and Future Work

Codec data augmentation provides a simple yet powerful method for enhancing time-domain heart sound classification. By bridging the gap between raw waveform models and frequency-domain approaches, this method simplifies the deployment of AI in digital stethoscopes.

Future research will focus on:

  • Real-World Noise Integration: Testing the model against clinical recordings that include ambient noise and respiratory sounds.
  • Advanced Architectures: Combining codec augmentation with transformer-based time-domain models (e.g., ACA-Net) to further reduce the error rate.
  • Clinical Validation: Evaluating performance across diverse patient demographics to ensure diagnostic reliability in real-world medical environments.

Summary updated

Abstract

Heart auscultations are a low-cost and effective way of detecting valvular heart diseases early, which can save lives. Nevertheless, it has been difficult to scale this screening method since the effectiveness of auscultations is dependent on the skill of doctors. As such, there has been increasing research interest in the automatic classification of heart sounds using deep learning algorithms. However, it is currently difficult to develop good heart sound classification models due to the limited data available for training. In this work, we propose a simple time domain approach, to the heart sound classification problem with a base classification error rate of 0.8 and show that augmentation of the data through codec simulation can improve the classification error rate to 0.2. With data augmentation, our approach outperforms the existing time-domain CNN-BiLSTM baseline model. Critically, our experiments show that codec data augmentation is effective in getting around the data limitation.
BibTeX
@misc{mishra2023codec,
  author = {Ansh Mishra and Jia Qi Yip and Eng Siong Chng},
  title = {{Codec Data Augmentation for Time-domain Heart Sound Classification}},
  year = {2023},
  eprint = {2309.07466},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.07466},
}
Figure