Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Automated methodology for optimal selection of minimum electrode subsets for accurate EEG source estimation based on Genetic Algorithm optimization

## Abstract

High-density Electroencephalography (HD-EEG) has proven to be the EEG montage that estimates the neural activity inside the brain with highest accuracy. Multiple studies have reported the effect of electrode number on source localization for specific sources and specific electrode configurations. The electrodes for these configurations are often manually selected to uniformly cover the entire head, going from 32 to 128 electrodes, but electrode configurations are not often selected according to their contribution to estimation accuracy. In this work, an optimization-based study is proposed to determine the minimum number of electrodes that can be used and to identify the optimal combinations of electrodes that can retain the localization accuracy of HD-EEG reconstructions. This optimization approach incorporates scalp landmark positions of widely used EEG montages. In this way, a systematic search for the minimum electrode subset is performed for single- and multiple-source localization problems. The Non-dominated Sorting Genetic Algorithm II (NSGA-II) combined with source reconstruction methods is used to formulate a multi-objective optimization problem that concurrently minimizes (1) the localization error for each source and (2) the number of required EEG electrodes. The method can be used for evaluating the source localization quality of low-density EEG systems (e.g. consumer-grade wearable EEG). We performed an evaluation over synthetic and real EEG datasets with known ground-truth. The experimental results show that optimal subsets with 6 electrodes can attain an equal or better accuracy than HD-EEG (with more than 200 channels) for a single source case. This happened when reconstructing a particular brain activity in more than 88% of the cases in synthetic signals and 63% in real signals, and in more than 88% and 73% of cases when considering optimal combinations with 8 channels. For a multiple-source case of three sources (only with synthetic signals), it was found that optimized combinations of 8, 12 and 16 electrodes attained an equal or better accuracy than HD-EEG with 231 electrodes in at least 58%, 76%, and 82% of cases respectively. Additionally, for such electrode numbers, lower mean errors and standard deviations than with 231 electrodes were obtained.

## Introduction

Since the emergence of the international 10–20 system of electrode placement in 19581, electroencephalography (EEG) systems have gradually evolved towards high-density EEG (HD-EEG). This first began with the 10–10 system2,3, then with geodesic electrode distribution to increase the number up to 256 channels4, and ultimately with the 10–5 system5 which sets the maximum number of EEG electrode positions at 345 locations for scalp coverage. The 10–10 system was accepted as standard by the American Clinical Neurophysiology Society and the International Federation of Clinical Neurophysiology6,7, yet the 10–5 system was not accepted by either organization8. The 10–10 system and the 10–5 system were developed as extensions of the 10–20 system contemporaneously with the development of EEG source localization techniques which required a higher density of electrode settings to reduce localization errors.

Accurate EEG source localization depends on many factors, with the most important including the density and location of scalp electrodes. It is widely accepted that an increased density of EEG electrodes generally provides more precise localization9,10,11. Today, 128 EEG channel systems and even 256 EEG channel systems are common commercial choices5,12. Even though the use of HD-EEG systems has resulted in improved spatial resolution in source localization13, practical use has come at a cost8,14.

In an extensive investigation of the validity of the 10–20, 10–10 and 10–5 systems as relative head-surface-based positioning systems14 it has been argued that even though the 10–20 system has not been conceived to support localization of brain sources, its high-density extensions into the 10–10 and 10–5 systems have mainly provided increased electrode density that has proven to be effective in brain source localization13. The high-density extensions of the 10–20 system logically inherit its electrode positioning principle, which was not conceived to improve the accuracy of brain source localization algorithms. Although it has been sufficiently proven that these extensions are effective in increasing the accuracy of brain source localization, it remains to be seen to what extent these high-density systems require all the electrode positions for attaining that level of accuracy. Increasing the number of electrodes decreases the localization error, but this improvement plateaus at some point15. This was concluded by examining the relationship between localization error and the number of electrodes when examining partial epilepsy in pediatric patients15. The same is true, however, for every source/es being examined. In this regard, the questions we attempt to answer in this paper are: what is the minimum number of electrodes required for an accurate source localization of a particular brain activity? and, is it possible to identify optimal low-density subsets of electrodes that can retain the source reconstruction quality of HD-EEG?

Here we propose an automated method that uses information from electrode locations on multiple systems and electrode configuration (e.g. the systems inherent to the 10–5, 10–10, 10–20 and/or geodesics systems) to select the optimal number of electrodes and their locations to solve the problem of EEG source localization for single and multiple sources. The optimization is based on the non-dominated sorting genetic algorithm II (NSGA-II)16. The algorithm, combined with EEG inversion methods, searches for combinations of electrodes to solve the EEG inverse problem that minimizes the localization error while using the lowest number of channels possible. Considering C as the number of channels, exploring all the combinations of electrodes in order to find the optimal solution means solving the inverse problem $$2^C-1$$ times for a single source case, and $$s(2^C)-1$$ for s multiple sources. These numbers will grow exponentially when increasing the number of channels, significantly increasing the computational efforts. For example, in the case of 128 electrodes, it is required to solve the inverse problem 3.4d38 times to evaluate all possible electrode combinations. In contrast, the NSGA-II aims to reduce the computational cost on average to $$O*(P^2)$$, where O is the number of objectives, in this case $$s+1$$, and P the population size16. NSGA algorithms have been successfully applied in multiple fields for optimization and feature selection, such as face expression recognition17 and telecommunications18. This algorithm has also been applied to EEG channel selection for classification of motor imagery19. Moreover, the algorithm has been proven to be effective in identifying low-density EEG subsets that maximize classification accuracy while reducing the number of EEG channels required for epileptic seizure classification20 and subject identification21.

Multiple works have evaluated sparse arrays of electrodes for source reconstruction. In one study, seven channels were used for source reconstruction on real and synthetic EEG signals22, where localization errors between 12 to 16 mm were found by using Multiple Sparse Priors (MSP) as inverse solver. However, no information about the electrode selection criteria was mentioned. In another paper, pre-preprocessing with Multivariate Empirical Mode Decomposition (MEMD) was successfully combined with MSP to improve the source reconstruction with low-density electrode arrays of 32, 16 and 8 channels on real and synthetic EEG signals23. The subset of electrodes was selected based on spatial coverage of the brain, but it was not optimized according to the source activity. In another study, a methodology based on regions of interest was proposed24, where relevance analysis and electrode distance to the regions were the criteria for selecting the subset of electrodes when solving the EEG inverse problem. The low-density subsets were combined with MSP and standardized low-resolution tomography sLORETA, obtaining localization errors below 10 mm by using the 4, 8 and 16 most relevant electrodes from a high-density set of 60 channels. The error levels are remarkable and comparable to high density levels. However, the study was limited by its evaluation on only synthetic EEG signals.

In this work, we approach the question of electrode reduction in a step-by-step manner. First, we formulate a computer simulation-based source reconstruction problem for one single source and for multiple sources. In a second phase, we examine how effective this automatic methodology is in accurately detecting the stimulation site from intra-cerebral stereotactically implanted electrodes, based on the dataset recorded by Mikulan et al.25. For our study we combined the NSGA-II algorithm with three widely used source reconstruction algorithms, the weighted minimum norm estimation (wMNE), the sLORETA, and the MSP, with a particular emphasis on studying the effect of optimally reducing the number of electrodes, and investigating their locations for a specific source activity.

## Materials and methods

