<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A multi-artifact EEG denoising by frequency-based deep learning</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Matteo Gabardi</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Aurora Saibene</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Francesca Gasparini</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Daniele Rizzo</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabio Antonio Stella</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>NeuroMI, Milan Center for Neuroscience</institution>
          ,
          <addr-line>Piazza dell'Ateneo Nuovo 1, 20126, Milano</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Milano-Bicocca</institution>
          ,
          <addr-line>Viale Sarca 336, 20126, Milano</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Xnext S.p.A.</institution>
          ,
          <addr-line>Via Valtorta 48, 20127, Milano</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Electroencephalographic (EEG) signals are fundamental to neuroscience research and clinical applications such as brain-computer interfaces and neurological disorder diagnosis. These signals are typically a combination of neurological activity and noise, originating from various sources, including physiological artifacts like ocular and muscular movements. Under this setting, we tackle the challenge of distinguishing neurological activity from noise-related sources. We develop a novel EEG denoising model that operates in the frequency domain, leveraging prior knowledge about noise spectral features to adaptively compute optimal convolutional filters for noise separation. The model is trained to learn an empirical relationship connecting the spectral characteristics of noise and noisy signal to a non-linear transformation which allows signal denoising. Performance evaluation on the EEGdenoiseNet dataset shows that the proposed model achieves optimal results according to both temporal and spectral metrics. The model is found to remove physiological artifacts from input EEG data, thus achieving efective EEG denoising. Indeed, the model performance either matches or outperforms that achieved by benchmark models, proving to efectively remove both muscle and ocular artifacts without the need to perform any training on the particular type of artifact.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;electroencephalography (EEG)</kwd>
        <kwd>deep learning (DL)</kwd>
        <kwd>frequency-based neural network</kwd>
        <kwd>EEG denoising</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The electroencephalographic (EEG) signal is a time series acquired with non-invasive sensors
