Papers
Topics
Authors
Recent
2000 character limit reached

AugUNet1D: 1D Residual U-Net for SWD Detection

Updated 8 January 2026
  • The paper introduces AugUNet1D, a residual U-Net designed to achieve expert-level segmentation of spike-wave discharges in rodent EEG.
  • It employs an encoder-decoder architecture with tailored augmentations—amplitude scaling, Gaussian noise, and signal inversion—to boost robustness against inter-subject variability.
  • The model outperforms baseline methods with a 29% F1-score improvement over Twin Peaks, setting a new benchmark for automated SWD detection.

AugUNet1D is a one-dimensional, residual U-Net architecture designed for the dense segmentation of spike-wave discharges (SWDs) in rodent electroencephalography (EEG) recordings. It was developed to address the challenge of automating SWD event labeling, a task that is both time-consuming and subject to high inter-annotator variability due to differences in EEG amplitude across recording subjects. By incorporating data augmentation tailored to EEG-specific variability, AugUNet1D advances the state-of-the-art for SWD detection and demonstrates high labeling fidelity with expert-annotated ground truth (Sengupta et al., 1 Jan 2026).

1. Model Architecture

AugUNet1D adopts the canonical encoder–decoder geometry of U-Net, specifically optimized for 1D temporal sequences. The architecture processes single-channel, 20-second EEG segments sampled at 100 Hz (input size: [Batch, 1, 2000]) and outputs pointwise SWD probabilities at each time sample.

The encoder comprises three sequential residual convolutional blocks, each structured as:

  • Two Conv1D → InstanceNorm1D → ReLU layers with residual shortcut,
  • MaxPool1D downsampling (factor 2) between blocks.

Channel sizes progress from 16 to 32, then 64, culminating in a bottleneck layer of 128 channels. The decoder mirrors the encoder, consisting of upsampling blocks that concatenate corresponding encoder features (skip connections), followed by residual blocks to restore temporal resolution. The output layer is a Conv1D(16 → 1, kernel size 1) followed by a Sigmoid activation, yielding probability maps for SWD occurrence.

Within each residual unit, the transformation is defined as: y=σ(W∗x+b) z=σ(W′∗y+b′) output=x+z\begin{aligned} y &= \sigma(W * x + b) \ z &= \sigma(W' * y + b') \ \text{output} &= x + z \end{aligned} where ∗* denotes 1D convolution, and σ\sigma is the ReLU non-linearity.

2. Data Augmentation Strategies

To enhance generalization across EEG variability—particularly differing amplitudes across animals—AugUNet1D employs a probabilistic augmentation pipeline. The operator A\mathcal{A} maps x(t)x(t) to x~(t)\tilde{x}(t), sequentially applying:

  • Amplitude scaling (p=0.5p=0.5): xscaled(t)=α⋅x(t)x_{\text{scaled}}(t) = \alpha \cdot x(t), with α∼Uniform(a,b)\alpha \sim \mathrm{Uniform}(a, b),
  • Gaussian noise addition (max SNR = 0.005): xnoise(t)=x(t)+ϵ(t)x_{\text{noise}}(t) = x(t) + \epsilon(t), ϵ(t)∼N(0,σ2)\epsilon(t) \sim \mathcal{N}(0, \sigma^2),
  • Signal inversion (p=0.2p=0.2): xinv(t)=−x(t)x_{\text{inv}}(t) = -x(t).

Ablation experiments indicated amplitude scaling delivers the most significant performance increase (F1: 0.861 vs. 0.427 for no augmentation). When combining all three augmentations, further improvement is observed (F1: 0.885).

Augmentation Precision Recall F1-score
None 0.946 0.276 0.427
Gaussian only 0.954 0.312 0.470
Invert only 0.959 0.363 0.527
Scaling only 0.878 0.844 0.861
All combined 0.909 0.862 0.885

Scaling imparts amplitude invariance, while noise and inversion augmentations further increase robustness to artifacts and polarity flips.

3. Training Data and Procedure

AugUNet1D is trained using 961.3 hours of continuous EEG from 8 C3H/HeJ mice, comprising 173,160 windowed 20 s segments and 22,637 manually annotated SWDs (mean duration 5.83±2.375.83 \pm 2.37 s, peak frequency 5.72±0.755.72 \pm 0.75 Hz). The training/validation split utilizes 95%/5% of segments, ensuring all examples come from these 8 mice. Evaluation is exclusively performed on a held-out cohort of 10 entirely separate animals, guaranteeing assessment of cross-subject generalization.