### Methodology for channel selection based on genetic algorithm multi-objective optimization

EEG source reconstruction refers to the estimation of the properties of the source activity (source location, direction, and waveform) from the information registered by the electrodes on the scalp. To estimate this, the EEG inverse problem must be solved (the inverse problem is presented in more detail in “EEG forward and inverse problems” section). The proposed methodology combines a source reconstruction algorithm and the NSGA-II16, where the algorithm objective is to find electrode subsets with the minimum number of channels that retain the highest possible source localization accuracy (the accuracy of the reference HD-EEG). For the optimization process several inputs are required: The EEG or the event related potentials (ERPs) of the source(s) to analyze, the head model (this is required for source reconstruction, see “EEG forward and inverse problems” section) and the ground-truth location of the source activity to calculate the localization errors. The general structure of the automated methodology is presented in Fig. 1. The process can be summarized by a loop of four blocks: NSGA-II, Weighting, Source Reconstruction, and Performance indexes, where the outputs of NSGA-II are a set of best channel combinations and a set of all candidates.

An optimization problem consists of maximizing or minimizing a function by systematically choosing input values from a valid set and computing the value of the function, which can be limited to one or more constraints or can have no restrictions. In an optimization problem, the model is feasible if it satisfies all the restrictions, and it is optimal if it also produces the best value for the objective function. In the case of a Multi-objective optimization problem (MOOP), it has two or more objective functions, which are to be either minimized or maximized. As in a single-objective optimization problem, a MOOP may contain a set of constraints, which any feasible solution must satisfy26. In a multi-objective optimization problem, there is a set of solutions that is superior to the others in the search space when all the objectives are considered, but inferior to the other solutions for one or more objectives. Such solutions are known as Pareto-optimal solutions or non-dominated solutions and the rest as dominated solutions. The non-dominated sorting ranking selection method is used to emphasize good candidates and a niche method is used to maintain stable sub-populations of good points. NSGAs were created based on this concept27.

The central block of NSGA-II consists of several stages: Population initialization, Fitness calculation, Crossover, Mutation, Survivor selection, and Termination criteria to return the best solutions. The population consists of a set of chromosomes, which are possible solutions to the problem, and each chromosome can have as many genes as variables in the problem. In this case, each gene represents an EEG channel and the chromosome contains as many genes as the number of EEG channels in the registered EEG, represented by $${{\varvec{y}}}$$. A chromosome structure representing the electrode combination is presented at the bottom-left of Fig. 1. The NSGA-II initializes with a population of P chromosomes with random binary values. Then, in the weighting block, the gene values are used to weight the EEG by a dot multiplication between the EEG and the chromosome to compute the weighted EEG $${{\varvec{y_{w}}}} = {{\varvec{y}}} \cdot chromosome$$. As a result of this mathematical operation, the channels with a gene value of one keep their value, while information of the channels with a gene value of zero is discarded.

The algorithm is defined to minimize the number of EEG channels used to localize single or multiple sources, as a fixed objective. Minimizing the localization error of a number s of desired sources to localize is defined as a subsequent separate objective, one per each source. Therefore, the number of objectives O is defined as $$O=s+1$$. NSGA uses a non-dominated sorting ranking selection method to emphasize good candidates and a niche method to maintain stable sub-populations of good points (Pareto-front), where a non-dominated solution is a solution that is not dominated by any other solution27.

The weighted EEG $${{\varvec{y_{w}}}}$$ is used in the source reconstruction block for calculating the source activity and estimating the location of each source. In each weighted EEG $${{\varvec{y_{w}}}}$$ the non-selected channels are converted to a temporal data series with zero value. Therefore, the inverse solution is calculated using all the electrodes available in the head conduction model, but the information contained in the non-used electrodes is discarded during source estimation. The use of all electrodes is preferred to avoid increasing the ill-posedness of the inverse problem when using a subset of the volume conduction matrix and to avoid using computational resources for re-calculating the volume conduction for each candidate combination.

In the performance indexes block, the number of channels extracted from each chromosome and the localization errors per each source are computed by comparing the estimated position with the ground-truth. The performance indexes return to the NSGA-II block that applies the non-dominated sorting, and half of the population with better performance is used to create the next generation using crossover and mutation procedures. For this, NSGA-II uses Simulated Binary Crossover (SBX) and Polynomial mutation, with crossover probability as 0.9 and mutation probability 1/n, where n is the number of decision variables27,28. The actual generation finishes when a new population is created and the process is repeated with the next generation until the termination criterion is reached. We used a maximum number of generations as criterion to stop the algorithm.

Finally, from the all set of chromosomes, the best combination per each number of channels is extracted to create a pseudo-Pareto front. In the case of the multiple sources, the pseudo-Pareto front is generated from the mean of the localization errors of all the sources.

### EEG forward and inverse problems

The electrical activity recorded by the electrodes and its relation with the sources at cortical areas can be represented by the following equation, known as forward problem equation29:

$${{\varvec{y}}}={{\varvec{M}}}{{\varvec{x}}}+\varepsilon$$
(1)

The forward problem allows us to compute the potentials registered by the electrodes in the scalp that were produced by current sources in the brain cortical areas. In the forward problem equation $${{\varvec{y}}}\in \mathbb {R}^{d\times K}$$ represents the signals recorded by d number of electrodes in K time samples; and $${{\varvec{x}}}\in \mathbb {R}^{n\times K}$$ represents the time course activity of n sources at the cerebral cortex. The forward model $${{\varvec{M}}}\in \mathbb {R}^{d\times n}$$ represents the relationship of the cortical source activity $${{\varvec{x}}}$$ with the electrode measurements $${{\varvec{y}}}$$. This matrix is also known as lead field matrix or volume conductor model. In the EEG case, $${{\varvec{M}}}$$ represents how the electrical field propagates from the current sources in the brain to the scalp, where the voltages are registered by the electrodes. The variable $$\varepsilon$$ represents the noise in the measurements. It is assumed to follow a normal distribution with zero mean.

The inverse problem is the estimation of the current sources in the brain from the electrical potential registered by the electrodes. Computing the sources from the electrode information is an ill-posed problem due to the fact that the number of sources to estimate are much higher than the number of electrodes. An infinite number of combinations of sources could lead to the same recordings obtained by the electrodes. In addition, the problem is also ill-conditioned because the solutions are very sensitive to noise, and low perturbations on the channels can highly distort the source estimation30.

#### Source reconstruction algorithms

One of the factors that influences the accuracy of source localization is the inverse algorithm used. For this reason, and to consider this influence, we have selected three widely used algorithms to solve the inverse problem: wMNE31,32, sLORETA13, and MSP33.

wMNE is a variant of the original minimum norm estimation (MNE) based on Tikhonov regularization31,34,35. wMNE involves a weighting matrix to compensate for the distance of the deep sources to the electrodes13,36. sLORETA is a well-known method recognized by its zero localization error in the absence of noise37,38. This method is based on minimum norm, and introduces an improvement by standardizing the solution using the variance of the estimated activity13. MSP is based on a Bayesian approach, and utilizes a set of priors over the cortical sheet to optimize hyper-parameters related to the covariance of the source activity33,39. This method offers a focalized (less blurry) estimation of the source activity.

#### Source reconstruction error measurements

The localization error is defined as the euclidean distance between the position of the ground-truth source $$P_x$$ in a 3D coordinated space and the estimated source position $$P_{\hat{x}}$$ by:

