Temporally Targeted Interactions With Pathologic Oscillations as Therapeutical Targets in Epilepsy and Beyond

Self-organized neuronal oscillations rely on precisely orchestrated ensemble activity in reverberating neuronal networks. Chronic, non-malignant disorders of the brain are often coupled to pathological neuronal activity patterns. In addition to the characteristic behavioral symptoms, these disturbances are giving rise to both transient and persistent changes of various brain rhythms. Increasing evidence support the causal role of these “oscillopathies” in the phenotypic emergence of the disease symptoms, identifying neuronal network oscillations as potential therapeutic targets. While the kinetics of pharmacological therapy is not suitable to compensate the disease related fine-scale disturbances of network oscillations, external biophysical modalities (e.g., electrical stimulation) can alter spike timing in a temporally precise manner. These perturbations can warp rhythmic oscillatory patterns via resonance or entrainment. Properly timed phasic stimuli can even switch between the stable states of networks acting as multistable oscillators, substantially changing the emergent oscillatory patterns. Novel transcranial electric stimulation (TES) approaches offer more reliable neuronal control by allowing higher intensities with tolerable side-effect profiles. This precise temporal steerability combined with the non- or minimally invasive nature of these novel TES interventions make them promising therapeutic candidates for functional disorders of the brain. Here we review the key experimental findings and theoretical background concerning various pathological aspects of neuronal network activity leading to the generation of epileptic seizures. The conceptual and practical state of the art of temporally targeted brain stimulation is discussed focusing on the prevention and early termination of epileptic seizures.


INTRODUCTION: PHYSIOLOGICAL AND PATHOLOGICAL BRAIN OSCILLATIONS
Neuronal oscillations are rhythmic neuronal activities that synchronize different operations within and across neuronal networks (Buzsáki, 2009). The broadband neural signals recorded as the potential fluctuations of the extracellular electrical field can be analyzed to extract signals of various frequency bands. On one hand, the low frequency local field potentials (LFPs), representing the summed transmembrane currents from numerous neurons and on the other hand fast transients (lasting less than a millisecond) represent action potentials (APs) . Action potentials and LFPs present in raw recording traces can be decomposed by Fourier transformation into various frequency bands on a spectrogram with LFPs and action potentials inhabiting distinct frequency bands (in general < 250 Hz for physiological LFPs, and > 250 Hz for single-unit action potentials). These can be discriminated by applying analog or digital filtering to preferentially pass signals in lower or higher frequency bands, respectively (Hong and Lieber, 2019). The primary origin of neuronal oscillations is the periodical synchronization of synaptic potentials influenced by the periodical fluctuation of excitability in clusters of neurons. The rhythmicity hail from network structures comprising a variety of distinct cell types and population activities (Buzsáki and Watson, 2012). In addition to synaptic activity extracellular field potentials can influence the neuronal membrane potential via ephaptic coupling resulting in altered neuronal firing (Anastassiou et al., 2011). Hence, oscillations and neuronal activities in the brain are cohesive and self-arranged. Oscillations offer an effective potential mechanism for integrating the activity of single neurons toward microcircuits and extensive functional neuronal networks facilitating interregional communication and information processing (Engel et al., 2001;Buzsáki and Draguhn, 2004). Oscillations indicate applicable network conditions, impact neuronal population operations in the network; and constitute the dynamics of macroscopic neuronal networks intimately linked to the behavioral phenotypes on several levels of biological systems (Leuchter et al., 2015). Therefore, the concurrence of altered pathological oscillations and abnormal behavioral phenotypes in neurological and psychiatric diseases is unsurprising; these disorders can be regarded as "Oscillopathies" (Mathalon and Sohal, 2015). Pathologic oscillations represent multiple interactions and a causal relationship with abnormal brain states and functions, respectively. Thus, the pathological oscillations constitute a potential target for therapeutic intervention by applying the recently developed time-and space-targeted brain stimulation technologies (Berényi et al., 2012;Vöröslakos et al., 2018), an approach termed "Oscillotherapeutics" (Takeuchi and Berényi, 2020).
Abbreviations: AP, action potential; AR, autoregressive; AUC, area under the curve; CRG, Cognitive Rhythm Generator; DBS, deep brain stimulation; DLPFC, dorsolateral prefrontal cortex; ECG, electrocardiogram; EEG, electroencephalogram; ETP, educated temporal prediction; EPSC, excitatory postsynaptic current; FC, functional connectivity; FFT, Fast Fourier transform; ISP, intersectional-short pulse; LFP, local field potential; HD-tDCS, high definition transcranial direct current stimulation; HD-tACS, high definition transcranial EPILEPSY Epilepsy is a typical oscillopathy, where the altered neuronal activity results in altered oscillations leading to impaired brain functions. Epilepsy is a common neurological disease characterized by a chronic susceptibility to develop recurring epileptic seizures (Fisher et al., 2014). An epileptic seizure is a temporal behavioral alteration that can mediate objective, noticeable (e.g., muscular contractions) or subjective, covert manifestations (e.g., loss of consciousness). These alterations are presumably generated by hypersynchronous neural activities in various brain networks. Electroencephalography (EEG) is a noninvasive method which, measures the electrical activity of large, synchronously firing populations of neurons with electrodes placed on the scalp. The synchronized neural activity is evident in EEG or intracerebral LFP records during seizures (termed ictal periods) and will lead to specific behavioral manifestations, such as tonic and clonic convulsions among others. Effective pharmacotherapy and neurosurgical intervention in epileptic patients can systematically decrease the occurrence rate of electrographic and behavioral seizures (Glauser et al., 2006). In addition, time-targeted intervention of the abnormal neural oscillations characterizing preictal or ictal states can curtail their behavioral manifestation (Morrell, 2011) indicating a causal association between pathological oscillations and the symptoms of epilepsy.

