Source-linked AI summary

Data Augmentation for Seizure Prediction with Generative Diffusion Model

Kai Shu, Le Wu, Yuchang Zhao, Aiping Liu, Ruobing Qian, Xun Chen

arXiv:2306.08256v2eess.SPcs.LG

TL;DR

The paper addresses imbalanced EEG seizure prediction with DiffEEG, a diffusion-based augmentation method that generates whole-channel EEG signals. Across five classifiers, DiffEEG-generated data performed better on all five; Multi-scale CNN achieved the reported averages on CHB-MIT and Kaggle.

  • Problem

    The paper addresses imbalanced data in seizure prediction, which it presents as valuable for patients whose epilepsy remains uncontrolled by drugs.

    Source: §I · pp. 1, 3
  • Method

    DiffEEG applies a diffusion model to seizure-prediction data augmentation and directly generates signals across whole EEG channels.

    Source: §I · p. 3, §IV · p. 12
  • Results

    DiffEEG-generated data performed better on all five classifiers; Multi-scale CNN averaged 95.4% Sens, 0.051/h FPR, and 0.932 AUC on CHB-MIT, and 93.6% Sens, 0.121/h FPR, and 0.822 AUC on Kaggle.

    Source: §V · p. 14
  • Takeaways & Limitations

    DiffEEG directly generates whole-channel EEG signals, addressing a longstanding challenge in multichannel EEG generation.

    Source: §IV · p. 12

    Training remains slow despite randomly selecting diffusion steps, and DiffEEG uses subject-specific training rather than cross-subject modeling.

    Source: §IV · p. 13

Abstract

from arXiv · show

Data augmentation (DA) can significantly strengthen the electroencephalogram (EEG)-based seizure prediction methods. However, existing DA approaches are just the linear transformations of original data and cannot explore the feature space to increase diversity effectively. Therefore, we propose a novel diffusion-based DA method called DiffEEG. DiffEEG can fully explore data distribution and generate samples with high diversity, offering extra information to classifiers. It involves two processes: the diffusion process and the denoised process. In the diffusion process, the model incrementally adds noise with different scales to EEG input and converts it into random noise. In this way, the representation of data can be learned. In the denoised process, the model utilizes learned knowledge to sample synthetic data from random noise input by gradually removing noise. The randomness of input noise and the precise representation enable the synthetic samples to possess diversity while ensuring the consistency of feature space. We compared DiffEEG with original, down-sampling, sliding windows and recombination methods, and integrated them into five representative classifiers. The experiments demonstrate the effectiveness and generality of our method. With the contribution of DiffEEG, the Multi-scale CNN achieves state-of-the-art performance, with an average sensitivity, FPR, AUC of 95.4%, 0.051/h, 0.932 on the CHB-MIT database and 93.6%, 0.121/h, 0.822 on the Kaggle database.

I. INTRODUCTION

Seizure prediction matters because timely warning may protect patients whose epilepsy remains uncontrolled by drugs; EEG-based prediction frames this task as distinguishing preictal from interictal states. The introduction motivates DiffEEG as a diffusion-based augmentation method for scarce preictal data and describes its evaluation across classifiers.

I. INTRODUCTION

  • Deep learning can learn representative features automatically, while traditional seizure-prediction methods rely on manually extracted features whose efficacy depends heavily on feature quality.The introduction cites MLP, multi-scale CNN, and Transformer architectures as examples of deep-learning approaches.Source: §I · p. 1
  • Low-frequency seizure onsets leave patient-specific preictal data scarce, creating imbalance and overfitting; traditional augmentation remains constrained by the original data distribution.The introduction notes that brain signals are nonstationary, so simple transformations may not cover changing EEG representations.Source: §I · p. 2
  • Prior GAN-based EEG augmentation may have unstable training and mode collapse, which can limit the diversity of generated samples.The passage links mode collapse to generating samples similar to only a limited number of initial data points.Source: §I · p. 2
  • DiffEEG adds noise to EEG samples in a forward process and gradually removes it from random noise in a denoising process, using STFT conditioning to guide generation.The authors describe the resulting synthetic samples as diverse while maintaining feature-space consistency.Source: §I · p. 2
  • DiffEEG is evaluated on CHB-MIT and Kaggle using five classifiers, with comparisons against original data and down-sampling, sliding-window, and recombination methods.The classifiers are SVM, Spatio-temporal MLP, EEGNet, Multiscale CNN, and Transformer.Source: §I · p. 3
  • The authors introduce diffusion modeling for seizure-prediction data imbalance and report that it outperforms existing augmentation methods across nearly any classification network.They also state that their best experimental performance exceeds that of most state-of-the-art methods.Source: §I · p. 3

II. METHODOLOGY