\begin{aligned} LocE = ||P_x-P_{\hat{x}}||_2 \end{aligned}
(2)

To estimate the source position $$P_{\hat{x}}$$, first, the element-wise power $${{\varvec{\hat{x}}}}^{\cdot 2} = {{\varvec{\hat{x}}}}\cdot {{\varvec{\hat{x}}}}$$ is computed from the estimated activity (where A$$\cdot$$B represents the dot product between A and B). Then, the estimated power is averaged over a defined time-of-interest (TOI). Finally, the position of the source with the highest average power is selected as the estimated location $$P_{\hat{x}}$$.

This error was used in the proposed methodology as an objective to minimize. Relative error and Pearson Correlation Coefficient were used as additional error measurements to compare the time courses between reconstructions done with different numbers of electrodes. Consider $$x_{1i}$$ and $$x_{2j}$$ as the time courses of two reconstructions in the vertices i and j were the source with highest amplitudes were found, being $$x_{1i}$$ the time course of the reconstruction computed with the highest number of electrodes. These metrics can be computed by using the following equations:

\begin{aligned} RelE = \frac{||x_{1i} - x_{2j}||_2}{||x_{1i}||_2} \end{aligned}
(3)

and

\begin{aligned} r = \frac{\sum (x_{1i}-\overline{x}_{1i})(x_{2j}-\overline{x}_{2j})}{\sqrt{\sum (x_{1i}-\overline{x}_{1i})^2\sum (x_{2j}-\overline{x}_{2j})^2}} \end{aligned}
(4)

where $$\overline{x}$$ represents the mean of the values of x.

### Evaluation framework

We evaluated the proposed methodology over synthetic and real EEG signals. In the section below, we present the synthetic EEG dataset with multiple-source activity and its simulation framework that can be used for evaluating inversion algorithms. We have tested the automated methodology for channel selection over this dataset, under single- and multiple-source cases. Furthermore, we have applied the methodology on real EEG signals, by using the dataset “Localize-MI” by Mikulan et al.25. HD-EEG was recorded during intracerebral stimulation and the ground-truth activity location is therefore available. Multiple tests of the methodology have been performed and they are presented and described in “Test structure” section.

#### Synthetic EEG dataset

The synthetic EEG dataset consists of 150 trials of multiple source activity. We used the forward equation 1 to simulate the EEG data. Per each trial the sources were distributed over several regions of the brain. The time courses of the sources were generated using a Gaussian windowed sinusoidal23, defined by the following equation:

\begin{aligned} x_i(t_k)=e^{-\frac{1}{2}\left( \frac{t_k-c_i}{\sigma }\right) ^2}sin(2\pi f_it_k) \end{aligned}
(5)

where i represents the source number, $$c_i$$ the time center of the source activity in seconds, $$\sigma _i$$ determines the shape of the Gaussian window by adjusting its width, and $$f_i$$ is the frequency of the sinusoidal activity. The first source $$s_1$$ was simulated in the occipital lobe. The activity was centered at $$c_1=0.5$$ s, and the frequency of the activity set at $$f_1=19$$ Hz in the range of beta rhythm. The second source $$s_2$$ was located in the sensory-motor cortex, with a time center of $$c_2=1$$ s, and a frequency of $$f_2=10$$ Hz in the range of the mu rhythm. The third source $$s_3$$ was simulated with a frequency of $$f_3=7$$ Hz in the range of theta rhythm. It was centered in time at $$c_3=1.5$$ s and located in the frontal lobe. Additional three sources, $$s_4$$, $$s_5$$ and $$s_6$$, were generated with similar parameters (location and frequency) as sources $$s_1$$, $$s_2$$, and $$s_3$$, respectively, but centered at times $$c_4=2$$ s, $$c_4=2.5$$ s, and $$c_6=3$$ s. To maintain the evaluations introduced in “Test structure” section within reasonable limits of computational complexity, only the first three sources of the dataset were considered for testing in this study. An example of the time course of the simulated sources and their location is shown in Fig. 2. For all the sources, the parameter window width was set at $$\sigma =0.12$$. This value, combined with the center of each source, allowed for temporal mixing between sources, represented by the light gray areas in Fig. 2. Notice that source $$s_1$$ only has temporal mixing in the transition to the next source, but $$s_2$$ and $$s_3$$ have temporal mixing in both sections of the waveform, where around 40% of the source activity is overlapped.

The sources were distributed over the brain in three main areas, occipital lobe, sensory-motor cortex, and frontal lobe. Per each area, a set of twelve positions (six per hemisphere) was predefined, and during the simulation procedure the position was randomly selected from the pre-defined sets (the information of the 3D location of the sources, the vertex index in the head model, the number of times the source was selected in the dataset and the brain area are presented in the “Supplementary information”  Table 4). This made it possible to create trials with different combinations of sources. Figure 3 shows the locations of the pre-defined sources (represented by the blue circles) and the number of times they were selected in the dataset (represented by the diameter of the circles).

The lead-field matrix for solving the forward problem was taken from a FEM forward model called the “New York head” model40. The model is available at https://www.parralab.org/nyhead/. It was computed by modeling the scalp, skull, air cavities, CSF, gray matter, and white matter. In FEM models, the influence of including the CSF and the white matter during modeling has been found significant for solving the inverse problem41. The New York head model was proposed as a standard model to be used in EEG studies and it is based on a non-linear average of the MRI of 152 adult human brains. The forward model includes a high-resolution lead field matrix relating 75000 sources with 231 channels. It also includes additional versions with a reduced number of sources of 10000, 5000 and 200 sources. The model considers 231 electrodes, from which 161 are located in the scalp (based on the 10–10 and 10–5 systems), 2 in the left/right preauricular point (LPA/RPA), 4 in the neck, and 64 distributed around the face and in the back of the head below Iz channel. Figure 4 presents a lateral and top view of the channel and source locations using the model with 10000 sources.

The model of 10,000 sources was used for forward computations to generate the EEG signals (see “Synthetic EEG dataset” section) and the model of 5000 sources to calculate the inverse solutions. This allows us to avoid the effects of the so-called inverse crime42. The use of the New York head model40 in our experiments is based on several reasons: one reason is that the model was computed using FEM including six tissues, and using a more detailed model can yield to more accurate source reconstruction results. Another reason was the number of electrodes available in the model. It considers 231 channels located as per the 10–20 and 10–10 standards and the extended 10–5 system. It is well known that more channels lead to a better reconstruction11,15, therefore for a better comparison between the proposed methodology (that identifies an optimized subset of channels) and the full set of electrodes, using the maximum possible number of electrodes is desirable.

After calculating the EEG using Eq. 1, the signals of the channels were corrupted with noise with a signal-to-noise ratio (SNR) of 0 dB (signal and noise with the same power). Each trial had a duration of 3.5 s, with a sampling frequency of 200 Hz. The dataset with the 150 trials and ground-truth information is available at https://github.com/anfesogu/Ground-Truth-EEG-Dataset to facilitate replication of the results in this paper. It can also be used in future studies where a ground-truth for source localization is required.

#### Real EEG dataset

