### Dynamic changes induced by coupling strength in different models

It has been confirmed that sensory movement at the individual level is not caused by the emission of electricity from individual neurons, but by the collective behavior of many neurons in the cortex, thalamus and spinal cord in the brain system [33, 34]. Therefore, we no longer limit our discussion to a single pathway within or outside the thalamus, but focus on multiple excitatory inputs and inhibitory projections from the cortex and thalamus [35, 36]. In this section, we selected eight coupling strengths *k*_{i} (*i* = 1, 2, 3, 5, 6, 7, 8, 9) between cortex and thalamus as key parameters to explore the dynamic changes of epileptic waveforms in single and coupled models. Our main purpose is to find the dynamic relationship of the system by studying the changes between different single pathways and to pave the way for comparing the dynamical changes induced by electromagnetic induction.

First, we get rid of the electric radiation and simply draw the bifurcation diagrams in the single-compartment model. We can see that in Fig. 2a, with the change of bifurcation parameter *k*_{1}, the system state continuously transits from low discharge to pathological SWDs and high saturation discharge. Interestingly, the same dynamic transfer mechanisms can be seen in Fig. 2h by adjusting *k*_{9} reasonably. We have verified that by adjusting the connection strengths of the two pathways of cortex self-excitation (*k*_{1}) and thalamus self-inhibition (*k*_{9}), the absence seizures can be reproduced and disappeared. In Fig. 2b, with the change of the bifurcation parameter *k*_{2}, the system exhibits a richer dynamical characteristics. When *k*_{2} ≥ 1.604, the system transitions from a low firing state to a tonic state, which corresponds to a dominant frequency around 16 Hz. In Fig. 2c and d, the initial state of the system is high-frequency tonic discharge. With the increase of synaptic connection strengths (*k*_{3} or *k*_{5}), the system changes in three different states. In Fig. 2e we observe more obvious state fluctuations. Not only the lower (0.22 < *k*_{6} < 0.46) coupling strength can initiate SWDs, but also SWDs can be triggered when *k*_{6} > 1.7. Also, a small pathological discharge (1.16 < *k*_{6} < 1.34) appears in the low discharge (0.22 < *k*_{6} < 1.7) region. In Fig. 2f, when *k*_{7} ≥ 1.4, the normal background state of the system is broken and the absence seizure phenomenon occurs. In Fig. 2g, when the coupling strength *k*_{8} is low, the activation level of the RE neuron is small enough to inhibit the TC neuron. So the initial state of the system is high saturated firings. With the increasing of *k*_{8}, the activation of some TC neurons is inhibited, which makes the system appear SWDs. When *k*_{8} ≥ 9.152, the system shows low discharge. Here, we take Fig. 2f as an example, select several specific values to draw the discharge diagrams as shown in Fig. 3, high saturated state (Fig. 3a), SWDs state (Fig. 3b), low saturated state (Fig. 3c) and tonic state (Fig. 3d).

Next, in order to observe what effect the interaction between compartments will have on absence epilepsy. We set the same parameter range for the connection strength of different pathways as the single compartment model, drawing the bifurcation diagrams of the coupled model. As shown in Fig. 4a, with the increase of coupling strength, the steady state is broken when *k*_{1} > 1.48, which changes the model from low firing oscillation to tonic oscillation. And as the inhibition of left compartment to right compartment increases, the dominant frequency corresponding to tonic oscillation gradually decreases. In Fig. 4b–f, we find that the coupled model is prone to transform the tonic oscillation into a fast spike discharge with periodic up and down amplitude fluctuations. Although the waveform changes, the corresponding fluctuation frequency is basically unchanged.

In Fig. 4e, when the coupling strength *k*_{6} is large enough (*k*_{6} > 1.7), the system transitions from SWDs to clonic discharge with a frequency of about 5 Hz. In Fig. 4g, a smaller coupling strength (*k*_{8} = 5.4) makes the system transition from high saturation state to large SWDs state. When *k*_{8} > 9.8, the low firing oscillation of the system disappears and the system behaves as a tonic state. In Fig. 4h, with the increased inhibition of RE neurons at around *k*_{9} = 0.6 the system shows 2–4 Hz spike and slow wave discharge. Until the excessive inhibition of the left compartment on the right compartment increases the connection strength of *k*_{9} to about 1, the pathological state disappears and the system shows low discharge with the frequency of 0 Hz.

