Jonathan Touboul
email: jonathan.touboul@sophia.inria.fr

Fabrice Wendling

Patrick Chauvel

Olivier Faugeras

Neural Mass Activity, Bifurcations and Epilepsy

Keywords: Neural mass activity, bifurcations, and epilepsy Epilepsy, Nonlinear Dynamical Systems, Bifurcations, Fast Onset Activity, Stochastic effects, Interictal spikes and bursts, Jansen and Rit Model, Neural Mass Models, Wendling and Chauvel Model, EEG, Anticonvulsant Pharmacological Treatments

come

Introduction

Epilepsy is a common chronic neurological disorder characterized by the recurrence of seizures that strongly alter the patient's quality of life. Epileptic seizures are transient manifestations of abnormal brain activity characterised by excessive and highly synchronous firing in networks of neurons distributing over focal or extended brain regions. During seizures, a variety of motor, sensory, cognitive or behavioral signs and symptoms are observed. Understanding from a theoretical point of view the origin and the nature of this condition and predicting seizures are therefore great endeavors that have attracted a lot of attention from different scientific domains. This journey starts with a thorough understanding of the collective behavior of neurons in epileptic networks. Bundles of experimental observations on epileptogenic networks still need a systematic integration to the variety of computational and analytical models.

Although the exact mechanisms leading to the various forms of epilepsy are still largely unknown, it is commonly admitted that the nature of the interactions between neurons and the properties of neurons themselves are altered in epileptogenic networks. These alterations are not completely described and understood, but still, most studies suggest that epilepsy can often be linked with hyperexcitability and hypersynchronization (see e.g. [START_REF] Noebels | Targeting epilepsy genes[END_REF]; [START_REF] Babb | Glutamate decarboxylase-immunoreactive neurons are preserved in human epileptic hippocampus[END_REF]; [START_REF] Munoz | Cationchloride cotransporters and gaba-ergic innervation in the human epileptic hippocampus[END_REF]) of the involved networks. The investigation of such alterations is essential for the understanding of this condition, and has important implications in possible treatments.

In this context, the objective of this paper is to propose an integrative theoretical framework that allows for testing some hypotheses regarding mechanisms that occur in epileptogenic networks. Our framework makes use of physiologicallyrelevant computational models of neuronal assemblies of the cerebral cortex (referred to as neural mass models), and is aimed at establishing relationships between model parameters and typical electrophysiological patterns observed in local field potentials (LFPs) or in the EEG recorded under normal or epileptic conditions. We are therefore interested in using versatile computational models able to reproduce experimental findings and to generate or test experimental hypotheses, yet simple enough to allow analytical or qualitative treatment.

Two main complementary computational approaches have been developed over the past few decades: the microscopic (or detailed ) approach that describes the assembly of neurons at the cell level, and the macroscopic (or lumped-parameter ) approach aimed at capturing with a minimum number of equations the effective behavior emerging from the network activity.

Detailed models are more complex than lumped models based on a precise definition and thorough tuning of (i) the membrane properties (passive and active ion channels) in each compartment (dendrites, soma, axon) of the considered neuronal units, and (ii) the interconnections between pre-synaptic to (generally several thousands) post-synaptic neurons using appropriate synapse models. This approach, extensively developed by Traub and collaborators since the early 1980s [START_REF] Traub | Neocortical pyramidal cells: a model with dendritic calcium conductance reproduces repetitive firing and epileptic behavior[END_REF][START_REF] Traub | Simulation of intrinsic bursting in CA3 hippocampal neurons[END_REF][START_REF] Traub | Hippocampal pyramidal cells: significance of dendritic ionic conductances for neuronal function and epileptogenesis[END_REF][START_REF] Traub | A Possible Role for Gap Junctions in Generation of Very Fast EEG Oscillations Preceding the Onset of, and Perhaps Initiating[END_REF], has been successful in closely mimicking epileptic seizures, but are completely out of reach of any mathematical understanding because of their high complexity and dimensionality. This is the main reason why we are interested in macroscopic models. These models aim at reproducing the global activity of the network that can be recorded by extracellular electrodes (LFP or EEG recording), while avoiding the confusion resulting from the overwhelming amount of data and the huge dimensionality of the detailed models. Such models can be derived through the use of mean-field limits [START_REF] Ermentrout | Neural networks as spatio-temporal pattern-forming systems[END_REF][START_REF] Faugeras | A constructive mean field analysis of multi population neural networks with random synaptic weights and stochastic inputs[END_REF], and are built upon the facts that neurons are organized in different homogeneous populations sharing common characteristics (at least in a statistical sense). Here, the LFP or EEG signal reflects the global activity emerging from the microscopic interactions between thousands of neurons. These coupled activities are assumed to be summarized through the interaction of macroscopic variables characterizing the mean activity of interconnected neuronal sub-populations (mainly the pyramidal cells and the interneurons). This point of view conceptually differs from the detailed approach in the sense that it emphasizes the properties of neuronal populations as a whole, instead of those of individual cells. A macroscopic variable of particular relevance in these models is the population firing rate (averaged over all neurons of the population) that replaces individual spikes in detailed models. This variable is generally assumed to satisfy a nonlinear (stochastic) ordinary differential equation.

The macroscopic approach can be traced back to the 1970s with the seminal works of Wilson andCowan (Wilson andCowan, 1972, 1973) who laid the theoretical foundations of these models, and drew upon the results of Mountcastle [START_REF] Mountcastle | Modality and topographic properties of single neurons of cat's somatosensory cortex[END_REF], and Hubel and Wiesel (Hubel andWiesel, 1965, 1963) who provided the first physiological evidence for the existence of macroscopic populations. This approach has then been progressively used to model the cat's olfactory system [START_REF] Freeman | A model of the olfactory system[END_REF][START_REF] Freeman | Simulation of chaotic eeg patterns with a dynamic model of the olfactory system[END_REF], or the alpha rhythm in the dog's EEG [START_REF] Lopes Da Silva | Model of brain rhythmic activity[END_REF][START_REF] Lopes Da Silva | Model of neuronal populations. the basic mechanism of rhythmicity[END_REF], and has now firmly demonstrated its ability to capture the dynamics of cortical areas [START_REF] Zetterberg | Performance of a model for a local neuron population[END_REF][START_REF] Suffczynski | Computational model of thalamo-cortical networks: dynamical control of alpha rhythms in relation to focal attention[END_REF][START_REF] Suffczynski | Dynamics of Epileptic Phenomena Determined From Statistics of Ictal Transitions[END_REF][START_REF] Wendling | Relevance of nonlinear lumped-parameter models in the analysis of depth-eeg epileptic signals[END_REF][START_REF] Wendling | Epileptic fast activity can be explained by a model of impaired GABAergic dendritic inhibition[END_REF].

The question of what makes a good neural mass model is far reaching, and the answer clearly depends on the phenomena one wants to account for. Even for single neuron models, the question is still largely open. However the bifurcation analysis of neuron models defined by differential equations was quite successfully related to the excitability properties of the underlying dynamical system since the pioneering paper of Rinzel and Ermentrout [START_REF] Rinzel | Analysis of neural excitability and oscillations[END_REF] in the late 1980s, and the canonical models studied by Ermentrout and Kopell [START_REF] Ermentrout | Parabolic bursting in an excitable system coupled with a slow oscillation[END_REF]. This approach was then generalized to the study of the excitability properties of the neurons (see, e.g., [START_REF] Izhikevich | Neural excitability, spiking, and bursting[END_REF]; [START_REF] Touboul | Bifurcation analysis of a general class of nonlinear integrateand-fire neurons[END_REF]; [START_REF] Touboul | Spiking dynamics of bidimensional integrateand-fire neurons[END_REF] and references herein). This relationship between bifurcations and excitability properties is very important. Indeed, the bifurcations of dynamical systems enjoy a genericity property: in the vicinity of any one of them the system can be smoothly mapped onto one among a small number of "universal" systems that are described by polynomial equations of small degree (called normal forms). This property has permitted a simple and convincing description of the different behaviors of several reduced single neuron models (see e.g. [START_REF] Izhikevich | Simple model of spiking neurons[END_REF]; [START_REF] Touboul | Dynamics and bifurcations of the adaptive exponential integrate-and-fire model[END_REF]).

Such a point of view can potentially provide a generic and systematic way to analyze neural mass models and to study the influence of parameters on the behaviors of the system they represent. This is the viewpoint adopted here. We propose a correspondence between the typical collective behaviors of a large set of neurons contained in, say a population of neurons (a cortical column, for instance), and the properties of the dynamical systems that are used to describe the mean activity of these neurons (periodic orbits, fixed points, bifurcations, . . . ). We then apply this method to one well-established biologically-inspired macroscopic model of EEG signals generation. This model, referred to as the Jansen and Rit model [START_REF] Jansen | A neurophysiologicallybased mathematical model of flash visual evoked potentials[END_REF][START_REF] Jansen | Electroencephalogram and visual evoked potential generation in a mathematical model of coupled cortical columns[END_REF], is a minimal model of a neuronal population comprising two sub-populations of cells: pyramidal neurons and inhibitory interneurons. Despite its relative simplicity, this model was shown to be able to simulate signals with realistic temporal dynamics such as those found in real EEG recordings (background activity, alpha activity, sporadic or rhythmic epileptic spikes) [START_REF] Zetterberg | Performance of a model for a local neuron population[END_REF]. We apply in appendix C our generic method to an extended version of the Jansen and Rit model, the Wendling and Chauvel model [START_REF] Wendling | Relevance of nonlinear lumped-parameter models in the analysis of depth-eeg epileptic signals[END_REF][START_REF] Wendling | Epileptic fast activity can be explained by a model of impaired GABAergic dendritic inhibition[END_REF][START_REF] Wendling | Interictal to ictal transition in human temporal lobe epilepsy: insights from a computational model of intracerebral EEG[END_REF]. This model was developed to better reproduce some architectonic features of the hippocampus. We also propose a simpler model featuring many observed properties of EEG signals. Because of its simplicity this model may allow large scale simulations and further analytical treatment. We also study some stochastic properties of these models and show that such important phenomena as inter-ictal spikes and fast onset activity can be accounted for by the interaction between the properties of the dynamical system and the presence of noise in the input firing rate. We conclude by showing through numerical experiments that a global increase of the input can lead the system through all the different phases of a typical seizure, and by simulating the effect of some pharmacological agent injected at some point in time during the seizure.

EEG Signal and Neural Mass Models

Our intent being to account for some salient events that occur in EEG signals under normal or epileptic condition using a model-based approach, we start by describing these events before giving a detailed description of the model we will particularly focus on.

Typical features of EEG signals recorded during the transition from inter-ictal to ictal activity

In this section we recall some features characteristic of EEG signals that are measured during time periods including transitions from normal to pathological activ- It is intended to better define the so-called "epileptogenic zone", prior to surgery.

Readers may refer to [START_REF] Bancaud | Methodology of stereo EEG exploration and surgical intervention in epilepsy[END_REF][START_REF] Chauvel | Stereoelectroencephalography[END_REF] for details about the SEEG technique which is carried out as part of patients' normal clinical care, whose data are presented here. In addition, it is worth to mentioning that that patients gave informed consent in the usual way and that they are informed that their data might be used for research purposes.

In the example reported in figure 2, the transition from inter-ictal background (Figure 1 ). This latter activity is usually narrow-band with a dominant frequency ranging from 10 Hz to 5 Hz. Quasi-sinusoidal at the beginning, it gradually changes into a sustained spiking activity before seizure termination that is abrupt, in most of the cases.

The Jansen and Rit model