(called electrodes) placed on a subject’s scalp and is characterized by time, frequency and spatial
information [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. However, it usually presents a mixture of neurological activity and signals
deriving from noise-related biological or non-physiological sources [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        This means that besides recording neural signals, the EEG captures noise generated from ocular,
muscular, and cardiac movements as examples of biological artifacts, and noise related to
nonbiological sources like cable movement, electrical interference, and electrode bad positioning
[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. For further information on other artifact types, please refer to the review papers by Urigüen
and Garcia-Zapirain [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], and Rashmi and Shantala [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        Many attempts have been presented in the state-of-the-art to reduce or remove these types
of artifacts, but automatic EEG denoising remains an open challenge [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ]. In particular, this
paper focuses on the denoising of two specific types of artifacts, i.e., ocular (OAs) and muscular
artifacts (MAs).
      </p>
      <p>
        OAs are the most easily detectable artifacts due to their spiking shape similar to a V and
their pronounced presence on signals recorded by frontal electrodes [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Moreover, they have
a frequency range between 0.5 and 3 Hz, and high amplitudes (around 100 mV) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Notice
that reference electrodes, called electrooculograms (EOG), are sometimes included in the
experimental setting to track eye movements. Similar references, i.e., electromyographic (EMG)
sensors, can be also placed to detect surface muscular activity, which may introduce MAs [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
These artifacts are related to movements like swallowing, chewing, talking, clenching hands,
and muscular tension [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Unfortunately, MAs are more dificult to detect and present spectral
characteristics overlapping with the neural ones, having that they usually have a frequency
lesser than or equal to 35 Hz [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>
        Notice that even if reference electrodes (EOG and EMG) can be used to track artifacts, the
interference between them and the EEG related electrodes is bidirectional, i.e., the artifacts
contaminate the EEG signals, and the EOG and EMG electrodes capture both artifacts and
neural activity [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Thus the removal of OAs and MAs exploiting these sensors could be prone
to errors or excessive neural signal removal [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Therefore, the initial exploitation of EOG
and EMG sensors in linear regression methods, shifted to methodologies like filtering, blind
source separation, source decomposition, empirical mode decomposition, signal space
projection, beamforming, and hybrid techniques [
        <xref ref-type="bibr" rid="ref3 ref8 ref9">3, 8, 9</xref>
        ]. However, in the last few years, some
works have proposed to move from the traditional denoising techniques previously reported
to completely data-driven techniques based on deep learning (DL) models. In this framework,
this paper presents a DL-based denoising model, which relies on the knowledge related to the
power spectral density (PSD) estimation of noisy EEG signals, and EOG or EMG noise data. In
particular, the proposed model follows the guidelines provided by Zhang et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], who present
EEGdenoiseNet, i.e., a dataset devised as a benchmark to train and test DL-based denoising
strategies. Therefore, the paper is structured as follows.
      </p>
      <p>After a brief overview of current studies presenting DL-based denoising techniques (Section
2), EEGdenoiseNet is described to provide a better understanding of the exploited data (Section
3). Afterwards, the proposed DL model is detailed (Section 4). Section 5 reports the performed
experiments, discuss both obtained and literature results, and provide future developments.
Final considerations are presented in Section 6.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related works</title>
      <p>
        This study focuses on DL-based denoising techniques, which will be detailed in this section,
and thus will not provide a dissertation of traditional processing methodologies. The readers
are invited to consult insightful review papers on these topics provided by the EEG research
community [
        <xref ref-type="bibr" rid="ref11 ref3 ref8 ref9">3, 11, 8, 9</xref>
        ].
      </p>
      <p>
        Starting from the work related to the exploited dataset, Zhang et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] do not produce only
EEGdenoiseNet, but also develop (i) a fully-connected neural network (FCNN), (ii) a simple CNN,
(iii) a complex CNN, and (iv) a recurrent neural network (RNN) for benchmarking purposes.
Moreover, in a later publication [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], the authors propose a novel CNN to remove MAs. In
particular, the devised architecture is composed by seven blocks, of which the first six contain
two 1D convolutional layers with ReLu as the activation function and a 1D average pooling
layer. The last block has as well two 1D convolutional layers, which are instead followed by a
lfatten layer. Finally, a dense layer is inserted. Notice that the core of the proposal is related to
the learning process. As reported by the authors, the aim of the DL-based denoising models is
to define a function that projects the noisy signals to the clean ones:
˜ =  (^,  )
(1)
where ˜ is the clean EEG, ^ is the normalized noisy EEG, and  is the parameter to be learned.
Notice that the authors [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] also report results obtained by applying traditional denoising
techniques, i.e., empirical mode decomposition and filtering, and demonstrate that their
DLbased model provides a better data denoising. Therefore, in this paper only comparisons with
this benchmark model and other DL-based proposals will be provided.
      </p>
      <p>
        Subsequently, other approaches have been proposed in the literature, like Yu et al.’s
end-toend DL framework, called DeepSeparator [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. This model is based on Inception-like blocks and
composed of (i) an encoder deputed to feature extraction, (ii) a decomposer exploited to detect
and remove OAs and MAs, and (iii) a decoder used to reconstruct the cleaned signal.
Notice that the authors propose a training strategy where three input and output pairs are
designed to learn from both clean signals and artifacts: ⟨ noisy EEG, clean EEG ⟩, ⟨ clean EEG,
clean EEG ⟩, and ⟨ artifacts, artifacts ⟩.
      </p>
      <p>
        Another proposal is EEGDnet [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], which considers both non-local and local self-similarities
of EEG signals. Notice that the model has a 2D transformer structure devised to remove OAs and
MAs from 1D EEG signals. The clean and noise signals are summed up considering a specific
signal-to-noise ratio (SNR) and the resulting noisy signals fed to EEGDnet. Afterwards, the
input is reshaped in a 2D matrix and passed to a self-attention block, a normalization layer, a
feed-forward block, and another normalization layer to finally reconstruct the signal.
Similarly, Wang, Li, and Wang [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] propose a network mainly composed by a bidirectional gated
recurrent unit, a self-attention, and a dense layer to remove OAs and MAs.
      </p>
      <p>A Multi-Module Neural Network (MMNN) [16] is developed to be used in real-time
environments and considering single-channel EEG data. MMNN has a modular structure constituted
by blocks containing convolutional and fully-connected layers. The model convergence and
learning ability is supported by the residual connections intra- and inter-blocks.</p>
      <p>Other proposals exploit Generative Adversarial Networks (GANs) to remove noise. For
example, Brophy et al. [17] sample the generator input directly from noisy EEG signals and make
a comparison with the corresponding clean EEG signals in the discriminator. The generator
is constituted by a Long-Short Term Memory (LSTM) network, while the discriminator is
composed by four 1D convolutional layers and a fully-connected layer.</p>
      <p>Similarly, Wang, Luo, and Shen [18] generator consists of a Bidirectional-LSTM (BiLSTM) and a
LSTM layer, while the discriminator comprises five CNN layers plus a fully-connected layer.
The noisy EEG are passed to the generator, producing the denoised EEG, which is inputted to
the discriminator with the ground truth data. Therefore, the authors’ main aim is to map the
relationships between clean EEG and artifacts to iteratively reduce the noise.</p>
      <p>Finally, OAs only removal strategies are reported. Ozdemir, Kizilisik, and Guren [19] focus on
the use of BiLSTM and propose a benchmark combining EEGDenoiseNet and the DEAP dataset
[20]. Notice that the inputs of the BiLSTM are the time-frequency features extracted from the
augmented data. Instead, Yin et al. [21] propose a cross-domain framework integrating time and
frequency domain information, demonstrating that the extracted features are able to improve
the performance of state-of-the-art methods when provided as input to DL models.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Dataset</title>
      <p>
        The EEGdenoiseNet [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] is used in this study, having that it has been provided to the research
community as a benchmark dataset to train and test DL-based denoising models.
      </p>
      <p>In fact, Zhang et al. construct a dataset exploiting EEG, EOG and EMG signals of publicly
available datasets, processing these data to obtain neural and noise signals that could be
considered unafected by other sources and thus clean.</p>
      <p>In particular, the authors consider Cho et al.’s EEG dataset [22], presenting signals collected
with 64 electrodes on 52 subjects during a motor execution and imagery experiment.
The EOG signals have been instead taken from Kanoga et al. [23], and the BCI Competition IV
dataset 2a and 2b [24], while the EMG signals are related to a facial EMG dataset [25].</p>
      <p>Afterwards, the data are pre-processed as follows:
1. Signals are notch (50 Hz) and bandpass (EEG: 1-80 Hz, EOG: 0.3-10 Hz, and EMG: 1-120</p>
      <p>Hz) filtered.
2. Signals are re-sampled, considering a sampling rate of 256 Hz or 512 Hz for the EEG, 256</p>
      <p>Hz for the EOG, and 512 Hz for the EMG signals.
3. Signals are divided in segments of 2 s to provide data as cleaner as possible, and
standardized. Segments are visually inspected by experts.</p>
      <p>Notice that between point 1 and 2, EEG signals are processed with the independent component
analysis based ICLabel toolbox [26] to obtain clean ground truth data. The data resulting from
this process are 4,514, 3,400, and 5,598 pure (as defined by the authors) EEG, EOG, and EMG
segments, respectively.</p>
      <p>
        The pure EEG data are used as the ground truth and semi-synthetic data produced by linearly
combining these data with EOG or EMG segments, according to the following formula:
 =  + 
(2)
where  is the noisy signal,  the pure EEG signal,  the EOG or EMG noise, and  a
hyperparameter controlling the SNR. For further information, please consult the original publication by
Zhang et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Proposed model</title>
      <p>In this work a novel denoising model leveraging data in the frequency domain is proposed.</p>
      <p>The idea is that given a prior knowledge about the noise spectral features, an optimal
convolutional filter, or a cascade of filters, can be computed to separate the noise from signal.
Therefore the proposed model is trained to learn an empirical relationship which connects the
spectral characteristics of noise and noisy signal to a non-linear transformation able to denoise
that signal. The assumptions under which the model can operate are:
• the PSD estimate of the noise is given;
• the relation between signal and noise is known.</p>
      <p>For the EEGdenoiseNet dataset this relationship is a linear mixture of the clean signal and the
artifacts (OAs and MAs considered one at a time) as per Eq. 2.</p>
      <p>The PSD related to noise  , the PSD related to noisy signal , and the noisy signal are all given
separately as multiple inputs to the model, which consists of two major components, repeatedly
applied: the kernel evaluator and the convolutional filters applier. The kernel evaluator is used
to evaluate the best convolutional filters from the frequencies that are characteristic of the noisy
signal and noise. The convolutional filters applier then efectively apply the filters estimated by
the kernel evaluator to the time domain signal. The overall pipeline of the model is depicted in
Figure 1.</p>
      <sec id="sec-4-1">
        <title>4.1. Model inputs</title>
        <p>The model is inputted with two inputs not directly interacting with each other: the PSDs and
the time series. The former is the concatenation of the PSD of the pure noise, the PSD of the
noisy signal (which is always known) and the ratio between the noisy signal and the pure noise
PSDs, which does not add any further information but facilitates model learning since the ratio
is an operation not easily reproducible by the following convolutional operations. The PSDs
and their ratio are processed by the kernel evaluator blocks only. The latter, i.e., the time series,
is the noisy signal in the time domain, which is processed in cascade by the convolutional filters
applier block in order to obtain the denoised signal.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Kernel evaluator</title>
        <p>For each convolutional step a kernel evaluator block, which structure is depicted in Figure 2,
evaluates a set of convolutional filters (i.e., the kernels values) to be applied to the time series.</p>
        <p>Each block is inputted with the PSDs, which are processed by two symmetric series of 1D
convolutional layers with tanh activations. These branches independently estimate the real and
imaginary part of the filters that will be subsequently applied to the time series. Remind that in
this case the model is working in the frequency domain, dealing with PSDs.</p>
        <p>To translate the filters into the time domain, where they will actually operate on the noisy
signal, an inverse real fast Fourier transformation (IRFFT) is then applied to the complex 1D
arrays obtained by assembling the two branches.</p>
        <p>The IRFFT operation adds algorithmic capabilities to the model since the convolutional and
activation layers in the pipeline cannot replace it by performing an analogous transformation.</p>
        <p>The inverse fast Fourier transform (IFFT) is an algorithm that eficiently computes the inverse
discrete Fourier transform (IDFT) of a sequence and is given as follows:</p>
        <p>The IRFFT is a particular case of IFFT which returns real-valued sequences, as would be
desired for the time-domain filters, without sacrificing the useful algorithmic capabilities of the
Fourier transform.</p>
        <p>As a final step, the filters outputted by the IRFFT are linearly combined with a 1D convolutional
layer with kernel size equal to 1. The last tanh activation forces the filters values in the range
[− 1; 1], avoiding numerical problems coming from too high values and acting as a normalizer
on filters.</p>
        <p>The length of the filters evaluated by the kernel evaluator block is equal to the length of
the input noisy signal itself, thus the filters are able to act on any signal frequency and to
extract both local and global features. The kernel evaluator blocks contain all and only the
trainable parameters of the model, specifically the kernels of the 1D convolutions applied to
the PSDs. Therefore these parameters, which amount to 224192, depend only on the frequency
characteristics of the signal and noise. The choice of the number of convolutional layers and
the size of the kernels they apply are dictated by having a suficiently large receptive field that
operates on correlated frequencies that are close to each other, without taking into account
very distant frequencies.</p>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. Convolutional filters applier</title>
        <p>The filters evaluated by the kernel evaluator blocks are inputted to the convolutional filter
applier, which uses them without further changes. As depicted in Figure 3, on the first step
this part of the model applies 1D convolutions directly to the noisy signal using the filters of
the first kernel evaluator block and the resulting features are inputted to an ELU activation
function. Subsequently, these features are convoluted with the filters evaluated by the second
block and once again activated by the ELU function. This operation is repeated in cascade until
the last convolution, which returns directly the denoised signal. No activation is applied in this
last step and the range of possible values is therefore (−∞ ; +∞), which is also the range of
the possible clean signals.</p>
        <p>The number of convolutions applied in series and the number of filters applied at each
convolutional step were sized based on domain knowledge and in a way that limited the total
number of parameters trained in the kernel evaluator blocks.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Performed experiments</title>
      <p>
        The denoising capabilities of the proposed model are evaluated on the basis of the reconstruction
performance of pure EEG signals from the EEGdenoiseNet dataset when contaminated by EOG
or EMG artifacts, separately, following the paradigm proposed by the authors of the benchmark
model [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] and considered by most of the reported literature works (Section 2). In this section
the data preparation method, the metrics used to evaluate the model and the training process
are described. Finally, statistical and graphical results of the model are reported.
      </p>
      <sec id="sec-5-1">
        <title>5.1. Data preparation</title>
        <p>The original dataset has been randomly partitioned into two mutually exclusive subsets, i.e., a
training dataset (60%) and a test dataset (40%). Therefore, the training dataset consists of 2,708
EEG, 3,358 EMG and 2,040 EOG samples while the test dataset consists of 1,806 EEG, 2,240 EMG
and 1,360 EOG samples.</p>
        <p>
          To synthesize the noisy signals from the pure samples, the linear relation defined in Eq. 2
has been used. The  values are randomly sampled to obtain a uniform distribution of the
signal-to-noise ratio (SNR) in the range [− 7; 4] for the model training and in the range
[− 7; 2] for the model testing. This is a common range for OAs and MAs and the same
range has been used by the EEGdenoiseNet authors [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
        </p>
        <p>During the training phase, the noisy data synthesis is performed runtime in a random way,
allowing the model to be trained with constantly new combinations of signal, noise and SNR.</p>
        <p>Both noisy signal and pure noise are standardized using the mean and standard deviation of
the noisy signal.</p>
      </sec>
      <sec id="sec-5-2">
        <title>5.2. Metrics</title>
        <p>In order to quantitatively evaluate the performance of the model in the denoising task, standard
metrics used for benchmarking on EEGdenoiseNet data are adopted.</p>
        <p>The Root Mean Square Error (RMSE) is used to measure the variance between the output
predicted by the model and the ground truth and it is defined by:
  =
√︃
∑︀=1( − ˜)2

(4)
where  denotes the EEG signal, ˜ the denoised signal and  the total number of data points of
the signal.</p>
        <p>To avoid a metric depending on the absolute value of the signals, the Relative Root Mean
Square Error (RRMSE) is used, which in the time domain is expressed as follows:
√︃ ∑︀=1( − ˜)2
  = ∑︀
=1 2
while when considering the frequency domain we obtain the following:
  =
√︃ ∑︀=1( () −  (˜))2</p>
        <p>∑︀=1  ()2</p>
        <p>The correlation coeficient (CC), also referred to as Pearson correlation coeficient , measures
the degree of the statistical relationship between two variables, in this case the ground truth
signal and the denoised signal. The CC takes values in the range [− 1; 1], where ± 1 indicates
complete linear dependence between the variables, while 0 could mean their independence, and
is defined as follows:
 = √︀∑︀
=1( − )2√︀∑︀</p>
        <p>=1(˜ − )2
∑︀=1( − )(˜ − )
where  and  are the means of the ground truth and of the model output, respectively.</p>
      </sec>
      <sec id="sec-5-3">
        <title>5.3. Training process</title>
        <p>Standardization helps to speed up the training process since input centering and scaling
operations improve the rate at which the neural network converges [27]. Indeed, the learning
algorithm is sensitive to the input scale, and if the input data are not standardized, it may
take longer for the algorithm to find a good set of parameters, i.e., weights and thresholds
of the network, or the learning algorithm may get stuck in a local minima. Moreover, the
standardization of the input data makes the model capable of processing EEG signals with wider
amplitude ranges. Nevertheless, only the mean and standard deviation of the noisy signal are
always known. Therefore, the noisy signal , the pure EEG signal  and the pure noise  are
processed in a similar manner according to:
^ =  −  , ^ =  −  , ^ =  −</p>
        <p>These signals, as well as the PSDs evaluated by them, are the actual inputs of the model.</p>
        <p>The loss function minimized in the training phase is a combination of three diferent terms,
diferently weighted:</p>
        <p>=  +  + − ℎ
where  is the temporal RRMSE defined in Eq. 5,  is the spectral RRMSE
defined in Eq. 6, and − ℎ the log-cosh error of the ground truth and predicted signals in
the time domain, which is defined by the equation:
(5)
(6)
(7)
(8)
(9)</p>
        <p>This function provides a smooth approximation to the mean absolute error for values near 0.
The , , and  coeficients are empirically chosen for the training and are equal to 0.25, 0.25,
and 0.5, respectively.</p>
        <p>The optimization method used to find the best weights of the kernel evaluator blocks is
AdaMax [28].</p>
        <p>The code was developed in Python 3.8.10 and the proposed model was designed using the
TensorFlow library, version 2.8. The experiments were run on an Nvidia Quadro RTX 4000 for a
total training time of 61 hours.</p>
      </sec>
      <sec id="sec-5-4">
        <title>5.4. Results and discussions</title>
        <p>A single model has been trained on both EMG and EOG artifacts at the same time in order to
have a solution capable of handling both cases. In fact, the noisy signals are afected by either
OAs or MAs. Therefore, both EMG only and EOG only afected signals are inputted to the
model, as introduced at the beginning of Section 5.</p>
        <p>Figure 4 shows the trend of loss as the epochs change for the training and test sets. For both
datasets the loss values monotonically decrease and no significant overfit is present, indication
that the model design and the runtime data synthesis approach used are efective in avoiding
this issue.</p>
        <p>Using the last epoch weights, we qualitatively demonstrate the denoising capabilities of the
model on EOG and EMG artifacts in Figure 5. We can observe that both the high frequencies
related to MAs and low frequencies related to OAs are filtered by the model while the majority
of the structures related to the true EEG signals are preserved. Moreover, several amplitude
ranges are properly managed by the model as well as diferent SNRs.</p>
        <p>The quantitative results of the proposed model and of the literature benchmark models for
MAs and OAs are reported in Table 1 and 2, respectively.</p>
        <p>Regarding EEG afected by MAs, the reported values are in line with the benchmark models
results. The proposed model demonstrated robust performance, achieving the third best results
in the temporal domain metrics,   and , and the second best result in the spectral
metric   . This latter metric provides insight into the method ability to efectively
preserve the spectral information of the clean EEG signal.</p>
        <p>Concerning OAs, our method achieves the best performance on all three metrics among
the reported benchmark models. Furthermore, the similarity of the proposed model results in
  values on both muscular and ocular artifacts highlights the method stability and its
ability to perform indiscriminately well on both high and low frequencies.</p>
        <p>In contrast to the current state of the art, the proposed model is able to achieve these results
using not only a single architecture but also a single set of trained parameters, valid on both
MAs and OAs. This allows the two main sources of noise in EEG signals to be handled with
a single solution. However, while the need to have as input an estimate of the PSD of the
noise aflicting the signal makes the method more adaptable to new noise conditions with
known characteristics, it also makes it sensitive to precise a priori knowledge of the frequency
characteristics of this noise that cannot be easily estimated. In the future we will develop
methods trained on the reference dataset to best estimate the PSD of the noise of each signal
as a substitute for the exact PSD provided in the current work. Moreover, diferent activation
functions and artifact amount estimation methodologies [29] will be considered to provide a
better denoising of the EEG signals.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusions</title>
      <p>The significant issue of muscle and ocular artifact removal in EEG data has been tackled in this
research. We introduced a unique solution capable of dealing with both artifact types using
a single model. Our proposed method leverages dynamically assessed convolutional filters,
which are determined based on the frequency features of the noise and the noisy signal. With
this knowledge, our model has proven its efectiveness in both qualitatively and quantitatively
cleaning EEG signals from muscle and ocular artifacts. This achievement either matches or
exceeds the performance of existing state-of-the-art models, which typically require specicfi
training on either ocular or muscle artifacts. Thus, this study marks a substantial step forward in
EEG data processing by ofering a versatile spectral-based strategy for artifacts elimination and
provides a baseline for subsequent work addressing the problem of estimating noise frequencies,
whether with experimental solutions, algorithmic solutions, or a combination of the two.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>This work was partially supported by the MUR under the grant “Dipartimenti di Eccellenza
2023-2027" of the Department of Informatics, Systems and Communication of the University of
Milano-Bicocca, Italy.
self-attention mechanism for denoising of electroencephalography signals, Neuroscience
505 (2022) 10–20.
[16] Z. Zhang, X. Yu, X. Rong, M. Iwata, A novel multimodule neural network for eeg denoising,</p>
      <p>IEEE Access 10 (2022) 49528–49541.
[17] E. Brophy, P. Redmond, A. Fleury, M. De Vos, G. Boylan, T. Ward, Denoising eeg signals
for real-world bci applications using gans, Frontiers in Neuroergonomics 2 (2022) 44.
[18] S. Wang, Y. Luo, H. Shen, An improved generative adversarial network for denoising eeg
signals of brain-computer interface systems, in: 2022 China Automation Congress (CAC),
IEEE, 2022, pp. 6498–6502.
[19] M. A. Ozdemir, S. Kizilisik, O. Guren, Removal of ocular artifacts in eeg using deep learning,
in: 2022 Medical Technologies Congress (TIPTEKNO), IEEE, 2022, pp. 1–6.
[20] S. Koelstra, C. Muhl, M. Soleymani, J.-S. Lee, A. Yazdani, T. Ebrahimi, T. Pun, A. Nijholt,
I. Patras, Deap: A database for emotion analysis; using physiological signals, IEEE
transactions on afective computing 3 (2011) 18–31.
[21] J. Yin, A. Liu, C. Li, R. Qian, X. Chen, Frequency information enhanced deep eeg denoising
network for ocular artifact removal, IEEE Sensors Journal 22 (2022) 21855–21865.
[22] H. Cho, M. Ahn, S. Ahn, M. Kwon, S. C. Jun, Eeg datasets for motor imagery brain–computer
interface, GigaScience 6 (2017) gix034.
[23] S. Kanoga, M. Nakanishi, Y. Mitsukura, Assessing the efects of voluntary and involuntary
eyeblinks in independent components of electroencephalogram, Neurocomputing 193
(2016) 20–32.
[24] M. Tangermann, K.-R. Müller, A. Aertsen, N. Birbaumer, C. Braun, C. Brunner, R. Leeb,
C. Mehring, K. J. Miller, G. Mueller-Putz, et al., Review of the bci competition iv, Frontiers
in neuroscience (2012) 55.
[25] V. Rantanen, M. Ilves, A. Vehkaoja, A. Kontunen, J. Lylykangas, E. Mäkelä, M. Rautiainen,
V. Surakka, J. Lekkala, A survey on the feasibility of surface emg in facial pacing, in: 2016
38th Annual International Conference of the IEEE Engineering in Medicine and Biology
Society (EMBC), IEEE, 2016, pp. 1688–1691.
[26] L. Pion-Tonachini, K. Kreutz-Delgado, S. Makeig, Iclabel: An automated
electroencephalographic independent component classifier, dataset, and website, NeuroImage 198 (2019)
181–197.
[27] Y. LeCun, L. Bottou, G. B. Orr, K.-R. Müller, Eficient backprop, in: Neural networks: Tricks
of the trade, Springer, 2002, pp. 9–50.
[28] D. P. Kingma, J. Ba, Adam: A method for stochastic optimization, arXiv preprint
arXiv:1412.6980 (2014).
[29] F.-B. Vialatte, J. Solé-Casals, A. Cichocki, Eeg windowed statistical wavelet scoring for
evaluation and discrimination of muscular artifacts, Physiological Measurement 29 (2008)
1435.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Saibene</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Caglioni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Corchs</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Gasparini</surname>
          </string-name>
          ,
          <article-title>Eeg-based bcis on motor imagery paradigm using wearable technologies: A systematic review</article-title>
          ,
          <source>Sensors</source>
          <volume>23</volume>
          (
          <year>2023</year>
          )
          <fpage>2798</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Yin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Nichele</surname>
          </string-name>
          ,
          <article-title>Emotion recognition using multi-modal data and machine learning techniques: A tutorial and review</article-title>
          ,
          <source>Information Fusion</source>
          <volume>59</volume>
          (
          <year>2020</year>
          )
          <fpage>103</fpage>
          -
          <lpage>126</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Urigüen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Garcia-Zapirain</surname>
          </string-name>
          ,
          <article-title>Eeg artifact removal-state-of-the-art and guidelines</article-title>
          ,
          <source>Journal of neural engineering 12</source>
          (
          <year>2015</year>
          )
          <fpage>031001</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>C.</given-names>
            <surname>Rashmi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Shantala</surname>
          </string-name>
          ,
          <article-title>Eeg artifacts detection and removal techniques for brain computer interface applications: a systematic review</article-title>
          ,
          <source>International Journal of Advanced Technology and Engineering Exploration</source>
          <volume>9</volume>
          (
          <year>2022</year>
          )
          <fpage>354</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>X.</given-names>
            <surname>Jiang</surname>
          </string-name>
          , G.
          <string-name>
            <surname>-B. Bian</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          <string-name>
            <surname>Tian</surname>
          </string-name>
          ,
          <article-title>Removal of artifacts from eeg signals: a review</article-title>
          ,
          <source>Sensors</source>
          <volume>19</volume>
          (
          <year>2019</year>
          )
          <fpage>987</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>W.</given-names>
            <surname>Mumtaz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Rasheed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Irfan</surname>
          </string-name>
          ,
          <article-title>Review of challenges associated with the eeg artifact removal methods</article-title>
          ,
          <source>Biomedical Signal Processing and Control</source>
          <volume>68</volume>
          (
          <year>2021</year>
          )
          <fpage>102741</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>G. L.</given-names>
            <surname>Wallstrom</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. E.</given-names>
            <surname>Kass</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Miller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Cohn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. A.</given-names>
            <surname>Fox</surname>
          </string-name>
          ,
          <article-title>Automatic correction of ocular artifacts in the eeg: a comparison of regression-based and component-based methods</article-title>
          ,
          <source>International journal of psychophysiology 53</source>
          (
          <year>2004</year>
          )
          <fpage>105</fpage>
          -
          <lpage>119</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>M. M. N.</given-names>
            <surname>Mannan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. A.</given-names>
            <surname>Kamran</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. Y.</given-names>
            <surname>Jeong</surname>
          </string-name>
          ,
          <article-title>Identification and removal of physiological artifacts from electroencephalogram signals: A review, Ieee Access 6 (</article-title>
          <year>2018</year>
          )
          <fpage>30630</fpage>
          -
          <lpage>30652</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>X.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. J. McKeown</surname>
            ,
            <given-names>Z. J.</given-names>
          </string-name>
          <string-name>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>Removal of muscle artifacts from the eeg: A review and recommendations</article-title>
          ,
          <source>IEEE Sensors Journal</source>
          <volume>19</volume>
          (
          <year>2019</year>
          )
          <fpage>5353</fpage>
          -
          <lpage>5368</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>H.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Wei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Mantini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <article-title>Eegdenoisenet: a benchmark dataset for deep learning solutions of eeg denoising</article-title>
          ,
          <source>Journal of Neural Engineering</source>
          <volume>18</volume>
          (
          <year>2021</year>
          )
          <fpage>056057</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>J.</given-names>
            <surname>Minguillon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. A.</given-names>
            <surname>Lopez-Gordo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Pelayo</surname>
          </string-name>
          ,
          <article-title>Trends in eeg-bci for daily-life: Requirements for artifact removal</article-title>
          ,
          <source>Biomedical Signal Processing and Control</source>
          <volume>31</volume>
          (
          <year>2017</year>
          )
          <fpage>407</fpage>
          -
          <lpage>418</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>H.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Wei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <article-title>A novel convolutional neural network model to remove muscle artifacts from eeg</article-title>
          ,
          <source>in: ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)</source>
          , IEEE,
          <year>2021</year>
          , pp.
          <fpage>1265</fpage>
          -
          <lpage>1269</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>J.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Lou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Wei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <article-title>Embedding decomposition for artifacts removal in eeg signals</article-title>
          ,
          <source>Journal of Neural Engineering</source>
          <volume>19</volume>
          (
          <year>2022</year>
          )
          <fpage>026052</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>X.</given-names>
            <surname>Pu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Yi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Ma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Ren</surname>
          </string-name>
          , Eegdnet:
          <article-title>Fusing non-local and local selfsimilarity for eeg signal denoising with transformer</article-title>
          ,
          <source>Computers in Biology and Medicine</source>
          <volume>151</volume>
          (
          <year>2022</year>
          )
          <fpage>106248</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>W.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>A novel end-to-end network based on a bidirectional gru and a</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>