Source-linked AI summary

Geometry-Aware Optimization for Respiratory Sound Classification: Enhancing Sensitivity with SAM-Optimized Audio Spectrogram Transformers

Atakan Işık, Selin Vulga Işık, Ahmet Feridun Işık, Mahşuk Taylan

arXiv:2512.22564v1eess.AScs.AIcs.LGcs.SD

TL;DR

Respiratory sound classification on small, noisy medical datasets poses a generalization challenge for Transformers. The paper combines AST with SAM and signal-preserving cyclic padding, reporting a 68.10% Score and 68% Sensitivity on ICBHI 2017.

  • Problem

    Transformers trained on small, noisy medical datasets can settle in sharp minima and generalize poorly, complicating respiratory sound classification.

    Source: DISCUSSION · p. 8
  • Method

    The framework combines AST with SAM and signal-preserving cyclic padding for respiratory sound classification.

    Source: INTRODUCTION · p. 1, CONCLUSION · p. 9
  • Results

    68.10% Score and 68% Sensitivity are reported on the ICBHI 2017 benchmark.

    Source: CONCLUSION · p. 9
  • Takeaways & Limitations

    The authors position the reported sensitivity as useful for clinical screening because it can minimize false negatives.

    Source: INTRODUCTION · p. 2

    Specificity of 61% indicates more false positives, likely because the model confuses high-frequency noise with wheezes.

    Source: DISCUSSION · p. 9

Abstract

from arXiv · show

Respiratory sound classification is hindered by the limited size, high noise levels, and severe class imbalance of benchmark datasets like ICBHI 2017. While Transformer-based models offer powerful feature extraction capabilities, they are prone to overfitting and often converge to sharp minima in the loss landscape when trained on such constrained medical data. To address this, we introduce a framework that enhances the Audio Spectrogram Transformer (AST) using Sharpness-Aware Minimization (SAM). Instead of merely minimizing the training loss, our approach optimizes the geometry of the loss surface, guiding the model toward flatter minima that generalize better to unseen patients. We also implement a weighted sampling strategy to handle class imbalance effectively. Our method achieves a state-of-the-art score of 68.10% on the ICBHI 2017 dataset, outperforming existing CNN and hybrid baselines. More importantly, it reaches a sensitivity of 68.31%, a crucial improvement for reliable clinical screening. Further analysis using t-SNE and attention maps confirms that the model learns robust, discriminative features rather than memorizing background noise.

INTRODUCTION

The introduction frames respiratory sound diagnosis as clinically important but difficult to interpret consistently, and positions AST with SAM as a response to the overfitting and sharp-minimum risks of small, noisy datasets.

INTRODUCTION

  • Respiratory auscultation is accessible and fundamental, yet subtle pathological sounds can be dampened by tissue and are subject to inter-observer variability.Distinguishing conditions such as pneumonia from heart failure may rely on breath-sound characteristics even when radiological findings are ambiguous.Source: INTRODUCTION · p. 1
  • CNNs capture local features, whereas AST uses self-attention to model global context; however, Transformers risk overfitting and sharp minima on small, noisy, imbalanced datasets.The cited concern is poor performance when inputs vary, as can occur across recording devices or patient physiology.Source: INTRODUCTION · p. 1
  • The proposed framework combines AST with SAM, which minimizes loss and loss-landscape sharpness to guide the model toward flat minima.Weighted sampling is also used to address class imbalance, and the authors report improved diagnostic performance.Source: INTRODUCTION · pp. 1–2
  • 68.10% accuracy on ICBHI 2017 is reported as a new state-of-the-art result, alongside 68% sensitivity that outperforms existing CNN and hybrid baselines.The authors also present t-SNE and confusion-matrix analysis.Source: INTRODUCTION · p. 2

RELATED WORKS

Related work traces respiratory sound classification from image-like spectrogram processing toward deep learning, including CNN and recurrent hybrids that address different feature and temporal modeling needs.

RELATED WORKS

  • Respiratory sound methods have shifted from manual feature engineering toward end-to-end deep learning, with review attention to CNN baselines, augmentation, and Transformers.Source: RELATED WORKS · p. 2

Convolutional Baselines and Hybrid Models

  • LungBRN uses bi-ResNet on wavelet components, RespireNet uses an augmented ResNet backbone, and CRNN hybrids model temporal dynamics but can be computationally complex and unstable on small datasets.CNNs are effective at local spectral feature extraction but lack long-range temporal modeling of full breath cycles.Source: Convolutional Baselines and Hybrid… · p. 2

Data Augmentation and Contrastive Learning

Prior work explores augmentation and contrastive learning for scarce respiratory data, while Transformer studies exploit global context; the paper distinguishes its approach through explicit loss-geometry optimization.

Data Augmentation and Contrastive Learning

The Transformer Era in Lung Sound Analysis