Macroscopically, the effects of the coupled model for completely different populations of pathways share a common feature: the expansion of pathological area. We find that the right compartment, whether stimulated by excitability or inhibited projection of left compartment, show the result that the normal background was easily transformed into atypical pathological area. It is particularly noted that in Fig. 4c, d, f, and g the pathological state covers almost more than 80% of the area within the parameters we set. It can be seen that the discussion of complex model is an important part of epilepsy research.

Next, we select several specific parameters in different states to draw the discharge diagram (Fig. 5), and find the special pathological states that do not appear in a single model. As shown in Fig. 5a, the system experience a rapid sharp wave oscillation with a frequency of about 15 Hz and the amplitude exhibits periodic fluctuations when *k*_{2} = 1.65. In Fig. 5b, the system breaks through the typical SWDs and the 3-SWDs around 2 Hz appears as *k*_{6} = 0.21. As shown in Fig. 5c, the system shows 2-SWDs at 2–3 Hz when *k*_{6} = 0.37. The appearance of multiple spike wave discharges often predicts the onset of spasm, which is the main waveform of myoclonic epilepsy [37]. In Fig. 5d, when *k*_{6} = 1.8 the system shows a low-frequency clonic oscillation of about 5 Hz, which has a high amplitude between 0.8 and 0.9. In Fig. 5e and f, we plot the special discharge associated with *k*_{9}. When *k*_{9} = 0.62, the system shows multiple spike complex oscillation with increasing periodic amplitude and frequency essentially greater than 13 Hz. When *k*_{9} = 0.8, the system shows isolated spike oscillation. These two waveforms are mostly related to paroxysmal epilepsy.

### Single model under electromagnetic induction

It has been shown that fluctuations in the membrane potential of neurons can have a significant impact on the distribution of electromagnetic fields, causing changes in magnetic flux and electromagnetic induction across the cell membrane [38, 39]. Therefore, it is crucial to consider the effect of electromagnetic induction on neuronal activity in the model. Memristor is considered as a perfect device to simulate neural synapses, and the artificial neural network using memristor to simulate neural synapses is called memristor neural network [40, 41]. In this section, the classical single cortical thalamus model is improved by using the memristor model with magnetic flux variable, and the main purpose is to use the memristor to regulate the electrophysiological activities of neurons. We investigate the influence of electromagnetic radiation within the nervous system on the dynamic characteristics of different neuron populations, and compare it with a single model free from electrical radiation.

We first explore the dynamic effects of changes in the connection parameters (*k*_{3}, *k*_{5}, *k*_{7}) of cortico-thalamic interactions in a macroscopic sense on the system separately. It can be clearly seen from the bifurcation diagram of Fig. 6a that under the combined effect of *k*_{3} and memristor, the system can transition from tonic oscillation to low firing oscillation with less excitatory stimulus of TC to RE. Compared with Fig. 2c, the high saturated firings when 1.57 < *k*_{3} < 1.67 is converted into SWDs, and the absence seizures of the system are aggravated. In Fig. 6b and c, we observe that electric radiation affects the early generation of HB_{1} point, which means that the tonic state induced by limit cycle ends prematurely. When 0.4009 ≤ *k*_{3} ≤ 1.264, the system transits to a wider range of monostable state. Meanwhile, the electric radiation delays the generation of HB_{2} and HB_{3} points, which is also the reason for the delay and aggravation of SWDs phenomenon in the system.

Compared with Fig. 6e, we can clearly see in Fig. 6f that electromagnetic induction induces more bifurcation mechanisms. In detail, the HB_{1} point is shifted from 1.81 to the left to 0.2077, and the tonic state was well suppressed by the reduction of limit cycle range. When 0.2077 < *k*_{5} < 3.355, the limit cycle disappears and the system converges to a stable fixed point, which corresponds to the low firing oscillation in Fig. 6d. When 3.355 < *k*_{5} < 3.519, the fold of cycles bifurcation (LPC_{1}) appears, making the system transition from monostable to bistable state. When 3.519 < *k*_{5} < 3.59, two stable limit loops appear, making the system transition to tristable state. We suggest that the appearance of 2-SWDs in Fig. 6d is closely related to the generation of LPC_{1}, LPC_{2}. LPC_{1} gradually disappears after the start of LPC_{3} and the system becomes bistable state (3.59 < *k*_{5} < 3.824). When *k*_{5} = 3.824, the appearance of HB_{2} changes the state of the fixed point from stable to unstable, and the system enters a monostable state. When 5.449 < *k*_{5} < 6.654, HB_{3} makes the fixed point return to a stable state, and the system enters the bistable region again. When 6.654 < *k*_{5} < 7, the fold of cycles bifurcation disappears and the system returns to the monostable state.

