1 Introduction

Transcranial direct Current stimulation (tDCS) is a widely used neuromodulation technique based on the use of weak electric currents (typically up to 2 mA) delivered at the level of the scalp. tDCS has been tested in a large panel of neurologic and psychiatric conditions such as stroke, Parkinson disease, dystonia, AD, chronic neuropathic pain, primary headache, tinnitus addiction, eating disorders, and Tourette’s syndrome (Lefaucheur et al. 2017). Anodal stimulation (by convention, induced by a positive electrode) has been shown to enhance excitability of the targeted cortical networks and to improve the clinical symptoms caused by a loss of cortical function (Filmer et al. 2014; Krause et al. 2013; Nitsche and Paulus 2001; Sellaro et al. 2015). In contrast, cathodal stimulation has mainly inhibitory effects and could be useful in conditions linked to a pathological hyperexcitability (Biabani et al. 2018; Gschwind and Seeck 2016). In this regard, cathodal tDCS has been used in various types of epilepsies in order to decrease the excitability of the seizure onset zone (see review in XXXX) and subsequently the occurrence of seizures. However, clinical results are variable but several studies have reported a reduction of the seizure frequency and/or a reduction of epileptiform activity, either on the short-term (minutes to hours after cathodal tDCS) or on the long-term (days after after cathodal tDCS) (San-juan et al. 2015).

While conflicting data exists in the literature on the consistency of these effects(Lefaucheur et al. 2017), there is now converging evidence that the weak electric fields induced by tDCS (on the order of 1 V/m, i.e. subthreshold), can modulate neuronal function. In particular, it is estimated that a tDCS intensity of 1 mA generates electrical fields at the level of cortical neurons in the 0.2–0.5 V/m range (Datta et al. 2009; Modolo et al. 2018; Sadleir et al. 2010). The impact of tDCS at an intensity of 2 mA on the neuronal resting membrane potential is estimated on the order of 0.2 mV (Esmaeilpour et al. 2018; Miranda et al. 2006). This depolarization value is too small to reach the spiking threshold.

Unfortunately, the effects of such weak electric fields are overlooked in the literature. Most in vitro studies investigating cellular mechanisms make use of electric fields that are 10 to 100 times higher than those generated by actual tCS. This limitation was addressed in a few in vitro studies which made use of more realistic tDCS/tACS-level electric fields (0.5 to 1 V/m) stimulation. Results confirmed an average of 0.12 mV depolarization of the cell bodies for each 1 V/m of applied field (Jefferys et al. 2003), and simulated results predicted a modulation of axon terminals polarization that are two–three fold more sensitive than somas (Reato et al. 2010). While the impact of electric fields of such magnitude on single neuron activity is almost negligible, the situation might be different at the level of local neural networks involving several thousand neurons (Dayan et al. 2013).

We developed a novel computational model combining the advantages of both cellular and neural mass levels. Indeed, the model explicitly represents individual neurons that are synaptically connected. This approach differs from the classical HH formalism as it implements physiology-based input/output functions of neurons instead of transmembrane ionic currents controlled by voltage-gated channels. It is worth noting that the model accounts for basic rules of synaptic plasticity and tDCS effects at the level thousands of synaptically-connected physiologically-relevant individual neurons. Following this approach, we simulated a cortical patch able to reproduce a pathological condition of hyperexcitability, giving rise to increased synchronization among neurons and ultimately to, epileptic spikes. From the simulation of tDCS applied to this network, insights could be gained into the multi-faceted - possibly synergetic - mechanisms of acute and long-lasting effects of tDCS onto neurons and neural networks in general and into the therapeutic effects on the epileptic cortex in particular.

2 Method

2.1 Model design principles

Experimental data suggest that neurons exposed to tDCS remain in a physiological functioning mode (Jackson et al. 2016), and that network effects emerge from slight modifications in many parameters linked to synaptic and membrane properties exposed to tDCS (Rahman et al. 2017). Therefore, modeling these effects, as well as modeling synaptic physiological plasticity, requires that each synapse and soma can be represented separately. This is usually achieved in the general framework of microscopic models, on which this study is grounded.

Along this line, we developed a model of a neocortical patch respecting the distinction of 5 layers and different category of excitatory principal cells (PC) and inhibitory interneurons (IN). The neocortical patch is targeted by thalamocortical glutamatergic projections.

Since the effects of tDCS strongly depend on the orientation of neurites in the electric field (Bikson et al. 2004; Kabakov et al. 2012), we took into account the location of cell bodies and neurites relative to each other and to the electric field assumed to be uniform at the level of a neocortical column.

To account for long term changes of network activity, we implemented two components of synaptic plasticity, namely long term potentiation (LTP) and metaplasticity. Both refer to the property of synaptic gains to change according to the activity of the pre- and post-synaptic neuron(Abraham 2008; Malenka and Bear 2004). LTP was implemented as an alteration of the amplitude of post-synaptic potentials. For metaplasticity, the theory proposed by Bienenstock, Cooper and Munro (Cooper and Bear 2012), known as BCM plasticity, was chosen. This choice was motivated by two advantages. BCM plasticity is strongly related to physiology. It takes into account the homeostatic property of plastic changes, theoretically avoiding the neuronal activity to fall to zero or diverge to infinity. In addition, it can be easily implemented in neuron models (see section 2.3; plasticity, below).

