Electroencephalography Artifact Removal using Optimized Radial Basis Function Neural Networks

Electroencephalography (EEG) is a major clinical tool to diagnose, monitor and manage neurological disorders which is mostly affected by artifacts. Given the importance and the need for an automated method to remove artifacts, in this paper some intelligent automated methods are proposed which are composed of three main parts as extraction of effective input, filtering and filter optimization. Wavelet transform is utilized to extract the effective input, and the wavelet approximation coefficients are used as an effective input signal. In addition, Radial Basis Function Neural Network (RBFNN) has been used for filtering. The appropriate number of RBFs has been selected using extensive simulations, and the optimal value of spread parameter has been achieved by Bees algorithm (BA). Finally, the proposed artifact removal schemes have been evaluated on some real contaminated EEG signals in Mashad Ghaem hospital database. The results show that the proposed artifact removal schemes are able to effectively remove artifacts from EEG signals with little underlying brain signal distortion.


INTRODUCTION
1EEG is a major tool which is used to record the electrical activity on human brain. It is recorded using 10-20 electrode placement system on the scalp of a person with low spatial and high temporal resolution [1]. EEG is mainly affected by different artifacts which reduce its clinical usefulness. There exist two types of artifacts, namely, biological and external, where the former is mostly caused by electromyogram (EMG) or muscular activities, Electrooculogram (EOG) or ocular activities and electrocardiogram (ECG) or cardiac activities, however, the latter is mostly caused due to technical factors as electrode leads and lineinterference.
Most EEG artifact processing algorithms are developed to reduce biological artifacts, however, the effect of artifacts with technical origin is greatly reduced by improving technology and paying extra attention to electrode attachments to body surface [2]. Artifact removal is the most appropriate approach introduced to identify and remove artifacts from brain signals and keep the related neurological phenomenon intact. There exist different schemes to remove EEG signal artifacts in clinical studies. Examples include linear filtering, linear combination and regression, Blind Source Separation (BSS), Principal Component Analysis (PCA), Wavelet Transform (WT), regressionbased techniques, adaptive filters and neural networks.
Linear filtering is used to remove artifacts which are located in certain frequency bands and do not overlap with those of the neurological phenomena of interest [3]. In this regard, high-pass and low-pass filtering is utilized to remove EOG and EMG artifacts, respectively. In early clinical studies, linear filtering was commonly used to remove EEG signal artifacts [4]. Linear combination of EOG signal and EOGcontaminated EEG signal can be considered as one of the most common techniques to remove ocular artifacts from EEG signals [5]. BSS techniques are used to separate the EEG signals from their components. The aforementioned techniques are used to identify the components which are attributed to artifacts. Moreover, the EEG signal is reconstructed without them [6].
Recently, great attention has been paid to Independent Component Analysis (ICA) which can be considered as one of the most widely used techniques among BSS techniques. In ICA, mixtures of independent source signals are blindly separated and the components are forced to be independent. In [7], eye-blink artifacts are automatically removed from the EEG data. In this scheme, the EEG raw data is decomposed into independent components by ICA followed by Peak Detection Algorithm of Independent Component which is suggested to identify eye-blink artifact components. In [8], ICA and Empirical Mode Decomposition (EMD) are combined where ICA is used to obtain the independent components, however, EMD is applied to remove the ocular artifacts with larger amplitude in independent components. In [9], a hybrid approach is presented which is based on ICA and Adaptive Noise Cancellation (ANC). It is noted that ICA decomposition is utilized to extract the artifact source signal. 2 In PCA, data is transformed to a new coordinate system using the eigenvectors of signal covariance matrix. Afterwards, signal components are extracted by projecting the signal onto the eigenvectors. In [10], a wavelet-based threshold scheme and a PCA based adaptive threshold scheme are used to remove the ocular artifacts from EEG signals. In [11], ICA and PCA are applied to intracranial recordings, and three methods are proposed to remove the reference signal and line noise.
Wavelet Transform is a time-frequency analysis method which is suitable for non-stationary signals as EEG. It is based on different statistical characteristics of signal and noise [12]. In [13], a wavelet enhanced ICA method (WICA) is presented which uses wavelet thresholding to de-mixed independent components instead of the observed raw EEG. In [14], the wavelet-ICA and Support Vector Machine (SVM) are used to remove target artifacts. In this paper, SVM is used to identify artifactual components which are separated by wavelet-ICA. In [15], an automatic removal method is presented for Ocular Artifacts (OAs) to overcome EEG data interference. In this method, the Discrete Wavelet Transform (DWT) is applied to every recorded signal to achieve multiple scale coefficients.
There exist some regression-based methods including time and frequency domain [16][17]. These approaches involve calibration tests to determine the propagation coefficient between EOG channel and each EEG channel. In this case, eye blink artifact is removed by subtracting each EEG channel from the separately recorded EOG. It is worth nothing that the EOG signal which is subtracted from the recorded EEG signal contains some EEG information which introduces loss in the desired information [16][17].
Recently, adaptive filters have achieved widespread applications in different areas. Because of the time varying nature of signals arising from the human body, adaptive filtering is suggested for EEG artifact removal and many new approaches are presented to design adaptive nonlinear filters for noise cancellation [18]. In [19], ocular artifacts are removed from EEGs using DWT and ANC. In [20], an adaptive filtering technique is presented to remove ocular artifacts from EEG recordings using the forgetting factor and the filter length parameters. In [21], the combination of EEG decomposition with Adaptive Filters (AFs) is addressed to improve the overall denoising process.
Neural networks are an attractive approach in adaptive signal processing [22]. In [23], ocular artifacts are removed using JADE Algorithm and neural networks. In this regard, independent components are gained using JADE, however, neural networks are used to classify the obtained independent components. Also, there exist two neural network schemes to learn classification rules from the EEG data. In [24], a combination of adaptive noise cancellation and adaptive signal enhancement is presented in a single recurrent neural network for the adaptive removal of ocular artifacts from EEG.
In this paper, an intelligent method is proposed which is based on RBFNN. It can remove artifacts from EEG signals and is composed of three main parts as extraction of effective input, filtering and filter optimization. Also, WT is used to extract the effective input, and wavelet approximation coefficients are utilized as effective input signal.
The rest of the paper is organized as follows: Section 2 briefly presents the related preliminaries, Section 3 details the proposed method based on optimized RBFNNs with wavelet approximation coefficients as input, afterwards in section 4, the performance of our approach is assessed by a simulation set up, thereafter, section 5 provides the conclusion of this paper.

