Abstract
Electroencephalogram (EEG) has shown a useful approach to produce a brain-computer interface (BCI). One-dimensional (1-D) EEG signal is yet easily disturbed by certain artifacts (a.k.a. noise) due to the high temporal resolution. Thus, it is crucial to remove the noise in received EEG signal. Recently, deep learning-based EEG signal denoising approaches have achieved impressive performance compared with traditional ones. It is well known that the characteristics of self-similarity (including non-local and local ones) of data (e.g., natural images and time-domain signals) are widely leveraged for denoising. However, existing deep learning-based EEG signal denoising methods ignore either the non-local self-similarity (e.g., 1-D convolutional neural network) or local one (e.g., fully connected network and recurrent neural network). To address this issue, we propose a novel 1-D EEG signal denoising network with 2-D transformer, namely EEGDnet. Specifically, we comprehensively take into account the non-local and local self-similarity of EEG signal through the transformer module. By fusing non-local self-similarity in self-attention blocks and local self-similarity in feed forward blocks, the negative impact caused by noises and outliers can be reduced significantly. Extensive experiments show that, compared with other state-of-the-art models, EEGDnet achieves much better performance in terms of both quantitative and qualitative metrics.
Introduction
Electroencephalogram (EEG) signals are fundamental to the development of Brain-Computer Interfaces (BCIs). However, these signals are highly susceptible to noise, particularly ocular artifacts (from eye movements) and myogenic artifacts (from muscle activity), which can obscure the underlying neural data. Traditional denoising methods often fail to preserve the integrity of the brain signal, while modern deep learning approaches like Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) typically struggle to capture both local and non-local self-similarities simultaneously.
Non-local self-similarity refers to repeating patterns across distant time intervals, while local self-similarity concerns patterns in immediate proximity. This paper introduces EEGDnet, a 2-D Transformer-based architecture designed to bridge this gap by treating 1-D EEG signals as 2-D matrices, enabling the model to leverage the global and local processing strengths of the Transformer architecture.
Methodology
The core innovation of EEGDnet lies in its structural approach to 1-D signal processing. The model follows a multi-step pipeline to transform and denoise the input signal:
- 2-D Reshaping: The 1-D EEG epoch of length $N$ is reshaped into a $k \times q$ matrix. This transformation allows the model to apply spatial processing techniques typically reserved for image data.
- Transformer Architecture: The network utilizes a series of Transformer blocks. Self-Attention blocks are employed to capture non-local self-similarity by calculating dependencies between all segments of the epoch. Feed-Forward blocks then process local self-similarity.
- Activation Function: Unlike standard models that use ReLU, EEGDnet employs the Parametric Rectified Linear Unit (PReLU). This is critical for EEG data, which contains both positive and negative values; PReLU prevents the "dead neuron" problem by allowing the model to learn from negative signal components.
- Efficiency Constraints: To prevent overfitting and ensure suitability for embedded BCI devices, the model is kept shallow, typically utilizing 6 depths and a single attention head.
Dataset and Training
The model was evaluated using the EEGdenoiseNet benchmark, comprising 4,514 clean EEG epochs, 3,400 ocular artifact epochs, and 5,598 muscle artifact epochs. Training involved mixing clean signals with artifacts at varying Signal-to-Noise Ratios (SNR) from -7dB to 2dB to simulate real-world noisy conditions.
Experimental Results
EEGDnet was benchmarked against several state-of-the-art models, including Fully Connected Networks (DLN), CNNs (SCNN), 1D-ResCNN, and RNNs.
Denoising Performance
EEGDnet consistently outperformed competitors in both ocular and muscle artifact removal. For ocular artifacts, it achieved a Correlation Coefficient (CC) of 0.868, significantly higher than the 0.791 achieved by the next best model (SCNN). It also demonstrated the lowest Relative Root Mean Square Error (RRMSE), indicating superior signal reconstruction.
Model Efficiency
A key advantage of EEGDnet is its minimal resource requirement. The model contains only 0.18M parameters and requires 11.1MB of storage. This makes it approximately 46 times smaller than the 1D-ResCNN (8.42M parameters, 514.2MB), while delivering better denoising performance. This efficiency is vital for deployment on low-power, portable BCI hardware.
Conclusion
EEGDnet represents a significant advancement in EEG denoising by effectively fusing local and non-local self-similarity through a 2-D Transformer architecture. Its high performance and remarkably small memory footprint make it an ideal candidate for real-time BCI applications. Future work will explore the application of this architecture to signal classification and feature extraction tasks across larger, more diverse datasets.
Summary updated