2.2 Model structure

A cortical patch model approximately matching a cortical column size (Mountcastle 1997) was designed. It comprised around 104 neurons and 500 synapses per neuron. The majority of neuron-to-neuron connexions are underlied by several synapses (Fauth et al. 2015; Hiratani and Fukai 2018). To account for this redundancy, depending on the type of neuron, their morphology and the distance between the source and the target neuron, 2 to 100synapses arising from a source neuron were considered as a single synapse on the target neuron. Main features of the model architecture are summarized hereafter.

2.2.1 Cell types

Four types of neurons were considered based on histological studies (Tremblay et al. 2016). Their physiological and anatomical characteristics were assumed uniform within each cortical layer (Fig. 1a). In our model, glutamatergic excitatory principal cells accounted for 70 to 80% of neurons among layers. In layer 4 they were represented by spiny stellate cells. In other layers they were pyramidal cells. The remaining cells were gamma-aminobutyric acid (GABA)-ergic interneurons, among which we distinguished 3 subtypes, meant to represent nearly 100% of GABAergic neurons (Rudy et al. 2011). These included 40 to 50% of parvalbumin expressing neurons (PV), represented by basket cells, 30 to 40% of somatostatin expressing interneurons (SST) represented by Martinotti cells, and 10 to 20% of vasointestinal peptide expressing interneurons (VIP).

Fig. 1
figure 1

Network anatomy (a): Simplified description of the cortical architecture and connectivity. Distant thalamocortical and cortico-cortical excitatory connections mainly project onto layer 4 and 2–3, respectively. Glutamatergic principal cells (PC) from layer 4 project to layers 2–3 and 5, 5 to 6 and 6 to 4. PC from layer i) 2–3 project to distant cortex, ii) 6 to thalamus and iii) 5 to other subcortical structures. Gamma-aminobutyric acid (GABA)-ergic cells include three main types of interneurons. Dendritic-targeting, Somatostatin expressing (SST) GABAergic interneurons (INs) predominate in lower layers and project to upper layers. SST INs target PC and parvalbumin expressing (PV) interneurons. PV INs are more uniformly distributed and have local inputs and outputs achieving feed-forward inhibition (FFI) and feedback inhibition (FBI) with PC; Vasointestinal peptide expressing (VIP) interneurons predominate in upper layers and mainly project to lower layers. b: Illustration of a subset of neurons (n = 5000) in the simulated cortical patch: PC (in red) and their apical dendrites varying in height among layers; SST (blue), PV (green) and VIP (yellow). Thalamocortical projections are schematized at the lower part. c: Network of a single PC (layer 2–3): grey lines denote all the intracortical inputs (about 500 per cell). Colored dots represent target cells. The afferent connections are represented by polylines converging to the cell, the middle vertex representing the spatial location of the synapse (many of them are in layer 1, due to the apical dendrite that is not represented)

2.2.2 Anatomical structure

According to data on human (Harris and Shepherd 2015; Jiang et al. 2015; Markram et al. 2004; Mohan et al. 2015; Spruston 2008) and mammalian (Braitenberg and Schüz 2013; Harris and Mrsic-Flogel 2013; Meyer et al. 2010; Prönneke et al. 2015; Wang et al. 2004) cortex cytoarchitecture, we definedthe cell type proportions, the cell type axonal and dendritic tree shape, the mean connectivity from a cell population to another, within each layer and among layers (Harris and Shepherd 2015; Purves et al. 2001; Squire 2013; Thomson and Bannister 2003; Thomson and Lamy 2007). Parameters are summarized in Table 1.

Table 1 Main characteristics of the populations of neurons by type and location (layer), in terms of proportion (PC: glutamatergic principal cells; SST, PV, VIP: GABAergic interneurons expressing somatostatin, parvalbumin, and vasointestinal peptide, respectively)

The model included five layers corresponding to layers 1, 2 + 3, 4, 5, and 6 (Fig. 1a). As layers 2 and 3 share close properties in terms of connectivity and composition (Mohan et al. 2015; Purves et al. 2001), they were considered as a single layer. Indeed, in some non-human mammal brains and in some human cortical areas layers 2 and 3 are not distinguished. Layer 1 consisted only of synapses and was empty of neuron somas. The layers were stacked on a perpendicular axis, called radial (relative to the center of the brain). The structure was invariant with respect to orthoradial translation. Every layer was composed by several populations of glutamatergic and GABAergic cells, statistically uniform in composition and connectivity with other intra- and extra-layer cell populations.

2.2.3 Cell shapes and connectivity

The axonal and dendritic trees were assumed to be invariant with respect to rotation on a radial axis. Thus, for a given neuron, they are characterized by a 2D position and a radius varying from 0 to 350 μm among cortical layers.

