Abstract
AI models for respiratory sound classification often struggle with "brittleness," failing to maintain performance when moved between different clinical environments or recording devices. We introduce Lungmix, a novel data augmentation strategy designed to enhance domain generalization. By employing waveform-level blending, loudness-aware masking, and non-linear semantic label interpolation, Lungmix preserves critical sparse acoustic features like crackles. Our evaluation across three major datasets demonstrates that Lungmix improves cross-domain classification scores by up to 3.55%, consistently outperforming standard augmentation baselines.
Introduction
The deployment of AI in respiratory health is hindered by poor domain generalization. Models trained on data from one hospital often perform poorly on data from another due to variations in stethoscopes, recording environments, and physician annotation styles. Standard data augmentation techniques like "Mixup"—which linearly blends two samples—often fail in this context. They tend to wash out "sparse" sounds like crackles (short, sharp bursts) and produce labels that lack clinical meaning, such as labeling a mixture of healthy and pathological sounds as "half-sick."
Methods: The Lungmix Strategy
Lungmix addresses these challenges through three core innovations tailored for respiratory audio:
- Waveform-Level Blending: Unlike traditional methods that operate on spectrogram images, Lungmix blends raw audio waveforms directly to maintain phase information and temporal resolution.
- Loudness-Aware Masking: To prevent transient, high-energy features (like crackles) from being obscured, Lungmix uses a loudness mask. It identifies segments where the signal volume exceeds the mean and "protects" these regions during the mixing process.
- Semantic Label Interpolation: Lungmix replaces linear label blending with clinical logic. For instance, mixing a "crackle" with a "normal" sound results in a "crackle" label (Bitwise OR), reflecting that the presence of any abnormality is the primary diagnostic factor.
The backbone architecture for these experiments was the Audio Spectrogram Transformer (AST), chosen for its state-of-the-art performance in audio tasks.
Experimental Setup and Datasets
The study utilized three diverse respiratory databases to evaluate cross-domain performance:
- ICBHI: The standard benchmark for lung sound classification.
- SPRSound: A large-scale paediatric database.
- HF: An open-access database with various breath phases.
All data were unified into a 4-class system: normal, crackle, wheeze, and both.
Results and Discussion
Lungmix demonstrated superior generalization capabilities compared to Vanilla Mixup, Cutmix, and Patch-mix. Notably, models trained on the HF dataset and tested on unseen domains saw a performance boost of 3.55%.
Ablation studies confirmed that the loudness mask is essential; removing it caused performance gains to vanish, highlighting the importance of preserving acoustic "peaks." While Lungmix provides a significantly higher performance "floor" in new environments, there is a slight trade-off: specialized "in-domain" models may still outperform it on the specific dataset they were trained on.
Conclusion
Lungmix represents a significant step toward robust, generalizable AI for respiratory diagnosis. By prioritizing clinical logic and acoustic sparsity over simple mathematical interpolation, it bridges the gap between laboratory performance and real-world clinical utility. Future work will focus on testing these strategies in even more diverse, real-time clinical settings.
Summary updated