Geometry-Aware Optimization

  • SAM jointly minimizes loss and sharpness, and this work applies that geometry-aware strategy to respiratory audio rather than relying on complex fusion or extensive auxiliary data.The authors position their approach against prior Transformer methods [8].Source: Geometry-Aware Optimization · p. 3

PROPOSED METHODS

The proposed pipeline combines signal-preserving preprocessing, a transfer-learning AST backbone, and SAM; its preprocessing repeats short respiratory cycles to meet a fixed input duration.

PROPOSED METHODS

  • The proposed architecture integrates signal-preserving preprocessing, a transfer-learning AST backbone, and a SAM optimizer.Figure 1 is identified as the general architecture of the proposed model.Source: PROPOSED METHODS · p. 3, Figure 1 · p. 3

Dataset and Signal Preprocessing

  • The experiments use 920 annotated recordings from 126 subjects in the ICBHI 2017 Challenge dataset.Source: Dataset and Signal Preprocessing · p. 3
  • For an 8-second target, short respiratory signals are repeated cyclically rather than zero-padded, avoiding artificial silence and retaining signal-dense input.The stated aim is to maximize extraction of crackle and wheeze patterns without silence artifacts.Source: Dataset and Signal Preprocessing · pp. 3–4

Audio Spectrogram Transformer (AST)

The AST represents audio as log-Mel spectrogram patches and uses self-attention to capture global breathing-cycle context. SAM complements this architecture by steering training toward flatter loss regions, while AudioSet pretraining addresses the challenges of small medical datasets.

Audio Spectrogram Transformer (AST)

  • The AST converts audio to log-Mel spectrograms, divides them into 16×16 patches, and uses self-attention to capture global temporal dependencies.Attention can focus on clinically relevant events such as short crackles regardless of their position in the recording.Source: Audio Spectrogram Transformer (AST) · p. 4
  • AudioSet-pretrained AST weights provide an initialization for fine-tuning on lung sounds, addressing overfitting concerns on small medical datasets.The cited AudioSet contains over 2 million audio clips; the passage says pretraining provides an understanding of acoustic structures such as pitch and rhythm.Source: Audio Spectrogram Transformer (AST) · p. 4

Geometry-Aware Optimization (SAM)

  • The SAM motivation is that scarce, noisy respiratory data can drive standard optimizers to sharp minima, making predictions sensitive to input perturbations.The passage gives stethoscope pressure and background noise as examples of perturbations that may affect classification of pathological sounds on unseen patients.Source: Geometry-Aware Optimization (SAM) · p. 4
  • SAM-guided training seeks flatter loss regions by updating weights using the gradient at a loss-maximizing perturbed state.The perturbation radius ρ defines the neighborhood; the stated motivation is to reduce sensitivity to input perturbations and improve robustness to noisy or perturbed inputs.Source: Geometry-Aware Optimization (SAM) · p. 4
  • 68% sensitivity is reported for SAM-based training, which the authors associate with reduced false negatives and improved robustness to background artifacts.The passage describes crackle-associated friction noise as an example of an artifact the model might otherwise memorize.Source: Geometry-Aware Optimization (SAM) · p. 4

EVALUATION METRICS

The ICBHI protocol evaluates a binary Normal-versus-Abnormal task, grouping Crackle, Wheeze, and Both as Abnormal. Performance is assessed using Sensitivity, Specificity, and their average Score.

  • Under the challenge protocol, Normal is distinguished from Abnormal, which groups Crackle, Wheeze, and Both; an abnormal sample classified into any abnormal category counts as a true positive.Source: EVALUATION METRICS · p. 5
  • The stated evaluation metrics are Sensitivity (Se), Specificity (Sp), and the average Score.The supplied passage says their definitions follow but does not provide the formulas.Source: EVALUATION METRICS · p. 5

EXPERIMENTS AND RESULTS

On ICBHI 2017, the authors report that their method outperforms CNN-based RespireNet and surpasses Dong et al., with the highest sensitivity among compared methods. Experiments follow the challenge's binary evaluation protocol and use an AudioSet-initialized AST with specified training settings.

  • Experiments used a single NVIDIA Tesla L4 GPU via Google Colab with PyTorch, and random seeds were fixed.Source: EXPERIMENTS AND RESULTS · p. 5
  • The AST used AudioSet-pretrained weights and was trained for 20 epochs at learning rate 1×10^-5, batch size 8, and SAM radius ρ=0.05.Audio recordings were resampled to 16 kHz and cyclically padded to 8 seconds; experiments used AdamW with weight decay 1×10^-4.Source: EXPERIMENTS AND RESULTS · p. 5
  • Evaluation follows the ICBHI binary Normal-versus-Abnormal protocol, with Score defined as (Se+Sp)/2.Abnormal includes Crackles, Wheezes, and Both; a prediction is correct when an adventitious sound is assigned to any pathological category.Source: EXPERIMENTS AND RESULTS · p. 5
  • 68% sensitivity is the highest among the compared methods; the authors also report outperforming RespireNet and surpassing Dong et al.The text identifies Table 1 as the comparison but supplies no other table values in these passages.Source: Table 1 · p. 5, EXPERIMENTS AND RESULTS · p. 5