We used the dataset “Localize-MI”25 to test the methodology over real EEG signals. The dataset consists of HD-EEG recordings and anonymized MRIs of seven participants that were stimulated with single-pulse biphasic currents by implanted electrodes. The stimulation position is known and the dataset serves as ground-truth for evaluating inverse solutions. The EEG signals were recorded with a 256 geodesic electrode system (Geodesic Sensor Net; HydroCel CleanLeads) where the electrode positions were digitized to allow for co-registration with the MRI. Referring to the original dataset publication: “All of the participants provided their Informed Consent before participating, the study was approved by the local Ethical Committee (protocol number: 463-092018, Niguarda Hospital, Milan, Italy) and it was carried out in accordance with the Declaration of Helsinki.”25

The dataset contains a set of pre-processed epochs from − 300 to 50 ms around the stimulation artifact. They were filtered with a high-pass filter at 0.1 Hz, and notch filter at 50, 100, 150, and 200 Hz (only subjects 5 and 7). Baseline correction was applied between − 300 to − 50 ms. Finally the epochs were averaged and cropped 20 ms around the stimulation artifact. In total, the dataset consists of 61 sessions, all of which were further used for testing the methodology. Please refer to the original dataset publication for more detailed information25.

A head model of each participant was created to be used during source reconstruction. The models were created by processing the individual MRI using Freesurfer43 (Martinos Imaging Centre, Boston, MA) and MNE-python44. The number of sources was defined as 4098 per hemisphere, and the lead field matrix was computed using BEM, considering the conductivities of scalp, skull, and brain as 0.3, 0.006 and 0.3 S/m respectively (MNE-python default values).

#### Test structure

In this study we proposed multiple tests to investigate the extent to which the quality of the HD-EEG source reconstruction, measured in terms of source location error, can be retained while using a set of reduced number of channels that were selected by the proposed methodology. The first test was based on source reconstruction for one source. We refer to this as the “single-source test”. This test was performed by setting two minimizing objectives for the optimization: the localization error of the single source and the number of channels. We considered the first source $$s_1$$ of the synthetic dataset, the epoch was set between 250 to 750 ms, including an overlapping section with the next source $$s_2$$. In this test, the whole epoch was used as TOI to estimate the source location.

A second test was done considering the first three sources of the synthetic dataset $$s_1$$, $$s_2$$, and $$s_3$$. We refer to this as the “multiple-source test”. In this test, the epoch definition was set between 250 to 1750 ms, and four minimization objectives were set for the optimization algorithm: the individual localization error of each source and the number of channels. The TOIs to estimate the location of the sources were set between 250 to 750 ms, 750 to 1250 ms, and 1250 to 1750 ms for sources $$s_1$$, $$s_2$$, and $$s_3$$, respectively. To evaluate the approach over different numbers of electrodes, we performed three different sub-tests: a first multiple-source sub-test is referred to as “multiple-source test 231e” which considers the full set of 231 electrodes. From those, 161 were located at scalp, and from those 161 electrodes, 73 were located in positions of the standard 10–10 system and 88 were located in positions of the 10–5 system, while the other electrodes were placed in the neck and face areas (Fig. 4). A second multiple-source sub-test referred to as “multiple-source test 128e” constrained the search space of the optimization algorithm to 128 scalp electrodes. From those, 64 electrodes belong to the standard 10–10 and 64 electrodes from the 10–5 system. A third multiple-source sub-test referred to as “multiple-source test 60e” constrained the search space of the NSGA-II to 60 electrodes, all of them located according to the 10–10 standard positions. Figure 5 presents the 161 positions of the scalp electrodes of the New York head model, and the subsets configuration for 128 and 60 electrodes.

The third test was done using the Localize-MI dataset. During each session, the stimulation took place in the same electrode position, therefore, we treated the data as single source case and we set two minimizing objectives for the optimization algorithm: the localization error of the artifact source and the number of channels. We refer to this test as the “Localize-MI test”. In this test, the whole epoch was used as TOI to estimate the source location.

The procedure during all tests started by defining the electrodes to be considered. Only in the multiple-source tests did the electrode number vary according to the test (when constraining the search space to 128 or 60 electrode positions). In the single-source test all the electrodes were considered. In the case of the Localize-MI test, the electrodes that were marked as bad were removed when calculating the forward model and no attempt to clean or interpolate channels was carried out. The number of electrodes used defines the length of the chromosome for the optimization. After setting the number of electrodes, the number of objectives was defined, and the EEG of each trial (in the case of the synthetic data) or the ERP of the session (in the case of the Localize-MI dataset) was transferred to the algorithm. In the next step, the population size and the maximum number of generations were set. Their values were determined experimentally and set as 100 and 400 respectively. Finally, the algorithm for source reconstruction was defined, and the algorithm could start processing data by combining the NSGA-II with sLORETA, wMNE and MSP in separated runs respectively.

Each trial or ERP was processed by the algorithm at least three times, each time with a different source reconstruction algorithm. During a run, the algorithm evaluated 40,000 combinations of electrodes while trying to minimize the objectives. When the run ended, an output file with the combinations and performance indexes of all generations and chromosomes was generated. From this, the performance of the best combination per each number of channels was extracted to create the pseudo-Pareto front. Finally an accuracy index was computed for comparing the reconstructions from the optimized set of channels versus all the channels available. The accuracy index represents the percentage of trials or ERPs that obtained equal or lower localization error with a given number of electrodes when compared to the accuracy when using all the electrodes for the same trial or ERP.

The proposed methodology was implemented and executed in Matlab (The MathWorks, Inc.) version 2016b (www.mathworks.com). The source reconstruction algorithms wMNE and sLORETA were implemented as custom functions in Matlab. To run the MSP method, we used the Statistical Parametric Mapping (SPM; Wellcome Centre for Human Neuroimaging, London, UK) software for Matlab. The NSGA-II solver by28 was adapted to include source reconstruction. The tests were carried out using the IDUN computing cluster45 of the Norwegian University of Science and Technology NTNU. Parts of Figs. 123489, and 10 were generated using Matlab 2016b.

## Results

### Single-source test

The pseudo-Pareto front from the single-source test and localization error with all the electrodes are presented in Fig. 6. The pseudo-Pareto front exhibits a typical convex behavior. The accuracy obtained with the optimized combinations of channels presents a stable value for the localization error when using combinations with five or more channels, independently of the source reconstruction method applied. An inflection point in the pseudo-Pareto front can be seen when reducing from five to four channels. It is also evident when looking at the values presented in Table 1, where the results from the optimization with two to sixteen channels and the results with all the electrodes are summarized. The accuracy index of the optimized combinations of channels was extracted by quantifying the percentage of trials with a given number of channels that obtained equal or lower localization error than when using all the electrodes for the same trial. The accuracy index for the single source test exhibits relatively stable behavior from 16 to 5 channels, but it has a decrease of more than two perceptual points when reducing from five to four channels. Its value continues decreasing substantially while reducing the channels, coinciding with the increasing of the localization error and the standard deviation.

When analyzing the results presented in Fig. 6 and Table 1 on a more detailed level, it can be seen that with a combination of four or more channels, more than 92% of accuracy index was obtained for sLORETA and wMNE, indicating that at least 138 over 150 trials obtained equal or lower accuracy than when using all the electrodes. In the case of MSP it presents a lower accuracy index than the other methods, with a stable value around 88%, and when considering combinations with four or more channels at least 127 of 150 trials were equal or better than the reconstructions with all electrodes.

### Multiple-source test