The Jansen and Rit neural mass model was first introduced by Lopes Da Silva and colleagues in 1974, and studied further by [START_REF] Van Rotterdam | A model of the spatial-temporal characteristics of the alpha rhythm[END_REF][START_REF] Lopes Da Silva | Model of brain rhythmic activity[END_REF][START_REF] Lopes Da Silva | Model of neuronal populations. the basic mechanism of rhythmicity[END_REF][START_REF] Van Rotterdam | A model of the spatial-temporal characteristics of the alpha rhythm[END_REF]. These authors developed a biologically inspired mathematical framework to simulate spontaneous electrical activities of neuronal assemblies measured for instance by EEG, with a particular interest for alpha activity. In their model, two neuronal populations interact with both excitatory and inhibitory connections. Jansen et al. [START_REF] Jansen | A neurophysiologicallybased mathematical model of flash visual evoked potentials[END_REF][START_REF] Jansen | Electroencephalogram and visual evoked potential generation in a mathematical model of coupled cortical columns[END_REF] discovered that besides alpha activity, this model was also able to simulate evoked potentials, i.e. averaged EEG activity observed after a sensory stimulation. More recently, Wendling and colleagues used this model to synthesize activities very similar to those observed in epileptic patients [START_REF] Wendling | Relevance of nonlinear lumped-parameter models in the analysis of depth-eeg epileptic signals[END_REF], and David and Friston studied the connectivity between cortical areas within a similar framework [START_REF] David | A neural mass model for meg/eeg: coupling and neuronal dynamics[END_REF][START_REF] David | Evaluation of different measures of functional connectivity using a neural mass model[END_REF]). Nevertheless, it was understood that one of the main issues of the Jansen and Rit model was that it was not able to produce all the rhythms that occur in epileptic activity and are observed in EEG recordings, in particular the fast activity at the onset of an epileptic seizure. This led to the introduction of an The boxes labelled h e and h i correspond to linear synaptic integrations, the boxes labelled Si represent the cell body, and correspond to the sigmoidal transformation converting a population activity into an output firing rate. The constants J i account for the strength of the synaptic connections between populations, and y 0 , y 1 and y 2 are the variables in equations (1).

The firing rate of each population is the result of the integration of the input it receives through the synapses. The model makes the common assumption that the synaptic integration is linear, which amounts to considering that the membrane potential of each population is the convolution of the input with the impulse response of the synapses. This impulse response, called the average postsynaptic potential (PSP), is characterized by a rapid rise and a slower decay.

Two average PSP functions are considered in the model, corresponding to the two types of synaptic interactions (excitatory and inhibitory). They are represented by the functions h e (t) and h i (t) in Figure 2(B). Following the work of van [START_REF] Van Rotterdam | A model of the spatial-temporal characteristics of the alpha rhythm[END_REF] these transfer functions can be written as h(t) = αβte -βt ½ t≥0 where ½ t≥0 is equal to 1 for t > 0 and overwise 0.

The parameter α defines the maximal amplitude of the PSP and β is the inverse of the characteristic time of integration, which is mainly linked with the kinetics of synaptic transmission and with the averaged distributed delays in the dendritic tree. These two parameters differ depending on the type of synaptic interaction (excitatory glutamatergic or inhibitory GABAergic). Modeled PSPs were fit to experimental recordings (see in particular [START_REF] Van Rotterdam | A model of the spatial-temporal characteristics of the alpha rhythm[END_REF]), and numerical values for the excitatory (resp. inhibitory) case, of the amplitude A (resp. B) and of the time scale a (resp. b) are provided in Table 1. The function h can be conveniently seen as the Green's function, or fundamental solution, of a second order differential operator L:

L(h) = 1 αβ h ′′ (t) - 2 α h ′ (t) - β α h(t).
This particular function, solution of a second order ordinary differential equation, models both the rise and the decay phase of the PSP. The most widely used and highly simplistic PSP model h = e -t/τ ½ t≥0 is shown in section 4.4 to be unable to capture the essential dynamics of the cortical column, and in particular the phenomena we want to model in the field of epilepsy.

The activity of the population is characterized by its mean firing activity, that can be inferred from the average membrane potential through a sigmoidal effective gain transformation Si (see, e.g., [START_REF] Gerstner | Mathematical formulations of hebbian learning[END_REF][START_REF] Dayan | Theoretical Neuroscience : Computational and Mathematical Modeling of Neural Systems[END_REF]). It is chosen to be of the form proposed by Freeman [START_REF] Freeman | Mass action in the nervous system[END_REF]:

Si(v) = ν max 2 (1 + tanh r 2 (v -v 0 )) = ν max 1 + e r(v 0 -v) ,
where ν max is the maximum firing rate, v 0 is the value of the average membrane potential corresponding to the inflection point of the sigmoid (acting as a smooth activity threshold) and r is the slope of the sigmoid at v 0 , see Table 1 for typical values of these parameters.

The neuronal populations are interconnected through excitatory (feedback loop) and inhibitory (interneuron) synapses. The number of synapses established between two neuronal populations is denoted by J i for i = 1 . . . 4 as in diagram 2(B). They are considered to be constant and proportional to the maximal number of synapses J between populations. We denote by α i the related dimensionless coefficients (i.e. J i = α i J), that allow experimental fit following [START_REF] Braitenberg | Cortex: Statistics and Geometry of Neuronal Connectivity[END_REF].

Given this architecture, there are three main variables in the model, the outputs of the three post-synaptic boxes of diagram 2(B), denoted y 0 , y 1 and y 2 .

The variable y 0 corresponds to the output firing rate of the pyramidal population, the variable y 1 to the excitatory incoming firing rate to the pyramidal population (which corresponds to excitatory feedback of the pyramidal cells, filtered through the excitatory synapse) and y 2 to the inhibitory firing rate incoming to the pyramidal population. It corresponds to the output firing rate of the inhibitory interneuron population filtered through the inhibitory synapse 1 . These variables satisfy the following differential equations, where the dots indicate time derivatives:

       ÿ0 (t) = A aSi (y 1 (t) -y 2 (t)) -2 a ẏ0 (t) -a 2 y 0 (t) ÿ1 (t) = A a {p(t) + J 2 Si (J 1 y 0 (t))} -2 a ẏ1 (t) -a 2 y 1 (t) ÿ2 (t) = B b J 4 Si (J 3 y 0 (t)) -2 b ẏ2 (t) -b 2 y 2 (t).
(1) These equations depend upon 13 parameters, 8 dimensioned (A, B, a, b, v 0 , ν max , r and p) and 5 dimensionless (α i , i = 1, • • • , 4 and J). Note that the variable y 1y 2 , representing the incoming firing rate of the population of pyramidal cells, is closely related to the EEG signal. Indeed, pyramidal neurons throw their apical dendrites to the superficial layers of the cortex where the post-synaptic potentials are summed, accounting for the essential part of the EEG activity (see e.g. [START_REF] Kandel | Principles of Neural Science[END_REF]). Table 1 summarizes the interpretations of 12 of the 13 parameters in these equations and gives their typical values as evaluated experimentally. There is a subtle interplay between the values of these parameters and the behavior of the solutions of (1) that we unravel in the sequel. At this stage let us point out that this behavior effectively depends on a smaller number of parameters. For example we expect only the ratios a b and A B to be relevant to this description. Indeed by using simple changes of variables we show that the 13 parameters can be reduced (in a non unique fashion) to 9 dimensionless parameters. remaining of the paper. The equations read:

Parameter

                                 Ẏ0 = Y 3 Ẋ = Y 4 -Y 5 Ẏ2 = Y 5 Ẏ3 = j S(X) -2 Y 3 -Y 0 Ẏ4 = P + α 2 j S(α 1 Y 0 ) -2 Y 4 -(Y 2 + X) Ẏ5 = d α 4 G j S(α 3 Y 0 ) -2 d Y 5 -d 2 Y 2 (2)
The reduction to dimensionless equations involves rescaling the time as τ = a t, and introducing S the sigmoidal function S(x) = 1/(1 + k 0 exp(-x)); the dots now indicate the derivative with respect to the rescaled time τ . These equations involve the following dimensionless functions

                         Y 0 (τ ) = Jry 0 (τ /a) Y 1,2 (τ ) = ry 1,2 (τ /a) Y 3 (τ ) = Jr a y 3 (τ /a) Y 4,5 (τ ) = r a y 4,5 (τ /a) X = Y 1 -Y 2 .
They depend on the free parameters α i , i = 1, • • • , 4, k 0 , d, G, j, and P . Their expressions and, when possible, their numerical values corresponding to those in table 1 are given in table 2.

Because the variable X = Y 1 -Y 2 is a dimensionless representation of the average incoming firing rate to the population of pyramidal cells, its time variation and its dependency with respect to changes in the parameters is thoroughly investigated in the sequel as a qualitative variable representing the EEG signal.

Bifurcations and Behaviors

In this section we briefly recall some useful notions about dynamical systems and their link with EEG typical behaviors. Obviously this section does not pretend to summarize such a broad area as nonlinear dynamical systems and bifurcations theory, and the interested reader will find more detailed material in the good introductory book by Strogatz [START_REF] Strogatz | Nonlinear dynamics and chaos[END_REF], and more mathematical material in the excellent textbooks [START_REF] Kuznetsov | Elements of Applied Bifurcation Theory[END_REF][START_REF] Guckenheimer | Nonlinear Oscillations, Dynamical Systems and Bifurcations of Vector Fields[END_REF][START_REF] Golubitsky | Singularities and Groups in Bifurcation Theory[END_REF][START_REF] Golubitsky | Singularities and Groups in Bifurcation Theory[END_REF].

Nonlinear differential equations and Bifurcations

The above model, similar to most macroscopic models, consists of a set of nonlinear ordinary differential equations. Mathematical methods for solving these equations or proving analytical results about their solutions are still rudimentary and lacunar and, except in a limited number of examples, no closed-form solutions are available. However, efficient methods exist in order to characterize certain types of asymptotic solutions, such as the fixed points (constant solutions) and the cycles (periodic solutions). The existence and stability of these solutions can often be analytically or numerically studied. When such a solution, noted S * , is stable (or attractive), solutions of the differential system having initial condition in a certain neighborhood of S * (called its attraction basin) will converge towards S * .

Therefore this asymptotic stable solution S * actually represents the observed behaviors of the system after a transient phase during which the solution approaches

S * .
The existence, stability and characteristics of the fixed points and cycles are typically quite sensitive to variations of the parameters in the model. In particular, the system can undergo sudden changes in the number or in the stability of its fixed points or limit cycles when continuously varying the parameters. These brutal changes are called bifurcations. Bifurcations are well classified because they satisfy a genericity property: for values of the parameters close to those corresponding to the bifurcation the equations of the system can be smoothly mapped to polynomial equations. The corresponding, simpler, system is called the normal form, and there is a small number of normal forms. It captures entirely the qualitative behavior of the original system for parameter values in a neighbourhood around those corresponding to the bifurcation. The codimension of a bifurcation is the minimal number of parameters that are necessary for a system to display that type of bifurcation (or the number of "equality conditions" that characterize the bifurcation).

Though important changes in the number and stability of stationary solutions happen at bifurcations, these bifurcations are a reliable and robust phenomenon.

As pointed out above the qualitative behaviour of the system can be economically described in a neighbourhood of the bifurcation point by the normal form and a reduced set of parameters. Moreover there is a one to one correspondence between this behaviour and the type of bifurcation.

A Dictionary relating EEG Signal Features and Bifurcations of Neural Mass Models

As stated in the introduction, motivated by the success of the application of nonlinear dynamics to single neuron modeling, we aim at relating the neuronal behaviors typical of normal and pathological activity to the bifurcations of the solutions to systems of nonlinear differential equations such as those in the Jansen and Rit model described in section 2.2. More precisely, if one follows the trail that has been made in the case of single neurons, the first outstanding issue is to relate the behaviors observed in EEG signals with those predicted by the bifurcation analysis of the neural mass models. If this program can be successfully completed one may then consider a second issue and ask whether there is a kind of "minimal model" that can economically account for all these behaviors, in the spirit of the single neuron reduced models [START_REF] Izhikevich | Simple model of spiking neurons[END_REF][START_REF] Touboul | Bifurcation analysis of a general class of nonlinear integrateand-fire neurons[END_REF].

In the remaining of this paper we address the first issue and allude to the second in the conclusion.

We are interested in typical observed behaviors in EEG recordings and how is the saddle homoclinic bifurcation. Smoothly varying the bifurcation parameter, the system suddenly switches from a fixed point behavior (corresponding to normal background activity) to slow large amplitude oscillations, a behavior close to the description of seizures. Finding homoclinic bifurcations in a dynamical system is generally a very complex task, since it is a global bifurcation. Fortunately, it is known (see e.g. [START_REF] Kuznetsov | Elements of Applied Bifurcation Theory[END_REF]; [START_REF] Golubitsky | Singularities and Groups in Bifurcation Theory[END_REF])

