De-noising of EEG signals with shift-based cycle spinning on wave atoms

EEG signals offer qualitative insights during brain disorder analysis and help in the brief assessment of brain diseases. However, EEG signal acquisition is susceptible to noise of various kinds and renders the analysis phase difficult and ill-posed. Hence, an appropriate technique is necessary to reduce the impairment effect caused by the noise on analysis. Wavelet thresholding is one of the most widely used techniques to recover the EEG signals from the noise. However, all the variants of wavelet thresholding algorithms suffer from pseudo-Gibbs phenomenon leading to ringing effect. Wave atom is a novel multiscale–multidirectional transformation technique. However, this wavelet thresholding produces pseudo-Gibbs phenomena, which are visual distortions and oscillations in the area of signal processing. The widely appreciated wave atom transformation too fails from artifacts around the sharp edges. The proposed shift-based cycle spinning technique of wave atom transformation model estimates the thresholding parameter, in an unbiased manner, from the data and de-noises the signal in a translation-invariant manner. De-noising studies on the OpenNeuro EEG dataset indicate the usefulness of the suggested technique. The results are analysed based on the performance measurements SNR and MSE that establish an advantage of shift-based cycle spinning model in getting better results.


Introduction
Electroencephalography (EEG) records the electrical signal on skull surface area of human brain. The analysis of EEG signal is required to detect the abnormal functionality of brain. However, various types of noise can corrupt the signal. So, the signal diagnosis becomes more difficult because of noise. Therefore, these noises need to be removed from the signal for better diagnosis. For denoising EEG signals, DWT is the widely used among the techniques. Several works proposed the use of different wavelets and thresholding techniques of DWT (Biswas and kazi Rayadul Hasan 2015). Soft thresholding, hard thresholding, sigmoid thresholding and other thresholding techniques can be used (Sharma and Verma 2016). Researchers frequently use wavelet transforms to detect noise in EEG signals, but they are only sensitive at the signal's edges (Candes and Demanet 2005;Candes and Donoho 2004).
Coifman and Donoho proposed cycle spinning mechanism as an improvement over the fundamental wavelet thresholding methods (Coifman et al. 1995). As a result, Coifman and Donoho proposed the cycle spinning technique as an upgrade to simple wavelet thresholding. The proposed method used shift-variant property of wavelet transform. The cycle spinning technique is primarily used prevent de-noising aberrations . Furthermore, pseudo-Gibbs phenomena can be effectively controlled by the combination of cycle spinning technique with wave atoms. Noisy signals are represented by varying signal shifts when using the time-variant wavelet transform. By using this process, one can extract the original signal from the noisy one. Different errors are discovered in different shifts, and signal averaging reduces them. In wave atoms of the given signal, there is a sparsity in oscillation function than that of wavelet, Gabor atoms (curve wave) (Demanet and Ying 2007a). Wave atoms capture the pattern through oscillation and vibration mode in contrast with curve wave. Pseudo-Gibbs invented the artificial visual distortion phenomenon to overcome the translation invariance in a noisy signal. Now cycle spinning is proposed on wave atoms to overcome the limitations found at the edges of the noisy signal (Zhang et al. 2014;Plonka and Ma 2008). Hence, wave atom can produce better results using cycle spinning.

Literature survey
Form this literature survey, cycle spinning with appropriate number of shifts could give better results for removal of noise from EEG signals. Rodriguez-Hernandez (2016) proposed an algorithm to implement one of the undecimated wavelet transforms (UWTs) which is cycle spinning (CS) to analyse the signal. He applied a variant of cycle spinning to ultrasonic trace de-noising. He assured that his technique produced better results in de-noising the ultrasonic signals. Zhang et al. (2014) found that de-noising of image by thresholding the coefficients may lead to pseudo-Gibbs phenomena. This is because of lack of translation invariance in wave atom transformation. Therefore, they use cycle spinning method to remove noise and remain edges by controlling pseudo-Gibbs phenomena efficiently. Alyson et al. (2002) introduced a new algorithm recursive cycle spinning. This algorithm repeatedly translates and denoising the signal with wavelet de-noising technique translating back recursively and applied convergence properties of projections. Finally, the de-noising projections converge to the original signal.
Jiao (2019) suggested a method that use wave atoms with cycle spinning for removal of heavy background noise from an image. He concluded that wave atoms are a promising multiscale transformation available for the removal of image noise. Eddine and Hassene (2017) decided that the wave atom transformation uses more parameters like dimension, location, orientation, etc. Because of good orientation characteristic, wave atom transformation performs much better than wavelet and curvelet transforms. Eddine et.al. proposed algorithm is based on hard thresholding that optimizes the performance of wave atom transform. Shruthi and Kumar (2017) denoised the images by decomposing them using wave atom transform and wavelet transforms. Constrained least square filtering is the algorithm employed, followed by a denoising procedure. By separating the image into texture and cartoon sections, Sruthi and Kumar de-noised the image using curvelet transform. The texture part is de-noised using wave atom transform, while the cartoon part is denoised using wavelet transform. Hard thresholding is applied to preserve edge details. John et al. (2017) proposed an algorithm which uses cuckoo search algorithm to optimize coefficients of wave atom transform. Optimization techniques are used to reduce noise. Adaptive thresholding method is applied to de-noise the signal.