The pseudo-Pareto fronts for the multiple-source test with the different electrode configurations are shown in Fig. 7. The multiple test had four optimization objectives. To facilitate the visualization of the results, the pseudo-Pareto front was obtained from the mean localization error across the 150 trials, where the localization error is the average of the individual localization error for each one of the three sources. Table 2 presents the localization error, standard deviation and accuracy index for the multiple-source tests for a selected number of channels and with all electrodes.

The results for all electrodes in the three tests show a tendency of increasing the localization error when using a lower number of electrodes (Fig. 7 right column). When localizing the sources, the mean between 60 and 128 channels presents a similar value in each method, with the solution with 60 channels being less accurate. In contrast, the difference is notorious when increasing from 128 to 231 channels, and it is more evident for the sLORETA and wMNE methods. In the pseudo-Pareto’s fronts of the proposed methodology, the same tendency as with all electrodes can be observed. In them, the localization error was more accurate when using the full set of 231 channels, and when restricting the search space to 128 and 60 channels the localization error increased. However, when comparing the solutions for the test with 128 and 231 channels, there is not a considerable difference between the solutions, but the obtained localization error values were lower for sLORETA and wMNE in the multiple-source test with 231 electrodes.

When analyzing the values of table 2, it can be seen that for the multiple-source tests of 60e and 128e, the proposed methodology obtained a lower mean localization error when considering optimized combinations with four or more electrodes than with the 60e and 128e subsets. In the case of the multiple-source test 231e, the proposed methodology obtained lower errors than with all the 231 channels when using optimized combinations of eight or more channels. Regarding the accuracy index, in the multiple-source test 231e, for the optimized combinations with 16 electrodes in 145 of 150 trials, the proposed methodology obtained equal or lower accuracy than the full set of electrodes. The accuracy index reduces as the number of channels decreases, and at the point of eight electrodes the accuracy index presents a value of 58% (87 of 150 trials). However, despite the relatively low accuracy index, the mean across the trials was lower than with the full set.

An example of the position of the true and estimated sources locations and the selected channels is shown in Fig. 8. It shows the optimized combinations with four and eight electrodes for one trial of the dataset, and the resulted combinations were obtained from the multiple-source test 231e results for each source reconstruction method. In the combinations of four channels, it can be observed that the channels selected are located close to the true source location, where the mean localization errors were 5.3 mm, 4.6 mm and 14.5 mm for sLORETA, wMNE, and MSP, respectively. In addition, when observing the combination of eight channels, the selected electrodes were located not only close to the source location, but also in intermediate positions between the sources that were relatively close. In contrast, for the sources that were more separated, there was not selected any channel between them. The mean localization errors for the eight channel combinations were 2.4 mm, 4.2 mm and 4.5mm for sLORETA, wMNE, and MSP, respectively. This suggests that the proposed methodology selected not only the channels that contained the most information from a single source, but also the channels that contained shared information from multiple sources.

Regarding the effects of the estimated waveform for each source, the standardized time courses of the sources estimated with 231 channels, and with the optimized sets of four and eight channels for the one trial, are presented in Fig. 9. The source waveforms are highly similar independent of the number of channels, however, the reconstructions were noisier when using the optimized sets than with the full set of electrodes. For the same trial, the time courses of the pseudo-Pareto channel combinations were compared against the time course using the 231 channels. The relative error and Pearson correlation coefficient were calculated for each source, each number of channels from 3 to 30, and for each reconstruction algorithm. Its values are presented in Fig. 10. It was found that the source time courses estimated with the optimized combinations and the full set had more than a 97% of correlation when considering five or more channels, obtaining a relative error lower than 0.25. When considering optimized combinations with more electrodes, the difference became smaller. The level of correlation with 16 channels or more is around 99%, independent of the source reconstruction method.

### Localize-MI test

The ERPs for the 61 sessions were processed by the proposed methodology with each one of the source reconstruction algorithms. During processing, the channels marked as bad channels were not taken into account, neither in the optimization nor in the calculation of the values with “all channels”. The number of channels varied according to the number of channels labeled as good. The average number of good channels among the 61 sessions was 210 channels (sd = 23). In the worst case 162/256 and in the best case 246/256 channels were considered during the optimization process. Therefore, the number of channels used varied between sessions, and the term “all channels” refers here to all channels labeled as good channels. The pseudo-Pareto fronts resulting from processing each one of the ERPs and the values with all channels are presented in Fig. 11. A similar tendency than in the previous tests can be observed, in which the optimized combinations obtained a lower localization error than with all the electrodes. In contrast to previous tests, there is not an exponential trend when considering the fewest number of channels. Instead, a more linear behavior can be observed, where the localization error and standard deviation increases as the number of channels decreases.

Table 3 presents the summary of the localization error, standard deviation and accuracy index for the Localize-MI test for the pseudo-Pareto combinations from two to sixteen channels. The accuracy index shows that more than 70% of the ERPs were located with the same or higher accuracy than with all the electrodes when using 8 or more electrodes, and more than 60% when using four. It is noticeable that with the optimized subset of two channels, the mean localization error was lower than with all channels. In addition, the accuracy index values were 63.93% (39/61) , 65.57% (40/61) , and 40.98% (25/61) for sLORETA, wMNE and MSP respectively, with a marginal difference in the standard deviation for sLORETA and wMNE when compared to the deviation obtained with all electrodes.

## Discussion

The minimum number of electrodes required for modeling a single source is defined by the number of parameters to describe it: the localization based on three location coordinates (x,y,z) and the orientation based on three strength components on each coordinate axis46. However, in distributed models based on FEM and BEM modeling, the orientation can be assumed as fixed throughout the activation period of the source, where the orientation is often assumed to be normal to the cortical surface. Therefore the number of parameters and electrodes required can be reduced. In the single-source test, the results shown in Fig. 6 suggest that four or five channels (where the inflexion point of the pseudo-Pareto front is located) are enough to estimate the source parameters with a satisfying localization accuracy when compared with a set of HD-EEG. These results are also supported by the values shown in Table 3, where the mean localization error was lower with these number of channels than when using all available electrodes.

Previously, it was discussed that a plateau behavior was observed in the localization error when increasing the number of electrodes15. This plateau can also be observed in the pseudo-Pareto front for all the tests performed here (Figs. 67 and 11), where adding channels to the subset did not continue decreasing the localization error. However, the plateau did not remain flat until reaching the full number of electrode. At some point adding channels started to increase the localization error. This effect is possible to see in the pseudo-Pareto front of the multiple-source test constrained to 60 channels, where at around 23 channels the error starts increasing notably. This effect is presented because the optimization algorithm was set to identify electrode combinations with the lowest number of electrodes and the lowest localization error possible for each source; during the optimization process, the algorithm does not find the optimal for each number of electrodes, rather, it evaluates a given number and as it finds combinations with a lower number, it keeps the search in that direction. In the end, most of the combinations evaluated lay in the first third of the total electrode number. This effect was also present in the other test but for a higher number of electrodes (not shown in the figures).

The results of the multiple-source tests with 231, 128, and 60 channels evidence the general effect of using a lower number of channels, where the localization error achieved lower values when using 231 channels in both, without optimization when using all channels, and with optimization for the subset of channels. Considering this, when constraining the search to use less electrode positions, as in the tests with 128 and 60 channels, it was possible to observe an evident increment in the localization error with and without optimization (Fig. 7). This accuracy behavior supports the proposition that intermediate positions between electrodes in the 10–10 system adopted by the 10–5 electrode layout play an important role. As there are more channels, the probability of recording closer to the source of interest increases, resulting in a more accurate estimation. Moreover, the results are in line with the widely accepted concept of a higher number of channels leading to a higher localization accuracy, which has been previously demonstrated and discussed11,15.

