Nikolaos Vardalakis

Amélie Aussel

Nicolas P Rougier

Fabien B Wagner
email: fabien.wagner@u-bordeaux.fr

A dynamical computational model of theta generation in hippocampal circuits to study theta-gamma oscillations during neurostimulation

Neurostimulation of the hippocampal formation has shown promising results for modulating memory but the underlying mechanisms remain unclear. In particular, the effects on hippocampal theta-nested gamma oscillations and theta phase reset, which are both crucial for memory processes, are unknown. Moreover, these effects cannot be investigated using current computational models, which consider theta oscillations with a fixed amplitude and phase velocity. Here, we developed a novel computational model that includes the medial septum, represented as a set of abstract Kuramoto oscillators producing a dynamical theta rhythm with phase reset, and the hippocampal formation, composed of biophysically-realistic neurons and able to generate theta-nested gamma oscillations under theta drive. We showed that, for theta inputs just below the threshold to induce self-sustained theta-nested gamma oscillations, a single stimulation pulse could switch the network behavior from non-oscillatory to a state producing sustained oscillations. Next, we demonstrated that, for a weaker theta input, pulse train stimulation at the theta frequency could transiently restore seemingly physiological oscillations.

Importantly, the presence of phase reset influenced whether these two effects depended on the phase at which stimulation onset was delivered, which has practical implications for designing neurostimulation protocols that are triggered by the phase of ongoing theta oscillations. This novel model opens new avenues for studying the effects of neurostimulation on the hippocampal formation. Furthermore, our hybrid approach that combines different levels of abstraction could be extended in future work to other neural circuits that produce dynamical brain rhythms.

Introduction

Neurostimulation methods have emerged as promising therapeutic modalities to restore neurological functions in a broad range of motor and cognitive disorders [START_REF] Gupta | Neuroprosthetics: from sensorimotor to cognitive disorders[END_REF]. In the context of learning and memory, deep brain stimulation (DBS) of the entorhinal area or hippocampus has been shown to either enhance [START_REF] Suthana | Memory Enhancement and Deep-Brain Stimulation of the Entorhinal Area[END_REF][START_REF] Suthana | Deep brain stimulation for enhancement of learning and memory[END_REF][START_REF] Titiz | Theta-burst microstimulation in the human entorhinal area improves memory specificity[END_REF][START_REF] Jun | Direct Stimulation of Human Hippocampus During Verbal Associative Encoding Enhances Subsequent Memory Recollection[END_REF] or disrupt [START_REF] Jacobs | Direct Electrical Stimulation of the Human Entorhinal Region and Hippocampus Impairs Memory[END_REF][START_REF] Goyal | Electrical Stimulation in Hippocampus and Entorhinal Cortex Impairs Spatial and Temporal Memory[END_REF][START_REF] Lozano | A Phase II Study of Fornix Deep Brain Stimulation in Mild Alzheimer's Disease[END_REF] memory encoding. These conflicting results may originate from differences in experimental protocols and from a poor understanding of their biophysical underpinnings. Among such mechanisms, the in-volvement of hippocampal theta oscillations (4-12 Hz) and their interactions with higher-frequency gamma oscillations (30-120 Hz) in memory-related processes has been reported in multiple studies [START_REF] Lisman | Recall of memory sequences by interaction of the dentate and CA3: A revised model of the phase precession[END_REF][START_REF] De Almeida | Memory retrieval time and memory capacity of the CA3 network: role of gamma frequency oscillations[END_REF][START_REF] Lega | Human hippocampal theta oscillations and the formation of episodic memories[END_REF][START_REF] Lin | Theta band power increases in the posterior hippocampus predict successful episodic memory encoding in humans[END_REF][START_REF] Malkov | Theta and gamma hippocampal-neocortical oscillations during the episodic-like memory test: Impairment in epileptogenic rats[END_REF][START_REF] Abbaspoor | Theta-and gamma-band oscillatory uncoupling in the macaque hippocampus[END_REF]. Moreover, the modulation of gamma oscillations by the phase of theta oscillations in hippocampal circuits, a phenomenon termed theta-gamma phase-amplitude coupling (PAC), correlates with the efficacy of memory encoding and retrieval [START_REF] Jensen | Cross-frequency coupling between neuronal oscillations[END_REF]Tort et al., 2009;Canolty and Knight, 2010;[START_REF] Axmacher | Cross-frequency coupling supports multi-item working memory in the human hippocampus[END_REF][START_REF] Fell | The role of phase synchronization in memory processes[END_REF][START_REF] Lisman | The Theta-Gamma Neural Code[END_REF][START_REF] Lega | Slow-Theta-to-Gamma Phase-Amplitude Coupling in Human Hippocampus Supports the Formation of New Episodic Memories[END_REF]. Experimental and computational work on the coupling between oscillatory rhythms has indicated that it originates from different neural architectures and correlates with a range of behavioral and cognitive functions, enabling the long-range synchronization of cortical areas and facilitating multi-item encoding in the context of memory [START_REF] Hyafil | Neural Cross-Frequency Coupling: Connecting Architectures, Mechanisms, and Functions[END_REF].

Neurostimulation protocols that affect these rhythms, such as theta burst stimulation [START_REF] Titiz | Theta-burst microstimulation in the human entorhinal area improves memory specificity[END_REF], have also been shown to optimally induce long-term potentiation (LTP) [START_REF] Larson | Theta-burst LTP[END_REF]. Another potential mechanism underlying the effect of hippocampal neurostimulation might be the reset of the phase of theta oscillations in response to exogenous inputs, such as a novel sensory input or a pulse of electrical stimulation applied to the fornix or perforant path (Buño et al., 1978;Williams and Givens, 2003). Theta phase reset is known to facilitate LTP [START_REF] Mccartney | Theta reset produces optimal conditions for long-term potentiation[END_REF] and naturally occurs during both encoding and retrieval of associative memories [START_REF] Kota | Hippocampal Theta Oscillations Support Successful Associative Memory Formation[END_REF]. In this context, the design of a computational model that replicates memoryrelated theta-gamma oscillations and theta phase reset is of uttermost importance to investigate the effects of electrical stimulation on the hippocampal formation and possibly optimize neurostimulation protocols for memory improvement.

Models of memory-related theta-gamma oscillations in the hippocampal formation have been developed across different resolution levels, ranging from abstract mean-field approaches (Traub et al., 1997;[START_REF] Onslow | A Canonical Circuit for Generating Phase-Amplitude Coupling[END_REF][START_REF] Segneri | Theta-Nested Gamma Oscillations in Next Generation Neural Mass Models[END_REF] to biophysically-realistic conductance-based models [START_REF] Lundqvist | Attractor dynamics in a modular network model of neocortex[END_REF][START_REF] Herman | Nested theta to gamma oscillations and precise spatiotemporal firing during memory retrieval in a simulated attractor network[END_REF][START_REF] Aussel | A detailed anatomical and mathematical model of the hippocampal formation for the generation of sharp-wave ripples and theta-nested gamma oscillations[END_REF]. Neural masses, which represent the mean activity of a neuronal population, can generate gamma oscillations through reciprocal interactions between an excitatory and inhibitory population (Traub et al., 1997;[START_REF] Onslow | A Canonical Circuit for Generating Phase-Amplitude Coupling[END_REF], or even using a self-projecting inhibitory population [START_REF] Segneri | Theta-Nested Gamma Oscillations in Next Generation Neural Mass Models[END_REF]. Under excitatory oscillatory input at theta frequencies, these models are capable of generating theta-nested gamma oscillations. Similarly, these oscillations can be observed in more complex models of the hippocampal formation composed of single-compartment excitatory and inhibitory neurons connected through conductance-based synapses following the Hodgkin-Huxley formalism [START_REF] Hodgkin | A quantitative description of membrane current and its application to conduction and excitation in nerve[END_REF], and driven by a fixed oscillatory theta input [START_REF] Aussel | A detailed anatomical and mathematical model of the hippocampal formation for the generation of sharp-wave ripples and theta-nested gamma oscillations[END_REF]. Theta-nested gamma oscillations also appear in multi-compartment models of prefrontal cortex activity during memory retrieval [START_REF] Lundqvist | Attractor dynamics in a modular network model of neocortex[END_REF][START_REF] Herman | Nested theta to gamma oscillations and precise spatiotemporal firing during memory retrieval in a simulated attractor network[END_REF]. Finally, several models have investigated the functional link between the hippocampal theta rhythm and memory processes, showing that encoding and retrieval occur at different phases within each theta cycle through phasic changes in neuronal activity and LTP (e.g., Hasselmo et al. (2002); Cutsuridis et al. (2010)).

In terms of neurostimulation, most computational work has focused on the mechanisms underlying DBS of the basal ganglia for motor disorders such as Parkinson's disease [START_REF] Rubin | High frequency stimulation of the subthalamic nucleus eliminates pathological thalamic rhythmicity in a computational model[END_REF][START_REF] Pirini | A computational modelling approach to investigate different targets in deep brain stimulation for Parkinson's disease[END_REF][START_REF] Mina | Modulation of epileptic activity by deep brain stimulation: a model-based study of frequency-dependent effects[END_REF][START_REF] Ebert | Coordinated reset stimulation in a large-scale model of the STN-GPe circuit[END_REF], peripheral nerve stimulation [START_REF] Rattay | Mechanisms of Electrical Stimulation with Neural Prostheses: Mechanisms in Electrical Stimulation[END_REF][START_REF] Kipping | A Computational Model of a Single Auditory Nerve Fiber for Electric-Acoustic Stimulation[END_REF], spinal cord stimulation [START_REF] Rattay | Epidural electrical stimulation of posterior structures of the human lumbosacral cord: 2. quantitative analysis by computer modeling[END_REF]Capogrosso et al., 2013), or has remained generic (Basu et al., 2018). However, models investigating neurostimulation of hippocampal circuits are scarce [START_REF] Hendrickson | A Million-Plus Neuron Model of the Hippocampal Dentate Gyrus: Critical Role for Topography in Determining Spatiotemporal Network Dynamics[END_REF]Bingham et al., 2018), and do not take into account the effects on theta-gamma oscillations. For example, a detailed multicompartment model of the rat dentate gyrus was able to replicate experimentally recorded local field potentials induced by different electrode placements and pulse amplitudes during stimulation of the perforant path (Bingham et al., 2018). To model the impact of neurostimulation on neuronal oscillations, a more abstract formalism based on Kuramoto phase oscillators (Kuramoto, 1984) has been introduced in the context of Parkinson's disease and essential tremor, which enabled the de-sign of novel neurostimulation paradigms that enhance or disrupt neuronal synchrony in basal ganglia circuits [START_REF] Tass | A model of desynchronizing deep brain stimulation with a demand-controlled coordinated reset of neural subpopulations[END_REF][START_REF] Ebert | Coordinated reset stimulation in a large-scale model of the STN-GPe circuit[END_REF][START_REF] Asllani | A minimally invasive neurostimulation method for controlling abnormal synchronisation in the neuronal activity[END_REF]Weerasinghe et al., 2019).

To our knowledge, there is currently no model of the hippocampal formation that is able to replicate both theta-gamma PAC and theta phase reset during neurostimulation. To investigate the effects of neurostimulation on hippocampal circuits while taking into account these two mechanisms, we modified an existing biophysical model of the hippocampal formation [START_REF] Aussel | A detailed anatomical and mathematical model of the hippocampal formation for the generation of sharp-wave ripples and theta-nested gamma oscillations[END_REF]. In this original model, however, the theta rhythm was considered as an oscillatory input of fixed amplitude and phase velocity, which is inconsistent with theta phase reset. To circumvent this limitation, we combined this biophysical model with abstract Kuramoto oscillators that acted as a dynamical source of theta rhythm, thereby modeling medial septum inputs to the hippocampal formation. This new hybrid dynamical model could generate both theta-nested gamma oscillations and theta phase reset, following a particular phase response curve (PRC) inspired by experimental literature [START_REF] Lengyel | Matching storage and recall: hippocampal spike timing-dependent plasticity and phase response curves[END_REF][START_REF] Akam | Oscillatory dynamics in the hippocampus support dentate gyrus-CA3 coupling[END_REF]Torben-Nielsen et al., 2010).

We then leveraged this model to explore the effect of single-pulse and pulse-train stimulation on theta-gamma oscillations. In the absence of theta input from the medial septum, single-pulse stimulation produced a transient effect consisting of one or several bursts of activity, depending on stimulation amplitude. The presence of multiple bursts depended on the single-cell calcium dynamics and M-type potassium adaptation current. In the presence of weak theta input, designed to mimic a pathological state that impairs theta-gamma oscillations, single-pulse stimulation could produce long-lasting or even persistent activity by switching the network to a highly synchronized state characterized by theta-nested gamma oscillations. When phase reset was not included in the model, this effect was more pronounced when the stimulation pulse was delivered at the peak of the theta rhythm. However, when strong theta reset was considered, the phase at which stimulation was delivered did not influence the outcome. In the presence of an even weaker theta input, mimicking a pathological state that completely abolishes theta-gamma oscillations, only pulse train stimulation could restore physiological theta-gamma oscillations during the stimulation period. As for the previous results, this effect was phase-dependent only when theta reset was not included.

These results provide a new framework to interpret neurostimulation interventions that interfere with hippocampal oscillations and aim at improving memory function. It can be further extended to investigate the effects of more complex neurostimulation protocols, and the impact of stimulation location and amplitude on the observed network dynamics.

Results

A computational model of the hippocampal formation with dynamical theta input

