Manuscript Offprint
arXiv:2610.22826PAC-KD: Pathology-Aware Compositional Knowledge Distillation for Respiratory Sound Classification
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Li Xiao, Weiping Tu , Youqiang Zheng, Dan Chen
Abstract—Respiratory sound classification distinguishes four categories: Normal, Crackle, Wheeze, and Both (crackle and wheeze). Existing knowledge distillation transfers four-class predictions without explicitly exploiting shared respiratory events, potentially limiting the transfer of event-specific knowledge across individual abnormal classes and the Both class. We propose PAC-KD, a pathology-aware compositional knowledge distillation framework that learns crackle and wheeze presence through two dedicated specialists. Their complementary knowledge is transferred to a unified four-class student, enabling it to effectively capture pathology-specific attributes while preserving class-level discrimination. Furthermore, stable conflict calibration adaptively regulates specialist guidance according to its consistency with classification supervision, mitigating potential supervision conflicts. Experiments on ICBHI and SPRSound achieve Scores of 65.28% and 89.54%, respectively, outperforming strong knowledge distillation baselines on both datasets.
Index Terms—Respiratory Sound Classification, Knowledge Distillation, Pathology-aware Learning, Compositional Learning
I. INTRODUCTION
Respiratory sounds provide valuable acoustic information for non-invasive assessment of pulmonary conditions [1]–[3]. Automated respiratory sound classification identifies adventitious events, such as crackles and wheezes, in auscultation recordings. The widely adopted ICBHI benchmark categorizes respiratory cycles as Normal, Crackle, Wheeze, or Both (crackle and wheeze) [4]. Pretrained audio models, contrastive learning, and respiratory-sound-specific approaches have substantially improved classification performance [5]–[7]. However, the shared respiratory events underlying these categories provide an additional source of knowledge that remains insufficiently exploited.
Existing studies have primarily focused on acoustic representations, data augmentation, and task-specific learning strategies [5], [8]–[10]. Knowledge distillation (KD) provides a complementary approach by transferring informative teacher predictions to a student model, with demonstrated benefits across audio architectures [11]–[13]. For respiratory sound classification, Toikkanen introduced ensemble-based KD, using multiple four-class teachers to supervise a single four-class student [14]. While effective, such class-level distillation does not explicitly emphasize the respiratory events shared across categories, potentially limiting the transfer of crackle- and wheeze-related knowledge across individual abnormal classes and the Both class.
The four categories have a clear compositional structure: Crackle and Both share crackle presence, whereas Wheeze and Both share wheeze presence. The Both class thus represents the co-occurrence of two respiratory events rather than an unrelated acoustic category. Recent studies have begun to incorporate these relationships into model learning. Lung-Mix considers respiratory semantics when mixing waveforms and labels, while PC-MCL combines event-based multi-label learning with multi-cycle concatenation and patient-matching supervision [9], [15]. These approaches highlight the value of respiratory-event structure, but exploit it through data construction or the training objectives of the target classifier. In contrast, transferring complementary event knowledge learned by independent specialists to a unified four-class student remains less explored.
Motivated by this, we propose Pathology-Aware Compositional Knowledge Distillation (PAC-KD). Two independently trained specialists learn crackle and wheeze presence across individual and co-occurring categories. Their complementary knowledge is distilled into the corresponding attribute marginals of a unified four-class student, encouraging pathology-specific attribute learning while preserving class-level discrimination. Stable conflict calibration further adjusts specialist guidance according to its consistency with classification supervision, mitigating potential conflicts during knowledge transfer. Experiments on ICBHI and SPRSound achieve mean Scores of 65.28% and 89.54%, respectively, outperforming the evaluated knowledge distillation baselines and supporting the effectiveness of compositional event-level knowledge transfer.
A. Pathology Specialist Learning
Let denote a respiratory-cycle dataset, where represents Normal, Crackle,
This work was supported by the Hubei Province Technological Innovation Major Project (No. 2022BCA041).
Li Xiao, Weiping Tu (corresponding author), Youqiang Zheng Dan Chen are with the School of Computer Science, Wuhan University, Wuhan 430072, China. (e-mail: tuweiping@whu.edu.cn)
(1) Pathology Specialist Learning
(2) Compositional Attribute Distillation
(3) Stable Conflict-Calibrated Learning

