Enhanced Automatic Wavelet Independent Component Analysis for Electroencephalographic Artifact Removal

Electroencephalography (EEG) is a fundamental diagnostic instrument for many neurological disorders, and it is the main tool for the investigation of the cognitive or pathological activity of the brain through the bioelectromagnetic fields that it generates. The correct interpretation of the EEG is misleading, both for clinicians’ visual evaluation and for automated procedures, because of artifacts. As a consequence, artifact rejection in EEG is a key preprocessing step, and the quest for reliable automatic processors has been quickly growing in the last few years. Recently, a promising automatic methodology, known as automatic wavelet-independent component analysis (AWICA), has been proposed. In this paper, a more efficient and sensitive version, called enhanced-AWICA (EAWICA), is proposed, and an extensive performance comparison is carried out by a step of tuning the different parameters that are involved in artifact detection. EAWICA is shown to minimize information loss and to outperform AWICA in artifact removal, both on simulated and real experimental EEG recordings.


Introduction
If the goal of our study is monitoring the ongoing electrical activity of the brain, it is likely that we will have to deal with electroencephalography (EEG).Even though it was introduced many years ago, EEG is still a first-line method in the diagnosis of many neurological disorders and in many brain-computer interface applications, because it is non-invasive and affordable [1].EEG is very noisy and often affected by artifacts, signals generated by artifactual sources (muscle movements, eye movements and eye blinks, sweating, breathing, heart beat, electrical line noise, etc.), whose electromagnetic fields mix with the bioelectromagnetic field generated by the brain during its activity, thereby corrupting it.In this way, the electrical activity of the brain might be partially or completely hidden, and consequently, EEG visual evaluation or EEG processing might provide incorrect results.Whatever the goal of our analysis is, a preprocessing step of artifact rejection is usually required when dealing with EEG, and it is normally carried out manually.Unfortunately, artifact removal is unavoidably a lossy procedure: we can either discard the entire artifactual epoch (which would make the real-time EEG processing impossible) or try to reduce the effects of artifacts in different ways.Thus, the goal must be reducing artifacts while losing the minimum amount of useful information embedded in the EEG.
Various efficient and computationally simple adaptive noise cancelers for EEG enhancement were proposed by Karthik et al. [2].A new method for artifact removal from single-channel EEG recordings using nonnegative matrix factorization (NMF) in a Gaussian source separation framework was introduced by Damon et al. [3], who focused their study only on ocular artifacts.A laudable comparison of different existing methods was made by Kirkove et al. [4], who identified 11 existing methods for dealing with ocular artifacts.They have carried out a comparative performance evaluation of the resulting 27 distinct methods using a common set of data and a common set of metrics.Daly et al. [5] presented a comparative study of automatic methods for removing blink, electrocardiographic and electromyographic artifacts from the EEG.They also presented an algorithm for identifying clean EEG epochs by thresholding statistical properties of the EEG, because the lack of a clear analytical metric for identifying artifact-free, clean EEG signals inhibits robust comparison of different artifact removal methods [6].Looney et al. [7] focused their attention on empirical mode decomposition (EMD), reviewed recent EMD-based denoising methods and illustrated similarities with a more conventional class of denoising techniques.As regards machine learning approaches, Bedoya et al. [8] proposed a fuzzy clustering approach, which supports the decision-making procedure imitating the human learning process, and it estimates the similarity among data leading to a non-iterative process.Additionally, Mateo et al. [9] introduced an artificial neural network as a filter to remove ocular artifacts.In order to improve the time efficiency of the brain-computer interface (BCI), Huang et al. [10] proposed swarm intelligence optimization (SIO)-based algorithms to analyze EEG for ocular artifact removal and P300 extraction.
Considering the approaches based on blind source separation (BSS) and, therefore, on independent component analysis (ICA), Winkler et al. [11] proposed a universal classifier for the subject independent removal of artifacts from EEG data.The evaluation of algorithms that use ICA for the automatic removal of artifacts in neonatal EEG before processing the EEG with the purpose of detecting seizures was discussed by De Vos et al. [12].Bartels et al. [13] introduced an algorithm that removes artifacts from EEG, based on BSS and support vector machine (SVM).Sriyananda et al. [14] analyzed signal recovery mechanisms for both orthogonal frequency division multiplexing (OFDM) and direct sequence-code division multiple access (DS-CDMA) with the assistance of the principles of BSS and gradient algorithms (GAs).Liao et al. [15] presented an online recursive ICA (ORICA)-based real-time multi-channel EEG system on-chip design with an automatic eye blink artifact rejection.They also proposed a real-time processing flow for an ICA-based EEG acquisition system with eye blink artifact elimination [10].An algorithm that combines independent component analysis and continuous wavelet transformation uses both the temporal and spatial characteristics of EKG-related potentials to identify and remove EKG artifacts and was proposed by Bagheri et al. [16].Grunwald et al. [17] presented a study about spontaneous facial self-touch gestures (sFSTG); the aim of the study was to investigate whether sFSTG are associated with specific changes in the electrical brain activity that might indicate an involvement of regulatory emotional processes and working memory.Akhtar et al. [18] proposed a framework, based on ICA and wavelet denoising (WD), to improve the pre-processing of EEG signals.Zeng et al. [19] proposed an approach to remove ocular artifacts from the raw EEG recording.Their method is based on the BSS on the raw EEG recording by the stationary subspace analysis, then EMD is applied to denoise the components.
Focusing our attention on artifact rejection in relation to different scenarios, depending on the mental states or the age, we can highlight that Bhattacharyya et al. [20] dealt with the issue of neonatal EEG, where the background EEG contains spikes, waves and rapid fluctuations in amplitude and frequency.They pointed out that most of the reference approaches are implemented and tested on adult EEG recordings and that direct application of those methods on neonatal EEG causes performance deterioration, due to greater pattern variation and inherent complexity.Betta et al. [21] proposed an automated analysis of rapid eye movement (REM) sleep, which includes both a REM detection algorithm and an ocular artifact removal system, the two steps based respectively on wavelet transform and adaptive filtering.
Removing artifacts while preserving the information content of the EEG requires a tool able to efficiently detect and separate the artifacts from the brain waves in order to suppress the artifactual waves.So far, a lot of techniques have been proposed to isolate and reject artifacts, but most of them are not automatic; in other words, they need an expert user to perform the detection and rejection steps.The issue of automatization is a key topic in EEG artifact rejection: in order to be labeled as "fully automatic", a technique is supposed to ensure that the user is not required to detect artifacts nor to interact with the algorithm until the final clean EEG is reconstructed.
The drawback of dealing with a non-automatic procedure is two-fold: real-time EEG processing is not possible, and deep knowledge about EEG artifacts is required.Of course, reaching high sensitivity and specificity with an automatic rejection algorithm is more challenging than succeeding with a semi-automatic method that is supervised by an expert; this is the reason why the automatic methods should be compared against each other, as well as the semi-automatic or manual methods should be compared to techniques belonging to their own category.
Another delicate issue is method evaluation.Artifact rejection methods should be first tested on simulated artifactual EEG (an artifact-free EEG recording where simulated artifacts are mixed artificially) in order to be able to compare the original artifact-free EEG with the EEG reconstructed after artifact rejection.Often, algorithms are tested only on real EEG, and their performances are evaluated just visually.
Very encouraging results were obtained; however, further improvement was required to minimize the EEG information loss and to make the technique more efficient and reliable.In fact, the AWICA technique is multi-step and parametric and needed to be optimized with respect to the involved parameters.The present paper introduces an extensive performance comparison with different parameter settings; moreover, a further step in the flowchart of the procedure was introduced to minimize the information loss due to artifact cancellation.This new methodology is called enhanced-AWICA (EAWICA).The key novelty is that the artifactual, independent components are no longer fully discarded, as happened with AWICA and with all of the other artifact rejection techniques that rely on ICA: only the artifactual segments of the components extracted by ICA are discarded, so that the useful information loss is further minimized.AWICA and EAWICA are here separately optimized with respect to their parameters and then, in their optimal configuration, they have been compared against each other, both on simulated and real EEG.The paper is organized as follows: Section 2 illustrates the EAWICA technique; Section 3 highlights which parameters of the procedure are tuned to be optimized; Section 4 reports the results; and Section 5 discusses the conclusions.