What is new in the results is that an optimized subset of electrodes can attain similar or better localization accuracy than when using all electrodes in a HD-EEG setting (extensions of the 10–20), as shown in Tables 12 for a simulated dataset, and in 3 for the Localize-MI dataset. At first, it can appear counter-intuitive that a reduced number of electrodes can attain such levels of accuracy. However, it should be cautiously noted that not any subset of channels can attain that accuracy. Through the combination of methods proposed in our methodology, it was possible to find combinations of channels for a particular brain source/s configuration that attained values of localization error equal or better than with HD-EEG.

Simplifying the number of electrodes by optimal selection can be beneficial for applications and systems based on a sparse number of channels in medical and non-medical fields. A significant number of EEG devices use less than 32 electrodes, especially in clinical settings, where systems with 21 electrodes (based on the standard 10–20) are still the gold standard for multiple analyses7. For those systems, the electrodes can be selected to estimate the activity of an area of interest; as demonstrated, the sources retrieved when using an optimized subset presented a high level of correlation with the signals obtained with the full set of electrodes (Fig. 9). Therefore, the source time-courses can be used for further analysis and feature extraction.

Multiple BCI systems are based on the brain activity and responses of a particular region or area of the brain e.g. classification of steady state visually evoked potential (SSVEP), or motor imaginary movements. Several works have studied the applicability and feasibility of source reconstruction in BCI classification47,48 and applied over motor imaginary tasks49,50,51, reporting an increase in the classification accuracy for source-based approaches over the traditional sensor-based methods. We consider that the use of the source space has been poorly exploited in BCI systems, partially due to the uncertainty of source reconstruction when recording with non HD-EEG systems. We believe that a selected configuration of electrodes, based on channel optimization to reconstruct the sources of specific areas, can favor the development of source-centered BCI systems with a sparse number of electrodes that can surpass actual systems in accuracy, portability and comfort.

The use of a low number of electrodes inherently reduces the preparation time and increases the portability of EEG systems. The implementation of the proposed methodology can increase the flexibility of brain source reconstruction in multiple studies. For example, in mobile brain/body imaging (MoBI), it is necessary to make it flexible and ease the acquisition of brain data52 in order to perform studies in natural environments for the participants, such as when exercising or working53. The proposed methodology also has application in clinical settings in which it is required to monitor the activity of a specific area of the brain. The electrodes required to map a particular region of the brain related to a disease can be identified with our method and placed in a patient, then the estimated time-course can be analyzed, for example, for detecting the start of a seizure in epileptic patients or monitoring changes in brain activation over time.

This optimization-based approach can enable systematic searches of electrode subsets for any given source or combination of sources that can estimate the location/s of the source/s. In addition, the accuracy of different high-density electrode configurations widely used today can be compared for any given source scenario. In low-density systems, it can be used to evaluate the source localization quality of multiple consumer-grade EEG systems that proliferate nowadays54; to verify to what extent they can be used, and to determine the potential brain source activity they can monitor.

The use of individual head models can be seen as a particular limitation to extend the applicability of the proposed methodology. We are aware that in multiple applications, especially in non-medical fields, there is no anatomical information available that allows for an estimation of a subject-specific model. However, in such cases it is recommended to use template precise models and to apply a warping process using head landmarks and electrode positions55. After warping the model and co-registering with the electrodes, the forward model can be computed and used during source reconstruction. Another limitation of the study is the use of sources at the cortical level. Further studies should be performed to evaluate to what extent the methodology can be used for reconstructing deep source activity, as it has been proven to be detectable by HD-EEG source imaging56.

EEG connectivity analysis is a growing topic nowadays, as it offers the possibility to measure and quantify the interaction of brain regions during multiple tasks57. The study of brain connectivity is proven to be useful for neuromarker identification of different brain conditions and processes58,59,60. The source reconstructed activity offers localized and unmixed information that can be used to perform connectivity analysis between brain regions61,62. However, this analysis on the source space has been limited to the use of HD-EEG. In63 the impact of using HD-EEG (with 256, 128, and 64 electrodes) and LD-EEG (with 32 electrodes) for reconstructing and detecting resting state networks (RSNs) was evaluated. It was found that the influence of the electrode count is higher in deeper brain networks than the default mode network (DMN). In contrast, minimal differences between LD-EEG and HD-EEG were found in detecting other networks such as the dorsal somatomotor network (DSN) or medial prefrontal network (MPN). In the future, it would be interesting to evaluate if the proposed methodology can identify optimal electrode combinations in LD-EEG montages that can detect such networks with HD-EEG accuracy.

In conclusion, the different tests performed in this study offer multiple views of the channel optimization effects for source reconstruction in which multiple- and single-source cases were analyzed. Overall, the proposed methodology was able to optimize the localization error and the number of channels, by finding a subset of channels with few electrodes that attained equal or similar localization accuracy than HD-EEG. In both cases, when analyzing the Localize-MI and the synthetic EEG datasets, the sources have different localization, which allowed us to evaluate the methodology over different brain regions and source configurations. Additionally, the proposed methodology was tested on several electrode systems (10–20, 10–10, 10–5, and geodesic) and considering different head modeling methods (FEM and BEM). Independently of the variations, our proposed methodology was able to find combinations of channels with few electrodes that offer equal or better localization accuracy, demonstrating the feasibility of using low-density optimized electrode combinations to localize single and multiple sources.

## Data and code availability

The synthetic dataset of multiple-source activity analyzed in this document can be downloaded from https://github.com/anfesogu/Ground-Truth-EEG-Dataset, where an example code for generating a synthetic dataset is also available. The forward model used for generating the synthetic EEG dataset and solving the inverse problem “New York head”40 model is available at https://www.parralab.org/nyhead/. The dataset of Simultaneous human intracerebral stimulation and HD-EEG “Localize-MI”25 can be found in https://doi.gin.g-node.org/10.12751/g-node.1cc1ae/. The NSGA-II solver28 can be found in https://se.mathworks.com/matlabcentral/fileexchange/31166-ngpm-a-nsga-ii-program-in-matlab-v1-4.

## References

1. Jasper, H. The ten-twenty electrode system of the international federation. Electroencephalogr. Clin. Neurophysiol. 10, 370–375 (1958).

2. Chatrian, G.-E., Lettich, E. & Nelson, P. L. Modified nomenclature for the “10%’’ electrode system. J. Clin. Neurophysiol. 5, 183–186 (1988).

3. Chatrian, G. E., Lettich, E. & Nelson, P. L. Improved nomenclature for the “10%’’ electrode system. Am. J. EEG Technol. 28, 161–163. https://doi.org/10.1080/00029238.1988.11080262 (1988).

4. Tucker, D. M. Spatial sampling of head electrical fields: The geodesic sensor net. Electroencephalogr. Clin. Neurophysiol. 87, 154–163. https://doi.org/10.1016/0013-4694(93)90121-B (1993).

5. Oostenveld, R. & Praamstra, P. The five percent electrode system for high-resolution EEG and ERP measurements. Clin. Neurophysiol. 112, 713–719. https://doi.org/10.1016/S1388-2457(00)00527-7 (2001).