The connections between neurons were computed in each layer according to the average total number of afferent connections, to the overlap of dendritic and axonal trees in the given layer (Packer et al. 2013) and to a connection specificity between cell types (Fig. 1b). Every cell soma was spatially localized. For each cortical layer L, given i) the type and layer {Tpre, Lpre} of the presynaptic cell population, ii) the type and layer {Tpost, Lpost} of the postsynaptic population, we computed, the average number of afferent synapses from the neurons of the {Tpre, Lpre} population towards one neuron of the {Tpost, Lpost} population as follows. For each postsynaptic neuron, presynaptic neurons in its vicinity were selected according to a gaussian probability law. Each synapse was then positioned in the vertical plane containing the pre- and postsynaptic somas (Fig. 1c), at random height in layer L. In order to obtain a connectivity scheme resembling that of the actual neocortex, the radiuses of the axonal and dendritic trees of each type of neuron among layers were scaled such that the relative number of connections was realistic for each population were adjusted such that the total number of input synapses was in the defined range (500 afferences in average) while respecting the relative quantities of inputs from each population in each layer.

2.2.4 Distant afferences

In order to simulate the input of distant regions to the cortical patch, we integrated glutamatergic projections on layers 2, 3 and 4, which accounted for both thalamocortical afferences and cortico-cortical inputs, as determined by a literature review (Ji et al. 2016; Kuramoto et al. 2009; McGuire et al. 1984; Meyer et al. 2010; Tlamsa and Brumberg 2010). A population of principal cells (PC), called input cells, and representing 7% of the cortical neurons, generated an autonomous excitatory glutamatergic input onto the cortical patch (O’Kusky and Colonnier 1982; Peters et al. 1994). The axonal tree of these input cells was larger in the 4th(for thalamocortical input) and in the 2nd -3rd (for cortico-cortical) layers. Incoming action potentials were randomly distributed with a firing rate of 4 to 5 Hz. Consistently with physiology (Gil et al. 1999) the weights of excitatory synapses from the input cells were 3 to 4 times larger than between local PCs.

2.3 Model function

The neuron function was based on a classic “integrate and fire” principle: an action potential (AP) was emitted by a neuron, outside a refractory period after a previous AP, whenever its membrane potential was higher than its AP threshold (Fig. 2a, left). Each AP was followed by a refractory period and a membrane hyperpolarization. Due to this functioning, the firing rate of a single neuron was related to its membrane potential by a hyperbolic tangent-like function, which is physiologically relevant (Fig. 2amiddle). Each AP was transmitted to efferent synapses.

Fig. 2
figure 2

Synaptic and neuronal dynamics (a): Functioning features of a neuron: an action potential occurs when the cell membrane potential exceeds the firing threshold, and is followed by a hyperpolarization (left); The firing rate response curve to an increasing afferent stimulation has an initial hyperbolic tangent-like shape (middle). Illustration of a glutamatergic simulated post-synaptic potential (PSP) that is a sum of decreasing exponentials, whose time constants have been chosen to fit real PSP properties (right). b: Plasticity induces synaptic gain changes at the level of each synapse, simulating long-term Potentiation (LTP) or long-term depression (LTD) adjusted by the θm parameter. According to the BCM principle this threshold parameter slowly moves proportionally to the activity of the post synaptic neuron, which results in homeostatic plasticity. Abbreviation: BCM: Binenstock, Cooper and Moore plasticity rule; FR: firing rate

The activation of a synaptic terminal following the arrival of an AP from the presynaptic neuron was dependent on a probability of release (Branco and Staras 2009). Upon activation, glutamatergic or GABAergic postsynaptic potentials were simulated with physiologically relevant kinetics and amplitude (Fig. 2aRight). The postsynaptic potential (PSP) was characterized by Rise and Decay time constants, an amplitude determined by the synaptic gain, and a positive (depolarizing, excitatory synapse) or negative (hyperpolarizing, inhibitory synapse) sign. A single PSP was shaped according to rise and decay time constants used in exponential functions of the type \( \left(t-{t}_0\right).{e}^{-\frac{t-{t}_0}{\tau }} \), if the incoming AP occurs at t0, which is a simplified but physiologically relevant shape (Attwell and Gibb 2005). The synapse transfer function was computed by the Laplace transform of its impulse response (i.e. a PSP in response to a unique AP) which is of the type \( \frac{1}{{\left(s+\frac{1}{\tau}\right)}^2} \), (where τ denotes the rise and decay time constant values). As a result, PSPs were obtained by solving a set of second order differential equations.

For each neuron, the membrane potential was calculated by adding the postsynaptic potentials of the synapses to its resting potential. AP threshold, refractory period, post-AP hyperpolarization, sign, probability of release, and PSP morphology were specific to the type of presynaptic neuron. Synaptic gain was synapse-specific. Each of those parameters was stored individually for every neuron and synapse, so that they can be separately modified, in our case through simulated tDCS.

Based on previous studies (Farrant and Nusser 2005; Shamas et al. 2018; Zito and Scheuss 2009) PSPs were characterized by the TPeak and TDecay constants. TDecay is defined by the peak value divided by the constant e. The TPeak values used in the model for PC, SST, PV, VIP were 6, 29, 1, and 6 milliseconds respectively, and TDecay values were 32, 94, 19, and 32 milliseconds, respectively.

2.3.1 Plasticity

We implemented NMDA-dependent long term potentiation / depression (LTP / LTD) and homeostatic BCM-like plasticity (Fig. 2b). We applied plasticity to PC - > PC synapses exclusively, as plasticity of IN remains largely unknown. BCM Plasticity according to rules (Bienenstock et al. 1982; Cooper and Bear 2012) relies on a function called φBCM(1), that determines the variation of each synaptic weight.