Fig. 1. Overview of PAC-KD. (1) Two pathology specialists learn crackle and wheeze presence from four-class annotations. (2) Their frozen predictions supervise the corresponding student marginals through Bernoulli divergences and . (3) Stable conflict calibration smooths gradient compatibility and maps it to a bounded distillation weight . Only the four-class student is retained at inference. Superscripts T and S denote teacher and student.
Wheeze, and Both. Each class is characterized by two binary pathology attributes:
Here, is the indicator function. The four classes therefore correspond to , , , and , respectively.
We independently train two binary specialists, and , using binary cross-entropy with the corresponding attribute targets and . The specialists employ separate networks with the same backbone architecture as the four-class teacher used for comparison. The crackle specialist treats C and B as positive examples, whereas the wheeze specialist treats W and B as positive examples. This enables each specialist to learn event-presence knowledge shared across individual and co-occurring abnormal categories.
Here, denotes the sigmoid function, is the specialist logit, and is the distillation temperature. Superscripts T and S denote teacher and student, respectively.
B. Compositional Attribute Distillation
The four-class student produces logits and the joint class distribution
whose entries follow the order . To align the student predictions with the binary specialists, we marginalize the four-class distribution into two event-presence probabilities:
Thus, and . This projection preserves the semantic role of each specialist and allows the Both class to receive simultaneous crackle and wheeze supervision.
The crackle and wheeze divergences, denoted by and in Fig. 1, are aggregated into the attribute distillation loss:
where denotes the Kullback–Leibler divergence between Bernoulli distributions and is the mini-batch at iteration t. We adopt PAFA as the student baseline and denote the baseline training objective by . PAC-KD supplements this objective with compositional specialist supervision while preserving the baseline learning formulation.
C. Stable Conflict-Calibrated Learning
Although attribute distillation complements the original classification objective, the two supervision signals may favor conflicting optimization directions. To assess their compatibility, we compare the gradients of the two objectives with respect to the student logits. , which collect the mini-batch outputs. The corresponding gradients are
The factor provides the conventional temperature compensation for distillation. Gradient compatibility is measured by
where and denote the Frobenius inner product and norm, and ensures numerical stability. Positive values indicate compatible gradient directions, whereas negative values indicate conflict.
To reduce mini-batch fluctuations, we maintain an exponential moving average:
TABLE I COMPARISON WITH EXISTING METHODS ON ICBHI AND SPRSOUND. RESULTS MARKED WITH † ARE QUOTED FROM THE CORRESPONDING PUBLICATIONS; THE MARKER APPLIES TO ALL THREE METRICS OF THE CORRESPONDING DATASET. FOR EACH METRIC, THE BEST AND SECOND-BEST RESULTS ARE SHOWN IN BOLD AND UNDERLINED TEXT, RESPECTIVELY.
| Method | Venue | (%) | ICBHI (%) | Score (%) | (%) | SPRSound (%) | Score (%) |
|---|---|---|---|---|---|---|---|
| Conventional Learning | |||||||
| Patch-Mix CL [5] | Interspeech'23 | 81.66 | 43.07 | ||||
| RepAugment [8] | EMBC'24 | 82.47 | 40.55 | ||||
| BTS [7] | Interspeech'24 | 81.40 | 45.67 | ||||
| Jeong et al. (PAFA) [16] | Interspeech'25 | 82.05 | 47.63 | ||||
| Knowledge Distillation | |||||||
| (, mean teacher) [14] | Interspeech'25 | 84.93 | 43.82 | ||||
| (, random teacher) [14] | Interspeech'25 | 82.89 | 45.90 | ||||
| Recent Methods | |||||||
| QLung (Audio-CLAP) [17] | Interspeech'26 | 81.98 | 44.81 | ||||
| BTS-CARD [18] | ICASSP'26 | 79.53 | 49.42 | ||||
| PAC-KD | - | ||||||
where controls temporal smoothing. The smoothed compatibility directly determines a bounded distillation coefficient:
where is the nominal weight, controls the correction strength, and preserves a minimum contribution from specialist knowledge. The coefficient is detached from the computational graph. The complete training objective is
When , the nominal distillation weight is retained. Otherwise, specialist guidance is attenuated within , while the class-supervised term remains unchanged. This one-sided calibration regulates conflicting guidance without eliminating specialist knowledge. At inference, only the four-class student is retained, predicting without additional inference cost.
III. RESULTS
A. Datasets and Preprocessing
We evaluate PAC-KD on the public ICBHI [4] and SPRSound [19] datasets, following their official patient-wise train–test splits. For SPRSound, Coarse Crackle and Fine Crackle are merged as Crackle; Rhonchi, Wheeze, and Stridor as Wheeze; Wheeze & Crackle as Both; and Normal remains unchanged as shown in Table II. Data preprocessing follows [5], [8].
B. Experimental Settings
Baselines. We compare PAC-KD with conventional respiratory sound classification methods, including Patch-Mix CL [5], RepAugment [8], BTS [7], and the BEATs and PAFA baselines reported by Jeong et al. [16]. For knowledge distillation, we follow Toikkanen [14] and include with five teachers using mean-teacher supervision and 15 teachers using random-teacher supervision. We additionally compare with QLung
TABLE II NUMBER OF RESPIRATORY CYCLES IN THE ICBHI AND HARMONIZED SPRSOUND SPLITS. SPRSOUND ADOPTS AN INTER-PATIENT TEST SPLIT.
| Label | ICBHI | SPRSound | ||
|---|---|---|---|---|
| Train | Test | Train | Test | |
| Normal | 2,063 | 1,579 | 5,159 | 1,040 |
| Crackle | 1,215 | 385 | 961 | 83 |
| Wheeze | 501 | 649 | 506 | 305 |
| Both | 363 | 143 | 30 | 1 |
| Total | 4,142 | 2,756 | 6,656 | 1,429 |
(Audio-CLAP) [17] and BTS-CARD [18]. Results quoted from the original publications are marked with † in Table I. Optimization. All student models use Adam, a peak learning rate of , a batch size of 32, and 100 epochs. PAC-KD and its optimization-matched controls use a five-epoch linear learning-rate warmup. We set , . The conflict parameters are , , and . Teacher logits are cached, and no teacher is executed during student inference. Each experiment is repeated with five fixed random seeds. We report mean and standard deviation.
Metrics. Following [5], [8], we report Specificity (), Sensitivity (), and their mean Score:
where and denote the correctly classified and total cycles of class .
IV. RESULTS AND ANALYSIS
A. Main Results
Table I compares PAC-KD with existing methods on ICBHI and SPRSound. On ICBHI, PAC-KD achieves the highest mean Score of 65.28% among the compared methods, exceeding PAFA and the strongest four-class distillation baseline,
TABLE III ABLATION OF TEACHER KNOWLEDGE AND STABLE CONFLICT CALIBRATION (SCC) ON ICBHI. ALL ROWS USE THE SAME STUDENT BACKBONE AND EVALUATION PROTOCOL. SCC INDICATES CONFLICT-CALIBRATED DISTILLATION.
| Method | (%) | (%) | Score (%) |
|---|---|---|---|
| Student | 82.05 | 47.63 | |
| Student (Attribute Head) | |||
| Four-class KD | |||
| Four-class KD + SCC | |||
| Dual-specialist KD | |||
| PAC-KD |
(), by 0.44 and 0.89 percentage points, respectively. Compared with this distillation baseline, sensitivity increases from to , while specificity decreases from to . This sensitivity-specificity trade-off indicates that the improvement mainly stems from better abnormal-cycle recognition rather than a uniform gain across all classes.
On SPRSound, PAC-KD achieves the highest mean Score of , surpassing () by 0.24 percentage points. It again yields the highest sensitivity, improving from to , while decreases from to . The consistent sensitivity improvements across both datasets suggest that PAC-KD favors abnormal-event recognition, while the accompanying specificity reductions reveal a similar performance trade-off.
B. Ablation Study
Composition of PAC-KD. Table III investigates the contributions of specialist knowledge and stable conflict calibration. Compared with the reported student baseline, direct attribute supervision increases from to , but reduces the overall Score to . Conventional four-class KD obtains a Score of , which increases to when SCC is applied. In contrast, replacing the single four-class teacher with two independently trained pathology specialists improves from to and raises the Score from to . This result supports the effectiveness of transferring complementary crackle and wheeze knowledge through compositional attribute distillation. Incorporating SCC further improves from to , while changes from to , yielding the highest Score of . These results suggest that pathology-specific supervision primarily enhances abnormal-event recognition, whereas SCC provides a more balanced integration of classification and distillation supervision.
Different Backbone. Table IV evaluates PAC-KD across different student configurations. Compared with CE training, PAC-KD improves the mean Score by 0.40, 0.37, and 0.44 percentage points for CNN6, AST, and PAFA, respectively. Sensitivity increases by 7.17, 2.75, and 3.58 percentage points, accompanied by lower specificity. These consistent gains suggest that the benefit of specialist supervision extends beyond the default PAFA student, with improved abnormal-class recognition contributing to higher overall Scores.