6. Sinha, S. R. et al. American clinical neurophysiology society guideline 1: Minimum technical requirements for performing clinical electroencephalography. J. Clin. Neurophysiol. 33, 303–307. https://doi.org/10.1097/WNP.0000000000000308 (2016).

7. Seeck, M. et al. The standardized EEG electrode array of the IFCN. https://doi.org/10.1016/j.clinph.2017.06.254 (2017).

8. Acharya, J. N., Hani, A., Cheek, J., Thirumala, P. & Tsuchida, T. N. American clinical neurophysiology society guideline 2: guidelines for standard electrode position nomenclature. J. Clin. Neurophysiol. 33, 308–311. https://doi.org/10.1097/WNP.0000000000000316 (2016).

9. Brodbeck, V. et al. Electroencephalographic source imaging: A prospective study of 152 operated epileptic patients. Brain 134, 2887–2897. https://doi.org/10.1093/brain/awr243 (2011).

10. Lantz, G., Grave de Peralta, R., Spinelli, L., Seeck, M. & Michel, C. M. Epileptic source localization with high density EEG: How many electrodes are needed?. Clin. Neurophysiol. 114, 63–69. https://doi.org/10.1016/S1388-2457(02)00337-1 (2003).

11. Song, J. et al. EEG source localization: Sensor density and head surface coverage. J. Neurosci. Methods 256, 9–21. https://doi.org/10.1016/j.jneumeth.2015.08.015 (2015).

12. Suarez, E., Viegas, M. D., Adjouadi, M. & Barreto, A. Relating induced changes in EEG signals to orientation of visual stimuli using the ESI-256 machine. In Biomedical Sciences Instrumentation, vol. 36, 33–38 (Instrument Society of America, 2000).

13. Pascual-Marqui, R. D. Standardized low-resolution brain electromagnetic tomography (sLORETA): Technical details. Methods Find. Exp. Clin. Pharmacol. 24(Suppl D), 5–12 (2002).

14. Jurcak, V., Tsuzuki, D. & Dan, I. 10/20, 10/10, and 10/5 systems revisited: Their validity as relative head-surface-based positioning systems. Neuroimage 34, 1600–1611. https://doi.org/10.1016/j.neuroimage.2006.09.024 (2007).

15. Sohrabpour, A. et al. Effect of EEG electrode number on epileptic source localization in pediatric patients. Clin. Neurophysiol. 126, 472–480. https://doi.org/10.1016/j.clinph.2014.05.038 (2015).

16. Deb, K., Pratap, A., Agarwal, S. & Meyarivan, T. A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Trans. Evol. Comput. 6, 182–197. https://doi.org/10.1109/4235.996017 (2002).

17. Stoyell, S. M. et al. High-density EEG in current clinical practice and opportunities for the future. J. Clin. Neurophysiol. 38, 112–123. https://doi.org/10.1097/WNP.0000000000000807 (2021).

18. Huang, B., Buckley, B. & Kechadi, T. M. Multi-objective feature selection by using NSGA-II for customer churn prediction in telecommunications. Expert Syst. Appl. 37, 3638–3646. https://doi.org/10.1016/j.eswa.2009.10.027 (2010).

19. Kee, C. Y., Ponnambalam, S. G. & Loo, C. K. Multi-objective genetic algorithm as channel selection method for P300 and motor imagery data set. Neurocomputing 161, 120–131. https://doi.org/10.1016/J.NEUCOM.2015.02.057 (2015).

20. Moctezuma, L. A. & Molinas, M. EEG channel-selection method for epileptic-seizure classification based on multi-objective optimization. Front. Neurosci. 14, 593. https://doi.org/10.3389/fnins.2020.00593 (2020).

21. Moctezuma, L. A. & Molinas, M. Multi-objective optimization for EEG channel selection and accurate intruder detection in an EEG-based subject identification system. Sci. Rep. 10, 1–12. https://doi.org/10.1038/s41598-020-62712-6 (2020).

22. Jatoi, M. A. & Kamel, N. Brain source localization using reduced EEG sensors. SIViP 12, 1447–1454. https://doi.org/10.1007/s11760-018-1298-5 (2018).

23. Soler, A., Muñoz-Gutiérrez, P. A., Bueno-López, M., Giraldo, E. & Molinas, M. Low-density EEG for neural activity reconstruction using multivariate empirical mode decomposition. Front. Neurosci. 14, 175. https://doi.org/10.3389/fnins.2020.00175 (2020).

24. Soler, A., Giraldo, E. & Molinas, M. Low-density EEG for source activity reconstruction using partial brain models. In Proceedings of the 13th International Joint Conference on Biomedical Engineering Systems and Technologies, 54–63. https://doi.org/10.5220/0008972500540063 (SCITEPRESS—cience and Technology Publications, 2020).

25. Mikulan, E. et al. Simultaneous human intracerebral stimulation and HD-EEG, ground-truth for source localization methods. Sci. Data 7, 1–8. https://doi.org/10.1038/s41597-020-0467-x (2020).

26. Deb, Kalyanmoy. Multi-Objective Optimization using Evolutionary Algorithms Vol. 16 (Wiley, 2001).

27. Srinivas, N. & Deb, K. Muiltiobjective optimization using nondominated sorting in genetic algorithms. Evol. Comput. 2, 221–248. https://doi.org/10.1162/evco.1994.2.3.221 (1994).