$$ \frac{dw_j}{dt}={\varphi}^{BCM}\left(y,{\theta}_m\right).{x}_j $$
(1)

where wi is the weight of an excitatory synapse; xi is the activity of the presynaptic neuron; y represents the activity of the postsynaptic neuron; θm is the moving threshold determining the switch between LTP and LTD; φBCM(y, θm) is defined on positive real numbers by the following features: φBCM(0, θm) = 0; y < θm ⇒ φBCM(y, θm) < 0, results in long term depression. φBCM(θm, θm) = 0; y > θm ⇒ φBCM(y, θm) > 0, results in LTP.

In order to achieve homeostatic plasticity, the θm threshold varies (2), according to y

$$ {\theta}_m(t)\kern0.5em \propto \kern0.75em \frac{1}{\tau }{\int}_{-\infty}^t{y}^2\left({t}^{\prime}\right).{e}^{-\frac{t-{t}^{\prime }}{\tau }}d{t}^{\prime } $$
(2)

The more active the post-synaptic neuron, the larger θm, resulting in a negative retroaction (homeostatic) on the activity through a decrease of the afferent synaptic weights.

The function used the most frequently for φBCM is: \( \frac{dw_j}{dt}=y.\left(y-{\theta}_m\right).{x}_j/{\theta}_m \) . However, in the case of the hyperexcitable network described below the retroaction had to be strengthened to avoid divergence of the system. This was achieved by introducing a coefficient \( \frac{dw_j}{dt}=y.{\left(y-{\theta}_m\right)}^k.{x}_j/{\theta}_m \), k > 1 (in practice, k equals 1.8).

The time constants of plasticity were chosen at least one order of magnitude higher than PSP time constants for the LTP / LTD, and at least 100 times for the homeostatic plasticity.

2.3.2 Normal vs. hyperexcitable network

The epileptogenic cortex is characterized by an impairment of the excitation / inhibition balance, which is shifted towards excitation (Fisher et al. 2005). Regarding interneurons, this imbalance is mainly related to a decrease in the proportion of SST positive interneuron and an increase of the size of their axonal tree (Arain et al. 2012; Lopantsev et al. 2009), and an increased activity of PV positive interneuron(Cossart et al. 2001). Regarding the PC, animal studies showed that glutamatergic synapses undergo pathological changes, including an increase in the size of dendritic spines, which results in abnormally high synaptic gains as shown by animal studies (Avramescu and Timofeev 2008; Leite et al. 2005; Wong and Guo 2013) and modeling (González et al. 2015).

With the aim of modeling a realistic pathological “epileptic-like” condition, we designed an hyperexcitable network by applying the following modifications from the normal physiological condition: (1) a decrease in the proportion of SST interneurons, (2) an increase in the size of their axonal tree, (3) a slight increase in the proportion of PV interneurons, (4) an increase in the synaptic gains of PC - > PC and PC - > PV and (5) a slight decrease of PV - > PC gains.

2.4 Simulation of tDCS

DC stimulation can cause membrane potential variations at the soma, dendrite and axon levels. Those variations, combined with NMDA-dependent plasticity, have been proposed to account for some long-lasting effects (Liebetanz et al. 2002; Nitsche et al. 2003). Simulating immediate tDCS effects can be achieved by first approximating the variations of membrane potentials induced by tDCS at somatic pre- and post-synaptic levels, and then by modelling their impact on the neuronal function. This impact should explain immediate effects and, when combined with physiological plasticity, could account for some long-lasting effects.

In a study modelling membrane potential variations in a static electric field, it has been previously established that a low resistivity cable in a uniform electric field tends to polarize exclusively at its extremities (Rahman et al. 2013). These authors predicted that, although the inner part of an axon is not a perfect conductor and the cell membrane not a perfect isolator, the cable approximation is valid to a certain extent and tDCS preferentially polarizes the neurite terminals. In our model, we considered that a neurite directed towards the anode was hyperpolarized as in (Rahman et al. 2013). This variation in membrane potential was assumed to be related to i) the distance between the cell body and the axonal end as well as ii) the direction of the electric field generated by tDCS at the considered location. In practice, and as illustrated in Fig. 3a, the electric field was presumed radial, which corresponded to a cortical patch located on a gyrus convexity. The variation in the membrane potential was approximated by the dot product between the field vector and the vector pointing from the soma to the synapse (Fig. 3a).

Fig. 3
figure 3

tDCS Simulation (a): Investigated cellular and synaptic mechanisms. The simulated stimulation modifies the membrane potential of 1/ cells whose body is non-symmetric regarding the orthoradial plan, ie principal cells having apical dendrite; 2/ the axonal presynaptic terminations, proportionally to the dot product between the electric field E (blue arrow) and the [pre synaptic soma - > synapse] vector (dash arrow); and 3/ the dendritic post-synaptic compartment, according to the dot product between the electric field E and the [post synaptic soma - > synapse] vector. b: Effects of tDCS induced membrane potential variations on subcellular neurophysiological mechanisms: Left, Top to bottom: basic condition. Action potentials (AP) arrive on the presynaptic compartment; the neurotransmitter is released in the synaptic cleft and bounds to its receptors on the postsynaptic compartment, generating a post synaptic potential (PSP). Right: with simulated stimulation. The variation in the membrane potential is subtracted from the AP threshold, thus modulating the neuron excitability. The probability of neurotransmitter release at the axonal termination varies, decreasing when the AP propagates towards the cathode. tDCS effects are cell- and synapse-specific, depending on their relative location in the electric field. Network effects emerge when small tDCS-induced changes are repeated on a large set of interconnected cells (about n > 1000)