ABLATION STUDY

The ablation reports that adding Weighted Random Sampling (WRS) to AST boosts sensitivity, while adding SAM stabilizes training and further improves sensitivity and overall Score. The authors interpret the analysis as evidence for geometry-aware optimization on small, noisy ICBHI data.

  • AST + WRS + SAM reaches an overall Score of 67.81%, with SAM further improving sensitivity and stabilizing training.The passage describes SAM as a robust regularizer that seeks flat minima.Source: ABLATION STUDY · p. 6
  • Adding WRS to AST balances the training class distribution and significantly boosts sensitivity, though validation-loss variance increases slightly.Source: ABLATION STUDY · p. 6
  • The comparison begins with an AST-only baseline trained using standard cross-entropy loss and AdamW, which had high Specificity but low Sensitivity under class imbalance.Source: ABLATION STUDY · p. 6
  • The authors conclude geometry-aware optimization is a fundamental requirement for training large Transformers on small, noisy datasets like ICBHI.Table 2 is identified as showing metrics for the running experiments; no cell values are supplied here.Source: ABLATION STUDY · p. 6, Table 2 · p. 6

1. Baseline AST

The visual analysis reports 68% sensitivity, with fewer abnormal-to-normal false negatives than the baseline. Its t-SNE projection separates Normal and Abnormal samples while showing overlap among adventitious classes.

VISUAL ANALYSIS AND EXPLAINABILITY

  • 68% Sensitivity is reported, with false negatives minimized relative to the baseline and most misclassifications occurring among adventitious classes.Under the ICBHI protocol, errors among adventitious classes do not penalize the final score.Source: VISUAL ANALYSIS AND EXPLAINABILITY · p. 7
  • The t-SNE projection shows distinct Normal and Abnormal clusters despite noise and recording variability in the test samples.The passage attributes the separation to discriminative acoustic features robust to patient-specific variations.Source: VISUAL ANALYSIS AND EXPLAINABILITY · p. 7, Figure 3 · p. 8
  • Crackle, Wheeze, and Both overlap in the t-SNE projection, consistent with their co-occurrence and similar spectral characteristics.Source: VISUAL ANALYSIS AND EXPLAINABILITY · p. 7

DISCUSSION

The discussion reports a 68.10% state-of-the-art ICBHI 2017 score and highlights sensitivity gains associated with SAM. It frames sensitivity as a screening priority while noting a specificity limitation and possible false positives.

DISCUSSION

  • 68.10% is the reported state-of-the-art score on the ICBHI 2017 benchmark.The paper describes the result as providing insight into training Transformers on small, noisy medical datasets.Source: DISCUSSION · p. 8
  • SAM is identified as the primary driver of an ablation-study Sensitivity increase from 63% to 71%.The discussion suggests handling noise robustness through optimization constraints rather than aggressive preprocessing.Source: DISCUSSION · p. 8
  • Recent denoising or dual-branch approaches are reported to reach Sensitivity of ~40-45%, while the paper's signal-preserving strategy retains acoustic information.The authors contrast these approaches with raw Log-Mel features, cyclic padding, and an AudioSet-pretrained AST backbone.Source: DISCUSSION · p. 8
  • The discussion reports Sensitivity of 68% and Specificity of 67.89%, presenting this trade-off as desirable for clinical screening.It argues that false negatives carry greater health risks than false positives and says weighted sampling and SAM prioritize Sensitivity.Source: DISCUSSION · pp. 8–9
  • Specificity of 61% is identified as a limitation, with false positives likely arising from confusion between high-frequency noise and wheezes.The authors propose hybrid loss functions and self-supervised learning on larger unlabelled respiratory datasets as future directions.Source: DISCUSSION · p. 9

CONCLUSION

The conclusion presents an AST framework combining SAM and signal-preserving cyclic padding for respiratory sound classification. On ICBHI 2017, it reports a 68.10% score and 68% Sensitivity, and provides the source code publicly.

CONCLUSION

  • The framework combines AST, SAM, and signal-preserving cyclic padding to address overfitting and sharp-minima convergence.Source: CONCLUSION · p. 9
  • 68.10% is the reported state-of-the-art Score on ICBHI 2017, with Sensitivity of 68%.The authors say the result surpasses recent complex hybrid models and marks an improvement over existing baselines.Source: CONCLUSION · p. 9
  • The conclusion favors loss-landscape flatness and signal integrity over aggressive denoising or complex multi-modal fusion.It describes the framework as a promising direction for high-sensitivity CAD systems for real-world clinical screening.Source: CONCLUSION · p. 9
  • The source code, preprocessing pipeline, AST architecture, and SAM optimization scripts are publicly available.Source: CONCLUSION · p. 9
Loading 2512.22564v1…