Wave atom transform for de-noising
For the sake of completeness of the discussion, a brief discussion on the definition and characteristics is taken place.

Introduction to wave atoms
The wave atoms { u u (X)} are the elements of wave packet framework that satisfies scaling and rotation-related properties of waves in frequency domain as formalized below.
Only a qualitative description of wave atoms with spatial frequency location limitations is provided by the definition. The wave atom transform does not comply with the features of wavelets with reference to the frequency localization capabilities and thus resulted in translation variance. The intuitions of Villemose (2002) addressed this limitation by constructing the wave atoms as a tensor product of adequately chosen 1D wave packets. His trick involved designing of basic functions which are bounded in both the domains, time and frequency, which is not at the disposal of conventional multiresolution analysis such as wavelets. The cosine window-based frequency domain filtering had effectively minimized the aliasing effect in denoising algorithms (Kolaczyk 1994).

Signal de-noising
De-noising of signals is the pre-processing step for obtaining quality results in biomedical signal analysis. It is essential to develop the de-noising filters that work in either spatial or transformed domains. The wavelet packetbased transforms such as Gabor, ridgelets, curvelets and wave atoms are concisely specified using a and b parameters. The parameter a determines whether the separation of components is multistate (a is equal to 1) or not (a is equal to 0) and the parameter b determines whether the basic elements are regional and bounded. When b = 1, then it is poorly directional, also referred to as isotropic, and when b = 0, then it is fully directional or anisotropic. Thus, we can classify the transform based on these parameters a and b as follows. For wavelets, a is 1 and b is 1, for ridgelets, a is 1 and b is 0, for Gabor, a is 0 and b is 0, for curvelets, a is 1 and b is , and for wave atom, a corresponds to 1/2 and b is 1/2. The following figure summarizes this classification ( Fig. 1) Wave atoms are invented from one-dimensional wave packets. One-dimensional wave packets can be characterized as (Boutella and Serir 2013).
The wave packet framework elements are known as wave atoms: Wave atom transform captures the oscillatory patterns and finer textures present in the signals and offers a robust mechanism for de-noising. It conforms to the relation of parabolic scaling, i.e. wavelength * (diameter) 2 . • w j u (x), j and mC0, and n [ Z. • u represents scale parameter, rotation and translation.
For 1D systems, this u will be u=(d, m, n) and for 2D systems this u will be (j, m1, m2, n1, n2) where j, m1, m2, n1, n2 are integers and index of point (x j,n , ±x j,m ) in the phase space. • ±x j,m = ±p2 j m: Frequency restrictions are defined as centre of frequency domain with C 1 2 j B m B C 2 2 j . • The centre of space is defined as X j,n = 2 j n. The pseudo-Gibbs phenomenon results in mistakes at edges and in texture elements because wave atoms lack  Thresholding is an important step, and the threshold should be chosen using a data-driven approach. For the sake of completeness, a discussion of several thresholding strategies is included here.

Shift-based cycle spinning
The intuitions behind de-noising method based on cycle spinning revolved around the preservation of edge characteristics. However, that method did not characterize the nature of the noise, and hence, it perceived it as white noise. But the signal generating modality might induce noise with some spatial characteristics. Hence, it is prudent to address the noise characteristics by modelling it wellproven kernel functions. For example, moving average scheme is the most computationally efficient and effective algorithm to handle first-order stationary noise. RBF, Gaussian and Spline kernels are capable of addressing the complex noise patterns over higher-dimensional space by casting them over a random fields. These spatial kernels are tunable for addressing isotropic and anisotropic noise models efficiently provided the hyper parameters are learnt from the data using either machine learning or computational intelligence algorithms (Raghava et al. 2016). The EEG signals are of one-dimensional signals, and the induced noise is also span in one-dimensional. Hence, the noise exhibits the spatial characteristics along time dimension and correspondingly dampens the signal. Such a 1-D influence can be efficiently handled using a moving average base d technique. The careful integration of this intuition into cycle spinning technique will improve the quality parameters. In this technique, we can compute different estimates of unknown signal using different shifts of noisy signal and then linearly average them. For each shift, the wave atom coefficients are obtained by performing cycle spinning technique. The application of denoising is done through wave atom coefficients at analysis stage, over the coefficients d s,j , and a s,j as shown in the following figure (Fig. 8).
The application of thresholding to these coefficients will produce de-noised new coefficients d' s,j and a' s,j as shown in the following figure, which made as input for the next synthesis stage. An inverse wave atom transformation and reverse cycle spinning are applied over these coefficients. Finally, de-noised signal can be obtained by averaging all these results (Fig. 9).

Proposed unbiased shift-based cycle spinning algorithm (SCS)
Step 1: Perform cycle spinning on a noisy signal u and obtained S(u).
Step 2: Wave atom transformation is applied on S(u) and transformation coefficients are acquired.
Step 3: Calculate an unbiased threshold value, K h.
Step 4: Apply the unbiased threshold on the cycle spinning-based wave atom coefficients.
Step 5: Take inverse wave atom transformation for the coefficients obtained in step 4.
Step 6: Apply reverse cycle spinning on the signal obtained in step 5.
Step 7: Repeat Steps from 1 to 6, and compute the averaging of all shifted signals about u, resulting in a final de-noised signal.

Threshold selection
The steps of Algorithm 1 show that the thresholding is a critical step and the threshold must be picked from a datadriven approach. For the sake of completeness, a discussion of various thresholding mechanisms is provided below. The most widely used thresholding techniques involve universal threshold and minimax threshold. The universal threshold value is computed as follows. where N j is number of wave atom coefficients d s,j at level j decomposition and r s,j is given aŝ The minimax threshold can be calculated using the following formula, T Min s;j ¼r s;j k Ã N j

À Á
The Stein's unbiased risk estimation (SURE) of thresholding is more amenable with the proposed shiftbased noised reduction and is established in the results presented in the next section. SURE can be formally expressed as below.
where #{i:|X i |B T} is the cardinality of the set brackets. The risk function of wave atom coefficients is minimized when the value is as follows:   The upcoming section presents the performance of the proposed SCS algorithm on the Benchmark signals dataset (Salisbury et al. 2021)

Results analysis
Original EEG signals were taken from the OpenNeuro Datasets (Salisbury et al. 2021), and a random noise is added using the routine available in MATLAB library. The  Figure 10 presents original EEG signal taken from the OpenNeuro Dataset. The efficacy of the proposed algorithm is presented in Figs. 11 and 12. The quality parameters extracted from the results highlight that SCS algorithm could withstand the non-stationary noise resulted in better SNR and MSE values. Table 1 presents the performance of the SCS against the noise handling based on the various thresholding intuitions. It is evident from the row 3 that unbaised noise estimation model helped in improving the de-noising results (Fig. 13) (Tables 2, 3, 4).

Conclusion
In this paper, we have implemented a novel de-noising algorithm for improving the quality of EEG signal, based on stationarity characteristics of the noise. The errordamaged signal data stream was recovered using translation followed by an aggregation operation over the cycle spinning transform. The directional feature of the noise is enveloped into a bounded interval. Different types of thresholding mechanisms were employed for each type of shift, and results were analysed in terms of SNR and MSE. The results established that the spatial convolution operation can improve the performance of cycle spinning denoising technique over wave atom transformation. Future work investigates various possibilities of handling the nonstationary noise.
Author contribution All of the authors participated equally and have read and approved the final version of the paper.
Funding No Funding.

Declarations
Conflict of interest There are no conflicts of interest declared by the authors.
Ethical approval Any of the authors' investigations with human participants or animals are not included in this article.