EEG Sweat Artifact Removal Using Deep Learning

Automated Suppression of Sweat Artifacts in Sleep EEG Recordings Optimized for ZMax

THE PROBLEM

Sleep EEG is frequently contaminated by sweat artifacts, which arise from changes in skin conductance caused by thermoregulatory sweating. These artifacts are most prominent during slow-wave sleep, particulrly during and following the second sleep cycle, when sweating increases and electrode-skin impedance drifts slowly over time.

The resulting signal manifests as large-amplitude, low-frequency fluctuations that overlap spectrally with physiologically meaningful delta activity and ocular signals.

Conventional high-pass filtering used to suppress sweat artifacts therefore also attenuates true delta power and EOG components due to this frequency overlap, leading to distortion of sleep-relevant features.


THE SOLUTION

Throughout the development of the Hypnodyne Autoscorer, we systematically indexed and characterized dozens of EEG artifact types and developed proprietary vision-based elastic models and statistical algorithms to capture their diverse morphologies.

Building on this foundation, we leveraged the latest machine learning technologies to train a deep neural network with a large temporal receptive field - spanning multiple epochs and optimized for the ZMax montage - featuring a hierarchical, multi-resolution representation with progressive context aggregation and feature refinement.

This architecture integrates both local and global temporal cues through successive downsampling and reconstruction stages, enabling precise separation of EEG features that occupy overlapping frequency bands.

Much like a human scorer, who often needs to review neighboring epochs and adjacent signal segments to determine whether a low-frequency oscillation originates from sweat or neural activity, the model leverages contextual information from surrounding regions of the signal to make the same distinction.

As a result, the model effectively removes the majority of sweat-related band power from the EEG signal while preserving genuine neural activity.

HYPNODYNE SWEAT REMOVER vs HIGH PASS FILTER

All the figures below are 30 seconds of left/right frontal EEG signal.

Top: original EEG ,

Middle: 1Hz high pass filter (this was the minimum frequency required to completely remove the artifacts),

Bottom: ZMax sweat remover neural net output , no high pass filtering.


Figure 1: N2 epoch, 2 artifacts removed even across epoch boundaries



Figure 2: N2 epoch, 5 artifacts removed



Figure 3: N3 epoch, 3 artifacts removed



Figure 4: N1 epoch, the high pass filter removes the EOG in the middle, ZMax sweat remover preserves EOG perfectly and completely removes the 3 sweat artifacts



Figure 5: REM epoch, high pass filter removes EOG, ZMax sweat remover preserves EOG perfectly



SPECTRAL BEFORE/AFTER

Upon removing sweat artifacts in the time series, the true low frequency spectral power of the underlying EEG is recovered.

MORE IN DEPTH SPECTRAL VIEWS

Figures 1, 2: When an epoch is deemed to contain no artifacts, the signal is left untouched, yielding a null spectral change.








Figure 3: Large sweat artifact overlapping a K complex. The cleaned signal is spectrally very similar to the ground truth.





Availability

Sweat removal is now in early access and will be released in the coming weeks. Contact us if you are interested in testing this feature on one of your data files.

Downloads

Below you can download a ZMax data file that has the original signals (EEG L, EEG R.edf) and the sweat-removed signals (EEG Comp L, EEG Comp R.edf). when you open this file with the latest version of HDScorer, the two EEG tracks will be displayed together for easy browsing.


 Download original EDF and sweat-removed EDF (63 MB)


Home



   
WhatsApp