that there exist simple local bifurcations (i.e. a bifurcations of fixed points) ensuring the presence of a saddle-homoclinic bifurcation. The simplest bifurcation with this property is the codimension two Bogdanov-Takens bifurcation in the neighborhood of which generically, i.e. in particular robustly, there exists a curve of saddle-homoclinic bifurcations.

We summarize this discussion in table 3 and in the related figure 3.

This "dictionary" gives clear indications about the kinds of features, including bifurcations, one should expect to find in any nonlinear neural mass model and how to identify the parameters in the model related to specific events of interest (in particular those whose variation can create the bifurcations). We now illustrate its use for classifying the behaviors featured by the Jansen and Rit model.

4 Using the Dictionary: The Case of Jansen and

Rit Model

An essential parameter in the Jansen and Rit model is the input firing rate P which represents the external input to the neural mass. This parameter is mathematically allowed to be positive or negative. Though not totally physiologically relevant since P is a density of action potentials, considering negative inputs P allows a better understanding of the origin of different dynamical features observed for more physiologically relevant values 2 . The dependency of the dynamics on the input firing rate has already been studied by [START_REF] Grimbert | Bifurcation analysis of Jansen's neural mass model[END_REF]) when all the other parameters are fixed and equal to the physiological values provided in Table 1. The authors described a very rich bifurcation diagram, featuring the coexistence of two limit cycles, one originating from a Hopf bifurcation, and the other collapsing on the fixed points manifold.

It was suggested by [START_REF] Grimbert | Bifurcation analysis of Jansen's neural mass model[END_REF] that this picture was quite sensitive to changes in the parameters. They observed that varying any parameter by as little as 5% resulted in dramatic changes in the Behaviors. In the fixed point (panel 1), and periodic orbit (panel 2), cases, we added noise to the dynamical system and obtained traces and power spectra for background activity and rhythmic activity comparable to those in Figure 1. Cases 3 and 4 are related to bifurcations of the system. P (or P1, P2) denotes a parameter of the system and X (or X1, X2) a variable. The cusp case (panel 3) shows a bistability effect, and the Homoclinic case (panel 4) is characterized by a sudden switch from a stable fixed point behavior to a large periodic orbit with arbitrarily large period (shown right, panel 4). All the behaviors plotted on the right are simulations of Jansen and Rit model. bifurcation diagram and the observed behaviors. However, the parameters in table 1 are only approximately known, and errors (or natural variability) of this order of magnitude are clearly to be expected. Moreover, some parameters are known to evolve slowly in time, e.g., the connectivity parameters through the process of plasticity. This is why we decided to investigate thoroughly how the bifurcation diagram changed when one systematically varied the model parameters.

Beside the external input firing rate, another parameter of particular interest is the total connectivity parameter j. Indeed, as this parameter is closely related to plasticity, it is important to study and to understand its influence. This will allow us to test the hypothesis that an increased functional connectivity, or even the less common fact that an increased number of synapses between populations, favors the appearance of epileptic activity, as observed experimentally. The former phenomenon has been widely documented (see e.g. [START_REF] Bettus | Enhanced eeg functional connectivity in mesial temporal lobe epilepsy[END_REF]), and the latter was mainly evidenced in hippocampal epilepsy, and is generally referred to as neosynaptogenesis, or sprouting, as it corresponds to the sprouting of mossy fibers of the dentate granule cells on the dendrites of pyramidal neurons of CA3, see e.g. [START_REF] Noebels | Targeting epilepsy genes[END_REF]; [START_REF] Babb | Glutamate decarboxylase-immunoreactive neurons are preserved in human epileptic hippocampus[END_REF]; [START_REF] Munoz | Cationchloride cotransporters and gaba-ergic innervation in the human epileptic hippocampus[END_REF]. This phenomenon in particular results in a bistable behavior, as shown in [START_REF] Sutula | Unmasking recurrent excitation generated by mossy fiber sprouting in the epileptic dentate gyrus: an emergent property of a complex system[END_REF].

In the sequel we perform an analysis of the codimension two bifurcations of the system with respect to the pair (j, P ) of parameters. In other words we describe what changes the solutions of (2) undergo when one varies these two parameters while keeping the others constant. Codimension two bifurcations with respect to the excitation and inhibition parameters α 2 and α 4 (see table 1) are then described, and for the sake of completeness, bifurcations with respect to other pairs of parameters are described in appendix B.

Bifurcation analysis: the role of global connectivity

The dimensionality and the complexity of the system makes a full analytical study of the bifurcations impossible. However, it is important to note that as far as the fixed points are concerned, the analysis can be significantly simplified by the fact that the fixed points belong to a curve that can be parametrized by the value of the variable X; indeed, by setting the time derivatives equal to 0 in (2), one easily obtains Y 3 = Y 4 = Y 5 = 0 and:

Y 0 = jS(X) Y 2 = α 4 G d jS(α 3 jS(X)) P = X + jS(X) -α 2 jS(α 1 jS(X)).
For each value of the pair (j, P ) the number of fixed points is equal to the number of solutions of the third equation above, which is an implicit equation in X. Having solved this equation we obtain the other coordinates, Y 0 and Y 2 , of the fixed points. The Jacobian matrix of (2) at the fixed points can also be conveniently parameterized by X:

J(X) =              0 0 0 1 0 0 0 0 0 0 1 -1 0 0 0 0 0 1 -1 j S ′ (X) 0 -2 0 0 α 1 α 2 jS ′ (jα 1 S(X)) -1 -1 0 -2 0 α 3 α 4 jdS ′ (jα 3 S(X)) 0 -d 2 0 0 -2d             
This allows us to perform a semi-analytical study of the bifurcations of equilibria with the help of a symbolic computation package, Maple in this case. The study of the limit cycles and the global bifurcations cannot be done in a similar fashion, they must be derived numerically using the MatCont continuation package (Dhooge et al., 2003b,a).

The results of this codimension two bifurcation analysis are summarized in the bifurcation diagram shown in Figure 4.

Codimension one bifurcations are described by curves in the parameter space (j, P ). Let us describe and comment the changes in the bifurcation structure of the system when increasing the values of parameter j. Qualitative changes occur when one goes from one of the eight zones in Figure 4 to the next. Each border is a vertical line going through one of the seven points noted (in increasing order of the values of j) C, BT , H2, E, GH, H1, CLC. For small values of the parameter zoom in the region within the small red rectangle where the system is very sensitive to the variations in the parameters. j (more precisely for j < j C ), the system has no bifurcation: for each value of the parameter P , the system has a unique stable fixed point, and for any initial condition, the solution converges towards this fixed point (see Figure 5(A)).

For j = j C , the system undergoes a cusp bifurcation, generating for larger values of j two curves of saddle-node bifurcations (represented in black in Fig-

ure 4). These two curves are the only bifurcations of the system for j C < j < j BT .

Therefore, according to the correspondence produced previously, the system displays a bistable behavior, as will be assessed by the simulations presented below (Figure 6). This appears in the bifurcation diagram shown in Figure 5(B).

At j = j BT , the system undergoes a subcritical Bogdanov-Takens bifurcation on the lower branch of the saddle-node bifurcations curve. This bifurcation gives rise to 1) a curve of subcritical Hopf bifurcations (blue curve), 2) a family of unstable limit cycles, and 3) a curve of saddle homoclinic bifurcations (plain green curve in Figure 4). This curve meets the upper curve of saddle-node bifurcations at a point noted S in Figure 4. At this point the saddle homoclinic loops turn into saddle-node homoclinic loops and the epileptic spiking behavior appears. The subcritical Hopf bifurcation curve undergoes a Generalized-Hopf (or Bautin) bifurcation, and becomes a curve of supercritical Hopf bifurcations (shown in red in Figure 4), at the point denoted GH in the same figure. This bifurcation gives rise to a curve (shown in orange in Figure 4) of folds of limit cycles along which a family of stable limit cycles and a family of unstable limit cycles collide and disappear.

The continuation of the folds of limit cycles curve shows the presence of a cusp bifurcation (point CLC in the figure). The unfolding of this bifurcation allows us to continue another branch of curve of folds of limit cycles. We observe that these folds of limit cycles merge with the homoclinic saddle bifurcation curve at the point S where the saddle homoclinic loop turns into a saddle-node homoclinic loop.

Note that since the bifurcation curves described are not functions of the only parameter j, we had to introduce three "artificial" points, that do not correspond to bifurcations, but to the points where a parameterization of the bifurcation curves by the single parameter j fails. Two of these points (H1 and H2) are located on the Hopf bifurcation curve, and one is located on one branch of the curve of folds of limit cycles (E). The numerical values of the parameters j and P corresponding to the codimension two bifurcations and to the points H1, H2

and E are provided in In each of the eight ranges of j values the model displays similar behaviors when varying the input parameter P , in the sense of topological equivalence; in particular it has the same number of fixed points and limit cycles with the same stability. Typical bifurcation diagrams, representing the fixed points and the cy-cles of the variable X as a function of parameter P for each range of j values are provided in Figure 5. This can be thought of as showing the evolution of the bifurcation diagram of the X variable with respect to the input parameter P when increasing the total connectivity parameter j.

We observe that indeed, the picture obtained by Grimbert and Faugeras in [START_REF] Grimbert | Bifurcation analysis of Jansen's neural mass model[END_REF], and reproduced in figure 5, is very sensitive to changes in the parameters. The range of values where the bifurcation diagram they obtained is valid only in the zone D of the codimension two bifurcation diagram corresponding to 12.10 ≤ j ≤ 12.38). Moreover, the two intriguing facts reported in their article find an explanation here. First, the reason why the two Hopf bifurcations share the same family of limit cycles can be found in the fact that the two Hopf bifurcations actually belong to the same Hopf bifurcation curve in the parameter space (j, P ) (shown in blue and red in figure 4). Second, the origin of the saddle-node homoclinic bifurcation they report comes from the existence of the Bogdanov-Takens bifurcation (point BT in figure 4). The Saddle-Node on Invariant Circle (SNIC) bifurcation they report is simply our saddle-node homoclinic bifurcation, but seen from the cycles' point of view.

Albeit the particular bifurcation diagram Grimbert and Faugeras established in [START_REF] Grimbert | Bifurcation analysis of Jansen's neural mass model[END_REF] is only valid in a very restricted zone of values of the connectivity parameter j, the picture they describe in terms of behaviors of neural masses is more general. Changing our viewpoint, we now turn to the interpretation of this bifurcation diagram structure in terms of behaviors of a neural mass, and identify four parameter zones that qualitatively differ in their corresponding behaviors.

Neuro-Computational features

Jansen and Rit model is a good candidate for validating the correspondence proposed in section 3.2 (see table 3). Indeed, it features all the bifurcations mentioned above, namely the cusp, the cusp of limit cycles and the saddle homoclinic bifurcations. The eight classes defined in the previous section can actually be clustered further into four groups according to the presence of these bifurcations. We now study the neuro-computational features of the system in these four parameter regions. firing rate P , the system either has a single, stable, fixed point or two stable fixed points and one unstable. In the latter case, the system shows hysteresis and bistability: depending on the initial condition, the variable X converges toward one or the other stable fixed point, corresponding to an up-state and down-state activity. Eventually, it can switch between the two stable fixed points if perturbed.

The purple and green curves in Figure 6.(B-C) correspond to P = -10 and P = 10, respectively, i.e. to the cases where the system has a single stable fixed point.

Irrespective of the initial condition the variable X converges towards the same value. The orange curves correspond to P = 0. Depending upon its initial value, the variable X converges toward either its down-state value or to its up-state value. Note that in the case of the down-state, no oscillations appear, the fixed point is a stable node. In the case of the up-state, damped oscillations appear, the fixed point is a stable focus. This behavior has been observed both in healthy and pathological cases, see e.g. [START_REF] Sutula | Unmasking recurrent excitation generated by mossy fiber sprouting in the epileptic dentate gyrus: an emergent property of a complex system[END_REF].

(D)-(G): Epilepsy case For j H2 < j < j CLC , the system undergoes a saddlenode homoclinic bifurcation. From the correspondence between bifurcations and behaviors we produced, it is expected to display an epileptiform activity close to the bifurcation point. This is what we observe when simulating the system (see Figure 6.(D-G)): the system always displays for some initial conditions and some values of the input firing rate P large amplitude and small frequency rhythmic activity, similar to epileptic spiking activity (segments S2 in Figure 1) in experimental recordings.

In the parameter zones (D) and (E), the epileptic activity always coexists with the alpha-like activity, observed in both healthy and epileptic recordings (segment S4 in Figure 1). Moreover, the attraction bassin of the epileptic limit cycles is rather small. Therefore, in the presence of noise, rhythmic spikes are not sustained, albeit stable, because the noise can easily bring the solution out of the attraction basin. This is the mixed epileptic-alpha case.

In cases (F) and (G), there exists a whole interval of connectivity values j

where the epileptic activity is the only possible behavior. In that case, even in the presence of noise, seizure activity with sustained rhythmic spiking will be observed. This is the purely epileptic situation. Note that these two cases correspond to larger values of the total connectivity parameter j than in the epileptic-alpha case. This observation is in agreement with the well established fact that functional connectivity is increased in epilepsy (see e.g. [START_REF] Bettus | Enhanced eeg functional connectivity in mesial temporal lobe epilepsy[END_REF]).

We detail an example in the case j = 12.5. The purple and green curves in Figure 6.(D-G) correspond to P = -2 and P = 9, respectively, i.e. the cases where the system has a single stable fixed point. As in the previous case, irrespective of the initial condition the variable X converges towards the same value. For P = 2.05 there is a unique stable limit cycle and the system always displays epileptic activity, shown in dark blue in the same figure. For P = 2.3 there are two stable limit cycles: alpha and epileptic activity coexist and one or the other is selected by the initial conditions. The alpha activity is shown in orange and the epileptic activity in red in Figure 6.(D-G). Finally for P = 5 there is a unique limit cycle corresponding to alpha activity, shown in cyan in the same figure.

(H): Epilepsy, theta and alpha case For larger values of the connectivity parameter (j > j CLC ), the system undergoes a saddle-node homoclinic bifurcation, therefore still presents epileptic spikes, which are the only stable activities in a large interval of the input parameter values (i.e. the limit cycle corresponding to the epileptic-like activity is the only stable trajectory of the system). This family of large amplitude and low frequency limit cycles is connected to cycles of smaller amplitude and frequency rather stable around the theta activity, and eventually to cycles of amplitude and frequency corresponding to alpha activity, see Figure 5. Their aspect is similar to seizures characterized by rhythmic spike or spike-and-wave activity. A particular aspect of this parameter zone is the presence of EEG waves in the frequency band of the theta activity (that is not observed in the other cases) and the continuous transition from one oscillatory activity to the other, in contrast with the sharp transitions of cases (D)-(G) linked with the presence of bifurcations. In detail, for the value j = 14 of the connectivity, we observe in figure 6.(H), for P = 10 an alpha activity shown in green, for P = 5 a theta activity shown in purple, and for P = 2.3 an epileptic or delta activity shown in blue.

Influence of the excitation and the inhibition

In the previous section, we provided a thorough analysis of the bifurcations of Jansen and Rit model with respect to the global connectivity parameter j, and analysed the behaviors it generated. An interesting feature of this parameter is that it can substantially vary during the dynamics, for instance through plasticity effects. This parameter also allowed us to reveal and check that increased connectivity (either functional or anatomical) can lead to epileptic behaviors in the model, in agreement with the experimental studies previously cited. The other two interesting parameters are the connectivity parameters α 2 and α 4 that control the effect of excitation and inhibition. Indeed, we consider that the post-synaptic potentials are hard-coded in the structure of the cortical column and are linked with the type of connection (neurotransmitter and receptor mainly), which fixes the parameters G and d, and the parameters α 1 and α 3 are not directly controllable. The bifurcations with respect to these parameters are succinctly described in appendix B for the sake of completeness. We now discuss in more details the effects of excitation and inhibition.

The parameter α 2 is of particular interest. Indeed, it controls the excitation in the model, and in particular allows to simulate the effect of blocking excitation.

Blocking excitation could be a pharmacological goal in the treatment of epilepsy, and could for instance make the use of sodium channel blocking or glutamatergic receptor antagonist. Altering the efficiency of excitatory synaptic projections can be emulated in Jansen and Rit model by decreasing the parameter α 2 . We observe that, indeed, a decrease of the parameter α 2 induces the disappearance of the epileptic activity, as evidenced in the bifurcation diagram provided in Figure 7.