In Fig. 6g, the system is reduced from the original five states to four states under the action of the memristor, and the tonic state disappears. Comparing Fig. 6h and i, it is not difficult to find that the fold of cycles bifurcations (LPC_{1} and LPC_{2}) of the system advance and the Hopf bifurcation point decreases. Therefore, the system transits from high saturated firings to SWDs with smaller connection strength and the supercritical bifurcation induced by HB_{3} disappears. That is, in Fig. 6h, when *k*_{7} > 2.041, the solutions of the system converge to stable fixed points. To sum up, electric radiation promotes the early generation of pathological state. Fortunately, in Fig. 6a, d, and g, we all see that the tonic oscillation of the system under electric attraction is reduced. In Fig. 6g, the tonic state disappears.

Then we focus on the internal function of cortex and thalamus. In order to independently discuss the influence of electrical stimulation target selection on the neural network, *k*_{0} is also set to 0.5. Then we focus on *k*_{1} and *k*_{2}, and draw bifurcation diagrams as shown in Fig. 7a and d. For the cortical self-excitation pathway PY-PY, the function of memristor is not obvious. The role of the memristor is not obvious. The dynamic transfer mechanism of the system does not change and shows a larger range of the region of low saturated firing under electrical attraction compared to Fig. 4a. In Fig. 7b and c, we find that when the degree of cortical self-excitation is not high, the system will always converge to a stable fixed point, that is, it shows low saturaed firings. With the increasing degree of cortical self-excitation the system first transits to the bistable region between LPC_{1} and HB_{1}, because the appearance of HB_{1} transits to the monostable region. Then a second bistable region appears between HB_{2} and LPC_{2}. Finally, the system returns to monostable state with the disappearance of limit cycle.

In addition, we can observe that low and high saturated state can coexist with SWDs (between HB_{1} and LPC_{1}, and between HB_{2} and LPC_{2}). In Fig. 7d, the enhancement of the inhibition from IN to PY can make the system transition from the initial high saturated state to the pathological SWDs state, and can also make the system transition from absence seizures to low saturated state. As shown in Fig. 7e and f, we can also observe the coexistence of steady state and SWDs state. But the unstable limit cycle generated at HB_{3} can not coexist with electromagnetic induction of a certain intensity. So the number of Hopf bifurcation points is reduced to two, and finally the system transits to the monostable region under the electric attraction, that is, it shows a low saturated firings of 0 Hz.

For the neural population in thalamus, we mainly focus on *k*_{i} (*i* = 6, 8, 9). We can see that, as shown in Fig. 8a, the memristor eliminates 2-SWDs, SWDs (> 4 Hz) and tonic that appear in Fig. 2e.With the increasing inhibition of RE on TC, the system only changes in three dynamic states. Furthermore, we find in Fig. 8b that there is a region where low saturated firing and SWDs coexist between Hopf bifurcations and fold of cycles bifurcations (LPC). At the same time, a tristable region is found between LPC_{2} and LPC_{3}. In Fig. 8c, the amplitude of the limit cycle increases with the inhibition of RE neurons, and the fold of cycles bifurcation converges to fixed points (*k*_{6} > 0.23). In Fig. 8d, the joint modulation of electromagnetic induction and *k*_{8}, the system changes from the original four states to five states (5 ≤ *k*_{8} ≤ 13). That is, the emergence of 2-SWDs. We have learned that the formation of multi-spike discharges is closely related to multi-fold of cycle bifurcations. So we draw the dynamic bifurcation diagrams as shown in Fig. 8d and e. With the enhancement of excitability from TC to RE, the system changes from monostable to bistable region with fold of cycles bifurcation (LPC_{1}).The unstable HB_{1} point appear earlier, which make the system return to monostable ahead of time. Then, between LPC_{2} and HB_{2}, the system transits to the bistable region composed of limit cycle and stable points, and 2-SWDs appears between them. Until the limit cycle disappears, the system converges to stable fixed points. In Fig. 8g, the memristor has played a very good role. With the increase of *k*_{9}, there is no typical absence seizures in the system. When 1.11 ≤ *k*_{9} ≤ 1.31, clonic oscillation with stepwise decreasing frequency of 2–3 Hz appears in the system. In Fig. 8h, slow wave oscillations occurs between LPC and HB_{2} until the limit cycle disappears and clonic oscillations ends. In Fig. 8i, the stability of the fixed point of the system at HB_{1} point disappears. The appearance of fold of cycles bifurcations are also responsible for the slow-wave oscillation generation. To sum up, we find that the system has a good therapeutic effect on atypical pathological state such as tonic state under the joint action of memristor and connection strengths (*k*_{2,} *k*_{3}, *k*_{5}, *k*_{7}). It is worth noting that the parameter *k*_{9} shows a more effective inhibitory effect on absence seizures than other connection parameters.

