Maiby's Algorithm: A Two-Stage Deep Learning Approach for Murmur Detection in Mel Spectrograms for Automatic Auscultation of Congenital Heart Disease

Matheus Araújo, Dewen Zeng, João Palotti, Xirong Xi, Yiyu Shi, Lee Pyles, Quan NiCinC 2022 · OpenReview

Abstract

Maiby’s Algorithm is a two-stage deep learning framework designed to detect heart murmurs from digital recordings, aiming to automate the screening of Congenital Heart Disease (CHD). By converting audio into Mel spectrograms and using a Convolutional Neural Network (CNN) to "see" murmurs, the system achieves a weighted accuracy of 0.729. This approach offers a scalable diagnostic tool for regions with limited access to pediatric cardiologists, prioritizing sensitivity to ensure high-risk cases are identified.

Introduction

Congenital Heart Disease (CHD) affects approximately 1% of newborns globally and remains a leading cause of infant mortality, particularly in low- and middle-income countries. While specialists can identify these conditions through auscultation (listening to heart sounds), many remote areas lack the expertise required for timely diagnosis. The challenge lies in the subjectivity and scarcity of human experts. To bridge this gap, the authors developed an automated, objective, and accessible machine learning model as part of the 2022 George B. Moody PhysioNet Challenge. The goal was to identify murmurs from digital stethoscopes using the same "visual" intuition a trained clinician might use when examining a phonocardiogram.

Methods

The proposed "two-stage" strategy treats audio classification as a visual recognition task, leveraging the power of computer vision to mimic human expert perception.

Data Preprocessing and Feature Extraction

The study utilizes a dataset of 5,282 heart sound recordings from 1,568 pediatric participants. Recordings were collected from four standard auscultation locations: the aortic, pulmonary, tricuspid, and mitral valves.

Audio files are first filtered using a Butterworth Bandpass filter (20Hz–530Hz) to isolate pathogenic frequencies. The recordings are then sliced into 2-second segments and converted into Mel spectrograms—visual representations of sound that emphasize frequencies distinguishable by the human ear.

Overview of the data processing pipeline and the two-stage classification idea.

The Two-Stage Model

  1. Stage 1 (The Feature Extractor): A CNN is trained to classify whether a single 2-second Mel spectrogram contains a murmur. The model underwent a "warm-up" phase by pre-training on the 2016 PhysioNet Challenge dataset before fine-tuning on the 2022 data.
  2. Stage 2 (The Final Decision): To aggregate data from multiple chest locations, the model randomly samples 16 segments from a patient’s recordings. It extracts 1x8 embeddings from the second-to-last layer of the Stage 1 CNN and concatenates them into a 1x128 vector. This vector is fed into a final feed-forward neural network to produce a single probability of a murmur being present for that individual.

Results

On the hidden test set of the official challenge, the algorithm achieved a weighted accuracy of 0.729, ranking 17th out of 40 teams. Internal validation using 5-fold cross-validation demonstrated the model's robustness and consistency across different metrics.

Internal validation results across 5 folds showing performance metrics like AUC-ROC, sensitivity, and specificity.

The deep learning approach significantly outperformed a baseline Random Forest model, which only reached a weighted accuracy of 0.394. In the 5-fold cross-validation, the model achieved a mean sensitivity of 0.76 and a specificity of 0.85. Notably, the authors prioritized sensitivity over specificity during training by treating "unknown" cases as "murmur present," ensuring fewer cases of CHD are missed in a screening context.

Discussion and Conclusion

The core innovation of Maiby's Algorithm lies in its visual mimicry and stochastic aggregation. By using Mel spectrograms, the model identifies regular, longer events in mid-level frequency bands characteristic of murmurs. The random sampling of segments in Stage 2 acts as a form of data augmentation, making the model more robust to varying recording lengths and locations.

Despite its success, the model faces limitations, including hyperparameter complexity and the statistical risk of missing intermittent murmurs due to random sampling. Future work could involve more sophisticated attention mechanisms to focus on the most "suspicious" parts of a recording, potentially improving diagnostic accuracy and clinical reliability further.

Summary updated

BibTeX
@inproceedings{araujo2022maiby,
  author = {Matheus Araújo and Dewen Zeng and João Palotti and Xirong Xi and Yiyu Shi and Lee Pyles and Quan Ni},
  title = {{Maiby's Algorithm: A Two-Stage Deep Learning Approach for Murmur Detection in Mel Spectrograms for Automatic Auscultation of Congenital Heart Disease}},
  booktitle = {CinC},
  year = {2022},
  url = {https://openreview.net/forum?id=2lv11sAFmD},
}
Figure