The methodology uses a Markov-chain diffusion process to transform data into noise and a learned reverse process to generate synthetic data. Random-step training and skip-step sampling reduce computation while retaining the DDPM training objective.

II. METHODOLOGY

  • The forward process transforms EEG data x0 into noise xT, while the learned reverse process samples back toward synthetic data x0.The reverse process starts from Gaussian noise and proceeds step by step; the generated sample is described as having the same distribution as real data.Source: A. Diffusion Model · p. 3
  • The model is trained by minimizing the unweighted variant of the ELBO, with a noise-prediction loss at randomly selected diffusion steps.Training samples x0, Gaussian noise ε, and a diffusion step t, then updates the network using the difference between ε and its prediction.Source: A. Diffusion Model · p. 3
  • Random-step training reduces computational overhead while covering all diffusion steps, and skip-step sampling accelerates inference without changing the DDPM training objective.The skip-step scheme uses a non-Markovian noise-adding process whose loss remains consistent with the Markovian DDPM objective.Source: A. Diffusion Model · p. 4

B. DiffEEG Architecture

DiffEEG conditions diffusion on STFT guidance and uses input, residual, and output blocks to model EEG features. Its bidirectional dilated residual layers capture multiple scales while providing direct gradient paths.

B. DiffEEG Architecture

  • The STFT condition guides DiffEEG because EEG spectral composition varies over time and STFT captures temporal changes in spectral components.The paper uses STFT as conditional guidance to provide time-frequency information for the network.Source: B. DiffEEG Architecture · p. 4
  • DiffEEG comprises input, residual, and output blocks, with the input block injecting diffusion-step information and STFT guidance into the network.The input block maps EEG into residual channels and projects the STFT spectrogram to match the EEG input shape.Source: B. DiffEEG Architecture · pp. 4–5
  • The residual block uses bidirectional dilated convolutions with exponentially growing dilation for multi-scale receptive fields, while residual paths support direct gradient propagation.A gated-tanh unit learns nonlinear features, and the output block combines features across residual layers before producing data with the input EEG dimensions.Source: B. DiffEEG Architecture · p. 5

C. Classifier Architecture

The experiments use five representative classifier frameworks: SVM, Spatio-temporal MLP, EEGNet, Multi-scale CNN, and Transformer.

C. Classifier Architecture

  • The classifier set includes SVM, Spatio-temporal MLP, and EEGNet.These are three of the five representative SOTA network frameworks used as classifiers.Source: C. Classifier Architecture · p. 5
  • The classifier set also includes Multi-scale CNN and Transformer.Together with SVM, Spatio-temporal MLP, and EEGNet, these make up the five selected frameworks.Source: C. Classifier Architecture · p. 5
  • The five selected frameworks provide the classifier architectures used in the paper's comparisons.The listed frameworks are SVM, Spatio-temporal MLP, EEGNet, Multi-scale CNN, and Transformer.Source: C. Classifier Architecture · p. 5

1) SVM:

The SVM classifier separates classes using a hyperplane and relies on manually extracted EEG features. The selected features include statistical moments, spectral band power, and Hjorth parameters.

1) SVM:

  • SVM classifies samples by finding a hyperplane that separates classes and maximizing its distance from the support vectors.The support vectors are the samples closest to the hyperplane.Source: 1) SVM · p. 5
  • The SVM uses manually extracted features comprising four statistical moments, eight spectral band powers, and two Hjorth parameters.The moments are mean, variance, skewness, and kurtosis; the Hjorth parameters are mobility and complexity.Source: 1) SVM · p. 5
  • The eight spectral features span δ (0.5-4 Hz), θ (4-8 Hz), α (8-13 Hz), β (13-30 Hz), and four γ bands from 30 to 128 Hz.The γ bands are γ-1 (30-50 Hz), γ-2 (50-75 Hz), γ-3 (75-100 Hz), and γ-4 (100-128 Hz).Source: 1) SVM · p. 5

2) Spatio-temporal MLP:

The section describes four classifier architectures used with DiffEEG, covering channel-wise and temporal feature extraction, multiscale fusion, and attention-based processing.

2) Spatio-temporal MLP:

  • Spatio-temporal MLP combines artifact removal, channel weighting, and dimensionality reduction with inter-channel and intra-channel feature learning.Average pooling and a fully connected layer produce seizure-state probabilities.Source: 2) Spatio-temporal MLP · p. 5

3) EEGNet:

  • Modified EEGNet adds two 1D CNNs before its original layers and adjusts convolution and pooling kernels to the EEG sampling rate.The added layers extract channel representations and focus on important information.Source: 3) EEGNet · p. 5, Figure 4 · p. 6