Fig. 2. Class-wise attribute errors of a four-class teacher and two pathology-specific specialists in the shared crackle–wheeze attribute space. Lower is better.
TABLE IV PERFORMANCE OF PAC-KD WITH DIFFERENT STUDENT BACKBONES ON ICBHI.
| Backbone | Method | Score (%) | ||
|---|---|---|---|---|
| CNN6 | CE | 83.05 | 31.88 | |
| PAC-KD | ||||
| AST | CE | 79.18 | 42.68 | |
| PAC-KD | ||||
| PAFA | CE | 82.05 | 47.63 | |
| PAC-KD |
C. Teacher Knowledge Analysis.
To investigate the sensitivity improvements, Fig. 2 compares the four-class teacher and pathology specialists in the shared crackle–wheeze attribute space. Compared with the four-class teacher, the specialists reduce attribute errors for Crackle and Wheeze from 0.186 to 0.103 and from 0.339 to 0.236, respectively. Notably, the error for Both is halved from 0.440 to 0.220, indicating more accurate attribute predictions for co-occurring events. In contrast, the Normal error increases from 0.124 to 0.218. These teacher-level results help explain the student performance in Table I. Lower attribute errors for the three abnormal categories are consistent with the higher sensitivity of PAC-KD, whereas the increased Normal error corresponds to its lower specificity. This agreement suggests that transferring complementary event-specific knowledge contributes to improved abnormal-event recognition.
V. CONCLUSION
We proposed PAC-KD, a pathology-aware compositional knowledge distillation framework for respiratory sound classification. PAC-KD transfers complementary crackle and wheeze knowledge from dedicated specialists, explicitly exploiting shared respiratory events across individual and combined-event categories. Stable conflict calibration regulates specialist guidance while preserving the original classification supervision. Experiments on ICBHI and SPRSound demonstrate improvements over strong knowledge distillation baselines, supporting the effectiveness of compositional knowledge transfer without increasing student inference cost.
REFERENCES
[1] A. Gurung, C. G. Scrafford, J. M. Tielsch, O. S. Levine, and W. Checkley, “Computerized lung sound analysis as diagnostic aid for the detection of abnormal lung sounds: a systematic review and meta-analysis,” Respiratory medicine, vol. 105, no. 9, pp. 1396–1403, 2011.
[2] J. Heitmann, A. Glangetas, J. Doenz, J. Dervaux, D. M. Shama, D. H. Garcia, M. R. Benissa, A. Cantais, A. Perez, D. Müller et al., "Deepbreath—automated detection of respiratory pathology from lung auscultation in 572 pediatric outpatients across 5 countries," NPJ digital medicine, vol. 6, no. 1, p. 104, 2023.
[3] A. Pal, U. Satija, J. Mathew, H. Hugeng, and C. W. Chiong, “A curvature-controlled contextual–perceptual feature fusion framework for ild detection from respiratory sounds,” IEEE Signal Processing Letters, 2026.
[4] B. Rocha, D. Filos, L. Mendes, I. Vogiatzis, E. Perantoni, E. Kaimakamis, P. Natsiavas, A. Oliveira, C. Jácome, A. Marques et al., “A respiratory sound database for the development of automated classification,” in Precision Medicine Powered by pHealth and Connected Health: ICBHI 2017, Thessaloniki, Greece, 18-21 November 2017. Springer, 2018, pp. 33–37.
[5] S. Bae, J.-W. Kim, W.-Y. Cho, H. Baek, S. Son, B. Lee, C. Ha, K. Tae, S. Kim, and S.-Y. Yun, “Patch-Mix Contrastive Learning with Audio Spectrogram Transformer on Respiratory Sound Classification,” in Proc. INTERSPEECH 2023, 2023, pp. 5436–5440.
[6] S. Chen, Y. Wu, C. Wang, S. Liu, D. Tompkins, Z. Chen, W. Che, X. Yu, and F. Wei, “Beats: Audio pre-training with acoustic tokenizers,” in International Conference on Machine Learning. PMLR, 2023, pp. 5178–5193.
[7] J.-W. Kim, M. Toikkanen, Y. Choi, S.-E. Moon, and H.-Y. Jung, “BTS: Bridging Text and Sound Modalities for Metadata-Aided Respiratory Sound Classification,” in Interspeech 2024, 2024, pp. 1690–1694.
[8] J.-W. Kim, M. Toikkanen, S. Bae, M. Kim, and H.-Y. Jung, “Repaugment: Input-agnostic representation-level augmentation for respiratory sound classification,” in 2024 46th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC). IEEE, 2024, pp. 1–6.
[9] S. Ge, W. Zhang, S. Xie, B. Yan, and Z. Wang, “Lungmix: A mixup-based strategy for generalization in respiratory sound classification,” in ICASSP 2025-2025 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2025, pp. 1–5.
[10] H. Shridhar, M. Toikkanen, and J.-W. Kim, “Lung-SRAD: Spectral-Aware Regularized Audio DASS with Dual-Axis Patch-Mix Contrastive Learning for Respiratory Sound Classification,” in Interspeech 2026, 2026, pp. 1534–1538.
[11] D. Kim, G. Kim, B. Lee, and H. Ko, “Prototypical knowledge distillation for noise robust keyword spotting,” IEEE Signal Processing Letters, vol. 29, pp. 2298–2302, 2022.
[12] F. Schmid, K. Koutini, and G. Widmer, “Efficient large-scale audio tagging via transformer-to-cnn knowledge distillation,” in ICASSP 2023-2023 IEEE international Conference on acoustics, Speech and signal processing (ICASSP). IEEE, 2023, pp. 1–5.
[13] Y. Gong, S. Khurana, A. Rouditchenko, and J. Glass, “Cmkd: Cnn/transformer-based cross-model knowledge distillation for audio classification,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 2025.
[14] M. Toikkanen and J.-W. Kim, “Improving Respiratory Sound Classification with Architecture-Agnostic Knowledge Distillation from Ensembles,” in Interspeech 2025, 2025, pp. 1023–1027.
[15] S. G. Jeong and S.-E. Kim, “Pc-mcl: Patient-consistent multi-cycle learning with multi-label bias correction for respiratory sound classification,” in ICASSP 2026-2026 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2026, pp. 7251–7255.
[16] S. G. Jeong and S. E. Kim, “Patient-Aware Feature Alignment for Robust Lung Sound Classification: Cohesion-Separation and Global Alignment Losses,” in Interspeech 2025, 2025, pp. 1018–1022.
[17] Y. T. Kim, H. Koo, M. Toikkanen, and J.-W. Kim, “Quality Adaptive Angular Margin Learning for Respiratory Sound Classification,” in Interspeech 2026, 2026, pp. 3924–3928.
[18] H. Koo, M. Toikkanen, Y. T. Kim, S. Y. Kim, and J.-W. Kim, “Empowering multimodal respiratory sound classification with counterfactual adversarial debiasing for out-of-distribution robustness,” in ICASSP 2026-2026 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2026, pp. 14967–14971.
[19] Q. Zhang, J. Zhang, J. Yuan, H. Huang, Y. Zhang, B. Zhang, G. Lv, S. Lin, N. Wang, X. Liu et al., “Spsound: Open-source sjtu paediatric
respiratory sound database," IEEE Transactions on Biomedical Circuits and Systems, vol. 16, no. 5, pp. 867–881, 2022.