Source-linked AI summary

COVID-19 Cough Classification using Machine Learning and Global Smartphone Recordings

Madhurananda Pahar, Marisa Klopper, Robin Warren, Thomas Niesler

arXiv:2012.01926v2cs.SDcs.LGeess.AS

TL;DR

The paper asks whether smartphone-recorded coughs can support non-contact COVID-19 screening amid testing pressure and limited data. It preprocesses and featurises two geographically diverse, imbalanced datasets, then evaluates seven machine-learning classifiers. Resnet50 performed best for distinguishing COVID-19 positive from healthy coughs, while LSTM with 13 selected features performed best for distinguishing COVID-19 positive from negative coughs.

  • Problem

    Testing demand and limited public COVID-19 cough data motivate evaluating smartphone cough audio as a non-contact screening signal.

  • Method

    The study preprocesses smartphone cough recordings, extracts acoustic features, balances classes with SMOTE, and evaluates seven classifiers using cross-validation and independent validation.

  • Results

    Resnet50 achieved an AUC of 0.976 on Coswara, while LSTM achieved an AUC of 0.938 on Sarcos after selecting the best 13 features with SFS.

  • Takeaways & Limitations

    Smartphone cough classification is indicated as a potentially viable, cost-efficient, remotely deployable means of non-contact COVID-19 screening.

  • Takeaways & Limitations

    The systems require more stringent validation on a larger dataset.

Abstract

from arXiv · show

We present a machine learning based COVID-19 cough classifier which can discriminate COVID-19 positive coughs from both COVID-19 negative and healthy coughs recorded on a smartphone. This type of screening is non-contact, easy to apply, and can reduce the workload in testing centres as well as limit transmission by recommending early self-isolation to those who have a cough suggestive of COVID-19. The datasets used in this study include subjects from all six continents and contain both forced and natural coughs, indicating that the approach is widely applicable. The publicly available Coswara dataset contains 92 COVID-19 positive and 1079 healthy subjects, while the second smaller dataset was collected mostly in South Africa and contains 18 COVID-19 positive and 26 COVID-19 negative subjects who have undergone a SARS-CoV laboratory test. Both datasets indicate that COVID-19 positive coughs are 15\%-20\% shorter than non-COVID coughs. Dataset skew was addressed by applying the synthetic minority oversampling technique (SMOTE). A leave-$p$-out cross-validation scheme was used to train and evaluate seven machine learning classifiers: LR, KNN, SVM, MLP, CNN, LSTM and Resnet50. Our results show that although all classifiers were able to identify COVID-19 coughs, the best performance was exhibited by the Resnet50 classifier, which was best able to discriminate between the COVID-19 positive and the healthy coughs with an area under the ROC curve (AUC) of 0.98. An LSTM classifier was best able to discriminate between the COVID-19 positive and COVID-19 negative coughs, with an AUC of 0.94 after selecting the best 13 features from a sequential forward selection (SFS). Since this type of cough audio classification is cost-effective and easy to deploy, it is potentially a useful and viable means of non-contact COVID-19 screening.

1 INTRODUCTION

COVID-19 cough analysis is motivated by the burden of pandemic testing and the possibility that cough acoustics can support machine-learning screening. This study evaluates smartphone-recorded cough classification across geographically diverse datasets and multiple classifiers.

  • Testing demand during the pandemic created pressure on health systems, motivating alternative approaches to COVID-19 screening.
  • Cough acoustics vary across respiratory diseases, supporting the use of cough sounds to distinguish COVID-19 from other conditions.
  • Machine-learning systems have classified respiratory sounds and coughs for COVID-19, with prior studies reporting AUCs above 0.80 and varying performance across datasets.
  • COVID-19 cough classification remains constrained by difficult data collection and limited public availability of suitable datasets.
  • The study addresses imbalanced datasets with SMOTE and evaluates seven classifiers using cross-validation, including LR, KNN, SVM, MLP, CNN, LSTM and Resnet50.
  • AUC 0.976 was achieved by Resnet50 on Coswara, while AUC 0.938 was achieved by LSTM on Sarcos using the best 13 SFS-selected features.

2 DATA

The study uses two smartphone cough datasets, preprocesses recordings by normalising amplitudes and removing silence, and addresses class imbalance before classification. The datasets differ substantially in size and geographic composition, while COVID-19 positive coughs are reported as shorter than non-COVID coughs.

  • Datasets: Sarcos participants were recruited through an online cough-recording initiative and had recently undergone SARS-CoV laboratory testing.
  • Datasets: Together, the datasets include participants from all six continents, with Sarcos contributing African participants absent from Coswara.
  • Data Pre-processing: Preprocessing normalises raw cough amplitudes and removes extended silence using a manually selected energy-detection threshold and a 50 ms margin.
  • Datasets: The Coswara dataset contains 92 COVID-19 positive and 1079 healthy subjects, whereas Sarcos contains 18 COVID-19 positive and 26 COVID-19 negative subjects.
  • Data Pre-processing: COVID-19 positive coughs are 15%-20% shorter than non-COVID coughs in both datasets.
  • Class balancing: SMOTE balances the underrepresented COVID-19 positive class by generating synthetic training examples, and unmodified SMOTE produced the best results among tested variants.

3 FEATURE EXTRACTION