4) Multi-scale CNN:

  • Multi-scale CNN uses dilated temporal and spatial convolutions, then attention-based feature-weighted fusion before a four-layer CNN classifier.Large kernels capture long-term or broad-area information, while small kernels capture local information.Source: 4) Multi-scale CNN · p. 5

5) Transformer:

  • The Transformer classifier uses an encoder with input embedding, positional encoding, and attention modules to represent inputs and model associations across locations.The attention module assigns weights to information at different locations.Source: 5) Transformer · pp. 5–6, Figure 3 · p. 6

D. Training and Testing

Training and testing use patient-specific leave-one-out splits and compare four imbalance-handling approaches, including DiffEEG-based preictal generation.

  • For each patient, leave-one-out cross-validation tests one preictal part with a corresponding interictal part while training on the remaining parts.The interictal data are divided into as many equal parts as there are preictal parts; all subjects have an interictal-to-preictal ratio above 4:1, with some above 20:1.Source: D. Training and Testing · p. 6
  • The comparison includes down-sampling, overlapping sliding windows, recombination of three preictal segments, and DiffEEG generation.Down-sampling matches interictal sample count to preictal count; recombination creates artificial samples from randomly selected segments.Source: D. Training and Testing · p. 6
  • DiffEEG generates half of its samples from randomly selected spectrograms and half from recombined spectrograms, using training-set EEG as conditioning input.The process continues until generated preictal samples equal interictal samples.Source: D. Training and Testing · pp. 6–7
  • After random mixing, 25% of the resulting training samples are used for validation, and early stopping returns the best model after five epochs without jointly best sensitivity and specificity.The figure caption identifies Fig. 5 as showing total preictal and interictal duration for both datasets.Source: D. Training and Testing · p. 7, Figure 5 · p. 7

E. Postprocessing

The experiments use event-based seizure prediction and describe postprocessing alongside the selected CHB-MIT and Kaggle datasets.

E. Postprocessing

  • The alarm requires at least 8 of the last 10 predictions to be preictal, followed by a 30-minute refractory period.The stated purpose is to reduce false alarms and avoid frequent short-term alarms.Source: E. Postprocessing · p. 7

III. EXPERIMENTS AND RESULTS

  • The experimental section evaluates comparative results on the CHB-MIT and Kaggle databases.It introduces dataset details, evaluation metrics, and comparisons with several state-of-the-art methods.Source: §III · p. 7

A. Dataset

  • CHB-MIT records 844 hours and 163 seizures from 23 patients; the study selects 13 patients meeting its seizure-frequency, seizure-count, and imbalance criteria.The study uses 18 common electrodes and treats seizures less than 15 minutes apart as one event.Source: A. Dataset · p. 7, Table I · p. 7
  • The Kaggle dataset includes five dogs and two patients, but the study tests only the dogs because the patients’ 5 kHz sampling rate could increase data dimensionality and model complexity.The five dogs’ recordings use 15 or 16 channels and are sampled at 400 Hz.Source: A. Dataset · p. 7, Table II · p. 7

B. Experiments and Evaluation Metrics

This section defines prediction timing and evaluation measures, then explains the event-based evaluation and chance-predictor significance test.

  • The CHB-MIT experiments use a 1-minute SPH and 30-minute SOP, while Kaggle uses a 5-minute SPH and 60-minute SOP.SPH is the interval between alarm and seizure onset; seizure onset must fall within the SOP for a correct prediction.Source: B. Experiments and Evaluation Metrics · pp. 7–8
  • Event-based evaluation is chosen as more representative of practical situations; sensitivity measures predicted seizures, FPR counts false alarms per hour, and AUC measures classification quality.AUC values of 0.5 and 1 represent random and perfect classification, respectively.Source: B. Experiments and Evaluation Metrics · p. 8
  • The p-value tests whether a random predictor could match or exceed the system’s correctly predicted seizure count at a 0.05 significance level.The chance-predictor sensitivity uses a Poisson rate parameter and the SPH and SOP durations.Source: B. Experiments and Evaluation Metrics · p. 8

C. Results and Comparison

DiffEEG augmentation outperformed original-data training on Sens and AUC and led the imbalance methods on Sens, AUC, and FPR across classifiers. Multi-scale CNN was the strongest classifier, while comparison with prior SOTA methods was optimal on CHB-MIT and comparable on Kaggle.

