Добавил:
kiopkiopkiop18@yandex.ru t.me/Prokururor I Вовсе не секретарь, но почту проверяю Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Ординатура / Хирургия / Библиотека им академика М.И. Перельмана / Книга_6027_Библиотеки_им_академика_М_И_Перельмана.pdf
Скачиваний:
0
Добавлен:
31.08.2026
Размер:
29 Мб
Скачать
212 Y. F. Low and R. Martinez-Cancino

17.1 Introduction

The two main objectives of preprocessing are:
. Data transformation: Raw EEG data is often unsuitable for analysis in its original
form. Preprocessing transforms it into a format that is appropriate for further computations.
. Artifact handling: EEG signals are frequently contaminated with non-neural
signals, artifacts need to be removed or minimized as much as possible to obtain clearer and more accurate neural signals.
The following sections outline common preprocessing procedures; however, the
order in they should be applied.
such as eye movements, muscle activity, or electrical noise. These
which they are presented does not necessarily reect the sequence in which

17.2 Common Preprocessing Steps: Data Transformation

17.2.1 Inspecting Data

Once the data is loaded, conducting a quick inspection of its appearance and properties is often benecial. Things you shoul d or can do are as follows:
. Ensure that all EEG channels and their corresponding coordinates are correc tly
imported.
and for generating meaningful visualizations. For a detailed discussion on elec­trode placement and coordinate systems, refer to Robert Oostenvelds blog on the topic (Oostenveld, n.d.).
. Inspect the data for anomalies, such as missing event markers, incorrect marker
timings, reference them with the experimental design or recording setup to identify potential causes.
. Standardize event markers by renaming them for clarity and consistency.
Remove anythi
Accurate channe l locations are essential for various preprocessing steps
or at (non-functioning) channels. If any irregularities are found, cross-
ng that is unnecessary for your analysis.

17.2.2 Changing the Sampling Frequency

Adjusting the sampling frequency involves either decreasing (downsampling) or increasing (upsampling) the number of data points recorded per second. When data are collected at a high sampling rate (e.g., >1000 Hz), it is often benecial to downsample the data ofine to a lower frequency that is more suitable for analysis. This can signicantly reduce le size and improve processing efciency.
17 EEG Preprocessing and Artifact Handling 213
In contrast, upsampling is less commonly used but can be helpful in specic
situations, for example to improve temporal precision when estimating ERP peak latencies. Although it does not add new information, it allows more accurate estimation of the timing of waveform peaks.
For analyses focused on frequency ranges up to the Beta band (approximately
30 Hz), certain preprocessing steps, such as EMG analysis, fMRI gradient artifact correction, or TMS pulse artifact removal may require higher sampling rates. After these steps are compl eted, the data can usually be downsampled without loss of relevant information.
aliasing. While functions, which may lead users to overlook its importance.
a sampling rate between 150 and 300 Hz is typically sufcient. However,
Importantly, low-pass ltering must be applied before downsampling to avoid
this step is critical, it is often handled automatically within built-in

17.2.3 Re-referencing

