Comparing Spectrogram Front-Ends for Abnormal Heart Sound Detection with CNN

We compare logmel, PCEN, and multi-resolution spectrograms for detecting abnormal heart sounds. PCEN and multi-resolution achieve up to 0.916 accuracy. See

sábado, 25 de julio de 2026 • 3 min read • Q2BSTUDIO Team

¿Qué espectrograma mejora la detección de latidos anormales?

Early detection of cardiac anomalies remains a top clinical challenge. Although advances in imaging are remarkable, traditional auscultation with a stethoscope is still the most accessible and inexpensive screening tool. However, interpretation of heart sounds heavily depends on the physician's experience. This is where artificial intelligence comes into play: transforming a simple heartbeat recording into a clinical decision assisted by AI models capable of distinguishing between normal and abnormal sounds. At Q2BSTUDIO, a company specialized in custom software development, we know the key is not only the neural network architecture, but also how we prepare the input data. This article analyzes an empirical comparison of three spectral representations —logmel, PCEN, and multiresolution— applied to a CNN classifier on the PhysioNet 2016 heart sound dataset.

The methodology used by the researchers was deliberately simple to isolate the effect of the representation: they kept the CNN fixed —same architecture, same Adam optimizer, same random seed— and varied only how the raw audio was converted into a spectral image. The log-mel spectrogram (logmel) is the most widespread technique: it applies a short-time Fourier transform (STFT) with fixed window size, maps magnitudes to the mel scale, and applies logarithmic compression. PCEN (Per-Channel Energy Normalization) introduces temporal normalization per frequency band, reducing the effect of volume variations and background noise, common in stethoscope recordings. The multiresolution version stacks several logmel spectrograms generated with different window sizes (e.g., 25 ms, 50 ms, and 100 ms) creating a three-channel tensor that captures information from both fast events and sustained tones.

The study results reveal that all three representations achieve a sensitivity close to 0.95 in detecting abnormal cases, indicating the CNN extracts relevant patterns in all cases. However, the official PhysioNet metric —a combination of sensitivity and specificity— shows that PCEN (0.915) and multiresolution (0.916) slightly outperform logmel (0.910). Although the differences are small, in a clinical context where every tenth of accuracy can translate into lives saved, any improvement is relevant. Moreover, using Grad-CAM to visualize activated regions in the spectral images confirmed that the model focuses mainly on low frequencies where S1 and S2 sounds reside, a sign that learning is based on real physiological foundations and not on artifacts.

From a technical perspective, implementing such systems requires a robust cloud AWS/Azure ecosystem to scale processing of thousands of daily recordings, as well as cybersecurity measures to protect sensitive health data. At Q2BSTUDIO we integrate complete data pipelines from audio ingestion to model deployment in production, using Business Intelligence tools like Power BI to monitor performance and generate dashboards that help clinical teams interpret predictions. Additionally, process automation through AI agents allows orchestrating intelligent workflows that, for example, prioritize recordings with high probability of anomaly for immediate cardiologist review.

Another relevant aspect is audio preprocessing in real environments. PCEN proved particularly robust against environmental noise, making it an ideal choice for wearable or telemedicine applications where recording quality varies. The multiresolution representation, on the other hand, offers a wealth of information that can be exploited by deeper architectures or hybrid models combining CNNs with transformers. At Q2BSTUDIO we have developed custom applications for biomedical signal analysis incorporating these techniques, and experience tells us that the choice of spectrogram should align with the target hardware: an embedded device with low memory will likely use PCEN for computational efficiency, while a cloud server can afford the extra cost of multiresolution.

Finally, it is worth noting that the scientific community is exploring variants like phase spectrograms or generative networks to augment synthetic data. In this context, Q2BSTUDIO offers consulting services in AI to help companies choose the optimal representation for their specific domain, whether healthcare, industry, or finance. The combination of advanced spectrograms with lightweight CNN architectures represents a step forward toward accessible and automated cardiac diagnosis, especially in regions with a shortage of specialists. With proper integration of cloud, cybersecurity, and intelligent agents, these solutions can be deployed securely and scalably.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.