### Coupled model under electric attraction

The human brain is a very complex neural network. There are tens of billions of nerve cells in the cortex, also known as neurons, each of which can interact with information by connecting other neurons through thousands of synapses [42]. Therefore, the connection of brain network and the change of topology of brain network are the key factors that affect the cerebral cortex system [43, 44]. We have realized from “Dynamic changes induced by coupling strength in different models” Section that the coupled model triggers many states that do not exist in the single-compartment model, which makes the dynamic mechanism of the system more complicated. The role of the memristor in the simple single-compartment model has been understood, and how it affects the diverse dynamical characteristics arising from the more complex two-compartment model needs to be investigated in more depth. Here, we also introduce electromagnetic induction into the coupled model, and discuss in detail the changes of brain activity caused by the arrival of memristors.

In Fig. 9a, we see that the system mainly shows three state transitions with the increase of *k*_{1}. Compared with Fig. 4a, we find that the tonic state was completely transformed into low firing oscillation. Similarly, it can be observed in Fig. 9f that the system exhibits only a single low firing oscillation when *k*_{8} > 9. In Fig. 9b, under the combined action of electromagnetic induction and *k*_{2}, the absence seizure occurred in advance. The memristor shows the ability to reduce the rapid spike discharge to tonic, which makes the amplitude of fluctuation stable. The initial state of the system changes from high saturated state to clonic. As *k*_{7} also shows a similar state transition mechanism in Fig. 9e, it will not be explained too much. Compared with Fig. 4c, when *k*_{3} > 1.8 in Fig. 9c, the system is unable to convert pathological state into high saturated state. Similarly, in Fig. 9d, when *k*_{5} = 8, the original high saturated firings of the system was replaced by SWDs due to the existence of memristor. This also shows that the memory resistor will interfere with the information exchange between cortex and thalamus to a certain extent.

Next, we will introduce in detail what changes will be brought when the electromagnetic induction parameter *k*_{0} is fixed and the parameters *k*_{6}, *k*_{9} fluctuate within a certain range. From Fig. 10a, we can see that the state distribution of disorder becomes modular. With the increasing inhibition of RE neurons to TC neurons from bottom to top, the system gradually changes from high saturated state to pathological state, and then to a wide range of low firing state. The distribution of different states in Fig. 10c also shows the feature of regionalization. Unlike Fig. 10a, the system pathological states appear in larger connection strengths and the corresponding frequencies show a stepwise decrease. Then we select specific values to plot the waveforms of the simple oscillation transition changes. states (I) to (IV) in Fig. 10d depict the change process of the slow wave oscillation gradually distorted by the combined effect of the memristor and *k*_{9}.

Then, we select the range values near the pathological state to draw the dynamic bifurcation diagram. From Fig. 11a, we get that 3-SWDs is accompanied by the fold of cycle bifurcations and 4-SWDs appears near the TR_{1} bifurcation point. Finally, with the disappearance of the limit cycle of LPC_{6}, the system enters the monostable state with this line and the low saturated firing appears. As shown in Fig. 11b, with the generation of HB_{1} point the system starts to transition to slow wave oscillation (I) and slowly evolves into waveform (II) with a stable limit cycle. Then an unstable limit cycle appear at point HB_{2}, at which time the waveform gradually evolves into state (III) and the waveform (IV) appears near LPC_{1}.