Realizing the Application of EEG Modeling in BCI Classification: Based on a Conditional GAN Converter

Electroencephalogram (EEG) modeling in brain-computer interface (BCI) provides a theoretical foundation for its development. However, limited by the lack of guidelines in model parameter selection and the inability to obtain personal tissue information in practice, EEG modeling in BCI is mainly focused on the theoretical qualitative level which shows a gap between the theory and its application. Based on such problems, this work combined the surface EEG simulation with a converter based on the generative adversarial network (GAN), to establish the connection from simulated EEG to its application in BCI classification. For the scalp EEGs modeling, a mathematical model was built according to the physics of surface EEG, which consisted of the parallel 3-population neural mass model, the equivalent dipole, and the forward computation. For application, a converter based on the conditional GAN was designed, to transfer the simulated theoretical-only EEG to its practical version, in the lack of individual bio-information. To verify the feasibility, based on the latest microexpression-assisted BCI paradigm proposed by our group, the converted simulated EEGs were used in the training of BCI classifiers. The results indicated that, compared with training with insufficient real data, by adding the simulated EEGs, the overall performance showed a significant improvement (P = 0.04 < 0.05), and the test performance can be improved by 2.17% ± 4.23, in which the largest increase was up to 12.60% ± 1.81. Through this work, the link from theoretical EEG simulation to BCI classification has been initially established, providing an enhanced novel solution for the application of EEG modeling in BCI.


