Related Experiment Video
Updated: Oct 5, 2025

Asthma Detection Research Based on Voice Signal Processing and Machine Learning
Published on: July 22, 2025
Contrastive learning of heart and lung sounds for label-efficient diagnosis
Pratham N Soni1, Siyu Shi2, Pranav R Sriram1
1Department of Computer Science, Stanford University, Stanford, CA, USA.
Abstract:
Data labeling is often the limiting step in machine learning because it requires time from trained experts. To address the limitation on labeled data, contrastive learning, among other unsupervised learning methods, leverages unlabeled data to learn representations of data. Here, we propose a contrastive learning framework that utilizes metadata for selecting positive and negative pairs when training on unlabeled data. We demonstrate its application in the healthcare domain on heart and lung sound recordings. The increasing availability of heart and lung sound recordings due to adoption of digital stethoscopes lends itself as an opportunity to demonstrate the application of our contrastive learning method. Compared to contrastive learning with augmentations, the contrastive learning model leveraging metadata for pair selection utilizes clinical information associated with lung and heart sound recordings. This approach uses shared context of the recordings on the patient level using clinical information including age, sex, weight, location of sounds, etc. We show improvement in downstream tasks for diagnosing heart and lung sounds when leveraging patient-specific representations in selecting positive and negative pairs. This study paves the path for medical applications of contrastive learning that leverage clinical information. We have made our code available here: https://github.com/stanfordmlgroup/selfsupervised-lungandheartsounds.
More Related Videos
06:15Protocol and Guidelines for Point-of-Care Lung Ultrasound in Diagnosing Neonatal Pulmonary Diseases Based on International Expert Consensus
Published on: March 6, 2019
06:26Author Spotlight: Exploring Breathing Techniques and Digital Solutions for Enhancing Running Performance
Published on: September 27, 2024
Related Concept Videos
Heart Sounds
Auscultation is the process of listening to these internal body sounds using a stethoscope. The heart produces four types of sounds, but only two—S1 and S2—can usually be heard with a stethoscope.
S1, also known as the "lub" sound, is caused by the closure of atrioventricular (A-V)...
Assessment of Respiration
Subjective Assessment: Nurses interview the patient to gather information directly during the subjective assessment. It includes questions about the individual's medical history, medications, and symptoms, focusing on past respiratory conditions like...
Physical Assessment of the Respiratory Tract IV: Auscultation
Breath Sounds
Breath sounds are categorized into vesicular, bronchovesicular, and bronchial.
Respiratory System Abnormal Finding II: Palpation and Auscultation
Palpation Findings
During a respiratory assessment, palpation can reveal several vital abnormalities:
Assessment of the Cardiovascular System IV: Auscultation
Normal Heart Sounds
S1 (First Heart Sound)-
S1 is made by the closure of the mitral and tricuspid valves (atrioventricular valves), marking the beginning of systole.
S2 (Second Heart Sound)-
S2 is made by the closure of the aortic and pulmonic valves (semilunar valves), marking the end of the systole.
Assessment of Ventilation II: Respiratory Depth and Rhythm
Respiratory depth measures the volume of air inhaled or exhaled during a breath. It can vary from shallow to deep and typically remains consistent when a person is at rest or asleep. Occasionally, individuals will automatically inhale deeply, known as sighing, which inflates the lungs with more air than normal breathing.
To assess respiratory depth, observe the degree of chest excursion or movement: