Biomedical Engineering Advances Biomedical Engineering
Spectrogram-Based Detection of Lung Cancer and Asthma Using a Subject-Independent Hybrid CNN-LSTM Framework with Grad-CAM Frequency Attribution: A Comparative Study Including Audio Spectrogram Transformer
Abstract
Early, non-invasive detection of pulmonary diseases is a critical unmet need in global healthcare. This paper presents a subject-independent hybrid Convolutional Neural Network – Long Short-Term Memory (CNN-LSTM) framework for three-class respiratory disease classification (lung cancer, asthma, and normal) using Mel-spectrograms and Mel-Frequency Cepstral Coefficients (MFCCs). A key novelty is the integration of a Grad-CAM frequency attribution module providing clinically interpretable, quantitative explanations via sequential band-masking experiments. Critically, this work is the first to include a subject-independent comparative evaluation against the Audio Spectrogram Transformer (AST) for lung cancer and asthma classification on the combined ICBHI 2017 and Pahar et al. lung cancer cough corpus — directly addressing the methodological limitation of prior respiratory sound classification studies that compared only CNN-RNN architectures without transformer baselines.,Experiments are conducted on two clinically validated datasets: the ICBHI 2017 Respiratory Sound Database [1] and the lung cancer cough dataset of Pahar et al. [2], combined to form a 126-subject corpus. All train/validation/test splits are applied at the subject level (70/15/15), ensuring strict independence and eliminating data leakage. The hybrid CNN-LSTM achieves accuracy of 94.2% (±1.1%), macro F1-score of 93.0%, and macro-average AUC of 0.978 under five-fold subject-independent cross-validation — outperforming standalone CNN (91.2%), LSTM (87.9%), and the AST baseline (88.6%) under identical evaluation conditions. Cohen’s d effect sizes for all pairwise comparisons exceed 0.80, confirming large and practically meaningful performance differences. Grad-CAM band-masking reveals that the 500–2500 Hz mid-frequency band contributes most to lung cancer classification (ΔAcc = 19.4 pp upon masking).