28. Song, L. NGPM a NSGA-II Program in Matlab v1.4 (https://www.mathworks.com/matlabcentral/fileexchange/31166-ngpm-a-nsga-ii-program-in-matlab-v1-4). MATLAB Central File Exchange (2011).

29. Pascual-Marqui, R. Review of methods for solving the EEG inverse problem. Int. J. Bioelectromagn. 1, 75–86 (1999).

30. Grech, R. et al. Review on solving the inverse problem in EEG source analysis. J. NeuroEng. Rehab. 5, 25. https://doi.org/10.1186/1743-0003-5-25 (2008).

31. Hämäläinen, M. S. & Ilmoniemi, R. J. Interpreting measured magnetic fields of the brain: Estimates of current distributions (Univ. Helsinki, Finland Tech. Rep. TKK-F-A559, 1984).

32. Fuchs, M., Wagner, M. & Wischmann, H. A. Generalized minimum norm least squares reconstruction algorithms. ISBET Newsl. 5, 8–11 (1994).

33. Friston, K. et al. Multiple sparse priors for the M/EEG inverse problem. Neuroimage 39, 1104–1120. https://doi.org/10.1016/j.neuroimage.2007.09.048 (2008).

34. Hämäläinen, M. S. & Ilmoniemi, R. J. Interpreting magnetic fields of the brain: Minimum norm estimates. Med. Biol. Eng. Comput. 32, 35–42. https://doi.org/10.1007/BF02512476 (1994).

35. Dale, A. M. & Sereno, M. I. Improved localization of cortical activity by combining EEG and MEG with MRI cortical surface reconstruction: A linear approach. J. Cogn. Neurosci. 5, 162–176. https://doi.org/10.1162/jocn.1993.5.2.162 (1993).

36. Iwaki, S. & Ueno, S. Weighted minimum-norm source estimation of magnetoencephalography utilizing the temporal information of the measured data. J. Appl. Phys. 83, 6441. https://doi.org/10.1063/1.367732 (1998).

37. Sekihara, K., Sahani, M. & Nagarajan, S. S. Localization bias and spatial resolution of adaptive and non-adaptive spatial filters for meg source reconstruction. Neuroimage 25, 1056–1067. https://doi.org/10.1016/J.NEUROIMAGE.2004.11.051 (2005).

38. Samuelsson, J. G., Peled, N., Mamashli, F., Ahveninen, J. & Hämäläinen, M. S. Spatial fidelity of MEG/EEG source estimates: A general evaluation approach. Neuroimage 224, 117430. https://doi.org/10.1016/j.neuroimage.2020.117430 (2021).

39. López, J. D., Litvak, V., Espinosa, J. J., Friston, K. & Barnes, G. R. Algorithmic procedures for Bayesian MEG/EEG source reconstruction in SPM. Neuroimage 84, 476–487. https://doi.org/10.1016/j.neuroimage.2013.09.002 (2014).

40. Huang, Y., Parra, L. C. & Haufe, S. The New York Head—A precise standardized volume conductor model for EEG source localization and tES targeting. Neuroimage 140, 150–162. https://doi.org/10.1016/j.neuroimage.2015.12.019 (2016).

41. Vorwerk, J. et al. A guideline for head volume conductor modeling in EEG and MEG. Neuroimage 100, 590–607. https://doi.org/10.1016/j.neuroimage.2014.06.040 (2014).

42. Colton, D. & Kress, R. Inverse Acoustic and Electromagnetic Scattering Theory 4th edn. (Springer, 2019).

43. Fischl, B. FreeSurfer. NeuroImage 62, 774–781. https://doi.org/10.1016/J.NEUROIMAGE.2012.01.021 (2012).

44. Gramfort, A. et al. MNE software for processing MEG and EEG data. Neuroimage 86, 446–460. https://doi.org/10.1016/J.NEUROIMAGE.2013.10.027 (2014).

45. Själander, M., Jahre, M., Tufte, G. & Reissmann, N. EPIC: An Energy-Efficient, High-Performance GPGPU Computing Research Infrastructure (2019).

46. Hari, R. & Puce, A. MEG-EEG Primer (Oxford University Press, 2017).

47. Ahn, M., Hong, J. H. & Jun, S. C. Feasibility of approaches combining sensor and source features in brain-computer interface. J. Neurosci. Methods 204, 168–178. https://doi.org/10.1016/J.JNEUMETH.2011.11.002 (2012).

48. Lindgren, J. T. As above, so below? Towards understanding inverse models in BCI. J. Neural Eng. 15, 012001. https://doi.org/10.1088/1741-2552/AA86D0 (2017).

49. Edelman, B. J., Baxter, B. & He, B. EEG source imaging enhances the decoding of complex right-hand motor imagery tasks. IEEE Trans. Biomed. Eng. 63, 4–14. https://doi.org/10.1109/TBME.2015.2467312 (2016).

50. Li, M. A., Wang, Y. F., Jia, S. M., Sun, Y. J. & Yang, J. F. Decoding of motor imagery EEG based on brain source estimation. Neurocomputing 339, 182–193. https://doi.org/10.1016/J.NEUCOM.2019.02.006 (2019).

51. Lotte, F., Lécuyer, A. & Arnaldi, B. FuRIA: An inverse solution based feature extraction algorithm using fuzzy set theory for brain-computer interfaces. IEEE Trans. Signal Process. 57, 3253–3263. https://doi.org/10.1109/TSP.2009.2020752 (2009).

52. Lau-Zhu, A., Lau, M. P. & McLoughlin, G. Mobile EEG in research on neurodevelopmental disorders: Opportunities and challenges. Dev. Cogn. Neurosci. 36, 100635. https://doi.org/10.1016/J.DCN.2019.100635 (2019).

53. Mehta, R. K. & Parasuraman, R. Neuroergonomics: A review of applications to physical and cognitive work. Front. Hum. Neurosci.https://doi.org/10.3389/FNHUM.2013.00889 (2013).

54. Sawangjai, P., Hompoonsup, S., Leelaarporn, P., Kongwudhikunakorn, S. & Wilaiprasitporn, T. Consumer grade EEG measuring sensors as research tools: A review. IEEE Sens. J. 20, 3996–4024. https://doi.org/10.1109/JSEN.2019.2962874 (2020).

55. Akalin Acar, Z. & Makeig, S. Effects of forward model errors on EEG source localization. Brain Topogr. 26, 378–396. https://doi.org/10.1007/S10548-012-0274-6 (2013).

56. Seeber, M. et al. Subcortical electrophysiological activity is detectable with high-density EEG source imaging. Nat. Commun.https://doi.org/10.1038/s41467-019-08725-w (2019).

57. Hassan, M. & Wendling, F. Electroencephalography source connectivity: Aiming for high resolution of brain networks in time and space. IEEE Signal Process. Mag. 35, 81–96. https://doi.org/10.1109/MSP.2017.2777518 (2018).

58. He, B., Yang, L., Wilke, C. & Yuan, H. Electrophysiological imaging of brain activity and connectivity-challenges and opportunities. IEEE Trans. Biomed. Eng. 58, 1918–1931. https://doi.org/10.1109/TBME.2011.2139210 (2011).

59. Hassan, M. et al. Functional connectivity disruptions correlate with cognitive phenotypes in Parkinson’s disease. NeuroImage Clin. 14, 591–601. https://doi.org/10.1016/J.NICL.2017.03.002 (2017).

60. Pievani, M., de Haan, W., Wu, T., Seeley, W. W. & Frisoni, G. B. Functional network disruption in the degenerative dementias. Lancet Neurol. 10, 829–843. https://doi.org/10.1016/S1474-4422(11)70158-2 (2011).

61. Lai, M., Demuru, M., Hillebrand, A. & Fraschini, M. A comparison between scalp- and source-reconstructed EEG networks. Sci. Rep. 8, 1–8. https://doi.org/10.1038/s41598-018-30869-w (2018).

62. Barzegaran, E. & Knyazeva, M. G. Functional connectivity analysis in EEG source space: The choice of method. PLoS ONE 12, e0181105. https://doi.org/10.1371/journal.pone.0181105 (2017).

63. Liu, Q., Ganzetti, M., Wenderoth, N. & Mantini, D. Detecting large-scale brain networks using EEG: Impact of electrode density, head modeling and source localization. Front. Neuroinform. 12, 4. https://doi.org/10.3389/FNINF.2018.00004/BIBTEX (2018).

## Acknowledgements

This study was supported by Enabling Technologies—Norwegian University of Science and Technology, under the project “David versus Goliath: single-channel EEG unravels its power through adaptive signal analysis—FlexEEG”.

## Author information

Authors

### Contributions

A.S. designed and simulated all the scenarios, processed and analyzed the results and wrote the manuscript. L.M. designed the optimization algorithm which was adapted to source reconstruction by A.S., and read and wrote the manuscript. E.G. and M.M. conceived the idea of identifying optimal subsets of EEG channels for EEG source reconstruction by using optimization, discussed the scenarios to be simulated and the results, and read and wrote the manuscript.

### Corresponding author

Correspondence to Andres Soler.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

### Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Soler, A., Moctezuma, L.A., Giraldo, E. et al. Automated methodology for optimal selection of minimum electrode subsets for accurate EEG source estimation based on Genetic Algorithm optimization. Sci Rep 12, 11221 (2022). https://doi.org/10.1038/s41598-022-15252-0

• Accepted:

• Published:

• DOI: https://doi.org/10.1038/s41598-022-15252-0