Skip to main content
Scientific Data logoLink to Scientific Data
. 2026 Apr 9;13:807. doi: 10.1038/s41597-026-07120-7

PhysioMotion Artifact: A task-driven EEG dataset with point-wise motion artifact annotations

Chunfeng Yang 1,✉,#, Jiangwei Yu 2,✉,#, Aonan He 1, Wentao Xiang 3, Xi Wang 1, Guangquan Zhou 2,✉, Yudong Zhang 1, Miao Cao 4,✉, Yang Chen 1, Juan M Gorriz 5
PMCID: PMC13223301  PMID: 41957382

Abstract

Physiological artifacts pose persistent challenges in electroencephalogram (EEG) data acquisition, often compromising interpretation and post-analysis of EEG signals across research and clinical applications. To address such limitations, including various artifact types, insufficient annotations, and low spatial resolutions, we present PhysioMotion Artifact, a large-scale, task-driven EEG dataset with point-wise artifact annotations. EEG data was acquired from 30 healthy participants performing 16 systematically designed single-type and multi-type movement tasks, inducing 14 distinct types of physiological artifacts. To demonstrate the utility of the dataset, we implemented a Convolutional Neural Networks-Transformer hybrid model for artifact detection and classification, achieving 95.4% accuracy in binary classification and 79.7% in 14-class classification tasks.

Subject terms: Data acquisition, Data publication and archiving, Machine learning, Neural decoding

Background & Summary

The EEG holds an irreplaceable position within the realms of neuroscience and neurological research. In addition to clinical diagnostics and assessing physiological states, EEG is crucial in evaluating consciousness levels like comas, and serves as an indispensable modality in the diagnosis and study of epilepsy1. However, acquiring EEG signals is frequently hindered by the presence of various physiological and non-physiological artifacts2, including electrode displacement, movement artifacts, ocular artifacts, and artifacts originating from muscle activity. Such artifacts can significantly impede the accurate interpretation of EEG data3. Although proper environmental and equipment configurations can effectively reduce the level of non-physiological artifacts, physiological artifacts remain a major challenge in EEG data acquisition. Therefore, accurate and reliable detection and classification of EEG artifacts play a pivotal role in a wide range of applications, including clinical diagnosis and neuroscience research4–8, and brain-computer interface (BCI) systems9–11, where the reliability and interpretability of neural signals are critically dependent on signal quality.

In previous studies, artifact detection and classification have primarily relied on conventional signal processing techniques including Blind Source Separation (BSS)12–14, Wavelet Transform15–17, and Empirical Mode Decomposition (EMD)18–20. Those techniques offer advantages such as real-time applicability and the ability to extract artifact-related features with minimal computational cost. However, their effectiveness is often contingent upon expertise and manually optimized hyperparameters. In recent years, researchers have increasingly employed deep neural networks to automatically extract discriminative representations of various types of artifacts. Compared to traditional approaches, deep learning models, such as Convolutional Neural Networks (CNNs)21–23, U-Net architectures24,25, and Transformer-based frameworks26, reduce dependence on handcrafted features and manual parameter tuning, while offering enhanced generalization across subjects and recordings. Despite these advantages, limited availability of high quality controlled and well-annotated EEG datasets remains as a major barrier.