Preprocessing steps include min–max scaling of amplitude, resampling to 100 Hz using sinc interpolation, and division into non-overlapping 20 s windows.

Optimization employs Dice loss: LDice=1−2∑pigi∑pi+∑gi\mathcal{L}_{\text{Dice}} = 1 - \frac{2\sum p_i g_i}{\sum p_i + \sum g_i} with Adam optimizer (initial learning rate 1×10−31 \times 10^{-3}), cosine annealing learning rate schedule with warmup, batch size 32, up to 50 epochs, and early stopping (patience 10). Metrics are reported as means over 3 independent training runs.

4. Performance Assessment and Baseline Comparison

On the independent test set of 10 mice, AugUNet1D achieves superior precision, recall, and F1-score relative to both the vanilla 1D UNet (no augmentation) and the time-frequency-based "Twin Peaks" algorithm.

Method Precision Recall F1-score
AugUNet1D 0.91±0.020.91\pm0.02 0.90±0.020.90\pm0.02 0.90±0.010.90\pm0.01
Vanilla 1D UNet 0.90±0.050.90\pm0.05 0.53±0.130.53\pm0.13 0.59±0.150.59\pm0.15
Twin Peaks 0.67±0.000.67\pm0.00 0.82±0.000.82\pm0.00 0.69±0.000.69\pm0.00

AugUNet1D exhibits a 29% relative improvement in F1-score over Twin Peaks (0.90 vs. 0.69) and a ~53% improvement over the vanilla 1D UNet (0.90 vs. 0.59). Notably, variance across test subjects is also reduced.

Qualitative analysis demonstrates that AugUNet1D aligns SWD onsets and offsets with manual expert annotations, while Twin Peaks systematically underestimates event duration (2.35 ± 0.74 s vs. manual 4.88 ± 0.89 s; p<10−3p<10^{-3}) and overestimates peak frequency (6.58 ± 0.42 Hz vs. manual 6.14 ± 0.13 Hz; p<10−3p<10^{-3}). AugUNet1D’s detected event durations (4.93 ± 0.82 s) and frequencies (6.13 ± 0.14 Hz) are statistically indistinguishable from manual labels (p>0.99p>0.99).

5. Analysis of Augmentation and Model Robustness

The single largest gain in cross-subject generalization stems from amplitude scaling, which addresses the principal source of SWD detection error—inter-animal amplitude variation. This operation enables the model to learn amplitude-invariant representations of the SWD waveform. Gaussian noise injection and signal inversion further enhance robustness against sensor artifacts and polarity ambiguities common in long-term EEG datasets.

Since AugUNet1D produces pointwise segmentations, start/stop timing precision for detected SWDs is at the millisecond scale, in contrast to methods relying on time-frequency features whose temporal boundaries are inherently blurred. False positives in AugUNet1D do not cluster during non-SWD phenomena (e.g., sleep or cable noise), a limitation observed in Twin Peaks.

6. Applications and Implications

AugUNet1D is suitable for real-time monitoring in chronic rodent EEG experiments, with the encoder–decoder architecture enabling efficient sliding window inference. The model generalizes across subjects without retraining, but is also adaptable for human or multi-channel EEG event detection via finetuning on target-labeled datasets. Potential applications extend to any dense temporal segmentation task in physiological time series, including sleep staging and arrhythmia detection.

The pretrained and untrained weights of AugUNet1D are made publicly available, facilitating adoption and extension by the neuroscience and biomedical signal processing communities (Sengupta et al., 1 Jan 2026).

7. Significance and Future Directions

AugUNet1D establishes a new performance benchmark for automated SWD labeling in rodent EEG, closing the gap to expert manual accuracy while offering high temporal precision and robustness to cross-animal variability. Future work may explore adaptation to heterogeneous electrode montages, integration with multi-modal physiological signals, and iterative human-in-the-loop refinement for further gains in reliability and interpretability. The empirical findings underscore the importance of targeted data augmentation—in particular, amplitude scaling—for the success of deep learning in noisy, variable biomedical time series contexts.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Whiteboard

Topic to Video (Beta)

Follow Topic

Get notified by email when new papers are published related to AugUNet1D.