The paper extracts acoustic and temporal features from segmented cough recordings while preserving each cough’s full time span in a fixed-size matrix. The representation combines MFCC-based features with energy and signal-shape measures for classifier input.

  • For M MFCCs and S segments, the resulting feature matrix has dimensions (3M + 3, S).The three M-sized feature groups are MFCCs, velocity and acceleration, alongside three additional feature types.
  • MFCCs, their velocity and acceleration, log frame energies, zero-crossing rate and kurtosis are extracted from cough recordings.MFCC velocity and acceleration represent first- and second-order differences; ZCR measures signal sign changes, while kurtosis captures high-amplitude prevalence.
  • The extraction distributes fixed-length analysis frames across the cough interval, preserving its beginning and end while maintaining fixed input dimensionality.This allows time-domain patterns to be discovered while producing inputs suitable for classifiers such as CNNs.
  • The Coswara and Sarcos datasets contain 1.05 hours and 2.45 minutes of pre-processed cough audio, respectively.Coswara includes 1171 subjects, while Sarcos includes 44 subjects.

4 CLASSIFIER ARCHITECTURES

The study evaluates seven classifiers spanning linear, instance-based, kernel, feed-forward, convolutional, recurrent and residual architectures. CNN and LSTM designs use shared dense and softmax output stages, while Resnet50 supplies a deep residual alternative.

  • Seven classifiers are trained and evaluated: LR, KNN, SVM, MLP, CNN, LSTM and Resnet50.The linear regression model serves primarily as a baseline for comparing more complex classifiers.
  • The CNN uses convolutional layers, ReLU activations, dropout, max-pooling, dense layers and a two-dimensional softmax output.Softmax output 1 represents COVID-19 positive, while output 0 represents healthy or COVID-19 negative.
  • The classifier hyperparameters for the architectures are optimised during the study’s cross-validation process.The CNN and LSTM architectural settings are listed in the corresponding classifier descriptions and hyperparameter table.
  • The LSTM uses recurrent units followed by two dense layers and the same two-class softmax arrangement.Its recurrent architecture can use previously seen inputs when making a classification decision.
  • Resnet50 is a 50-layer residual network containing skip layers and is used with its default structure because of extreme computational load.The architecture has also been applied to COVID-19 detection from CT images, coughs, breath and speech.

5 CLASSIFICATION PROCESS

The classification process uses nested leave-p-out cross-validation to tune hyperparameters and evaluate subject-separated test sets. Performance is assessed with ROC-based measures, while per-cough and per-frame COVID-19 scores are selected as tunable decision inputs.

  • Nested leave-p-out cross-validation separates training, development and independent test subjects while optimising hyperparameters.For Coswara, N = 1171, with a 4:1 train-to-test split yielding J = 234 test subjects and K = 187 development subjects.
  • The outer loop reserves J subjects for testing, while the inner loop evaluates K-subject development partitions to select optimal hyperparameters.The selected settings are then used to train the final system.
  • ROC curves are calculated within the inner and outer loops, and AUC summarizes classifier performance across decision thresholds.The equal-error-rate threshold minimises the difference between the classifier’s true-positive and false-positive rates.
  • The COVID-19 index can be computed as either a per-cough average probability or a per-frame average probability.N1 counts coughs in a subject recording, whereas N2 counts total cough frames; for Coswara, N1 = 1.
  • The scoring function is treated as an additional hyperparameter because different classifier architectures can perform better with different COVID-19 index scores.Specificity, sensitivity, accuracy and AUC are calculated from predicted and actual values for evaluation.

6 RESULTS

Across the Coswara and Sarcos evaluations, classifier performance varied by architecture and feature selection. Resnet50 performed best on Coswara, while LSTM performance on Sarcos improved substantially after selecting 13 features.

  • Coswara dataset: 0.976 AUC was achieved by Resnet50 on Coswara, with 95.3% accuracy, 93% sensitivity, and 98% specificity.The classifier used a 120-dimensional feature matrix and grouped coughs into 50 segments.
  • Coswara dataset: Resnet50 achieved the highest Coswara AUC of 0.98, while logistic regression achieved the lowest at 0.74.
  • Coswara dataset: LSTM, CNN, and Resnet50 generally outperformed the other architectures across most ROC operating points, with Resnet50 usually exceeding CNN and LSTM.A small region where CNN outperformed Resnet50 requires verification with a larger dataset.
  • Coswara dataset: Using more MFCCs consistently improved performance, suggesting classifiers exploited information beyond what human listeners generally perceive.
  • Sarcos dataset: 0.779 AUC was the best Sarcos result before feature selection, achieved by the LSTM trained on Coswara and evaluated on Sarcos.Performance deteriorated relative to the better-matched Coswara evaluation, and no further hyperparameter optimization was performed.
  • Feature Selection: 0.938 AUC was achieved by LSTM on Sarcos after sequential forward selection reduced the candidate set from 42 features to the best 13.The selected features included MFCCs with velocity and acceleration, log frame energy, zero-crossing rate, and kurtosis.

7 CONCLUSION AND FUTURE WORK

The study developed smartphone-based COVID-19 cough classifiers using two geographically broad datasets and seven machine learning architectures. Resnet50 best discriminated COVID-19 from healthy coughs, while the authors describe the approach as promising but requiring larger-scale validation.

  • The study trained and evaluated seven classifiers on Coswara and Sarcos smartphone cough recordings covering subjects from all six continents.Coswara included 92 COVID-19-positive and 1079 healthy subjects; Sarcos included 18 positive and 26 negative subjects.
  • COVID-19-positive coughs were 15%-20% shorter than non-COVID coughs, motivating feature extraction designed to preserve time-domain patterns.
  • Resnet50 discriminated COVID-19 coughs from healthy coughs with an AUC of 0.98 on Coswara.
  • The authors consider smartphone cough classification a potentially viable, cost-efficient, remotely deployable means of COVID-19 screening.They state that remote use could avoid contact with medical personnel.
  • The systems require more stringent validation on a larger dataset before their screening viability is established more firmly.Ongoing work includes enlarging the dataset and considering implementation on consumer smartphones.
Loading 2012.01926v2…