EAWICA Description:
AWICA and EAWICA are fully automatized methods for EEG artifact removal.AWICA and EAWICA are based on the joint use of wavelet transform, ICA and higher order statistics used as markers for automatic detection [22].The new method, EAWICA, here proposed is based on the same choice of parameters, but involves an additional detection step, which refines the detail of artifact detection further.The block diagram of EAWICA is depicted in Figure 1.
The technique will be now explained in detail, according to the sequence of the block diagram shown in Figure 1.Each step of the flowchart will be discussed in a separate subsection, following the same numbering of the blocks.

EEG Rhythm (Wavelet Components) Extraction Through DWT
EEG is buffered into non-overlapping windows of a length of 5 s and imported into MATLAB R as a matrix, whose rows correspond to the channels and whose columns correspond to the samples.Then, each window is analyzed separately.The first step (Block 1) consists of partitioning each EEG window into the four main brain waves (delta, theta, alpha and beta): therefore, each EEG signal is split into four time series, the four so-called wavelet components (WCs).For this purpose, discrete wavelet transform (DWT) is used [22].processing system for EEG artifact rejection.The EEG recording is first partitioned into the four major EEG brain waves, and the wavelet components (WCs) are extracted.The subset of artifactual WCs is then selected, passed through ICA, and the independent components (WICs) are extracted.The WICs affected by artifacts are detected by entropy and kurtosis and then passed through a further step: the automatic rejection of the artifactual epochs.Inverse ICA and wavelet reconstruction are then performed in order to recover an artifact-free EEG dataset.The blocks are numerically labeled according to the corresponding subsections of Section 2.