C. Results and Comparison

  • The loss proxy fell substantially as diffusion steps increased from 50 to 200, with little further decrease at 300; the study selected 200 steps.The authors used training loss as a proxy because synthetic-sample quality was difficult to assess quantitatively.Source: C. Results and Comparison · p. 8, Figure 7 · p. 8
  • DiffEEG achieved higher Sens and AUC than original-data training and the highest Sens and AUC, plus lowest FPR, among imbalance methods across classifiers.Against sliding windows and recombination, CHB-MIT average gains were Sens 3.64% and 4.06%, AUC 0.043 and 0.041, and FPR reductions 0.027/h and 0.032/h; Kaggle gains were Sens 7.70% and 6.90%, AUC 0.042 and 0.036, and FPR reductions 0.034/h and 0.037/h.Source: C. Results and Comparison · p. 9
  • Multi-scale CNN with DiffEEG achieved average Sens, FPR, AUC of 95.4%, 0.051/h, 0.932 on CHB-MIT and 93.6%, 0.121/h, 0.822 on Kaggle.It was the best-performing network among the five classifiers.Source: C. Results and Comparison · p. 9, Table VI · p. 10, Table XI · p. 10
  • DiffEEG achieved optimal performance versus SOTA methods on CHB-MIT and comparable performance on Kaggle, with significant above-chance improvement for all subjects in both databases.Pat7 was the exception among SOTA cases and did not meet the study’s selection criteria.Source: C. Results and Comparison · p. 11, Table XIII · p. 11

IV. DISCUSSION

DiffEEG augmentation improves seizure-prediction performance across classifiers and is reported to outperform existing augmentation methods. The discussion also examines generated-signal characteristics, potential applications, and constraints on training and deployment.

IV. DISCUSSION

  • Across classification models, DiffEEG-augmented data achieve higher Sens and AUC than original data and outperform existing imbalance methods, while original-data models show lower FPR.The authors attribute the original-data FPR pattern to the predominance of interictal samples and resulting difficulty recognizing preictal samples.Source: §IV · pp. 11, 13
  • DiffEEG-generated data can narrow distances between data clusters, whereas sliding-window and recombination distributions remain restricted by the original data.The authors state that the additional information can improve classifier performance.Source: §IV · p. 12
  • Multi-scale CNN performs best among the five classifiers regardless of augmentation method, and DiffEEG shows superiority across the evaluated network frameworks.The authors describe its dilated convolutions as extracting spatial and temporal features at multiple scales, with attention weighting features.Source: §IV · p. 12
  • DiffEEG directly generates whole multichannel EEG signals, and visual inspection describes its synthetic samples as diversified rather than simple superpositions of existing data.Figures 8 and 9 show real and synthetic samples at 18 channels over 30 seconds and three channels over 10 seconds, respectively; amplitudes are normalized to the same range.Source: §IV · p. 12, Figure 8 · p. 12, Figure 9 · p. 12
  • Paired t-tests find no significant variance difference between real and augmented data for all subjects except Dog3, while spectral-feature differences vary across patients.The authors interpret these results as indicating similar amplitude distributions for most patients alongside frequency-domain diversity; synthetic data retain temporal rhythms.Source: §IV · pp. 12–13
  • STFT conditioning is used to prioritize generation quality, with the authors noting a trade-off because conditioning can reduce sample diversity.They state that loss of authenticity could reduce seizure-prediction performance and mention recombined spectrograms as a way to increase diversity.Source: §IV · p. 13
  • The authors identify potential applications in faster model development, biomarker study, patient-data privacy, and other EEG tasks.They describe generated preictal data as a possible biomarker reference and say synthetic augmentation can reduce reliance on original data and associated privacy concerns.Source: §IV · p. 13
  • Slow training and subject-specific modeling constrain DiffEEG, while noisy EEG acquisition, costly incremental updates, and potential misuse complicate deployment.For a new patient, the current strategy requires retraining; the authors also say low-quality signals cannot be guaranteed to yield high-quality synthetic data, and updating with all data is costly while using only new data risks catastrophic forgetting.Source: §IV · pp. 13–14

V. CONCLUSION

DiffEEG-generated data improved performance across five classifiers, with the Multi-scale CNN reaching state-of-the-art results on CHB-MIT and Kaggle. The authors present DiffEEG as a diffusion-based augmentation method for epileptic EEG generation.

V. CONCLUSION

  • 95.4% Sens, 0.051/h FPR, and 0.932 AUC on CHB-MIT; 93.6% Sens, 0.121/h FPR, and 0.822 AUC on Kaggle, with DiffEEG-augmented Multi-scale CNN.Both results are reported as reaching the SOTA level.Source: §V · p. 14
  • DiffEEG-generated data achieved better performance across all five classifiers in comparisons with original data, down-sampling, sliding windows, and recombination.Source: §V · p. 14
  • To the authors’ knowledge, DiffEEG is the first diffusion model used in epileptic EEG generation and can be applied to seizure-prediction classifiers.The authors present it as a new approach to addressing imbalanced data.Source: §V · p. 14
Loading 2306.08256v2…