Notably, three major multi-artifact datasets have been introduced: the Automatic Artifact Removal Dataset (https://github.com/stefan-ehrlich/dataset-automaticArtifactRemoval), the EEG_dataset_for_artifact-noise_detection (https://github.com/inabiyouni/EEG_dataset_for_artifact-noise_detection), and the TUH EEG Artifact Corpus (TUAR)27. The EEG_dataset_for_artifact-noise_detection includes multiple artifact types, however, it is limited to single-channel recordings, lacks a standardized experimental paradigm, and has a relatively small data volume, making it unsuitable for deep learning applications. In contrast, the Automatic Artifact Removal Dataset provides a sufficient amount of data for deep learning and features well-structured and standardized experimental designs. Nonetheless, its annotations are primarily timestamp-based, lacking the finer granularity of channel-specific annotations. The TUH EEG Artifact Corpus (TUAR)27, built upon the large-scale clinical TUH EEG dataset28, offers extensive data with artifact annotations at the channel level and includes overlapped artifacts which enhances its applicability. However, as a clinical dataset, it presents several limitations, including label imbalance, insufficient diversity of artifact types, and a lack of targeted sample selection. Additionally, since the annotations are manually generated, labeling errors are difficult to avoid.

Addressing the critical need for a large-scale EEG dataset with high-quality annotations, diverse artifact types, and high spatial resolutions, we designed a standardized experimental paradigm informed by the strengths and limitations of existing datasets. Task-driven EEG data were collected from 30 healthy participants, encompassing 14 distinct artifact types across two categories: (1) single-type tasks and (2) multi-type tasks. To synchronize task conduction with EEG recordings, we developed a custom data acquisition system that automatically logs task onset and offset. Signals were acquired using longitudinal and transverse bipolar montages standardized by the American Clinical Neurophysiology Society29. Artifact annotations, performed at the channel level, combined automated logging with manual validation to maximize annotation accuracy. To our knowledge, this represents the first publicly available large-scale EEG artifact dataset featuring task-based triggers and channel-specific annotations. The dataset is hosted on OpenNeuro (10.18112/openneuro.ds006386.v1.0.1)30. Accompanying code for data is openly accessible on GitHub (https://github.com/JiangweiYu221/PhysioMotion_Artifact).

To evaluate the dataset, we implemented a deep learning model to perform artifact detection and classification tasks. The artifact detection task achieved an average accuracy of 95.4% and the artifact classification (14 classes) yielded an average accuracy of 79.7%. Our results suggest that the proposed dataset provides a solid foundation for deep learning-based artifact detection and classification. We anticipate that this dataset will address existing challenges in artifact identification, classification and removal in EEG signals, and facilitate the advancement of deep learning methods in this domain.

Methods

Participant Description

A total of 30 healthy individuals (18 males and 12 females; age range: 19-25 years; mean age: 21.5  ± 2.0 years) were recruited through campus advertisements at Southeast University, Nanjing, China. Prior to participation, all subjects were provided with written informed consent, which explicitly covered participation in the data acquisition experiments as well as the subsequent public release of anonymized data. In addition, all subjects were informed in advance about the experimental procedures and any potential risks or discomforts associated with the experiment, including possible fatigue. Screening procedures were used to exclude participants with history of any neurological disorders or mental health issues. Data acquisition was conducted between 7 November 2024 and 16 January 2025. Detailed demographic information and the timeline of data acquisition are presented in Table 1. The study received ethical approval from the Ethics Committee of Nanjing Medical University (No. 2022784) and was conducted in strict accordance with the principles outlined in the Declaration of Helsinki.

Table 1.

Information of 30 healthy participants (12 females and 18 males).

Subject_ID Gender Age First_Collection_Date Second_Collection_Date
1 male 24 Nov. 7, 2024 Nov. 8, 2024
2 male 19 Nov. 14, 2024 Nov. 20, 2024
3 male 19 Nov. 15, 2024 Nov. 16, 2024
4 male 20 Nov. 19, 2024 Nov. 22, 2024
5 male 23 Nov. 21, 2024 Nov. 26, 2024
6 male 19 Nov. 25, 2024 Dec. 1, 2024
7 male 19 Nov. 29, 2024 Nov. 30, 2024
8 male 19 Dec. 2, 2024 Dec. 3, 2024
9 male 21 Dec. 4, 2024 Dec. 5, 2024
10 female 21 Dec. 6, 2024 Jan. 13, 2025
11 female 21 Dec. 6, 2024 Dec. 14, 2024
12 male 20 Dec. 7, 2024 Dec. 12, 2024
13 female 24 Dec. 9, 2024 Dec. 16, 2024
14 female 23 Dec. 10, 2024 Dec. 13, 2024
15 female 22 Dec. 14, 2024 Jan. 9, 2025
16 female 19 Dec. 17, 2024 Dec. 26, 2024
17 female 20 Dec. 18, 2024 Dec. 28, 2024
18 female 21 Dec. 18, 2024 Dec. 24, 2024
19 female 24 Dec. 26, 2024 Dec. 26, 2024
20 female 19 Dec. 27, 2024 Dec. 28, 2024
21 female 19 Dec. 28, 2024 Dec. 29, 2024
22 male 23 Dec. 30, 2024 Dec. 30, 2024
23 male 25 Dec. 30, 2024 Jan. 16, 2025
24 male 23 Jan. 6, 2025 Jan. 14, 2025
25 male 23 Jan. 10, 2025 Jan. 10, 2025
26 male 23 Jan. 12, 2025 Jan. 12, 2025
27 female 22 Jan. 13, 2025 Jan. 13, 2025
28 male 24 Jan. 15, 2025 Jan. 15, 2025
29 male 22 Jan. 15, 2025 Jan. 15, 2025
30 male 24 Jan. 16, 2025 Jan. 16, 2025

Experimental Paradigm

The experimental protocol was designed to investigate individual and concurrent EEG artifacts through a structured sequence of movement tasks, which is motivated by the Temple University Artifact Corpus (TUAR)27.

All tasks were conducted under the automated control of a custom-designed data acquisition system. This system utilized a combination of visual cues, textual prompts, and auditory instructions to provide real-time guidance, thereby facilitating precise execution of the pre-defined movements. Moreover, the system was programmed to automatically generate task-specific event markers and initiate countdown timers in alignment with pre-established temporal parameters.

The single-type tasks consisted of two baseline recordings, three oculomotor tasks, two head movement tasks, one tongue movement task, one chewing task, one swallowing task, and one eyebrow movement task. The experimental procedure was structured as follows: the session began with a 2-minute eyes-closed resting state, which served as a baseline with minimal artifacts. Subsequently, participants were prompted to blink their eyes freely and enter a 2-minute eyes-open resting state, which served as a second baseline recording. Following this baseline recording, oculomotor tasks were conducted. The first and second oculomotor tasks required participants to follow a red visual cue displayed on the screen, guiding vertical and horizontal eye movements, respectively. After some rest, the third oculomotor task required participants to blink continuously in every second for one minute. Head movement tasks were then carried out with participants’ eyes closed to avoid contamination by blink artifacts. Participants followed auditory cues to perform horizontal head rotations and vertical nodding. The tongue movement task also required eyes closed. Participants were instructed via auditory cues to repeatedly articulate the sound “la-la-la”31 with a 2-second interval between each cue. In the masticatory task, participants closed their eyes and, following auditory prompts, clenched their molars to simulate chewing movements. For the swallowing task, participants closed their eyes and swallowed in response to auditory cues. Finally, the eyebrow movement task involved participants keeping their eyes closed and raising their eyebrows in response to an auditory cue, maintaining the raised position for 10 seconds.

The multi-type tasks consisted of five overlapping tasks designed to induce compound physiological artifacts. The first two tasks involved head movements performed with eyes open. These tasks followed the same procedures and timing as the two head movement tasks in the single-type condition, with the sole distinction being that participants were allowed to keep their eyes open. This modification was introduced to capture overlapping artifacts arising from simultaneous head movements and eye blinks. Following this, the blinking-eyebrow elevation task required participants to raise their eyebrows in response to an auditory cue and maintain the position, while simultaneously blinking once per second in response to separate auditory tones. This task was designed to induce overlapping artifacts from concurrent blinking and eyebrow movement. Next, the eyebrow elevation-tongue movement task mirrored the structure and timing of the tongue movement task in the single-type condition. Participants were instructed to keep their eyes closed throughout the task to avoid blink-related contamination. The key distinction in this task was that participants maintained sustained eyebrow elevation during each round of articulation, thereby generating overlapping artifacts from eyebrow and tongue movements. The final task-the eyebrow elevation-swallowing task-required participants to raise their eyebrows in response to an auditory cue and maintain the position for 5 seconds, during which they were instructed to swallow saliva once at any time within the interval.

The experimental paradigm was meticulously designed to elicit a comprehensive range of EEG artifacts through both single-type and multi-type movement tasks, enabling a systematic investigation into the individual and combined artifacts on EEG signals. All detailed information of experimental tasks is shown in Table 2.

Table 2.

An overview of all tasks incorporated in the experimental paradigm, along with the corresponding manually annotated label names assigned to each task.

Task Type Task Description Parameters Notes Label
Single-type Tasks
Eyes-closed resting Resting state 2 mins duration Baseline recording close_base
Eyes-open resting Resting state 2 mins duration Baseline recording with visual fixation open_base
Vertical saccades Ocular Control 10 trials (5↑+5↓), 1 sec intervals Instructed by the Red Dot ver_eyem
Horizontal saccades Ocular Control 10 trials (5 ← +5 → ), 1 sec intervals Instructed by the Red Dot hor_eyem
Blinking Metronomic blinking 1 Hz frequency  × 60s Instructed by the Auditory cue blink
Horizontal rotation (eyes closed) Head Movement 10 trials (5 ← +5 → ), 3 secs intervals Instructed by the Auditory cue hor_headm
Vertical nodding (eyes closed) Head Movement 10 trials (5↑+5↓), 3 secs intervals Instructed by the Auditory cue ver_headm
“Lalala” articulation Lingual Movement 3 blocks  × 10 trials, 2 secs intervals Instructed by the Auditory cue tongue
Bilateral jaw clenching Jaw Movement 2 blocks  × 5 trials, 2 secs intervals Instructed by the Auditory cue chew
Swallowing Voluntary swallowing 5 trials, 5 secs intervals Instructed by the Auditory cue swallow
Eyebrow elevation Facial Control 2 blocks  × 10 secs duration Instructed by the Auditory cue eyebrow
Multi-type Tasks
Horizontal rotation (eyes open) Combined Movement 10 trials (5 ← +5 → ), 3 secs intervals Visual fixation condition blink_hor_headm
Vertical nodding (eyes open) Combined Movement 10 trials (5↑+5↓), 3 secs intervals Visual fixation condition blink_ver_headm
Sustained eyebrow elevation + blinking Combined Movement 2 blocks  × 5 secs duration Blinking by the Auditory cue blink_eyebrow
Sustained eyebrow elevation + articulation Combined Movement 3 blocks  × 10 trials, 2 secs intervals tongue_eyebrow
Eyebrow elevation + swallowing Combined Movement 2 trials  × 5 secs duration Single swallow for each trial swallow_eyebrow

Data Acquisition

The experimental protocol was implemented under controlled laboratory environment to uphold methodological rigor and ensure the integrity of the collected data. All recording sessions took place in a quiet, dedicated environment, with only essential experimental apparatus present. Non-essential electronic devices were excluded from the setting to mitigate potential sources of electromagnetic noise.

As for visual stimuli, they were presented on a 23.8-inch IPS monitor (1920 × 1080 resolution, 16:9 aspect ratio) positioned at 60 cm viewing distance, resulting approximately 47.41° horizontal saccade angle and 27.75° vertical saccade angle of the human eye. Further hardware details are shown in Table 3.

Table 3.

Hardware Specifications.

Sampling rate: 1000Hz
Number of Electrodes: 64 provided electrodes (59 EEG electrodes recorded, 4 EOG electrodes and 1 ECG electrode were discarded)
Electrode placement: According to 10-10 system
Referencing: REF (after referencing, discarded when exporting data)
GND electrode: GND (discarded when exporting data)
Displayer Size: 23.8-inch
Displayer Refresh Rate: 60Hz
Resolution: 1920 × 1080
Aspect Ratio: 16 : 9

The visual cues consisted of red dot targets (20-pixel radius) containing 2-pixel-wide black crosshairs, optimized for precise oculomotor tracking. The complete set of four fixation cues used to elicit vertical and horizontal eye movements is illustrated in Fig. 1.

Fig. 1.

Fig. 1

Visual Cues for Vertical Saccades (a,b) and Horizontal Saccades (c,d).

Once the experimental environment and equipment were configured as depicted in Fig. 2, the formal data acquisition procedure was initiated. Within the designated acquisition room, each participant was seated comfortably in an upright posture facing the visual display monitor. To minimize potential electromagnetic interference from essential electronic components, the acquisition laptop and wireless router were positioned at a distance of approximately 1.5 meters from both the participant and the prompt display system.

Fig. 2.

Fig. 2

Data Acquisition Systems.

Throughout recordings, the acquisition system provided real-time visualizations of the EEG signals, allowing the researcher to monitor data quality and verify the temporal alignment between task execution and recorded brain activity. Upon completion of the experimental session, raw EEG data were exported from the acquisition laptop and securely stored for subsequent analysis.

To accommodate individual differences in physical endurance and personal scheduling constraints, the experimental protocol incorporated a degree of flexibility. Participants were given the option to complete all six blocks either within a single day or over two days. For the two-day option, participants performed three blocks per day, with the specific dates determined based on their availability and preference. This flexible scheduling framework was designed to minimize discomfort, sustain high-quality data acquisition, and uphold ethical standards by prioritizing participants’ well-being. As a result of this design, all participants successfully completed the full set of experimental procedures, contributing a consistent dataset comprising approximately 120 minutes of EEG recordings per individual.

Preprocessing and Annotations

In addition to the raw EEG recordings, the dataset also provides a corresponding set of preprocessed data. Given the central objective of this study-namely, the characterization of EEG artifacts-the preprocessing pipeline was designed to be minimal. A notch filter (50 Hz and its harmonics up to 150 Hz) was first applied to the raw EEG signals. Subsequently, a bandpass filter between 0.5 Hz and 150 Hz was adopted. This filtering strategy was designed to retain the temporal and spectral features of artifact-related components. Following filtering, both standard longitudinal and transverse bipolar montages were applied to EEG signals, in accordance with the recommendations of the American Clinical Neurophysiology Society29. Bipolar referencing was applied, enhancing the visibility of spatially localized artifact patterns. Details of Montages used in this study were shown in Table 4.

Table 4.

Standard Longitudinal and Transverse Bipolar Montages (18.1).

Channel No. Standard Longitudinal Bipolar Montages-18.1 Standard Transverse Bipolar Montages-18.1
1 Fp1-F7 F7-Fp1
2 F7-T7 Fp1-Fp2
3 T7-P7 Fp2-F8
4 P7-O1 F7-F3
5 Fp1-F3 F3-Fz
6 F3-C3 Fz-F4
7 C3-P3 F4-F8
8 P3-O1 T7-C3
9 Fz-Cz C3-Cz
10 Cz-Pz Cz-C4
11 Fp2-F4 C4-T8
12 F4-C4 P7-P3
13 C4-P4 P3-Pz
14 P4-O2 Pz-P4
15 Fp2-F8 P4-P8
16 F8-T8 P7-O1
17 T8-P8 O1-O2
18 P8-O2 O2-P8

Building upon preprocessed EEG signals, the subsequent artifact annotations were conducted in accordance with a rigorous quality control framework. Two experienced annotators independently performed point-wise artifact annotation under double-blind conditions to minimize subjective bias and enhance annotation reliability. Leveraging a customized labeling interface, and guided by system-generated auto markers, each annotator systematically identified the presence of target artifacts by selecting the corresponding EEG channels and signal segments. An overview of the preprocessing and annotation pipeline is presented in Fig. 3.

Fig. 3.

Fig. 3

EEG Signal Processing and Annotation Pipeline. (a) Raw data with all 59 EEG channels exported from NeuSen W; (b) Three-step preprocessing including filtering and bipolar montage; (c) Preprocessed data with 34 montaged channels; (d) Customised annotation graphical user interface used for independent labeling; (e) Annotation data (f) Annotation verification interface for joint discussion.

Data Records

The dataset is available at 10.18112/openneuro.ds006386.v1.0.130 and organized in full compliance with the Brain Imaging Data Structure (BIDS) standard32. Additionally, manually annotated artifact annotations are provided in csv files, which are stored in a dedicated folder named Manual_Annotations. The overall file organization and directory structure of the dataset are illustrated in Fig. 4.

Fig. 4.

Fig. 4

Directory and Details for the Dataset.

Raw Data

The raw EEG data in this study was recorded and exported using the NeuSen W system in .bdf files, with the signal units in microvolts (μV). However, this format and unit convention pose limited compatibility with the MNE-Python33 framework, which operates with data in volts (V) by default and is optimized for the BIDS format. To ensure consistency across the dataset, the signal units were converted from microvolts to volts, and the data were reorganized in full compliance with the BIDS specification. The resulting raw dataset strictly adheres to the BIDS format, following these conventions: the subject identifier ranges from 1 to 30, corresponding to each participant; the task field is consistently labeled as artifact, reflecting the artifact-induction nature of the recordings; the run index ranges from 01 to 06, indicating the number of experimental task rounds performed by each subject; and the datatype is specified as eeg. Each raw recording contains 59 EEG channels sampled at 1000 Hz.

Preprocessed Data

All preprocessing procedures were implemented using the preprocessing functions from the MNE-Python33. Following the preprocessing pipeline, the resulting preprocessed data were saved in full compliance with the BIDS format, ensuring consistency with the raw data organization. The preprocessed EEG recordings contain 34 channels (after re-referencing) and retain the original sampling rate of 1000 Hz.

Manual Annotations

The naming convention of the manually annotated data is kept consistent with that of the preprocessed data. Each annotation file follows the format: sub-x_run0y.csv where, x denotes the subject ID ranging from 1 to 30, and y indicates the task session number from 1 to 6. Each CSV file contains four columns with the standardized headers: channel, start_time, stop_time, and label. A comprehensive summary of all point-wise manual annotation statistics is provided in Table 5.

Table 5.

Statistical summary of manual annotations aggregated across all subjects.

Label Num Min Duration (s) Max Duration (s) Avg Duration (s)
hor_headm 23852 2.418 5.085 3.779
blink_ver_headm 23630 0.280 1.832 0.797
chew 10974 1.358 13.061 9.711
tongue 10919 0.249 1.977 0.809
open_base 9180 3.959 122.867 60.315
close_base 9044 2.033 125.905 48.221
blink_hor_headm 7378 2.534 4.871 3.708
ver_headm 5195 0.280 1.784 0.820
eyebrow 4811 1.591 16.182 8.773
swallow 4308 0.577 3.145 1.486
tongue_eyebrow 3501 0.331 1.766 0.807
ver_eyem 2958 0.182 1.111 0.385
blink 2613 3.743 61.769 36.187
hor_eyem 2478 1.127 12.212 6.837
blink_eyebrow 2336 1.205 11.452 5.038
swallow_eyebrow 1506 0.626 2.567 1.351

The first column lists the 16 labels corresponding to the experimental tasks described in Table 2. Column Num denotes the number of annotated segments for each label, and durations are measured in seconds. Note that multiple occurrences of the same artifact may appear within a single annotated segment.

Technical Validation

Topographic Mapping and Artifact Features

Figure 5 depicts the distinct characteristics of four different artifact types, illustrating the EEG signals and corresponding topographic maps of each. These examples highlight the unique spatial distributions and temporal dynamics that generate each artifact category. Such patterns constitute critical features that deep learning models must capture in order to achieve robust artifact detection and classification.

Fig. 5.

Fig. 5

Four different artifact types and corresponding topographic maps.

Building upon this observation, the subsequent sections provide a comprehensive description of our artifact identification and classification framework, which is grounded in the use of deep neural networks.

Model Input

To improve computational efficiency and ensure integration with deep learning frameworks, preprocessed EEG signals were downsampled and segmented. Specifically, EEG signals were first downsampled to 125 Hz, a rate chosen to substantially reduce data dimensionality while retaining critical temporal features relevant for artifacts. After downsampling signals, continuous recordings were segmented into fixed-length 3-second time windows, corresponding to 375 time points per segment. To better capture temporal transitions across adjacent segments, a 50% overlap was implemented, leading to a sliding window stride of 187 samples. Moreover, to better utilise the training dataset and mitigate the inclusion of irrelevant or noise-dominated intervals, a targeted window selection strategy was adopted. Specifically, for each annotated artifact segment, the initial window was always retained, after which the sliding process proceeded in half-window increments until the segment extended beyond the labeled artifact boundary. We employed a nested GroupKFold scheme (5 outer folds and 3 inner folds) for subject-independent evaluation, ensuring that data from the same subject never appear in both the training set and the test set. This prevents data leakage caused by overlapping sliding windows and provides a more reliable assessment of generalization. In the inner loop, key hyperparameters were tuned through multiple trials, and the final results were reported on the outer test sets.

Model Architectures

To evaluate the dataset, we employed two structurally homologous CNN–Transformer classifiers inspired by Peh et al.26. The binary classifier (K = 2) performs artifact contamination detection by distinguishing artifact-contaminated segments from resting-state segments, where the artifact class aggregates trials from all 14 physiological artifact types in our dataset. In contrast, the multiclass model (K = 14) assigns artifact trials to their corresponding subtype labels. Both models share a unified three-stage architecture: spatial feature extraction via 2D CNN, temporal modeling using Transformer encoders, and final classification through fully connected layers (FC). Given an input EEG data:

X∈RC×T

where C denotes the number of channels and T denotes the number of sample points. The prediction of the model can be expressed as,

Y=FC(Transformer_Encoder(2D_CNN(X))) 1

The overall CNN-Transformer architecture is illustrated in Fig. 6.

Fig. 6.

Fig. 6

DNN Model Structure for Multi-Class Classification.

Model parameters θ were optimized by minimizing a regularized class-weighted cross-entropy loss, which simultaneously addresses overfitting and class imbalance. The loss function of the model is defined as:

L=−1N∑i=1Nwyilogp^i,yi+λ∥θ∥22, 2

where N is the minibatch size, yi ∈ {1, …, K} denotes the ground-truth annotation, p^i,yi is the predicted probability, wyi is the class-specific weight, and λ is the weight decay coefficient for L2 regularization. To mitigate the adverse effects of class imbalance, we adopted a two-stage strategy for computing class weights wk used in the loss function. Initially, base weights wk(0) were derived from inverse class frequencies to proportionally upweight underrepresented classes:

wk(0)=maxjnjnk,k=1,…,K 3

where nk represents the number of training samples belonging to class k, and maxjnj ensures that the most frequent class is assigned a baseline weight of 1. Subsequently, to refine this coarse adjustment and avoid overcompensation, we introduced adaptive scaling factors sk, yielding the final class weights:

wk=sk×wk(0),sk∈[0.5,2.0] 4

where sk is a class-specific multiplier optimized via Hyperopt. The bounded range for sk constrains the extent of adjustment, promoting stability during training. The resulting weights were integrated into the class-weighted cross-entropy loss to guide model learning under imbalanced conditions.

Hyperparameter Optimization

We employed Hyperopt’s Tree structured Parzen Estimator (TPE)34 to jointly tune learning rate, depth of the CNN, number of Transformer layers and attention heads, batch size and weight decay. Table 6 summarizes the best configurations for each task.

Table 6.

Best hyperparameters for binary and multi class classifiers.

Hyperparameter Binary Task Multi Class Task
Learning rate η 0.0009862 0.0007064
Batch size 64 256
CNN blocks 3 5
Transformer layers 2 2
Attention heads 2 16
Weight decay 2.07 × 10−6 1.73 × 10−7

Results

The classification reports (Table 7) and confusion matrices (Fig. 7) for both binary and multi-class tasks indicate that the CNN–Transformer models achieve strong performance in artifact recognition on the proposed dataset. In the binary classification task, the model reached a mean test accuracy of 95.4%, suggesting that artifact-contaminated segments can be reliably separated from baseline segments. In the more challenging multi-class setting, the overall test accuracy was 79.7%, demonstrating a reasonable capacity to differentiate diverse artifact types under a subject-independent evaluation protocol. A closer inspection of the per-class results shows that most categories are recognized with stable precision and recall, while a few classes remain more challenging due to shared physiological signatures and overlapping spatial distributions. For instance, tongue_eyebrow yields lower precision, likely because strong eyebrow-related EMG components can mask tongue-motion patterns, leading to increased false positives. In addition, swallow exhibits reduced precision largely because some chew samples are misclassified as swallow, as both are dominated by temporalis-region muscle activity. Similarly, swallow_eyebrow shows the lowest precision, primarily driven by swallow samples being predicted as swallow_eyebrow. More broadly, we observe systematic confusions among closely related EMG artifacts, which reflects limitations of the model representation and training setup rather than data quality. Modeling EEG as a channel-by-time input without explicitly encoding electrode topology constrains discrimination between artifacts with similar spatial patterns and frequency content, and class-weighted training can further increase false positives for minority classes.

Table 7.

Precision, Recall and F1-score (mean ± std) for Binary and Multi-Class Classification.

Binary Classification (mean  ± std)
Class Precision Recall F1-score
close_base 0.916  ± 0.055 0.947  ± 0.041 0.930  ± 0.038
artifact 0.974  ± 0.018 0.957  ± 0.025 0.966  ± 0.016
Multi-Class Classification (mean  ± std)
Class Precision Recall F1-score
blink 0.965  ± 0.031 0.873  ± 0.030 0.916  ± 0.019
chew 0.958  ± 0.032 0.843  ± 0.174 0.887  ± 0.097
eyebrow 0.827  ± 0.076 0.699  ± 0.096 0.751  ± 0.045
blink_hor_headm 0.792  ± 0.028 0.736  ± 0.102 0.761  ± 0.062
hor_headm 0.715  ± 0.116 0.880  ± 0.099 0.779  ± 0.054
tongue 0.657  ± 0.141 0.648  ± 0.169 0.648  ± 0.138
tongue_eyebrow 0.286  ± 0.248 0.237  ± 0.212 0.241  ± 0.226
ver_headm 0.701  ± 0.133 0.794  ± 0.102 0.736  ± 0.084
blink_eyebrow 0.730  ± 0.206 0.794  ± 0.188 0.747  ± 0.156
blink_ver_headm 0.735  ± 0.176 0.731  ± 0.143 0.719  ± 0.112
hor_eyem 0.971  ± 0.051 0.990  ± 0.022 0.980  ± 0.026
ver_eyem 0.676  ± 0.062 0.852  ± 0.094 0.751  ± 0.052
swallow 0.356  ± 0.198 0.587  ± 0.167 0.394  ± 0.159
swallow_eyebrow 0.264  ± 0.095 0.567  ± 0.179 0.349  ± 0.114

Fig. 7.

Fig. 7

Confusion matrices for binary and multi-class classification. Each subplot reports the aggregated confusion matrix on the test set over five outer folds, where the entries correspond to raw counts.

To further quantify model performance, standard classification metrics: Precision, Recall, and F1-score, were calculated from the confusion matrices and are summarized in Table 7 for both binary and multi-class scenarios.

Usage Notes

To facilitate the analysis and processing of EEG data within this dataset, Python 3.7 and the MNE-Python v1.3.0 were used. In the data acquisition system used for this study, automatic event marking was implemented via a proprietary software API (https://github.com/neuracle/neuracle-api) provided by Neuracle Inc.

For the EEG artifact classification task, a hybrid model combining 2D Convolutional Neural Networks (CNNs) and Transformer layers was implemented using PyTorch. All experiments were conducted within a conda-managed environment running Python 3.8.20 on an Ubuntu-based Linux system equipped with two NVIDIA GeForce RTX 4090 GPUs (24GB each), using NVIDIA-SMI v565.57.01 and CUDA 12.7. The environment included the following key Python packages: PyTorch 2.4.1, NumPy 1.24.3, Scikit-learn 1.3.0, Hyperopt 0.2.7, GPUtil 1.4.0, TQDM 4.66.5, and the standard Python logging module.

Acknowledgements

This research was funded by the National Key Research and Development Program of China (Grant No. 2022YFC2405600), the National Natural Science Foundation of China (Grants No. T2225025, 31400842). We also gratefully acknowledge the support provided by the Big Data Computing Center of Southeast University and Visiting Scholar programme at the UGR (Spain).

Author contributions

C.Y., G.Z., M.C., Y.Z., J.G. and Y.C. developed the conceptual framework for the study. C.Y., Y.Z. and W.X. provided the necessary resources. J.Y. conceived and conducted the experiments with the help of X.W., A.H. constructed the model and analysed the results. The whole process was supervised by C.Y., G.Z., Y.Z., J.G. and M.C. J.Y., A.H. and M.C. contributed to the writing of this manuscript. All authors reviewed the manuscript.

Data availability

The dataset is publicly available on OpenNeuro platform (10.18112/openneuro.ds006386.v1.0.1)30.

Code availability

All code utilized in this study has been made publicly available on GitHub (https://github.com/JiangweiYu221/PhysioMotion_Artifact), encompassing modules for data preprocessing, the annotation interface, the annotation verification tool, and model training procedures. Comprehensive instructions for setup and usage are provided in the accompanying README file included in the repository.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

These authors contributed equally: Chunfeng Yang, Jiangwei Yu.

Contributor Information

Chunfeng Yang, Email: chunfeng.yang@seu.edu.cn.

Jiangwei Yu, Email: yjiangwei210@163.com.

Guangquan Zhou, Email: guangquan.zhou@seu.edu.cn.

Miao Cao, Email: miaocao@swin.edu.au.

References

  • 1.Praline, J. et al. Emergent EEG in clinical practice. Clin. Neurophysiol.118, 2149–2155 (2007). [DOI] [PubMed] [Google Scholar]
  • 2.Islam, M. K., Rastegarnia, A. & Yang, Z. Methods for artifact detection and removal from scalp EEG: A review. Neurophysiol. Clin./Clin. Neurophysiol.46, 287–305 (2016). [DOI] [PubMed] [Google Scholar]
  • 3.Rashmi, C. R. & Shantala, C. P. EEG artifacts detection and removal techniques for brain computer interface applications: a systematic review. Int. J. Adv. Technol. Eng. Explor.9, 354 (2022). [Google Scholar]
  • 4.Li, R. & Principe, J. C. Blinking artifact removal in cognitive EEG data using ICA. In 2006 International Conference of the IEEE Engineering in Medicine and Biology Society 5273–5276 (IEEE, 2006). [DOI] [PubMed]
  • 5.Bigirimana, A. D., Siddique, N. & Coyle, D. A hybrid ICA-wavelet transform for automated artefact removal in EEG-based emotion recognition. In 2016 IEEE International Conference on Systems, Man, and Cybernetics (SMC) 004429–004434 (IEEE, 2016).
  • 6.Hartmann, M. M. et al. PureEEG: automatic EEG artifact removal for epilepsy monitoring. Neurophysiol. Clin./Clin. Neurophysiol.44, 479–490 (2014). [DOI] [PubMed] [Google Scholar]
  • 7.Cassani, R. et al. The effects of automated artifact removal algorithms on electroencephalography-based Alzheimer’s disease diagnosis. Front. Aging Neurosci.6, 55 (2014). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Kaur, C., Singh, P. & Sahni, S. EEG artifact removal system for depression using a hybrid denoising approach. Basic Clin. Neurosci.12, 465 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Guarnieri, R. et al. Online EEG artifact removal for BCI applications by adaptive spatial filtering. J. Neural Eng.15, 056009 (2018). [DOI] [PubMed] [Google Scholar]
  • 10.Benda, M. & Volosyak, I. Peak detection with online electroencephalography (EEG) artifact removal for brain–computer interface (BCI) purposes. Brain Sci.9, 347 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Jafarifarmand, A. & Badamchizadeh, M. A. EEG artifacts handling in a real practical brain–computer interface controlled vehicle. IEEE Trans. Neural Syst. Rehabil. Eng.27, 1200–1208 (2019). [DOI] [PubMed] [Google Scholar]
  • 12.Delorme, A., Sejnowski, T. & Makeig, S. Enhanced detection of artifacts in EEG data using higher-order statistics and independent component analysis. Neuroimage34, 1443–1449 (2007). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Fitzgibbon, S. P. et al. Removal of EEG noise and artifact using blind source separation. J. Clin. Neurophysiol.24, 232–243 (2007). [DOI] [PubMed] [Google Scholar]
  • 14.Winkler, I. et al. Robust artifactual independent component classification for BCI practitioners. J. Neural Eng.11, 035013 (2014). [DOI] [PubMed] [Google Scholar]
  • 15.Inuso, G. et al. Wavelet-ICA methodology for efficient artifact removal from Electroencephalographic recordings. In 2007 International Joint Conference on Neural Networks 1524–1529 (IEEE, 2007).
  • 16.Kumar, P. S. et al. An adaptive method to remove ocular artifacts from EEG signals using wavelet transform. J. Appl. Sci. Res.5, 711–745 (2009). [Google Scholar]
  • 17.Phadikar, S., Sinha, N. & Ghosh, R. Automatic eyeblink artifact removal from EEG signal using wavelet transform with heuristically optimized threshold. IEEE J. Biomed. Health Inform.25, 475–484 (2020). [DOI] [PubMed] [Google Scholar]
  • 18.Mijović, B. et al. Source separation from single-channel recordings by combining empirical-mode decomposition and independent component analysis. IEEE Trans. Biomed. Eng.57, 2188–2196 (2010). [DOI] [PubMed] [Google Scholar]
  • 19.Sweeney, K. T., McLoone, S. F. & Ward, T. E. The use of ensemble empirical mode decomposition with canonical correlation analysis as a novel artifact removal technique. IEEE Trans. Biomed. Eng.60, 97–105 (2012). [DOI] [PubMed] [Google Scholar]
  • 20.Guarascio, M. & Puthusserypady, S. Automatic minimization of ocular artifacts from electroencephalogram: A novel approach by combining Complete EEMD with Adaptive Noise and Renyi’s Entropy. Biomed. Signal Process. Control36, 63–75 (2017). [Google Scholar]
  • 21.Pion-Tonachini, L., Kreutz-Delgado, K. & Makeig, S. ICLabel: An automated electroencephalographic independent component classifier, dataset, and website. NeuroImage198, 181–197 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Khatwani, M. et al. Energy efficient convolutional neural networks for eeg artifact detection. In 2018 IEEE Biomedical Circuits and Systems Conference (BioCAS) 1–4 (IEEE, 2018).
  • 23.Zhang, H. et al. A novel convolutional neural network model to remove muscle artifacts from EEG. In ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) 1265–1269 (IEEE, 2021).
  • 24.Qendro, L. et al. High frequency eeg artifact detection with uncertainty via early exit paradigm. Preprint at https://arxiv.org/abs/2107.10746 (2021).
  • 25.Chuang, C.-H. et al. IC-U-Net: a U-Net-based denoising autoencoder using mixtures of independent components for automatic EEG artifact removal. NeuroImage263, 119586 (2022). [DOI] [PubMed] [Google Scholar]
  • 26.Peh, W. Y., Yao, Y. & Dauwels, J. Transformer convolutional neural networks for automated artifact detection in scalp EEG. In 2022 44th Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC) 3599–3602 (IEEE, 2022). [DOI] [PubMed]
  • 27.Hamid, A. et al. The temple university artifact corpus: An annotated corpus of eeg artifacts. In 2020 IEEE Signal Processing in Medicine and Biology Symposium (SPMB) 1–4 (IEEE, 2020).
  • 28.Obeid, I. & Picone, J. The temple university hospital EEG data corpus. Front. Neurosci.10, 196 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Acharya, J. N. et al. American clinical neurophysiology society guideline 3: a proposal for standard montages to be used in clinical EEG. Neurodiagn. J.56, 253–260 (2016). [DOI] [PubMed] [Google Scholar]
  • 30.Yu, J. & He, A. PhysioMotion_Artifact. 10.18112/openneuro.ds006386.v1.0.1 (2025).
  • 31.Tatum, W. O., Dworetzky, B. A. & Schomer, D. L. Artifact and recording concepts in EEG. J. Clin. Neurophysiol.28, 252–263 (2011). [DOI] [PubMed] [Google Scholar]
  • 32.Gorgolewski, K. J. et al. The brain imaging data structure, a format for organizing and describing outputs of neuroimaging experiments. Sci. Data3, 1–9 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Gramfort, A. et al. MEG and EEG Data Analysis with MNE-Python. Front. Neurosci.7, 1–13 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Bergstra, J. et al. Hyperopt: A Python library for model selection and hyperparameter optimization. Comput. Sci. Discov.8, 014008 (2015). [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The dataset is publicly available on OpenNeuro platform (10.18112/openneuro.ds006386.v1.0.1)30.

All code utilized in this study has been made publicly available on GitHub (https://github.com/JiangweiYu221/PhysioMotion_Artifact), encompassing modules for data preprocessing, the annotation interface, the annotation verification tool, and model training procedures. Comprehensive instructions for setup and usage are provided in the accompanying README file included in the repository.


Articles from Scientific Data are provided here courtesy of Nature Publishing Group

RESOURCES