PRELIMINARIES
In this section, concepts on RBFNNs and WT are presented.

Concepts on RBFNNs
In this subsection, the structure of a neural network is presented [25]. In total, there are three layers in RBFNNs, i.e. input layer, hidden layer and output layer.

135
The importance of RBFNNs is due to the following main features: 1. Universal Approximation Property 2. Learning Capability The aforementioned features make the weights and adjustable parameters to constantly update and improve the total performance. The output of an RBFNN with n input and m neurons is as follows [25]: In the next subsection, WT is briefly presented.

Concepts on WT
EEG signals can be appropriately analyzed by reducing the signal noise before any further analysis [26]. An efficient method for de-noising the EEG signal is WT which is used to solve the resolution problem by using multi-resolution analysis. It is a tool which cuts up data, functions or operators into different frequency components, and then studies each component with a resolution which is matched to the corresponding scale [27].
There exist two types of WT, i.e. Continues Wavelet Transform (CWT) and Discrete Wavelet Transform (DWT). CWT is as follows [27]: Where, () xt is the original signal,  is the complex conjugation and a and b are the scaling factors. Also, , () ab t   is achieved by scaling the wavelet at time b and scale a . In CWT, the inner products of analyzing function and the original CWT signal is used and the similarity between these two functions is measured by integration. In CWT, it is assumed that a and b are continuously changing. The CWT drawback is that the wavelet coefficients shall be calculated for every possible scale which ends in a large amount of data. The aforementioned drawback can be overcome by using DWT.
DWT is another type of WT which uses the mutually orthogonal set of wavelets defined by choosing the scaling and translation parameters ( a and b ). DWT is as follows [27]: Remark1-In the current study, RBFNN is utilized because of its stability, good generalization ability, its easy design, online learning ability, and good input noise tolerance. Also, WT is used as an efficient method for de-noising the EEG signal.

