There are various obstacles in the way of use of EEG. Among these, the major obstacles are the artifacts. While some artifacts are avoidable, due to the nature of the EEG techniques there are inevitable artifacts as well. Artifacts can be categorized as internal/physiological or external/non-physiological. The most common internal artifacts are ocular or muscular origins. Internal artifacts are difficult to detect and remove, because they contain signal information as well. For both resting state EEG and ERP studies, artifact handling needs to be carefully carried out in order to retain the maximal signal. Therefore, an effective management of these inevitable artifacts is critical for the EEG based researches. Many researchers from various fields studied this challenging phenomenon and came up with some solutions. However, the developed methods are not well known by the real practitioners of EEG as a tool because of their limited knowledge about these engineering approaches. They still use the traditional visual inspection of the EEG. This work aims to inform the researchers working in the field of EEG about the artifacts and artifact management options available in order to increase the awareness of the available tools such as EEG preprocessing pipelines.
- Artifact removal methods
- EEG preprocessing
- Muscular artifacts
- Ocular artifacts
- Preprocessing pipelines
A signal is a function that conveys information about the behavior or attributes of some phenomenon . On the other hand, information can be anything. A waveform can have multiple overlapping information in the same space–time. The signal in a waveform is subjective, it can be color for one and shape for the other. In electrophysiology, waveform under inspection can be separated into two as the signal of interest and noise. The signal can be electrocardiography (ECG), Electroencephalogram (EEG), or any other physiological signal, noise is any unwanted wave source ınterfering with the signal. If we consider EEG as the signal, it is recorded from the scalp by electrodes and consists of the overall electrical activities of neural populations and a contribution of glial cells . EEG has a wide range of use in both clinical practice and engineering applications in medicine, particularly neurology, sleep, and epilepsy research.
The EEG recording environment and subject related electrical activities during recording deteriorate the signal quality. Artifacts are undesired signals that may introduce changes in the measurements and affect the signal of interest . EEG can be contaminated in frequency or time domain by artifacts that are resulted from internal sources of physiologic activities and movement of the subject and/or external sources of environmental interferences, equipment, movement of electrodes and cables . Artifact types and sources are listed in the Table 1. External artifacts can be prevented by proper shielding, grounding cables, isolating and moving cables away from recording sites since they act as antennas during operation. On the other hand, internal or physiological artifacts are challenging for researchers because of their inclusion of signal or resemblance to the signals. The most important artifacts in a typical EEG recording are ocular electro-oculogram (EOG) artifacts and muscular (EMG) artifacts.
|Galvanic Skin Response||Skin||Internal/Physiological|
|Electrode Impedence Imbalance||Instrumental||External/Extra-physiological|
2.1 Ocular artifacts
Electrical potentials due to eye opening/closure, blinks, eyelid flutter and eye movements propagate over the scalp and produce hostile EOG artifacts in the recorded EEG. Eye movements are major sources of contamination of EEG. The origin of this contamination is disputable. Cornea-retinal dipole movement, retinal dipole movement and eyelid movement are the three main proposed causes of the eye movement related voltage potential . The direction of eye movements affects the shape of the EOG waveform while a square-like EOG wave is produced by vertical eye movements and blinks which leads to a spike-shaped waveform . Blinks which are attributable to the eyelid moving over the cornea, occurring at intervals of 1-10s, generate a characteristic brief potential of between 0.2 s and 0.4 s duration due to eyelid movement over cornea [8, 9]. The blinking artifact generally has an amplitude much larger than that of the background EEG . It is advantageous to have a reference EOG channel during EEG recording for the cancellation of ocular artifact from EEG activity .
2.2 Muscular artifacts
Electrical activity on the body surface due to the contracting muscles are recorded via Electromyogram (EMG) . Since independent myogenic activities of head, face and neck muscles are conducted through the entire scalp, it can be monitored in the EEG [10, 11]. The amplitude of this type of artifact is dependent on the type of muscle and the degree of tension [3, 12]. The frequency range of EMG activity is wide, being maximal at frequencies higher than 30 Hz [13, 14].
2.3 Cardiac artifacts
The electrical potential due to cardiac activity can exhibit itself in the EEG as ECG artifacts. Typical high frequency waveforms similar to EKG P-QRS-T shape are characteristics of EKG artifacts in EEG .
2.4 Other artifacts
Head, body and limb movements cause irregular high voltage artifacts. Artifacts can be produced by tremors in patients such as Parkinson disease and movement disorders. Changing patient position into a calm comfortable stable position helps reducing artifacts. Another prevention for respiratory related movement artifacts is to use a towel or a firm material support for the neck. The changes in the impedance or electrical potential between scalp and electrode may cause electrode artifacts. These can result from poor electrode contact, broken lead, electrolyte gel insufficiency. This type of artifact usually exhibits itself in sudden electrode pops. These electrode artifacts can be eliminated by using proper electrolyte gel, checking electrode impedance, changing the broken electrodes, and shifting the electrode position slightly.
3. Artifact handling methods
A typical EEG recording system is shown in Figure 1. At the heart of a recording setup is the biopotential amplifier. It should have high common mode rejection ratios, however it should not have high gains, this can saturate the signal due to large half-cell potentials at the electrodes. Unequal electrode impedances are major sources of common mode artifacts such as powerline.
Environmental artifacts can be eliminated by bringing the electrodes leads closer together, moving the electrodes and subject away from the noise sources, using single isolated earth for the whole setup, and shielding the cables, machines and artifact sources with a metal tape connected to the common earth. Moreover, the environmental conditions should satisfy the following requirements for proper recordings. These can be listed as, quiet atmosphere, comfortable temperature and humidity, controlled proper lighting, using a comfortable bed or chair, and separating the powerline of the EEG system from the other machines in the lab.
3.1 Averaging methods to suppress ERP artifacts
Event Related Potentials (ERP) are electrical signals generated in response to internal or external events and they are recorded by EEG . In evoked potentials, each stimulus produces an evoked potential embedded in EEG. However, since the ERP or evoked potential signals are generally subtle in EEG, averaging of many epochs are needed to make them distinguishable. An ensemble averaging method to enhance the ERPs was defined by . This relies on the assumption that by synchronous averaging of each epoch, signal ERP amplitude adds constructively and EEG background noise diminishes destructively.
In ERP and evoked potential research, artifacts contaminate the final ensemble average signal of interest. One method to overcome this adverse effect is to benefit from a weighted averaging . In weighted averaging technique each epoch is weighted inversely with the non-stationary noise maximum amplitude in the epoch. In , each trial’s contribution to ensemble average is multiplied by a weight according to its correlation with the rest of the data. This factor is inversely related to its probability of being an artifact. For example, a large amplitude EEG is likely to be an artifact and the contribution factor for the trial involving large amplitudes will be low whereas the factor for a small amplitude EEG is high. Davila and Mobin  showed that weighted averaging of auditory EP has higher SNR than conventional ensemble averaging. John et al.  studied the effects of such techniques as sample-weighted averaging, noise-weighted averaging, amplitude based artifact rejection, percentage based artifact rejection, and normal averaging on the steady state auditory evoked potentials. It concluded in favor of weighted averaging for better SNR of steady state responses. On the other hand, according to , weighted averaging underestimates the ERP signal amplitude. Determination of the optimal weighting factor is not straightforward and this limits the performance of the weighting averaging method. Mühler and Specht  developed a method called ‘sorted averaging’. In sorted averaging, epochs are sorted with RMS values from small to large, since noisy artifactual epochs have large RMS values compared to low noise signals. The signal averaging is performed by addition of epochs from the low noise RMS to large RMS sorted order until a maximum peak of SNR2 is obtained . This eliminates the high RMS noisy epochs and yields a better ERP waveform. Compared to weighted averaging, sorted averaging had significantly higher SNR2 .
Median averaging is another approach to ERP artifact handling and it is based on taking the median points of all the epochs and adding them to form a median average instead of classic mean average . Some advantages of the median averaging are that; it elicits hidden signals more clearly and it is not affected by infrequent large artifacts that much compared to mean averaging . Özdamar and Kalayci  supported the advantages of median averaging over the conventional mean averaging in a study on the ABR signals. Median averaging is an efficient way to remove adverse effects of the outliers on the final averaged signal, yet it also removes the valuable data in the outliers causing significant loss of information [27, 28].
3.2 Artifact handling methods for EEG
Artifact avoidance, artifact rejection, manual rejection, automatic rejection, and artifact removal are the common methods to deal with artifacts . Although it seems a simple solution to cancel EOG and EMG artifacts by instructing subject to avoid blinking or movement, it can result in change of amplitudes in evoked potentials as well as the additional cognitive load [29, 30, 31]. On the other hand, artifact rejection or manual rejection may require a person dedicated to this purpose of eliminating artifacts visually one by one in an EEG. Moreover, the artifact detection by an expert may be subjective, tedious, and time consuming. In addition, it can not be applicable to online removal . However, automatic rejection can automate this artifact rejection procedure but it can eliminate non-artifact signals if not properly tuned. The automatic rejection of artifact containing EEG can depend on artifact amplitude based or EEG segment RMS based artifact detection and rejection. An example of a simple blink artifact removal is depicted in Figure 3. Since blinks have low frequency content compared to EEG, by low pass filtering, EEG can be reduced while blink artifact still remains at a high voltage level. Thus, an amplitude threshold based artifact rejection can be applied. As seen from Figure 3, red traces are the EEG and blue are the low pass filtered EEG signal. While a simple artifact rejection (without low pass filtering) using a threshold of 20 μV will produce false positives (red traces over 20 μV), in the low pass filtered EEG these false positives are prevented.
Usually one or two channels are dedicated to detect EOG artifacts. There are two widely used procedures for EOG artifacts, first EOG rejection where EEG trials with EOG artifacts having VEOG greater than a preset threshold are omitted, and second EOG correction where the effect of eye movement is tried to be removed from EEG .
Artifacts can distort the EEG in a way that the electrophysiologists or physicians can be misled in their clinical interpretation . This makes artifact removal critical in the pre-processing phase prior to analysis. There are many methods to remove artifacts such as Artifactual Segment Rejection, Filtering, Wiener filtering, Adaptive Filtering, Time-Frequency Representation, Wavelet Transform, Discrete Wavelet Transform (DWT), Adaptive Noise Cancelation (ANC), Wavelet Packet Transform (WPT), Kalman Filtering, Linear Regression, Blind Source Separation (Principal Component Analysis (PCA), Independent Component Analysis (ICA), Canonical Correlation Analysis (CCA), Minor Components Analysis (MCA)), Source Decomposition, Empirical Mode Decomposition (EMD), Support Vector Machine (SVM), and hybrid methods [3, 4, 29, 33, 34, 35, 36, 37, 38]. A functional dedicated artifact channel which provides complementary aid to identify ECG/EOG is required to remove ocular or cardiac artifacts in the most of the available methods .
Regression is a common and well established technique in artifact removal, yet it cannot be used to remove muscle noise or line noise, since these type of artifacts have no reference channels . Having a good regressor (e.g., an EOG) is critical in both time and frequency domain regression methods. It is an inherent weakness that eye movements and EEG signals are bidirectional. When unacceptable amount of data are lost in artifact rejection, delicate artifact removal methods which will preserve the essential EEG signals while removing artifacts are necessary . One of the most important artifacts is EOG. EEG regions infected with EOG can be rejected from overall EEG signal with simplest artifact rejection where these portions are detected by EOG channels, however these regions still carry brain signals in addition to ocular artifacts and total rejection or subtraction of EOG from them results in loss of brain data [40, 41, 42].
Blind Source Separation (BSS) algorithms utilize multiple channels in an unsupervised learning algorithm to extract brain related activity from the ensemble EEG signal which can be assumed a linear superposition of brain signals, noise and artifacts . Three common BSS algorithms are Independent Component Analysis (ICA), Principal Component Analysis (PCA) and Canonical Correlation Analysis (CCA).
ICA, a BSS method, is often used to remove EEG artifacts based on statistical approach of spatial filtering and separation of multiple channel EEG data into spatially fixed and temporally independent components [39, 43, 44]. Since the EEG sources and artifacts are usually of different origins, they can be assumed to be linear summation of each independent components. ICA method finds these statistically independent components and enable us to eliminate artifactual ones from the desired EEG . On the other hand, ICA provides extraction of the eye related signals present in the EOG, and removal of this information or artifact, rather than the complete EOG which still has some brain activity , is possible. However, detection and removal of transient artifacts such as head and neck muscle contractions and movement are difficult with ICA . Moreover, adapting ICA as an online method requires high computational power . On the other hand, an advantage of ICA is that it does not rely on a reference channel . However, many artifact removal algorithms are compared in , and Revised Aligned-Artifact Average (RAAA) and Second Order Blind Identification (SOBI) and Adaptive Mixture of Independent Component Analyzers (AMICA) are the preferred artifact removal methods for EOG, EMG and ECG artifacts.
PCA uses orthogonal transform of correlated time domain signal into linearly uncorrelated principal components (PCs) . These principal components possess as much as variance of the EEG as possible. Artifact containing PCs can be eliminated if they are uncorrelated with the brain EEG. Application of PCA into ocular artifacts was provided in .
CCA is also another method utilized in removing artifacts. In CCA second order statistics are employed, correlation between two multivariate datasets are maximized by canonical variables. CCA offers shorter computational time compared to ICA .
Another method is filtering in frequency domain. Usually a high-pass filter starting from 0.5-1 Hz is applied for baseline drift removal. Notch filters are used to remove powerline-noise. Another one, EMG activity of contracting scalp sites can hinder the signals of interest in the EEG recordings during an epileptic seizure . It was possible to remove this high frequency content EMG activity from EEG spectra by filtering out signals over 25 Hz. Adaptive Filters, Wiener Filtering and Bayesian Filters are three filtering methods applied in EEG signal preprocessing. Adaptive Filters are the most commonly used for artifact removal . In Adaptive Filtering a reference channel for artifacts is subtracted from the EEG recursively. This reference is multiplied by a weight factor obtained from the output of the filter by a learning algorithm and this weighted reference is subtracted from the recorded EEG yielding output artifact free EEG changing adaptively .
In wavelet transform, many scaled and time shifted wavelets are used to produce coefficients for the particular signal and wavelet type by convolution of the signal and wavelets. These coefficients indicate similarity between the corresponding wavelet and the signal. In artifact removal via wavelet transform, the main idea is that the signal which can be highly correlated with a basis mother wavelet and can be separated from artifacts which might have no correlation to the principal mother wavelet . Some examples of Wavelet Transform in artifact removal are for ocular artifact removal as in [51, 52].
3.3 EEG pre-processing pipelines available
Recently many preprocessing pipelines have been introduced in order to reduce the burden of artifact handling by an expert one by one visual inspection. This laborious task can be fastened by using existing automatized preprocessing methods in order. An efficient pre-processing pipeline not only helps the artifact management time but also provides objective evaluation with predefined criteria compared to highly subjective artifact handling by a human expert. The preprocessing pipelines usually consist of the combination of the following stages; filtering, re-referencing, bad channel identification (and interpolation), bad channel and epoch removal, artifact detection using ICA, artifact correction and removal , see Figure 4.
Fully Automated Statistical Thresholding for EEG artifact Rejection (FASTER)  algorithm is a state of the art method which is available in EEGLAB toolbox . FASTER has filtering, line noise removal, bad channel detection and interpolation, segmentation, and artifact rejection on segments by identifying bad channels, blinks, eye movements and muscular artifacts using combination of statistical thresholding and ICA . It requires an extra EOG channel. The Automatic Pre-processing Pipeline (APP) removes powerline noise, bad channels, eye movements, blinks and muscular artifacts using ICA to identify artifactual components , see Figure 4. However, it also requires extra EOG channels. Da Cruz et al.  has found that APP performs better than FASTER yielding higher amplitude in ERP study. Another pipeline is Tool for Automated Processing of EEG data (TAPEEG) . It uses automated routines of FASTER and Fieldtrip for artifact identification and performed similar to visually analysis by an expert . TAPEEG handles the resting state EEG data as well. Both FASTER and TAPEEG are based on z- scores and have difficulty in handling outliers, this leads to loss of signal content due to false positive artifact detection and rejections . Another standardized preprocessing method for large EEG datasets, PREP pipeline, handles line noise removal, bad channel detection, and referencing to standardize and normalize the data before processing . It is also available as plug-in in EEGLAB toolbox.
Automagic is a toolbox developed for standardized handling of large growing EEG/ERP datasets by time . The power of Automagic comes from the fact that it exploits many existing pipelines and methods, such as PREP pipeline for bad channel identification and for average referencing, Cleanline  to remove power line noise, EOG regression , Multiple Artifact Rejection Algorithm (MARA), ICA or robust PCA for artifact correction . MARA is a plug-in available in EEGLAB which automatically identifies artifacts not only ocular or muscular but also any general artifactual source component in ICA . Pedroni et al.  showed that combination of a preprocessing pipeline to identify bad channels and MARA method is efficient to remove most of the artifacts.
None of the methods offers a perfect robust and high accurate management of all types of artifacts. In general, they are all limited with the training dataset and fail to achieve high success with new type of artifactual data.
3.4 Simultaneous EEG and f-MRI artifact handling
Since EEG is widely used as a clinical tool to monitor or diagnose patients, doctors can be misguided in case of artifacts and EEG can be misinterpreted. For this reason, artifact removal becomes a crucial point for some cases such as epilepsy monitoring in an EEG/fMRI recording room. Today EEG and fMRI are two distinct but closely related and complementary methods. While fMRI provides high spatial resolution for localization of phenomena in the brain, EEG on the other hand results in better temporal resolution [62, 63, 64, 65]. One should be careful about the experiments involving both fMRI and EEG because there are many unwanted electromagnetic sources interfering with EEG. For example, the false identification of spikes are highly possible since residuals of Ballistocardiogram (BCG) artifacts have similar shapes as epileptic spikes . The factors that can lead to differences in the artifact are linked to the subject and experimental setup, . There are imaging artifacts, cardiac related Ballistocardiogram artifacts (BCG), EOG and EMG artifacts in an EEG inside MRI . Static field (B0) and the time-varying fields of radio-frequency excitations and of imaging gradients, generate artifacts in the EEG known as Ballistocardiogram (BCG) and imaging artifacts [44, 68, 69, 70]. The pulse artifact which can be observed in EEGs recorded inside MR scanners easily, is due to a fundamental cause that any movement of electrically conductive muscles in a static magnetic field generates electromagnetic induction and it is proportional to the static field, generally larger at higher field strengths [67, 71]. Pulsations of the scalp arteries are the main cause of this type of BCG artifact [72, 73]. The study of Grouiller et al.  compared different imaging artifact removal techniques and various cardiac artifact correction techniques in both simulated EEG data and in real experimental data. They concluded that there is no key for every door, some algorithms work well for some case and others might work well for other cases. Certain algorithms may be preferred depending on the type of data and analysis method . Another algorithm, adaptive Optimal Basis Set (aOBS), automatically eliminates BCG artifacts yet preserving the neural origin signals in EEG . It can be used efficiently for simultaneous fMRI and EEG recordings.
3.5 Sleep stage classification artifact handling
Manual artifact detection is still the most common method for artifact handling for sleep stage classification, however, the long time required and the difficulty to apply it to large datasets poses the main disadvantages . Malafeev et al.  compared 12 simple algorithms that are applicable with a single EEG channel for ease of use. It was found that automatic artifact detection in EEG during sleep within large datasets is possible with simple algorithms. Among these, Power thresholding 25–90 Hz (PT25), Power thresholding 45–90 Hz (PT45) and Autoregressive (AR) models had Reciever Operating Characteristic (ROC) areas above 0.95. In addition, online detection is also possible with the majority of these simple algorithms.
3.6 BCI Artifact handling
Artifact removal in BCI applications are getting more attention. By studies it was shown that artifacts generated by EOG and EMG activities affect the neurological signals utilized in a BCI system [10, 76]. Although there are extensive researches into artifact removal for BCIs and developed efficient methods such as Fully Online and Automated Artifact Removal (FORCe), Lagged Auto-Manual Information Clustering (LAMIC), Fully Automated Statistical Thresholding for EEG artifact Rejection (FASTER) and K-Singular Value Decomposition (K-SVD), the field lacks an effective artifact removal [12, 54, 77, 78, 79, 80, 81, 82]. The surrogate-based artifact removal (SuBAR) technique proposed by Chavez et al.  effectively cancels EOG and EMG artifacts from single-channel EEG. Chang et al.  proposed a method for detection of eye artifact from single prefrontal channel which is useful for headband-type wearable EEG devices with a few frontal EEG channels. Compared to conventional methods the accuracy of detecting ocular artifact contaminated epochs was significantly better. Daily-life EEG-BCIs are getting popular and artifact removal techniques for these BCIs must have some critical features such as; must be performed outdoor, with portable wearable wireless device, with real EEG signals, compatible with daily life tasks, must have simple electrical montage, must use dry electrodes, must remove complex artifacts, must work only EEG without reference, must work online and must work with single electrode channel. More research into artifact removal other than ocular and cardiac artifacts is necessary especially for those daily-life EEG BCIs .
While ICA and PCA are common artifact removal methods, Artifact Subspace Reconstruction (ASR), which is a powerful automated artifact removal method available for both online real-time and offline, can be applied to prevent transient and large artifact [46, 84]. It also does not require additional channel and cleans the data from artifacts.
The number of artifact handling techniques and algorithms are increasing drastically, however the artifact problem is still challenging for many applications. Particularly, the internal or physiologic artifacts are difficult to distinguish and remove. While simple measures such as artifact avoidance and artifact rejection can be utilized in some applications, most of the cases require special methods dedicated to handle artifacts in order to significantly reduce their harmful effects on signal of interest. Due to the varying nature of artifacts a generic method for all sorts of artifacts is still missing. However preprocessing pipelines provides some efficient approaches to this challenge. In future, the progress in machine learning and deep learning based approaches may yield more efficient, accurate and robust artifact removal options. Online artifact removal methods such as ASR must be developed to overcome various artifacts in daily life to be efficient for BCIs.