This figure shows that for values of α 2 (number of excitatory projections) smaller than a critical value, any oscillatory activity, and in particular epileptic activity, is turned off (green zone of Figure 7). This bifurcation diagram presents a very interesting codimension three bifurcation, called the degenerate Bogdanov-Takens bifurcation (in the cusp case). The study of this bifurcation and its unfolding is particularly delicate, and was achieved by Dumortier, Roussarie and Sotomayor in [START_REF] Dumortier | Generic 3-parameter families of vector fields on the plane, unfolding a singularity with nilpotent linear part. the cusp case of codimension 3[END_REF][START_REF] Dumortier | Bifurcations of planar vector fields(nilpotent singularities and abelian integrals[END_REF]. This bifurcation is especially interesting because its unfolding presents all the qualitative behaviors observed in EEG signals that we discuss in the present paper. In appendix C, we show that Wendling and

Chauvel model also features this bifurcation, which provides an explanation for the similarities between both models. We eventually note that this bifurcation Figure 7: Bifurcations with respect to p and (A) α 2 , (B) α 4 . Green zone corresponds to the safe zone where no epileptic behavior is present. Yellow zone of (B) corresponds to a case where the epileptic behavior is the only behavior in a significant zone of parameters. The vertical blue dot-dash curves correspond to the value of the parameter in the original model. Color code of curves is the same as in figure 4, DBT stands for Degenerate Bogdanov-Takens bifurcation. . actually implies that blocking excitation only leads to a trivial behavior (there is no value of the parameter allowing to interrupt the epileptic behavior while keeping multiple behaviors).

The parameter α 4 corresponds to the number of synaptic connections in the inhibitory feedback loop. Similarly to the intuitive fact that seizures are linked with an increased excitation, fact that is corroborated by the previous analysis, one would think that increasing the inhibition would have a similar effect. This simplistic view is not correct, as shown in Figure 7. We observe that indeed, increasing inhibition through an increased value of the parameter α 4 does not affect the presence of epileptic activity. However, altering the efficiency of inhibition (decreasing α 4 ) has the effect of destroying the pathological epileptic cycles. This effect takes place very close to natural values of α 4 , and allows to keep some 29 interesting neuro-computational features, such as bistability and alpha rhythms.

The fact that the stabilization by blocking inhibition only requires to decrease α 4 by a small amount, and that it allows to keep computational capabilities, suggests that targeting the inhibitory loop could be a good pharmacological treatment.

Importance of delays

Post-synaptic potentials are characterized by a fast rise time and a slower decay.

The most usual model for modelling PSPs is the exponential model e -t/τ ½ t>0 (t) where ½ t>0 is the Heaviside step function. This model corresponds to neglecting the rise phase of the PSP and considering that an incoming spike has an instantaneous effect on the membrane potential of the post-synaptic cell. This amounts to neglecting delays of transmission and the fast dynamics of the synapse. This approximation is widely used because it is simpler and yet catches the essential of the phenomenon one wants to simulate. However, it appears that in Jansen and Rit model, the rise phase that creates a delay in the synaptic transmission, is essential to generate the oscillatory activity. Indeed, a first order synapse yields the highly simplistic bifurcation diagram of Figure 8 and the model only features a single equilibrium or a bistable behavior, but no oscillatory activity. Other models We believe that this type of models will provide similar results as Jansen and Rit's original model, and progressively undergo bifurcations as the rise phase time scale becomes increasingly smaller.

This result is in accordance with recent computational studies of large-scale networks where delays are shown to be responsible for shaping the activity of neurons in large networks. For instance [START_REF] Roxin | Role of Delays in Shaping Spatiotemporal Dynamics of Neuronal Activity in Large Networks[END_REF] show that delays give rise to a variety of large-scale oscillatory activities.

5 Not in the Dictionary: Role of Noise in the

Dynamics

In this section we extend somewhat the purely deterministic framework in which we have developed our analyses so far to consider some important phenomena that are observed in real recordings. This naturally leads us to enrich our framework with stochastic considerations. This is done in a qualitative manner. A quantitative analysis is outside the scope of this paper and is very sketchily presented in appendix C.

The fast onset activity

At first glance, the Jansen and Rit model does not feature the fast activity encountered at the onset of hippocampal and neocortical seizures in limbic structures, since no limit cycles seem to exist in the related range of frequency and amplitude. This observation led Wendling, Chauvel and co-workers [START_REF] Wendling | Interictal to ictal transition in human temporal lobe epilepsy: insights from a computational model of intracerebral EEG[END_REF][START_REF] Wendling | Transition to Ictal Activity in Temporal Lobe Epilepsy: Insights from Macroscopic Models[END_REF]

Inter-Ictal Spikes

Another important phenomenon is the occurrence of non-rhythmic isolated epileptic spikes, called inter-ictal spikes. These events can occur outside seizure periods.

The occurrence frequency of these inter-ictal spikes may increase before seizures.

We relate these inter-ictal spikes to the presence of noise in the system. Indeed, let us assume that the system is located at a stable fixed point, for values of the parameters close to a saddle-node homoclinic bifurcation. The destabilization of the fixed point by the noise will bring the system close to the limit cycles corresponding to the epileptic activity, and will be interpreted as an inter-ictal spike.

In the cases (C) to (E) of the diagram shown in Figure 4, inter-ictal spikes can therefore appear, but do not always correspond to a pre-ictal activity. The destabilization of the stable fixed point may bring the system close to the epileptic spikes limit cycle, but since this cycle is not the only stable behavior, the appearance of random spikes will hardly lead to a seizure. Indeed, as already mentioned, the attraction basin of the epileptic cycles is quite small. When destabilizing the fixed point we are very likely to experience a spike because the saddle-node bifurcation point is also a point of the saddle-node homoclinic cycle, part of the branch of limit cycles corresponding to epileptic spikes. But the noise will soon make the solution quit the attraction basin of the cycle and return to the other stable state (see e.g. [START_REF] Zetterberg | Performance of a model for a local neuron population[END_REF]). In this case, isolated random spikes correspond to some kind of transition from rest to oscillatory activity (see Figure 10(a)). We also observe in this case the emergence of interical busts.

In the cases (F), (G) and (H) in Figure 4, epilepsy is the only possible behavior in a certain range of input parameters. As a consequence inter-ictal spikes really predict a move towards rhythmic spikes characteristic of an epileptic seizure, and therefore precede the onset of a seizure. The choices of the type of input noise, its

Discussion and conclusion

We have shown how the study of the bifurcations of equilibria and cycles in neural mass models can account for many neuronal behaviors, and proposed a systematic approach to study parameters and behaviors in such models. We instantiated our model of choice, the Jansen and Rit model and showed how our approach applies to it. This led us to thoroughly describe all possible behaviors in Jansen and Rit model, and to show the correspondence between the model and several important biological observation. First, the link between hyperexcitability, increased connectivity, either functional or anatomical such as neosynaptogenesis (sprouting) and epilepsy. Second, the relative effects of excitation and inhibition on such behaviors. Our study is centered upon deterministic structures in the model, but we also discussed different effects linked with the presence of noise in the external input.

Extending this approach to stochastic models taking into account noise in a more systematic fashion is an important goal that we are pursuing, which raises very interesting biological and mathematical issues [START_REF] Arnold | Random Dynamical Systems[END_REF]; [START_REF] Berglund | Noise-induced phenomena in slow-fast dynamical systems[END_REF].

Indeed, variability and noise can affect different variables and parameters in the model. The question of how stochastic perturbations modify the structures described in this article is of great interest, and is still an unsolved problem. We showed in this paper that randomness in the input was in particular able to explain inter-ictal or pre-ictal behaviors, by exhibiting the spectral content related to the imaginary part of eigenvalues of a stable fixed point. The effect of noise on periodic orbits still needs to be further explored.

A more profound question related to noise bears upon the origin of the neural mass model equations. Remember that Jansen and Rit equations describe the global behavior of populations of at least thousands neurons, and that at the microscopic scale of individual neurons, noise is a pregnant phenomenon. Therefore the question of how one can derive these equations from the individual behavior of each neuron, and how the microscopic noise is translated into macroscopic randomness, is essential. Rigorous methods yield to very complex equations, as presented in [START_REF] Faugeras | A constructive mean field analysis of multi population neural networks with random synaptic weights and stochastic inputs[END_REF]. The study of these equations, and how the behaviors are affected by the noise will most probably provide great insights on the effect of noise in the appearance of seizures and in the rhythms of the brain, and is currently a very active area of research.

A very interesting aspect of Jansen and Rit model is that it features the sequence of electrophysiological patterns observed in temporal lobe or prefrontal epilepsy when increasing the input parameter P . Indeed, in the epileptic behavior zones obtained, increasing the input parameter and considering this noise parameter makes the system go from a trivial inter-ictal behavior to pre-ictal activity showing individual isolated spikes and then to a faster onset activity that precedes the rhythmic spikes and alpha-band activity characteristic of the seizure. Simulation of this structure is provided in Figure 11 (A), and the trace generated in this fashion is very close to standard traces recorded in epileptic patients, see for example the figure 5.A in [START_REF] Mcgonigal | MRI-negative prefrontal epilepsy due to cortical dysplasia explored by stereoelectroencephalography (SEEG)[END_REF]. This observation is coherent with the fact that in pathological cortical columns, a global increase of the input to the pyramidal neurons can trigger a seizure. It is well-known that this is not the only phenomenon that can be at the origin of a seizure, the world of epilepsy being a complex constellation, see for example [START_REF] Timofeev | Pathophysiology of neocortical epileptic seizures[END_REF]; [START_REF] Bazhenov | Cellular and network mechanisms of electrographic seizures[END_REF]; [START_REF] Timofeev | Neocortical seizures: initiation, development and cessation[END_REF] for interesting facts and discussions. Moreover, the model allows to discriminate between normal and pathological values of parameters, and to simulate for instance the effect of medication. As an example, in Figure 11 (B), we use the same parameters as in Figure 11 (A) leading to a seizure, and additionally simulate a sudden decrease in the parameter α 2 by an amount of 1%, which was shown in the mathematical study to make the epileptic spikes disappear. Such a phenomenon can be related to the injection of a convulsant drug, and yields traces that can be observed experimentally: it suddenly stops the rhythmic spikes and directly turns the activity into alpha waves such as those in segment S4 of Figure 1. Termination of the seizure (not plotted) can occur through two types of phenomena: first, the numerical protocol used here, consisting in increasing the parameter P , will result in a disappearance of the alpha cycles (related to the seizure) through the Hopf bifurcation identified in the bifurcation diagram (Figure 5) and the system will return to background activity. A variety of phenomena can occur during a seizure leading to its termination, among which the dramatic decrease of the extracellular calcium concentration, membrane shunting, energy failures (see e.g. Lado and Moshé (2008); Heinemann et al. (1977)). These have the effect of reducing synaptic transmission, i.e. to suddenly decrease the input parameter P . This phenomenon also has the effect of pushing the system back to background activity since for small values of the input parameter, the bifurcation diagram presents a unique stable fixed point, related to typical profiles of background activity. We note that this analysis raises the question of how to couple the dynamics of P , or for that matter of any parameter, to the activity of Figure 11: A seizure in the slightly hyperinnerved case (j = 12.7). Input P = µ 0 + 10 -3 t + σB t where B t is a Brownian motion, (A): µ 0 = 1.5 and (B): µ 0 = 1.2 in order to see the different pre-onset phases. σ = 0.4. (A): The grey zone corresponds to pre-onset activity, the pink zone to the onset of the seizure: we observe randomly distributed spikes and paroxismal depolarizing shifts. The light green zone corresponds to the rhythmic spiking phase of the seizure itself: we observe rhythmic activity with high amplitude oscillations. The yellow zone corresponds to the alpha activity phase of the seizure. If the input keeps increasing or if it is turned off, a return to background activity will be observed (not plotted). (B) Same parameters, with simulation of anti-GABA convulsant injection (decrease α 2 from 0.25 to 0.23) at a time shown by the red bar. This has the effect of stopping rhythmic spike and triggers the seizure alpha activity phase. The differences in pre-onset activity are evidenced during the pre-onset phase by the power spectra (C).

the system. Note that the example of Figure 11 is based on a particular choice of the variation of one of the parameters of the system. Other choices of variations of parameters would allow finding different patterns of activity, depending on the bifurcation curves crossed. Conversely, experimental information on the variation of the parameters, mapped on the related bifurcation diagram, will give information about the pattern of activity of the cortical column.

The total connectivity level seems to be an important parameter in the model since variations of this parameter are linked to pathological behaviors. This naturally leads to study phenomena that can affect its values, for instance plasticity, and in particular the links between plasticity and epileptogenic stimuli such as oscillatory visual stimulations.

Part of our conclusion is that a good model for reproducing EEG activity should be versatile enough to reproduce all the behaviors discussed in the paper.

One way to obtain such a model is to ensure that it features the same bifurcation structure as Jansen and Rit model. This guarantees that one can, similarly to this case, use the dictionary introduced in section 3.2 to find typical behaviors. We observed that Jansen and Rit, and Wendling and Chauvel, models both presented a codimension three bifurcation that unfolded into the desired bifurcation structure.

This bifurcation, called the degenerate Bogdanov-Takens bifurcation (also referred to as the cusp case of the singularity of planar vector fields with nillpotent Jacobian matrix), was studied by Dumortier, Roussarie and Sotomayor in [START_REF] Dumortier | Generic 3-parameter families of vector fields on the plane, unfolding a singularity with nilpotent linear part. the cusp case of codimension 3[END_REF][START_REF] Dumortier | Bifurcations of planar vector fields(nilpotent singularities and abelian integrals[END_REF], and has the important property to be generic, with normal form:

     ẋ = y ẏ = x 2 + α + y(β + γ x ± x 3 ) (3)
This suggests that such a polynomial model is a good candidate for a simple qualitative model of a cortical mass: it is very simple since it is of dimension two and depends upon only three parameters, α, β, and γ. The study of such phenomenological models is therefore very promising.

Finally we believe that the methodology developed in this article is an appropriate and highly meaningful tool for the study of a large variety of important behaviors observed in EEG recordings with a particular emphasis on abnormal epilepsy-related phenomena.

• We then (2) compute the left and right eigenvectors of the Jacobian matrix at these points:

check that the dimension of the eigenspace related to the eigenvalue 0 is 1

check conditions (SN2) and (SN3).

On the line where the determinant of the Jacobian matrix vanishes and some of the above conditions are not satisfied, we consider two cases corresponding to the cusp and the Bogdanov-Takens bifurcations

A.3 Cusp bifurcation

At a cusp bifurcation point, the Jacobian matrix of the system has a null eigenvalue and the first coefficient of the normal form (given by condition (SN3)) vanishes. In that case, under the differential transversality and genericity conditions of (Kuznetsov, 1998, lemma 8.1), a smooth change of coordinates puts locally the system in the normal form of the cusp bifurcation. Our algorithm numerically checks the two conditions at these singular points.

A.4 Bogdanov-Takens bifurcation

If along the saddle node manifold a second eigenvalue vanishes, under the genericity and transversality conditions of (Guckenheimer and Holmes, 1983, chapter 7.3), a smooth change of coordinates puts locally the system in the normal form of the Bogdanov-Takens bifurcation. These conditions are also numerically checked by our algorithm.

A.5 Andronov-Hopf bifurcation manifold

Changes in the stability of fixed points can also occur via Andronov-Hopf bifurcations. In this case, the real part of an eigenvalue crosses 0 but not its imaginary part. Theoretically, the dynamical system ẋ = f (x, µ) undergoes a Hopf bifurcation at the point x = x 0 , µ = µ 0 if and only if (see (Guckenheimer and Holmes, 1983, Theorem 3.4.2)):

A.7.1 Fixed points and stability

An interesting property of the system (2) is that the equilibria can be parametrized as a function of the state variable

X = Y 1 -Y 2 : Y 0 = jS(X) Y 2 = α 4 G d jS(α 3 jS(X)) P = X + jS(X) -α 2 jS(α 1 jS(X))
The Jacobian matrix at such a fixed point is also parametrized by X and reads:

J(X) =              0 0 0 1 0 0 0 0 0 0 1 -1 0 0 0 0 0 1 -1 j S ′ (X) 0 -2 0 0 α 1 α 2 jS ′ (jα 1 S(X)) -1 -1 0 -2 0 α 3 α 4 jdS ′ (jα 3 S(X)) 0 -d 2 0 0 -2d             
Although all the dynamics can be parametrized with the variable X, because of the complexity of the sigmoidal function, the analytical bifurcation study is untractable, and one has to make use of a numerical software in order to solve the problem 3 .

In the present case, almost all the calculations can be performed analytically with respect to the variable X. For this reason the use of the previously described bifurcation method allows computing accurately the bifurcations of equilibria. As already mentioned, the continuation of periodic orbits is more intricate and an analytical study is no more possible. This is why we will used Matlab R toolbox MatCont (Dhooge et al., 2003b) to study these bifurcations.

A.7.2 Saddle-node bifurcation manifold

In the case of Jansen and Rit model (see section 2.2, the possible saddle-node bifurcations points are located on a curve in the parameter space depending on 3 Grimbert and Faugeras used the XPPAut software in [START_REF] Ermentrout | Simulating, Analyzing, and Animating Dynamical Systems: A Guide to XPPAUT for Researchers and Students[END_REF] the variable X, and whose expression is:

d = j S ′ (X)(α 1 α 2 d S ′ (α 1 j S(X)) -α 3 α 4 GS ′ (α 3 j S(X))) (4)
In the case of Wendling and Chauvel model (see section C) this equation becomes,

1 = j 2 S ′ (X) α 1 α 2 S ′ (α 1 j S(X)) - α 3 α 4 d 1 G 1 S ′ (α 3 j S(X)) +S ′ (- jG 1 α 6 d 1 S(α 3 jS(X))+α 5 jS(X)) α 3 α 6 α 7 d 1 d 2 G 2 S ′ (α 3 jS(X))- α 5 α 6 d 2 G 2 S ′ (X) (5)
On this curve we have to check the genericity and the transversality conditions. For this step we have to resort to purely numerical simulation, since the computations are too heavy to be performed analytically.

It turns out that condition (SN2) is always satisfied. For each point of the curve, the dimension of the eigenspace associated with the eigenvalue 0 is equal to 1, except for the point BT of coordinates j BT = 10.05, P BT = -3.0742, X BT = 3.2956. We will specifically study this point below and prove that the system undergoes there a Bogdanov-Takens bifurcation.

Finally, condition (SN3) is satisfied everywhere except at a point C of coordinates j C = 5.38, P C = -0.29, X C = 3.63 (Figure 12(b) represents the coefficient involved in the saddle-node non-degeneracy condition (SN3)). We will also specifically study this point and show that the system undergoes there a cusp bifurcation.

The curve is represented in projection in the (j, P ) plane on figure 12(a), and presents a singularity at the point C.

A.7.3 Andronov-Hopf bifurcation manifold

Using our symbolic computation algorithm we obtain the manifold where the system possibly undergoes Hopf bifurcations. When fixing all the parameters but two, this manifold is a curve in a three-dimensional space (one coordinate is the variable X). This line can be computed in a closed form but the expression is very complicated and we do not reproduce it here. At each point of this line we 44 check the transversality (H2) and the genericity (H3) conditions.

We compute the eigenvalues and eigenvectors using Maple's algorithm, and compute numerically the derivative of the real part of the eigenvalue at this point and the first Lyapunov exponent which is given in closed form as a function of the eigenvectors (see [START_REF] Kuznetsov | Elements of Applied Bifurcation Theory[END_REF]). The points we obtain where the system undergoes an Andronov-Hopf bifurcation are plotted in the (j, P ) plane together with the sub-or supercritical type of the bifurcation in figure 13.

We observe that there is no Hopf bifurcation for j < j BT . When increasing j, a branch of subcritical Hopf bifurcations appears. When we reach the point H 2 defined by j H 2 = 12.099480, P H 2 = 0.095382, X H 2 = 4.150820, two additional Hopf bifurcation points appear. This point H 2 is a regular Hopf bifurcation point (the Jacobian matrix has two purely imaginary eigenvalue and the dependence in the parameters is regular). After this point, when increasing further the parameter j, the system has three Hopf bifurcations, one of them beeing subcritical and the other two subcritical. We then reach a singular point GH of coordinates j GH = 12.48, P GH = -2.58, X GH = 3.58 where the first Lyapunov exponent vanishes. At this point, one of the supercritical Hopf bifurcation becomes subcritical. Finally, the two subcritical Hopf bifurcations collapse at the regular Hopf bifurcation point

H 1 of coordinates j H 1 = 12.55375000, P H 1 = -3.104094843, X H 1 = 3.450451048.
For values of j greater than j H 1 , the system has a unique supercritical Hopf bifurcation. (C2). The transversality condition is satisfied: the dependence in the parameters and the variables is regular at this point. Indeed we have to check that on the center manifold a certain determinant does not vanish. Numerically we obtain the value -0.061, hence the system satisfies the transversality condition.

Bogdanov-Takens bifurcation As mentioned before at the point BT , the Jacobian of the system has two 0 eigenvalues.

(BT1). We compute the quadratic coefficients of Taylor's expansion in the center manifold and obtain, using Kuznetsov's notations [START_REF] Kuznetsov | Elements of Applied Bifurcation Theory[END_REF] (BT2). The transversality condition is checked by computing the determinant of the Jacobian matrix of a certain application.

Hence the point BT corresponds to a supercritical Bogdanov-Takens bifurcation (i.e. generating unstable limit cycles). Hence from this point there is a saddle-homoclinic bifurcation curve that we will study further on in the global bifurcations section.

Bautin (Generalized Hopf) bifurcation As mentioned before, at the point

GH

B Influence of other parameters in Jansen and

Rit model

The different bifurcations and behaviors featured by the Jansen and Rit model when varying the input P , the total connectivity parameter j, and the excitatory and inhibitory connectivity parameters α 2 and α 4 are studied in section 4. As a complement we study the bifurcations of the solutions with respect to the four remaining parameters G, d, α 1 and α 3 . Note that there is no easy way to act Two parameters govern the postsynaptic potentials: the amplitude ratio G and the time scale d. Acting on G corresponds to increasing the effect of inhibition, and therefore the dependency of the system with respect to G is close to acting on α 4 . Actually the parameter α 4 G can be considered as an independent parameter, but we did not choose to compact these in order to perform the study of medication that necessitated to leave free α 4 . The bifurcation diagram, shown in Figure 15(A) is very similar to that of Figure 5(A), and the system features the same bifurcations as when varying j: a cusp, a Bogdanov-Takens and a Bautin bifurcation, two branches of saddle-node of limit cycles collapsing at a cusp of limit cycles, homoclinic and saddle-homoclinic bifurcations, which implies that the same types of behaviors will be observed. The value of the parameters associated to each bifurcation is provided in Table 5. In the eight zones identified, the observed behaviors are analogous to the ones described in the case of the total connectivity j. There is a one to one correspondence between the behaviors of the zones labelled (A) to (G) in Figure 4(a) and those labelled (B) to (H) in Figure 15(A).

The only new kind of behavior corresponds to zone (H) in Figure 4(a) where there is no saddle node bifurcation but a supercritical Hopf bifurcation which implies the existence of a cycle.

The bifurcation structure with respect to the post-synaptic pulse time constant d also features the same bifurcations. This is shown in Figure 15(B). The bifurcations are located in a very small zone of parameter values, and in this zone the system will therefore be very sensitive to changes of these parameters.

C Analysis of Wendling and Chauvel Model

Wendling, Chauvel and colleagues [START_REF] Wendling | Interictal to ictal transition in human temporal lobe epilepsy: insights from a computational model of intracerebral EEG[END_REF][START_REF] Wendling | Transition to Ictal Activity in Temporal Lobe Epilepsy: Insights from Macroscopic Models[END_REF] proposed an extension of Jansen and Rit model with the specific aim of reproducing the fast activity observed at the onset of seizures. We showed in the main text that this phenomenon can be reproduced in Jansen and Rit model through a stochastic effect exciting fast oscillations modes around a stable fixed point characterized by a large imaginary part of the corresponding complex conjugate eigenvalues of the Jacobian matrix of the system. In order to account for these oscillations Wendling The black curve corresponds to the saddlenode manifold, the point C to the cusp bifurcation point, the blue curve to the subcritical Hopf bifurcations manifold. It is connected to the saddle-node manifold via a subcritical Boganov-Takens bifurcation at the point BT . At this point, the saddle-homoclinic bifurcations curve is plotted in green and connects to the saddle-node manifold via a saddle-homoclinic bifurcation, becoming a saddle-node homoclinic bifurcation curve (dashed green line). The subcritical Hopf bifurcation manifold is connected to the supercritical Hopf bifurcation manifold (red curve) through a Bautin bifurcation (point GH). From this bifurcation point there is a manifold of folds of limit cycles represented in orange. Cycles undergo a cusp bifurcation at the CLC point and a saddle-node homoclinic bifurcation at the point S (the corresponding values of the parameters are shown in table 5).

fast somatic and slow dendritic projections of interneurons onto pyramidal cells.

In this appendix, we describe the model in the light of the dictionary developed in the main text and of the results of the analysis of Jansen and Rit model. We start with a mathematical description, continue with a study of its bifurcations and the behaviors they entail, and conclude with the fact that the two models present the same typical behaviors that are ultimately caused by the same underlying mathematical structures.

C.1 Wendling and Chauvel model of hippocampus activity

Wendling and Chauvel model draws on a bundle of neurophysiological studies of the hyppocampus structure [START_REF] Jefferys | Review of the role of inhibitory neurons in chronic epileptic foci induced by intracerebral tetanus toxin[END_REF][START_REF] White | Networks of interneurons with fast and slow gamma-aminobutyric acid type a (gabaa) kinetics provide substrate for mixed gamma-theta rhythm[END_REF]; [START_REF] Wendling | Transition to Ictal Activity in Temporal Lobe Epilepsy: Insights from Macroscopic Models[END_REF]). The parameters α 1 , . . . , α 4 , J, v 0 , r and ν max are the same as in Jansen and Rit original model, see table 1.

The following additional parameters are used:

   G 1 = B A G 2 = C A d 1 = b a d 2 = c a (7)
These new parameters can be evaluated using the values of the parameters given in Table 6 and take the following values:

   G 1 = 6.76923 G 2 = 6.15385 d 1 = 0.2857 d 2 = 2
This is a 10-dimensional system of first-order ordinary differential equations depending upon 13 parameters (including the input P ). We now turn to analyzing this system in the light of the dictionary developed in the main text and the concepts introduced therein.

C.2 Analysis of Wendling and Chauvel Model

We study the possible behaviors displayed by Wendling and Chauvel model (6) as the parameters vary and link these behaviors with typical stages in epileptic seizures as described in the Material and Methods section of the main text. We start by examining the joint role of the total connectivity parameter j and the input P in order to assess whether this model agrees with the well-established fact that an increased functional or anatomical connectivity can yield epileptic behavior, before turning to studying the role of the PSP amplitude ratios G 1 and G 2 in order to account for the results Wendling and Chauvel showed in their chapter in [START_REF] Wendling | Transition to Ictal Activity in Temporal Lobe Epilepsy: Insights from Macroscopic Models[END_REF].

C.2.1 Effect of the Total Connectivity

The study of the joint effect of the total connectivity and the input is numerically explored through our bifurcation and continuation algorithms. 1. In the parameter zone (A) the system exhibits a unique fixed point for every input P . This zone corresponds to the normal behavior in EEG recordings:

the system always converges to the unique, stable equilibrium depending on the input rate (see Figure 17(a)) corresponding to the activity level of the column.

2. Parameter zone (B) corresponds to a purely epileptic behavior appearing through a saddle-node homoclinic bifurcation as described in our "dictionary" in the Results section of the main article (see Figure 17(b)) . The system features two saddle-node bifurcations and a subcritical Hopf bifurcation generating unstable limit cycles that undergo a fold of limit cycles 6. We observe a saddle-node bifurcation manifold (plain black curve), a Hopf bifurcation manifold (plain blue curve), a fold bifurcation of limit cycles manifold (plain orange curve), a Bautin bifurcation, and a codimension three degenerate Bogdanov-Takens bifurcation (DBT).

connecting to a family of stable large amplitude slow limit cycles, corresponding to epileptic-like activity, as plotted in Figure 18(b).

3. The parameter zone (C) of Figure 17 corresponds to a birhythmicity: the system presents a family of stable limit cycles of small amplitude and 10

Hz frequency corresponding to alpha-like activity and a stable family of epileptic spikes. In this case, the system presents alpha activity together with epileptic spikes of low frequency and high amplitude because of the presence of two fold bifurcations of limit cycles, see Figure 18(c).

We observe that in the case where the parameters are set using the biophysical values of table 6, Wendling and Chauvel model only features behaviors that are also featured by Jansen and Rit's. The alpha activity always coexists with a rhythmic spikes activity, and rhythmic spikes are the only stable behavior in a given zone of parameters, yielding an unconditional epileptic spiking behavior in a determined region of the parameters. We observe that a very small input connectivity parameter always produces normal behavior.

However there are differences between the two models. Indeed, bistability never exists in Wendling and Chauvel model when one fixes all parameters but j and P . Therefore, this behavior is an additional feature of Jansen and Rit model compared to Wendling and Chauvel's. Moreover the fact that increasing j increases the likelyhood of the appearance of epileptic behaviors is not true anymore in their model. Indeed, we observe that decreasing the parameter j from its physiological value yields an unconditional epileptic spiking behavior, which is a bit questionable physiologically in non-pathological cortexes. One also notes that, as long as the resting state is not the only possible behavior, epilepsy is always present whatever the values of the parameter j. This makes Wendling and Chauvel model more of a model of epileptic seizures than a generic model of a cortical column, since epileptic behaviors coexist with "normal" behaviours depending upon the values of the parameters. This statement is made for variations of the parameter j. In the case where the parameters are set to their physiological values, there is a wide range of input values for which epileptic spikes occur, and this is not true in the case of Jansen and Rit model. This discussion points to the fact that perhaps Wendling and Chauvel model should be considered as a model of epileptic hippocampus and not as a model of "normal" brain.

But note that Wendling and Chauvel never considered the effect of the total connectivity and focused their studies on the analysis of the influence of the PSP amplitude parameters A, B and C that correspond in the dimensionless model ( 6)

to the parameters G 1 and G 2 . We now turn to the study of the influence of these two parameters.

C.2.2 Fast Onset activity, and Influence of the PSP Amplitude Parameters

In [START_REF] Wendling | Transition to Ictal Activity in Temporal Lobe Epilepsy: Insights from Macroscopic Models[END_REF], the authors provide a partition of the parameter space (A, B, C) of the original system (i.e. the dimensioned one) corresponding to different behaviors, and distinguish between normal activity, narrowband activity, sporadic spikes and fast activity. The partition was obtained by simulating different EEG traces for a Brownian input rate. During this analysis, they identify a zone where the system shows fast onset activity and reproduces the kind of spectrum recorded through EEG on different patients. The presence of these fast oscillations is analyzed here in the light of the previous developments. In this model, as in the one by Jansen and Rit, there is no limit cycle with large frequency.

However, these frequencies clearly appear in the computed spectra when simulated with stochastic inputs. In that case, similarly to Jansen and Rit model, the fast oscillations with small amplitude, characteristic of the fast onset activity, appear not to be related to cycles but arise from the existence of stable fixed points with large imaginary part of the eigenvalue, as plotted in Figure 19. In that figure, we plot the larger imaginary eigenvalue of the fixed points as a function of P and G 1 and observe that indeed, in the zone corresponding to the fast onset activity, Wendling and Chauvel model features a stable fixed point with a Jacobian matrix having large imaginary part eigenvalues (this zone barely depends on the parameter G 2 ).

The dimensionless reduction of the Wendling and Chauvel model shows that the effect of changes in the parameters (A, B, C) can be described via a bifurcation analysis in the space (G 1 = B/A, G 2 = C/A). Nevertheless, one has to be aware of the fact that the coefficient A influences the input firing rate since P = rA Ja p. Therefore, the different diagrams these authors obtain as A increases correspond to the same type of (distorted through our change of variable) diagrams we obtain when the parameter P varies. Addressing specifically the problem of determining the zones corresponding to different behaviors as a function of (A, B, C) must therefore be done by simultaneously varying P , G 1 and G 2 , thus the dimensionality reduction does not help for this particular question. The study can nonetheless be done within the framework developed in the main text, and we show for instance no cycle with the correct frequency is present in the bifurcation diagram. This phenomenon, exactly as in the case of Jansen and Rit model, is a purely stochastic effect, as discussed previously. For this value of the input, folds of limit cycles appear, as shown in Figure 20, panels (a) and (b). In that case, we observe a small region of narrowband (α, θ) activity, immediately followed by rhythmic epileptic spikes corresponding to a family of limit cycles of large amplitude and low frequency. Sporadic spikes reported in [START_REF] Wendling | Transition to Ictal Activity in Temporal Lobe Epilepsy: Insights from Macroscopic Models[END_REF] appear in the region where an unstable cycle exists, which is coherent with the interpretation given in the case of Jansen and Rit model. This is caused by a random attraction to a nearby epileptic cycle: in effect, sporadic spikes in Wendling and Chauvel model appear only in regions close to the epileptic activity. Around the Hopf bifurcation, the system features a stable fixed point whose Jacobian matrix has non-real eigenvalues. The imaginary part of some of the eigenvalues is first close to the value corresponding to (α, θ) activity near the Hopf bifurcation, and then increases, which corresponds to a transition between narrowband and fast activities. This analysis provides the diagram plotted in Figure 20 (c) that shows similar features to the results presented in [START_REF] Wendling | Transition to Ictal Activity in Temporal Lobe Epilepsy: Insights from Macroscopic Models[END_REF]. Dis- tortions due to the change of variables account for the differences between these diagrams. Further studies aiming at delineating more precisely the contours of these zones and determining the relative effects of (A, B, C) by returning to a dimensioned model are ongoing but are outside the scope of this short appendix.

C.3 Conclusion

Through the analysis of a second cortical mass model we showed how bifurcation analysis and the use of the dictionary between behaviors and bifurcations devel-

  ity. Electroencephalographic signals (either depth-or scalp-EEG) recorded during time periods including transitions from normal to pathological activity present different stages characterised by dramatic changes in both the frequency and the amplitude of signals. A typical example is provided in figure 1 showing depth-EEG signals recorded in a patient with mesial temporal lobe epilepsy. Depth-EEG signals are recorded during the pre-surgical evaluation of drug-resistant epilepsies. Technically, this exploration named stereoelectroencephalography (SEEG) requires the uses of intracerebral (i.e. depth) electrodes implanted (under stereotaxic conditions) in various brain regions potentially involved in the generation of epileptic seizures.

  -A) to seizure (Figure 1-B) activity, is marked the appearance of strong non stationarities in the recorded signal. Even though the signal frequency content dramatically evolves as a function of time, it can generally be considered as a sequence of piecewise stationary signals concatenated through abrupt transitions. In this type of epilepsy which involves mesial structures like the hippocampus, the seizure onset is manifested by a fast (low amplitude, high frequency) activity that is clearly visible in depth-EEG signals. This fast onset activity (Figure 1-B, segment S3) dramatically differs from background (Figure 1-A, segment S1) activity as the signal energy re-distributes itself in higher frequency bands (from 20 to 40 Hz). The background activity mainly occupies the theta band of the EEG and usually includes sporadic epileptic spikes. The fast onset activity is often preceded by high amplitude spikes (Figure 1-B, segment S2). As the seizure develops, the fast activity gradually slows down and evolves toward rhythmic spiking (Figure 1-B, segment S4

Figure 1 :

 1 Figure 1: Features of real EEG data during the transition from background to seizure activity. In this example, the EEG was recorded from hippocampus using intracerebral electrodes in a patient with drug-resistant epilepsy and undergoing pre-surgical evaluation. (A) inter-ictal background activity (5 minutes before seizure) shows the occurrence of transient spikes. (B) The transition from pre-ictal to ictal activity is characterized by rhythmic spikes (S2) followed by fast oscillations at the onset of seizure (S3) that gradually slow down as the ictal activity (S4) develops. (C) Normalized power spectral densities (PSDs) computed on the for typical segments (S1-S4) selected at different steps of the process.

Figure 2 :

 2 Figure 2: (A) Schematic and (B) Block diagram representations of JR neural mass model: a population of pyramidal cells (green triangle) interacts with an inhibitory population of interneurons (blue circle). (A) Plain arrows: excitatory connections. Dashed arrow: inhibitory connection. (B)The boxes labelled h e and h i correspond to linear synaptic integrations, the boxes labelled Si represent the cell body, and correspond to the sigmoidal transformation converting a population activity into an output firing rate. The constants J i account for the strength of the synaptic connections between populations, and y 0 , y 1 and y 2 are the variables in equations (1).

  they can be reproduced by neural mass models. During normal activity, the recorded signal moves randomly about a constant value. It is appealing to think of this value as a stable fixed point of the model and the system as being randomly perturbed around this fixed point, see figure3.1. Next come the oscillations of all sorts. In the theory of dynamical systems these oscillations are represented by the concept of a limit cycle, see figure 3.2. When the recorded signal changes abruptly from one value to another, the system is said to be bistable. Similarly when the recorded signal swaps back and forth between two states in which it oscillates at two different frequencies with two different amplitudes, one also speaks of bistability. This phenomenon of bistability can be nicely accounted for by a special type of bifurcation called the cusp or, in the second case, the cusp of limit cycles, see figure3.3. Finally, epileptic spikes often appear as low-frequency, large amplitude oscillations. This phenomenon can also be accounted for by another type of bifurcation in which an unstable fixed point (technically a saddle) is turned into a cycle of low frequency, with generally large amplitude, due to the appearance of what is called a homoclinic cycle, see figure 3.4. The technical name of this bifurcation

Figure 3 :

 3 Figure 3: The dictionary. (Left) Dynamical Systems properties. (Right) RelatedBehaviors. In the fixed point (panel 1), and periodic orbit (panel 2), cases, we added noise to the dynamical system and obtained traces and power spectra for background activity and rhythmic activity comparable to those in Figure1. Cases 3 and 4 are related to bifurcations of the system. P (or P1, P2) denotes a parameter of the system and X (or X1, X2) a variable. The cusp case (panel 3) shows a bistability effect, and the Homoclinic case (panel 4) is characterized by a sudden switch from a stable fixed point behavior to a large periodic orbit with arbitrarily large period (shown right, panel 4). All the behaviors plotted on the right are simulations of Jansen and Rit model.

Figure 4 :

 4 Figure4: Codimension two bifurcations of JR model with respect to the connection strength j and the external input value P . The behaviors of the system for fixed values of j can be divided into eight zones labelled from (A) to (H) enjoying different mathematical properties (colors and labels differentiate these zones). Codimension one bifurcation curves are shown in: Black: saddle-node, Blue: subcritical Hopf, Red: supercritical Hopf, Plain Green: saddle-homoclinic, Dashed Green: saddle-node homoclinic, Orange: fold of limit cycles. Codimension two bifurcation points: C: cusp bifurcation, BT: Bogdanov-Takens, GH: Generalized-Hopf (Bautin bifurcation), CLC: Cusp of Limit cycles. (a) full picture and (b): zoom in the region within the small red rectangle where the system is very sensitive to the variations in the parameters.

Figure 5 :

 5 Figure 5: Bifurcation diagrams of the variable X with respect to the input P , in each of the 8 cases determined in figure 4. Continuous blue line: stable equilibrium. Dashed blue line: unstable equilibrium. Continuous purple line: stable limit cycle. Dashed purple line: unstable cycles. Green cycle: saddle homoclinic orbit bifurcation. Orange cycle: fold of limit cycles. The saddle-node bifurcations are indicated by SN. The Hopf bifurcations are indicated by H. Parameters: (A) j = 4: For each value of P there exists a unique stable equilibrium. (B) j = 8, (C) j = 11, (D) j = 12.285 corresponding to the original parameters of Jansen and Rit model, (E) j = 12.42, (F) j = 12.5, (G) j = 12.7, (H) j = 14.

Figure 6 :

 6 Figure 6: The four typical observed behaviors. Colors are arbitrarily chosen to show solutions corresponding to different input values P and multiple curves of the same color in panel (B-C) correspond to different initial conditions. The trivial case corresponds to zone (A) in figure 4 (j = 4), the bistable behavior is observed in zones (B) and (C) of the bifurcation diagram of figure 4, the epilepsy case extends from zone (D) through (G) of the bifurcation diagram of figure 4, and the epilepsy, theta and alpha case characteristic of (H), see text.

(

  A) Trivial behavior For j < j C , the system presents a unique fixed point and no cycle whatever the input firing rate P . Therefore, when the input firing rate is fixed, for any initial condition, the activity of the column converges towards this unique equilibrium. Figure 6.(A) shows the value of the variable X at equilibrium for five different values (corresponding to the different colors) of the parameter P and for the same initial condition. (B-C) Bistable non-oscillating behavior Zones (B) and (C) correspond to a bistable behavior, since the bifurcation diagram in these zones shows two saddle-node bifurcations (originating from a cusp bifurcation). Depending on the input

Figure 8 :

 8 Figure 8: (A) exponential PSP (blue) vs second order PSP (red), and (B) bifurcations of Jansen and Rit model with exponential PSPs. Pink zone: trivial zone, white zone: bistable zone. Black curve: Saddle-node bifurcations.

  to extend Jansen and Rit model by taking into account different dynamics for the projections of interneurons on the pyramidal neurons. The global structure of the system and its bifurcations are very close to those of Jansen and Rit model, as presented in the appendix C. The precise analysis of Wendling and Chauvel model nevertheless leads to the same conclusion: the fast onset activity does not correspond to a deterministic limit cycle, and the differential system features a stable fixed point where the authors find fast oscillations. Fast onset activity in Wendling and Chauvel model is in fact the result of random fluctuations around a stable focus, when the system is driven by Brownian noise, as briefly shown in appendix C. This observation gave us a clue as to what to look for in Jansen and Rit model. The conclusion is that for similar values of the parameters, the exact same phenomenon takes place, and the oscillations observed are precisely in the frequency and amplitude range of typical fast onset activity (see Figure 9).

Figure 9 :Figure 10 :

 910 Figure 9: Fast onset activity in Jansen and Rit model. (A) The plot, as a function of the parameters j and P , of the imaginary part of one of two complex-conjugate eigenvalues in Jansen and Rit model, shows a clear maximum for some values of the parameters. It is the magnitude of the imaginary part that determines the frequency of the oscillations around the corresponding fixed point. The existence of this maximum, together with the fact that the corresponding real parts are almost constant and negative (not shown), corresponding to a stable fixed point, generate faster oscillations than the customary alpha rhythms observed in Jansen and Rit model. (B)-(D): These eigenvalues generate fast oscillations around the stable fixed point that show up in the power spectrum. The row labelled 1 shows the power spectrum of the signal obtained in numerical experiments, the row labelled 2 shows experimental results from (Wendling et al., 2005; Wendling and Chauvel, 2008) (B) For small values of P , the very small imaginary part of the eigenvalue yields a power spectrum with a sharp peak around 5Hz similar to the recorded preonset activity (B2), that evolves when getting closer to the seizure into a broader distribution (C). The high values of the imaginary parts of the eigenvalues shown in (A) correspond to the fast onset activity (D).

  diagram in the (j, P ) space, see text.

Figure 12 :

 12 Figure 12: Saddle-node bifurcation manifold and bifurcation diagram in (j, P ).

Figure 13 :

 13 Figure13: Andronov-Hopf bifurcation manifold and bifurcation diagram in the (j, P ) space. The red part corresponds to a subcritical Hopf bifurcation (i.e. generating unstable limit cycles) and the blue one to supercritical Hopf bifurcations generating stable limit cycles).

  , a = 0.005342 and b = 0.009434. Hence at the point BT we have a b > 0 and σ = sign(ab) = 1.

  the system undergoes a Hopf bifurcation and the first Lyapunov exponent vanishes. At this point we need to compute the second Lyapunov exponent and to check a transversality condition. Complicated but straightforward differential computations yield the second Lyapunov coefficient. We obtain l 2 = 2.235 10 -3 . The transversality condition is checked by computing the determinant of a Jacobian matrix, and this determinant does not vanish. Hence the system undergoes a Bautin bifurcation. Conclusion Figures 14(a) (in the (j, P ) plane) and 14(b) (in the (X, j, P ) space) summarize the different local bifurcations we have found in our study. The black curve represents the saddle-node bifurcation curve, the red curve the subcritical Hopf bifurcations and the blue one the supercritical Hopf bifurcations. The cusp point C, the Bogdanov-Takens point BT is at the intersection of saddle-node and Hopf curves and the Generalized Hopf bifurcation point GH is the point where the subcritical Hopf bifurcations becomes supercritical.

Figure 14 :

 14 Figure 14: Full bifurcation diagram represented on the fixed points manifold (see text for the description)

  Figure15: Codimension 2 bifurcations in Jansen and Rit model with respect to the input P and (A) the PSP amplitude ratio G, and (B) the PSP delay ratio d. The behavior of the system for fixed values of G can be split into eight zones (A) . . . (H) described in the text. The black curve corresponds to the saddlenode manifold, the point C to the cusp bifurcation point, the blue curve to the subcritical Hopf bifurcations manifold. It is connected to the saddle-node manifold via a subcritical Boganov-Takens bifurcation at the point BT . At this point, the saddle-homoclinic bifurcations curve is plotted in green and connects to the saddle-node manifold via a saddle-homoclinic bifurcation, becoming a saddle-node homoclinic bifurcation curve (dashed green line). The subcritical Hopf bifurcation manifold is connected to the supercritical Hopf bifurcation manifold (red curve) through a Bautin bifurcation (point GH). From this bifurcation point there is a manifold of folds of limit cycles represented in orange. Cycles undergo a cusp bifurcation at the CLC point and a saddle-node homoclinic bifurcation at the point S (the corresponding values of the parameters are shown in table5).

Figure 16 :

 16 Figure 16: Wendling and Chauvel Neural Mass Model. (A) Schematic and (B) block-diagram representations of Wendling and Chauvel neural mass model based on the cellular organization of the hippocampus. (A) Plain arrows: excitation. Red dashed arrow: fast somatic GABAergic inhibition and Black dashed arrow: slow GABAergic dendritic inhibition.

  With respect to these two parameters, Wendling and Chauvel model features, similarly to Jansen and Rit, the following bifurcations: a saddle-node and a Hopf bifurcation manifolds, a cusp, a Bautin bifurcation and a codimension three bifurcation: a degenerate Bogdanov-Takens bifurcation, similar to the one observed in Jansen and Rit model when varying the parameter α 2 . Figure17displays the corresponding bifurcation diagram which is split into four zones labelled from A to D. This provides a partition of the parameter space such that for each fixed j in a given zone, Wendling and Chauvel system presents the same bifurcation diagram as the input P varies. These bifurcation diagrams are plotted in subfigures (b), (c) and (d) corresponding to the non-trivial behaviors, and are described now.

Figure 17 :

 17 Figure 17: Bifurcations of the Wendling and Chauvel model with respect to the parameters P and j. The other parameters are set to the values in table6. We observe a saddle-node bifurcation manifold (plain black curve), a Hopf bifurcation manifold (plain blue curve), a fold bifurcation of limit cycles manifold (plain orange curve), a Bautin bifurcation, and a codimension three degenerate Bogdanov-Takens bifurcation (DBT).

Figure 19 :

 19 Figure 19: Where the maximum of the imaginary part of the eigenvalues is reached determines the values of the parameters where the model features fast onset activity.

  P = 6: periods of the cycles (c) P = 6: Codimension 2 bifurcation diagram with respect to G 1 and G 2 .

Figure 20 :

 20 Figure20: Behaviours and bifurcations in Wendling and Chauvel model as a function of the PSP amplitude parameters enjoy a similar (but distorted through a change of variable) qualitative structure to that reported in[START_REF] Wendling | Transition to Ictal Activity in Temporal Lobe Epilepsy: Insights from Macroscopic Models[END_REF] (see text). (a) and (b): Blue curves correspond to fixed points, purple curve to extremal values of limit cyles. (c): red curve corresponds to a saddle-node curve, blue curves to Hopf bifurcations. The narrowband activity is determined through the continuation of the fold of limit cycles, and is here approximately continued because of the unstability of the numerical computations of this zone.

  oped in the main text greatly simplified the qualitative and quantitative discussion of the various zones in parameters space where different neuronal behaviors are predicted to occur. It should be clear by now that the mathematical approach proposed in this article comes as a nice complement to the analysis of the results of extensive simulations performed on the system of differential equations describing the neural mass model for many different inputs and many values of the parameters: it predicts precisely what should happen and for which values of the input and parameters.

Table 1 :

 1 Numerical values used in Jansen and Rit original model.

		Interpretation	Value
	A	Average excitatory synaptic gain	3.25mV
	B	Average inhibitory synaptic gain	22mV
	1/a	Time constant of excitatory PSP	10ms
	1/b	Time constant of inhibitory PSP	20ms
	α 1 , α 2	Average probability of synaptic contacts in the	α 1 = 1, α 2 = 0.8
		feedback excitatory loop
	α 3 , α 4	Average probability of synaptic contacts in the	α 3 = α 4 = 0.25
		slow feedback inhibitory loop
	J	Average number of synapses between populations 135
	v 0	Parameters of the Sigmoid (amplitude)	6mV
	ν max	(threshold)	5 s -1
	r	(slope)	0.56mV -1
	Introducing the time derivatives y 3 , y 4 and y 5 of, respectively, y 0 , y 1 and y 2 , and
	using a change of variable (as defined below), the resulting model can be written
	as a set of six dimensionless first-order ordinary differential equations, governed
	by, as announced, 9 dimensionless parameters. This model is simpler and captures
	the essential dynamics of the variables. It is the one we use for our analysis in the

Table 3 :

 3 The EEG-Neural Mass dictionary: EEG behavior in relation with dynamical systems properties and bifurcations generically related to such properties, when relevant.

Table 4 .

 4

	Point C	BT	H2	S	E	GH	H1	CLC
	j	5.38 10.05 12.10 12.10 12.38 12.48 12.55 12.93
	P	-0.29 -3.07 0.10 1.98 1.21 -2.58 -3.10 3.75

Table 4 :

 4 (j, P ) coordinates of the different points of interest of the Jansen and Rit bifurcation diagram of figure Fig. 4.

Table 5 :

 5 Forthis reason, we chose not to display the different behavior zones to increase legibility. The bifurcations diagrams for parameters α 1 and α 3 are not particularly interesting for this study and are omitted. (G, P ) coordinates of the different bifurcation and special points of the Jansen and Rit model.

	Point BT	H2	S	E	GH	H1	CLC C
	G	3.06 4.27 4.27 4.85 5.07 5.23 5.69 20.51
	P	-4.53 1.05 1.06 -0.43 -1.34 -1.78 3.12 7.29

Table 6 :

 6 Parameters interpretations and values of the extended model proposed byWendling and Chauvel (see

	Parameter Interpretation

Note that classically, the heuristic way to see the excitatory feedback consists in considering a virtual excitatory population of neurons

It can be also seen as an approximation of a constant level of inhibitory input on pyrami- dal neurons, though in the cortex, this inhibition is normally mediated by interneurons whose synapses do not have exactly the same properties as excitatory ones.

Acknowledgments

The authors warmly acknowledge François Grimbert for interesting discussions and insights on Jansen and Rit model. This work was partially funded by the ERC advanced grant NerVi number 227747.

A Numerical Methods for Bifurcations

In this appendix we present a numerical algorithm to compute formally or numerically local bifurcations for vector fields implemented in Maple R . This algorithm is based on the closed form formulations for genericity and transversality conditions given in textbooks such as [START_REF] Guckenheimer | Nonlinear Oscillations, Dynamical Systems and Bifurcations of Vector Fields[END_REF]; [START_REF] Kuznetsov | Elements of Applied Bifurcation Theory[END_REF].

We present the main features of the algorithm in the first section, and then apply this algorithm to compute codimension two bifurcations for Jansen and Rit neural mass model. Bifurcations of cycles were computed using the MatCont package of Matlab R implemented by Kuznetsov and collaborators (Dhooge et al., 2003b,a).

A.1 Solver of equations

For our numerical analysis, we implemented a precise and efficient solver of equations based on dichotomy. This algorithm controls the precision of the solution we are searching for, and is way faster than the native fsolve Maple application.

A.2 Saddle-node bifurcation manifold

We recall that given a dynamical system of the type ẋ = f (µ, x) for x ∈ Ê n and µ ∈ Ê, the systems undergoes a saddle-node bifurcation at the equilibrium x = x 0 , µ = µ 0 if and only if the following three conditions are satisfied (see e.g. (Guckenheimer and Holmes, 1983, Theorem 3.4.1.)): (SN1). D x f (µ 0 , x 0 ) has a simple 0 eigenvalue. Denote by v (resp w) the unit norm right (resp. left)corresponding eigenvector.

The algorithm we use to identify the saddle-node bifurcation manifold is a straightforward application of this theorem, and consists in:

• (1) solving the implicit equation det(D x f (µ 0 , x 0 )) = 0 on the fixed-points manifold. We thereby obtain the equilibria where the Jacobian determinant vanishes, i.e. where there is at least one zero eigenvalue.

(H1). D x f (x 0 , µ 0 ) has a simple pair of purely imaginary eigenvalues and no other eigenvalues with zero real part. Denote by λ(µ) the eigenvalue which is purely imaginary at µ 0 .

(H2). l 1 (x 0 , µ 0 ) = 0 where l 1 is the first Lyapunov exponent.

In this case, checking condition (H1) is not as easy as condition (SN1). Different methods are available in order to compute Hopf bifurcation points (see Guckenheimer et al. (1996); Guckenheimer and Myers (1996)). Our algorithm is based on computing the bialternate product of the Jacobian matrix of the system 2 J(j, P ) ⊙ Id where Id is the identity matrix. Its eigenvalues are the sums λ i + λ j where λ i and λ j are eigenvalues of the initial matrix J(j, P )). This implies that its determinant vanishes if and only if the Jacobian matrix has two eigenvalues adding up to zero. Therefore at these points where the bialternate product vanishes we have to check that there exists a purely imaginary eigenvalue to avoid cases where the system has two real opposed eigenvalues. Even with this step, the bialternate product method is way more efficient than other methods based on the characteristic polynomial such as Kubicek's method [START_REF] Kubicek | Algorithm for Evaluation of Complex Bifurcation Points in Ordinary Differential Equations[END_REF].

A.6 Bautin bifurcation

If along the line of the Hopf bifurcations the first Lyapunov coefficient vanishes and a subcritical Hopf bifurcation becomes supercritical when changing the parameters, under the differential conditions of (Kuznetsov, 1998, theorem 8.2), the system undergoes a Bautin bifurcation. At the points where the first Lyapunov coefficient vanishes, the algorithm numerically checks these conditions.

A.7 Application to Jansen and Rit model

We now apply this algorithm to Jansen and Rit model. We start by identifying the fixed points and studying their stability before searching for bifurcations. [START_REF] Houser | Vulnerability and plasticity of the gaba system in the pilocarpine model of spontaneous recurrent seizures[END_REF], and introduce two different interconnection types between interneurons and pyramidal neurons. They indeed distinguish the dynamics of the fast somatic inhibition related to direct projections of the interneurons on the soma of pyramidal cells, and the slow dendritic inhibition which is already taken into account in Jansen and Rit model. The typical architecture of the neural mass is shown in Figure 16. The distinction between the two types of interneuron projections can be analytically taken into account by introducing an artificial additional population of interneurons (see Figure 16). This population satisfies the same equation as the dendritic interneurons, with the distinction that somatic projections are characterized by a faster rising post-synaptic potential function h f (t) = C c e -c t . This yields equations similar to those of Jansen and Rit, with some additional parameters which were fitted using experimental data in [START_REF] Wendling | Transition to Ictal Activity in Temporal Lobe Epilepsy: Insights from Macroscopic Models[END_REF] and are provided in Table 6. These equations can be written in a dimensionless manner as follows:

In these equations, the parameters j, P and the sigmoid function S(x) are the same as those in the Jansen and Rit model and are described in the main text.