Automatic Artifactual WCs Selection
The next step (Block 2) consists of the automatic identification of the WCs showing artifactual activity.In order to detect them automatically, we need to quantify their degree of artifactuality.A critical WC is supposed to differ from the other components, because an unexpected transient event occurred and affected its frequency range (high randomness) or because it accounts for noisy background activity (low randomness): whatever the event, a measure of randomness might help to detect them.Since randomness is somehow the "litmus test" of artifactual activity, entropy plays a key role in automatic artifact detection, as it can estimate the randomness of a signal.On the other hand, EEG artifacts, like eye blinks, linear trends, etc., are typically characterized by a peaky distribution and could be detected by a measure of peakyness.
Therefore, the selection of artifactual WCs is based on two specific properties of the artifactual signals: randomness and peakyness.Proper metrics were selected in [22] to quantify these properties: namely Renyi's entropy and kurtosis.
EAWICA will estimate the entropy and kurtosis of each WC, and then, it will normalize them to 0-mean, 1-variance with respect to any other WC.Given a WC, if at least one of the two computed features will exceed a fixed threshold (Th1), the WC will be marked as critical and will be entered into the subset of WCs meant for ICA analysis.
We will investigate how AWICA and EAWICA perform with Th1 ranging from 1 to 1.5.Renyi's Entropy: As we pointed out at the end of the previous section, kurtosis and entropy are the markers meant for the automatic thresholding in Steps 2 and 4 of the block scheme in Figure 1.
Given a scalar random variable x, kurtosis has the following expression: (1) where m n is the n-order central moment of the variable and m 1 is the mean.Kurtosis is positive for "peaked" distributions (eye blink, cardiac artifacts, etc.), whereas it is negative for "flat" activity distributions (noise [28]).
As regards entropy, since AWICA and EAWICA rely on Renyi's definition, which depends on the entropy order α, this parameter can affect the performance of artifact detection and the subsequent artifact removal.
Renyi's entropy was introduced by the authors to automatize artifact detection [23], but the effect of α on artifact removal has never been investigated.
Renyi's entropy is defined as: where α (α ≥ 1) is the order of entropy, and the expression (4) comes from the application of kernel estimators.Given a time series, we can think about it as a random variable X = {X 1 , ..., X n }.In case of a very random signal (i.e., the component accounting for noisy background activity), the probabilities will be uniformly distributed and the entropy will be low (because the argument of the logarithm tends to n/2 ≥ 1).In case of no random signal (signal accounting for a transient event), most of the values will have high probability and some values (those which occurred during the transient event) will have low probability; the overall contribution to entropy will be high (the argument of the logarithm tends to zero).Here, the random variables whose entropy will be estimated are the WCs (Step 2 in Figure 1) and the WICs (Step 3 in Figure 1).For a random variable x, with N given samples, Renyi's entropy is defined as: where k σ is the kernel function and indexes i and j range from 1 to N, the number of samples in the Parzen window [29].This is the formula that was used, together with kurtosis, in Steps 2 and 4 of Figure 1.
We will investigate how AWICA and EAWICA perform with α ranging from 2 to 7. The optimal entropy order to process different kinds of source signals was identified as in the range of 1.2-6.4[29], with 5 being the value that provided the best results and 2 being the value that equally emphasized sub-Gaussian and super-Gaussian sources.Since for very large alpha values, performance deteriorated, we considered the range of 2-7 as the most interesting to investigate.