CLINICAL SIGNIFICANCE
The Role of the Hippocampus in Temporal Lobe Epilepsy Temporal lobe epilepsy (TLE) is frequently pharmaco-resistant and its uncontrolled generalized seizures increase the risk of sudden unexpected death in epilepsy (Bone et al., 2012;Massey et al., 2014). Surgical resection of the seizure focus is irreversible, massively invasive and can frequently lead to cognitive disorders (Hamberger and Drake, 2006). Furthermore, its implementation in patients with ambiguous or multifocal bilateral TLE is not feasible (Berg et al., 2003;Holmes et al., 2003). Multiple studies have shown altered functional networks in TLE, including those explicitly involving the seizure focus in the hippocampus (Bettus et al., 2010;Englot et al., 2016). Functional network alterations have been reported to relate to neurocognitive disability and surgical treatment outcome (Holmes et al., 2014;Morgan et al., 2017Morgan et al., , 2020b. On the other hand, it is well known that physiological hippocampal function requires a complex and particular spatiotemporal activation system (Cooper and Ritchey, 2019). Even in the case of high frequency oscillations the phase coherence of these signals fluctuates on the order of seconds. A recent study showed that increases in the variance alternating current stimulation; MDD, major depressive disorder; MRI, magnetic resonance imaging; PFC, prefrontal cortex; ROC, receiver operating characteristic; SED, spontaneous epileptiform discharge; STN, subthalamic nucleus; tACS, transcranial alternating current stimulation; tDCS, transcranial direct current stimulation; TES, transcranial electrical stimulation; TI, temporal interference; TLE, temporal lobe epilepsy; TMS, transcranial magnetic stimulation.
Frontiers in Neural Circuits | www.frontiersin.org of signal fluctuations occurring at the hippocampal seizure focus in patients with TLE might contribute to disruptions in physiological functional connectivity (FC) network dynamics that contribute to decreases in static hippocampal FC on fMRI scans (Morgan et al., 2020a).
We have previously shown that closed-loop electrical stimulation of the medial septum can quickly terminate intrahippocampal seizures while also suppressing their secondary generalization in a rat kindling model (Takeuchi et al., 2021). Still, as was the case for DBS, further translational research is required to employ the transcranial techniques.

Absence Epilepsy
TES has already been proven to successfully reduce the duration of spike-and-wave discharges (the electrographic hallmarks of human absence epilepsy) in a rodent model of generalized epilepsy (Berényi et al., 2012). Its efficient clinical application will rely on closed-loop feedback stimulation of the target circuits, as their modulation can interfere with the emerging pathological pattern (Berényi et al., 2012;Kozák and Berényi, 2017). In addition, closed-loop seizure suppression using TES can remain effective for long periods (i.e., months) (Kozák and Berényi, 2017).

Other Neuropsychiatric Disorders
Many neurological and psychiatric disorders are related to clinically discernible, altered brain dynamics. These pathological oscillations may be a target for therapeutic intervention for the disorders using time-and space-targeted brain stimulation technologies.
Major depressive disorder (MDD) is a common and chronic psychiatric disorder characterized by excessive feelings of sadness and low mood (American Psychiatric Association, 2013). The most relevant oscillopathic features of MDD are: increased alpha-band (8-13 Hz) activity in the temporo-parietal area, elevated frontal theta-band (4-7 Hz) activity, alpha frontal asymmetry (left hemispheric hypoactivity and right hemispheric hyperactivity expressed as theta, alpha and beta band activities) and decreased gamma band activity in the neocortex (Baskaran et al., 2012;Eidelman-Rothman et al., 2016;Fitzgerald and Watson, 2018). These features relate to MDD symptoms and predict the efficiency of pharmacological treatment and electroconvulsive therapy. In addition, a causal relationship between oscillopathies and symptoms of (major) depression may exist. Indeed, restoration of the frontal alpha symmetry using anodal tDCS on the dorsolateral prefrontal cortex (DLPFC) (Loo et al., 2012) and neurofeedback improved the symptoms of depression (Mennella et al., 2017). These pathological oscillations can be targeted using pharmacological and electrical stimulation methods in combination with cognitive (behavioral) methods to alleviate depression symptoms (Leuchter et al., 2015).
Posttraumatic stress disorder (PTSD) is a widespread neuropsychiatric disorder with a high burden of disease. Primary symptoms include anxiety, cognitive impairments, mood changes and consistent avoidance of trauma-related stimuli (American Psychiatric Association, 2013). The panic, fear, and sympathetic response to the trigger stimulus results from altered activity in the amygdala (Cisler et al., 2015). Deficiency of fear extinction is also a salient feature of PTSD. Closed-loop intervention can rely on real-time correlates of neural network activation and various symptoms. In PTSD patients hyperactivity characterizes resting magnetoencephalography (MEG) recordings of the amygdala, the hippocampus, and the insular cortex (Huang et al., 2014). Altered activity also characterizes EEG recordings of PSTD patients i.e., intrinsic sensory hyperactivity in the visual cortex (suppressed alpha power) and decreased alpha power-mediated inhibition to the frontal cortex (Clancy et al., 2017). Closed-loop stimulation of the amygdala can reduce dysregulated amygdala responses (Stidd et al., 2013;Koek et al., 2016).

Cellular Activity Underlying Seizures and Epilepsy
Generally, epilepsy is thought to root in neuronal hyperexcitability (Fisher et al., 2005). Several underlying mechanisms have been proposed based mainly on the results obtained from animal models, including impaired inhibition (Bekenstein and Lothman, 1993) or a change in excitatory neurons' intrinsic conductances, leading to an overall increase of network output and synchrony (Avoli et al., 2005). Monitoring the activity of single neurons in the human brain can reveal important aspects of brain function. However, it is more challenging to identify the role of individual neurons in epilepsy primarily because of the sparseness of seizures and the technical limitations of long-term single-unit recordings. There are far more studies concerning the interictal neuronal activity in human epilepsy, which revealed significant differences between affected and non-affected areas, including differences in firing rates, bursting and synchrony (Staba et al., 2002;Gast et al., 2016). The few successful attempts in which the ictal activity of single neocortical or hippocampal neurons was recorded revealed surprising results. Synchronous firing of neighboring neurons was rarely seen except at the onset of ictal events (Wyler et al., 1982). Seizures can provide intense and synchronous, yet sparse and heterogeneous activation (Bower et al., 2012). Besides this surprising heterogeneity, a general lack of hypersynchrony suggests that specific interactions among subsets of neurons initiate seizures (Truccolo et al., 2014;Lambrecq et al., 2017). On the other hand, seizure termination is characterized by a relatively homogeneous suppression of firing (Truccolo et al., 2014).

SEIZURE ACTIVITY AND COUPLED OSCILLATIONS
A recent study showed that in the intact isolated mouse hippocampus, a paroxysmal activity can spread through the hippocampus following seizure onset, both from a focal stimulation locus or if low magnesium was applied locally to either longitudinal ends of the preparation (Derchansky et al., 2006). Bursts of activity within a seizure can become bidirectional, with frequency specific propagation patterns. In the low magnesium model, independent bidirectional activity was observed on both sides when the isolated intact hippocampus was severed along the septotemporal axis. These activities are in agreement with the function of coupled neuronal network oscillatory systems. Local coherence and ictal activity transfer was assessed in the recordings from intra-hippocampal depth electrodes implanted in epileptic patients being evaluated for possible resective surgery (Duckrow and Spencer, 1992). It was found that although ictal neural rhythmicity involves a temporal interaction between brain regions, the maintenance of this interaction is not essential for persistent seizure activity. These findings are in line with the idea of seizures being the manifestation of a multistate network of oscillatory systems showing various degrees of coupling and uncoupling.

"Coupled Oscillators" Model of Hyperexcitable Neuroglial Networks
Epilepsy is a dynamic disorder showing characteristics of neural networks with the incidence of at least two states, known as interictal and ictal activities (Lopes da Silva et al., 2003). The brain can be considered as a system of coupled oscillatory (multistate) units, and epilepsy a pathological expression of this system. The advantage of using a coupled oscillator approximation to model epilepsy is its ability to effectively model intermittent phenomena in epileptic brain networks (Zalay and Bardakjian, 2009). An attractor state is a transiently self-sustaining state (Meindertsma and Steenbeek, 2012). Unlike the multistate bistable attractor technique, intermittence corresponds to ictal events integral in the interictal attractor (or state) and doesn't require system noise for state transition (in these models, the critical mechanism for transitions to and from epileptic seizures is the existence of multiple attractors). A model that exploits this approach has been used to analyze different pathways leading to hyperexcitability and recommended a critical role for astrocytes and microglia in generating spontaneous epileptiform discharges (SEDs) (Farah et al., 2019). This model was built on the concept of coupled Cognitive Rhythm Generators (CRGs). The CRG is a mesoscopic mathematical modeling frame, used to model different physiological phenomena, such as directional selectivity, phase preference and phase precession (Zalay and Bardakjian, 2009). In addition, a network of four coupled CRGs has been used to model hippocampal neurons and generate SEDs (Zalay et al., 2010). This oscillator approximation might be a clock with a universal rhythm or a labile clock, where the oscillator is only active when the input is higher than a set threshold. The model included 16 CRGs organized into four subgroups with excitatory pyramidal cells, inhibitory interneurons, microglia and astrocytes. Pyramidal cell CRGs exhibited constant rhythmicity with intrinsic frequencies in the theta range (McNaughton et al., 1983), similar to results obtained from experimental recordings (Bezaire et al., 2016). Bursting activity of interneurons was characterized by labile clock behavior in the ripple HFO frequency range (80-250 Hz) (Sik et al., 1995), as is seen in experimental seizure-like events (Zalay et al., 2010). Microglial CRGs were modeled as a clock ring device with slow oscillations (0.2-0.5 Hz) (Wake et al., 2009). Lastly, the activity of astrocytes was characterized by labile clock behavior spanning the 1-4 Hz frequency range (Amzica and Steriade, 2000).
Astrocytes can regulate the excitability of adjacent neuronal synapses (Perea et al., 2009) and astrocytic dysfunction is related to several neurological disorders including epilepsy (Seifert et al., 2010). Earlier modeling studies highlighted the importance of glial function in K + homeostasis in hyperexcitability, suggesting glial function can act as a biomarker for epilepsy (Grigorovsky and Bardakjian, 2018). The increase in neuronastrocyte coupling provoked a higher occurrence of SEDs, coherent with studies indicating that the release of specific gliotransmitters by astrocytes can predispose neuronal circuits to seizures. In contrast, the magnitude of neuron-microglia coupling was negatively correlated to hyperexcitability, with less SEDs of shorter duration appearing as the microglia-neuron coupling increased (Fellin et al., 2004;Carmignoto and Haydon, 2012). These latter modeling approaches are also consistent with experimental results showing that microglia can preferentially connect to hyperactive neurons, reduce their EPSC rate and down-regulating their activity (Li et al., 2012;Ji et al., 2013). Manipulating certain microglial functions is also related to the occurrence of seizures (Derecki et al., 2012;Eyo et al., 2014).

Seizure Dynamics: Initiation, Development, and Termination
Epilepsy is a network malfunction described by bistable or multistable oscillatory states (e.g., interictal and ictal states) and their dynamic alternations. To investigate whether this multistate bistable approach can capture seizure dynamics, a divided system of bistable neural units built on an analytic, non-linear complex model was used (Izhikevich, 2001;Kalitzin et al., 2011). Depending on various parameters, this model is able to represent steady-state dynamics, limit cycle dynamics, or both. Ad absurdum, the model could be mentioned as a bistable unit. Based on the primary conditions, the bistable unit can either be in its steady-state point or a limit cycle (appearing as the total synchronization or seizure). Linking several units permits the design of a system consisting of multiple states (Koppert et al., 2014). Notably, such a system can engross a diversity of alternative oscillatory excited states, while state transitions occur solely as a consequence of external disturbances. A computational model (Bauer et al., 2017) has indicated that the addition of a global expression to the dynamics of the multistate system prevents hypersynchronous activity and discloses multiple phenomena described by the model. For example, when fitting state duration distributions to an exponential distribution, the distribution of times spent in one state will follow a particular case of the gamma distribution with less than one shape parameter. Thus, external stochastic perturbations cause transitions from one state to another. A distributed model built from complex bistable units can practically simulate the seizure onset, maintenance and termination processes (Bauer et al., 2017).

Multistate Models-State Holding Close to the Transition Point
The bistable model formulates a valid hypothesis to assess the proximity to ictal transition even at the level of single neurons. When the system is disturbed, the closer it comes to the region splitting the normal steady-state from the oscillatory limit cycle (the model seizure), the longer is the time for responses or the time needed to return to the baseline state (Petkov et al., 2018). This result is caused by the fact that the separatrix (i.e., the boundary separating two modes of behavior in a differential equation) is diverse under an unstable asymptotic state acting as a limit cycle. Thus, the forces necessary to shift the system out of it are minute in the local network. This feature was used to develop a biomarker that can be combined with transcranial electrical stimulation (TES) or transcranial magnetic stimulation (TMS) for diagnostic and therapeutic prognosis protocols.

PHASE DETECTION, PHASE PREDICTION AND TIME AND SPACE TARGETING Phase Detection and Prediction Algorithms
The phase of brain oscillations is an essential feature of neural processing (Thut et al., 2012;Maris et al., 2016). Therefore, it can act as an index of brain excitability, temporally guiding the delivery of brain stimulation. Several different algorithms have been developed to detect and predict the phase of various EEG oscillations for TES and TMS based closed-loop stimulation, as follows.

Fast Fourier Transform Prediction
The crucial feature of this algorithm is to use the frequency domain of the EEG signal for forwarding prediction (Mansouri et al., 2017). One specific implementation uses Laplacian montage with a central electrode of interest and eight surrounding electrodes as the brain signal for the region of interest (Shirinpour et al., 2020). The signal's phase in the dominant frequency is estimated from the angular factor of the complex Fast Fourier Transform (FFT) signal. A sine wave of the dominant oscillation with a given frequency and phase is calculated in the earlier steps and used for forwarding prediction.

Auto Regressive Prediction
In this approach, the signal is predicted in the time domain (Chen et al., 2013;Zrenner et al., 2018) in the following steps. First, the Laplacian of the electrodes corresponding to the region of interest is calculated. Next, the signal is zero-phase bandpass filtered in the frequency band of interest using an finite impulse response (FIR) filter [the FIR filter is a non-recursive filter in that the output from the filter is calculated by using the current and previous inputs (Mokhatab and Poe, 2012)] and the edges of the signal are curtailed to remove edge artifacts due to filtering. The residual signal is used to calculate the coefficients for the autoregressive model [i.e., the Yule-Walker method (Walker, 1931;Yule, 2012)]. The signal is heuristically forward predicted depending upon the parameters of the Auto Regressive (AR) coefficients. The instantaneous phase of the predicted signal is calculated using the Hilbert transformation.

Educated Temporal Prediction
This method integrates a short training step for the algorithm before the real-time application aiming to learn the individual statistical characteristics of the oscillation of interest. It uses a robust and straightforward method to extract inter-peak intervals and their central moment (Shirinpour et al., 2020). Presuming that brain oscillations are quasi-stable over the brief measurement epochs; one can determine the characteristic interval period between subsequent signal peaks (relating to 360 • in signal phase). To predict the time-point at which the next target phase, i.e., the peak, will arise, one can add the average measured period between signal peaks to the time of the last peak recorded in order to predict the next peak.

Time-and Space-Targeting
Pathological oscillations can be modulated using open-or closedloop approaches depending on how the stimulation is performed in the temporal domain. Analyzing various parameters of the outputs of the neuronal networks can be utilized to optimize the effect of stimulation. The feedback input allows the modulation to be time-targeted using on-demand stimulation (Berényi et al., 2012;Takeuchi and Berényi, 2020).

Closed-Loop Interventions
Closed-loop techniques for oscillotherapeutics are brain stimulation protocols based on intrinsic biosignal feedback [e.g., EEG, electrocardiogram (ECG), LFP]. The feedback input enables on-demand targeted intervention in the temporal domain preventing over-stimulation and undesired out-of-phase interferences. Closed-loop intervention can lower the side effects of relatively intensive stimulation; in contrast, chronic stimulation using a non-responsive, open-loop method can become involuntarily excessive. Indeed, inadequate stimulation can develop adverse effects by disturbing physiological activity in the brain. Remarkably, patients advised to turn on deep brain stimulation (DBS) in an on-demand manner for essential tremor show improved long term effects compared to open-loop continuous stimulation (Kronenbuerger et al., 2006).
The closed-loop method can be implemented in various ways according to the characteristics and impact of the intrinsic biosignal (Figure 1). The first possible configuration is "closedloop responsive" stimulation, whereby predefined stimulus pulses are delivered only when stimulation is required (on-demand). In this setup, biosignals are continuously monitored for the automated launch of a preset stimulation pattern. The second closed-loop configuration for brain stimulation is the "closedloop adaptive" stimulation, where various parameters of the input biosignal gate output variables for stimulation. For example, the power of beta oscillations recorded in the subthalamic nucleus (STN) specifies the intensity of DBS in the STN for Parkinson's disease patients (Bouthour et al., 2019). The third, most advanced implementation of closed-loop stimulation is "phase-targeting" stimulation. Conceptually, phase-targeting electrical stimulation is highly effective in suppressing pathological oscillations. In the restoration of reduced physiological oscillations, counterphase stimulation suppresses pathological oscillations and inphase stimulation recovers decreased physiological oscillations (Figure 1). Practically, appropriately timed phase-targeting stimulus delivery has been demonstrated to be essential for the closed-loop intervention by suppressing ongoing pathological oscillations in epilepsy that effectively shortens the duration of absence seizures in rats (Berényi et al., 2012), and can remain effective for months when used in a closed-loop manner (Kozák and Berényi, 2017). We also showed that accurate stimulus timing controlled by internal seizure dynamics is critical for the termination of epileptic seizures when applying closed-loop stimulation to the medial septum (Takeuchi et al., 2021).

Focused Transcranial Electrical Stimulation Technologies
Transcranial electrical stimulation is a non-invasive brain stimulation protocol: as stimulation electrodes are located outside the skull, it is a low-risk and reversible adjunctive therapy. The focality of TES is poorer than DBS because of its transcranial nature. On the other hand, its diffuse modulation over the cortex may be considered as an advantage for intervention with generalized pathological oscillations hijacking wide cortical areas, as in the case of absence seizures (Berényi et al., 2012;Kozák and Berényi, 2017).

High-Definition Transcranial Direct Current Stimulation
Transcranial direct current stimulation (tDCS) is utilized to induce plastic changes by introducing sub-threshold membrane potential alterations in neurons of the cerebral cortex. Classical tDCS applies two large electrodes generating subthreshold depolarization of cortical neurons under the anodal electrode and hyperpolarization under the cathodal electrode, respectively. To increase the focality of tDCS, reducing the size of the large stimulus electrode placed over the target area, increasing the size of the return electrode, or changing the location of the return electrode (for example, over the arms, neck, shoulders, or knees) can be considered. An electrode configuration with improved stimulation focality has been developed based on modeling electrical field strength, termed high-definition tDCS (HD-tDCS) (Nitsche et al., 2015). Considering that the spacing between the HD-tDCS electrodes is relatively small, shunting is enhanced relative to the more conventional electrode configurations. Hence, current density has to be relatively high to generate electric fields comparable to those generated by large electrode pads with larger spacing. Studies have revealed that HD-tDCS treatment can alleviate epilepsy and pain perception (Castillo-Saavedra et al., 2016;Meiron et al., 2019).

High-Definition Transcranial Alternating Current Stimulation
Transcranial alternating current stimulation (tACS) is a stimulation technique that non-invasively modulates cortical activity and excitability. tACS is supposed to affect neuronal membrane potentials by oscillatory electrical stimulation using a well-defined stimulation frequency (Nitsche et al., 2015). As HD-tDCS, tACS focality can also be drastically increased by applying one stimulating electrode on the target area surrounded by multiple anti-phase returning electrodes (named as HD-tACS). Numerous cortical regions can be individually stimulated with well-defined oscillatory stimulus waveforms. This technique has been used to synchronize and desynchronize the activity of the human medial frontal cortex and the lateral PFC in the theta (∼6 Hz) frequency band resulting in the effective modulation of executive functions (Reinhart, 2017).

Temporal Interference Stimulation
Temporal interference (TI) stimulation is a novel TES method that promises to empower DBS without affecting superficial, off-target structures (Grossman et al., 2017). TI stimulation exploits the temporal interference among two electrical fields with alternating vectorial directions using similar, but slightly different frequencies in the kHz frequency band (i.e., 2 and 2.1 kHz). During TI stimulation one delivers the brain multiple electric fields at frequencies too high to recruit neural firing, but which differ by a frequency amenable to recruit neural activity. Effective electrical stimulation of neurons is suggested to occur across a local area where the interference among the multiple fields generates an emergent electric field envelope modulated at the difference frequency (i.e., 0.1 kHz) without excessive side effects. Spatial targeting of TI is confirmed in computational models, slice experiments and in anesthetized rodents (Grossman et al., 2017;Esmaeilpour et al., 2021), spatial resolution depends on the number and alignment of electrodes over the scalp. The possible off-target effects of high-frequency electrical fields over large brain areas could present an issue as strong kHz-frequency electrical fields can block the spreading of compound action potentials in peripheral nerves (Kilgore and Bhadra, 2014). The long-term effects of kHz stimulation of TI are yet unknown. The temporal resolution of TI simulation is limited, as the generation of kHz electrical fields in short ramp-up times induces rapid, spatially unfocused activation of neurons, while slow ramp-up does not (Grossman et al., 2017). Due to this limitation, precisely timed closed-loop TI (i.e., phase-targeting stimulation) is not achievable. Accordingly, TI stimulation appears to be preferable to applications for inducing plasticity in subcortical brain regions (Chaieb et al., 2011).

Intersectional Short Pulse Stimulation
We have previously developed a novel TES approach (Intersectional-Short Pulse (ISP) stimulation) which allows to programmatically steer the effect of TES in the intracranial space and allows considerably higher electrical currents to be used, while preserving the high temporal precision of the stimulation . ISP applies a repeated sequence of brief, amplitude modulated electrical pulses through FIGURE 1 | Open-loop and closed-loop interventions in epileptic seizures. Open-loop intervention delivers preset stimulation naive to the ongoing rhythmicity of brain activity., while closed-loop intervention governs stimulation pattern by the real-time processing of network oscillations. Counter-phase stimulation cancels intrinsic oscillations by destructive interference. In contrast, in-phase stimulation can enhance or restore decreased oscillations by constructive interference. See details in the main text. Adapted from Huang et al. (2019) and Takeuchi et al. (2021) multiple independent electrode pairs. The ISP method exploits the temporal integration of the subthreshold changes induced by the multiple consecutive electrical gradients due to the capacitive properties of the neuronal membranes. Accordingly, due to this neuronal "blurring" ISP stimulation can transcranially mimic the neuronal readout that would be caused by a strong (>1 mV/mm), continuous electrical field in a target brain region to directly induce or inhibit action potentials without generating excessive current densities on the scalp (i.e., causing less peripheral effects). Using ISP, the activity of hippocampal neurons can be modulated in a hemisphere-specific way . In addition, the 1 Hz ISP stimulation can modulate the amplitude of alpha-band oscillations in EEG recordings of healthy volunteers in a hemisphere-and phase-specific manner .
The advantages of ISP compared to other electrical stimulation techniques are several. It has better spatial steerability and can be implemented with a phase-targeted closed-loop configuration with millisecond precision. Currents as much as 16 mA can be applied (one order of magnitude larger than conventional TES), but the current density on each electrode stays similar to those used by traditional TES. Identical effects (i.e., excitation or inhibition) can be simultaneously achieved on both hemispheres by appropriate electrode alignment in contrast to conventional TES, which generates opposing anodal-cathodal effects over the two hemispheres. The direction of electrical fields along the axodendritic axis of neurons determines whether the electrical fields activate or inhibit the target neurons (Chan and Nicholson, 1986;Liu et al., 2018). Furthermore, several distinct stimulus waveforms can be employed in an interwoven fashion, yet independently. This stimulation technique is expected to allow non-invasive on-demand closed-loop control with space-and time-targeted brain stimulation for the treatment of various neuropsychiatric disorders.

The Matter of Stimulus Intensity/Effect Size to Reach Reliable Control on Oscillatory Network Patterns
TES applied at ± 1 mA peak intensity induces < 0.5 V/m electric fields in the human brain (Opitz et al., 2016;Huang et al., 2017;Chhatbar et al., 2018). This is enough to induce 0.1-0.2 mV alterations in the membrane potential of neurons within the stimulated area. As these alterations are markedly lower than the ∼20 mV depolarization necessary to push a neuron from its resting potential to spike threshold in vitro, TES is unable to obtain prompt, highly reproducible changes in spiking activity. In contrast, the mild electrical fields generated may be more efficient when applied to distract or reinforce ongoing rhythms rather than introducing novel activity patterns. Targeting the stimulation to the optimal phase of endogenous rhythms in a closed-loop implementation may be the most effective solution (Berényi et al., 2012). However, responsive implementations require in depth characterization of the altered network with simultaneous monitoring and adjustment of the relevant rhythms (Krook-Magnuson et al., 2015). This might be achieved by using mild electric fields, but other applications may require higher field intensities for improved efficacy. For example, immediate control of spiking activity (e.g., to terminate a seizure) might require field strengths larger than 5 V/m (Kozák and Berényi, 2017).
Taking into account the intrinsic circuit structures of a given brain area is an essential factor for the effective control of oscillatory networks as stimulation of structural hubs effectively modulates the ongoing oscillatory activity with high spatial propagation. The applied stimulation frequency needs to match the frequency range of activity of various elements of the targeted neuronal circuit. Supposing the targeted brain region has divergent projections to multiple brain regions, oscillatory activity applied to the target region can extend to various destination brain regions. TES of the prefrontal cortex (PFC) for the treatment of depression readily utilizes this concept because the PFC has widespread synaptic connections to limbic areas (Loo et al., 2012;Ferenczi et al., 2016). The interference of a "congestion" relay station in the brain effectively intervenes in disseminating massive oscillatory activity like epileptic seizures (Takeuchi et al., 2021). In this respect, the entorhinal cortex and the subiculum are chokepoint-like structures broadcasting the activity from the hippocampus to the neocortex. Stimulation on these structures can effectively suppress the secondary generalization of seizures originating in the hippocampus (Lu et al., 2016;Wang et al., 2017). On the other hand, the STN and the thalamus are chokepoints in post-stroke epilepsy and absence epilepsy (Paz and Huguenard, 2015).

Seizure Detection and Prediction
The real-time prediction of seizures is more challenging than detecting seizures because of atypical feature changes and smaller signal-to-noise ratios. However, the prediction would be more beneficial than detection as it enables prevention.
Attempts to develop reliable seizure prediction algorithms have an extensive history, dating back to the 1970s (Viglione and Walsh, 1975) with minimal data sets looking only at pre-seizure (preictal) events minutes to seconds before seizures. Massively evolving over the past 50 years, current methods use mathematical tools to analyze continuous days of multiscale EEG recordings (Lehnertz and Litt, 2005). One of the most salient features of seizures is their unpredictability. From a more comprehensive view, seizure prediction research has also transformed how we understand epilepsy and the basic mechanisms underlying seizure generation. Seizures were formerly considered isolated and abrupt events, but we now consider them processes that develop over space and time in epileptic networks (Burns et al., 2014). Therefore, what started as predicting seizures for clinical applications has evolved into a field committed to understanding seizure generation.

Seizure Prediction Algorithms
Seizure prediction algorithms typically follow the same route/logic: biosignals are recorded and pre-processed, prediction features and/or pre-ictal biomarkers are then extracted. The decision system processes the temporal stream of feature prediction values and detects changes that indicate an upcoming seizure. To reach a decision, thresholds can be set for various features, or machine learning classifiers can be used to make decisions based on multiple features. The decision system then involves the advisory system, which warns the patient if a seizure is likely to occur soon. Constantly acquired biosignals, most frequently EEG or intracranial EEG, are analyzed with advanced time series analysis methods to identify predictive features. A pre-ictal biomarker is a predictive feature derived from physiological signals (for example the EEG) that becomes apparent during a defined period before a seizure but not at other times. Such a feature might or might not be visually evident, reflects underlying signals' alterations and predicts seizures within an explicit range of values. Features are commonly used instead of the raw signals because they simplify the essential changes of the signals. A pre-ictal feature can be considered clinically beneficial as a warning system if it can be detected early enough and can minimize the time under false warning. Features evaluated for their predictive value, particularly those of EEG signals, range from simple to complex and rely on univariate, bivariate or multivariate linear, or non-linear analysis. The effectiveness of individual features for seizure prediction can be evaluated individually, but combinations of features are often delivered as inputs to machine learning algorithms, acting as pattern recognition systems. These algorithms allow the estimation of the seizure prediction properties of features in combination (Freestone et al., 2015;Brinkmann et al., 2016;Gadhoumi et al., 2016). In turn, these temporal features are utilized in decision algorithms to trigger the delivery of pharmacological or non-pharmacological control of seizures in a closed-loop system. Algorithms need additional development based on neurophysiology, multimodal imaging, seizure mechanisms, control theory and computational modeling . Numerous guidelines and approaches are used to develop seizure prediction algorithms (Mormann et al., 2007). These methods require receiver operating characteristic (ROC) curves that measure the true positive rate against the false-positive rate during pre-ictal or inter-ictal periods. Overall algorithm performance can be quantified and ranked by the area under the curve (AUC) for true positive vs. false-positive rates.
Biomarkers of epilepsy incorporate interictal epileptiform discharges and bursts, interictal spikes and high-frequency oscillations, which are nowadays used in diagnosis, surgical planning and treatment bearing obvious clinical significance (Matsumoto and Marsan, 1964;Schulze-Bonhage, 2016). The hope for seizure prediction was high in the early twenty first century following the development of a plethora of seizure prediction algorithms. Still, the result of stringent testing on the reliability of seizure prediction indicates no evidence of above-chance prediction (Mormann et al., 2007). No predictive feature or pre-ictal characteristic that is generic among people with epilepsy and that can predict the precise time of an individual's subsequent seizure has been yet identified (Kuhlmann et al., 2010Gadhoumi et al., 2015;Karoly et al., 2017;Kiral-Kornek et al., 2018;Truong et al., 2018). Thus, it is important to decide whether promising seizure predictors forecast seizures rather than detect random fluctuations in EEG signals unrelated to seizures. This principle challenge in seizure prediction requires a standardized stringent mathematical calculation of predictive performance (Mormann et al., 2007) because seizure events are sparse and interictal periods generally long. A first step for such analysis is to compare the performance of a prediction algorithm with that of a random predictor (Schelter et al., 2006;Snyder et al., 2008) that generates predictions at random times at the same rate as that of the algorithm. Where appropriate, a random predictor can be adapted to account for a subject's diurnal variability in seizure distribution or features (Karoly et al., 2017). More evolved methods utilize Monte Carlo simulations to generate predictor substitutes, such as randomizing seizure times to generate false seizure times (Andrzejak et al., 2003(Andrzejak et al., , 2009Kreuz et al., 2004). The performance of the prediction algorithm is then mathematically compared with the efficacy of these predictor substitutes. Comparing the performance of a prediction algorithm with a random predictor is algorithmically the most effective form of mathematical calculation. Substitute-based methods have higher temporal complexity but improve confidence in concluding whether an algorithm performs better than chance and can report the non-random occurrence of seizures. The importance of rigorous mathematical testing of seizure prediction algorithms is crucial for understanding the significance of the results of seizure prediction.

PRECISE LOCALIZATION AND TARGETING OF A SEIZURE FOCUS IN THE BRAIN
Increasing the number of pairs of stimulating electrodes is essential for improving the spatial resolution of ISP stimulation (this is also the case for TI stimulation). A dedicated EEG cap with multiple recording and stimulating electrodes is needed for transcranial closed-loop intervention with ISP stimulation. Subscalp or intracranial implantation of the stimulus electrodes will boost the efficiency and focality at the expense of a more invasive intervention. The placement of stimulating electrodes must be adapted for each patient's requirements, especially in the case of focal seizures. The target brain region should be determined by a combination of high-density EEG, functional tomography and long-term video monitoring of seizures. Structural brain imaging [i.e., magnetic resonance imaging (MRI)] is also required for planning the ISP stimulation targets. A recent study described a multi-electrode model for electrical stimulation (Huang et al., 2019). Mathematical investigations (solving linear programming problems) showed a patient-specific MRI-based model to determine the electrode positions and current intensities that optimize the induced electric fields in either intensity or focality at the target location. In addition, the achievable focality is limited by the safety constraint on maximum currents (Dmochowski et al., 2011). Although electrical artifacts of ISP stimulation are smaller than those of conventional TES, feedforward removal of gross artifacts from applied currents is required Kohli and Casson, 2019). Optimizing stimulation parameters (duration, intensity, etc.) is crucial for optimal performance. Empirical optimization presently used by clinicians is a labor and time-consuming process. Machine learning algorithms could be utilized instead for optimizing closed-loop ISP stimulation (timing and parameters) for the control of epileptic seizures.

CLOSED-LOOP IMPLEMENTATIONS
The first studies using early seizure-detection algorithms in combination with responsive brain stimulation have yielded positive results (Kossoff et al., 2004;Fountas et al., 2005;Osorio et al., 2005). For any responsive brain-stimulation configuration, a key issue is the placement of both afferent and efferent electrodes, that is, electrodes for detecting a pre-seizure state and stimulation electrodes, respectively. The location and number of electrodes used may be essential for the early detection of an impending seizure followed by locally applied, spatially constrained stimulation, in a way that the patient does not wittingly perceive the intervention.
The ultimate aim in designing a reliable seizure-prediction algorithm can be seen in a device capable of warning of an impending seizure and preventing it from happening. An ideal intervention system would control the development of an episode before the onset of the clinical symptoms. Its tolerance toward false alarms leading to unnecessary interventions would depend on the magnitude of side effects. The principal feasibility of different seizure-intervention strategies such as local application of short-acting drugs (Stein et al., 2000), electrical stimulation techniques (Berényi et al., 2012), local cooling (Hill et al., 2000), or biofeedback operant conditioning (Sterman, 2000) has been described in the literature. Presently, much research is directed toward designing a closed-loop intervention system using deep brain or transcranial stimulation (Morrell, 2006;Kozák and Berényi, 2017;Takeuchi et al., 2021). Such an EEG-based closedloop stimulation system could be based either on prediction algorithms or algorithms for early seizure detection. Nowadays, prediction algorithms are limited in performance to verify clinical trials with closed-loop stimulation using the techniques described above. For early seizure-detection algorithms, the challenge is whether an intervention after the onset of an electrographic seizure can prevent its full clinical manifestation or whether the brain has already passed the "point of no return." Detection algorithms should be optimized to be implemented into a micro processing unit. Extensive parallelization will be necessary to enable real-time computation in a small device with a limited clock rate without substantial delays. Phaselocked stimulation is essential for efficient intervention with pathological oscillations. New algorithms for instantaneous phase calculation will be valuable if implemented in the closed-loop system for efficient intervention in pathological oscillations (Mansouri et al., 2017). Even if appropriate offline modeling methods are time demanding, the online detection of specific oscillatory patterns based on the constituted model can be achievable as it does not demand calculations as intense as the modeling process itself. A reduction in the dimensionality and complexity of the model may be required for online intervention.

AUTHOR CONTRIBUTIONS
TF and AB developed the idea. TF prepared the figure. TF and ML wrote the original draft. TF, ML, and AB discussed and commented on the manuscript. All authors contributed to the article and approved the submitted version.

FUNDING
This work was supported by the Momentum program II of the Hungarian Academy of Sciences, EFOP-3.6.1-16-2016-00008, EFOP 3.6.6-VEKOP-16-2017-00009, and KKP133871/KKP20 grants of the National Research, Development and Innovation Office, Hungary, the 20391-3/2018/FEKUSTRAT of the Ministry of Human Capacities, Hungary, and the EU Horizon 2020 Research and Innovation Program (No. 739593-HCEMM), Hungarian Scientific Research Fund (Grants NN125601 and FK123831 to ML), the Hungarian Brain Research Program (grant KTIA_NAP_13-2-2014-0014 to ML). UNKP-20-5 New National Excellence Program of the Ministry for Innovation and Technology from the source of the National Research, Development and Innovation Fund to ML. ML was a grantee of the János Bolyai Fellowship.