A Novel EEG Artifact Removal Algorithm Based on an Advanced Attention Mechanism
The complexity and richness of electroencephalography (EEG) signals necessitate advanced signal processing methods for effective analysis. Employing the temporal nature of EEG and the potent temporal feature extraction capabilities of Long Short-Term Memory networks (LSTM), a new approach has emerged that integrates Convolutional Neural Networks (CNN) with EMA-1D, a refined multiscale attention module that excels in handling one-dimensional bioelectrical signals. This synergy leads to high-quality reconstruction of EEG signals.
Introducing CLEnet
Our pioneering work introduces an innovative architecture called CLEnet, meticulously designed to enhance EEG signal processing. The CLEnet architecture relies on three pillars: CNN, LSTM, and the EMA-1D module, harmonized to facilitate artifact-free EEG signal reconstruction. Below, we delve into the details of the key components and operational stages of this model.
The EMA-1D Module
EMA-1D stands as a vital breakthrough, addressing the inefficiencies of traditional attention mechanisms when applied to EEG signals. It’s optimized for one-dimensional signals by restructuring its framework to reduce the dimensional mismatch and parameter redundancy, thereby offering a robust solution for EEG feature extraction and reconstruction. The structural components of the EMA-1D module are illustrated in more detail in the architecture’s blueprint.
To enhance feature representation fidelity and mitigate computational redundancy, the EMA-1D employs a strategic feature grouping mechanism. This tactic enables the module to focus on local features within specific channels, avoiding the blurred lines that arise from a global fusion of channels. The subgroup divisions adapt the channel dimension to the batch dimension, harnessing convolutional operations to process features parallelly without compressing the data, thereby conserving computational resources and ensuring efficient processing.
Adapting Traditional Attention Mechanisms
In contrast to typical EMA modules tailored for spatial image processing, EMA-1D morphs these methods to cater to EEG by merging its two-dimensional pooling into a 1×1 temporal pooling branch. Through this adaptation, EMA-1D performs a global average pooling along the time axis, significantly improving its ability to capture temporal features and reducing unnecessary parameters.
The introduction of a 1D convolutional approach enables focused local feature interactions, especially beneficial for capturing transient EEG patterns. This combination of local detail refinement and long-term temporal dependency modeling ensures that the module effectively highlights the nuanced features of EEG data.
The Architecture of CLEnet
CLEnet’s structure is versatile yet precise, designed to facilitate successive stages of EEG data processing: (1) Morphological Feature Extraction and Temporal Feature Enhancement, (2) Temporal Feature Extraction, and (3) EEG Reconstruction.
Initially, the dual-branch CNN in the first stage extracts morphological features from the artifact-laden EEG signals. This operation captures essential waveform details and restores the disrupted temporal dependencies through a temporal feature enhancement module. The integration of EMA-1D refines temporal continuity, producing superior inputs for subsequent processes.
Following morphological feature extraction, the LSTM takes over in the second stage, intensifying the model’s capacity to process and understand extended temporal patterns in EEG data. The result is a model less constrained by the previously acknowledged shortcomings of CNNs in temporal data extraction.
Finally, in the EEG Reconstruction stage, the weighted aggregation of morphological and temporal features via fully connected layers ensures the alignment of reconstructed signals with input EEG, thus completing artifact removal effectively.
The CLEnet architecture’s layers and pathways are precisely orchestrated to maintain the morpho-temporal integrity of EEG signals, reinforcing its utility in producing signals devoid of artifacts.
Training and Optimization
The training protocol for CLEnet involves aligning real EEG data with its contaminated counterparts. The core target during training is to refine model parameters to project a close approximation of artifact-free EEG from polluted inputs. Mean Squared Error (MSE) is utilized as the loss function to measure reconstruction fidelity.
Optimized using the Adam optimizer, CLEnet effectively utilizes computational resources to accommodate various configurations, such as those of the RTX 4070 Ti GPU with 12GB VRAM. A balanced batch size ensures smooth processing across both single-channel and multi-channel EEG data, with the architecture achieving impressive computational efficiency demonstrated by its GigaFlops metrics.
In summary, the CLEnet model, through its adept use of CNN, LSTM, and EMA-1D modules, presents a viable and innovative approach to EEG signal processing, offering promising implications for both clinical and research applications in neuroscience where artifact-free EEG data are paramount.