Neural Field Theory of Evoked Response Potentials With Attentional Gain Dynamics

A generalized neural field model of large-scale activity in the corticothalamic system is used to predict standard evoked potentials. This model embodies local feedbacks that modulate the gains of neural activity as part of the response to incoming stimuli and thus enables both activity changes and effective connectivity changes to be calculated as parts of a generalized evoked response, and their relative contributions to be determined. The results show that incorporation of gain modulations enables a compact and physically justifiable description of the differences in gain between background-EEG and standard-ERP conditions, with the latter able to be initiated from the background state, rather than requiring distinct parameters as in earlier work. In particular, top-down gains are found to be reduced during an ERP, consistent with recent theoretical suggestions that the role of internal models is diminished in favor of external inputs when the latter change suddenly. The static-gain and modulated-gain system transfer functions are analyzed via control theory in terms of system resonances that were recently shown to implement data filtering whose gain adjustments can be interpreted as attention. These filters are shown to govern early and late features in standard evoked responses and their gain parameters are shown to be dynamically adjusted in a way that implements a form of attention. The results show that dynamically modulated resonant filters responsible for the low-frequency oscillations in an evoked potential response have different parameters than those responsible for low-frequency resting EEG responses, while both responses share similar mid- and high-frequency resonant filters. These results provide a biophysical mechanism by which oscillatory activity in the theta, alpha, and beta frequency ranges of an evoked response are modulated as reflections of attention; notably theta is enhanced and alpha suppressed during the latter parts of the ERP. Furthermore, the model enables the part of the ERP response induced by gain modulations to be estimated and interpreted in terms of attention.