Re-referencing implies altering the baselineof the recorded data ofine using different schemes to suit various purposes. Every re-reference scheme possesses distinct benets and limitations (Luck, 2014b; Yao et al., 2019). Generally, re-referencing may be required for any of the following reasons:
. Impact on signal amplitude: If the online reference is near the channel of interest,
affect the signals amplitude, thereby reducing the desired effect. In this
it can case, re-referencing the data to a channel not too close to the region of interest is recommended.
. Artifact reduction: If all scalp channels exhibit
drifts), re-referencing helps mitigate these spatially widespread signals. The Average Reference scheme, in particular, improves signal-to-noise ratio (Bigdely-Shamlo et al., cient channel channels mobile EEG studies (Arad et al., 2018; Klug & Gramann, 2020).
. Hemispheric bias: EEG recordings often utilize a single electrode as the online
reference. resulting voltage distribution may exhibit hemispheric asymmetry.
To mitigate this bias, re-referencing to the average of the left and right mastoids Reference scheme, which is most effective with high-density montages (typically 64 or more electrodes) (Nunez & Srinivasan, 2006) and at least 50% uniform scalp coverag
. Comparability with
dependent. So, it would make sense to cross-check with other published research papers in your area of research to know the reference they used. To facilitate
s (>64 channels) for even head coverage (Hu et al., 2018) and no bad
are included. This makes the Average Reference a common choice in
When referencing is limited to either the left or right mastoid, the
is recommended. An alternative is the previously mentioned Average
e (Luck, 2014c).
2015; Tsuchimoto et al., 2021), provided there are suf-
literature: The choice of reference site can also be eld-
common artifacts (e.g., line noise,
214 Y. F. Low and R. Martinez-Cancino
result comparison, it may be necessary to re-reference the data using the referencing scheme employed in the literature being compared.
It is important to ensure that the new reference site is clean; otherwise, noise will
propagate opportunity to explore different schemes and choose the most suitable one for a specic research question or hypothesis.
to other channels after referencing. Overall, re-referencing provides the

17.2.4 Interpola ting Channels or Data Portions

Channel interpolation refers to estimating the signal at specic electrode locations based on data from surrounding channels. This technique is commonly used to replace EEG channels that are affected by persistent artifacts.
Many EEG processing tools use spherical spline interpolation by default, as it
generally included in the interpolation process. The specic channels used often depend on the chosen algorithm, user-dened parameters, and the characteristics of the dataset.
that can when necessary. Overuse of interpolation can potentially distort the true underlying brain activity. As such, interpretations based on interpolated data should be made with caution.
mitigate data portion within the pulse time window before proceeding with further preprocessing or analysis. For more detailed strategies on managing EEG-TMS data, see Hernandez-Pavon et al. (Hernandez-Pavon et al.,
yields high-quality results. However, not all scalp channels are necess arily
While there are no strict guidelines regarding the maximum number of channels
be interpolated, it is recommended to apply interpolation sparingly and only
In specic applications, such as EEG combined with TMS, interpolation can help
artifacts caused by the TMS pulse. A common approach is to interpolate the
2023).

17.2.5 Segmenting Data

Segmentation involves breaking down continuous EEG data into shorter, manage­able segments or epochs. In studies focusing on event-related changes, continuous data is divided into segments around events, dened by pre- and post-stimulus intervals. These intervals should be selected based on the experimental paradigm and the expected effects. Typical steps for generating ERPs are discussed in Chap.
19: Event-Related Potentials.
Other types of analyses require specic segmentation considerations:
. Wavelet analysis:
left and right borders to avoid border and smearing effects (Herrmann et al., 2014; Roach &
Mathalon, 2008).
The segment length should include a safety margin at both the
17 EEG Preprocessing and Artifact Handling 215
. FFT or Welchs method: Data are divided into short, non-overlapping or
overlapping segments, which should be long enough to contain at least one cycle of the lowest frequency of interest. Moreover, for computational ef­ciency, the number of data points per segment is often chosen as a power of two.
To learn more about spectral analysis, you are referred to Chap. 18: Introduction
to EEG
Oscillations and Spectral Analysis.

17.3 Common Preprocessing Steps: Artifact Handling

In Chap. 15: Getting Clean EEG Data, strategies to avoid or minimize artifacts during data acquisition are presented. Despite these efforts, recorded data may still be contaminated with various artifacts and noise. It is essential to remove or minimize these artifacts to obtain neural signals that more accurat ely reect the underlying brain activity.

17.3.1 Filtering

Ofine ltering attempts to modify the frequency characteristics of data, aimed at reducing unwanted frequencies by removing noise from the data. Non-causal zero­phase lters are often preferred because they preserve the phase of all frequency components that remain in the signal, which is important for many analyses. Filters generally fall into four categories:
. High-pass lter: Attenuates frequencies below the low-cutoff.
in EEG are between 0.1 and 0.5 Hz to reduce drifts such as body sway or skin potentials.
. Low-pass lter: Reduces frequencies above the high-cutoff.
quencies that are usually studied lie below 40 Hz, this is a common cutoff frequency. This helps min imize the impact of muscular artifacts and other high­frequency noise.
. Band-pass lter: The combination of . Notch lter: A band rejec
its harmonics.
Furthermore, in
nite impulse response (FIR) and innite impulse response (IIR), each based on different design principles, but both are suitable for ltering EEG data. Note that, a higher lter order produces a steeper magnitude response, resulting in stronger suppression beyond the cutoff frequency and thus improved frequency selectivity. However, this increased selectivity comes at the expenses of reduced temporal precision.
publications, you might encounter two distinct types of lters:
tion lter used to attenuate line noise at 50 or 60 Hz and
high and low pass lters.
Common cutoffs
As most EEG fre-
216 Y. F. Low and R. Martinez-Cancino
Fig. 17.1 Magnitude response plot IIR Butterworth low-pass lter, based on the half­power cutoff denition. About 70.7% of the original amplitude is retained at the cutoff frequency
of a 4th-order
When discussing cutoff frequencies, the two commonly used terms are half-
power cutoff and half-amplitude cutoff. The half-power cutoff, also known as the
3 dB point, refers to the frequency at which the power of the signal is reduced by half (approximately 70.7% of the original amplitude), as illustrated in Fig. contrast, the half-amplitude cutoff is dened by a
6 dB reduction, which corre-
17.1. In
sponds to 50% of the original ampl itude.
Filtering is a widely reported preprocessing step in publications. However, it is
advisable
to minimize the extent of ltering and apply it only, when necessary, as ltering can unpredictably alter the data. Interpreting the results with caution is essential. This topic has been thoroughly discussed, and practical guidelines for applying lters to EEG data are published (de Cheveigne & Nelken, 2019; Widmann et al., 2015; Zhang et al., 2024a, b).

17.3.2 Attenuating Artifacts

Stereotypical artifacts such as blinks, lateral eye movements, and muscle activity often exhibit consistent shapes and distributions. They can be reduced or removed through correction methods without losing data points.
17.3.2.1 Independent Component Analysis (ICA)
ICA is a blind source separation (BSS) method which involves decomposing the recorded These artifacts have characteristic topographies, shapes, and time courses, such as blinks and eye movements, as illustrated in Fig. after remo tively reduced.
(Makeig et al., 1996), Fast ICA (Hyvärinen & Oja, 2000), RELICA (Artoni et al.,
2014), and AMICA (Klug et al., 2024; Palmer et al., 2010). The choice of the ICA
algorithm
EEG signal into components that represent brain activity and artifacts.
17.2. By reconstructing the signal
ving the artifact-related components, the inuence of artifacts is effec-
Various ICA-based
methods have been proposed, including Infomax ICA
depends on the specic characteristics of your data and the type of artifacts
17 EEG Preprocessing and Artifact Handling 217
Fig. 17.2 Topographic maps of blinks and eye movements. (a) Blinks are prominent bell-shaped deections over the data. They show a predominantly frontal topography. (b) Lateral eye move­ments show a box-shaped morphology, appear strongest in frontopolar and frontotemporal chan­nels, and typically show opposite polarity on each side of the scalp. Note: the interval between the vertical green lines is 1 s
you are dealing with (Delorme et al., 2012; Dimigen, 2020; Frølich & Dowding,
2018; Gorjan et al., 2022; Hoffmann, 2009; Klug et al., 2024; Leutheuser et al., 2013; Stergiadis et al., 2022). Among these, Infomax ICA is perhaps the most used
and freque
ntly cited in publications.
The quality of ICA can be affected by several factors, which should be carefully
considered:
. Number of EEG channels: The maximum number of components that can be
isolated in
EEG data corresponds to the number of electrodes used. While decomposition can be performed with low-density recordings, it is generally recommended to use at least 64 EEG channels for optimal results (Cohen,
2014; Klug & Gramann, 2020). Increasing the number of channels enhances
spatial resolution
. Amount of trai
and improves the accuracy of independent component analysis.
ning data: A minimum of (number of channel)^2
20 (for fewer than 64 channels) or (number of channel)^2 30 (for more than 64 channels) data points is recommended to perform ICA (Makeig & Onton, 2011). It is also important
that the training data contain sufcient representative neuronal activity,
including artifacts intended to be remove.
218 Y. F. Low and R. Martinez-Cancino
. Quality of training data: Slow drifts in the data can signicantly deteriorate ICA
performance. To mitigate this, applying a high-pass lter is strongly recommended. The cutoff frequency should be selected in a balanced way that is neither too low nor too high (i.e., usually not more than 1 Hz). Some literature suggests a cutoff between 1 and 2 Hz for clean decompositions, while continuing the analyses on less or unltered data afterwards to avoid distorting the time course of ERPs (Debener et al.,
2010; Klug & Gramann, 2020; Winkler et al.,
2015). Additionally, applying a low-pass lter reduces high-frequency noise,
preventing it from dominating ICA components and improving the extraction of meaningful signals.
Furthermore, the following points should be kept in mind when applying ICA:
. Over-correction: ICA is purely data-driven, meaning that the decomposed com-
ponents
are based on statistical properties of the signal and do not map precisely onto physiological processes. When using ICA for artifact removal, it is impor­tant to carefully examine all decomposed components to make well-informed decisions about whether a component should be discarded. Over-correction, which occurs when the components removed to correct artifacts also contain valid EEG, should be avoided.
. Rank-deciency: ICA assumes that the signal
is a linear mixture of independent sources, with the maximum number of extractable source signals limited by the number of channels. However, when channels are interpolated or re-referenced to a common average (or mean of mastoids), the principle of independence is violated. This results in rank-deciency, which must be addressed to ensure a proper computation of the inverse ICA weight matrix. Mitigation of this issue involves running ICA with a reduced number of components or performing ICA before interpolation or re-referencing.
17.3.2.2 Regression Techniques
Regression-based methods, such as the Gratton and Coles algorithm (Gratton et al.,
1983), can be utilized for the identication and correction of ocular artifacts. These
methods
leverage the EOG channels to estimate the inuence of blinks and eye movements on the EEG channels via regression. Ocular artifacts are then subtracted based on a calculated correction factor. This approach is computationally efcient, though optimal performance necessitates EOG recordings. For a comprehensive overview of current methods for handling ocular artifacts, see (Jiang et al.,
et al.,
Ronca
2024).
2019;
Another notable method is the Carbon Wire Loop (CWL) regression technique,
desig
ned to reduce motion artifacts in brain signal recordings, particularly in simul­taneous EEG-fMRI studies (van der Meer et al., 2016). CWLs are exible carbon wires placed
near the electrodes that capture motion-related signals without detecting
neural activity. These motion signals are used as regressors in a linear model to
17 EEG Preprocessing and Artifact Handling 219
estimate and remove motion-induced noise from the recorded brain data, signi­cantly enhancing signal quality.
17.3.2.3 Template Subtraction Methods
Methods such as Average Artifact Subtraction (AAS) (Allen et al., 2000) can be used to remov environment. In this method, artifact templates are calculated by averaging over adjacent artifact epochs and subsequently the templates are subtracted to reduce the artifacts. More details on handling artifacts for EEG-fMRI data can be found in Warbricks review paper (Warbrick, 2022).
e gradient and cardioballistic artifacts in EEG data collected within an MR

17.3.3 Rejecting Artifacts

Non-stereotypical artifacts can sporadically appear on various electrodes and exhibit different shapes. Examples include sudden electrode pops across multiple channels, signicant movements by the participant affecting several channels, or transient muscular tensions impacting different regions of the head. These artifacts can be carefully addressed through interpolation or completely rejected. Rejection involves
removing portions of the affected data or specic channels, or in extreme cases, discarding the entire dataset from a participant, to prevent compromising the group
analysis and study results.
Artifacts must be detected before they can be rejected. This can be achieved either manually for automatic identication. There are no standardized parameters for artifact detec­tion as it varies depending on the unique characteristics of the data in each exper­iment. Therefore, its crucial to identify parameters that best suit the current dataset. Ideally, these parameters should be consistently applicable to all datasets within a study. However, exceptions may arise; for instance, if some datasets exhibit higher levels of noise, it may be sensible to adjust the criteria accordingly.
ing attenuation methods could lead to an unrepresentative sample of trials, particu­larly in mobile environments. Therefore, rather than using only one approach, a more effective strategy is to combine correction with rejection (Zhang et al., 2024c). As a general pract able patterns, such as blinks.
by using expert judgment to mark the data, or by applyi ng specic criteria
It is important to note that relying solely on artifact rejection without incorporat-
ice, give priority to removing sporadic artifacts and correcting predict-
220 Y. F. Low and R. Martinez-Cancino
17.4 What to Consider When Developing a Preprocessing
Pipeline?
The recent recommendation to either avoid or minimally preprocess EEG data, based on the assertion that most preprocessing techniques do not improve data quality (Delorme, 2023), has sparked controversy. This view has been challenged by several EEG expert argue that while such an approach may b e applicable to relatively clean EEG recordings, preprocessing can be crucial for improving the quality and interpretabil­ity of noisier or more complex EEG data.
Therefore, it is generally imprudent to completely disregard data preprocessing. To suppor preprocessing pipeline for a specic dataset, several key factors have been outlined for consideration:
. Data characteristics: Not all preprocessing steps are always relevant; their
necessity
demand more comprehensive preprocessing and artifact rejection. Consequently,
this may involve interpolating more channels, applying more stringent ltering,
and adjusting the criteria for artifact d etection. . Intended analysis and research goals: The desired outcome measure can dictate
the nec
Laplacian lter (also known as Current Source Density, CSD) as a preprocessing
step before performing connectivity analysis can mitigate the effect of volume
conduction through the scalp, leading to a more precise calculation of connectiv-
ity. If the research objective is to compare your ndings with a previous study, it
would make sense to replicate the processing pipeline reported in that publication,
rather than creating a different one, to ensure comparability. . Knowledge of preprocessing steps: Understanding the prerequisites for specic
analysis
noise, as well as rejecting non-stereotypical artifacts, can enhance the effective-
ness of ICA. Additionally, interpolating bad channels prior to applying an
average reference helps to maintain a balanced spatial representation across the
scalp, which is important for preserving the accuracy of topographical and
source-level analyses. . Suitability: Some steps are better suited for conti nuous or for segmented data,
while others can be applied to both, depending on requirements. For example,
editing the markers or re-referencing can be performed on both segmented and
continuous data. However, high-pass ltering is best applied to long continuous
data to avoid edge artifacts that might contaminate the region of interest on
shorter segments. Similarly, ICA is more efcient when applied to continuous
data, as larger, uninterrupted data allow for better separation of components. . Order: Some steps within a pipeline can be interchangeable. However, others can
signicantly inuence the nal output, depending on whether they are executed
s (e.g., de Cheveigné, 2023; Larsen & Versace, 2024). These experts
t informed decision-making in designing a valid and effective EEG
depends on the quality of the acquired data. Noisy datasets often
essary processing steps and their sequence. For example, using a
steps is crucial. For instance, attenuating slow drifts and high-frequency
17 EEG Preprocessing and Artifact Handling 221
earlier or later and whether they are linear or non-linear operations. Luck com-
prehensively explains these concepts in his book and also provides practical
guidance for developing processing pipelines for ERP analysis (Luck,
Equally
documented in detail to ensure proper evaluation and reproducibility (Keil
et al., 2014).
interconnected
fully plan and rene the workow will help ensure reliable and interpretable
results.
important are the parameters used at each step, which should be
As you can see, constructing an EEG processing pipeline involves many
decisions. Therefore, dedicating sufcient time to thought-
2014a).

17.5 Tools for Processing and Analyzing EEG

A variety of software can be utilized to process and analyze EEG data, encompassing both open-source and proprietary options. The choice of software largely depends on the research projects requirements and the users programming prociency. Finding a single application that meets all needs is often challenging. Rather than focusing on one particular tool, it may be more effective to adopt a platform that can interact with multiple software to some extend and allow, where possible, the creation of custom scripts. Below is a list of some software options (the order is arbitrary and the list is not exhaustive). Some other tools are mentioned in the review paper by Das et al. (Das et al.,
2023):
. EEGLAB (Delorme & Makeig, 2004): An open-source MATLAB toolbox offering
a comprehensi
preprocessing, visualization, and analyzing ERPs and time-frequency data. Sev-
eral automated pipelines have been developed based on this platform, such as the
PREP (Bigdely-Shamlo et al.,
Monachino
ADJUST (Mogn . ERPLAB Toolbox: A free, open source Matlab package for analyzing ERP data,
closely . BrainVision Analyzer: A commercial software package that provides tools for the
analysis
for its user-friendly interface, intuitive features, and reliable scientic methods. It
also allows interfacing with MATLAB and extending processing functionalities
via macro scripting. . FieldTrip: Another open-source MAT
EEG, and other neurophysiological data. It offers advanced functions for time-
frequency analysis, source reconstruction, and statistical analysis. . CURRY: A
and neurophysiological data analysis. Its widely used in both research and
clinical settings, particularly for epilepsy evaluation.
ve environment for processing EEG data, including functions for
2015), HAPPE (Gabard-Durnam et al., 2018;
et al.,
2022), RELAX (Bailey et al., 2023a, b; Hill et al., 2024),
on et al., 2011), and DISCOVER-EEG (Gil Ávila et al., 2023).
intergrated with EEGLAB (Lopez-Calderon & Luck, 2014).
of EEG, ERP, and other neurophysiological data. The software is known
LAB toolbox designed for analyzing MEG,
commercial software offering tools for multi-modal neuroimaging