THE PROPOSED METHOD BASED ON OPTIMIZED RBFNN WITH WAVELET APPROXIMATION COEFFICIENTS AS INPUT
In this paper, an intelligent method based on an RBFNN is presented to remove artifacts from EEG. The proposed scheme is composed of three main parts as extraction of effective input, filtering and filter optimization. WT is utilized to extract the effective input and wavelet approximation coefficients are used as an effective input signal. Afterwards, effective inputs are filtered for complete artifact removal. By applying WT, a two-level filtering system is achieved where the first level is wavelet approximation coefficients which remove some noise signals and the second level is the neural network which removes the remaining ones. RBFNNs have high potential in estimation and filtering. The number of RBFs and the spread parameter highly affect the performance of networks.
The Bees algorithm [28] is an optimization algorithm which is introduced in recent years and its ability to solve complex nonlinear problems has been proven. It is inspired by the natural foraging behavior of honey bees to find the optimal solution. It is a population-based search algorithm which mimics the food foraging behavior of swarms of honey bees. The basic version of BA performs a sort of neighborhood search which is combined with random search and can be used for both functional and combinatorial optimization. Bees algorithm shows remarkable robustness. It is able to converge to the maximum or minimum value without being trapped at local optima and it usually outperforms other methods in terms of optimization speed and accuracy [28]. In this paper, BA is used to find the optimal spread value. The number of RBFs is chosen the same as the training data, and the neural network is trained on the training data, so it may have poor performance on the test data. A solution for this problem is to construct an RBFNN with a single RBF. If an optimal solution is extracted from this RBFNN, the network is built. Otherwise, the number of RBFs is added by one and the network is tested again. This process is continued until the final optimal solution is achieved. The Flowchart of the proposed method based on optimized RBFNN with wavelet approximation coefficients as input is given in Fig. 1. The algorithm of our scheme is as follows: Step 1. Getting the EEG.
Step 2. Applying WT to EEG taken in step1.
Step 3. Constructing a neural network with an RBF.
Step 4. Using BA to find the optimal spread value for the constructed network regarding the following steps:  Setting BA parameters. Setting BA parameters as the total number of bees, the number of elite bees and the number of scout bees.
 Creating the initial population of bees.  Calculating eligibility. The mean square error (MSE) is used as eligibility criterion.
 Local searching. Scout bees must search around bees in elite groups one and two, until the final optimal solution is extracted.
 Global searching. Nonelite bees are distributed in the whole search area to prevent the optimization algorithm from being trapped in the local minimum.
 Stop criterion. If the stop criterion is reached, the algorithm stops and the network is built. Otherwise, go to step 4-C. In this algorithm, the stop criterion is chosen as the maximum number of iterations.
Step 5. If the network has an optimal performance, stop searching and the algorithm is finished. Otherwise, add one to the number of RBFs and go to step 4.
Continue this procedure until the number of RBFs becomes the same as the number of training data.

SIMULATION RESULTS
The proposed artifact removal schemes are evaluated on some real contaminated EEG signals in Mashad Ghaem hospital database with a sampling frequency of 256.There exist 3 artifact-free EEG data signal (baseline) and 355 artifact contaminating signal corresponding to 3 people. Also, three different artifacts are produced as eye blink, teeth grinding and swallowing. For each artifact, 61time trial is recorded and the recording time is considered 10 seconds.
In our proposed methods, the RBFNN is used as a filter. In this scheme, artifact-contaminated signals and baseline signals are considered as neural network input and output, respectively, and the MSE criterion is used as a performance criterion for neural network. In the simulations, 355 artifact-contaminated signals are used. 70% of data is used to train the neural network while the remaining data is utilized for the testing purpose.
In the following, two tests without and with wavelet approximation coefficients as input are performed. In each test, our proposed schemes are evaluated based on four types of RBFNNs: A. The proposed scheme based on precise nonoptimized RBFNN B. The proposed scheme based on precise optimized RBFNN C. The proposed scheme based on non-optimized RBFNN D. The proposed scheme based on optimized RBFNN Test1. Using the original data (without wavelet approximation coefficients as input)