INTRODUCTION
Evoked related potentials (ERPs) are scalp voltage responses to modulated stimuli. These are widely used to probe sensory processing and its technique has proved particularly valuable for testing theories of perception and attention (Picton et al., 2000;Herrmann and Knight, 2001;Kotchoubey, 2005;Womelsdorf et al., 2007;Woodman, 2010). When the visual stimulus is periodic with a frequency of at least 4 Hz the response overlaps into a quasisinusoidal oscillation to form a steady state visual evoked potential (SSVEP) with frequency and phase locked to the stimulus. The early part of the ERP response to visual stimuli is correlated with selective attention, processing of color, shape, and rotation (Kotchoubey, 2005), whereas later parts of the response are related to discrimination tasks, revealing more complex cognitive processes (Kotchoubey, 2005).
An ERP characteristic called visual mismatch negativity (MMN) is the difference between the "standard" response to a frequent stimulus and the "deviant" or "target" response to an infrequent stimulus that is interleaved with the frequent one. This is the visual analog of the original auditory mismatch negativity (Näätänen et al., 1978; for a review see Näätänen et al., 2010). This relatively simple electrophysiological measure is widely used to assess cognitive decline and hence functional deficiency associated with aging and many neuropsychiatric and neurological disorders (Kujala et al., 2007;Winkler, 2007;Näätänen et al., 2011).
To better understand ERPs and MMN, one must first understand the mechanism by which the background or standard evoked potential is generated, which is the focus of this study. The waveforms are traditionally described in terms of phenomenological ERP "components, " each of which is a peak or trough that is distinguished by its timing, polarity, and magnitude, with all other points in the ERP waveform being discarded; sometimes scalp distribution and sensitivity to task manipulations are also considered (Picton et al., 2000;Handy, 2005;Kotchoubey, 2005). ERP dynamics have been widely studied and associated with early and late information processing; however, relatively few studies have linked them explicitly to underlying mechanisms. In the present work we focus on the standard ERP that results from a repetitively applied stimulus that contains no novelty and to which subjects pay no conscious attention (Herrmann, 2001;Kotchoubey, 2005), particularly the first few hundred milliseconds after the stimulus, which contains the so-called N100 and P200 features, N100 being a negative deflection at around 100 − 150 ms post-stimulus, and P200 being a positive deflection at around 200 − 500 ms. Figure 1 shows a schematic of a typical background cortical ERP. The early components, peaking in roughly the first 100 ms, are termed "sensory" or "exogenous" because they depend FIGURE 1 | Schematic of a typical standard cortical ERP with prominent early and late components labeled N100 and P200, respectively. largely on the physical parameters of the stimulus (Peterson et al., 1995;Handy, 2005;Lakatos et al., 2007), while the later responses reflect internal processing and are termed "cognitive" or "endogenous" (Handy, 2005). In what follows we use N100 and P200 as convenient labels for the relevant features, but completely avoid analysis in terms of "components" in order to treat all the time series data on an equal footing, instead of focusing on isolated points.
Physiological changes underlie the observed electrical response, so ERPs contain information about how the brain carries out stimulus processing (Kotchoubey, 2005). It has been shown that ERPs display systematic changes in amplitude and timing depending on the stimulus characteristics, task instructions, age, and neurological disorders (Picton et al., 2000;Womelsdorf et al., 2007;Kerr et al., 2008Kerr et al., , 2011Woodman, 2010). Hence, the modulation of physiological parameters that leads to these conditions results in consistent, reproducible changes in the ERP. To extract maximum information from observed ERPs requires them to be related to the underlying physiology, potentially allowing physiology and function to be inferred from ERP features, rather than their analysis being limited to cataloging peaks and troughs and finding correlations. Despite many proposals regarding the physiological processes involved in ERPs, the basic mechanisms of such modulation are, nonetheless, poorly understood.
ERP techniques have been widely used to unveil key aspects of attention which are unobservable with conventional behavioral techniques. Attention permits us to focus on certain aspects of upcoming information at the expense of less relevant ones. EEGcorrelates of attention measured by ERPs include changes in the amplitude and timing of salient features. Most notably, both early and later features of ERPs are significantly enhanced in attentionally modulated responses (Hillyard and Anllo-Vento, 1998;Herrmann and Knight, 2001). Brain oscillations are also among correlates of attention which have been only studied recently, including modulation of alpha (≈ 7.5 − 12 Hz) and beta (≈ 12.5 − 30 Hz) oscillations due to attention (Herrmann and Knight, 2001;Marrufo et al., 2001;Ward, 2003;Yamagishi et al., 2003;Sauseng et al., 2005;Thut et al., 2006). However, the temporal dynamics of such activity modulation and its relationship to stimuli are not yet established.
In recent decades many brain phenomena have been explained in terms of physiologically based neural field theory (NFT) of the corticothalamic system in which microscopic structure is averaged over (Robinson et al., 1997Rennie et al., 2002;Robinson and Roy, 2015). The NFT equations are nonlinear in general and have been successfully employed to explain both linear dynamics and highly nonlinear phenomena such as epileptic seizures Breakspear et al., 2006). Steady states of corticothalamic NFT have been shown to underlie normal brain dynamics, with small linear perturbations representing time-dependent brain activity (Robinson et al., 1997(Robinson et al., , 1998. This approximation has enabled a large variety of experimental phenomena, in cohorts of up to 2,100 subjects, to be reproduced, including ERPs and steadystate evoked responses (O'Connor and Rowe et al., 2004;Robinson et al., 2005;Kerr et al., 2008;van Albada et al., 2010;Roberts and Robinson, 2012;Abeysuriya et al., 2015). Certainly, linear responses must be thoroughly understood before proceeding to nonlinear cases.
NFT of the corticothalamic system has also been used to study ERPs Kerr et al., 2008). In this case, the model was used in its original form where the neural gains were fixed throughout the process; we refer to this as a static-gain system. These authors found that the starting point of ERPs had rather different parameters than those that applied for background EEG, whereas one might have thought that they should be the same prior to arrival of the stimulus. This raises several key questions regarding the connectivity parameters: Why should we need a whole extra set of parameters to explain ERPs? How does attention affect ERP waveforms and through what mechanism? How does the brain adjust its connectivity (i.e., gains) on short timescales during an evoked response. Here we argue that, instead of postulating a new set of baseline parameters, the gains are modulated by known mechanisms as part of the evoked response itself-including habituation, facilitation, and similarly well-established effects (Koch, 1999;Rennie et al., 1999Rennie et al., , 2002. In particular, we examine whether these feedbacks can account for attentional modulation in response to new information (Babaie-Janvier and .
The present work uses the generalized NFT of the corticothalamic system developed by Babaie-Janvier and Robinson (2018) in which feedback loops change gains in response to stimuli, driven by changes in presynaptic and/or postsynaptic activity caused by local feedbacks that directly affect the synaptic strength (Koch, 1999;Rennie et al., 1999Rennie et al., , 2002Robinson and Roy, 2015), which we refer to as the dynamically-modulated system. These local feedbacks are formulated in a sufficiently general way to describe a broad range of specific biophysical mechanisms such as plasticity, long-term potentiation/depression, facilitation, habituation, and sensitization (Rennie et al., 1999Robinson and Roy, 2015). This yields a tractable representation of dynamic gain modulations that are part of the system's linear stimulus response. Of course, if the modulations were to become sufficiently large, a fully nonlinear analysis would be necessary. Our model is then used to analyze the stimulus-driven cortical response in terms of low-frequency, alpha, and beta resonances that can be interpreted as implementing standard data filters that predict the input and attend to their changes (Babaie-Janvier and Robinson, 2018. Our aims are: (i) to predict the standard ERP when the driving signal is not so strong as to induce nonlinear features such as entrainment, harmonics, or subharmonics, which are left for future work, (ii) to study the role of gain modulations in time-dependent features of ERP and their relationship to attention, (iii) to determine the part of ERP response that is due to gain adjustments and whether these can be interpreted as implementing attention, (iv) to determine the corticothalamic filters that govern oscillatory correlates of attention in ERPs and their relationship with attention, and (v) to highlight general aspects of the results that are likely to be valid beyond the specific model studied here. We focus on three central cases: the ERP that would be evoked starting from the static gains that produce background EEG activity in the model; the ERP that is produced by choosing a separate set of static parameters to get a good match with observed standard ERP waveforms; and the ERP produced by starting from background EEG parameters, but allowing them to evolve dynamically as part of the response.
Section 2 briefly reviews the fundamental of the physiology based, dynamic-gain NFT model of the corticothalamic system. In section 3, we employ the model to produce ERPs and relevant comparisons with the current literature are presented. In section 4, we conclude and discuss future directions.

MATERIALS AND METHODS
Here we summarize the relevant aspects of the use of physiologically based neural field theory in modeling large scale brain activity and outline the essential components of corticothalamic system. Full details can be found in Babaie-Janvier and Robinson (2018 and Robinson et al. (2002Robinson et al. ( , 2004.

NFT of Corticothalamic System
Our model employs physiologically based neural field theory that permits tractable prediction and analysis from the microscale to the whole brain. Numerous experimental outcomes in normal and abnormal states, ranging from spontaneous activity to stimulus responses, evolution of sleep-wake cycles, neural plasticity, and epileptic seizures have been successfully reproduced using this model, as noted in section 1.
Our model, shown in Figure 1A, incorporates the cortex and thalamus and their connectivities; each includes distinct population of neurons: cortical excitatory (e) and inhibitory (i) neurons, the thalamic reticular nucleus (TRN) (r), thalamic relay neurons (s), and noncorticothalamic neurons that provide external inputs (n). In this study the relevant relay nucleus is the lateral geniculate nucleus (LGN), whose projections are to primary visual cortex (V1). The model incorporates the visual projection system with reciprocal corticothalamic feedback projections, excitatory projections to the TRN from LGN-V1 feedforward axons and from V1-LGN feedback axons, and inhibitory projections from the TRN onto LGN relay neurons.
The state of each neural population a, is represented by the local mean cell-body potential V a , the mean rate of firing at the cell body Q a , and the propagating axonal pulse rate field φ a . NFT averages over short spatial and temporal scales larger than a few tenths of a millimeter to obtain equations for the evolution of these dynamical variables (Wilson and Cowan, 1973;Freeman, 1975;Deco et al., 2008).
The mean firing rates Q a exhibit a sigmoidal response to increasing mean soma voltage V a measured relative to resting, which can be approximated by (Wilson and Cowan, 1973;Freeman, 1975;Deco et al., 2008) where θ is the mean neural firing threshold and σ ′ π/ √ 3 is the standard deviation of the difference between the steady state soma voltage of individual neurons and their thresholds.
The net effect V a (r, t) on the activity of neurons of population a by all afferent neural synaptic receptors of type b is given by and where the differential operator D α governs the temporal response of V ab to afferent pulse rate fields φ b encapsulating the rates β and α of the rise and fall, respectively, of the response at the cell body, N ab is the mean number of synapses on neurons a from neurons of type b, s ab is the mean time-integrated strength of soma response per incoming spike, and φ b (r, t − τ ab ) is the mean spike arrival rate from neurons b, delayed by τ ab due to discrete anatomical separations between different populations. The overall connection strength between two neural populations of types a and b is ν ab = N ab s ab . In our model ν ie = ν ee , ν ii = ν ei , and ν is = ν es because the number of cortical synapses is closely proportional to the numbers of source and target neurons (Wright and Liley, 1996;Robinson et al., 1997;Braitenberg and Schüz, 1998), assuming the strength of synapses is determined by the source neurons. Forward time delays are τ es = τ is ≈ 20 ms corresponding to thalamocortical propagation and backward delays are τ se = τ re ≈ 60 ms, which correspond to corticothalamic propagation, while the remainder of the τ ab are zero. In our model, neural pulses within each population are averaged over short scales to form a field φ a (r, t) whose source is Q a (r, t), that propagates at a velocity v a , and which approximately obeys the spatiotemporal damped wave equation D a (r, t) (Jirsa and Haken, 1996;Robinson et al., 1997), Here the damping rate γ a satisfies γ a = v a /r a , where r a and v a are the characteristic range and conduction velocity of axons of type a. In the corticothalamic system, only the axons of excitatory cortical neurons are long enough to cause propagation effects, which are included via Equation (5). In the other populations, we assume the axonal length to be small enough that it can be neglected (i.e., r a ≈ 0, so D a ≈ 1), which results in φ a (r, t) = Q a (r, t) for these populations. Table 1 lists nominal values of model parameters  for resting EEG. These values were estimated for normal adults and they have been extensively used and verified in comparisons with experiments, as mentioned in section 1.
Steady-state gain to e from e 6.8 The first two columns give the symbol and description of each quantity. The third column shows resting-EEG values adapted from Table 1 of Robinson et al. (2004); these are also used as the initial values for ERPs when gains evolve dynamically. The fourth column lists static-gain ERP values adapted from Table 1 of Kerr et al. (2008) which were previously used to match ERPs without gain modulation. The final column gives the units.

Corticothalamic Transfer Functions
The above NFT equations are nonlinear in general. By setting all derivatives in these equations to zero, we find spatially uniform steady states of the system, which are interpreted as characterizing the baseline of normal activity, with firing rates that are in accord with experiment . Linear perturbations from these steady states have been shown to correspond to time dependent brain activity, leading to successful comparisons with numerous experimental phenomena, including evoked responses (Robinson et al., 1997(Robinson et al., , 2005Rennie et al., 2002;O'Connor and Robinson, 2004;Kerr et al., 2008;van Albada et al., 2010;Roberts and Robinson, 2012;Abeysuriya et al., 2015).

Perturbation Expansion
We expand the equations in section 2.1 to first order in perturbations relative to the steady state, denoting steady-state and perturbed quantities by the superscripts 0 and 1, respectively. We then find To zeroth order, Equations (6)-(8) yield Equations (10) and (12) can then be used to eliminate the other variables in favor of the V (0) a , which yields the nonlinear steadystate equation (Robinson et al., 1998) The first order terms in Equations (6)- (8) give Operation with D α on both sides of Equation (16), plus use of Equation (14), yields The gain G ab (r, t) is the differential response in φ a per unit change in incoming φ b . The net gains of populations of neurons connected serially are denoted by G abc = G ab G bc and G abcd = G ab G bc G cd . These gains are parameterized by time, as shown in Equation (20) to represent their dynamics, which is the topic of the next section.

Modulation of Synaptic Gains
Numerous biophysical processes modulate neuronal coupling strengths, dependent on current or recent activity, including plasticity, long-term potentiation/depression, facilitation, habituation, and sensitization. We employ a general form of modulatory process that can be applied to a broad range of specific mechanisms (Koch, 1999;Rennie et al., 1999;Robinson et al., 2002), which is a form of feedback, whereby presynaptic neuronal activity modulates neuronal gains (postsynaptic involvement is omitted here and postponed to future work), with where F(t) describes the temporal dynamics of the gain modulation and g ab is its strength and ⊗ denotes convolution operation. Equation (21) assumes that the perturbations are small enough that a linear equation is a reasonable approximation. Furthermore, the modulation is assumed to be local in space, so the g ab are constant and the functional form of F(t) does not vary with position or time. For the temporal function of the modulation we use ) when t ≥ 0 and zero otherwise to enforce causality. The rate constant η > 0 characterizes the timescale of the feedback process.

Transfer Functions
The transfer function is the ratio of the output of a system to its input in the linear regime. Either the Laplace or Fourier transform can be used to determine transfer functions; we use the former in time and the latter in space, with the definitions respectively, where s = −iω = Ŵ − i is the complex frequency that parameterizes the response e st . Replacement of G (1) ab in Equation (18) by Equation (21) yields Frontiers in Human Neuroscience | www.frontiersin.org Application of (23) and (24) to Equation (26) gives where L(s) is the reciprocal of the Laplace transform of the operator D α (t).
Equation (27) expresses first order responses of two types: the first term in the square brackets represents the part of response that would occur without change to the steady-state gains, whereas the second term is the response due to stimulus-induced gain changes of the steady-state activity. In the Laplace domain, the transfer function to excitatory cortical neurons from retina, is (see Babaie-Janvier and Robinson, 2018 for detailed derivation) Note that Equation (29) corrects a typographical error in the corresponding equations in Babaie-Janvier and Robinson (2018); however, the paper used the correct equation and their results remain unchanged. The transfer function fully describes the linear system properties including the linear response to any external signal. Poles of the transfer function yield the characteristic equation of the system, whose roots determine the poles and thus the basic modes into which the system response can be decomposed. Roots of the numerator of the transfer function are the zeros of the system; these frequencies do not pass through the system.
In this study we only explore spatially uniform perturbations (i.e., k = 0) and postpone study of spatial dependences to future work. Such spatially unstructured stimuli have been widely used in visual flicker experiments to probe steady state visual evoked potentials (SSVEPs) (Spekreijse et al., 1973;Herrmann, 2001;Roberts and Robinson, 2012;VanRullen and Macdonald, 2012). It was also shown recently that the spatially uniform contribution dominates the later phases of ERPs (Mukta et al., 2019).

Reduced Description in Terms of Loop Gains
Previous work has shown that many aspects of corticothalamic dynamics can be approximately described in terms of normalized gains for the loops shown in Figure 2, and this simplified description is used below to assist interpretation. These gains are for (i) net cortical feedback directly on itself, denoted X; (ii) net feedback of the cortex on itself via the thalamus, denoted Y, including loops via just the relay nuclei and via both the reticular and relay nuclei, as shown in Figure 2; and (iii) feedback in the loop comprising the relay and reticular nuclei, denoted Z Abeysuriya et al., 2015;Robinson, 2017). These quantities are defined The requirement of brain stability confines steady state values of X, Y, and Z to a stability zone around the origin, beyond which seizures set in or the system moves to a different steady state Breakspear et al., 2006). However, instantaneous values outside this regime can be used to parameterize dynamics relative to steady states even when no instability exists. In approximate terms, large X implies that the cortex is mostly driven by its own activity and is thus introspective (Robinson, 2017). Large positive Y indicates strong feedback between cortex and thalamus and significant input from the external world (Robinson, 2017), whereas large negative Y is found in sleep and indicates high reticular activity with attendant suppression of relay nuclei and external inputs. The parameter Z is the strength of the intrathalamic loop formed by reciprocal connections between reticular and relay nuclei, which is responsible for sleep spindle generation but plays little role in the waking state . An important observation is that the dominant frequencies generated by the corticothalamic system tend to be near 0 Hz if X + Y ≈ 1, which is the brain's normal near-critical state Abeysuriya et al., 2015;Robinson, 2017). If, in addition, Y is large and positive and Z is not too near zero, an approximately 10 Hz alpha peak is generated along with its harmonic beta peak, both due to positive corticothalamic feedback. Values of Y near zero are usually associated with featureless spectra, while negative Y can lead to theta peaks via negative corticothalamic feedback. Large Z ≈ 1 is associated with spindle resonance in the intrathalamic loop. More detail and analysis of all these points can be found in the original references Abeysuriya et al., 2015).

Corticothalamic Data Filters
The transfer functions can be decomposed into basic modes whose behaviors are shown to be associated with data filters whose control system properties are well understood (Babaie-Janvier and Robinson, 2018). To do this we first note that each corticothalamic transfer function T ab (s) in Equation (28) is a ratio of exponential polynomials of s. If we approximate it by a rational function of s and decompose it into partial fractions, we find  where the p j = Ŵ j ± i j are all distinct poles of the system (we do not consider the special case of degenerate roots here because this corresponds to a set of measure zero in parameter space), and the residues r j = r ± i r are and n is the number of the poles, and also indicates the degree of the characteristic dispersion equation of the system. Some of these poles are associated with heavily damped modes and can be neglected; this has been shown to result in a 6-pole approximation (n = 6) that is accurate to within a rootmean-square (rms) fractional error of 0.02 for 0 to 150 Hz for the parameters in Table 1 (Babaie-Janvier and Robinson, 2018). These partial fractions then are summed in pairs that dominate in low (f 5 Hz), alpha (5 Hz f 15 Hz), and beta (15 Hz f ) frequency regimes, respectively. We thus write where b = s, r, e and T ℓ bn is the sum of the two poles in slow range, while T A bn and T B bn are the sums over the pairs of poles that represent oscillatory responses in the alpha and beta frequency ranges, respectively. The partial transfer function of the sum of two fractions associated with poles p j and p j+1 either both real or a conjugate pair, which we denote by T with τ p = r j + r j+1 / r j p j+1 + r j+1 p j and K = r j + r j+1 . Each filter emphasizes the part of the signal from external world that lies within its frequency range; summing these parallel responses results in the total response.

RESULTS
In this section, we employ the model described in section 2 to first examine the ERPs obtained using fixed nominal background-EEG parameters and the separate, also fixed, parameters used by Kerr et al. (2008) to fit experimental standard ERPs, both with static-gain transfer functions. We then turn on the gain modulation in the model, starting from background-EEG parameters as the initial prestimulus values and study the effects of gain dynamics on ERPs. To avoid confusion, we refer to the three cases and their parameters as background (which has static gains), static-gain ERP (Kerr et al.'s case), and modulated-gain ERP (the present generalization) below.

Evoked Potentials for Static-Gain Transfer Functions
To evaluate the response φ (1) e of the cortical neurons to the stimulus φ (1) n using our model we must inverse Laplace transform the product of the transfer function and the stimulus signal; if the stimulus is a delta function this response corresponds to an ERP (Rennie et al., 1999;Kerr et al., 2008). Here, we fix all gains by setting the local synaptic strengths g ab = 0 for a, b = s, r, e, i. We then calculate the ERP using nominal background values of model parameters and also reproduce the key result from Kerr et al. (2008) using their parameters; both sets of parameters are listed in Table 1. We denote the nominal background case by a circle superscript (T • en and φ • e ), and the results from Kerr et al. (2008) by a star superscript (T * en and φ * e ). Figure 3A shows these transfer functions and Figure 3B shows the corresponding ERP waveforms, which confirms that the differences in parameters significantly change the transfer function and the ERP. Figure 3A shows that the two transfer functions feature different lower frequency peaks while they have similar highfrequency peaks. One observation is that alpha peak is present in both responses with lower magnitude although slightly different frequencies; the same observation applies for the beta peaks but these are weak. However, the key discrepancy between the two is present in the transfer functions' low-frequency regime where the ERP frequency response shows oscillations at ∼ 4 Hz, but the resting-state transfer function does not. Figure 3B shows that the two ERPs also exhibit significant differences in terms of their prominent peaks and troughs (i.e., phenomenological "components"). The early N100 feature is present in both responses, whereas the later P200 feature is absent for the nominal resting values.
The key observation here is that when an ERP takes place, the characteristics of the system are shifted. One way to achieve such shifts during an ERP is through dynamic adjustment of the connectivities of the system so that the transfer function is altered from T • en to T * en . In the other words, there can be underlying biophysiological mechanisms by which, during an ERP, gains are dynamically modulated so that the ERP waveform is modulated from φ • e to φ * e . In our model, this can be achieved through local feedback modulation of gains as proposed in Equation (21). The key implication of using such a scheme for explaining the parameter adjustments during an ERP event is that these adjustments can be interpreted as implementing a form of attention (Babaie-Janvier and Robinson, 2018, which we discuss in detail in subsequent sections. The questions that arise of which changes impact the response, in which ways, and how strongly, are addressed in the next section.

Parameter Sensitivities
We observe that there is a discrepancy between the response generated by a nominal set of resting EEG parameters and the set used by Kerr et al. (2008) to fit to experimental ERPs. Our core aim here is to determine whether a comparably good  Table 1. In each case one parameter is then changed to its value from the fixed-gain ERP set (blue), as also listed in Table 1 fit can be obtained by instead starting from the resting-state gains but allowing them to be dynamically modulated as part of the response. To investigate the root cause of the differences between the above two static-gain responses, and in order to guide our study of dynamic modulation of the gains, we first run a set of sensitivity analyses which help us determine the role of each parameter in the appearance and magnitude of the features of the response and transfer function. We use the set of parameters fitted for resting state EEG, and in each case, one parameter is varied while the rest are kept fixed. We first calculate transfer functions for the resting state using the parameters in Table 1. The parameter chosen for analysis is then changed to its value corresponding to Kerr's ERP parameter set and the new transfer function is calculated and plotted in blue. The parameter under investigation is then changed in the opposite direction to the one that yielded the values used by Kerr et al. (2008) and these are plotted in green.
Figures 4A-F, 5A-H show ERPs obtained for the sensitivity analyses designed above. These results, in general, show that any change in each gain results in significant alteration of the shape of transfer functions and their corresponding ERPs. We observed in Figure 3A that the key difference between the two transfer functions is the presence of a theta peak (≈ 4 − 6 Hz) in the transfer function for ERP parameters. Figures 4A,C,E confirm that changes in cortical gains G ee , G ei , or G es , alone cannot induce such modifications in the transfer functions. On the other hand, Figures 5A,C,G show that such variations can be caused by modifications of the strength of synapses in the top-down pathways; i.e., G sr , G se , and G re . A decrease in both gains from cortex to TRN (G re in Figure 5A) and gain from cortex to LGN (G se in Figure 5C) will cause a theta peak to appear. A theta peak is also generated by a decrease in the magnitude of the inhibitory gain from TRN to LGN (G sr in Figure 5G), also a top-down pathway. These observations suggest that changes in the topdown pathways play an important role during ERPs, in accord with the previously proposed hypothesis that upon occurrence of a sudden change (onset of stimulus) the brain attends to such information at the expense of less relevant top-down information (Friston, 2010; Babaie-Janvier and Robinson, 2019) which means during attention the role of internal model (top-down signals) is diminished while the data from outside brain is emphasized (Garrido et al., 2007;Friston, 2010Friston, , 2011Clark, 2013).
The above observations allow us analyze the impact of the above changes on the normalized loop gains X, Y, and Z, and draw out the relationship between the oscillations and the stability parameters. X, which is constrained to positive values, is governed by G ee and G ei . As Figures 4A-D show, alpha oscillations (and beta ones with lesser effect) are mildly modulated by decrease in G ee and increase in G ei which results in a decrease in X. A decrease in X indicates a significant decrease in the ratio of excitation to inhibition in the cortex. Theta resonance, in the other side, is not significantly modulated by cortical gains as seen in Figures 4A-F, so X has a negligible role in its appearance or modulation. In contrast, the parameter Y encompasses corticothalamic gains, including G es , which most strongly modulates the alpha resonance, as seen in Figures 4E,F. It has also been previously established that theta resonance is enhanced as Y decreases through zero to negative values , which is in accord with Figures 5A-D,G,H, and with a reduction in top-down gains.
The ERPs corresponding to these transfer functions reveal connections with the transfer functions' key characteristics. We observed in Figure 3B that the most obvious difference between the two evoked responses is the appearance of the late P200 feature in the response for the fixed-gain ERP parameter set, which is not present for the fixed-gain EEG set. Figures 4B,D,F confirm that cortical gains G ee , G ei , and G es , do not play significant roles in the generation of this feature. In fact, Figures 5B,D,H show that the appearance of the P200 feature is the consequence of decreasing the topdown gains, thereby paralleling the appearance of the theta peak in the transfer functions because an impulse response with the period of ≈ 250 ms is expected from a transfer function that shows a ≈ 4 Hz peak. Similarly, the early feature N100 is the direct consequence of the alpha peak ≈ 10 Hz in the transfer function resonances. Therefore, the prominent features of the ERP are related to key characteristics of the transfer functions, which are related to equivalent data filters (Babaie-Janvier and Robinson, 2018, as discussed in the next section.

Evoked Potentials With Dynamically Modulated Gains
In this section we aim to produce ERPs with features close to those generated by the fixed-gain ERP parameter set T * en in Kerr et al. (2008) using the corticothalamic model with its gains, but starting at the fixed-gain EEG set with the gains being dynamically modulated as part of the response; i.e., g ab = 0. Henceforward we denote the transfer function with modulated gains and its corresponding time responses with superscript delta (T en and φ e ). We keep the temporal parameters α, γ e , τ es , and τ se , fixed and we find the g ab that is required to achieve T * en so that the root mean square value of T * en − T • en is minimized, using the parameter sensitivity results of section 3.2 as a guide for calculating local feedback strength g ab .
We first define a relative coefficient of modulation, denoted by , which is the magnitude of the fractional change in G (ERP) to investigate a variety of changes and establish a characteristic scale of such gain changes. Using the values of G (ERP) ab and G (0) ab in Table 1 we then compute ab in Equation (39) and determine the values of g ab by requiring  Table 1. In each case one parameter is then changed to its value from the fixed-gain ERP set (blue), as also listed in Table 1 which yields the values of g ab needed to produce results close to the fits to experimental ERPs by Kerr et al. (2011). We then examine the gain changes between experimental ERP fit and baseline to see which give rise to the key features of the ERP. This guides us in initializing ab and the relative magnitudes of the g ab are then estimated by minimizing the rms deviation between theoretical and experimental ERPs over the time interval to post-stimulus, subject to the constraints that none of the G ab can change sign, and neither can X and Z, because the excitatory or inhibitory nature of neural populations cannot change. This yields the g ab shown in Table 2. Figures 6A,B compare the three transfer functions; i.e., experimental fit ERPs, baseline and modulated gain, and their generated ERPs. These results show that the modulated-gain transfer function and corresponding ERP represents the main features of the dynamics; i.e., early component N100 and late one P200, and it only exhibits slightly shifted theta, alpha, and beta peaks, while there is no P200 in the baseline. The ERP with modulated gain is accurate to an rms fractional error of 0.08. One general observation is that the gains are variously modulated during an ERP response to the stimulus; i.e., some increased substantially while others decreased, especially near the N100 peak. The effects of the estimated local feedback strengths g ab on the overall dynamics of gain parameters were also calculated using Equation (15) and shown in Table 2. The results show that all inhibitory gains are significantly increased, with thalamic inhibitory gain G sr doubled and cortical inhibitory gains increased by up to 60%. The other finding is that the intracortical excitatory gains G ee and G ie are reduced by one third during an ERP. Regarding corticothalamic gains, while the gain from cortex to LGN G se shows a weakening, the gain to TRN G re is strengthened up to 40% in magnitude, which in turn induces an indirect increase in the inhibitory activity of the thalamus G sre . Overall, all gains of the top-down feedback pathways that end in excitatory populations are weakened during ERP while the synapses to the inhibitory population have been strengthened. Figure 7 shows the evolution of the activities φ a , gains G ab , compound gains G ese , G esre , and loop feedback parameters X, Y, and Z during an ERP. In Figures 7A,B we see that φ e and φ i have closely synchronized evolution, with a sharp peak around 100 ms, followed by decaying theta-band oscillations. Figure 7C shows that φ s has similar evolution,but with an even sharper peak. We see the reason for this peak being truncated in Figure 7D, where the sudden initial rise in φ r causes suppression of φ s via the gain G sr . The drop in φ s then reduces excitation of φ r around 100 ms, followed by a second peak then decay. Figures 7E-K show the evolution of the gains. The intracortical gains G ee and G ei evolve in phase, with G ee decreasing sharply around 100 ms, while G ei (a negative gain) increases in magnitude; both display subsequent nearly synchronized decaying theta oscillations. The corticothalamic gains G re and G se display antiphase dynamics, with coupling to the reticular nucleus increasing, and that to the relay nuclei decreasing, around 100 ms. Intrathalamic delays G sr and G rs have evolution that closely mirrors the evolution of their drivers φ r and φ s : the gain G rs for the effect of s on r rises sharply early in the ERP, but only by a small amount, whereas G sr increases by a large factor due to the large relative increase in φ r . Finally, the thalamocortical gain G es has an FIGURE 6 | Transfer functions and corresponding ERPs for parameters fitted by Kerr et al. (2011), as listed in Table 1  evolution that mirrors that of G rs due to their common drive, but which is inverted because of the relative signs of g rs and g es .
The effects of the above dynamics are summarized in Figures 7L-N. We see that the intracortical feedback parameter X initially decreases sharply, owing to the simultaneous decrease of G ee and increase of |G ei |. Subsequently, it undergoes damped oscillations. The corticothalamic loop parameter Y changes sign from slightly positive to strongly negative, which suppresses alpha activity and enhances theta, before also oscillating. The intrathalamic parameter Z increases by a significant factor, but remains too small for spindle-frequency oscillations to become prominent. Further light is cast on the dynamics of Y by considering the two opposing contributions G ese and G esre in Equation (32), shown in Figures 7O,P. The excitatory corticothalamic gain G ese regulates alpha activity and inhibitory corticothalamic gain G esre enhances theta activity, and therefore, decreased G ese along with increased G esre cause Y to decrease (see section 2.3), which results in the appearance of a theta resonance in parallel with alpha suppression.

ERP Corticothalamic Filters
Temporal aspects of the ERPs, such as the appearance of early and late features N100 and P200 and their magnitudes, were studied in the previous sections. Our approach enables us study these oscillatory properties of the ERPs using the control-systems approach of filter identification from the corresponding transfer functions. Six-pole approximations for T en , T • en , and T * en are made using the relevant equations in section 2.4. Figure 8A shows the resulting transfer function for fixed-gain resting EEG parameters. We see that T • en can be decomposed into three filter responses that emphasize low, alpha, and beta frequency ranges, respectively. The low-frequency filter, denoted by ℓ, exhibits a resonance at 0 Hz; the alpha filter, denoted by A, has a resonance at about 9.5 Hz; and the beta filter, denoted by B, has a resonance at about 18 Hz. Figure 8B shows the filters obtained for the transfer function using static-gain ERP parameters from Kerr et al. (2008) T * en , in which both beta and alpha filters are present with magnitudes and peaks slightly different from T • en . However, the third filter obtained for low frequency regime shows a resonance in the theta range, unlike the result for the fixedgain resting EEG transfer function, which we denote by T . The data filters derived for the modulated-gain transfer function T en , shown in Figure 8C, are similar to the one for the fixed-gain ERP parameters, T * en , as expected. As we saw in section 3.3 the appearance of the theta resonance is associated with a decrease in Y which is the result of the decrease in top-down corticothalamic projections. Closer analysis shows that, as one moves from the fixed-gain EEG parameters to the fixed-gain ERP set, two zerofrequency poles collide and emerge with nonzero oscillation frequency in the s-plane, thereby yielding theta oscillations in the ERP. The alpha and beta filters each comprises a complex conjugate pair of poles, resulting in an oscillation in the temporal response at the corresponding frequency. The low-frequency filters obtained for both T • en and T * en exhibit a peak in the theta frequency range (3 − 7 Hz). This is a key difference between the dynamic-gain ERP response and static-gain response in which the slow filter is an underdamped filter that has its two poles on the real axis. In other words, the poles of the slow filter become complex conjugates that generate a theta response in the dynamic-gain transfer function, whereas they are purely damped poles in the static-gain case. This is consistent with standard ERP observed in experiments, both in auditory and visual modalities.
Our model also allows determination of the partial temporal responses corresponding to each filter where the total evoked potential is obtained by summing these responses. This is particularly valuable for studying the direct relationship between the temporal features of the ERPs and their oscillatory properties where the data filters' roles in generating them can be revealed. Figure 9G compares the three above-mentioned transfer functions in frequency domain and Figure 9H compares their corresponding evoked potentials in time domain. The key difference centers on the lack of the theta resonance, and thus the P200 feature, in the response starting from background EEG parameters. Figure 9A compares the low frequency regime filters obtained for the three transfer functions and Figure 9B compares their contributions in the ERP response, which shows that the late  feature P200 is present in the temporal response of the ERP filter while it is not present in the response generated by the slow filter of the resting-EEG transfer function. This confirms the role of theta filter in generating P200. Figures 9C,E show the alpha and beta filters obtained for the transfer functions, and Figures 9D,F show their contribution in the evoked potentials, which show all three transfer functions have very similar alpha and beta filters. The N100 feature is present in all three partial responses which shows that early feature is governed by these filters.

Evoked Potentials and Attentional Modulation
Evoked potentials are widely used to study attention, particularly those aspects not observable with behavioral methods (for a review see Woodman, 2010). It has been shown that attention modulates the key features in the response (Hillyard and Anllo-Vento, 1998;Herrmann, 2001;Herrmann and Knight, 2001); however, the exact mechanisms underlying such changes are unknown. Here we have reproduced evoked potentials by using modulated gain transfer function that starts by EEG baseline parameters and dynamically adjust the gains during the process so that its response contains key features very similar to those of experimental ERPs. This has enabled us to investigate the effects of attentional modulation on activities in the corticothalamic system. We have showed that both early and late features of evoked potentials are modulated by local feedbacks that dynamically adjust the gains to respond to stimulus. We know from experiments that such modulations are related to attention (Luck et al., 1997(Luck et al., , 2000Herrmann and Knight, 2001). Babaie-Janvier and  showed that parameters of gains can dynamically adjust to enable estimation of incoming signals via a form of attention, in which dynamic gain changes increase the weight attached to stimulus rate of change when sudden changes occur, and to stimulus value under static conditions.
Our model allows us to estimate the parts of the ERP that are explicitly induced by gain changes and interpret them in terms of attention. Figure 10A shows the baseline ERP in green, while the contribution made by gain modulation is shown by the dashed black line; the sum of these two contributions gives the total ERP, shown in red. We also calculated the magnitude of the transfer function responsible for the contribution which is shown in Figure 10B. The dominant contribution has a frequency of about 12.5 Hz. This contribution is sizeable from about 50 − 250 ms with maximal amplitude around 150 ms.
The levels of oscillatory activity in human cortex are also observed to be altered by attention (Hillyard and Anllo-Vento, 1998;Herrmann, 2001;Yamagishi et al., 2003;Sauseng et al., 2005;Thut et al., 2006;Klimesch et al., 2007;Wang, 2010). Our model relates the mechanism by which these oscillations are produced to the attentional impact they have on evoked potentials through gain dynamics. This is particularly useful because it allows us further investigate the role of various gains in attention as well as to locate the connections and structures from which these impacts originate. Based on the results shown above, the early features are mainly governed by alpha and beta filters, which is in accord the experimental findings (Hillyard and Anllo-Vento, 1998;. One significant finding is that we observe a suppression of alpha activity and a slight increase in beta activity, both in accord with the literature on alpha suppression during attentional tasks, dating back to the pioneering work of Berger (Berger, 1929a,b;Marrufo et al., 2001;Ward, 2003;Sauseng et al., 2005). In the corticotahalamic model, the excitatory loop gain G ese principally governs the alpha activity, which comprises two gains G es and G se , both are shown to decrease significantly in the early phases of the response, as shown in Figures 7F,K. This explains why the transfer function of baseline EEG shows a dominant alpha peak and ERP responses exhibit suppressed alpha activity (see Figures 9C-F). The low-frequency filter has little impact on this part of the response, whereas its theta frequencies are shown to dominate the later phases of the response, where attentional modulation has found to be most significant (Hillyard and Anllo-Vento, 1998;Herrmann, 2001).

SUMMARY AND DISCUSSION
We have modeled event related potentials by using neural field theory (NFT) of the corticothalamic system to incorporate attentional gain modulation via local synaptic feedbacks. Our model provides a unified explanation of the resting EEG and standard ERPs. Furthermore, the model uses a dynamic gain modulation scheme to explain the ERP and interpret part of it as being due to attention. The main findings are: (i) We have calculated standard ERPs using an extended NFT model of large-scale activity in the corticothalamic system, which embodies local feedbacks that modulate the gains of neural activity as part of the response to incoming stimuli. First, we treated all the parameters as static and predicted the ERP using both a prior set of EEG restingstate parameters and a set of static gain parameters fitted to standard ERP experiments by Kerr et al. (2008). It was shown that there is a significant contrast between the dynamics of the ERP responses as well as between their underlying transfer functions. While the ERP response produced using experimentally-fitted parameters by Kerr et al. (2008) shows a typical response in both early and later phases, the ERP generated by using background-EEG parameters is dominated by a sudden rise followed by a slow decay, quite different from experiment. (ii) Transfer functions for both sets of static-gain parameters were calculated and their corresponding data filters were obtained, which are associated with the basic modes responsible for low-frequency, alpha, and beta responses. It was shown that alpha and beta resonances were present in both resting EEG and ERP responses; in contrast, the ERP low-frequency regime (< 5 Hz) contains a theta resonance, whereas this filter has only a zero-frequency resonance for background-EEG parameters. (iii) A sensitivity analysis showed that top-down connections and cortical excitatory connections must be considerably weakened during an ERP event to produce a theta resonance. This result agrees with a previous hypothesis that the importance of the internal model (top-down signals) is reduced in parallel with enhanced emphasis on external information, with the result that the brain attends to new stimuli and suppresses prior mean signal levels as they become less salient (Friston, 2010;Babaie-Janvier and Robinson, 2019). Changes in loop-gain parameters, X, Y, and Z caused by gain changes also support the trade off between introspection and external attention. The decrease in top-down signals corresponds to a reduction in the corticothalamic loop gain parameter Y as this loop's positive feedback decreases. (iv) Inclusion of dynamic gain modulation, informed by the analysis in (iii), enabled experimental ERPs to be fitted, starting from background EEG parameters. (v) We studied both the static-gain and modulated-gain transfer functions via control theory in terms of system resonances that were recently shown by Babaie-Janvier and  to implement data filtering whose gain adjustments can be interpreted as attention. The onset of a sudden change dynamically enhances the theta filter and de-emphasizes the alpha and beta filters, which can be interpreted as attentional suppression of alpha and beta oscillations. This is in accord with the literature on alpha suppression during attentional tasks dating back to the pioneering work of Berger (Berger, 1929a,b;Marrufo et al., 2001;Ward, 2003;Sauseng et al., 2005;Klimesch et al., 2007). The results show that resonant filters deriving the low-frequency oscillations in an evoked potential response have different instantaneous parameters than those responsible for low-frequency resting EEG responses (which results in strong theta oscillations in the ERP response whereas resting EEG lacks them), while both responses share similar alpha and beta resonant filters. In this framework, the very low frequency response emphasizes mean values, while alpha and beta responses seen at around 80 − 200 and 180 − 280 ms, respectively, reflect fast changes, as does the theta response at around 150-400 ms; and overall timescale gates rate at which new stimuli can be processed. Such attentional adjustments are in accord with literature (Hillyard and Anllo-Vento, 1998;Herrmann, 2001;Herrmann and Knight, 2001) and we showed that both early and late features of ERPs involve such gain modulations, which dynamically increase the weight attached to stimulus rate of change when sudden changes occur, and to stimulus value under static conditions (Babaie-Janvier and . Overall, our model enables both activity changes and gain (i.e., effective connectivity) changes to be calculated as parts of a generalized evoked response, which allowed us estimate the part of ERP response that is explicitly induced by gain modulations and interpret it in terms of attention in response to sudden changes. Notably, instead of postulating a starting state for ERPs with parameters different from those of background EEG, as done by Kerr et al. (2008), we have showed that the same starting point can yield a similarly good match with data when dynamically modulated gains are included. These outcomes also enable further investigation of the roles of various biophysical process that may be involved in such gain adjustment in the brain during attention.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author/s.

AUTHOR CONTRIBUTIONS
TB-J and PR conceived the research, developed the theory, verified the analytical methods, and discussed all the results. TB-J performed the computations, worked out the technical details, performed numerical calculations, produced figures and numerical results, and drafted the first draft of the manuscript. All authors contributed to the final manuscript.