$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
Proposed Methodology
This study proposes a generative AI–based framework for detecting COVID-19 from cough signals. The framework integrates generative models with discriminative classifiers, with training and evaluation data kept strictly separate. Figure 1 illustrates the detailed architecture of the proposed GAN–VAE–ADCNN framework, showing the flow from audio preprocessing and feature extraction through latent representation learning via a Variational Autoencoder (VAE), synthetic feature generation using a Generative Adversarial Network (GAN), and final classification using Deep Convolutional Neural Networks (DCNN) and Attention-based DCNN (ADCNN). The figure shows that generative components are used only during training, while classification is performed using discriminative models.

Figure 1: GAN–VAE–ADCNN architecture overview. Schematic of the proposed hybrid pipeline, where cough-derived acoustic features are encoded using a VAE, augmented through GAN-based synthetic sample generation, and classified using DCNN and attention-based DCNN (ADCNN) models. Please click here to view a larger version of this figure.
Model Architecture and Implementation
The generative and discriminative models used in this framework were implemented with fixed and reproducible architectures. The GAN consists of a generator with three fully connected layers (128, 256, and 512 units) using ReLU activation, and a discriminator with three fully connected layers (512, 256, and 128 units) using LeakyReLU activation followed by a sigmoid output.
The VAE encoder comprises two fully connected layers with 256 and 128 units, followed by latent mean and variance estimation with a latent dimensionality of 64. The decoder mirrors this structure and is trained using a combination of reconstruction loss and Kullback–Leibler divergence to learn a structured and probabilistic latent space.
The DCNN classifier includes four convolutional blocks with 3x3 kernels and 32, 64, 128, and 256 filters, respectively. Each block is followed by batch normalization, a ReLU activation, and 2x2 max pooling. The ADCNN extends the DCNN by incorporating a channel-wise attention mechanism after the final convolutional block. All models were optimized using the Adam optimizer with a learning rate of 0.0001 and a batch size of 32. As shown in Figure 1, the VAE and GAN operate only during training, while DCNN and ADCNN are used for classification. The complete training and evaluation procedure is summarized in Algorithm 1.
Algorithm 1: GAN–VAE-Based COVID-19 Detection Framework
Input: Pre-processed cough audio recordings
Output: Binary classification label (COVID-19 positive/negative)
The training and evaluation procedures followed a fixed, reproducible pipeline. All cough audio recordings were resampled to 16 kHz, subjected to noise reduction, and amplitude normalized. The recordings were segmented into fixed-length segments, from which MFCC, chroma, and spectral features were extracted. A total of 40 Mel-Frequency Cepstral Coefficients (MFCCs) were extracted from each audio segment. In addition, 12 chroma features were computed. The resulting representation forms a 52-dimensional feature vector for each cough segment. Subject-level splitting was performed to divide the data into training, validation, and test sets. The VAE was trained to learn probabilistic latent representations, and the resulting latent vectors were used to train the GAN for synthetic feature generation. The training dataset was augmented using GAN–VAE–generated samples, while synthetic data were excluded from validation and testing. DCNN and ADCNN classifiers were trained on the augmented training data, and final evaluation was conducted on the held-out test set using standard performance metrics.
Training Setup, Data Splitting, and Leakage Prevention
All experiments were conducted with a fixed, reproducible training configuration. Data splitting was performed at the subject level before audio segmentation to prevent data leakage. The dataset was divided into training, validation, and test sets at an 80:10:10 ratio, ensuring that all segments from the same recording were assigned to a single subset. The training set was used for model learning and generative data augmentation, the validation set for hyperparameter tuning and early stopping, and the test set was held out for final performance evaluation. Synthetic samples generated by the GAN–VAE framework were used exclusively during training and were strictly excluded from validation and testing to ensure fair evaluation.
Models were trained for a maximum of 100 epochs, with early stopping based on validation loss and a patience of 10 epochs. Optimization was performed using the Adam optimizer with a learning rate of 0.0001 and a batch size of 32. Binary cross-entropy loss was applied for classification, while reconstruction and adversarial losses were used for training the VAE and GAN components, respectively. This unified training and evaluation protocol ensures reproducibility, prevents data leakage, and maintains strict separation between training and evaluation stages.
Dataset Description
Two publicly available cough audio datasets—COUGHVID and Virufy—were used to balance large-scale acoustic diversity with clinically referenced labels, with clearly separated roles in training and evaluation.
COUGHVID is a crowdsourced collection of cough recordings with partial expert annotation and self-reported metadata. To ensure data quality, 428 recordings were selected after applying predefined quality-control criteria, including minimum signal duration, adequate signal-to-noise ratio, removal of corrupted or ambiguous samples, and the presence of identifiable cough events with symptom metadata. After preprocessing and segmentation, these recordings yielded 1,719 cough segments, standardized to WAV format at a 16 kHz sampling rate. COUGHVID was used for training both the generative models and discriminative classifiers.
Virufy consists of physician-supervised cough recordings labeled as RT-PCR positive or negative for COVID-19. All 16 available recordings were included, resulting in 234 cough segments after segmentation, also standardized to 16 kHz. Virufy was used exclusively for external cross-dataset evaluation to assess generalization performance and was not used for training, fine-tuning, or generative augmentation.
The proposed framework should therefore be interpreted as a proof-of-concept screening approach evaluated under controlled experimental conditions rather than as a clinically validated diagnostic system.
Data Preprocessing and Segmentation
All recordings were resampled to 16 kHz, converted to mono, and subjected to silence removal, spectral noise reduction, and amplitude normalization. Segmentation was performed after subject-level splitting to prevent data leakage. Each recording was divided into overlapping 2–4 s segments, and low-energy or silent segments were discarded.
External Validation Protocol
External validation was conducted through cross-dataset evaluation. Models trained on COUGHVID were evaluated on Virufy for external validation. This protocol assesses generalization across datasets collected under different conditions rather than prospective clinical validation. Figure 2 provides a protocol-level overview of this workflow, illustrating dataset usage, preprocessing, feature extraction, classifier training, and evaluation scenarios. While Figure 1 focuses on the internal model architecture, Figure 2 emphasizes experimental design and data flow across training and testing stages.

Figure 2: Workflow of the proposed COVID-19 cough screening framework. Illustration of the complete processing pipeline, including preprocessing, feature extraction (MFCC, chroma, spectral features), GAN–VAE-based representation learning and augmentation (training only), and final classification under subject-level splitting and cross-dataset evaluation. Please click here to view a larger version of this figure.