A. The proposed scheme based on precise nonoptimized RBFNN
In this structure, the number of RBFs is chosen the same as the training data (250 RBFs are considered in this experiment). Also, the spread parameter value is obtained by trial and error. The results obtained using From Table 1, the impact of spread value on system performance becomes obvious and it can be concluded that it is essential to find a proper spread value. Fig. 2 shows the proposed scheme performance based on precise non-optimized RBFNN. It is clear that the performance is satisfactory.

B. The proposed scheme based on precise optimized RBFNN
In this structure, the number of RBFs is chosen the same as the training data (250 RBFs are considered in this experiment). Also, the spread value is obtained using BA. The spread parameter highly impacts the network performance. Table 2 indicates the BA parameters. The results obtained using this neural network are given in Table 3. Comparing Tables 3 and 1, the impact of spread value can be realized. Using BA, the optimal spread 3.11 is obtained which leads to the breakdown of MSE from 0.055 to 0.038 in precise optimized RBFNN. Finally, the performance of the proposed scheme based on precise optimized RBFNN is shown in Fig. 3.

C. The Proposed scheme based on non-optimized RBFNN
In this structure, the number of RBFs is optional and is set as an arbitrary value between1 to 250, where 250 is considered as the total number of the training 138 data. The best value for the number of RBFs is chosen by testing all possible values. Furthermore, for any network with a given number of RBFs, a good spread value can lead to a satisfactory performance. So, a neural network with an RBF is constructed and the spread value which leads to the lowest MSE for the network is achieved using trial and error. If the result is not satisfactory, the number of RBFs is added by one and the network is tested again. It is recommended to increase the number of RBFs to get the best possible result. The best spread value is achieved by trial and error. The flowchart of the proposed method based on non-optimized RBFNN is presented in Fig. 4 and the results obtained using this neural network are given in Table 4.   Tables 1, 3 and 4, the impact of choosing a suitable number of RBFs arbitrarily between 1 to 250 can be realized which leads to the breakdown of MSE from 0.055 and 0.038 in Tables 1  and 3, respectively, to 0.031 in Table 4. In Fig. 5, the proposed scheme performance is shown based on nonoptimized RBFNN.

D. The proposed scheme based on optimized RBFNN
In this structure, the number of RBFs is optional and is set as an arbitrary value between 1 to 250, where 250 is considered as the total number of the training data. Furthermore, for any network with a given number of RBFs, a good spread value can lead to a high performance. So, BA is used to find the optimal spread value in each step which enhances the neural network performance. The results obtained using this neural network are given in Table 5. Comparing Tables 5, 4, 3 and 1, the impact of choosing a suitable number of RBFs arbitrarily between 1 to 250 and using BA to find the optimal spread value can be realized which leads to the  Tables 1, 3 and 4, respectively, to 0.01 in Table 5. Fig.  6 shows the proposed scheme performance based on optimized RBFNN.