2.4.1 Soma

Considered neurons were those with a dendrite strongly asymmetrical with respect to the orthoradial plan. Principal cells in layer 4 have no apical dendrite, neither do GABAergic interneurons. We considered therefore that the membrane potential of their soma was not modified by stimulation (Fig. 3a, left). Only the somas of pyramids in layers 2–3, 5 and 6 were influenced. In this case, anodal stimulation (apical dendrite directed towards the positive electrode) depolarized the cell body while cathodal stimulation had the opposite effect (Fig. 3a). We estimated the intensity of tDCS effects based on the work of Rahman and Bikson (Rahman et al. 2013). The field induced by stimulation ranged between 0.1 and 1 V.m−1 and resulting membrane potential variations were lower than 1 mV.

per V.m−1. In the model those variations directly summed up with the resting potential of the soma, and consequently had an effect on the membrane threshold.

2.4.2 Neurites

According to Kabakov and collaborators (Kabakov et al. 2012), the effect of an electric field is marked on the pre-synaptic compartment but not on the post-synaptic one. Moreover, this effect depends on the AP propagation direction with respect to the field. An AP propagating parallel to the field and towards a cathode generates a smaller local field potential than without stimulation. An AP propagating towards an anode generates a PSP of the same or slightly greater amplitude. The effect is negligible for perpendicular fields.

Since the presynaptic effect is predominant and in accordance with the “all or nothing” mode of function of a chemical synapse, an action on the probability of release of the synapses was assumed. The probability of release decreased when the axonal end was depolarized (Fig. 3b).

The impact of tDCS-induced electric fields on post-synaptic compartments is more ambiguous and has not been demonstrated. However a hypothetical effect on the PSP amplitude has been tested in our model (Fig. 3b).

2.5 Evaluation of network effects

The large network comprised 104 neurons and 500 synapses per neuron (not counting redundant synapses). To evaluate the network effects of stimulation in the epileptic condition, the size of the network was reduced, both in terms of number of neurons and of synapses per neuron, while keeping the architecture and proportions of neurons. Hence, we built smaller networks of 1000 neurons / 100 synapses per neuron, and 250 neurons / 40 synapses per neuron.

As compared to the large network, synaptic gains in smaller networks (relative to the number of synapses) were slightly adapted to obtain an hyperexcitable network that produced epileptic spike-like events at an approximately similar frequency.

2.6 Output variables

The measured outputs were the instantaneous firing rate and membrane potentials of the neurons. The mean instantaneous membrane potential of PC (most abundant cells of layers 2–3, 5 and 6), was used to simulate (approximate) local field potentials. As PC of layer 4 are stellate cells which do not have an apical dendrite, they contributed less to the LFP (Murakami and Okada 2006) and were excluded from the LFP computation.

To measure the effects of stimulation on the hyperexcitable network, we counted simulated epileptic spike-like events before, during and after stimulation. This count was performed per unit of time by thresholding the instantaneous energy of the signal.

2.7 Implementation in practice

For the time resolution, a 1/1000 s step was chosen as a good compromise between computation time and the time scales of inner and output variables variations. Indeed, the rise and decay time constants of PSPs ranged from 1 to 30 ms. The variables characterizing the states of individual synapses and neurons at every time step could not be integrally stored for the whole duration of the simulations, because of their size. We only stored the mean membrane potential of each population in order to compute the LFP.

The computation of PSPs for all the synapses is time-consuming. As it is intrinsically parallel, it can be run on a graphics processing unit (GPU). We implemented an algorithm to compute the value of every PSP in a couple of operations using an intermediate variable that is equivalent to the neurotransmitter concentration in the synaptic cleft, as well as rise and decay time constants.

To compute the PSP of a synapse, each time step requires three multiplications and two additions.

$$ \mathrm{SC}\left(\mathrm{t}+\mathrm{TS}\right)=\left(\mathrm{SC}\left(\mathrm{t}\right)+\mathrm{AP}\right).\left(1\hbox{--} \frac{\mathrm{TS}}{\mathrm{TR}}\right) $$
(3)
$$ \mathrm{PSP}\left(\mathrm{t}+\mathrm{TS}\right)=\left(\mathrm{PSP}\left(\mathrm{t}\right)+\mathrm{SC}\left(\mathrm{t}\right).\frac{\mathrm{TS}}{\mathrm{TR}}\right).\left(1\hbox{--} \frac{\mathrm{TS}}{\mathrm{TD}}\right) $$
(4)

In the above equations t stands for the time, TS for the sampling step, and TR (rise) and TD (decay) for the time constants (TD is assumed to be larger than TS, both are related to the rise and decay of the PSP). AP represents the incoming action potential, its value being set to 0 most of time, and to 1 when both an AP arrives and the neurotransmitter is released. SC (synaptic cleft) is a variable representing the kinetic of neurotransmitter concentration in the synaptic cleft and PSP is the final variable to compute.

