Cough sound spectro-temporal analysis and automated detection using Vision Transformers
Bibliographic record
Abstract
Objective: Cough is a key symptom in respiratory diseases, yet its clinical assessment remains challenging, often relying on subjective questionnaires or inefficient manual cough counting. Existing automated cough detection algorithms have limited generalisability due to a lack of validation on large, diverse datasets. This study aimed to develop and evaluate a fully automated cough detection system using spectro-temporal analysis and a Vision Transformer (ViT) model. Methods: A total of 231 annotated 24-hour cough recordings across 9 diagnostic categories from the RaDAR database were analysed. Recordings were segmented and converted into spectrograms using different short-time Fourier transform settings. Data were split subject-wise into training, validation, and test sets to prevent data leakage. The ViT model was fine-tuned in two stages: a pilot stage using 10% of the data to determine optimal spectrogram parameters, followed by full-scale training on the remaining data. Results: Spectrogram configuration significantly affected performance, with 750 ms segment duration, 128-point frame size, and 32-point hop identified as optimal. With these parameters, the model achieved an F1 score of 85.02%, sensitivity of 83.64%, precision of 86.44%, and specificity of 99.67% on the test set. Diagnostic category-wise analysis showed high F1 scores in interstitial lung disease (90.83%), chronic obstructive pulmonary disease (89.60%), asthma (88.13%) and chronic cough (85.32%). Conclusions: Vision Transformers with optimised spectrogram preprocessing enable accurate, scalable cough detection across diverse populations, performing comparably to popular convolutional neural networks on a larger, more diverse, and more challenging dataset. These findings support the use of ViT-based systems for objective, automated cough monitoring in clinical practice.
Fetched live from OpenAlex and de-inverted. Abstracts are not stored in this database: the inverted indexes are 8.6 GB of the frame’s 9.3 GB of text, and the host has 13 GB free.
How this classification was reachedexpand
Full frame distilled prediction
Teacher imitationNot calibrated prevalence, not ground truth. Human validation pending. Learned from the 10,348 direct Codex labels and 10,348 direct Gemma labels. Candidate is the union of thresholded teacher heads; consensus is their intersection. These outputs are machine_predicted_unvalidated and are not human labels or direct frontier model labels.
Codex and Gemma teacher scores by category
| Category | Codex | Gemma |
|---|---|---|
| Metaresearch | 0.000 | 0.000 |
| Meta-epidemiology (narrow) | 0.000 | 0.000 |
| Meta-epidemiology (broad) | 0.000 | 0.000 |
| Bibliometrics | 0.000 | 0.001 |
| Science and technology studies | 0.000 | 0.000 |
| Scholarly communication | 0.000 | 0.000 |
| Open science | 0.000 | 0.000 |
| Research integrity | 0.000 | 0.000 |
| Insufficient payload (model declined to judge) | 0.000 | 0.000 |
Machine scores (provisional)
The two teacher heads of the student model, read on this work. A score orders the frame for review; it never asserts a category, and the validation status ships verbatim with every row.
Baseline scores from an immature model (maturity gate not passed, 7 training rounds). Scores rank; they never assert a category.
score_only:v0-immature-baseline · verbatim from the scoring run: score_only means the number may rank works, and no category label ships from itClassification
machine, unvalidatedMachine predicted; a candidate call from one teacher head, not a consensus.
How this classification was reached, model by model and score by score, is at the end of the page under "How this classification was reached".