Augmenting Physiological Time Series Data: A Case Study for Sleep Apnea Detection

Konstantinos Nikolaidis, Stein Kristiansen, Vera Goebel, Thomas Plagemann, Knut Liestøl, Mohan S. Kankanhalli · DOI

Abstract

Machine learning applications in healthcare are frequently hindered by the scarcity of high-quality, labeled datasets. This paper explores the use of recurrent Generative Adversarial Networks (GANs) to synthesize realistic physiological time-series data, specifically focusing on nasal airflow (NAF) signals for sleep apnea detection. By employing a conditional GAN architecture and a novel evaluation metric, the authors demonstrate that synthetic data can effectively augment training sets, rebalance skewed classes, and facilitate indirect model personalization. Experimental results across multiple classifiers show consistent improvements in diagnostic performance, suggesting that GAN-based augmentation is a robust solution for overcoming data bottlenecks in medical informatics.

Introduction

In the healthcare domain, the development of robust machine learning models is often constrained by the "data desert" problem. Collecting physiological data is not only expensive and time-consuming but also requires expert medical annotation. Furthermore, privacy regulations and the inherent imbalance of medical conditions—where healthy states far outnumber pathological events—create significant hurdles for training generalized models.

Sleep apnea detection serves as a primary example of these challenges. A typical patient record consists mostly of normal breathing, with relatively rare apneic events. Moreover, respiratory patterns are highly individualized, making it difficult for a model trained on a general population to perform accurately for a specific new patient. This study addresses these three critical pillars—data scarcity, class imbalance, and patient personalization—through the lens of synthetic data generation.

Methodology

Conditional Recurrent GANs

To capture the temporal dependencies inherent in breathing patterns, the authors utilize a recurrent GAN architecture. Both the Generator and the Discriminator are built using Long Short-Term Memory (LSTM) networks. The model is "conditional," allowing for the targeted generation of specific classes (e.g., "apneic" vs. "non-apneic" sequences) by feeding class labels into the network during the training process.

Multi-GAN Architecture for Personalization

To address inter-patient variability and prevent mode collapse—a common GAN failure where the model produces limited varieties of samples—the authors introduce a multi-GAN ensemble. In this framework, multiple GANs are trained on disjoint subsets of patient data. By adjusting the training probabilities for these subsets, the ensemble learns a broader mixture of physiological distributions, which can later be leveraged for personalization.

The T-Metric: A Novel Evaluation Framework

Evaluating the quality of synthetic time-series data is notoriously difficult. The authors propose the "T-metric," which combines Maximum Mean Discrepancy (MMD) with the harmonic mean of two specific tests:

  1. TSTR (Train on Synthetic, Test on Real): Measures how well a model trained on synthetic data generalizes to actual patient data.
  2. TRTS (Train on Real, Test on Synthetic): Measures how well the synthetic data reflects the distribution of the real training set.

By using the harmonic mean, the T-metric heavily penalizes models that suffer from mode collapse, ensuring that the generated data is both realistic and diverse.

Experimental Setup

The approach was validated using the Nasal Airflow (NAF) signals from two Physionet databases, downsampled to 1Hz:

  • Apnea-ECG Database: Contains 8 high-quality, long-duration sleep recordings.
  • MIT-BIH Database: Contains 12 recordings characterized by higher noise levels and lower signal quality.

The synthetic data was tested against four standard machine learning classifiers: Multi-Layer Perceptron (MLP), Random Forest (RF), K-Nearest Neighbour (KNN), and Support Vector Machine (SVM).

Key Results and Discussion

1. General Data Augmentation

In the first experiment, the authors augmented standard training sets with synthetic samples. This led to a statistically significant increase in the Kappa statistic across all tested classifiers. The improvements ranged from $0.72 \times 10^{-2}$ to $18.2 \times 10^{-2}$, proving that synthetic data provides meaningful information that helps classifiers generalize better than when using real data alone.

2. Class Rebalancing

Medical datasets are often naturally skewed toward healthy samples. When the Apnea-ECG dataset was artificially skewed to a 72.2% normal / 27.8% apneic split, the SVM classifier's performance was suboptimal. However, by using the GAN to generate only the minority (apneic) class to achieve a 50/50 balance, the Kappa statistic for the SVM jumped from $74.6 \times 10^{-2}$ to $92.88 \times 10^{-2}$. This suggests that GANs are a powerful tool for improving model sensitivity in diagnostic contexts.

3. Indirect Personalization

One of the most innovative findings was the success of "indirect personalization." By generating synthetic data from the multi-GAN ensemble and using MMD to identify which GAN's output most closely matched a small sample of a new patient's data, the authors could tailor the training set to that individual. For the MLP classifier, this approach pushed accuracy to 96.68% and sensitivity to 95.2%, outperforming general baseline models.

Conclusion

This study demonstrates that recurrent GANs can generate high-fidelity physiological signals that are indistinguishable from real data to standard classifiers. While the approach showed limitations when dealing with fundamentally low-quality sensor data (as seen in the MIT-BIH results), it proved highly effective for data augmentation, rebalancing, and personalization. Future research will focus on integrating differential privacy guarantees into the generation process, potentially allowing for the public sharing of synthetic medical datasets without compromising sensitive patient information.

Summary updated

BibTeX
@inproceedings{nikolaidis2019augmenting,
  author = {Konstantinos Nikolaidis and Stein Kristiansen and Vera Goebel and Thomas Plagemann and Knut Liestøl and Mohan S. Kankanhalli},
  title = {{Augmenting Physiological Time Series Data: A Case Study for Sleep Apnea Detection}},
  booktitle = {ECML/PKDD},
  year = {2019},
  doi = {10.1007/978-3-030-46133-1\_23},
}
Figure