It is noteworthy that at every time step, the amount removed from SC, is added to PSP, which is consistent with a chemical reaction which, in our case, represents the binding of the neurotransmitter to its receptor on the postsynaptic compartment).

Passing to the limit,

\( \frac{\mathrm{dSC}\left(\mathrm{t}\right)}{\mathrm{dt}} = -\frac{\mathrm{TS}}{\mathrm{TR}}.\mathrm{SC}\left(\mathrm{t}\right) \) which implies \( \mathrm{SC}\left(\mathrm{t}\right)=\exp \left(-\frac{\mathrm{TS}}{\mathrm{TR}}.\mathrm{t}\right) \) up to a constant multiplier.

This means that the neurotransmitter concentration decreases exponentially, which is consistent with a biochemical binding process. Similarly,

$$ \frac{\mathrm{dPSP}\left(\mathrm{t}\right)}{\mathrm{dt}}=-\mathrm{PSP}\left(\mathrm{t}\right).\left(1-\frac{\mathrm{TS}}{\mathrm{TD}}\right)+\left(1-\frac{\mathrm{TR}}{\mathrm{TD}}\right).\exp \left(-\frac{\mathrm{TS}}{\mathrm{TR}}.\mathrm{t}\right) $$
(5)

which implies

$$ \mathrm{PSP}\left(\mathrm{t}\right)=\mathrm{C}.\frac{\mathrm{TD}.\mathrm{TR}}{\mathrm{TS}.\left(\mathrm{TD}-\mathrm{TR}\right)}.\exp \left(-\left(1-\frac{\mathrm{TS}}{\mathrm{TR}}\right).\mathrm{t}\right)-\left(1-\frac{\mathrm{TS}}{\mathrm{TR}}\right).\exp \left(-\left(1-\frac{\mathrm{TS}}{\mathrm{TR}}\right).\mathrm{t}\right) $$
(6)

As C accounts for an integration constant.

Thus, PSP is a sum of two decreasing exponentials. This is consistent with physiological data (Attwell and Gibb 2005) and with the neural mass used to model epileptic activity (Wendling et al. 2002). For each type of synapse different TR and TD were chosen to fit at best real PSPs.

The algorithm can be run using large arrays, each of one gathering the same variable for all the synapses, for instance: SC, PSP or (1-TS/TR). The arrays were stored on a graphic card’s Video RAM, to speed up the computing. In order to ease the summation, 2D arrays were used, in which one column stores the same variable for all the afferent synapses of one neuron. Overall, a time step represents five basic operations on single precision format arrays, plus a column summation to compute the soma membrane potential. The same principle was used to compute variables associated with plasticity, namely, x y and θm as defined in the Eqs. (1) and (2).

3 Results

3.1 Simulation time

One second of activity of a cortical patch comprising 104 neurons and 5.106 synapses can be simulated in about 30 real seconds. In order to limit the duration of simulations, this ratio of 30/1 forced us to lower plasticity time constants as much as possible, while keeping them at least an order of magnitude higher than the synapses time constants.

3.2 Network functioning in non-hyperexcitable condition

After initiation, the synaptic gains were modified through plasticity and the network converged towards a balance that was reached approximately within one hundred-fold the time constants of the homeostatic plasticity. LFPs produced by the network varied in frequency according to the strength of the input noise, mostly in the gamma band (Fig. 4a). The frequency slightly increased when the afferent excitation increased. These gamma rhythms were mainly produced by oscillations between PCs and PV interneurons in accordance with well-established experimental results (Cardin et al. 2009; Sohal et al. 2009; Traub et al. 1996), see section 4.

Fig. 4
figure 4

Network dynamics Examples of network activity related to simulated physiological processes. a: in a “normal” network, the loop between glutamatergic principal cells (PC) and parvalbumin expressing (PV+) Gamma-aminobutyric acid (GABA)-ergic interneurons (INs) produce gamma rhythms. b: in a hyperexcitable network, the increased positive retroaction between PC produces a synchronized hyperactivity which in turn activates Somatostatin expressing (SST+) GABAergic INs, resulting in an epileptic spike-like event. c: examples of output variables of the model in a hyperexcitable configuration. Top to bottom: Local Field potential, computed from the PC mean membrane potentials; Membrane potentials of a PC, a PV, a SST and a Vasointestinal peptide expressing interneuron (VIP): an action potential (AP) occurs when the membrane potential passes the cell’s AP threshold; APs of all the neurons, sorted by type and layer: note the hypersynchronous discharges resulting in an epileptic spike-like event

3.3 Network functioning in hyperexcitable condition

Following the application of plasticity, the hyperexcitable network was less stable than the control network. Depending on the strength of the retroactions between activation and inhibition, the application of plasticity may induce a divergence of the synaptic gains towards a non-realistic condition (eg a few gains approach infinity whereas the others decrease towards zero). However, the anatomical and physiological parameters could be tuned in order to have the network converge towards an epileptic-like stable state, while respecting the characteristics mentioned above.