Test2-Using wavelet approximation coefficients as input
In this experiment, the effect of wavelet approximation coefficients as the input of neural network is investigated. Similar to the previous test, the proposed schemes based on four types of RBFNNs are evaluated using wavelet approximation coefficients. Exhausted simulations are performed and wavelet approximation coefficients for contaminated signals with different artifacts as eye blink, teeth grinding and swallowing are achieved, however, the wavelet approximation coefficients for only two contaminated signals with eye blink and swallowing artifact are presented in Fig. 7 for simplicity. WT acts as a filter for the original signal and eliminates artifacts. In this scheme, wavelet approximation coefficients are used as an effective neural network input. Fig. 7. a) Two contaminated signals with eye blink and swallowing artifact b) Wavelet approximation coefficients for the two signals at level five decomposition.
In Fig. 7-a, two artifact-contaminated signals are shown. It is clear that these two signals interfere with each other for many times because of artifacts. Using neural network learning algorithm, the main signal is achieved after artifact removal. However, because of the interference caused by artifacts, the incorrect training of neural network is possible which results in insufficient artifact removal. In Fig. 7-b, wavelet approximation coefficients at level five decomposition is shown for the two signals. Comparing Figs. 7-a and 7-b, it is clear that the interaction rate in Fig. 7-b is lower than Fig.7-a. It is noted that the higher level of decomposition does not mean better neural network performance. However, increasing the level of decomposition, renders more signal information to be disappeared and from a certain level, the neural network performance is degraded. Also, Haar wavelet is used in the simulations.

A. The proposed scheme based on precise nonoptimized RBFNN with wavelet approximation coefficients as input
In this structure, the number of RBFs is chosen the same as the training data (250 RBFs are considered in this experiment). In addition, the spread value is obtained by trial and error. Table 6 shows the results obtained using this neural network.  Table 6 shows that the best result is achieved at level one decomposition. Fig. 8 shows the proposed scheme performance based on precise non-optimized RBFNN with wavelet approximation coefficients as input.
From Table 6 and Fig. 8, it is clear that the RBFNN with wavelet approximation coefficients as input, proper number of RBFs and proper spread value at level one decomposition, renders a satisfactory performance. Moreover, comparing Fig. 8 with Fig.2, it can be realized that error is reduced and the neural network performance is improved.

B. The proposed scheme based on precise optimized RBFNN with wavelet approximation coefficients as input
In this structure, the number of RBFs is chosen the same as the training data (250 RBFs are considered in this experiment). In addition, the spread value is obtained using BA. Table 2 indicates the BA parameters. The results obtained using this neural network are given in Table 7.  Table 7, it is clear that the RBFNN with wavelet approximation coefficients as input, proper number of RBFs and proper spread value at level one decomposition, has better performance comparing with other levels of decomposition. Comparing Tables 7 and  6, the impact of spread value can be realized. Using BA, the optimal spread value is 2.93 which ends to the breakdown of MSE from 0.043 to 0.029 at the first level of decomposition. Fig. 9 shows the proposed scheme performance based on precise optimized RBFNN with wavelet approximation coefficients as input. Comparing Table 7 and Fig. 9 with Table 6 and Fig.  8, it can be realized that the former shows better performance comparing with the latter, since the spread value is achieved using BA in the former, however it is achieved by trial and error in the latter. Also, comparing Fig. 9 with Fig. 3, it can be realized that the error is reduced and the neural network performance is improved which is due to the use of wavelet approximation coefficients as input. In addition, the proposed scheme based on precise optimized RBFNN with wavelet approximation coefficients as input renders better performance comparing with the previous methods proposed in this paper.

C. The proposed scheme based on Nonoptimized RBFNN with wavelet approximation coefficients as input
In this structure, the number of RBFs is optional and is set as an arbitrary value between 1 to 250, where 250 is considered as the total number of the training data. In order to find the best value for the number of RBFs, all possible values are tested and the best value is selected. Furthermore, for any network with a given number of RBFs, a good spread value ends in a satisfactory performance. So, a neural network with an RBF is constructed and the spread value which leads to the lowest MSE for the network is achieved using trial and error. If the result is not satisfactory, the number of RBFs is added by one and the network is tested again. It is recommended to increase the number of RBFs to get the best possible result. Also, the best spread value is achieved by trial and error. Table 8 shows the results obtained using non-optimized RBFNN and using wavelet approximation coefficients as input.  Tables 8, 7 and 6, the impact of choosing a suitable number of RBFs arbitrarily between 1 to 250 can be realized which leads to the breakdown of MSE from 0.043 and 0.029 in Tables 6 and 7, respectively, to 0.009 at the first level of decomposition in Table 8. Fig. 10 shows the performance of the proposed scheme based on nonoptimized RBFNN with wavelet approximation coefficients as input.  Table 8 and Fig. 10 with Table 7 and Fig. 9 and Table 6 and Fig. 8, it can be realized that the former shows better performance comparing with the latter which is due to the impact of choosing a suitable number of RBFs arbitrarily between 1 to 250. Also comparing Fig. 10 with Fig. 5, it can be realized that the error is reduced and the neural network performance is improved which is due to the use of wavelet approximation coefficients as input. Also, the proposed scheme based on non-optimized RBFNN with wavelet approximation coefficients as input renders better performance comparing with the previous methods proposed in this paper.