Wavelet Independent Components Extraction
Once the artifactual WCs have been selected and arranged as rows of a matrix, the next step (Block 3) is passing the artifactual WCs through ICA in order to extract the artifactual content and concentrate it in one or more artifactual independent components.Therefore, once the artifactual WCs have been selected and entered into the subset x, x is passed through ICA in order to extract the set u of wavelet independent components (WICs).The INFOMAX algorithm, particularly suitable for EEG processing [30,31], was selected to perform ICA.In order to properly take into account either sub-Gaussian and super-Gaussian signals, the extended-INFOMAX version was used [32].

Automatic Artifactual WICs Selection
The next step (Block 4) is the automatic selection of the artifactual WICs.At this stage of the procedure, ICA has projected the artifactual content embedded in the original EEG into one or more WICs.EAWICA is now supposed to detect them automatically.
To this purpose, the WICs (matrix u) need to undergo a process of estimation of their degree of "artifactuality".In order to classify a WIC (row of matrix u) as artifactual or not, every WIC was divided into 1-s non-overlapping segments (named "epochs"), and two markers (kurtosis and entropy) were estimated for each epoch and for each WIC.Once each marker has been estimated and arranged as a n × m matrix, where n is the number of WICs and m is the number of epochs, the columns were normalized to zero-mean and unitary standard deviation, so that, within each epoch, the marker value of a WIC is compared to the same marker values of every other WIC.The WICs whose kurtosis or entropy exceeded a fixed threshold (Th2) in more than 20% of the epochs are selected, but not rejected.The threshold 20% is chosen according to [33].
We will investigate how AWICA and EAWICA perform with Th2 ranging from 1 to 1.5.

Artifactual Epochs Rejection
In AWICA, and generally in all of the techniques that are based on ICA, the independent components accounting for any artifact are normally entirely suppressed and the EEG is reconstructed totally discarding them.Usually, observing an artifactual independent component, cerebral activity is also visible, due to the impossibility of perfectly separating the artifactual signal from the brain waves.The main innovation of EAWICA is that only the artifactual segments in the artifactual components are canceled; therefore, the information about brain waves is better preserved in the segments not affected by artifactual activity.Once the artifactual WICs are selected as described in Section 2.1.4,they are gathered together in a matrix, and the samples (columns) belonging to the epochs where kurtosis or entropy exceeded threshold Th2 were set to zero.In other words, the epochs showing the artifactual event are detected and removed from the WICs, in order to preserve the brain waves as much as possible and minimally distort the EEG.This means that, once the artifactual WICs have been selected, for each WIC, the epochs where kurtosis or entropy exceeded the fixed threshold Th2 are canceled (the values are set to zero in that specific epoch).In order to emphasize the difference between AWICA and EAWICA, we plotted the group of independent components WICs (Figure 2) extracted during the processing of the dataset affected by eye blink artifacts and the corresponding WICs cleaned by AWICA (Figure 3) and by EAWICA (Figure 4).It is clear that the behavior of EAWICA is less invasive, because only the critical epochs of the WICs previously marked as artifactual are suppressed, whereas AWICA suppresses them completely.