We first developed a computational model of hippocampal circuits, able to generate both thetanested gamma oscillations and theta phase reset. To achieve this, we combined an existing conductance-based model of the hippocampal formation [START_REF] Aussel | A detailed anatomical and mathematical model of the hippocampal formation for the generation of sharp-wave ripples and theta-nested gamma oscillations[END_REF] with a set of Kuramoto phase oscillators (Kuramoto, 1984) that were used to model the dynamical theta input originating from pacemaker neurons in the medial septum (Wang, 2002) (Figure 1A). Such ensembles of oscillators are designed to exhibit a strong phase reset of their collective rhythm in response to a perturbation [START_REF] Levnajić | Phase resetting of collective rhythm in ensembles of oscillators[END_REF]. The hippocampal model contained excitatory and inhibitory neuronal populations in the entorhinal cortex (EC), dentate gyrus (DG), CA3 and CA1 fields within a coronal slice of the human hippocampus (Figure 1B-C). The output of the hippocampal formation (i.e., the activity of CA1 pyramidal neurons) was provided as an input to the Kuramoto oscillators, simulating the hippocampal-septal projections through the fornix (Williams and Givens, 2003;[START_REF] Nuñez | The Theta Rhythm of the Hippocampus: From Neuronal and Circuit Mechanisms to Behavior[END_REF][START_REF] Takeuchi | The Medial Septum as a Potential Target for Treating Brain Disorders Associated With Oscillopathies[END_REF]. The oscillations produced by the collective behavior of Kuramoto oscillators represented a population average of their activity: highly synchronized and desynchronized states generated respectively high and low amplitude theta oscillations (Figure 1D). The number of oscillators was chosen so that their synchronization level (i.e., their order parameter) and their frequency distribution were sufficiently close to their asymptotic behavior for a large number of oscillators (Figure S1).

Biologically, GABAergic neurons from the medial septum project to the EC, CA3, and CA1 fields of the hippocampus (Toth et al., 1993;[START_REF] Hajós | Modulation of septo-hippocampal 𝜃 activity by GABAA receptors: an experimental and computational approach[END_REF][START_REF] Manseau | The Hippocamposeptal Pathway Generates Rhythmic Firing of GABAergic Neurons in the Medial Septum and Diagonal Bands: An Investigation Using a Complete Septohippocampal Preparation In Vitro[END_REF][START_REF] Hangya | GABAergic neurons of the medial septum lead the hippocampal network during theta activity[END_REF]Unal et al., 2015;[START_REF] Müller | Septo-hippocampal interaction[END_REF]. Although the respective roles of these different projections are not fully understood, previous computational studies have suggested that the direct projection from the medial septum to CA1 is not essential for the production of theta in CA1 microcircuits [START_REF] Mysin | Phase relations of theta oscillations in a computer model of the hippocampal CA1 field: Key role of Schaffer collaterals[END_REF]. Since our modeling of the medial septum is only used to generate a dynamic theta rhythm, we opted for a simplified representation where the medial septum projects only to the EC, which in turn drives the different subfields of the hippocampus. In our model, Kuramoto oscillators are therefore connected to the EC neurons and they receive projections from CA1 neurons (see methods for more details).

From a conceptual point of view, our model is thus composed of excitatory-inhibitory (E-I) circuits connected in series, with a feedback loop going through a population of coupled phase oscillators. In the next sections, we first describe the generation of gamma oscillations by individual E-I circuits (Figure 2), and illustrate their behavior when driven by an oscillatory input such as theta oscillations (Figure 3). We then present a thorough characterization of the effects of theta input and stimulation amplitude on theta-nested gamma oscillations (Figure 4 and Figure 5). Finally, we present some results on the effects of neurostimulation protocols for restoring theta-nested gamma oscillations in pathological states (Figure 6 and Figure 7).

Generation of gamma oscillations by E-I circuits

It is well-established that a network of interconnected pyramidal neurons and interneurons can give rise to oscillations in the gamma range, a mechanism termed pyramidal-interneuronal network gamma (PING) (Traub et al., 2004;[START_REF] Onslow | A Canonical Circuit for Generating Phase-Amplitude Coupling[END_REF][START_REF] Segneri | Theta-Nested Gamma Oscillations in Next Generation Neural Mass Models[END_REF]. This mechanism has been observed in several optogenetic studies with gradually increasing light intensity (i.e., under a ramp input) affecting multiple different circuits, such as layer 2-3 pyramidal neurons of the mouse somatosensory cortex [START_REF] Adesnik | Lateral competition for cortical space by layer-specific horizontal circuits[END_REF], the CA3 field of the hippocampus in rat in vitro slices [START_REF] Akam | Oscillatory dynamics in the hippocampus support dentate gyrus-CA3 coupling[END_REF], and in the non-human primate motor cortex [START_REF] Lu | Optogenetically induced spatiotemporal gamma oscillations and neuronal spiking activity in primate motor cortex[END_REF].

In all cases, gamma oscillations emerged above a certain threshold in terms of photostimulation intensity, and the frequency of these oscillations was either stable or slightly increased when increasing the intensity further. We sought to replicate these findings with our elementary E-I circuits composed of single-compartment conductance-based neurons driven by a ramping input current (Figure 2 and Figure S2). As an example, all the results in this section will be shown for an E-I circuit that has similar connectivity parameters as the CA1 field of the hippocampus in our complete model (see section "Hippocampal formation: inputs and connectivity" in the methods).

For low input currents provided to both neuronal populations, only the highly-excitable interneurons were activated (Figure 2A). For a sufficiently high input current (i.e., a strong input that could overcome the inhibition from the fast-spiking interneurons), the pyramidal neurons started spiking as well. As the amplitude of the input increased, the activity of the both neuronal populations became synchronized in the gamma range, asymptotically reaching a frequency of about 60 Hz (Figure 2A bottom panel). Decoupling the populations led to the abolition of gamma oscillations (Figure 2B), as neuronal activity was determined solely by the intrinsic properties of each cell. Interestingly, when the ramp input was provided solely to the excitatory population, we observed that the activity of the pyramidal neurons preceded the activity of the inhibitory neurons, while still preserving the emergence of gamma oscillations (Figure S2A). As expected, decoupling the populations also abolished gamma oscillations, with the excitatory neurons spiking a frequency determined by their intrinsic properties and the inhibitory population remaining silent (Figure S2B).

To further characterize the intrinsic properties of individual inhibitory and excitatory neurons, we derived their input-frequency (I-F) curves, which represent the firing rate of individual neurons in response to a tonic input (Figure S3A). We observed that for certain input amplitudes, the firing rates of both types of neurons was within the gamma range. Interestingly, in the absence of noise, each population could generate by itself gamma oscillations that were purely driven by the input and determined by the intrinsic properties of the neurons (Figure S3B). Adding stochastic Gaussian noise in the membrane potential disrupted these artificial oscillations in decoupled populations (Figure S3C). All subsequent simulations were run with similar noise levels to prevent the emergence of artificial gamma oscillations.

Another potent way to induce gamma oscillations is to drive fast-spiking inhibitory neurons using pulsed optogenetic stimulation at gamma frequencies, a strategy that has been used both in the neocortex (Cardin et al., 2009) and hippocampal CA1 [START_REF] Iaccarino | Gamma frequency entrainment attenuates amyloid load and modifies microglia[END_REF]. In particular, Cardin and colleagues systematically investigated the effect of driving either excitatory or fastspiking inhibitory neocortical neurons at frequencies between 10 and 200 Hz (Cardin et al., 2009).

They showed that fast-spiking interneurons are preferentially entrained around 40-50 Hz, while excitatory neurons respond better to lower frequencies. To verify the behavior of our model against these experimental data, we simulated pulsed optogenetic stimulation as an intracellular current provided to our reduced model of a single E-I circuit. Stimulation was applied at frequencies between 10 and 200 Hz to excitatory cells only, to inhibitory cells only, or to both at the same time (Figure S4). The population firing rates were used as a proxy for the local field potentials (LFP), and we computed the relative power in a 10-Hz band centered around the stimulation frequency, similarly to the method proposed in (Cardin et al., 2009). When presented with continuous stimulation across a range of frequencies in the gamma range, interneurons showed the greatest degree of gamma power modulation (Figure S4). Furthermore, when the stimulation was delivered to the excitatory population, the relative power around the stimulation frequency dropped significantly in frequencies above 10 Hz, similar to the reported experimental data (Cardin et al., 2009). The main difference between our simulation results and these experimental data is the specific frequencies at which fast-spiking interneurons showed resonance, which was around 40 Hz in the mouse barrel cortex and around 90 Hz in our model, a fast gamma rhythm. This could be attributed to several factors, such as differences in the cellular properties between cortical and hippocampal fast-spiking interneurons, or the differences between the size of the populations and their relevant connectivity in the cortex and the hippocampus.

Theta-gamma oscillations and theta phase reset under dynamical theta input

Once we validated that our elementary E-I circuits were able to generate gamma oscillations under an input of sufficiently high amplitude, we studied the behavior of the whole model when the theta input was dynamically provided by the Kuramoto oscillators as described above (Figure 1). As in the original model [START_REF] Aussel | A detailed anatomical and mathematical model of the hippocampal formation for the generation of sharp-wave ripples and theta-nested gamma oscillations[END_REF], the input theta rhythm drove the network to produce spiking activity in the gamma range preferentially around the peak of theta in all excitatory and inhibitory populations (Figure 3A and Figure S5). Spectrograms of the CA1 population firing rates revealed that these bursts of activity around each theta peak were characterized by oscillations around 60 Hz (Figure 3A). This was confirmed by power spectral densities, which showed a clear peak at 4 Hz (corresponding to the theta drive) and increases in gamma band activity between 40 and 80 Hz (Figure 3B). To quantify PAC between theta and gamma oscillations, we used the modulation index (MI) (Tort et al., 2008(Tort et al., , 2010)), which has been shown to outperform other similar measures [START_REF] Hülsemann | Quantification of Phase-Amplitude Coupling in Neuronal Oscillations: Comparison of Phase-Locking Value, Mean Vector Length, Modulation Index, and Generalized-Linear-Modeling-Cross-Frequency-Coupling[END_REF]. However, we discovered that this metric would give erroneous results in our simulated datasets due to the absence of certain frequency components. To overcome this limitation and avoid artifacts, uniform noise was added to the firing rates prior to computing the MI (Figure S6). We first visualized the quantification of PAC using the comodulogram, which indicates the MI as a function of two frequencies corresponding to the modulating phase signal and the modulated amplitude signal. This analysis confirmed that gamma-band signals between 45 and 75 Hz were modulated by lower theta frequencies between 3 and 6 Hz, which we quantified by computing a global MI in frequency ranges encompassing theta (3-9 Hz) and gamma (40-80 Hz) (Figure S5B). To refine this analysis, we also computed a similar MI between the amplitude of various gamma frequencies and the phase of theta, which indicated that oscillations between 40 and 80 Hz occur preferentially around the peak of theta (Figure 3C and Figure S5B).

Next, we verified that our model was able to display theta phase reset during single-pulse stimulation (depolarizing pulse, 1-ms duration). This mechanism is tightly linked with the concept of PRC, which characterizes the phase delay or advancement that follows a single pulse delivered to an oscillatory system, as a function of the phase at which this input is delivered. Although there is no direct measurement of the PRC of septal neurons, such characterizations have been performed for individual pyramidal cells in the CA3 and CA1 fields of the hippocampus [START_REF] Lengyel | Matching storage and recall: hippocampal spike timing-dependent plasticity and phase response curves[END_REF][START_REF] Kwag | The timing of external input controls the sign of plasticity at local synapses[END_REF][START_REF] Akam | Oscillatory dynamics in the hippocampus support dentate gyrus-CA3 coupling[END_REF]. These PRCs appear biphasic and show a phase advancement (respectively delay) for stimuli delivered in the ascending (respectively descending) slope of theta. We modeled this behavior by a specific term (which we called the phase response function) in the general equation of the Kuramoto oscillators (see methods, Equation 1). Importantly, introducing a phase offset in the phase response function disrupted theta-nested gamma oscillations (Figure S7), which suggests that the septohippocampal circuitry must be critically tuned to be able to generate such oscillations. The strength of phase reset could also be adjusted by a gain that was manually tuned. In the presence of the physiological phase response function and of a sufficiently high reset gain, a single stimulation pulse delivered to all excitatory and inhibitory CA1 neurons could reset the phase of theta to a value close to its peaks (Figure 3A). We computed the PRC of our simulated data for different stimulation amplitudes and validated that our neuronal network behaved according to the phase response function set in our Kuramoto oscillators (Fig-

ure 3D

). It should be noted that including this phase reset mechanism affected the generated theta rhythm even in the absence of stimulation, extending the duration of the theta peak and thereby slowing down the frequency of the generated theta rhythm.

Importantly, our approach is generalizable and can be applied to other models producing thetanested gamma oscillations. For instance, we adapted the neural mass model by Onslow and colleagues [START_REF] Onslow | A Canonical Circuit for Generating Phase-Amplitude Coupling[END_REF], replaced the fixed theta input by a set of Kuramoto oscillators, and demonstrated that it could also generate theta phase reset in response to single-pulse stimulation (Figure S8). These results illustrate that the general behavior of our model is not specific to the tuning of individual parameters in the conductance-based neurons, but follows general rules that are captured by the level of abstraction of the Kuramoto formalism.

Overall, we successfully developed a new model of the hippocampal formation able to exhibit both theta-nested gamma oscillations and theta phase reset in response to stimulation. We then decided to explore further the effects of various stimulation protocols on its dynamics.

Effects of theta input and stimulation amplitudes on theta-gamma oscillations

We investigated the behavior of the model across multiple states of varying septal theta input amplitude in response to single-pulse stimulation delivered to CA1. In the absence of theta drive, a single stimulation pulse elicited either zero or two bursts of spiking activity (depending on stimulation amplitude) separated by about 200 ms (Figure 4A,C). We first sought to understand the origin of this second burst, as it showed that even a single pulse could induce transient periodic activity around 5 Hz in our model, a frequency within the theta range. A previous model has shown that the presence of Calcium-Activated Non-specific cationic (CAN) currents can lead to self-sustained theta oscillations in the hippocampus [START_REF] Giovannini | The CAN-In network: A biologically inspired model for selfsustained theta oscillations and memory maintenance in the hippocampus[END_REF]. Moreover, this study showed a direct link between the increased excitation provided by the CAN current and the spike-frequency adaptation properties of the M-current, directly affecting transitions from an asynchronous low-firing regime to synchronous bursting. We tested the role of the CAN current in the response to single-pulse stimulation by completely removing it from our simulations, which abolished the second burst of activity (Figure 4B). Moreover, the time interval separating the two bursts likely resulted from the interplay between the depolarizing CAN current and hyperpolarizing M current (Figure 4A).

In the presence of dynamic theta input, the effects of single-pulse stimulation depended both on theta input amplitude and stimulation amplitude, highlighting different regimes of network activity (Figure 5 and Figure S9, Figure S10, Figure S11). For low theta input, theta-nested gamma oscil-lations were initially absent and could not be induced by stimulation (Figure 5A). At most, the stimulation could only elicit a few bursts of spiking activity that faded away after approximately 250 ms, similar to the rebound of activity seen in the absence of theta drive. For increasing theta input, the network switched to an intermediate regime: upon initialization at a state with no spiking activity, it could be kicked to a state with self-sustained theta-nested gamma oscillations by a single stimulation pulse of sufficiently high amplitude (Figure 5B). This regime existed for a range of septal theta inputs located just below the threshold to induce self-sustained theta-gamma oscillations without additional stimulation, as characterized by the post-stimulation theta power, gamma power, and theta-gamma PAC (Figure 5D). Removing CAN currents from all areas of the model abolished this behavior Figure S12, which is interesting given the role of this current in the multistability of EC neurons [START_REF] Egorov | Graded persistent activity in entorhinal cortex neurons[END_REF][START_REF] Fransén | Mechanism of Graded Persistent Cellular Activity of Entorhinal Cortex Layer V Neurons[END_REF] and in the intrinsic ability of the hippocampus to generate theta-nested gamma oscillations [START_REF] Giovannini | The CAN-In network: A biologically inspired model for selfsustained theta oscillations and memory maintenance in the hippocampus[END_REF]. For the highest theta input, the network became able to spontaneously generate theta-nested gamma oscillations, even when initialized at a state with no spiking activity and without additional neurostimulation Figure 5C.

Neurostimulation for restoring theta-gamma oscillations in pathological states

Based on the above analyses, we considered two pathological states: one with a moderate theta input (i.e., moderately weak projections from the medial septum to the EC) that allowed the initiation of self-sustained oscillations by single stimulation pulses (Figure 5, point B), and one with a weaker theta input characterized by the complete absence of self-sustained oscillations even following transient stimulation (Figure 5, point A). In each case, we sought to assess whether single-pulse or pulse train stimulation could induce or restore theta-nested gamma oscillations and whether this effect depended on the phase at which stimulation was delivered (i.e., at the peak or trough of the theta cycle). We hypothesized that any possible phase relationship would also depend on the phase reset mechanism. To test this hypothesis, we ran a series of simulations using two different models: one without phase reset and one with strong phase reset (i.e., the reset gain was set at the value used in Figure 3).

In the case of a moderate theta input and in the presence of phase reset, delivering a pulse at either the peak or trough of theta could induce theta-nested gamma oscillations (Figure 6A and6C).

By contrast, in the absence of phase reset, only stimulation delivered at the peak of theta was able to induce such oscillations, after some time delay (Figure 6B,D). Quantification of these results in terms of theta power, gamma power, and theta-gamma PAC showed strongly similar responses between stimulation delivered at the peak or trough of theta with phase reset enabled, similar but weaker responses with stimulation delivered at the peak of theta with phase reset disabled, and no response in the case of trough stimulation with phase reset disabled (Figure 6E).

In the case of a weak theta input that completely abolished neuronal oscillations, we delivered stimulation pulses continuously at a frequency matching that of the underlying theta rhythm for a duration of 2 s, in order to restore physiological oscillations (Figure 7). The stimulation onset was timed to either the peak or trough of the ongoing theta cycle. The continuous delivery of pulses produced similar results as single-pulse stimulation. With phase reset, pulse train stimulation restored theta-nested gamma oscillations within the whole network, irrespective of the phase of stimulation onset (Figure 7A,C). Notably, stimulation delivered at the trough forced a reset of the phase of theta rhythm and led to the subsequent delivery of pulses at the peak of theta. Interestingly, in the absence of phase reset, peak-targeted stimulation induced theta-gamma oscillations in all network areas easily, while trough-targeted stimulation created artificial bursts that propagated in other areas with difficulty, requiring multiple pulses to achieve a fraction of the results of peak-targeted stimulation (Figure 6B,D). Comparing these simulations based on theta power, gamma power, and theta-gamma PAC within CA1 (Figure 7E) showed similar albeit less striking differences as single-pulse stimulation, possibly because CA1 was driven directly by the stimulation.

Notably, gamma power in the absence of theta phase reset, was higher when utilizing pulse trains.

These differences were even more pronounced in areas other than CA1, as can be seen by the gradual emergence of oscillations for trough stimulation without phase reset (Figure 7D).

Discussion

Highlights

In summary, we have developed a novel computational model to investigate the effects of electrical stimulation on a slice of the hippocampal formation, incorporating two important features related to memory: theta-nested gamma oscillations and theta phase reset. The key innovation compared to previous models (e.g., Aussel et al. (2018)) is the introduction of a set of abstract Kuramoto oscillators, which represent pacemaker neurons in the medial septum and are interfaced with biophysically realistic neuronal models in the hippocampus. From a methodological point of view, this hybrid interfacing between two levels of abstraction represents an innovation in itself and could be applied to other systems or brain structures that are driven by dynamical rhythms.

The main outcomes reported here relate to the importance of the theta reset mechanism when examining the effects of neurostimulation on hippocampal oscillations.

A very interesting finding concerns the behavior of the model in response to single-pulse stimulation for certain values of the theta amplitude (Figure 5). For low theta amplitudes, a single stimulation pulse was capable of switching the network behavior from a state with no spiking activity to one with prominent theta-nested gamma oscillations. Whether such an effect can be induced in vivo in the context of memory processes remains an open question. Nevertheless, delivering a single stimulation pulse bilaterally to the human hippocampus during a memory task is sufficient to impair memory encoding [START_REF] Lacruz | Single pulse electrical stimulation of the hippocampus is sufficient to impair human episodic memory[END_REF], suggesting that even single-pulse stimulation can indeed have wide network effects that are behaviorally relevant.

The second main finding is that the timing of individual stimulation pulses with respect to the phase of the ongoing theta rhythm matters differently depending on the presence or absence of phase reset (Figure 6 and Figure 7). Human intracranial stimulation data indicate that the receptivity of hippocampal circuits to single-pulse stimulation is modulated by the phase of theta [START_REF] Lurie | Human hippocampal responses to network intracranial stimulation vary with theta phase[END_REF]. A number of studies have also reported conflicting results in terms of memory outcomes, which could potentially be attributed to the induction of phase reset through stimulation [START_REF] Suthana | Memory Enhancement and Deep-Brain Stimulation of the Entorhinal Area[END_REF][START_REF] Jacobs | Direct Electrical Stimulation of the Human Entorhinal Region and Hippocampus Impairs Memory[END_REF]. To our knowledge, however, the degree of phase reset that follows each stimulation pulse remains unknown and should be investigated in future experimental studies. From a technological point of view, the two regimes with and without phase reset have opposite predictions concerning the need for closed-loop stimulation protocols that would trigger stimulation in real-time based on the phase of ongoing theta oscillations. Such phasetriggered stimulation would be most useful if the phase reset mechanism remains relatively limited.

When this mechanism becomes too strong, regular continuous stimulation appears sufficient to restore physiological theta-gamma oscillations (Figure 7).

It should also be noted that the reset gain in our simulations (Equation 1, gain 𝐺 𝑟𝑒𝑠𝑒𝑡 ) was either completely turned off or set at a high value, producing a strong effect that always reset the phase of theta to its peak. In reality, the degree of theta phase reset is dynamic, depending on the environment and associated task requirements [START_REF] Rizzuto | Reset of human neocortical oscillations during a working memory task[END_REF][START_REF] Mormann | Phase/amplitude reset and theta-gamma interaction in the human medial temporal lobe during a continuous word recognition memory task[END_REF][START_REF] Jackson | Median Raphe Stimulation Disrupts Hippocampal Theta Via Rapid Inhibition and State-Dependent Phase Reset of Theta-Related Neural Circuitry[END_REF], and may be affected by neurodegenerative disorders that affect the connections between the hippocampal formation and the medial septum. Importantly, our proposed framework can simulate intermediate values of the reset gain, which should ideally be fitted to experimental data in future applications.

Finally, we modeled pathological states by reducing the maximum amplitude of the theta input (Equation 2, gain 𝐺 𝜃 ) until theta-nested gamma oscillations were impaired or even abolished (Figure 5). This choice was meant to simulate neurodegeneration in the medial septum, which is known to be affected in Alzheimer's disease, leading to oscillatory disruptions [START_REF] Nelson | Noradrenergic Sympathetic Sprouting and Cholinergic Reinnervation Maintains Non-Amyloidogenic Processing of A𝛽PP[END_REF][START_REF] Hampel | The cholinergic system in the pathophysiology and treatment of Alzheimer's disease[END_REF][START_REF] Takeuchi | The Medial Septum as a Potential Target for Treating Brain Disorders Associated With Oscillopathies[END_REF]. Another possibility would be that neurodegeneration limits the ability of the septal pacemaker neurons to synchronize, thus producing a weaker col-lective theta rhythm without affecting the maximum amplitude of individual oscillators. Although we simulated this change in our model by reducing the synchronization parameter, the effects on hippocampal oscillations were less pronounced (Figure S12). Linking these different modeling parameters to experimental biomarkers will be important in future work.

Limitations

Even though we took great care in developing a precise representation of the hippocampal formation, the resulting model remains a simplification that could be further enriched. In particular, we deliberately modeled only a single theta generator, while multiple intra-and extra-hippocampal generators are known to co-exist [START_REF] Kocsis | Interdependence of Multiple Theta Generators in the Hippocampus: a Partial Coherence Analysis[END_REF][START_REF] Hummos | An integrative model of the intrinsic hippocampal theta rhythm[END_REF]. We decided to model septal pacemaker neurons projecting to the EC as the main source of hippocampal theta as reported in multiple experimental studies (Buzsáki, 2002;Buzsáki et al., 2003;[START_REF] Hangya | GABAergic neurons of the medial septum lead the hippocampal network during theta activity[END_REF]Colgin, 2013). However, experimental findings and previous models have also proposed that direct septal inputs are not essential for theta generation (Wang, 2002;Colgin, 2013;[START_REF] Mysin | Phase relations of theta oscillations in a computer model of the hippocampal CA1 field: Key role of Schaffer collaterals[END_REF], but play an important role in phase synchronization of hippocampal neurons. Furthermore, the model does not account for the connections between the lateral and medial septum and the hippocampus [START_REF] Takeuchi | The Medial Septum as a Potential Target for Treating Brain Disorders Associated With Oscillopathies[END_REF]. These connections include the inhibitory projections from the lateral to the medial septum and the monosynaptic projections from the hippocampal CA3 field to the lateral septum. An experimental study has highlighted the importance of the lateral septum in regulating the hippocampal theta rhythm Bender et al. (2015), an area that has not been included in the model. Specifically, theta-rhythmic optogenetic stimulation of the axonal projections from the lateral septum to the hippocampus was shown to entrain theta oscillations and lead to behavioral changes during exploration in transgenic mice. To account for these discrepancies, our model could be extended by considering more realistic connectivity patterns between the medial / lateral septum and the hippocampal formation, including glutamatergic, cholinergic, and GABAergic reciprocal connections [START_REF] Müller | Septo-hippocampal interaction[END_REF], or by considering multiple sets of oscillators each representing one theta generator.

In terms of neuronal cell types, we also made an important simplification by considering only basket cells as the main class of inhibitory interneuron in the whole hippocampal formation. However, it should be noted that many other types of interneurons exist in the hippocampus and have been modeled in various works with higher computational complexity (e. Another limitation of our model concerns synaptic transmission delays, which have been largely neglected and could affect the phase relationships between the medial septum and different hippocampal subfields. Experimental studies have indeed reported time delays in the population activities of connected anatomical structures (i.e., from EC to DG) [START_REF] Mizuseki | Theta Oscillations Provide Temporal Windows for Local Circuit Computation in the Entorhinal-Hippocampal Loop[END_REF], with pyramidal cells in downstream areas like CA3 and CA1 preferentially firing at different phases of theta [START_REF] Dragoi | Temporal encoding of place sequences by hippocampal cell assemblies[END_REF]. Propagation effects could also depend on the spatial scale of the model.

We also decided to represent only a thin coronal slice of the hippocampal formation, and it remains unclear how an anatomically-accurate model of the whole structure would behave in terms of propagation of spontaneous and electrically-induced neuronal activity. Importantly, we did not consider learning through synaptic plasticity, even though such mechanisms could drastically modify synaptic conduction for the whole network (Borges et al., 2017).

Even more interestingly, the inclusion of spike-timing-dependent plasticity would enable the inves-tigation of stimulation protocols aimed at promoting LTP, such as theta-burst stimulation [START_REF] Larson | Theta-burst LTP[END_REF]. This aspect would be of uttermost importance to make a link with memory encoding and retrieval processes [START_REF] Axmacher | Memory formation by neuronal synchronization[END_REF]Tsanov and Manahan-Vaughan, 2009;[START_REF] Jutras | Oscillatory activity in the monkey hippocampus during visual exploration and memory formation[END_REF] and with neurostimulation studies for memory improvement [START_REF] Titiz | Theta-burst microstimulation in the human entorhinal area improves memory specificity[END_REF][START_REF] Solomon | Thetaburst stimulation entrains frequency-specific oscillatory responses[END_REF].

From the point of view of neurostimulation, future work is needed to extend the current model to a multi-compartment representation of neurites, since axons are known to be preferentially activated by extracellular electrical stimulation [START_REF] Rattay | Mechanisms of Electrical Stimulation with Neural Prostheses: Mechanisms in Electrical Stimulation[END_REF]. Specifically, multi-compartment cable models have been developed to investigate spike initiation and propagation by modeling the axon as a series of resistance-capacitance circuits following its trajectory [START_REF] Rattay | Mechanisms of Electrical Stimulation with Neural Prostheses: Mechanisms in Electrical Stimulation[END_REF][START_REF] Joucla | Modeling extracellular electrical neural stimulation: From basic understanding to MEAbased applications[END_REF][START_REF] Ashida | Spike-Conducting Integrate-and-Fire Model[END_REF]. These models are particularly suited to study the effects of extracellular stimulation, which are non-intuitive and depend as a first approximation on the second spatial derivative of the electrical potential along the cell membrane [START_REF] Rattay | Analysis of Models for External Stimulation of Axons[END_REF][START_REF] Rattay | Mechanisms of Electrical Stimulation with Neural Prostheses: Mechanisms in Electrical Stimulation[END_REF][START_REF] Mcintyre | Cellular effects of deep brain stimulation: model-based analysis of activation and inhibition[END_REF][START_REF] Rattay | Compartment models for the electrical stimulation of retinal bipolar cells[END_REF]. Here, we have modeled electrical stimulation as an intracellular current applied equally across all neurons in the targeted area, which is extremely simplified but enables computational tractability. Future developments will focus on developing an equivalent multicompartment model with realistic axonal trajectories while making sufficient simplifications to allow for realistic computation times.

Finally, we likened conditions of low theta input to pathological states characteristic of oscillopathies such as Alzheimer's disease, as these conditions disrupted all aspects of theta-gamma oscillations in our model: theta power, gamma power, and theta-gamma PAC Figure 5. However, it should be noted that changes in theta or gamma power in these pathologies are often unclear, and that the most consistent alteration that has been reported in Alzheimer's disease is a reduction of theta-gamma PAC (for review, see [START_REF] Kitchigina | Alterations of Coherent Theta and Gamma Network Oscillations as an Early Biomarker of Temporal Lobe Epilepsy and Alzheimer's Disease[END_REF]). Future work should explore the effects of cellular alterations intrinsic to the hippocampal formation and their impact on theta-gamma oscillations.

Outlook

Overall, this new model of the hippocampal formation represents a methodologically innovative basis to further explore multiple neurostimulation strategies that target hippocampal oscillations.

Moreover, the limitations discussed above represent important avenues for future refinements, which will require significant work to overcome the costs in terms of computational tractability (e.g., modeling the whole hippocampus, or using multicompartment models of axonal trajectories and dendritic trees). Ultimately, such model refinements should allow the investigation of the effects of extracellular stimulation using charge-balanced biphasic pulses and multipolar electrode configurations with realistic electrode geometries. Most importantly, we believe that our current work may also serve as an inspiration for future computational models of oscillopathies (not necessarily limited to the hippocampus), which could benefit from interfacing abstract sets of synchronizing oscillators and investigating their interactions with biophysically-realistic neurons.

Materials and Methods

Computational Model

Overall Architecture

We aimed to develop a computational model of the hippocampal formation that is able to generate theta-nested gamma oscillations and takes into account the dynamic nature of the theta input from the medial septum, i.e., the reset of the theta phase following strong activity in the perforant path or fornix (Buño et al., 1978;Williams and Givens, 2003). To this end, we adapted a previous biophysical model of the human hippocampal formation under fixed sinusoidal input [START_REF] Aussel | A detailed anatomical and mathematical model of the hippocampal formation for the generation of sharp-wave ripples and theta-nested gamma oscillations[END_REF] and interconnected it with an abstract representation of the medial septum, modeled as an assembly of Kuramoto oscillators (Kuramoto, 1984) (Figure 1).

More precisely, we modeled a 15-mm thick coronal slice of the hippocampal formation which comprises the DG, the CA3 and CA1 subfields of the hippocampus, and the EC, all populated with excitatory and inhibitory Hodgkin-Huxley neurons. For the medial septum, we opted for a simplified representation where the medial septum projects only to the EC, which in turn drives the different subfields of the hippocampus (see also L142-151). In our model, Kuramoto oscillators are therefore connected to the EC neurons and they receive projections from CA1 neurons (see sections below for more details).

Medial septum: Kuramoto Oscillators

The medial septum contains pacemaker neurons (Varga et al., 2008;[START_REF] Hangya | GABAergic neurons of the medial septum lead the hippocampal network during theta activity[END_REF] that synchronize with one another and generate a global theta rhythm. In turn, these pacemaker neurons drive downstream areas that receive projections from the medial septum. Here, we modeled the entire medial septum neuronal assembly as a set of coupled phase oscillators following the Kuramoto model (Kuramoto, 1984), which generated the driving theta rhythm that was provided to the hippocampal formation through the EC (Breakspear et al., 2010).

Kuramoto oscillators have also been used to investigate the effects of neurostimulation on synchronized brain rhythms in the context of Parkinson's disease or essential tremor [START_REF] Tass | A model of desynchronizing deep brain stimulation with a demand-controlled coordinated reset of neural subpopulations[END_REF]Weerasinghe et al., 2019). Here, each Kuramoto oscillator was described by its phase 𝜃 𝑖 , which evolves over time according to the following equation:

𝑑𝜃 𝑖 𝑑𝑡 = 𝜔 𝑖 + 𝑘 𝑁 𝑁 ∑ 𝑗=1 sin(𝜃 𝑗 -𝜃 𝑖 ) + 𝐺 𝑟𝑒𝑠𝑒𝑡 𝑋(𝑡)𝑍(𝜃 𝑖 ) (1)
The term 𝜔 𝑖 denotes the natural frequency of oscillator 𝑖, and is normally distributed around the The coherence and phase of the driving theta rhythm 𝐼 𝜃 were computed using the order parameter 𝑟 to extract the mean amplitude 𝐴 and the mean phase 𝜙 of the ensemble of Kuramoto oscillators as follows:

⎧ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎩ 𝑟(𝑡) = 1 𝑁 𝑁 ∑ 𝑖=1 𝑒 𝑗 𝜃 𝑖 (𝑡) 𝐴(𝑡) = Re(𝑟) 𝜙(𝑡) = Im(𝑟) 𝐼 𝜃 (𝑡) = 𝐺 𝜃 𝐴(𝑡) cos(𝜙(𝑡))+1 2 (2)
where the mean amplitude 𝐴(𝑡) and the mean phase 𝜙(𝑡) are derived by taking the real and imaginary part of the order parameter respectively, and the output theta rhythm 𝐼 𝜃 (𝑡) is a rectified cosine, multiplied by a gain 𝐺 𝜃 that controls the maximum output amplitude (in nA).

To simulate the effect of the projections from CA1 to the medial septum on the phase of the oscillators, an approximation of the instantaneous firing rate of the CA1 excitatory population was used as the term 𝑋(𝑡). To obtain the instantaneous firing rate, we convolved the CA1 population spike train with an exponential kernel using the following equations:

⎧ ⎪ ⎨ ⎪ ⎩ 𝑑𝑋 𝑑𝑡 = -𝑋 𝜏 𝐹 𝑅 𝑋 𝑡+1 = 𝑋 𝑡 + 1 𝑁 𝜏 𝐹 𝑅 , ∀ 𝑡 ∈ 𝑡 𝑆
(3) where 𝑡 𝑆 denotes the ordered set of the spike timings, and 𝜏 𝐹 𝑅 determines the exponential decay of the kernel, which was set to 10 ms to compute population activity (for single neurons, a typical value is 100 ms) [START_REF] Gerstner | Neuronal Dynamics: From Single Neurons to Networks and Models of Cognition[END_REF].

Hereafter, we call the term 𝑍(𝜃) the phase response function, to distinguish it from the PRC obtained from experimental data or simulations (see section below "Data Analysis", "Phase Response

Curve"). Briefly, the PRC of an oscillatory system indicates the phase delay or advancement that follows a single pulse, as a function of the phase at which this input is delivered. The phase response function 𝑍(𝜃) was chosen to mimic as well as possible experimental PRCs reported in the literature [START_REF] Lengyel | Matching storage and recall: hippocampal spike timing-dependent plasticity and phase response curves[END_REF][START_REF] Kwag | The timing of external input controls the sign of plasticity at local synapses[END_REF][START_REF] Akam | Oscillatory dynamics in the hippocampus support dentate gyrus-CA3 coupling[END_REF]. These PRCs appear biphasic and show a phase advancement (respectively delay) for stimuli delivered in the ascending (respectively descending) slope of theta. To accurately model this behavior, we used the following equation for the phase response function, where 𝜃 𝑝𝑒𝑎𝑘 represents the phase at which the theta rhythm reaches its maximum and the parameter 𝜙 𝑜𝑓 𝑓 𝑠𝑒𝑡 controls the desired phase offset from the peak:

𝑍(𝜃 𝑖 ) = -sin(𝜃 𝑖 -(𝜃 𝑝𝑒𝑎𝑘 + 𝜙 𝑜𝑓 𝑓 𝑠𝑒𝑡 )) (4)
An overview of the default parameters for the Kuramoto oscillators and the bidirectional connections between medial septum-hippocampal formation can be found in Table 1.

Hippocampal formation: Hodgkin-Huxley Neurons

The following sections describe in detail how individual neurons and synapses were modeled, and are adapted from the original work by Aussel and colleagues [START_REF] Aussel | A detailed anatomical and mathematical model of the hippocampal formation for the generation of sharp-wave ripples and theta-nested gamma oscillations[END_REF]. Neurons were modeled as conductance-based single compartments, following the Hodgkin-Huxley formalism [START_REF] Hodgkin | A quantitative description of membrane current and its application to conduction and excitation in nerve[END_REF], in line with previous work [START_REF] Aussel | Cell to network computational model of the epileptic human hippocampus suggests specific roles of network and channel dysfunctions in the ictal and interictal oscillations[END_REF][START_REF] Aussel | A detailed anatomical and mathematical model of the hippocampal formation for the generation of sharp-wave ripples and theta-nested gamma oscillations[END_REF]. The temporal evolution of the membrane potential of each neuron is described by a differential equation whose general form reads:

𝐶 𝑚 𝑑𝑉 𝑚 𝑑𝑡 = -𝐼 𝐿 - ∑ 𝑐ℎ𝑎𝑛𝑛𝑒𝑙 𝐼 𝑐ℎ𝑎𝑛𝑛𝑒𝑙 - ∑ 𝑗∈[𝐸,𝐼] 𝐼 𝑠𝑦𝑛 𝑗 + 𝐼 𝜃 + 𝐼 𝑠𝑡𝑖𝑚 + 𝜂 (5)
𝐼 𝐿 denotes the leakage current. 𝐼 𝑐ℎ𝑎𝑛𝑛𝑒𝑙 are currents associated with specific ion channels, namely potassium (𝐼 𝐾 ), fast sodium (𝐼 𝑁𝑎 ), and low-threshold calcium (𝐼 𝐶𝑎 ) currents, the CAN current (𝐼 𝐶𝐴𝑁 ) [START_REF] Giovannini | The CAN-In network: A biologically inspired model for selfsustained theta oscillations and memory maintenance in the hippocampus[END_REF], and the M-type potassium channel current (𝐼 𝑀 ) responsible for spike adaptation [START_REF] Kosenko | Coordinated signal integration at the M-type potassium channel upon muscarinic stimulation[END_REF][START_REF] Sun | M-type potassium channels modulate Schaffer collateral-CA1 glutamatergic synaptic transmission[END_REF][START_REF] Kwag | M-type potassium conductance controls the emergence of neural phase codes: a combined experimental and neuron modelling study[END_REF]. 𝐼 𝑠𝑦𝑛 represents the currents originating from synaptic inputs to the cell and can be either depolarizing (negative sign)

or hyperpolarizing (positive sign). 𝜂 is a Gaussian random noise term accounting for other external inputs and synaptic fluctuations. Theta input from the medial septum is modeled as a depolarizing current and is denoted by 𝐼 𝜃 , while electrical stimulation is denoted by 𝐼 𝑠𝑡𝑖𝑚 . Excitatory neurons represent pyramidal cells in EC, CA3, and CA1, and granule cells in DG. They were modeled with 𝐼 𝑁𝑎 , 𝐼 𝐾 , and 𝐼 𝐶𝑎 , and 𝐼 𝑀 currents, with the addition of 𝐼 𝐶𝐴𝑁 for pyramidal cells. Fast-spiking interneurons in all areas were modeled with 𝐼 𝑁𝑎 and 𝐼 𝐾 currents. The complete description for all of the above ionic channels and their corresponding currents can be found in [START_REF] Giovannini | The CAN-In network: A biologically inspired model for selfsustained theta oscillations and memory maintenance in the hippocampus[END_REF]. Leakage currents followed the following equation:

𝐼 𝐿 = (𝑔 𝐿 × 𝐴) × (𝑉 𝑚 -𝐸 𝐿 ) (6)
where 𝑔 𝐿 is the maximum leakage conductance, 𝐴 is the area of the single compartment corresponding to the membrane of a neuron, and 𝐸 𝐿 is the reversal potential of the leakage channel.

Channel currents 𝐼 𝐾 , 𝐼 𝑀 , 𝐼 𝐶𝐴𝑁 obey the following set of equations:

𝐼 𝐾 = 𝑔 𝐾 × 𝐴 × 𝑛 4 × (𝑉 𝑚 -𝐸 𝐾 ) 𝐼 𝑀 = 𝑔 𝑀 × 𝐴 × 𝑝 × (𝑉 𝑚 -𝐸 𝑀 ) 𝐼 𝐶𝐴𝑁 = 𝑔 𝐶𝐴𝑁 × 𝐴 × 𝑚 2 𝐶𝐴𝑁 × (𝑉 𝑚 -𝐸 𝐶𝐴𝑁 ) (7)
where 𝑔 𝐾 , 𝑔 𝑀 , 𝑔 𝐶𝐴𝑁 are the maximum conductances for the respective channel, and 𝑛, 𝑝, 𝑚 𝐶𝐴𝑁 are the respective gating variables defined by the following differential equations:

𝑑𝑛 𝑑𝑡 = 𝑛 ∞ -𝑛 𝜏 𝑛 𝑑𝑝 𝑑𝑡 = 𝑝 ∞ -𝑝 𝜏 𝑝 𝑑𝑚 𝐶𝐴𝑁 𝑑𝑡 = 𝑚 𝐶𝐴𝑁,∞ -𝑚 𝐶𝐴𝑁 𝜏 𝑚 𝐶𝐴𝑁 (8)
For the potassium and CAN currents, the steady-state values for their corresponding gating variables 𝑛 ∞ and 𝑚 𝐶𝐴𝑁,∞ and their corresponding time constants 𝜏 𝐾 and 𝜏 𝐶𝐴𝑁 depend on the following functions of the transition rate constants:

𝑛 ∞ = 𝛼 𝑛 𝛼 𝑛 + 𝛽 𝑛 𝑚 𝐶𝐴𝑁,∞ = 𝛼 𝑚 𝐶𝐴𝑁 𝛼 𝑚 𝐶𝐴𝑁 + 𝛽 𝑚 𝐶𝐴𝑁 𝜏 𝑛 = 0.2 𝛼 𝑛 + 𝛽 𝑛 𝜏 𝑚 𝐶𝐴𝑁 = 0.2 𝛼 𝑚 𝐶𝐴𝑁 + 𝛽 𝑚 𝐶𝐴𝑁 (9)
The sodium current (𝐼 𝑁𝑎 ) and calcium current (𝐼 𝐶𝑎 ) follow a similar set of equations:

𝐼 𝑁𝑎 = 𝑔 𝑁𝑎 × 𝐴 × 𝑚 3 × ℎ × (𝑉 𝑚 -𝐸 𝑁𝑎 ) 𝐼 𝐶𝑎 = 𝑔 𝐶𝑎 × 𝐴 × 𝑚 2 × ℎ × (𝑉 𝑚 -𝐸 𝐶𝑎 ) (10)
with two gating variables 𝑚 and ℎ defined by the following differential equations:

𝑑𝑚 𝑑𝑡 = 𝑛 ∞ -𝑛 𝜏 𝑛 𝑑𝑛 𝑑𝑡 = 𝑛 ∞ -𝑛 𝜏 𝑛 𝑚 ∞ = 𝛼 𝑚 𝛼 𝑚 + 𝛽 𝑚 ℎ ∞ = 𝛼 ℎ 𝛼 ℎ + 𝛽 ℎ 𝜏 𝑚 = 0.2 𝛼 𝑚 + 𝛽 𝑚 𝜏 ℎ = 0.2 𝛼 ℎ + 𝛽 ℎ (11)
The gating variable of 𝐼 𝐶𝐴𝑁 depends on the calcium concentration within the neuron ([𝐶𝑎] 2+ 𝑖 ), given by:

𝑑[𝐶𝑎] 2+ 𝑖 𝑑𝑡 = 𝛾(𝐼 𝐶𝑎 ) + ([𝐶𝑎] 2+ ∞ -[𝐶𝑎] 2+ 𝑖 𝜏 [𝐶𝑎] 2+ 𝛾(𝐼 𝐶𝑎 ) = -𝑘 𝑢 × 𝐼 𝐶𝑎 2 × 𝐹 × 𝑑 × 𝐴 (12)
where 𝜏 [𝐶𝑎] 2+ = 1𝑠 represents the rate of calcium removal from the cell, [𝐶𝑎] 2+ ∞ = 0.24 𝑚𝑜𝑙∕𝐿 is the calcium concentration if the calcium channel remains open for a duration of Δ𝑇 → ∞, 𝑘 𝑢 = 10 4 is a unit conversion constant, 𝐹 is the Faraday constant, and 𝑑 = 1 𝜇𝑚 is the depth at which the calcium is stored inside the cell. Noise (𝜂), accounting for random inputs to the network, was simulated as intracellular current acting on the membrane voltage and following the properties of a Gaussian random variable with a mean of 0 𝜇𝑉 and a standard deviation of 1000 𝜇𝑉 (𝜂 𝐸 ∼ 𝑁(0, 1000) 𝜇𝑉 ) for excitatory neurons and a mean of 0 𝜇𝑉 and standard deviation of 100 𝜇𝑉 (𝜂 𝐼 ∼ 𝑁(0, 100) 𝜇𝑉 ) for inhibitory neurons. The ratio of 1:10 between the noise terms was adapted from the original work and it accounts for the higher excitability of the inhibitory neurons as well as the E-I population size ratios.

The original model introduced some parameters representing the vigilance state (i.e., active wakefulness vs slow-wave sleep). However, the present model only focused on the state of active wakefulness, since this is when memory-related theta-nested gamma oscillations occur. For all simulations, the parameters were set so that the network operated in the wakefulness regime in a healthy hippocampus [START_REF] Aussel | A detailed anatomical and mathematical model of the hippocampal formation for the generation of sharp-wave ripples and theta-nested gamma oscillations[END_REF]. The full expressions for all the parameters defined above can be found in Table 2 for pyramidal cells and in Table 3 for interneurons.

𝑉 𝑚 +35 𝑚𝑉 1-𝑒 -0.1(𝑉 𝑚 +35 𝑚𝑉 ) 𝛽 𝑚,𝑁𝑎 4𝑒 -𝑉 𝑚 +60 𝑚𝑉 18 𝑚𝑉 𝛼 ℎ,𝑁𝑎 0.07𝑒 -𝑉 𝑚 +58 𝑚𝑉 20 𝑚𝑉 𝛽 ℎ,𝑁𝑎 1 1+𝑒 -0.1(𝑉 𝑚 +28 𝑚𝑉 )

Synaptic Models

Inter-neuronal interactions were modeled as instantaneous AMPA and GABA-A synapses using the synaptic currents 𝐼 𝑠𝑦𝑛 𝐸 and 𝐼 𝑠𝑦𝑛 𝐼 respectively. Synaptic currents were described by the following biexponential differential equations:

𝐼 𝑠𝑦𝑛 𝐼,𝐸 = 𝑔 𝐼,𝐸 (𝑉 𝑚 -𝐸 𝐼,𝐸 ) 𝑑𝑔 𝐼,𝐸 𝑑𝑡 = 1 𝜏 𝑔 𝐼,𝐸 (-𝑔 𝐼,𝐸 + ℎ 𝐼,𝐸 ) 𝑑ℎ 𝐼,𝐸 𝑑𝑡 = -ℎ 𝐼,𝐸 1 𝜏 ℎ 𝐼,𝐸 (13)
where 𝐸 𝐼,𝐸 are the synaptic resting potentials, and 𝜏 𝑔 𝐼,𝐸 and 𝜏 ℎ 𝐼,𝐸 are the synaptic time constants of rise and decay for inhibitory and excitatory neurons respectively. The occurrence of a pre-synaptic spike leads to an increase of the values ℎ 𝐼 or ℎ 𝐸 in the post-synaptic neuron by a fixed amount, which depends on the type of synapse and the region (due to the presence of cholinergic effects described in the initial model). Specific values for the intra-area and inter-area synaptic connections are given in Table 4 and Table 5 respectively. (2018). The ratio between pyramidal neurons and interneurons was kept as a ratio of 10:1 for all areas except the dentate gyrus, where the ratio was 100:1.

The number of neurons per subfield of the hippocampal formation is summarized in Table 6. A two-dimensional simplified image depicting a coronal slice of the hippocampal formation [START_REF] Aussel | A detailed anatomical and mathematical model of the hippocampal formation for the generation of sharp-wave ripples and theta-nested gamma oscillations[END_REF] was used as a basis for a two-dimensional manifold that was uniformly populated by neurons following a density-driven approach [START_REF] Rougier | A Density-Driven Method for the Placement of Biological Cells Over Two-Dimensional Manifolds[END_REF]. Pyramidal neurons were uniformly distributed within the stratum pyramidale (or within the stratum granulosum for the dentate gyrus) and interneurons were uniformly distributed within the stratum oriens. Initial neuron positions were drawn from a blue noise distribution and a Voronoi diagram was computed. To adjust the positions of the neurons over a centroidal Voronoi diagram, the Lloyd relaxation algorithm was applied for 1000 iterations. Transitioning from a two-dimensional manifold to a 3D reconstruction of the hippocampal formation was achieved through the addition of the third coordinate with values uniformly distributed between 0 and 15 mm.

Hippocampal formation: inputs and connectivity

The hippocampal formation receives most of its external inputs from the EC. Activity from the EC is projected to all hippocampal subfields, starting with the DG. DG granule cells project onto the CA3 pyramidal cells via mossy cell fibers. CA3 projects in turn to CA1 via Schaffer collaterals. These connections form the tri-synaptic pathway. Direct connections from the EC towards the CA3 and CA1 subfields through the monosynaptic pathway are also considered. Pyramidal neurons from CA1 project to pyramidal neurons and interneurons in the EC, closing the hippocampal-entorhinal loop. CA1 pyramidal neurons also project to the medial septum through the fornix. An overview of the connections between areas is presented in panel B of Figure 1.

In the current model, EC pyramidal neurons and interneurons receive oscillatory theta input from the medial septum in the form of an excitatory intracellular current as described in Equation 2 and Equation 5. Projections from CA1 towards the medial septum were modeled as a signal representing the collective firing rate of the CA1 pyramidal neurons. All connections towards and from the medial septum are summarized in panels A and B of Figure 1.

Synaptic connectivity between neurons within a region is characterized using a probability 𝑝 and is distance-based, following a Gaussian-like distribution (Equation 14) with a width 𝜎 of 2500𝜇𝑚 (excitatory synapses) and 350𝜇𝑚 (inhibitory synapses). The value of 𝐴 𝑖𝑛𝑡𝑟𝑎 defines the maximum probability of connection between two neurons separated by an infinitesimal distance (i.e., for 𝐷 → 0). The maximum values for 𝐴 𝑖𝑛𝑡𝑟𝑎 are given in Table 7.

𝑝 = 𝐴 𝑖𝑛𝑡𝑟𝑎 exp(- 𝐷 2 2𝜎 2 ) (14)
Inter-area connectivity followed a similar Gaussian-like distribution (Equation 15), however, only excitatory projections were considered and the distance 𝐷 𝑧 was computed only across the z-coordinate. Pyramidal neurons from the source area projected to pyramidal neurons and interneurons in the target area, with connectivity probabilities drawn from the said distribution with a width 𝜎 of 1000 𝜇𝑚. Tuning input gain and connection strengths: targeted firing rates

𝑝 = 𝑚𝑖𝑛(1, 𝐴 𝑖𝑛𝑡𝑒𝑟 exp(- 𝐷 2 𝑧 2𝜎 2 )) (15)
We adjusted the input gain (𝐺 𝜃 ) and inter-area connection strengths (𝐴 𝑖𝑛𝑡𝑒𝑟 ) to target an overall oscillatory rhythm 𝑓 𝑜𝑠𝑐,𝑡𝑎𝑟𝑔 at the driving frequency of the input, i.e., 6 Hz, and a mean firing rate of each excitatory population 𝑓 𝑒𝑥𝑐,𝑡𝑎𝑟𝑔 also at 6 Hz (meaning that each excitatory cell should spike on average once per theta cycle). Because of the ratio between excitatory and inhibitory neurons in the model, this resulted in firing rates of about 60 Hz in inhibitory neurons. These targeted values were inspired by literature in behaving rodents showing that hippocampal pyramidal neurons typically fire at rates below 10 Hz, usually between 1 and 2 Hz, and that interneurons fire at rates between 20 and 80 Hz [START_REF] Hirase | Firing rates of hippocampal neurons are preserved during subsequent sleep episodes and modified by novel awake experience[END_REF]. In practice, the obtained firing rates were constrained by the simplifications made in the model.

The mean population firing rate 𝑓 𝑒𝑥𝑐 was computed by counting the number of spikes in the last second of a 3-s simulation run, to avoid edge effects due to the non-physiological initial conditions, and by averaging this number over time and across neurons. The oscillatory frequency 𝑓 𝑜𝑠𝑐 was computed as the mean of the inverse of the timing between all pairs of consecutive peaks in the theta rhythm. Finally, the metric used to adjust parameters (input strength and connection strengths) was calculated as the Euclidean distance between the targeted and obtained firing rate and oscillatory rate:

𝐽 = √ (𝑓 𝑒𝑥𝑐 -𝑓 𝑒𝑥𝑐,𝑡𝑎𝑟𝑔 ) 2 + (𝑓 𝑜𝑠𝑐 -𝑓 𝑜𝑠𝑐,𝑡𝑎𝑟𝑔 ) 2 (16)
Tuning input and connection strengths: detailed procedure

The input gain (𝐺 𝜃 , Equation 2) and inter-area connection strengths (𝐴 𝑖𝑛𝑡𝑒𝑟 , Equation 15) were sequentially adjusted using the following heuristics. All simulations were performed for a duration of 3 s, and the first 2 s were excluded from the analysis to avoid edge effects. The network was initialized with membrane voltages uniformly distributed in the range [-70, -60] mV. Our initial point was a fully uncoupled model in which all the connection strengths were set to 0. The tuning procedure was performed in the absence of noise. 1. First, we adjusted the amplitude of the theta input to a value that would produce a mean firing rate of 6 Hz in the excitatory population of the EC. To this end, the input strength was progressively increased from 0 to 0.5 nA in steps of 0.01 nA, and the value that maximized our metric was selected.

2. We then adjusted similarly the connection strength from the EC to the DG, increasing it from 0 to 20 in steps of 0.1.

3. We repeated the procedure to jointly tune the connection strengths from EC and DG to CA3, assuming an equal contribution from these two areas. These two connection strengths were set to the same value and were increased from 0 to 5 in steps of 0.1.

4. We followed the same procedure to jointly tune the connection strengths from CA3 and EC to CA1, assuming again an equal contribution from these two areas.

5. The last connection from CA1 to EC was more difficult to tune because it closes the feedback loop and induces complex dynamics when too strong. To tune it, we temporarily uncoupled CA1 from all other structures and temporarily added a fixed sinusoidal input at the target frequency of 6 Hz to both excitatory and inhibitory CA1 neurons. We first adjusted this input amplitude to generate a mean firing rate of about 6 Hz in CA1 excitatory neurons. Next, the connection strength from CA1 to EC was adjusted to also achieve a mean firing rate of 6 Hz in EC excitatory neurons.

6. Because EC receives both an external input and feedback from CA1, we assumed that both these contributions should be decreased for the system to behave in a physiological range in the presence of the feedback loop. We, therefore, decided to divide by two the connection strength from CA1 to EC obtained in step 5. All other connection strengths were then set again to the values tuned in the previous steps, and the temporary external input to CA1 was removed. The external theta input to the EC was reinstated and tuned again as in step 1.

Following the above procedure, the inter-area synaptic connectivity parameters were set for all subsequent simulations. The values are summarized in Table 8. Empty cells denote no effective connectivity.

Numerical Implementation

The model was implemented with the Brian2 libraries for Python [START_REF] Stimberg | Brian 2, an intuitive and efficient neural simulator[END_REF] (see Data availability section for access to the code). Simulations were performed using a timestep of 0.1 ms and a total simulation duration ranging between 3-10 seconds (depending on the experiment, see results section). The average time for simulating 1 second for the complete model locally was 10 minutes.

Neural mass model interfaced with Kuramoto oscillators

The neural masses represented in Figure S8 were modeled using the Wilson-Cowan formalism, with parameters adapted from Onslow et al. (2014). Specifically, the firing rates of the excitatory and inhibitory populations were determined by the following equations:

⎧ ⎪ ⎨ ⎪ ⎩ 𝜏 𝐸 𝑑𝐸 𝑑𝑡 = -𝐸 + 𝑓 (𝑔 𝐸 𝜃 𝐸 + 𝑊 𝐸𝐸 𝐸 -𝑊 𝐼𝐸 𝐼 + 𝑠𝑡𝑖𝑚 𝐸 (𝑡)) 𝜏 𝐼 𝑑𝐼 𝑑𝑡 = -𝐼 + 𝑓 (𝑔 𝐼 𝜃 𝐼 + 𝑊 𝐸𝐼 𝐸) (17)
with the following parameters: 𝜏 𝐸 = 𝜏 𝐼 = 3.2𝑚𝑠, 𝑔 𝐸 = 0.7, 𝑔 𝐼 = 0, 𝑊 𝐸𝐸 = 4.8, 𝑊 𝐸𝐼 = 𝑊 𝐼𝐸 = 4, and 𝑊 𝐼𝐼 = 0. The sigmoid response function was not modified from the original work, and was defined as:

𝑓 (𝑥) = 1 1 + 𝑒 -𝛽(𝑥-𝑥 𝑚 ) (18)
with parameters 𝛽 and 𝑥 𝑚 set to 4 and 1 respectively, according to the original model. The Kuramoto oscillators were modeled according to Equation 1. For these simulations we used a set of 𝑁 = 100 oscillators with a center frequency 𝑓 0 of 4 Hz, a synchronization ratio 𝑘 𝑁 of 25, and a strong phase reset gain 𝐺 𝑟𝑒𝑠𝑒𝑡 of 90. Other parameters were kept as previously shown in Table 1. The neural masses were coupled to the Kuramoto oscillators by linking the variable 𝑋(𝑡) in Equation 1with the variable 𝐸(𝑡) in Equation 17.

We increased the phase reset gain significantly compared to the Hodgkin-Huxley model, as the Onslow model utilized a sigmoid function with values between 0 and 1, whereas the instantaneous firing rate of the populations of single-compartment neurons was much higher and therefore had a stronger phase resetting effect.

Data Analysis

During each simulation, we monitored and exported the following data for subsequent analysis: (i) spike timings per neuron, (ii) time series of ionic currents, (iii) septal input theta rhythm and phase, and (iv) time series of electrical stimulation. Theta phase was wrapped between [-𝜋, 𝜋] with a phase of 0 radians corresponding to the peak of theta rhythm. All PAC analyses were performed using the TensorPAC toolbox for Python (Combrisson et al., 2020).

Firing rates

To obtain instantaneous firing rates, the corresponding spike trains were binned in 5-ms rectangular windows with a 90% overlap (i.e., consecutive windows were spaced by 0.5 ms). The number of spikes within each bin was normalized by the bin size and the number of neurons in the group, yielding instantaneous population firing rates. Where reported (i.e., values 𝜇 𝐼 and 𝜇 𝐸 in Figure 3A), the mean population firing rates within a given time window (typically lasting several seconds) were computed by binning all spikes in that time window and normalizing by the window width and the number of neurons in the population.

Spectral analyses

Power spectral density (PSD) estimates were calculated based on Welch's method. The periodogram was computed using 1-s windows with a 90% overlap, yielding a frequency resolution of 1

Hz. The average spectral power within a specific frequency band was calculated using Simpson's rule within the desired frequency band [𝑓 𝑙 , 𝑓 ℎ ]. Spectrograms were computed using the short-time Fourier transform with a sliding Hann window of 100-ms width and 99% overlap, yielding a frequency resolution of 10 Hz.

Modulation Index

The MI (Tort et al., 2008) was used to estimate the degree of PAC between theta and gamma oscillations in the model. To compute the MI, the normalized firing rate traces were band-pass filtered in the frequency ranges of interest: 3-9 Hz for theta (referred to as the "phase signal") and 40-80

Hz for gamma (referred to as the "amplitude signal"). Then, the phase and amplitude time series were extracted from the filtered signals using the Hilbert transform. A histogram of the mean amplitude of gamma over the phase of theta was then extracted, using phase bins of 5 degrees. The MI was finally calculated as the Kullback-Leibler divergence between the mean amplitude distribution and the uniform distribution. A higher MI indicates stronger PAC. For a schematic representation regarding the computation of the MI, refer to Figure 1

Comodulograms

Comodulograms represent the amount of PAC between two ranges of frequencies, used to extract respectively a phase and an amplitude signal. Specifically, we computed the MI between 80%

Phase dependency of PAC

For a given theta frequency, PAC depends on the phase of the underlying theta oscillation. To identify this relationship and the theta phase that maximizes coupling, we used the PreferredPhase function of the TensorPAC toolbox. More precisely, we applied a Hilbert transform to extract the phase of the theta signal (firing rate band-pass filtered between 3 and 9 Hz) and the amplitude of the gamma signal band-pass filtered within narrow (10-Hz wide) frequency ranges between 20 and 100 Hz with a 90% overlap. For each narrow gamma range, we binned the amplitude with respect to the phase in a similar way as in the calculation of the MI. We obtained a vector of the binned high-frequency amplitudes with respect to the phase of the low-frequency phase, represented as a polar plot as in Figure 3C.

Phase Response Curves

The PRC of an oscillatory system indicates the phase delay or advancement that follows a single pulse, as a function of the phase at which this input is delivered. To characterize the PRC of our computational model, we applied a single stimulation pulse to CA1 across different phases of the theta rhythm and calculated the resulting change in the theta phase. We split a single theta cycle into intervals of width 𝜋∕8 radians and applied a single stimulation pulse of a given amplitude.

For each case, we ran two simulations: one with a stimulation pulse and one without. Finally, we compared the theta phase 2.5 ms post-stimulation and at the same time but in the absence of stimulation. The resulting values for the phase difference Δ𝜙 were plotted against the stimulation phase and are presented in Figure 3D for varying stimulation amplitudes. Figure 3. Theta-nested gamma oscillations and theta phase reset in response to a single stimulation pulse. A. Representative example of the network behavior, spontaneously producing theta-nested gamma oscillations and characterized by a reset of the theta phase following a single stimulation pulse (vertical grey line, applied here in CA1 at a theta phase of 𝜋∕2, i.e., in the middle of the descending slope). Top to bottom: theta rhythm originating from the medial septum and provided as an input to the EC (𝑓 𝜃 : mean oscillation frequency), instantaneous phase of the theta rhythm, raster plots indicating the spiking activity of CA1 excitatory (blue) and inhibitory (red) neurons (𝜇 𝐸 and 𝜇 𝐼 : mean firing rates within the shaded area), average population firing rates in CA1 (computed as a windowed moving average with a sliding window of 100 ms with 99% overlap), spectrograms for each CA1 population (windowed short-time fast Fourier transform using a Hann sliding window: 100 ms with 99% overlap). Spectrograms show gamma oscillations (around 60 Hz) modulated by the underlying theta rhythm (∼ 4 Hz|), indicating theta-gamma PAC. Theta phase reset after stimulation is associated with a rebound of spiking activity and theta-nested gamma oscillations. B.

Power spectral densities of the CA1 firing rates. Theta peaks are found at 4 Hz for excitatory and inhibitory cells. Gamma activity is located between 40 and 80 Hz. C. PAC as a function of theta phase and gamma frequency. The polar plot represents the amplitude of gamma oscillations (averaged across all theta cycles, see methods) at each phase of theta (theta range: 3-9 Hz, phase indicated as angular coordinate) and for different gamma frequencies (radial coordinate, binned in 10-Hz ranges), indicating that gamma oscillations between 40 and 80 Hz occur preferentially around the peak of theta. The MI gives an overall quantification of how the phase of low-frequency oscillations (3-9 Hz) modulates the amplitude of higher-frequency oscillations (40-80 Hz) (see Methods and As the number of oscillators increases, the mean frequency appears closer to the desired center frequency of 6 Hz, and the standard error of the mean is reduced. Overall, increasing the number of oscillators past 250 did not yield any substantial change in the convergence of the order parameter or the distribution of natural frequencies. This number of oscillators was therefore chosen for all subsequent analyses. Quantifying PAC in the absence of noise produced inaccurate identification of the coupled frequency bands, due to the complete absence of oscillations at some frequencies. All analyses are based on the CA1 firing rates (top traces) during a representative simulation. Power spectral densities of these firing rates (left) indicate that some frequencies have a power of 0. PAC of the excitatory population was assessed using two graphical representations, the polar plot (middle) and comodulogram (right), and quantified using the MI. The comodulogram was calculated by computing the MI across 80% overlapping 1-Hz frequency bands in the theta range and across 90% overlapping 10-Hz frequency bands in the gamma range and subsequently plotted as a heat map. In the absence of noise, a slow theta frequency centered around 5 Hz is found to modulate a broad range of gamma frequencies between 40 and 100 Hz. The value indicated on the comodulogram indicates the average MI in the 3-9 Hz theta range and 40-80 Hz gamma range. As in Figure 3, the polar plot represents the amplitude of gamma oscillations (averaged across all theta cycles) at each phase of theta (theta range: 3-9 Hz, phase indicated as angular coordinate) and for different gamma frequencies (radial coordinate, binned in 1-Hz ranges). B. Adding uniform noise to the firing rate (with an amplitude ranging between 15 and 25% of the maximum firing rate) improved the identification of the coupled frequency bands. In this case, the slower theta frequency centered around 5 Hz modulates a gamma band located between 45 and 75 Hz.

  g., Bezaire et al. (2016); Chatzikalymniou et al. (2021)). Among these various interneurons, oriens-lacunosum moleculare (OLM) neurons in the CA1 field have been shown to play a crucial role in synchronizing the activity of pyramidal neurons at gamma frequencies (Tort et al., 2007), and in generating theta-gamma PAC (e.g., Neymotin et al. (2011); Ponzi et al. (2023)). Additionally, these cells may contribute to the formation of specific phase relationships within CA1 neuronal populations, through the integration between inputs from the medial septum, the EC, and CA3[START_REF] Mysin | Phase relations of theta oscillations in a computer model of the hippocampal CA1 field: Key role of Schaffer collaterals[END_REF]. Future work is needed to include more diverse cell types and detailed morphologies modeled through multiple compartments.

  center frequency 𝑓 0 and with standard deviation 𝜎. The synchronization parameter 𝑘 represents the coupling strength of the group of oscillators, and 𝑁 is the number of oscillators. Higher values for the synchronization parameter indicate stronger coupling between pairs of oscillators, thus affecting how fast or slow their phases tend to synchronize. The final product 𝐺 𝑟𝑒𝑠𝑒𝑡 𝑋(𝑡)𝑍(𝜃 𝑖 ) is used to describe the effects of external inputs on the phase of the oscillators. Here, the only external input originates in the projections from CA1 to the medial septum. It is described by the instantaneous firing rate 𝑋(𝑡) of the CA1 excitatory population. 𝐺 𝑟𝑒𝑠𝑒𝑡 is an arbitrary gain that determines the strength of the CA1 input to the oscillators. Finally, the function 𝑍(𝜃 𝑖 ) describes how the effects of CA1 inputs on the oscillators depend on the phase of the ongoing theta rhythm.

  in Tort et al. (2010). These computations were performed using the provided PreferredPhase and Pac methods from the TensorPAC library for Python (Combrisson et al., 2020).

overlapping 1 -

 1 Hz frequency bands used to compute the phase of the signal (in the theta range), and 90% overlapping 10-Hz frequency bands used to compute the amplitude of the signal (in the gamma range). The resulting distribution of MI values was subsequently plotted as heat maps. An inherent problem with the computation of the MI using simulated data was the lack of frequency components in some frequency bands. Filtering the data within 1-Hz frequency bands thus created a flat signal, resulting in high values of the MI despite the absence of modulation. To overcome this limitation, we added uniform noise to the firing rate signals prior to computing the MI, with an amplitude of approximately 20% of the maximum instantaneous firing rates. The results with and without added noise are presented in Figure S6.

Figure 1 .

 1 Figures

  Figure3. Theta-nested gamma oscillations and theta phase reset in response to a single stimulation pulse. A. Representative example of the network behavior, spontaneously producing theta-nested gamma oscillations and characterized by a reset of the theta phase following a single stimulation pulse (vertical grey line, applied here in CA1 at a theta phase of 𝜋∕2, i.e., in the middle of the descending slope). Top to bottom: theta rhythm originating from the medial septum and provided as an input to the EC (𝑓 𝜃 : mean oscillation frequency), instantaneous phase of the theta rhythm, raster plots indicating the spiking activity of CA1 excitatory (blue) and inhibitory (red) neurons (𝜇 𝐸 and 𝜇 𝐼 : mean firing rates within the shaded area), average population firing rates in CA1 (computed as a windowed moving average with a sliding window of 100 ms with 99% overlap), spectrograms for each CA1 population (windowed short-time fast Fourier transform using a Hann sliding window: 100 ms with 99% overlap). Spectrograms show gamma oscillations (around 60 Hz) modulated by the underlying theta rhythm (∼ 4 Hz|), indicating theta-gamma PAC. Theta phase reset after stimulation is associated with a rebound of spiking activity and theta-nested gamma oscillations. B. Power spectral densities of the CA1 firing rates. Theta peaks are found at 4 Hz for excitatory and inhibitory cells. Gamma activity is located between 40 and 80 Hz. C. PAC as a function of theta phase and gamma frequency. The polar plot represents the amplitude of gamma oscillations (averaged across all theta cycles, see methods) at each phase of theta (theta range: 3-9 Hz, phase indicated as angular coordinate) and for different gamma frequencies (radial coordinate, binned in 10-Hz ranges), indicating that gamma oscillations between 40 and 80 Hz occur preferentially around the peak of theta. The MI gives an overall quantification of how the phase of low-frequency oscillations (3-9 Hz) modulates the amplitude of higher-frequency oscillations (40-80 Hz) (see Methods and Figure supplement 2). D. PRC in response to a single stimulation pulse applied in CA1 at various phases of the ongoing theta rhythm and for various stimulation amplitudes (color-coded). The phase difference (left y-axis) shows the theta phase induced by the stimulation pulse (computed 2.5 ms after the pulse), compared to the phase computed at the same time in a scenario without stimulation. Positive and negative phase differences respectively indicate phase advances and delays. The grey trace shows the normalized amplitude of theta (right 𝑦 axis) for different phases, used to indicate the peak and trough of the rhythm. Stimulation applied in the ascending slope of theta ([-𝜋, 0]) produced a phase advance and accelerated the rhythm towards its peak (0 radians). Conversely, stimulation during the descending slope ([0, 𝜋]) produced a phase delay that slowed down the rhythm. Higher stimulation amplitudes yielded a stronger effect.

Figure 4 .

 4 Figure 4. CAN and adaptation (M) currents modulate neuronal responses to single-pulse stimulation in the absence of theta input. A.Network response to single-pulse stimulation in the absence of medial septum input. Stimulation (grey vertical line, 10 nA, applied in CA1) induced an instantaneous burst of activity lasting about 20 ms in both excitatory and inhibitory CA1 neurons, followed by a secondary burst approximately 200 ms later (raster plot and firing rate traces), associated with specific CAN-and M-currents dynamics (bottom traces, illustrated for a representative CA1 excitatory neuron). Positive (𝐼 𝑀 ) and negative (𝐼 𝐶𝐴𝑁 ) currents indicate respectively a hyperpolarizing and depolarizing effect on the cell membrane potential. B. Similar representation as in A., but in the absence of CAN channel. Stimulation induced only a single burst of activity, indicating that CAN channels are necessary to observe a rebound of activity. C. Number of bursts in CA1 spiking activity following a single stimulation pulse at various amplitudes (x-axis), shown both in the presence and absence of CAN channels in excitatory neurons. The absence of the CAN current leads to the abolition of the second burst, irrespective of stimulation amplitude.

Figure 5 .

 5 Figure 5. Medial septum oscillatory drive and stimulation amplitude govern the steady-state response to single-pulse stimulation. A-C. Network responses to single-pulse stimulation (vertical line) under medial septum input (with phase reset), shown for different amplitudes of the medial septum oscillatory drive (A-C: increasing oscillator amplitudes). A. Low oscillatory input: stimulation induces only two bursts of spiking activity as in Figure 4. B.Medium oscillatory input: a single stimulation pulse switches network behavior from no activity to sustained oscillations driven by the medial septum. C. Higher oscillatory input: theta drive is capable of inducing self-sustained theta-nested gamma oscillations. In this case, stimulation is delivered at the peak of theta oscillations and does not show a pronounced effect on theta-gamma oscillations. D. Steady-state response to single-pulse stimulation as a function of medial septum oscillatory input (x-axis) and stimulation amplitude (y-axis), characterized by three metrics: theta power (3-9 Hz), gamma power (40-80 Hz), and PAC (quantified using the MI). White dots: parameter combinations corresponding to panels A-C.

Figure 6 .

 6 Figure 6. Single-pulse stimulation phase differentially affects network responses depending on the presence of theta phase reset. All results shown here were obtained for parameters from Figure 5B (theta oscillation amplitude: 0.13 nA, stimulation amplitude: 7.0 nA). A single stimulation pulse was delivered at the peak (A, B) or trough (C, D) of the underlying theta rhythm, either in the presence (A, C) or absence (B, D)of theta phase reset. With phase reset, both peak and trough stimulation switch network behavior from no activity to sustained oscillations. Without phase reset, only peak stimulation can induce sustained oscillations. E. Quantification of theta power, gamma power, and PAC (measured using the MI) in CA1 excitatory (blue) and inhibitory (red) populations in all 4 cases (metrics are computed in the shaded areas of panels A-D).

Figure 7 .

 7 Figure 7. Pulse train stimulation restores theta-nested gamma oscillations depending on stimulation timing and theta phase reset. All results shown here were obtained for parameters from Figure 5A (theta oscillation amplitude: 0.05 nA; stimulation amplitude: 7.0 nA).Representations are similar to Figure6, with the difference that stimulation consisted of a pulse train delivered at 6 Hz for a duration of 2 s (individual pulses indicated by grey dots, first pulse by a triangle). The pulse train was delivered at the peak (A, B) or trough (C, D) of the underlying theta rhythm, either in the presence (A, C) or absence (B, D) of theta phase reset. With phase reset, both peak and trough stimulation switch network behavior from no activity to sustained oscillations. Without phase reset, only peak stimulation can induce sustained oscillations. E. Quantification of theta power, gamma power, and PAC (measured using the MI) in CA1 excitatory (blue) and inhibitory (red) populations in all 4 cases (metrics are computed during the pulse train, within the shaded areas of panels A-D).

Figure S1. (Figure 1 -

 1 Figure S1. (Figure 1 -Figure Supplement 1) Influence of the number of Kuramoto oscillators on their collective dynamics.Left: influence of the number of Kuramoto oscillators (𝑁) on the convergence over time of the order parameter (𝑟), which is a measure of synchronization of the set of oscillators. The above results were obtained using a synchronization ratio 𝑘 ∕𝑁 of 25. Upon initialization, the oscillators' natural frequencies (𝜔 𝑖 ) were normally distributed with a center frequency (𝑓 0 = 6 Hz). Initial phases were uniformly distributed around the unit circle (𝑈 ∼ [0, 2𝜋]). Right: histograms of the natural frequencies (𝜔 𝑖 ), together with the distribution mean (𝜇) and standard error of the mean ( 𝜎 ∕ √ 𝑁). As the number of oscillators increases, the mean frequency appears closer to the desired center frequency of 6 Hz, and the standard error of the mean is reduced. Overall, increasing the number of oscillators past 250 did not yield any substantial change in the convergence of the order parameter or the distribution of natural frequencies. This number of oscillators was therefore chosen for all subsequent analyses.

Figure S6 .

 S6 Figure S6. (Figure 3 -Figure Supplement 2) Quantification of PAC with and without noise. A.Quantifying PAC in the absence of noise produced inaccurate identification of the coupled frequency bands, due to the complete absence of oscillations at some frequencies. All analyses are based on the CA1 firing rates (top traces) during a representative simulation. Power spectral densities of these firing rates (left) indicate that some frequencies have a power of 0. PAC of the excitatory population was assessed using two graphical representations, the polar plot (middle) and comodulogram (right), and quantified using the MI. The comodulogram was calculated by computing the MI across 80% overlapping 1-Hz frequency bands in the theta range and across 90% overlapping 10-Hz frequency bands in the gamma range and subsequently plotted as a heat map. In the absence of noise, a slow theta frequency centered around 5 Hz is found to modulate a broad range of gamma frequencies between 40 and 100 Hz. The value indicated on the comodulogram indicates the average MI in the 3-9 Hz theta range and 40-80 Hz gamma range. As in Figure3, the polar plot represents the amplitude of gamma oscillations (averaged across all theta cycles) at each phase of theta (theta range: 3-9 Hz, phase indicated as angular coordinate) and for different gamma frequencies (radial coordinate, binned in 1-Hz ranges). B. Adding uniform noise to the firing rate (with an amplitude ranging between 15 and 25% of the maximum firing rate) improved the identification of the coupled frequency bands. In this case, the slower theta frequency centered around 5 Hz modulates a gamma band located between 45 and 75 Hz.

Figure

  Figure S13. (Figure 5 -Figure Supplement 5) Synchronization level of the oscillators minimally affects the production of theta-nested gamma oscillations. A., B. Network responses to single-pulse stimulation (vertical line) under medial septum input (with phase reset), shown for different synchronization parameter ratios of the Kuramoto oscillators (A,B: 𝑘 𝑁 of 5 and 35 respectively; stimulation amplitude: 7.0 nA). Panel B. indicates that the model can produce oscillations without external stimulation when the synchronization level is higher. C. Steady-state response to single-pulse stimulation as a function of medial septum oscillatory input (x-axis) and synchronization parameter ratio ( 𝑘 𝑁 , y-axis), characterized by three metrics: theta power (3-9 Hz), gamma power (40-80 Hz), and PAC (quantified using the MI). White dots: parameter combinations corresponding to panels A and B.

Table 1 .

 1 Full list of the default parameter values for the Kuramoto oscillators.

	Parameter	Value
	Number of oscillators (𝑁)	250
	Center frequency (𝑓 0 )	6 Hz
	Standard deviation (𝜎)	0.5 Hz
	Synchronization ratio ( 𝑘 𝑁 )	15
	Phase reset gain (𝐺 𝑟𝑒𝑠𝑒𝑡 )	4
	Peak phase (𝜃 𝑝𝑒𝑎𝑘 )	0 rad
	Firing rate time constant (𝜏 𝐹 𝑅 )	10 ms

Table 2 .

 2 Full list of parameter values and expressions for pyramidal neurons

	Parameter Expression
	𝐴	29.10 3 𝑐𝑚 2
	𝐶 𝑚	1.𝜇𝐹 ∕𝑐𝑚 2
	𝑔 𝐿	0.01𝑚𝑆∕𝑐𝑚 2
	𝐸 𝐿	-70𝑚𝑉
	𝑔 𝐾	5𝑚𝑆∕𝑐𝑚 2
	𝐸 𝐾	-100𝑚𝑉
	𝛼 𝑛,𝐾 𝛽 𝑛,𝐾	𝑉 𝑚 +40 𝑚𝑉 -1+𝑒 -0.02 (𝑉 𝑚 +40 𝑚𝑉 ) -(𝑉 𝑚 +45 𝑚𝑉 ) -0.032 0.5 𝑒 40 𝑚𝑉
	𝑔 𝑁𝑎	50𝑚𝑆∕𝑐𝑚 2
	𝐸 𝑁𝑎	50𝑚𝑉
	𝛼 𝑚,𝑁𝑎 𝛽 𝑚,𝑁𝑎 𝛼 ℎ,𝑁𝑎	𝑉 𝑚 +42 𝑚𝑉 𝑉 𝑚 +42 𝑚𝑉 -𝑒 4 𝑚𝑉 𝑉 𝑚 +15 𝑚𝑉 𝑉 𝑚 +15 𝑚𝑉 --0.32 0.28 𝑒 5 𝑚𝑉 -1 -1 0.128 𝑒 -𝑉 𝑚 +38 𝑚𝑉 18 𝑚𝑉
	𝛽 ℎ,𝑁𝑎	1+𝑒	-	4 𝑉 𝑚 +15 𝑚𝑉 5 𝑚𝑉
	𝑔 𝑀	90𝜇𝑆∕𝑐𝑚 2
	𝐸 𝑀	-100𝑚𝑉
	𝑝 ∞ 𝜏 𝑝	1 1+𝑒 -0.01 (𝑉 𝑚 +35 𝑚𝑉 ) 1 3.3 𝑒 (𝑉 𝑚 +35 𝑚𝑉 ) 20 𝑚𝑉 +𝑒 -	(𝑉 𝑚 +35 𝑚𝑉 ) 20 𝑚𝑉
	𝑔 𝐶𝑎	0.1𝑚𝑆∕𝑐𝑚 2
	𝐸 𝐶𝑎	120𝑚𝑉
	𝛼 𝑚,𝐶𝑎 𝛽 𝑚,𝐶𝑎	-0.055 -0.94𝑒	𝑉 𝑚 +27 𝑚𝑉 𝑉 𝑚 +27 𝑚𝑉 -𝑒 17 𝑚𝑉 𝑉 𝑚 +75 𝑚𝑉 17 𝑚𝑉	-1
	𝛼 ℎ,𝐶𝑎	-0.000457𝑒	𝑉 𝑚 +13 𝑚𝑉 50 𝑚𝑉
	𝛽 ℎ,𝐶𝑎	𝑒 -	0.0065 𝑉 𝑚 +15 𝑚𝑉 28 𝑚𝑉
	𝑔 𝐶𝐴𝑁	25𝜇𝑆∕𝑐𝑚 2
	𝐸 𝐶𝐴𝑁	-20𝑚𝑉
	𝛼 𝑚,𝐶𝐴𝑁	0.0002 𝑒 1.4	[𝐶𝑎] 2+ 𝑖 0.5 𝑚𝑜𝑙∕𝐿
	𝛽 𝑚,𝐶𝐴𝑁	0.0002 𝑒 1.4

Table 3 .

 3 Full list of parameter values and expressions for interneurons

	Parameter Expression
	𝐴	14.10 3 𝑐𝑚 2
	𝐶 𝑚	1.𝜇𝐹 ∕𝑐𝑚 2
	𝑔 𝐿	0.1𝑚𝑆∕𝑐𝑚 2
	𝐸 𝐿	-65𝑚𝑉
	𝑔 𝐾	9𝑚𝑆∕𝑐𝑚 2
	𝐸 𝐾	-90𝑚𝑉
	𝛼 𝑛,𝐾 𝛽 𝑛,𝐾	𝑉 𝑚 +34 𝑚𝑉 1-𝑒 -0.1(𝑉 𝑚 +34 𝑚𝑉 ) 0.125𝑒 -𝑉 𝑚 +44 𝑚𝑉 0.01 80 𝑚𝑉
	𝑔 𝑁𝑎	35𝑚𝑆𝑐𝑚 2
	𝐸 𝑁𝑎	55𝑚𝑉
	𝛼 𝑚,𝑁𝑎	0.1

Table 4 .

 4 A pre-synaptic spike causes an increase in the conductances ℎ 𝑒 and ℎ 𝑖 in the post-synaptic neuron. The values for the intra-area connections are given here. Empty cells indicate no connection between the populations.

	E → E	E → I	I → E	I → I
	EC	20 𝑝𝑆	600 𝑝𝑆
	DG	180 𝑝𝑆 1800 𝑝𝑆
	CA3 20 𝑝𝑆	20 𝑝𝑆	600 𝑝𝑆
	CA1	60 𝑝𝑆	1800 𝑝𝑆 1800 𝑝𝑆
	Hippocampal formation: neuron types and numbers

Each area of the network is comprised of two populations, one excitatory and one inhibitory. Excitatory cells in the DG represent granule cells and pyramidal neurons in all other areas. Interneurons represent basket cells across all areas. The ratio between pyramidal neurons and interneurons

Table 5 .

 5 A pre-synaptic spike causes an increase in the conductances ℎ 𝑒 and ℎ 𝑖 in the post-synaptic neuron. The values for the inter-area connections are given here. Empty cells indicate no connection between the areas. Recurrent projections are not allowed and are marked with dashes.

	Source	Target	EC	DG	CA3	CA1
	EC		-	20 𝑝𝑆	20 𝑝𝑆	20 𝑝𝑆
	DG			-	180 𝑝𝑆
	CA3				-	20 𝑝𝑆
	CA1		60 𝑝𝑆			-
	was directly adapted from Aussel et al.

Table 6 .

 6 Number of neurons per subfield of the hippocampal formation, divided by neuron type.

	Area	𝑁 𝐸𝑥𝑐	𝑁 𝐼𝑛ℎ
	EC	10,000 1,000
	DG	10,000	100
	CA3 10,000	100
	CA1 10,000 1,000

Table 7 .

 7 Maximum probability of connection (𝐴 𝑖𝑛𝑡𝑟𝑎 , Equation14) between neurons within each region.

		Py-Py Py-Inh Inh-Py Inh-Inh
	EC	0	0.37	0.54	0
	DG	0	0.06	0.14	0
	CA3	0.56	0.75	0.75	0
	CA1	0	0.28	0.3	0.7

Table 8 .

 8 Inter-area connection strengths (𝐴 𝑖𝑛𝑡𝑒𝑟 ). The source is always the excitatory population of the subfield. The same values are used when targeting excitatory and inhibitory populations. Empty cells indicate no connections. EC: Entorhinal Cortex, DG: Dentate Gyrus.

	Source	Target EC	DG	CA3 CA1
	EC	-	13.0 0.14	1.1
	DG		-	0.14
	CA3			-	1.1
	CA1	0.2			-

  Basu I, Crocker B, Farnes K, Robertson MM, Paulk AC, Vallejo DI, Dougherty DD, Cash SS, Eskandar EN, Kramer MM, Widge AS. A neural mass model to predict electrical stimulation evoked responses in human and nonhuman primate brain. Journal of Neural Engineering. 2018 Dec; 15(6):066012. https://iopscience.iop.org/ article/10.1088/1741-2552/aae136, doi: 10.1088/1741-2552/aae136. Gorbati M, Cadavieco MC, Denisova N, Gao X, Holman C, Korotkova T, Ponomarenko A. Theta oscillations regulate the speed of locomotion via a hippocampus to lateral septum pathway. Nature Commu-Borges FS, Lameu EL, Batista AM, Iarosz KC, Caldas IL, Antonopoulos CG, Baptista MS. Spike timingdependent plasticity induces non-trivial topology in the brain. Neural Networks. 2017 Apr; 88:58-64. https: //linkinghub.elsevier.com/retrieve/pii/S0893608017300102, doi: 10.1016/j.neunet.2017.01.010. Heitmann S, Daffertshofer A. Generative Models of Cortical Oscillations: Neurobiological Implications of the Kuramoto Model. Frontiers in Human Neuroscience. 2010; 4. https://www.frontiersin.org/ articles/10.3389/fnhum.2010.00190/full, doi: 10.3389/fnhum.2010.00190, publisher: Frontiers. Garcia-Sanchez JL, Garcia-Austt E. Reset of hippocampal rhythmical activities by afferent stimulation. Uusisaari M, Stiefel K. A comparison of methods to determine neuronal phase-response curves. Frontiers in Neuroinformatics. 2010; 4:6. https://www.frontiersin.org/article/10.3389/fninf.2010.00006, doi: 10.3389/fninf.2010.00006. Rotstein HG, Dugladze T, Gloveli T, Kopell NJ. On the formation of gamma-coherent cell assemblies by oriens lacunosum-moleculare interneurons in the hippocampus. Proceedings of the National Academy of Sciences. 2007 Aug; 104(33):13490-13495. http://www.pnas.org/cgi/doi/10.1073/pnas.0705708104, doi: Kramer MA, Thorn C, Gibson DJ, Kubota Y, Graybiel AM, Kopell NJ. Dynamic cross-frequency couplings of local field potential oscillations in rat striatum and hippocampus during performance of a T-maze task. Borhegyi Z, Freund T. Postsynaptic targets of GABAergic hippocampal neurons in the medial septumdiagonal band of broca complex. The Journal of Neuroscience. 1993 Sep; 13(9):3712-3724. https://www.ncbi. nlm.nih.gov/pmc/articles/PMC6576440/, doi: 10.1523/JNEUROSCI.13-09-03712.1993. Bibbig A, LeBeau FEN, Buhl EH, Whittington MA. Cellular mechanisms of neuronal population oscillations in the hippocampus in vitro. Annual Review of Neuroscience. 2004; 27:247-278. doi: 10.1146/annurev.neuro.27.070203.144303. Jefferys JGR, Whittington MA. Simulation of Gamma Rhythms in Networks of Interneurons and Pyramidal Cells. Journal of Computational Neuroscience. 1997; p. 10.

	Bender F, nications. 2015 Oct; 6(1):8521. https://www.nature.com/articles/ncomms9521, doi: 10.1038/ncomms9521, Torben-Nielsen B, Tort ABL, 10.1073/pnas.0705708104.
	number: 1 Publisher: Nature Publishing Group. Tort ABL, Komorowski R, Eichenbaum H, Kopell N. Measuring Phase-Amplitude Coupling Between Neuronal
	Bezaire MJ, Raikov I, Burk K, Vyas D, Soltesz I. Interneuronal mechanisms of hippocampal theta oscillations in Oscillations of Different Frequencies. Journal of Neurophysiology. 2010 Aug; 104(2):1195-1210. https://www.
	a full-scale model of the rodent CA1 circuit. eLife. 2016 Dec; 5:e18566. https://elifesciences.org/articles/18566, ncbi.nlm.nih.gov/pmc/articles/PMC2941206/, doi: 10.1152/jn.00106.2010.
	doi: 10.7554/eLife.18566. Tort ABL, Komorowski RW, Manns JR, Kopell NJ, Eichenbaum H. Theta-gamma coupling increases during
	Bingham CS, Loizos K, Yu GJ, Gilbert A, Bouteiller JMC, Song D, Lazzi G, Berger TW. Model-Based Anal-the learning of item-context associations. Proceedings of the National Academy of Sciences. 2009 Dec;
	ysis of Electrode Placement and Pulse Amplitude for Hippocampal Stimulation. IEEE Transactions on 106(49):20942-20947. https://www.pnas.org/content/106/49/20942, doi: 10.1073/pnas.0911331106, pub-
	Biomedical Engineering. 2018 Oct; 65(10):2278-2289. https://ieeexplore.ieee.org/document/8269392/, doi: lisher: National Academy of Sciences Section: Biological Sciences.
	10.1109/TBME.2018.2791860.
	Tort ABL, Proceedings of the National Academy of Sciences. 2008 Dec; 105(51):20517-20522. https://www.pnas.org/ content/105/51/20517, doi: 10.1073/pnas.0810524105, publisher: National Academy of Sciences Section: Biological Sciences. Borges RR, Breakspear M, Buño W, Brain Research Bulletin. 1978; 3(1):21-28. doi: 10.1016/0361-9230(78)90057-6. Buzsáki G, Buhl DL, Harris KD, Csicsvari J, Czéh B, Morozov A. Hippocampal network patterns of activity in the mouse. Neuroscience. 2003 Jan; 116(1):201-211. http://www.sciencedirect.com/science/article/pii/ S0306452202006693, doi: 10.1016/S0306-4522(02)00669-3. Buzsáki G. Theta Oscillations in the Hippocampus. Neuron. 2002 Jan; 33(3):325-340. https://www.sciencedirect. com/science/article/pii/S089662730200586X, doi: 10.1016/S0896-6273(02)00586-X. Toth K, Traub RD, Traub RD, Tsanov M, Manahan-Vaughan D. Long-Term Plasticity Is Proportional to Theta-Activity. PLoS ONE. 2009 Jun;
	Canolty RT, Knight RT. 4(6):e5850. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2688745/, doi: 10.1371/journal.pone.0005850. The functional role of cross-frequency coupling. Trends in Cognitive Sci-
	ences. 2010 Nov; 14(11):506-515. https://linkinghub.elsevier.com/retrieve/pii/S1364661310002068, doi: Unal G, Joshi A, Viney TJ, Kis V, Somogyi P. Synaptic Targets of Medial Septal Projections in the Hippocam-
	10.1016/j.tics.2010.09.001. pus and Extrahippocampal Cortices of the Mouse. Journal of Neuroscience. 2015 Dec; 35(48):15812-15826.
	https://www.jneurosci.org/content/35/48/15812, doi: 10.1523/JNEUROSCI.2639-15.2015, publisher: Society Capogrosso M, Wenger N, Raspopovic S, Musienko P, Beauparlant J, Bassi Luciani L, Courtine G, Micera S. A Computational Model for Epidural Electrical Stimulation of Spinal Sensorimotor Circuits. The Journal of Neu-for Neuroscience Section: Articles.
	roscience. 2013 Dec; 33(49):19326-19340. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6618777/, doi: Varga V, Hangya B, Kránitz K, Ludányi A, Zemankovics R, Katona I, Shigemoto R, Freund TF, Borhegyi Z. The
	10.1523/JNEUROSCI.1688-13.2013. presence of pacemaker HCN channels identifies theta rhythmic GABAergic neurons in the medial septum.
	Cardin JA, Carlén M, Meletis K, Knoblich U, Zhang F, Deisseroth K, Tsai LH, Moore CI. Driving fast-spiking The Journal of Physiology. 2008 Aug; 586(16):3893-3915. doi: 10.1113/jphysiol.2008.155242.
	cells induces gamma rhythm and controls sensory responses. Nature. 2009 Jun; 459(7247):663-667. https: Wang XJ. Pacemaker Neurons for the Theta Rhythm and Their Synchronization in the Septohippocampal Re-
	//www.nature.com/articles/nature08002, doi: 10.1038/nature08002. ciprocal Loop. Journal of Neurophysiology. 2002 Feb; 87(2):889-900. https://journals.physiology.org/doi/full/
	Chatzikalymniou AP, Gumus M, Skinner FK. Linking minimal and detailed models of CA1 microcircuits reveals 10.1152/jn.00135.2001, doi: 10.1152/jn.00135.2001, publisher: American Physiological Society.
	how theta rhythms emerge and their frequencies controlled. Hippocampus. 2021 Sep; 31(9):982-1002. doi: Weerasinghe G, Duchet B, Cagnan H, Brown P, Bick C, Bogacz R. Predicting the effects of deep brain stimulation
	10.1002/hipo.23364. using a reduced coupled oscillator model. PLoS Computational Biology. 2019 Aug; 15(8):e1006575. https:
	Colgin LL. Mechanisms and Functions of Theta Rhythms. Annual Review of Neuroscience. 2013; 36(1):295-312. //www.ncbi.nlm.nih.gov/pmc/articles/PMC6701819/, doi: 10.1371/journal.pcbi.1006575.
	https://doi.org/10.1146/annurev-neuro-062012-170330, doi: 10.1146/annurev-neuro-062012-170330. Williams JM, Givens B. Stimulation-induced reset of hippocampal theta in the freely performing rat. Hippocam-
	pus. 2003 Jan; 13(1):109-116. https://onlinelibrary.wiley.com/doi/10.1002/hipo.10082, doi: 10.1002/hipo.10082, Combrisson E, Nest T, Brovelli A, Ince RAA, Soto JLP, Guillot A, Jerbi K. Tensorpac: An open-source Python tool-box for tensor-based phase-amplitude coupling measurement in electrophysiological brain signals. PLOS publisher: John Wiley & Sons, Ltd.
	Computational Biology. 2020 Oct; 16(10):e1008302. https://journals.plos.org/ploscompbiol/article?id=10.1371/
	journal.pcbi.1008302, doi: 10.1371/journal.pcbi.1008302, publisher: Public Library of Science.
	Cutsuridis V, Cobb S, Graham BP. Encoding and retrieval in a model of the hippocampal CA1 microcir-
	cuit. Hippocampus. 2010; 20(3):423-446. http://onlinelibrary.wiley.com/doi/abs/10.1002/hipo.20661, doi:
	10.1002/hipo.20661, _eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/hipo.20661.

Acknowledgments

Simulations presented in this paper were carried out using the PlaFRIM experimental testbed, supported by Inria, CNRS (LABRI and IMB), Université de Bordeaux, Bordeaux INP and Conseil Régional d'Aquitaine (see https://www.plafrim.fr).

Funding

This work was supported by the Bordeaux Neurocampus junior chair program co-funded by the Région Nouvelle-Aquitaine and the University of Bordeaux Initiative of Excellence (IdEx) (F.B.W., Neurocampus junior chair), and the European Union's Horizon Europe research and innovation

Data availability

All model files and analysis scripts are available at the following repositories under the GNU General Public License v3.0 license: ZENODO: https://www.doi.org/10.5281/zenodo.8354987 GITHUB: https://github.com/NikVard/memstim-hh

Additional information

program under European Research Council (ERC) Starting Grant agreement N°101040391 (F.B.W., MEMOPROSTHETICS).

Author ORCIDs

Nikolaos Vardalakis: https://orcid.org/0000-0002-5436-4091 Amélie Aussel: https://orcid.org/0000-0003-0498-2905 Nicolas P. Rougier: https://orcid.org/0000-0002-6972-589X Fabien B. Wagner: https://orcid.org/0000-0002-9582-6109

Conflicts of interest

The authors declare no conflicts of interest.

Excitatory-Inhibitory Coupled

Excitatory-Inhibitory Decoupled (2009). Specifically, for each stimulation frequency, we computed first the power spectral density of the population firing rates using Welch's method, and then the ratio between the power within a 10-Hz band centered around the stimulation frequency and the total power across all frequencies. A. Pulsed stimulation of excitatory cells shows a higher relative power in the stimulated neurons at low frequencies (20 and 40 Hz). B. Pulsed stimulation of inhibitory cells reveals neuronal entrainment, i.e., a peak in their relative power, in the high gamma range (80-100 Hz). C. Simultaneous pulsed stimulation of both populations reveals a strong entrainment of inhibitory cells in the high gamma range, and a more modest entrainment of excitatory cells at low frequencies.