INTRODUCTION
Non-invasive brain-computer interface (BCI) as a branch in neuroscience, has continuously been a hotspot in recent decades. The focal point of the research has been shifted from the signal detection at first (Berger, 1929), to the paradigm proposal (Herrmann, 2001;Pfurtscheller and Neuper, 2001;Wolpaw et al., 2002;Polich, 2007), then the EEG decoding and classification (Koelstra et al., 2012;Chen et al., 2015;Muller-Putz et al., 2016). With the growing publication of related studies, attention began to be paid to the generation mechanism and modelling of EEG in BCI, attempting to provide more solid theoretical foundations.
Unlike clinical medicine (Sanz-Leon et al., 2015), EEG modeling launched by BCI usually adopted the neuronal population level-based modeling approach and has been more concerned with the theoretical qualitative simulation. The "neural population" had first been put forward in the 1970s, assuming that all nervous processes can be dependent upon the interaction of excitatory and inhibitory cells (Freeman, 1972(Freeman, , 1973(Freeman, , 1975Cowan, 1972, 1973). Later, it was adopted by Lopes da Silva in modeling the generation of rhythmic activity (Lopesdas et al., 1974;Lopes da Silva et al., 1976). In 1995, the neural mass model (NMM) was proposed by Jansen and Rit (1995) in the mathematical computation of visual evoked potential (Jansen et al., 1993). Since then, Jasen-Rit NMM established the connection between deep EEG modeling and the BCI paradigm, and became popular in terms of BCIrelated EEG modeling. In 2006, Wendling NMM (Wendling et al., 2002, as an improved Jasen-Rit, was utilized in the simulation of cortical activity during motor tasks (Zavaglia et al., 2006). Afterward, NMM was applied in the EEG simulation based on the scene graph steady-state visual evoked potentials BCI paradigm  and the EEG driven by facial expression (Zhang et al., 2016).
Neural mass model-based EEG modeling does evidence the signal response under the BCI paradigm to some extent, but by far it has not formed guidance for the paradigm design and it is still a certain distance away from application in BCI. Firstly, according to the anatomy, the output of NMM is the postsynaptic membrane potential, which can be regarded as the deep source of surface EEG, but not the collected one. Certainly, under well-selected parameters, phenomena in surface EEG can be reproduced (i.e., significant frequency distribution (Jansen and Rit, 1995), rhythmic activity (Ursino et al., 2010), energy undulation (Zavaglia et al., 2006)); However, the selection of NMM parameters in BCI relied largely on manual adjustment and consumed large efforts. Another challenge is the forward computation from the inner source to the scalp signal, which especially requires one's tissue conductivity and geometry (Cosandier-Rimele et al., 2010). Although the simplified threeshell concentric spherical head model can be adopted (Berg and Scherg, 1994), without extra modification the result still stayed at the theoretical level (meanwhile, it is unaffordable and impossible for investigators to obtain complex tissue data from every user in practice). Obstacles above (i.e., the selection of NMM parameters, and the lack of individual biometric data) limited the application of EEG simulation in BCI. However, without the application, modeling, and simulation of EEG, it lacked practical meaning, was stuck in the theoretical level, and felt within an inch of enough.
In the other aspect, building the link between EEG simulation and its application in BCI is also valuable for BCI. Simulated EEG has its natural advantage in data amount. If the simulated signal can be applied to BCI training, it can become another feasible solution to reduce the amount of pre-collected training data and alleviate the problem of data insufficiency. To build such a link, the core problem lies in how to realize the personal scalp EEG simulation without detailed individual tissue data and the fine tuning of the NMM parameter. Encouraged by the work of probabilistic forecasting (Koochali et al., 2019), data augmentation (Fan et al., 2020;Luo et al., 2020), and EEG feature generating (Krishna et al., 2021) with generative adversarial networks (GAN), in this work, we proposed an EEG simulation method with conditional GAN combined to compensate for the lack of tissue information, hence establishing the link between EEG modeling and its application.
In this paper, emphasis was laid on surface EEG modeling and realizing its application in BCI classification. In the methodology section, the generation physics of surface EEG were explained firstly thus deriving the mathematical model of scalp EEG; Then, focusing on the realistic dilemma, a conditional GAN converter was proposed to transform the simulated EEGs from the theoretical-only to its practical version, to overcome the lack of individual bio-information. In the data acquisition section, the experimental EEGs acquisition and the paradigm-related parameters were stated. In the results section, the feasibility of applying the EEG simulation to the BCI classification was estimated. As followed, the discussion section discussed the performance and the limitation of this work, and the conclusion was summarized in the conclusion section.

METHODOLOGY
To build the connection between EEG modeling and its application in BCI, the method started from the scalp EEG modeling, and then a converter based on the conditional GAN was combined to transfer the theoretical-only simulated-EEG to its practical version. The overall schematics diagram is illustrated in Figure 1.

The Mathematical Model of Surface Electroencephalogram
Electroencephalogram measures the large-scale simultaneous activation of the brain neurons through the surface electrodes placed on the scalp (Berger, 1929). It is generally believed that the extracellular potential field generated by postsynaptic potentials is the source of an EEG (Baillet et al., 2001;Hallez et al., 2007). Since only the regular arrangements of neurons can amplify their extracellular potential field to a measurable extent, the extracellular potential fields raised by the postsynaptic potential of pyramidal cells are generally admitted to be the generator of the EEG. The extracellular potential is caused by the migration of positively charged ions (Schaul, 1998), as illustrated in Figure 2. From the extracellular environment to the brain surface, the spread pathway contains the gray matter, the white matter, the cerebrospinal fluid (CSF), the skull, and the scalp. Only by passing through various tissues, can the electrical activity deep within the brain be finally detected by EEG electrodes. According to the physics of surface EEG, the modeling process of scalp EEG can be divided into three nodes: the postsynaptic membrane potential, the extracellular electric field and the forward computation from deep EEG to scalp EEG. Following are the details.

Modeling of Postsynaptic Membrane Potential
According to the physics, the modeling starts from the postsynaptic membrane potential. For being generated by largescaled simultaneous activation, instead of isolated neurons, the cortical activity is simulated with the population-level based model: NMM.
In NMM, one population represents neurons that are lumped together with the same membrane potential. A single population includes the interaction among four neural subgroups (Wendling et al., 2002), pyramidal cells, excitatory interneurons, inhibitory interneurons with slow synaptic kinetics, and inhibitory interneurons with faster synaptic kinetics, as illustrated in Figure 3.
In Figure 3, a static nonlinearity sigmoid relationship is used to convert the average postsynaptic membrane potentials to an average spike density. Then a second-order transfer function h(t) transfers the presynaptic spike density to the postsynaptic membrane potential. This second-order representation of synaptic effect was firstly derived by Rotterdam (van Rotterdam et al., 1982) and is still in use. After simplification, the mathematical equations of Wendling's NMM (Wendling et al., 2002) are where A, B, & G are the average gain in synaptic effect, and a, b, & g are the time constant; C 1 ∼C 7 represent the connectivity constants between neuron groups; P(t) is the sum of exogenous contributions. The sigmoid function is where e 0 determines the maximum firing rate of the neural population, s 0 is the mean firing threshold, and r is the slope. Since a single population can only produce a unimodal spectrum, multiple coupled neural populations with different ways of connecting were studied (Wendling et al., 2000) to describe the neural activity in a wide bandwidth. By separating typical EEG into three bands as the low (4-12 Hz), the medium (12-30 Hz), and the high (>30 Hz) (Zavaglia et al., 2006), parallel feedforward schema of three populations were arranged to mimic the overall complexity of EEG, as illustrated in Figure 4. The postsynaptic membrane potential V out under multi-parallelpopulations is where superscript L, M, and H indicate the three populations in representative EEG bands, and w k (k = L, M, H) stands for the weights.

Equivalent Model of Extracellular Electric Field
The generator of the extracellular electric field can be viewed as a simplified electric model with two current monopoles, as demonstrated in Figure 5. At the apical dendrite side, a current sink is used to describe the influx of positive ions. At the cell body, a current source is placed to represent the injection of positively charged ions into the extracellular environment. The frequency range and time-variation of measured EEGs indicate that there is no charge piled up in the conducting extracellular volume (Plonsey and Heppner, 1967). Thereby the simplified electric model can be regarded as a current dipole that consists of two equal anisotropic charges. Following the population level-based modeling approach in "Modeling of Postsynaptic Membrane Potential, " the simultaneous electrically active pyramidal cells in a small patch can be represented as one equivalent dipole (He et al., 2002).
The electric-field intensity of the dipole in a quasi-static field can be driven utilizing the gradient operator where E is the vector electric-field intensity in V/m, ∇ is the gradient operator, and U is the scalar potential field. For a dipole, the scalar potential in a vacuum at any point a is where k is the scale factor, r 1 r 2 r are distances apart from the positive, the negative, and the dipole center respectively, p is distance between two monopoles, I is the current injected or removed, and d is the dipole moment. By combining (4) and (5), the equipotential lines and electric-field intensity in vicinity is illustrated in Figure 6.

Forward Computation of Surface Electroencephalogram
From the extracellular field to the scalp, charges pass through the gray matter, the white matter, the cerebrospinal fluid (CSF), the skull, and the scalp. Tissues on this pathway have their unique Frontiers in Neuroscience | www.frontiersin.org conductivities, resulting in a smearing effect on the forward potential computation (Wolters et al., 2006). Among them, the conductivities for gray matter, scalp, and CSF are isotropic (Baumann et al., 1997); While the white matter and the skull have anisotropic conductivity (Rush, 1900;Nicholson, 1965).
By multiplying the electric field E and the conductivity, the current density is introduced to describe the total flow of charge per time over a cross-section of area. According to Ohm's law, the current density is J = κE where vector field J in A/m 2 indicates the current density perpendicular to the cross-sectional area of the conductor, and κ is the electrolytic conductivity with units S/m. For isotropic conductivities κ is a scalar; While for anisotropic conductivities, κ ∈ R 3×3 is a position dependent conductivity tensor as κ=   κ 11 κ 12 κ 13 κ 12 κ 22 κ 23 κ 13 κ 23 κ 33   By applying the divergence operator to the current density, according to Poisson's equation, relationships can be defined where the ∇ · J is often called the current source density and symbolized with I m in Enderle (2012). To compute the potential field on different tissues, combing equation (4), (6), and (8), a general formed Poisson's differential equation can be obtained For a dipole, the current source density at any point can be written as a delta function with its distance from the positive and the negative.
where r 1 r 2 are the same as in (5).
In the Cartesian coordinate system, setting the positive monopole at position (x 1 , y 1 , z 1 ) and the negative at (x 2 , y 2 , z 2 ), at any point (x, y, z) (10) becomes κ 11 (11) for anisotropic conductivities. For isotropic conductivities with a scalar κ, (10) can be written as

GAN Converter: From Simulated Signal to Practical Electroencephalograms
To accurately simulate the scalp EEGs, one's unique tissue conductivity, geometry, and the location of the EEG generator are crucial in the forward computation. Such data have to be measured with specific equipment (e.g., Magnetic Resonance Imaging). But in practice, for BCI, it is impossible to get this biological information from every user. Without detailed personal data, however, the simulated scalp EEGs can only stop at theory without being used in realistic applications. To mimic one's real EEGs in the lack of individual bio-information, the generative adversarial network (GAN) was adopted to convert the simulated signal into its practical version.

Conditional Generative Adversarial Network for Practical Electroencephalograms Imitation
Generative adversarial network was firstly proposed by Goodfellow et al. (2014), which provides the ability to counterfeit images that are statistically indistinguishable from real ones. A GAN consists of two networks: a Generator and a Discriminator. The Generator is trained to produce counterfeits that can deceive the Discriminator. As an adversary, the Discriminator aims at distinguishing the true from the fake. Inspired by GAN's genius in image forgery, it was adopted in this work as a powerful converter to transform the simulated scalp EEGs from the theoretical-only to the practical.
To transform the simulated EEGs hence applying in the training of BCI classifier, conditional GAN was adopted to output signals with labels as the specified intention. For traditional GANs, the input of the Generator is a random vector, and several up-sampling computations are used to expand pixels. However, as a converter in this research, the simulated scalp EEGs were fed as input instead, without extra up-sampling.
According to our previous experimental setup in the BCI serial studies Zhang et al., 2021b), to realize the real-time decoding, continuous collected EEGs (4 s) were sliced into short-windowed (100 ms) to form the training-set. To reproduce the dataset forming procedure and augment the real EEGs samples, the output of the Generator was sliced to windowlength size before entering the Discriminator. The conditional GAN in this work is illustrated in Figure 7.

Generator and Discriminator
In general cases, the input for the Generator is one-dimensional noise. Thus, one-hot labels for conditional GAN can be concatenated just after the noise. But in this work, with inputs being multi-channeled simulated scalp EEGs, one-hot labels were fed and transformed as an extra channel concatenated with the simulated signal. The transform of the label input is demonstrated in Figure 8, of which the Generator and the Discriminator shared the same method but a different number of dense nodes.
The detailed design of the Generator and the Discriminator is listed in Tables 1, 2. In both networks, the selection of kernel size followed the principle from a rough glance to a fine adjustment. The optimizer and the cost function of GAN are shown in Table 3. In the training process of GAN, the output of the Generator was unclear at the beginning. Then the awkward outputs mixed with the real collected EEGs were fed into the Discriminator to train a pair of discerning eyes. Subsequently, the Discriminator was frozen, and the Generator was trained to confuse the Discriminator according to the loss of the GAN. After iterations, with a comparable capability of the two networks, the Generator was able to successfully convert the simulated EEGs to the convincingly share the same characteristics as the real collected data.

EXPERIMENTAL DATA
In the experiment, the latest EEG-based control paradigm assisted by microexpressions (ME-BCI) (Zhang et al., 2021b) proposed by our team was adopted, to verify the feasibility of scalp EEG modeling and its application in BCI training.

Experimental Electroencephalograms Acquisition
The commercial wireless EEG acquisition system (Neuracle Technology Co., Ltd.) with 30 EEG channels and 1000 Hz sampling rate is adopted in this study, as illustrated in Figure 9.
The electrode placement is demonstrated also in Figure 9,  in accordance with the international 10-20 location system, in which AFz is the ground and Cpz is the reference by default. Eight healthy subjects (25-38 years of age) participated in the experiment (World Medical Association, 2013). Following our latest progress on ME-BCI (Zhang et al., 2021b), real EEGs were collected. Four microexpressions were selected: micro raise-brow (mRB), micro furrow-brow (mFB), micro left-smirk (mLS), and micro right-smirk (mRS), as illustrated in Figure 10. Each microexpression was conducted for 4 sessions (including 6 trials) per subject. In each trial, 3 s countdown, 4 s microexpression, and 2 s rest were contained in turn, as demonstrated in Figure 11. During data collection, subjects were asked to sit quietly and avoid extra body movements.
In the ME-BCI related serial works Zhang et al., 2021b), for the real-time requirement, each result was decoded with 100 ms EEG input. Thus, in this work, the EEG sequences were still sliced into pieces with short-window-length. Real collected EEG data were divided into two parts: 1st session as a template for simulated EEGs conversion, 2nd ∼ 4th sessions as testing-set for feasibility verification.

The Head Models and the Dipole Position
Facing the lack of one's unique tissue conductivity and geometry, the three-shell standard mesh of the human head in FieldTrip (Oostenveld et al., 2010) was adopted as a template. In this standard mesh, the head structure is simplified into several surfaces, including brain, skull, and scalp; On the scalp are the EEG electrodes. Figure 12 shows the surfaces of the standard head model, and the electrodes in accordance with the Neuracle Device.
As for the location of the EEG generator, since the precise positioning cannot be achieved without the extra professional equipment, the dipole was set in accordance with the mechanism. In our serial research on ME-BCI (Zhang et al., 2016(Zhang et al., , 2021bLi et al., 2018b;Lu et al., 2018aLu et al., ,b, 2020, data-driven brain connectivity analysis demonstrated the main involvement of the motor cortex Zhang et al., 2021b), which conformed to the contralateral control facts. Meanwhile, evidence showed the frontal lobe and limbic system also participate in facial-expression processing (Price and Drevets, 2010;Li et al., 2018b;Lu et al., 2018b). Thereby, the dipole was set orthogonalization to the surface in the frontal lobe/motor cortex, separately for different microexpressions (Figure 13).

Postsynaptic Membrane Potential
To simulate postsynaptic membrane potentials in three representative EEG bands as low (4-12 Hz), medium (12-30 Hz) and high (>30 Hz), different parameter values were taken in tuning the peaks. Part of parameters in (1) and (2) are common for each band whose values are determined according to anatomical facts ( Table 4; Freeman, 1987;Jansen and Rit, 1995).
Using the 4th order Runge-Kutta algorithm, differential equations in (1) can obtain accurate numerical solutions. Under certain parameter combinations, the peak can be fine-tuned by adjusting only G (the average gain for fast inhibitory interneurons) (Zavaglia et al., 2006). Setting the FIGURE 9 | The Neuracle wireless EEG acquisition system and its electrode placement, in which AFz is the ground and Cpz is the reference by default. exogenous input P(t) as a random noise (mean value = 60, variance = 100), Table 5 lists the system parameters to generate peaks approximately in three bands. Figure 14 illustrates the spectrum of each population.
To mimic the subject's EEG, population weights are calculated via one's real EEGs (1st session of experimental data). The uniformly scaled energies within the band's range in Real EEGs were set as the population weights, as listed in Table 6. The mimic postsynaptic membrane potentials are shown in Figure 15.

Multi-Channelled Scalp Electroencephalograms
With the standard mesh of the human head, the forward computation was calculated with the boundary element method (BEM) for its low computational needs (Fuchs et al., 2002).
According to the dipole setup, the simulated multi-channeled scalp EEGs were demonstrated in Figure 16.
However, due to the blankness of the individual bioinformation, the simulated multi-channeled scalp EEGs lacked realism in the temporal domain. But literature showed its capability in mimicking the spectral characteristics . Table 7 lists the Pearson correlation coefficient between the simulated scalp EEGs and the real collected 1st session in spectrum distribution. Figure 17 demonstrated the spectrum comparison between simulated scalp EEGs and the real collected one.
Unlike visual evoked potentials, the frequency spectrum distribution of the ME-BCI paradigm showed no typical features (Zhang et al., 2016). As shown in Table 7, without a fine tuning in NMM parameters, dipole positions, and tissue configurations, the simulation ability of computation is limited for spectra without significant characteristics. The value in Table 7 indicated that the correlation existed, but was not high.

Conversion and Application of Simulated Scalp Electroencephalograms
Given the lack of biological information, the theoretical simulation of multi-channeled scalp EEGs can only reproduce some general phenomenon. To complete the conversion of simulated EEGs to its useful practical version in BCI, the simulated signals were fed into the conditional GAN. The training losses of the Discriminator and the GAN are illustrated in Figure 18.
With the random exogenous input P(t), the population weights, the dipole position, and the conditional label, endless practical simulated EEGs can be generated through the conversion. To verify the feasibility and capability of this method, the simulated EEGs mixed with the real collected 1st session were used to train a ME-BCI classifier, and the rest of the 2nd to 4th sessions were used to test its performance. The division of datasets is shown in Figure 19.
All EEGs, both the real and the simulated one, were detrended and filtered into [2 Hz, 55 Hz] with 4th-order Butterworth bandpass-filter. To form an intuitive comparison, same as previous research , EEGs were sliced into short-windowed (100 ms) segments, and the same feature extraction method Common Spatial Pattern (CSP) was adopted to emphasize the performance between "training with only real EEGs" and "training with fake augmented EEGs." The spatial filter of CSP was calculated via the training-set. The 'one versus rest' strategy was adopted in the CSP. Various commonly used classifiers were used to calculate the validation accuracy and test accuracy. The validation and test performances under 'training with fake augmented EEGs' are listed in Table 8.
As shown in Table 8, classifiers such as K-nearest neighbor (KNN) and some ensembles (i.e., bagged trees, and subspace KNN) achieved higher validation accuracies. As for test accuracies, due to the individual differences, the personal best varied from 73.7 to 98.1%. The mean test accuracy among classifiers is 84.93% ± 1.25. The overall performance in Table 8 indicates the feasibility of applying the simulated EEGs to the BCI classifier training, through a GAN conversion. For a detailed comparison, accuracies under the training-set with only the 1st session real EEGs were also estimated. The validation and test performances under 'training with only the real 1st session EEGs' are shown in Table 9.
Comparing Table 9 with Table 8, most accuracies have been improved after the data augmentation with simulated EEGs, both the validation and the test. The two-sample T-test shows  that after adding the simulated EEGs, the overall performance (both validation and test) has a significant improvement (P = 0.04 < 0.05), compared with insufficient real data. By marking the improvement in test accuracy as positive, and the decline as negative, the overall performance under augmenting with fake EEGs is 2.17% ± 4.23. Among all subjects, test accuracy   Figure 20 demonstrates the confusion matrix of six classifiers under training with "fake EEGs augmented" vs. "only real EEGs". The blue high-lighted blocks in Figure 20B indicate that the performance has been improved after being augmented by the converted simulated EEGs. Here, the improvements mean a raise in true positive, or a decline in false positive. In all six classifiers, the distribution between "fake EEGs augmented" and "only real EEGs" basically remained the same, and showed no obvious imbalance among categories. The confusion result indicates that this training-set augmentation method with simulated EEGs shows no bias and maintains the same level of performance among categories.

DISCUSSION
In this work, a mathematical model of scalp EEG is presented, and a conditional GAN is put forward to convert the simulated scalp EEGs from theoretical-only to practical, hence applying in the training of BCI classifiers. Through this study, we have taken a step forward from the theoretical modeling of EEG, and initially established the connection between simulated EEGs and its practical applications in BCI. The pros and cons existing in this work are discussed as followed.

The Tuning of Neural Mass Model Parameters, and the Structure of Coupled Neural Mass Model
Neural mass model is represented as a group of differential equations with several parameters related to physiological mechanisms. Apart from the anatomy-related common parameters (C, e 0 , s 0 , and r), for a single population, Jasen-Rit NMM with two feedback interneurons has four adjustable parameters (Jansen and Rit, 1995), Wendling NMM with three feedbacks has six (Wendling et al., 2002), and the more in Ursiono NMM (Ursino et al., 2010). For a multi-population model, the adjustable parameters grow exponentially, and the coupling structure also affects the output (Wendling et al., 2000). However, the peak of NMM output shows a complex non-linear relationship to the coupling of parameters. To strictly reproduce the event within collected EEGs, large efforts have to be paid  or an extra fitting algorithm has to be added to tune the NMM parameters. Another difficulty in parameter tuning is the chaos of NMM (Huang et al., 2011). Even with changeless parameters, the output of NMM remains fluctuated and shows instability to different initial values and random exogenous input.
In this work, with emphasis put on the link between EEG modeling and its application in BCI, the careful selection of the NMM parameters for each individual seems unaffordable and less practical. With a GAN converter added, the strict re-produce of EEG characteristics is no longer obsessed, thereby largely ease the NMM parameter tuning step.
Since single NMM can only generate a unimodal spectrum, for cortical responses, multi-coupled NMM was adopted in the modeling of postsynaptic membrane potential. In Jansen and Rit, 1995;Zhang et al., 2016;Li et al., 2018a, a double-column model   was used to model the generation of neural activity potential. In this work, the triple-population coupled NMM structure was adopted; Compared to the double-column model, the simulated output of triple-population showed more details within the EEG band, and can reproduce the fast activity within EEG. As for the studies that involve triple coupled model, such as Zavaglia et al. (2006) and Zhang et al. (2021a), different detailed population weights were set to adjust the coupling proportion within multi-populations. Such population weights were calculated via collected personal EEG data, thus improving the realism and enhancing the personal characteristics of the cortical response.

Overcome the Lack of Personal Brain Tissue Data
From the postsynaptic membrane potential to the scalp EEGs, personal brain tissue data matters a lot. These data include the geometric shape of the brain surface, the tissue conductivity, and the position of the cortical sources. Even by using the BEM method, further combing a distributed source model (Dale et al., 2000), the realistic cortical shape is still crucial in the forward computation. This information by far has to be determined from Magnetic Resonance Imaging (MRI). An MRI system costs millions of dollars. For non-medical department students or even some colleges, there is little chance of accessing the MRI. Even if it can be detected, this personal and costly modeling method is not practical in the field of BCI. After all, in application, it is impossible for every user to undergo MRI detection.
To overcome these obstacles we faced during research, the GAN converter was used in this work to make up for the default in personal data. Focusing on the BCI field, not only simulation but application, with the method in this work, large numbers of applicable scalp EEGs can be generated. Meanwhile, it should be made feasible to apply the simulated EEGs to the training of BCI classifier.

Build the Connection Between Electroencephalogram Simulation and Application in BCI
Electroencephalogram modelling in BCI area is related to specific mental tasks or BCI paradigms, but it by far has not formed guidance for the paradigm design or built any connection with its application in BCI; In other words, the EEG modelling in BCI derives from BCI but exists independently of BCI, lacking integrity. Jansen and Rit (1995) simulated the generation of visual evoked potential in EEG, which outputted signals with approximate phase response and, in detail, exported the influence of NMM parameters. But, strictly, the output ended up as the postsynaptic membrane potential, and no more properties other than phase were discussed. Zavaglia et al. (2006) reproduced the power spectral density and the temporal changes of cortical EEG during finger movement; However, the use of large fitting methods (in optimizing NMM parameters) and the MRI measurement made it difficult to establish the connection with the application in BCI. Delphine's work (Cosandier-Rimele et al., 2010) established the computational modeling of epileptic activity, proposed a solid study in scalp EEG simulation; Although this work was unrelated to BCI paradigms, it indicated that the scalp EEG simulation are very sensitive to the geometry and electrical properties of the different head tissues (mainly, the brain, skull, and scalp), discussing the gap between the simulated-EEG and the actual-EEG and its difficulty of application. Recently, Li et al. (2018a) simulated the EEG frequency response of the scene graph steady-state visual evoked potentials; Similarly, the output ended up at the postsynaptic membrane potential, discussed no other properties besides the visual response frequency, and formed no guidance for paradigm design or application. In the latest, Hanzhe (Zhang et al., 2021a) built the mathematical model of EEG for lower limb voluntary movement intention based on NMM; However, the output did not propagate to the scalp EEG, and made no comparison with the real collected signal.
The works above did make large amounts of progress in EEG modeling related to different BCI paradigms or mental tasks, however a large number of them stopped at the postsynaptic membrane potential, and focused mainly on the reproduction of little EEG response characteristics. Compared to them, this work focused on establishing the connection between the EEG modeling and its application, by proposing the scalp EEG model and applying the simulated scalp EEG into the training of BCI classifiers, so as to add to the modeling study; The 2.17% ± 4.23 improvement of test accuracy demonstrated the feasibility. Meanwhile, in order to establish such a connection, compared to those precise modeling methods that required individual tissue data, this work adopted the standard head mesh during the simulation *Validation accuracies were estimated via 5-fold validation, in which classifiers with training-times longer than 5 mins were not recorded and marked with '/', and validation accuracies lower than 90% were marked with gray. For test accuracy, only classifiers whose validation accuracy was higher than 90% were estimated, and the highest test accuracy for each subject was marked with red. and proposed an additional converter to overcome such a data default problem.

The Limitations and Further Work
The Overfit Problem in Classification In the transformer from the awkward simulated EEGs to the applicable version, a conditional GAN was used. During the learning process of GAN, the signals in the real collected 1st session were used as the templates. The Discriminator would be deceived if the input showed similar features to the real templates. According to this logic, the Generator would finally output converted signals with the same features based on the judgment condition of the Discriminator. Therefore, the converted simulated signals would show distinct characteristics similar to templates. It is widely recognized that surface EEG is a non-linear and unstable signal with a low signal-to-noise ratio, and is easily affected by one's thinking or emotions. However, the simulated EEGs converted from GAN would have similar characteristics as the 1st session, so does the feature space. Since the focal point in this work is not emphasized on the EEG decoding, the feature extraction algorithm and the machine learning method are not discussed. Comparing Table 8 to Table 9, the accuracy in Table 8 shows a larger descent between the validation and the test than in Table 9. It can be found that, with the simulated EEGs added to the training, the test performance has been improved, but the over-fitting problem has been exacerbated at the same time. In future work, more attention should be paid to the diversity of the converted EEGs. The attentional mechanism can be involved (Lashgari et al., 2021), to focus more on the main characteristics so that to enable more randomness in other secondary characteristics.

The Lower Adaptability Among Classifiers
In Table 8, taking subject S4 as an example, among various classifiers, the validation accuracies range from 27.9 to 98.9%. For all subjects, classifiers such as "coarse tree, " "medium Gaussian SVM, " "coarse Gaussian SVM, " and "subspace discriminant" achieved low validation accuracies. While several KNNs performed better. The same result did not appear in the case of training with all real collected EEGs , although there are difference between real datasets.
As discussed above, the simulated EEGs converted by GAN shall appear the characteristic that accords with the discriminator's judgment basis. According to Table 8's result, such characteristics are more suitable with the computation logic of KNN. Further, it indicates that there are flaws in the design of the Discriminator in this article, perhaps the network structure or the cost function. Additionally, the symmetrical network structure tends to be adopted in the design of GAN, thus the same defects also exist in the Generator. In the next studies, more attention will be paid to the design of converter GAN, to ensure a better adaptability of simulated EEGs' application among different classifiers; Additionally, more kinds of decoding algorithms will also be adopted to estimate the feasibility, such as methods with hybrid-domain features (Ieracitano et al., 2021), end-to-end deep learning methods, transfer learning methods and so on.

CONCLUSION
This work established the connection from the EEG simulation to its application in BCI, and proved its feasibility in improving the test accuracy compared to insufficient real data. In this paper, a mathematical model of surface EEG was presented, and a GAN converter was proposed to transfer the theoretical simulated EEGs to its applicable version in BCI training.
In accordance with the physics of surface EEG, the mathematical computation is firstly started with a triplepopulation coupled NMM. Then the dipole and the forward computation were followed to model the propagation. To overcome the lack of individual biological data and build a bridge between the simulation and the application, a GAN converter was established to transfer the simulated scalp signal to its applicable version. In application, the converted simulated EEGs were used in the training of BCI classifiers. With the simulated EEGs added into the training-set, compared with only insufficient real collected data, the overall performance improved significantly (P = 0.04 < 0.05), and the test performance showed an overall 2.17% ± 4.23 increase. Among all subjects, the largest increase is 12.60% ± 1.81. Through this work, we hope to provide a novel feasible solution for the application of surface EEG modeling in BCI.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

ETHICS STATEMENT
The studies involving human participants were reviewed and approved by the institutional review board of Xi'an Jiaotong University (No. 20211452), and all experiments were conducted in accordance with the Declaration of Helsinki. The patients/participants provided their written informed consent to participate in this study. Written informed consent was obtained from the individual(s) for the publication of any potentially identifiable images or data included in this article.

AUTHOR CONTRIBUTIONS
XZ supervised this work and revised the manuscript. ZL proposed and did the research, and wrote the manuscript. TZ, HL, and YW organized and carried out the experiments. QT revised the manuscript. All authors contributed to the article and approved the submitted version.