Reconstruction
Finally, the EEG is reconstructed in three steps: inverse ICA to reconstruct the artifact-free WICs (u af ) and inverse DWT to reconstruct the artifact-free WCs.Finally, the overall artifact-free EEG dataset is reconstructed.Inverse ICA can be performed multiplying u af by the inverse of the estimated unmixing matrix W, so that the dataset of WCs is reconstructed, discarding artifactual epochs.(x rec ).
The artifact-free wavelet components x rec are restored in the original WCs dataset.Then, the inverse DWT is performed in order to reconstruct the "clean" EEG recording.

Semi-Simulated EEG
This dataset consists of the mixing of an artifact-free EEG and some synthesized artifacts.The synthesized artifacts are described in [28].Going into detail, four types of artifacts were synthesized: eye blink, muscular activity, electrical shift and linear trend.We modeled electrical shift artifacts by implementing discontinuities, linear trends with a slope of 100 µV per second, temporal muscle artifacts using random noise band-pass filtered (FIR) between 20 and 60 Hz and eye blinks by random noise band-pass filtered (FIR) between 1 and 3 Hz.
Artifact-free EEG data are from a database available online (ftp://ftp.ieee.org/uploads/press/rangayyan/), which consists of an 8-channel artifact-free EEG.The sampling rate is 100 Hz, and the time duration is 7.5 s.The electrode montage and the EEG recording are shown in [24].
In order to simulate an artifactual EEG, we mixed the synthesized artifacts to the central or frontal electrodes of the EEG one by one (with a 0-dB signal-to-noise ratio).As a result, we obtained four EEG dataset, where two channels are corrupted by artifacts.In the case of eye blinks, only the two frontal channels were corrupted, because they are the ones that mostly take into account the effects of blinking.In the case of muscular activity (for example, due to chewing movements), generally, few channels are interested, that is what we simulated adding the artifact to 2 over 8 channels.Heavy muscular artifacts involving all of the channels are usually generated, for example by some epileptic seizures, and it will be the focus of our next studies.In the case of electrical shift (due to the electrode shift of a temporary disconnection) or in the case of a linear trend (transient recording-induced current drifts and electrical pop), it is likely that just one electrode is involved, but in order to simulate an unfavorable condition, we mixed the artifact into two channels.

Real EEG
As regards the real EEG, we used the dataset included in the toolbox "EEGLab", version 11 (http://sccn.ucsd.edu/eeglab/).It consists of a 32-channel, 238-s recording with a 128-Hz sampling rate showing several artifacts.

Method Optimization
The goal of the present paper is to improve AWICA through the introduction of the further step of artifactual epoch detection and cancellation, preserving the brain waves embedded in the extracted independent components.Moreover, since AWICA and EAWICA are multi-step and parametrical procedures, in order to optimize them, we need to investigate how their performances depend on the involved parameters.In particular, we focused on the dependence on α, Renyi's entropy order and the two thresholds that are used for artifactual WCs and artifactual epochs detection: Th1 (Section 2.1.2) and Th2 (Section 2.1.4),respectively.The four simulated artifactual EEG dataset were thus processed by either AWICA and EAWICA with α ranging from two to seven and with Th1 and Th2 ranging from 1 to 1.5 with a 0.1 step.
The performance of the techniques was evaluated comparing the original artifact-free EEG and the EEG reconstructed after the rejection of the artifacts, which were artificially mixed.The potential recorded at electrode "x" represents a random variable, and the collected samples represent a time series; therefore, each EEG channel is associated with a time series.The measures we used to compare the original time series (original EEG signal) and the reconstructed time series (reconstructed EEG signal) are RMSE and peak signal-to-noise ratio (PSNR).PSNR is a measure of the peak error and is expressed in decibels.PSNR is here used to measure the quality of lossy reconstruction: the signal in this case is the original artifact-free EEG, and the noise is the error due to signal reconstruction after artifact rejection.The higher the PSNR, the better is the quality of the reconstructed signal.

AWICA and EAWICA Optimization
AWICA and EAWICA were implemented in MATLAB R R2011b and were applied to the four synthesized artifactual dataset (the toolbox is open source and available, if interested; please send an email to the corresponding author: nadiamammone@tiscali.it).
With regard to the semi-simulated EEG, since the frequency range was 0-50 Hz, aN = 6 level wavelet decomposition was implemented to partition the frequency range of interest into the sub-bands corresponding to the major EEG rhythms (delta: 0-4 Hz, theta: 4-8 Hz, alpha: 8-12 Hz, beta: above 12 Hz) and to discard the DC effects (Figure 5 shows the corresponding wavelet decomposition tree).Considering the real EEG, since the frequency range was 0-64 Hz, a N = 7 level wavelet decomposition partitioned the EEG into the four sub-bands discarding the DC component (Figure 6).The chosen wavelet family is the Daubechies order four wavelet (db4), being particularly suitable when dealing with EEG signals [34].

Test on Semi-Simulated EEG
As described in Section 3, the four simulated artifactual EEG datasets were processed by AWICA and EAWICA with α ranging from two to seven and with Th1 and Th2 ranging from one to 1.5 with a 0.1 step.As there are six possible values for either α, Th1 and Th2, there are 216 different parameter settings.Every EEG dataset (the four datasets described in Section 2.2) was processed by AWICA and EAWICA in every possible parameter settings (216 parameter settings); therefore, 864 test were carried out.Figure 7 shows the results of AWICA vs. EAWICA comparison.The original artifact-free EEG and the final reconstructed EEG are compared, and the result associated with a specific setting is represented by a point in the subplot.The parameters used to compare the two signals are the peak-SNR and the RMSE (the settings corresponding to the largest PSNR, and the smallest RMSE ensures the best performance and is defined as optimal).We can infer that, substantially, EAWICA outperformed AWICA, because, in each subplot, the point associated with the largest PSNR and the smallest RMSE was yielded by EAWICA.We can also infer that the largest discrepancy between AWICA and EAWICA can be observed in eye blink and electrical shift artifact removal, with a 10% PSNR gap between the two optimal settings.Analyzing the results in detail, we can select the Th1-Th2-α settings the provided the best results.AWICA: the eye blink was optimally removed with Th1 = 1.5, Th2 = 1.5 and α = 2; muscular activity with Th1 = 1.3, Th2 = 1.4 and α = 2; electrical shift with Th1 = 1, Th2 = 1.4 and α = 2; and the linear trend with Th1 = 1.5, Th2 = 1.5 and α = 4. EAWICA: Eye blink was optimally removed with Th1 = 1.5, Th2 = 1.5 and α = 3; muscular activity with Th1 = 1.3, Th2 = 1.5 and α = 6; electrical shift with Th1 = 1.2, Th2 = 1 and α = 6; and the linear trend with Th1 = 1.3, Th2 = 1 and α = 7.
It is worth remarking that the best performance of EAWICA was associated with higher α, whereas α = 2 was almost always enough to perform well with AWICA, except with the rejection of the linear trend.Once the optimal settings were selected, the visual evaluation of the performance of artifact rejection was necessary.For this purpose, the original artifact-free EEG, the artificially-contaminated EEG and the final reconstructed clean EEG are represented for each simulated artifactual EEG dataset in Figure 8. Once the optimal Th1-Th2-α configuration was selected for either AWICA and EAWICA, the two techniques were tested against each other over the four semi-simulated artifactual EEG dataset (EEG with eye blink, muscle activity, electrical shift and linear trend).Each subplot shows the original artifact-free EEG, the EEG with the simulated artifact and the EEG reconstructed after artifact rejection.For eye blink removal, the channels involved are: Fp1 (Ch1) and Fp2 (Ch2).For the other artifacts, the channels involved are C3 (Ch1) and C4 (Ch2).The left column shows the results of AWICA artifact removal, whereas the right column shows the results of EAWICA artifact removal.EAWICA removed eye blink artifact and muscular activity better than AWICA; furthermore, it removed electrical shift and linear trend artifacts with a lesser distortion and attenuation of the EEG, especially in the artifact-free segments.
Considering AWICA, the best performance was achieved in eye blink and muscular activity suppression.Electrical shift and the linear trend were reduced, but the EEG was partially distorted also in the artifact-free segments.Considering EAWICA, it provided better results in the removal of every artifact, together with lesser attenuation and distortion of the EEG signal in the artifact-free segments.
In order to investigate the severity of the distortion, the power spectrum of the artifact-free and reconstructed data are compared.Given the four semi-simulated artifactual EEG dataset on which AWICA and EAWICA were tested, in order to assess the effects of signal distortion, a comparison between the power spectral density (PSD) of a given artifact-free EEG signal and the PSD of the corresponding EEG signal corrupted and then reconstructed by AWICA and EAWICA is shown (Figure 9).We can infer that the PSD of the signals reconstructed by EAWICA overlap the PSD of the corresponding original artifact-free signals.Only considering eye blink removal, at about a frequency of 4 Hz, a distortion occurred.

Test on Real EEG
When EEG undergoes real-time processing, no a priori knowledge is available about the possible upcoming artifacts; therefore, we can look for a parameter settings that ensures good performance for different kinds of artifacts.Given this goal, we should look for the Th1-Th2-α configuration that provides relatively high PSNR and low RMSE in the removal of each artifact.
In particular, we selected the configuration that provided, for every artifact, a PSNR value above a certain percent threshold of the best PSNR (of the PSNR value reached through the optimal Th1-Th2-α configuration).In other words, we normalized each PSNR value with respect to the highest PSNR value and multiplied by 100.We found that the configuration Th1 = 1.1, Th2 = 1.2 and α = 5 ensured at least 91.8% of the best performance for every kind of artifact.
This parameter configuration was selected when processing the real EEG.In the real EEG, eye blinks, eye movements, electrical shifts and muscle activity occurred.EAWICA successfully detected and reduced them, and the performance was visually assessed by an expert physician (the original EEG and the final reconstructed EEG are provided as supplementary material).
Figures 10 and 11 show examples of successful artifact removal for every kind of artifact.In the Supplementary Material, the whole original EEG and the corresponding EEG cleaned by EAWICA are provided.EAWICA performance on artifact removal from real EEG.EAWICA was applied with the Th1-Th2-α overall optimal configuration that provided relatively high PSNR in the removal of each artifact (see Section 4.3).Each subplot in the left column shows an example of the artifact that occurred in the real EEG, and the corresponding subplot on the right column shows the EEG cleaned by EAWICA.

Conclusions
In this paper, the importance of electroencephalography (EEG) artifact removal was addressed.Since EEG is one of the key and most widespread techniques used to gain knowledge of the ongoing cerebral activity and since artifacts are unwelcome signals that may overlap the electrical activity of the brain and can affect EEG processing, artifact removal is a necessary pre-processing step, whatever the purpose of our EEG analysis is.Unfortunately, artifact removal is unavoidably a lossy procedure; therefore, we must aim to reduce artifacts, saving most of the useful information embedded in the EEG.To acquire this target, in this paper, we investigate the optimization of automatic wavelet-ICA (AWICA), a multi-step and parametrical technique recently proposed by the authors, and we propose its evolution to EAWICA (enhanced AWICA).The present paper shows the results of parameter optimization, in AWICA and EAWICA, with respect to different kinds of artifacts.EAWICA was shown to outperform AWICA for every kind of artifact over a simulated dataset.In order to process real EEG with no a priori knowledge about the upcoming artifacts, a parameter configuration that provides relatively good performance in the removal of every artifact was necessary.We found a parameter configuration that ensured 91.8% of the best performance in the removal of every kind of artifact.A real EEG was processed, and the artifacts were significantly reduced.Our future work will be devoted to improving EAWICA efficiency in order to make real-time EEG processing possible.

Figure 1 .
Figure 1.Description of the block diagram of the enhanced-wavelet-ICA (EAWICA)processing system for EEG artifact rejection.The EEG recording is first partitioned into the four major EEG brain waves, and the wavelet components (WCs) are extracted.The subset of artifactual WCs is then selected, passed through ICA, and the independent components (WICs) are extracted.The WICs affected by artifacts are detected by entropy and kurtosis and then passed through a further step: the automatic rejection of the artifactual epochs.Inverse ICA and wavelet reconstruction are then performed in order to recover an artifact-free EEG dataset.The blocks are numerically labeled according to the corresponding subsections of Section 2.

Figure 2 .
Figure 2. The independent components wavelet independent components (WICs) extracted during the processing of the dataset affected by eye blink artifacts.

Figure 3 .
Figure 3.The WICs shown in Figure 2 after they have been processed and cleaned by AWICA.

Figure 4 .
Figure 4.The WICs shown in Figure 2 after they have been processed and cleaned by EAWICA.

Figure 5 .Figure 6 .
Figure 5. Wavelet decomposition tree used for the simulated artifactual EEG dataset.The legend illustrates which details are used to reconstruct the brain waves.Since the frequency band was 0-50 Hz, a small approximation was used to reconstruct delta, theta and alpha bands.

Figure 7 .
Figure 7. AWICA vs. EAWICA performance comparison for different Th1-Th2-α settings and different kinds of artifacts: eye blink (top-left); muscular activity (subplot top-right); electrical shift (bottom-left); linear trend (bottom-right).The original artifact-free EEG and the final reconstructed EEG are compared.The parameters used to compare the two signals are the peak-SNR and the RMSE (the settings corresponding to the largest PSNR and the smallest RMSE ensures the best performance and is defined as optimal).The x-axis accounts for percentual RMSE (referring to the overall largest RMSE, when the results of either AWICA and EAWICA are considered), and the y-axis accounts for percentual PSNR (referring to the overall largest PSNR, when the results of either AWICA and EAWICA are considered).The results yielded by AWICA are represented by a red (o), whereas the results yielded by EAWICA are represented by a blue (+).

Figure 8 .
Figure 8. Visual comparison between the performance of AWICA and EAWICA in the artifact rejection.Once the optimal Th1-Th2-α configuration was selected for either AWICA and EAWICA, the two techniques were tested against each other over the four semi-simulated artifactual EEG dataset (EEG with eye blink, muscle activity, electrical shift and linear trend).Each subplot shows the original artifact-free EEG, the EEG with the simulated artifact and the EEG reconstructed after artifact rejection.For eye blink removal, the channels involved are: Fp1 (Ch1) and Fp2 (Ch2).For the other artifacts, the channels involved are C3 (Ch1) and C4 (Ch2).The left column shows the results of AWICA artifact removal, whereas the right column shows the results of EAWICA artifact removal.EAWICA removed eye blink artifact and muscular activity better than AWICA; furthermore, it removed electrical shift and linear trend artifacts with a lesser distortion and attenuation of the EEG, especially in the artifact-free segments.

Figure 9 .
Figure 9.Comparison among the power spectral density (PSD) of the artifact-free EEG and the PSD of the corresponding EEG reconstructed by AWICA and by EAWICA.The two techniques were tested against each other over the four semi-simulated artifactual EEG dataset (EEG with eye blink, muscle activity, electrical shift and linear trend).Each subplot corresponds to a different artifact removal and shows the three PSDs (original artifact-free EEG, EEG reconstructed by AWICA and EEG reconstructed by EAWICA).

Figure 10 .
Figure10.EAWICA performance on artifact removal from real EEG.EAWICA was applied with the Th1-Th2-α overall optimal configuration that provided relatively high PSNR in the removal of each artifact (see Section 4.3).Each subplot in the left column shows an example of the artifact that occurred in the real EEG, and the corresponding subplot on the right column shows the EEG cleaned by EAWICA.

Figure 11 .
Figure 11.EAWICA performance on artifact removal from real EEG.EAWICA was applied with the Th1-Th2-α overall optimal configuration that provided relatively high PSNR in the removal of each artifact (see Section 4.3).Each subplot in the left column shows an example of the artifact that occurred in the real EEG, and the corresponding subplot on the right column shows the EEG cleaned by EAWICA.