D. The proposed scheme based on Optimized RBFNN with wavelet approximation coefficients as input
In this structure, the number of RBFs is optional and is set as an arbitrary value between 1 to 250, where 250 is considered as the total number of the training data. Furthermore, for any network with a given number of RBFs, a good spread value can lead to high performance. So, BA is used to find the optimal spread value in each step which enhances the neural network performance. The flowchart of the proposed method based on optimized RBFNN with wavelet approximation coefficients as input is presented in Fig.  1. Table 9 shows the results obtained using the proposed method based on optimized RBFNN with wavelet approximation coefficients as input.  7 and 6, the impact of choosing a suitable number of RBFs arbitrarily between 1 to 250 and using BA to find the optimal spread value can be realized which leads to the breakdown of MSE from 0.043, 0.029 and 0.009 in Tables 6, 7 and 8, respectively, to 0.001 at the first level of decomposition in Table 9. Fig. 11 shows the proposed method performance based on optimized RBFNN with wavelet approximation coefficients as input. Fig.11. Performance of the proposed method based on optimized RBFNN with wavelet approximation coefficients as input a) Comparison of the wavelet approximation coefficients of original signal and neural network prediction b) The neural network error.
Comparing Table 9 and Fig.11 with Table 8 and Fig. 10, Table 7 and Fig. 9 and Table 6 and Fig. 8, it can be realized that the former shows better performance comparing with the latter which is due to the impact of choosing a suitable number of RBFs arbitrarily between 1 to 250 and using BA to find the optimal spread value. Comparing Fig. 11 with Fig. 6, it can be realized that the error is reduced and the neural network performance is improved which is due to the use of wavelet approximation coefficients as input. Also, the proposed scheme based on optimized RBFNN with wavelet approximation coefficients as input renders better performance in comparison with the previous methods proposed in this paper.

Performance evaluation of various wavelet types
In this subsection, the proposed method is evaluated using various wavelet types. The results with various wavelet types at different decomposition levels are presented in Table 10. Table 10 shows that Haar wavelet at first level of decomposition performs better than other wavelet types.

CONCLUSION
In this study, novel artifact removal schemes based on RBFNNs are established. The proposed schemes are consist of three main parts as the neural network, the optimization and WT. In the first step, precise nonoptimized RBFNN is used to remove artifacts where the number of RBFs is equal to the number of training data and the spread value is obtained by trial and error. With this method, the neural network performance is satisfactory and the artifacts are almost removed. In the next step, BA is utilized to find the optimal spread value of precise RBFNN to enhance the performance. The simulation results show that using the optimization algorithms could significantly raise the performance of neural network. Afterwards, the number of RBFs are determined by trial and error to achieve better performance and less mean square error. Simulation results show that determining the proper number of RBFNNs and the use of BA can enhance the performance of neural networks. Next, WT is used to improve the RBFNN performance and reduce the computing time. Using wavelet approximation coefficients could significantly raise the performance of neural network. The impact of using wavelet approximation coefficients is shown by comparing the results with previous approaches where the original data is utilized as the neural network input. Finally, the optimized RBFNN with proper RBFs, optimal spread value and appropriate approximation wavelet input coefficients achieves the least mean square error among all schemes proposed in this paper.