As compared to the control network, gamma rhythms produced in the hyperexcitable network were less regular and less modulated. In addition, epileptic spike-like events were also generated in the hyperexcitable network. The positive retroaction between PCs induced synchronous discharges of AP, provoking the activation of SST interneurons which in turn inhibited the whole network (Fig. 4b). This resulted in a sharp decrease of the mean membrane potential. A simulated epileptic spike-like event involved synchronized action potentials generated by 8% of PCs, and by a much larger percentage of IN (up to 27% PV, 44% SST, and 10% VIP) (Fig. 4c).

3.4 tDCS simulation

The effect of simulated cathodal stimulation on the hyperexcitable network is depicted in Fig. 5a. Under cathodal tDCS simulated stimulation the number of epileptic spikes in the LFP decreased as well as the firing rate of pyramidal cells and of GABAergic interneurons.

Fig. 5
figure 5

tDCS action a: examples of output variables of the model in a hyperexcitable configuration. Note that the SST activity is more regular. The absence of spikes partly explains the decrease. In this example, there is no hypersychronous discharge, resulting in a more regular oscillatory activity in the gamma band. b: decrease in the mean firing rate of the neuron populations under simulated tDCS. The most concerned are Vasointestinal peptide expressing interneurons (VIP), then Somatostatin expressing interneurons (SST). However, in the hyperexcitable network the SST activity is mainly due to epileptic-like spikes (as shown in Fig. 4)

During cathodal tDCS the firing rate of PC and SST/PV was decreased by 25 to 37%. VIPs, that normally inhibit SSTs in the control network, were especially affected by tDCS as the firing rate was decreased by 45% with respect to network activity without stimulation. As illustrated in Fig. 5a, SST interneuron activity was more regular during tDCS. In this example, there is no epileptic spike-like event, which consequently led to a more regular gamma band oscillatory activity in the LFP.

3.5 Network effects

Cathodal tDCS induced both acute (time 0) and after (0 to 100 s) effects on the number of epileptic spikes generated by the large 105 neuron network model (Fig. 6a). After the stimulation, epileptic activity slowly reached back its pre-stimulation level (Fig. 6a). During stimulation, the introduction of plasticity induced a slow shift of synaptic gains. It is noteworthy that this effect was obtained for a limited range of plasticity parameters (mainly the enhancement of synaptic weight was limited to a maximum of 3fold the initial values). Outside this range, synaptic weights reached non-physiological values, falling to zero or diverging towards infinity.

Fig. 6
figure 6

Lasting effects of tDCS depending of the network’s size Count of the epileptic-like spikes occurring by second in a hyperexcitable network implementing homeostatic plasticity. A time unit represents 10 s and 2.5 BCM time constants. The network is previously stable due to plasticity application during 100 time units. Stimulation is applied for 2 time units then cut off. a: large network: When the stimulation occurs, the occurrence rate of epileptic spikes drops during the stimulation time, then progressively returns to pre-stimulation baseline. b and c: medium and small networks: the occurrence rate of spike like events is more irregular. The stimulation has the same instant effects but the lasting effects are weaker. d: large network without plasticity: as expected, the occurrence rate of epileptic spikes returns to its previous state immediately after stimulation has been cut off, since without plasticity the synaptic weights have not changed e: Duration of tDCS-induced decrease of epileptiform activity in function of network size. Note that lasting effects reach a maximum in large networks>10,000 neurons

The same stimulation protocol for a network comprising 103 neurons and 100 synapses per neuron, caused immediate effects but lasting effects were either shorter (0–20 s) or inexistent (Fig. 6b). On a smaller network of 250 neurons and 40 synapses per neuron, the stimulation protocol induced no lasting effects (Fig. 6c).

Expectedly, only immediate effects were induced by tDCS when the mechanisms of plasticity were removed from the large 10,000 neurons model. In this case the network went immediately back to its initial excitability level after stopping the stimulation (Fig. 6d).

4 Discussion

In this study, a network model of a thalamocortical networks comprising 10,000 individual neurons, based on physiological data, was built in order to investigate and explain the potential cellular mechanisms of tDCS on epileptic activity.

The individuation of every synapse provides the opportunity to model the combined effects of neuromodulation and plasticity, taking into account the microarchitecture and connectivity of the cortex. The main results, discussed hereafter, logically relate to the role of this architecture in the tDCS effects, and the involvement of the main cell types, especially the VIP positive interneurons. Finally, the link between immediate and after effects of tDSC through plasticity is addressed.

The network designed to simulate a normal cortical patch in physiological condition produced gamma activities, resulting from the oscillations between PC and PV. This result is in accordance with physiological data (Cardin et al. 2009; Sohal et al. 2009; Traub et al. 1996).

The network designed to simulate a pathological epileptogenic cortical patch was obtained by applying architectural modifications to the physiological patch, consistently with biological data. Results showed that it could produce epileptic spike-like events, involving more GABAergic neurons than PC, as shown in experimental data (Lévesque et al. 2016).

The model showed that it is possible to account for both immediate and delayed effects of tDCS directly related to membrane polarity variations of soma and axonal endings and homeostatic plasticity. The simulated neurons remain in a physiological operating range, which is coherent with neuromodulation rather than stimulation. The simulated effects mostly rely on a presynaptic modulation, in accordance with literature (Kabakov et al. 2012).

It should be mentioned that non-synaptic mechanisms can also be involved in the hyperactivity/hypersynchronization present during epileptiform activity, as shown by different in vitro/in vivo animal models, and that DC stimulation can interfere with these mechanisms (Bikson et al. 1999; Ghai et al. 2000). However, since the cellular and molecular targets in this effect are not fully identified we chose to implement only synaptic mechanisms.

Our results showed that the immediate effects of cathodal tDCS include a decrease in the firing rate of all types of cells, which is coherent with physiological data (Stagg et al. 2009) .

This effect is stronger on the VIP interneurons. This is partly due to their predominance in the upper layers of cortex (Prönneke et al. 2015). More generally, it suggests that the architecture of the cortex in terms of cell repartition among layers, could be crucial to explain tDCS effects. These results have also been suggested in previous work (Williams and Holtmaat 2019).

Many studies have addressed the relationship between brain stimulation and synaptic plasticity (Stagg et al. 2018). The persistent effects of tDCS indicate an impact on plasticity, but this impact is still poorly understood. Anodal tDCS has been studied more than cathodal stimulation. Many molecular and morphological mechanisms have been invoked and would be linked to changes in synaptic plasticity, such as BDNF expression induced by tDCS (Fritsch et al. 2010; Pelletier et al. 2015). tDCS modulates LTP and LTD (Márquez-Ruiz et al. 2012) which is coherent with the hypothesis that long-term effects partly rely on plastic changes due to immediate effects (Liebetanz et al. 2002).

Lastly the model also suggests that tDCS long lasting effects partly rely on the network: they are weaker as the network size and connectivity decrease. Neuromodulation relies on slight changes in elementary neurophysiological parameters at the cell level (i.e. membrane resting potential and probability of release), magnified by network effects (number of neurons and plasticity of connections impacted by the weak electric field) (Dayan et al. 2013; Reato et al. 2010).

The computation methods are a compromise between realism and size of the network through the simulation time. Up to an order of magnitude of 107 synapses, this time (30 s simulation time for 1 s simulated activity) is reasonable on a mainstream GPU. The size is not only limited by the number of cores but also by the VRAM capacity, since the variables (four floating point formats for one PSP, idem for plasticity) are stored on the graphic card. Any transfer between DRAM and VRAM is time consuming, so that for small networks (up to 105 synapses) the time of simulation is shorter on the CPU, in which case it increases almost linearly with the number of synapses. When the network size increases the simulation time on GPU remains almost constant up to 106 synapses (mainly consisting of transfers) and then linearly increases until the size of the network exceeds VRAM. The use of half precision floating point format would spare memory while probably keeping enough precision. The use of operations from general-purpose computing on GPU such as “fused multiply-add” would also spare time. Matlab parallel toolbox, which was used to code the model, doesn’t include those features. A C or Python implementation would be longer to achieve but could include those optimizations. As computing power becomes more accessible it will be possible to test larger networks.

4.1 Limitations

The size of the simulated cortical patch is small, resulting in edge effects in inter-neuron connectivity, and difficulty in making it work sustainably as afferent intensity decreases. A larger patch, composed of several cortical columns alongside one another, is likely to have a higher self-activation capacity, which may help maintain a stable alpha rhythm (Lopes da Silva et al. 1980; Naruse et al. 2010). The network is also smaller than a human epileptogenic zone (Jehi 2018). However, in spite of their limited size, either the physiological or the epileptogenic network simulated activities consistent with their design and with experimental data.

The drawback of modeling some of the cortical microanatomy and cellular neurophysiology parameters, is that data from the literature are sometimes limited and ambiguous. Most of the physiological data and some of the anatomical data are not available in human but only in mammal (primate or rodent). Moreover, these parameters vary among cortical regions. For instance, BCM plasticity has only been described in the visual cortex of the cat (Bienenstock et al. 1982).

Nevertheless, the basic neurophysiological features such as synaptic probability of release and PSP, and integrate-and-fire principles remain constant across mammalian species and brain regions. Only the range of some parameters and time constants may differ. BCM-like homeostatic plasticity is likely to be linked to AMPA-R traffic and thus to operate in all PCs. Along the same line, microanatomical data may vary in terms of proportion of neurons, number of synapses, shape of the axonal or dendritic tree, but the layer architecture and the types of neurons are similar.

Regarding the clinical pathology considered, the hyperexcitable network was supposed to represent an epileptognenic cortical patch. Other types of epileptiform markers are observed in the epileptic brain. Deficit of inhibition includes KCC2 downregulation and depolarizing GABA that can be modeled (Kurbatova et al. 2016). Although homeostatic plasticity is still present in epileptic tissue (Swann and Rho 2014), the interplay between physiological and pathological plasticity, that might use distinct signaling pathways, (Leite et al. 2005; Meador 2007; Pitkänen and Engel 2014) were not implemented here, since the tDCS effects on such pathological features is largely unknown.

Lastly, the immediate effects of tDCS on neurites have been studied in vitro on animal brain slices. The assumed effects that have been tested, are extrapolated from those studies and the effect is calculated through a simplified anatomy. All the parameters mentioned above were chosen here to be plausible, if not strictly exact for a given type of cortex. The point was to individualize synapses to point out null-average and network effects of tDCS, interacting on a microscopic scale with synaptic plasticity mechanisms.