Skip to main content
UKPMC Funders Author Manuscripts logoLink to UKPMC Funders Author Manuscripts
. Author manuscript; available in PMC: 2023 Apr 27.
Published in final edited form as: Nat Biomed Eng. 2022 Oct 20;7(4):559–575. doi: 10.1038/s41551-022-00945-8

Closed-loop optogenetic control of the dynamics of neural activity in non-human primates

B Zaaimi 1,2,#, M Turnbull 1,#, A Hazra 1, Y Wang 3, C Gandara 1, F McLeod 1, E E McDermott 1, E Escobedo-Cousin 4, A Shah Idil 5, R G Bailey 4, S Tardio 4, A Patel 4, N Ponon 4, J Gausden 4, D Walsh 1, F Hutchings 3, M Kaiser 3,6,7,8, M O Cunningham 9, G J Clowry 1, F E N LeBeau 1, T G Constandinou 10, S N Baker 1, N Donaldson 5, P Degenaar 4, A O’Neill 4, A J Trevelyan 1, A Jackson 1,*
PMCID: PMC7614485  EMSID: EMS152799  PMID: 36266536

Abstract

Electrical neurostimulation is effective in the treatment of neurological disorders, but associated recording artefacts generally limit its applications to open-loop stimuli. Real-time and continuous closed-loop control of brain activity can however be achieved by pairing concurrent electrical recordings and optogenetics. Here we show that closed-loop optogenetic stimulation with excitatory opsins enables the precise manipulation of neural dynamics in brain slices from transgenic mice and in anesthetized non-human primates. The approach generates oscillations in quiescent tissue, enhances or suppresses endogenous patterns in active tissue, and modulates seizure-like bursts elicited by the convulsant 4-aminopyridine. A nonlinear model of the phase-dependent effects of optical stimulation reproduced the modulation of cycles of local-field potentials associated with seizure oscillations, as evidenced by the systematic changes in the variability and entropy of the phase-space trajectories of seizures, which correlated with changes in their duration and intensity. We also show that closed-loop optogenetic neurostimulation could be delivered using intracortical optrodes incorporating light-emitting diodes. Closed-loop optogenetic approaches may have translational therapeutic applications.


Many neurological conditions lead to altered network dynamics, characterised by abnormally low or high levels of oscillatory synchrony within, and between, brain areas1. Neuromodulation therapies such as Deep Brain Stimulation (DBS) typically deliver ‘open-loop’ trains of electrical stimulation in an attempt to disrupt pathological patterns and maintain brain activity within a range of functional states. However, from a control theory perspective, open-loop methods are generally inferior to closed-loop control that incorporates feedback based on the real-time state of the system2. Thus, neuromodulation therapies may be more effective if controlled by ongoing electrophysiological measurements3,4, for example to enhance beneficial oscillations or to destabilise pathological brain states such as epileptic seizures. Unfortunately, many potential applications of closed-loop neurostimulation are hampered by large artefacts associated with electrical stimulation, particularly when monitoring and modulating the same local population of neurons. This often limits control policies to simple decisions to turn on, or off, otherwise continual trains of stimuli5,6.

Since the light stimuli used for optogenetics can be delivered without preventing concurrent electrical recording, it can be continuously modulated in real-time by brain signals to allow true closed-loop interaction with local networks. Despite considerable theoretical motivation7, experimental demonstrations of closed-loop optogenetic stimulation have thus far been limited to in vitro preparations8 and in vivo experiments on normal brain rhythms in rodents912. Here we aim to advance this technique towards therapeutic applications in humans, by demonstrating the feasibility of closed-loop manipulation of network dynamics in non-human primates and examining its effect on pathological seizure-like activity. In addition, we compare optical stimulation delivered via an external light source with an implantable optrode incorporating encapsulated light-emitting diodes (LEDs). Although optogenetics allows specific cell types to be targeted with a range of different opsins, we focus here on closed-loop optogenetic stimulation with excitatory opsins (CLOSe), using efficient ion-channel opsins without the need to restrict expression to specific interneuron subtypes. We hypothesized that by altering the timing of stimulation relative to ongoing activity, we could exert differential effects on the local networks, thus adding a temporal dimension to the control of neural dynamics that can be achieved with optogenetics.

Results

CLOSe drives oscillations in quiescent brain slices

We first investigated CLOSe in quiescent brain slices taken from transgenic mice, expressing channelrhodopsin selectively in excitatory pyramidal cells (Emx1-ChR2). The local field potential (LFP), recorded with an extracellular electrode, was passed through a finite impulse response (FIR) filter using a kernel which band-passed and phase-shifted the signal (Fig. 1a). The output of the filter was half-wave rectified (above a threshold set to reject most background noise) and sent in real-time to control the intensity of optical stimulation delivered through a light fibre. Within each experimental session we delivered CLOSe epochs with the same filter frequency but different phase-shifts (0, 45°, …, 315°) in pseudorandomised order, interspersed by control epochs with no stimulation.

Fig. 1. CLOSe drives oscillations in quiescent Emx1-ChR2 mouse brain slices.

Fig. 1

a, Top: Schematic of experimental setup. LFP, recorded from an Emx1-ChR2 mouse brain slice, was filtered and used to control optical stimulation in real-time. Bottom: Amplitude response of the filter. Inset shows phase response across the passband. b, Example LFP, optical stimulation and high gamma envelope under no stimulation (black) and CLOSe with different phase-shifts (relative to LFP, 2 Hz filter frequency). c, LFP power spectra for different phase-shifts for entire session. d, Left: Phase-shifts (relative to LFP) associated with maximal oscillation in 21 sessions from 11 mice. Right: Adjusted phase-shifts (relative to high gamma activity; see Extended Data Fig. 1). P values from Rayleigh test for circular non-uniformity. e, LFP power at different frequencies for different adjusted phase-shifts (2 Hz filter, same session as b). Phase-shift is unwrapped and plotted over two cycles. f, Phase-dependent modulation of LFP power for different filter frequencies. Colour indicates adjusted phase-shift associated with maximal oscillation. Dashed line shows log-linear fit to data (n = 21, R2 = 0.54, P = 0.0002).

We set the threshold of the closed-loop algorithm such that occasional small fluctuations in the LFP crossed the threshold and triggered optical stimulation. The resultant behaviour depended critically on the phase-shift imposed between LFP and stimulation. For some CLOSe phase-shifts, no persistent activity was elicited, while other phase-shifts drove strong and sustained oscillations (Fig. 1b,c). The frequency of oscillations varied systematically with the closed-loop filter frequency (Extended Data Fig. 1a), suggesting they reflected the dynamics of the closed-loop system (i.e. the optical stimulation caused neural activity that then caused further stimulation creating a positive feedback loop), rather than intrinsic oscillatory properties of the tissue.

Qualitatively similar effects were obtained in 21 different sessions with brain slices from 11 mice, using central filter frequencies between 2-40 Hz. However, we observed considerable variation in the phase-shift associated with maximal LFP oscillations (Extended Data Fig. 1a, Fig. 1d left; circular mean=-27°, Raleigh test for circular non-uniformity P=0.82). We speculated that this was due to variation in the relationship between LFPs and underlying neural activity, which is known to change through the cortex13 and may therefore depend on the precise positioning of electrodes across different sessions. Therefore, we additionally examined the envelope of high-gamma (>100 Hz, Fig. 1b, right) LFP activity as a surrogate of neural firing. High-gamma activity was consistently correlated with optical stimulation (as expected for excitatory stimulation driving neural activity), but the relative phase between high-gamma and LFP oscillations varied across different sessions (Extended Data Fig. 1b). We used the cross-correlation between high-gamma and LFP to calculate their relative phase and added this off-line to the phase-shift applied on-line by the filter (Extended Data Fig. 1c). We then replotted our data against the adjusted phase-shift that represented the overall phase-advance of optical stimulation relative to putative neural activity (Extended Fig. 1d). Following this adjustment, the phase-shift associated with maximal positive-feedback LFP oscillations was consistently around 0-90° relative to the high gamma envelope (Fig. 1d, right, circular mean=38°, Rayleigh test for circular non-uniformity P=0.002; Extended Data Fig. 1e), while phase-shifts around 180-270° were associated with minimal oscillation. We refer to these conditions as CLOSe+ and CLOSe respectively. CLOSe+ drove oscillations around the centre-frequency of the filter as well as higher harmonics, and these frequencies increased systematically with increasing phase-shift, as shown by the diagonal stripes in Fig. 1e (note that phase-shift is unwrapped and plotted over two cycles). Conceptually, this behaviour can be understood by equating a phase-advance in the feedback signal with a reduction of the feedback loop delay. As this delay is reduced, the frequencies associated with positive feedback instabilities increase. By altering the central filter frequency, we were able to tune these resonant frequencies and drive oscillations up to 40 Hz, although the LFP power modulation was significantly reduced at higher frequencies (Fig. 1f).

CLOSe modulates spontaneous activity in vivo

Next, we examined the effect of CLOSe on endogenous in vivo brain activity in two non-human primates (NHPs). Excitatory opsins were expressed under the neuron-specific human synapsin promoter (hSyn) using viral vectors (either AAV8-hSyn-Chronos-GFP or Lenti-hSyn-eYFP-2A-ChR2(H134R); Supplementary Table 1) injected into the primary motor cortex, 7-19 weeks prior to recording sessions under terminal anaesthesia. Post-mortem histology confirmed widespread expression of associated fluorescent tags co-localised with neuronal markers in both animals (Fig. 2a,b). LFPs and single-units were recorded with multi-contact electrodes while open-loop stimulation (200 or 500 ms pulses at 1 Hz) and CLOSe (driven by different phase-shifts applied to one LFP from the array) was delivered through an optic fibre inserted into the cortex, or an implanted optrode incorporating LED light sources (Fig. 3a, Extended Data Fig. 2). Fig. 3b (left) and Fig. 3d (top) shows example open-loop stimulation using ChR2. Large LFP deflections were observed in response to light pulses, associated with bursts of neural firing (Fig. 2c). Note that, unlike our EMX-ChR2 mice, the promoter used in the NHPs was not specific to excitatory neurons and, consistent with this, we very occasionally observed suppression of firing in some neurons, with histology confirming a small proportion of opsin expression in GAD67-positive interneurons in both animals (Fig. 2d,e). Surprisingly, there was relatively high expression in GFAP-positive astrocytes with the lentivirus, although this was far less prevalent with the AAV.

Fig. 2. Viral expression of opsins in non-human primates.

Fig. 2

a, Images of the Lenti-hSyn-eYFP-ChR2 tropism in Monkey Z (left hemisphere) and AAV8-hSyn-Chronos-GFP tropism in Monkey Y (right hemisphere) and Monkey Z (right hemisphere), comprising the complete NHP dataset. Transduction was assessed by expression of fluorescent reporter (eYFP/GFP, in green outlined by a dashed white line). The four holes (denoted with a star) linearly spaced 1.25 mm apart in Z-left are from the prongs of the LED fork. Other tracks likely reflect recording electrodes, light fibre and/or 4-AP injections. Hoechst (in blue) stains cell nuclei and NeuN (in red) labels all neurons. b, Confocal images from the three hemispheres (two animals) demonstrating GFP/YFP expression in neurons identified by co-localisation with NeuN. c, Example spike raster plots and peri-stimulus histograms showing optogenetic responses in neurons recorded from the three hemispheres. Two example cells show strong excitatory responses to blue light stimulation (shaded region), while one cell is inhibited, possibly mediated by transduced inhibitory interneurons due to the non-selective promotor. Inset: Spike waveforms, scale bars 50 μV, 0.5 ms d,e, Left: representative images of interneurons (GAD67 positive) and astrocytes (GFAP positive) infected with Lenti-hSyn-ChR2 (d) or AAV9-hSyn-Chronos (e). Right: quantification of cells expressing the GFP/eYFP reporter colocalised with either NeuN (all neurons), GAD67 (inhibitory interneurons) or GFAP (astrocytes) for each virus. Note that a higher proportion of AAV8-hSyn-Chronos transduction is neuron-specific compared to Lenti-hSyn-ChR2, while inhibitory interneurons constitute a small fraction of GFP/eYFP positive cells in both cases. Data from 10 slices per hemisphere for each cellular marker. Boxes show median and interquartile range, whiskers show max/min.

Fig. 3. Responses to open-loop and closed-loop optogenetic stimulation in vivo in NHPs.

Fig. 3

a, Schematic illustrating optical stimulation arrangement. Light was delivered using either an optic fibre angled at approximately 45° penetrating through the pial surface, or an implanted LED optrode (Extended Data Fig. 2). Responses were recorded on a linear multielectrode array (3 mm total). b, Left: LFP responses from different electrodes following open-loop blue light stimulation of monkey motor cortex injected with Lenti-hSyn-eYFP-2A-ChR2(H134R) (Dataset Z-L). Right: response to yellow light (outside the opsin absorption spectrum), delivered through the same fibre. c, No blue-light responses were seen when reproducing this configuration in a control animal without opsin expression. d, Example LFP and spike activity during open-loop stimulation and 5 s CLOSe epochs with two different phase-shifts (10 Hz filter). e, LFP cycle-triggered averages (aligned to troughs in the LFP used for CLOSe, dashed line) during no stimulation and CLOSe+. The thick line indicates the channel used for CLOSe. Tick marks indicate significant increased spike rate (average of 17 cells) compared to shuffled surrogates. Note that the LFP phase reversal observed in the endogenous activity matches that driven by optical stimulation. f, A similar correspondence was observed between endogenous and evoked oscillations in the other hemisphere, injected with AAV8-hSyn-Chronos-GFP (Dataset Z-R), as well as when stimulating with the implanted LED instead of the light fibre (Dataset Z-L-LED).

Importantly, the polarity of LFP responses to open-loop stimulation varied with depth, as expected for a physiological response rather than photoelectric artefact (Fig. 3b, left). Such responses were not observed when using a frequency of light that was outside the opsin absorption spectrum (Fig. 3b, right), or when using blue light in an animal without opsin expression (Fig. 3c). As in the brain slices, CLOSe+ drove strong oscillatory responses in field potentials and neural firing (Fig. 3d, middle), revealed by cycle-triggered LFP averages (Fig. 3e). Like the open-loop responses, the polarity of the driven oscillations also varied with depth. In each case, this depth profile resembled that of endogenous activity observed during control epochs with no stimulation, suggesting that CLOSe+ drove naturalistic patterns of network activity (Fig. 3e,f).

We were interested to examine whether the activity of individual cells became more phase-locked to the LFP under CLOSe+ conditions compared to no stimulation. Spike-triggered averaging (STA) suggested strong oscillatory coupling between spiking activity and LFP under CLOSe+ (Fig. 4a). However, STA analysis can be misleading, since the LFP amplitude increased markedly under CLOSe+, and this alone could explain the larger STA. Therefore, we assessed spike-LFP coupling using Phase-Locking Value (PLV) to quantify how consistently a neuron fired in the LFP cycle irrespective of amplitude. PLV was calculated for each neuron with LFP filtered into 1 Hz pass-bands (Fig. 4b). We observed a phase-dependent increase in PLV that corresponded to frequencies of driven oscillations under CLOSe+ (Fig. 4c), and these increases were statistically significant for approximately one third of neurons recorded in this session (Fig. 4d).

Fig. 4. Increased phase-locking of individual neurons to CLOSe+ oscillations.

Fig. 4

a, Spike-triggered averages of LFP suggest strong phase-locking between neural firing and CLOSe oscillations (0° phase-shift, blue) compared to no stimulation (black). However, this could result from the increased amplitude of the LFP under CLOSe+. Inset: Spike waveform, scale bars 50 μV, 1 ms. b, Phase-Locking Value (PLV) was used to measure phase-coupling independent of LFP amplitude, calculated from the distribution of instantaneous LFP phases at the time of spike firing (shown in blue for 0° CLOSe+ and grey for no stimulation). PLV is the resultant length of this distribution with a value between 0 and 1. PLV was calculated for different frequencies within the LFP by filtering with different pass-bands of 1 Hz width from 4 to 20 Hz. For this example cell, there is an increase in PLV within 9.5–10.5 Hz only for 0° CLOSe relative to other phase-shifts (coloured) and no stimulation (black). c, Average change in PLV relative to no stimulation across cells for different LFP frequencies and CLOSe phase-shifts. d, Significant change in phase-locking was assessed by comparing CLOSe PLV against the phase-distribution of an equal number of surrogate spikes drawn from no-stimulation epochs. Plots show the proportion of cells exhibiting a significant (P<0.05, two-tail test, no correction for multiple comparisons) increase/decrease in PLV relative to no stimulation for different LFP frequencies and CLOSe phase-shifts. Dataset Z-L: Lenti-hSyn-eYFP-2A-ChR2(H134R), 10 Hz filter frequency, 17 neurons. Note that the phase-shifts/frequencies of increased phase-locking correspond to oscillations driven by CLOSe+ (Fig. 5c).

Despite using an excitatory opsin, certain phase-shifts, designated CLOSe, reduced the amplitude of cycle-triggered LFP oscillations relative to no-stimulation epochs (Fig. 5a). To reveal this more clearly, we normalised the raw LFP power spectra during stimulation epochs for each phase-shift (Fig. 5b) by the corresponding power spectrum for no-stimulation epochs. Fig. 5c shows normalised oscillatory power at each frequency for each phase condition. Regions of red reflect CLOSe+ driving positive feedback oscillations, while interspersed regions of blue show CLOSe phase-shifts that suppressed LFP power below spontaneous levels. No such modulation was observed in control experiments using yellow light (Fig. 5d), demonstrating again that our results were mediated by optogenetic stimulation rather than non-specific effects such as photoelectric artefacts or tissue heating.

Fig. 5. Phase-dependent modulation of endogenous activity in vivo in NHPs using CLOSe.

Fig. 5

a, Cycle-triggered averages for all CLOSe phase-shifts (Dataset Z-L). For CLOSe+ phase-shifts, the amplitude of LFP cycles was increased relative to no stimulation (black traces), while for CLOSe phase-shifts it was reduced. Note the vertical scale is different for each row. b, LFP power spectra for epochs of CLOSe with different phase-shifts. c, Relative power modulation for different CLOSe phase-shifts, showing frequencies with increased (red) and reduced (blue) activity relative to no stimulation. d, No modulation was observed when stimulating with a frequency of light outside the opsin absorption range. e, LFP modulation driven by an implanted LED. f, LFP modulation (between 0.8-1.2x the filter frequency) for the three datasets. R and P values from circular-linear correlation over stimulation epochs. g, LFP modulation for different filter frequencies replicated in three datasets (Z-L: Lenti-hSyn-eYFP-2A-ChR2(H134R); Z-R and Y: AAV8-hSyn-Chronos-GFP). h, Maximum/minimum power modulation (between 0.8-1.2x the filter frequency) for different filter frequencies. Top: maximum/minimum value for any phase-shift. Shading indicates s.e.m. over stimulation epochs. Bottom: maximum/minimum values of sinusoidal fit to data. Filled circles indicate significant phase-dependent modulation (circular-linear correlation over stimulus epochs, P<0.05).

We also tested CLOSe delivered via the implanted LED optrode (Extended Data Fig. 2a). Significant modulation of field potential power could be obtained using a single LED (Fig. 5e), albeit with a weaker magnitude, consistent with the LED producing about half the light power of our commercial fibre-coupled system (Extended Data Fig. 2b). Fig. 5f shows modulation of power around the closed-loop filter band (between 0.8-1.2x the central frequency), with a statistically significant effect of the eight phase conditions for illumination with blue light via the fibre (circular-linear correlation, n=57 stimulation epochs, R=0.90, P=1x10-10) and LED (n=60, R=0.86, P=2x10-10) but not for control yellow light (n=58, R=0.13, P=0.6). We observed statistically significant (circular-linear correlation, P<0.05) phase-dependent power modulation in experiments made in three hemispheres from two animals (Fig. 5g), using both opsins (Supplementary Table 1). Once again, we could tune the frequencies of enhancement and suppression by altering the filter frequencies. We quantified modulation from both the maximum/minimum modulation of LFP power for any single phase-shift (raw data, Fig. 5h top) and from a sinusoidal fit through all phase-shifts (sine fit, Fig. 5h bottom). As with the brain slice experiments, average modulation (between 0.8-1.2x the filter frequency) became progressively weaker for higher closed-loop filter frequencies, but statistically significant phase-dependence at 40 Hz was nevertheless observed in two of the three datasets and, for dataset Z-L, the maximal modulation was comparable across all tested frequencies.

CLOSe modulates induced epileptiform activity in vitro

Having demonstrated phase-shift-dependent enhancement and suppression of endogenous oscillations, we next examined whether CLOSe could influence pharmacologically-induced pathological states resembling seizures. In our in vitro brain slice model, prolonged bath application of 4-aminopyridine (4-AP) generated sporadic but repeated seizure-like events over several hours consisting of multiple brief bursts of oscillatory discharge around 15-20 Hz (Fig. 6a). Once this activity pattern had stabilised, we examined the effect of closed-loop stimulation with a filter set to the frequency of the oscillatory bursts. CLOSe could lengthen or shorten the duration of individual bursts depending on phase-shift (Fig. 6b, left). Fig. 6b (right) shows a logarithmic plot of the modulation of burst durations under different CLOSe phase-shifts relative to no-stimulation epochs. Across this whole session, the burst duration was doubled under CLOSe+ (0° phase-shift, mean ± s.e.m. over bursts log2-ratio burst duration = 1.00 ± 0.18) and decreased by about a quarter under CLOSe (225° phase-shift, log2-ratio burst duration = -0.44 ± 0.15). Circular-linear correlation across the eight phase-shift conditions confirmed that modulation of burst duration depended significantly on closed-loop phase-shift (n=221 seizure bursts, R=0.62, P=1x10-16). Modulation was also evident as phase-dependent enhancement and suppression of LFP power spectra during seizure-like events (Fig. 6c). Averaged across our dataset of 10 sessions with brain slices from 10 different mice, the relative duration of seizure bursts was modulated between a max/min log2-ratio of 0.49 ± 0.13 to -0.48 ± 0.11 (mean ± s.e.m. over animals, equivalent to 1.4x increase and 0.7x decrease respectively; Fig. 6d), and depended significantly on closed-loop phase-shift in 8/10 individual sessions (circular-linear correlation, P<0.05). When all sessions were combined (after adjusting to high-gamma activity as before), the relative burst duration also depended significantly on CLOSe phase-shift (circular-linear correlation, n=10 sessions x 8 phase conditions, R=0.29, P=0.03; Fig. 6d), as did power modulations at seizure frequencies (n=80, R=0.39, P=0.002; Fig. 6e). Note however that our (high-gamma) phase-shift adjustment did not perfectly align the different sessions so the max/min modulation in the session-averaged plots was lower than that seen in individual sessions, and no single phase-shift produced statistically significant suppression in the combined dataset.

Fig. 6. CLOSe modulates 4AP-induced epileptiform activity in Emx1-ChR2 mouse brain slices.

Fig. 6

a Example seizure-like event comprising multiple bursts elicited by bath application of 4-AP to Emx1-ChR2 mouse brain slices. b Left: Individual seizure bursts under CLOSe (20 Hz filter) with different phase-shifts showing phase-dependent prolongation and shortening of burst duration. Right: Average burst duration relative to no stimulation for different CLOSe phase-shifts. Shading indicates s.e.m. over bursts. R and P values from circular-linear correlation over bursts. Dashed line shows sinusoidal fit. c Left: LFP power spectra during seizure-like events under different CLOSe phase-shifts. Right: Modulation of LFP power relative to no stimulation. d Left: Max/min modulation of burst duration across 10 sessions from 10 different mice for raw data and sinusoidal fit. Colour shows phase-shift associated with max/min for individual sessions. Right: Average modulation of burst duration averaged across sessions. e Same but for LFP power at seizure frequency. Error bars indicate s.e.m. over sessions. R and P values from circular-linear correlation over datasets.

Our in vitro experiments used transgenic mice to restrict opsin expression to excitatory neurons, whereas our NHP experiments used viral delivery of opsins which also expressed in a small proportion of inhibitory interneurons (Fig. 2). To aid comparison of these datasets, we also performed experiments in slices from three mice injected intracortically with one of the viruses used in the primates (AAV8-hSyn-Chronos-GFP), to replicate our key in vitro findings using this opsin-delivery method. CLOSe delivered to quiescent slices was able to drive strong oscillations (Extended Data Fig. 3a) with a phase-dependence (Extended Data Fig. 3b) and closed-loop filter frequency-dependence (Extended Data Fig. 3c) that resembled those seen in the Emx1-ChR2 slices (Fig. 1). CLOSe was also able to modulate 4AP-elicited seizure-like events, albeit less strongly than for our experiments with germline transgenic expression of opsins (with more widespread expression). Averaged across the three animals, the relative duration of seizure bursts was modulated between a max/min log2-ratio of 0.33 ± 0.06 to -0.33 ± 0.02 (equivalent to 1.25x increase and 0.8x decrease respectively; Extended Data Fig. 3d), and depended significantly on closed-loop phase-shift (circular-linear correlation, n=3 animals x 8 phase conditions, R=0.53, P=0.03). LFP power at seizure power was modulated between +2.2 ± 1.1 dB to -2.3 ± 0.6 dB and also depended significantly on closed-loop phase shift (circular-linear correlation, n=3 animals x 8 phase conditions, R=0.52, P=0.04; Extended Data Fig. 3e).

CLOSe modulates epileptiform activity in vivo

In the non-human primates in vivo, injection of 4-AP into the motor cortex reliably produced prolonged seizure events lasting around 20 s occurring at regular intervals (typically every minute for about an hour). Seizure events were characterised by an initial oscillation in the range 15-25 Hz followed by post-ictal discharges. Fig. 7a shows two events from the right hemisphere of monkey Z (Chronos opsin); the first during a control period with no stimulation, and the second during delivery of CLOSe with a phase-shift of 225° with a marked suppression of oscillatory discharge. Unlike the in vitro data, background activity and seizure variability precluded precise identification of the onset and offset of individual events. Therefore, to visualise the impact of CLOSe across the entire session, we computed the autocorrelation of the LFP amplitude envelope within the seizure band (10-30 Hz) over the whole duration of CLOSe and control epochs. The peaks in Fig. 7b with a width of approximately 20s reveal the broad temporal structure of seizures bursts, and the variation in their height and width indicates modulation by closed-loop stimulation. We quantified seizure magnitude by calculating the area under this curve (between ±20 s), although note that this single measure is influenced by the intensity, duration and interval between individual events. In addition, we calculated power spectra, across all epochs for each stimulation condition (Fig. 7c), which, when normalised by the no-stimulation spectra, again revealed a characteristic pattern of phase-dependent modulation (Fig. 7d). Finally, we calculated the proportion of total time for which the seizure amplitude (defined by the smoothed, rectified LFP) exceeded a particular threshold. Rather than choosing the threshold arbitrarily, we calculated this for all possible threshold values up to the maximum amplitude observed in the no-stimulation condition. For all threshold values, the proportion of time spent in the seizure state was increased under CLOSe+ and reduced under CLOSe (Fig. 7e).

Fig. 7. CLOSe modulates 4AP-induced epileptiform activity in vivo in non-human primates.

Fig. 7

a, Top: Example seizure-like event elicited by intracortical injection of 4-AP in monkey motor cortex. Bottom: Example seizure-like event under CLOSe (15 Hz filter frequency). b, Autocorrelation of seizure-band LFP amplitude envelope reveals the temporal structure of seizure bursts under no stimulation (black). Coloured traces show modulation by CLOSe with different phase-shifts. c, LFP power spectra under different CLOSe phase-shifts. d, Modulation of LFP power relative to no stimulation. e, Percentage of time spent in seizure state under no stimulation (black) and different CLOSe phase-shifts (colour). Seizure state was defined as smoothed, rectified LFP amplitude exceeding a particular threshold, ranging from zero up to the maximum amplitude observed in the no stimulation condition. f, Same for replication in a second animal. g, Same for replication using implanted LED to deliver light. h, Left: Max/min modulation of burst magnitude (area under autocorrelation peak) across 4 datasets for raw data and sinusoidal fit. Colour shows phase-shift associated with max/min for individual datasets. Right: Average modulation of burst magnitude averaged across datasets. i, Same but for LFP power at seizure frequency. Error bars indicate s.e.m. over datasets. R and P values from circular-linear correlation over datasets. j, Percentage change in time spent in seizure states under CLOSe+ (45° phase-shift) and CLOSe (270° phase-shift) relative to no stimulation for the four datasets. Thick lines show average across all datasets.

Similar results were obtained in two animals (Fig. 7f), as well as one session in which stimulation was delivered using the implanted LED (Fig. 7g). Across our dataset of 4 sessions, seizure magnitude was modulated by CLOSe between a log2 ratio of 1.11 ± 0.25 to -0.66 ± 0.13 (a 2.1x increase and 0.6x suppression respectively). When these data were combined, we observed a statistically significant effect of phase-shift on seizure magnitude (n=4 sessions x 8 phase conditions, R=0.70, P=0.0004; Fig. 7h) as well as corresponding modulation of LFP power at seizure frequencies (n=32, R=0.67, P=0.0007; Fig. 7i). Fig. 7j summarises the percentage change in time spent in seizure states under the most effective CLOSe+ and CLOSe phase-shifts (45° and 270° respectively) relative to no stimulation, using different threshold values to define the seizure state. This was substantially increased under CLOSe+, especially for seizures defined by the highest threshold values. By contrast, under CLOSe, the time spent in a seizure defined at 50% of maximum intensity was reduced by a third, and was reduced to a half for seizures greater than 68% of maximum. Seizure states with the highest amplitude (94% and greater) were completely eliminated. Extended Data Fig. 4 shows that the modulation of time spent in high-amplitude seizure states was related to a phase-dependent effect on both the duration (Extended Data Fig. 4d) and frequency (Extended Data Fig. 4f) of these states.

CLOSe stabilises or destabilises abnormal network dynamics

Epileptic activity is usually thought to reflect an excess of excitatory activity in brain networks. Therefore, our observation that excitatory stimulation can reduce the intensity of seizures is counterintuitive. To examine how CLOSe was capable of attenuating seizure-like events, we simulated a simple Wilson-Cowan neural mass model that has previously been applied to epileptic activity14,15. The model comprised two interconnected neural populations (excitatory and inhibitory) whose activity was represented in a two-dimensional phase space. The instantaneous state evolved through time according to nonlinear dynamics, which divided the phase space into two regimes (Fig. 8a). States initiated with low excitatory activity evolved towards a stable fixed point representing a quiescent network, while initial states with higher excitatory activity were attracted towards a limit cycle representing epileptiform oscillations. Connection weights were chosen to produce an oscillation frequency similar to the experimental data and Gaussian noise input was added to both populations, allowing probabilistic transitions between quiescent and seizure regions. CLOSe was modelled as an additional excitatory input to the excitatory population, dependent on a phase-shifted LFP signal reflecting a high-pass filtered combination of the activity of both populations.

Fig. 8. In silico model suggests CLOSe can stabilise/destabilise seizure cycles.

Fig. 8

a, Left: Schematic of in silico model comprising interconnected excitatory (E) and inhibitory (I) populations with white noise input. Right: Model trajectories evolving in the state-space. In the absence of noise, trajectories in green converge on a stable fixed point while trajectories in grey converge on a limit cycle. The dashed line indicates the separatrix between these regions. b, Top left: Simulated seizure bursts under CLOSe with different phase-shifts. Simulations were initiated on the limit cycle prior to onset of CLOSe (dashed line), and used the same noise input. Top right: Modulation of burst duration relative to no stimulation for different CLOSe phase-shifts. Shading indicates s.e.m. over 20 iterations with different noise seeds. Bottom: Modulation of LFP power relative to no stimulation. c, State-space trajectories under CLOSe+ and CLOSe in the absence of noise. Blue indicates when stimulation is delivered. Note that CLOSe increases the complexity of the trajectory. See Supplementary Video 1 for trajectories under all phase-shifts. d, State-space trajectories in the presence of noise. The trajectory fluctuations under CLOSe are exacerbated, increasing the probability that noise takes the system into the point attractor basin. e, Model dynamics reconstructed from delay-embedding of simulated LFP. Under CLOSe+ the LFP traces consistent cycles, while under CLOSe the trajectory is more complex and variable. f Delay-embedded trajectories for an example in vitro session show a similar pattern (see also Supplementary Fig. 5). g, Cycles were quantified with trajectory coefficient of variation (CoV, left) and approximate entropy (AppEn, right). Both are modulated by CLOSe phase-shift relative to no stimulation (dashed line) for in silico (top) and in vitro (bottom) data. h, CoV (left) and AppEn (right) plotted against burst modulation for different CLOSe phase-shifts, averaged across all 10 mouse in vitro sessions. i Same but for the 4 NHP in vivo datasets. R and P values from linear correlation across phase-shifts.

Model simulations starting from the limit cycle under different closed-loop feedback conditions qualitatively captured many features of our experimental data (Fig. 8b, c.f. Fig. 6b,c), including phase-shift-dependent lengthening or shortening of seizure durations, and associated modulation of spectral power. To understand this better, we examined the behaviour of the seizure limit cycle under different CLOSe conditions (Fig. 8c and Supplementary Video 1). In the absence of input noise, excitatory stimulation alone never halted the seizure, but as the phase-shift advanced from CLOSe+ to CLOSe, the limit cycle underwent period doubling and became increasingly complex, fluctuating between small and large cycles in the phase space. Since the larger cycles came close to the boundary of the quiescent regime, there was a higher probability that the added noise input could push the network across into the attractor basin of the stable fixed point (Fig. 8d). In other words, the altered duration of seizure bursts relative to the no-stimulation condition in our model could be explained by the increased stability (in the presence of input noise) of the limit cycle under CLOSe+, and its increased sensitivity to noise perturbations under CLOSe.

To seek evidence for this phenomenon in our experimental data, we used delay embedding to reconstruct the dynamics of simulated and actual LFP data. Fig. 8e,f and Extended Data Fig. 5 shows 2D and 3-D projections of delay-embedded trajectories for the in silico simulation and for an example in vitro session. There are notable qualitative similarities between the model and experimental data; some phases of closed-loop stimulation are associated with simple, planar cycles whilst other phases generate complex and twisted trajectories. We quantified trajectories using two metrics: (i) the Coefficient of Variation (CV) of the radius, and (ii) approximate entropy (AppEn), which is an information theoretic measure of complexity that has previously been applied to seizure data16. For both simulated and experimental data, these metrics showed a phase-shift-dependent modulation, with lower/higher trajectory variability and entropy associated with CLOSe+/CLOSe–- respectively, relative to no stimulation (Fig. 8g). For both the in vitro (Fig. 8h) and in vivo datasets (Fig. 8i), trajectory CV and AppEn were inversely correlated with seizure duration and seizure severity (P<0.05 in all cases), providing evidence that the enhancement and suppression of epileptiform activity are associated with closed-loop feedback that respectively stabilises and destabilises the seizure cycle.

Open-loop versus closed-loop excitatory stimulation

Our results demonstrate that the effect of excitatory stimulation on neural circuits depends critically on when it is delivered, relative to the instantaneous phase of ongoing oscillations, and that this can be controlled in a closed-loop manner since optogenetics does not prevent concurrent LFP recording. Nevertheless, we were interested in whether suppression could be also obtained by open-loop delivery of an appropriate stimulus train. Therefore, we used our computational model to determine closed-loop stimulation patterns that attenuated seizure bursts and then replayed these during subsequent simulation runs. However, open-loop delivery of the same stimulation pattern failed to attenuate seizures, even when that pattern was initiated at the same phase of the seizure cycle (Extended Data Fig. 6a), because of subtle differences between each run introduced by noise in the model. Such sensitivity to noise is characteristic of the complex dynamics exhibited by our model, meaning that the appropriate stimulation pattern to suppress seizures cannot be determined in advance and can only be delivered via closed-loop stimulation.

We additionally explored the effect of open-loop stimulation with a constant frequency. For all frequencies tested, the duration of seizure bursts in our model increased monotonically with intensity under constant frequency stimulation (Extended Data Fig. 6b). Interestingly, stimulation at the frequency of seizure cycles was most effective at prolonging seizure duration, likely because this pattern entrained network oscillations and thus stabilised the seizure dynamics. We tested this prediction in vitro using bath application of 4AP to brain slices taken from three Emx1-ChR2 mice. We delivered open-loop stimulation triggered by on the onset of seizure-like events (Extended Data Fig. 6c), choosing stimulation parameters to match the frequency and intensity of our CLOSe intervention. As in our model, open-loop stimulation reliably entrained seizure cycles, evident from the consistent alignment of stimulation pulses to LFP cycles within and across seizure bursts. Moreover, this open-loop stimulation pattern only prolonged burst duration and increased LFP power relative to no stimulation, comparable to the effects of CLOSe+.

Discussion

Over recent years, optogenetics has emerged as a powerful tool for manipulating neural populations with unprecedented spatial resolution and cell-type specificity. Our results highlight a further advantage of optical stimulation that is less widely appreciated, namely the ability for feedback control using concurrent electrical recordings without interference from artefacts, allowing for continuous, dynamic interaction with the neural tissue. We found that the effects of closed-loop, excitatory optogenetic stimulation depended critically on the timing relative to ongoing activity, with CLOSe+ able to drive strong oscillations at a range of frequencies in quiescent tissue, and CLOSe suppressing endogenous activity and pathological seizure-like oscillations. While optical stimulation is not necessarily free from potential sources of artefact (e.g. photoelectric effects), several lines of evidence point conclusively to an opsin-mediated effect in our data. First, we verified opsin expression and functionality from spike recordings and post-mortem histology. Second, we saw no modulation when using light outside the absorption spectrum of our opsins or in a monkey without opsin expression. Third, the evoked responses exhibited polarity-reversals through the tissue, which resembled those of spontaneous activity. Fourth, the modulatory effects of CLOSe depended consistently on the phase-shift relative to high-gamma activity rather than the low-frequency LFP. Finally, optogenetic responses were attenuated with increasing frequency, as expected for physiological opsin activation17.

The ability to manipulate oscillatory activity systematically with CLOSe has many scientific applications for exploring the function of neural oscillations. While other interventions (e.g. pharmacological) can be used to enhance or block oscillations, an advantage of CLOSe is that enhancement and suppression at different frequencies can be interspersed within the same experimental design, simply by tuning parameters of the feedback loop (e.g. the filter pass-band and phase-shift). Moreover, potential uses extend beyond driving the predefined activity up, or down, since the addition of closed-loop feedback to a recurrent network can qualitatively alter the dynamics expressed by that system. For example, we showed computational and experimental evidence that CLOSe altered the sensitivity of state-space limit cycles to noise perturbations, thus precipitating or delaying phase transitions to non-oscillatory states. We used a relatively simple feedback algorithm, but the combination of nonlinear control theory18,19 with closed-loop optogenetic paradigms offers possibilities to test hypotheses about the role of phase transitions and metastability in brain function and behaviour20,21. Closed-loop stimulation may also influence network dynamics on longer time-scales, for example, by influencing associative plasticity mechanisms22,23.

In future, these approaches may extend the scope of current neurostimulation treatments. For epilepsy, responsive electrical stimulators can intervene upon detection of seizure onset6. At present, these interventions comprise open-loop trains of high-frequency stimuli, but theoretical24,25 and experimental26,27 work suggests the effect of stimulation may depend on its timing of stimulation relative to activity cycles, so closed-loop stimulation which takes into account the phase of the seizure cycle may be more effective than open-loop stimulation28. Similarly, adaptive DBS for Parkinson’s disease is being trialled in humans, but this is currently limited to adjusting the amplitude of open-loop stimulation29. However, there is evidence that DBS arriving on a specific oscillatory phase can suppress the amplitude of pathophysiological rhythms in Parkinson’s disease30, while delivering either DBS31 or transcranial stimulation32 phase-locked to accelerometer measurements can reduce the severity of tremor. Phase-dependent DBS controlled by field potentials in the overlying cortex has recently been used to disrupt parkinsonian oscillations in rodents33. Closed-loop optogenetics could allow such stimulation to be controlled in real-time by abnormal activity recorded from the local network without interference from artefacts.

Optogenetic therapies for epilepsy have been demonstrated in rodent models, but thus far consist of continuous inhibitory stimulation delivered once a seizure is detected3436. However, inhibition-based strategies may prove difficult to translate to humans since ion-pumps like halorhodopsin34 are relatively inefficient and require high light levels to inhibit neuronal activity, while high expression of excitatory opsins in inhibitory neurons35,36 is difficult to drive with viral methods (but see 37). Moreover, some epilepsies are associated with loss of interneuron populations38,39, and suppression of epileptic activity by GABAergic inhibition, or hyperpolarising ion channels like ACR, relies on appropriate ionic gradients being maintained, which may not be the case during seizures40. These considerations led us to test excitatory stimulation, relying on the precise timing of stimulation relative to network dynamics to suppress activity. The 4-AP model is relevant, in this regard, because over a relatively short time-span the network stabilizes into a state of repeated discharges which arises at least in part from raised intracellular chloride and associated effects on extracellular potassium40,41, and which is exacerbated by stimulating interneurons4244. Given the ictogenic potential of GABA, our demonstration of reduced epileptic activity using excitatory stimulation delivered at the appropriate oscillatory phase (CLOSe) thus represents a promising approach to seizure suppression. An added practical advantage of the 4-AP model used here was that seizure-like events occurred with sufficient regularity to allow a range of stimulation parameters to be explored in vivo within individual experimental sessions with non-human primates. Nevertheless, many network states can give rise to seizures45, and future work will be needed to assess the effects of CLOSe in other situations including chronic models of epilepsy.

Notwithstanding these practical issues with delivery of inhibitory stimulation, it will be valuable in future to test closed-loop inhibitory optogenetics, using either cell-specific expression of excitatory opsins in interneurons, or inhibitory opsins in pyramidal neurons. For example, a recently reported fast-acting light-activated potassium channel46 may provide a means to circumvent the issues of chloride loading described above. To further motivate this, we ran in silico simulations using our two-population neural mass model, delivering different strategies of closed-loop stimulation. Effectively inhibition/excitation of either specific or mixed populations can be considered as perturbations acting in different directions in the model phase space (Extended Data Fig. 7, middle). The outer panels of Extended Data Fig. 7 show the effect on seizure duration of delivering such stimulation in a phase-dependent manner. Not surprisingly, strategies that suppressed excitatory neurons (Extended Data Fig. 7, left) and/or activated inhibitory neurons (Extended Data Fig. 7, top) were generally more effective at shortening seizure bursts than activation of excitatory neurons (Extended Data Fig. 7, right) and/or suppression of inhibitory neurons (Extended Data Fig. 7, bottom). Nevertheless, almost all stimulation strategies had the potential to either lengthen or shorten seizures depending on the phase at which closed-loop stimulation was delivered, and in all cases, there were particular phases that were most effective. In other words, due to the dynamics of the network, the timing of when stimulation is applied relative to ongoing activity is as important as what that stimulation does to the individual neuronal populations. Thus, closed-loop delivery (contingent on the instantaneous state of the local network) may also benefit seizure-suppression strategies with inhibitory opsins, enabling more effective suppression with less overall light delivered, but this remains to be tested experimentally.

One difference between 4-AP-induced seizure-like events in vitro with mice versus in vitro with non-human primates was that the former generally consisted of discrete oscillatory bursts of a single frequency whereas in vivo the pattern progressed from higher- to lower-frequency of oscillation. Thus it may be advantageous in future to use a closed-loop phase-shift algorithm that tracks changes in oscillation frequency47. Moreover, it is possible that different intervention approaches may be best suited to different time periods before or during seizures, for example low-frequency open-loop stimulation in interictal periods48,49 or optogenetic methods aimed at restoring ionic concentration gradients50.

Recently, an optogenetic therapy has been tested in humans for restoring sight51. There are however several challenges for the translation of optogenetics to the human brain, which is less surgically and optically accessible, and less self-contained than the eye. The first is to demonstrate the safety and efficacy of opsin expression. The use of viral vectors in primates has lagged somewhat behind the progress being made in rodents, but our study is among several to show that widespread high-expression levels can be obtained52,53. Optogenetic control of human neurons has been demonstrated in organotypic cultures54, but more work is needed to assess the potential risks of long-term expression of opsins55. Second, a safe method of delivering sufficient light is required without the infection risk posed by percutaneous light fibres. We demonstrated that effective modulation of local brain activity in non-human primates could be obtained using implanted LEDs. Long-term protection of active electronic components within brain tissue is a challenge, but the silicone-encapsulation technique we used in this study has proven to be highly reliable in the accelerated lifetime testing of insulators56. We are currently developing array implants that combine multiple forks with multiple LEDs on each prong to deliver uniform or patterned illumination to a large volume of cortex, together with custom CMOS circuitry57 to process LFP recordings, supply drive current and monitor LED temperature58. The cell-specific control enabled by optogenetics has applications in many neurological disorders, and we hope these technologies will help translate the promise of optogenetic therapies to the human brain.

Methods

All animal procedures were carried out under appropriate licenses issued by the UK Home Office under the Animals (Scientific Procedures) Act 1986, and were approved by the Animal Welfare and Ethical Review Board of Newcastle University.

In vitro mouse experiments

Brain slice experiments used 18 young adult male C57BL/6J transgenic mice expressing channelrhodopsin in pyramidal neurons. Cell-specific expression was achieved by crossing mice homozygous for Cre-recombinase under the Emx1 promoter (EMX1-IRES-Cre mice; Stock #005628, The Jackson Laboratory, USA) with mice carrying the floxed channelrhodopsin gene (Ai19-flox-channelrhodopsin; Jackson Stock #12569). We additionally performed a series of brain slice experiments in mice using viral expression of opsins. Three young adult male wildtype C57BL/6J were administered with buprenorphine (0.05 mg/kg i.p.) and meloxicam (5mg/kg s.c.) prior to anaesthetic induction with 5% isoflurane in 1L/min O2, maintained at 1.5-2%. 500nl of AAV8-hSyn-Chronos-GFP (1012 VP/ml, University of North Carolina Vector Core, USA) was injected at 1.7 and 1.2 mm depths (AP +1, ML +1.5 relative to bregma) at a speed of 150nl per minute. Animals received post-operative meloxicam (5mg/kg s.c.). All mice were group housed in individually ventilated cages kept at room temperature with a 12 h/12 h light/dark cycle and provided with food and water ad libitum.

For brain slice preparation, mice were anesthetized with isoflurane prior to injection of ketamine (≥100 mg/kg i.m.) and xylazine (≥10 mg/kg i.m.) and intracardial perfusion with modified artificial cerebrospinal fluid (ACSF) composed of (mM) 252 sucrose, 3.0 KCl, 1.25 NaH2PO4, 24 NaHCO3, 2.0 MgSO4, 2.0 CaCl2 and 10 glucose. Following brain removal, 450 μm horizontal slices were cut with a vibratome and transferred to a holding chamber at room temperature for approximately 1 hr. They were then placed in a recording chamber at the interface of normal ACSF (sucrose replaced with 126 mM NaCl) maintained at 32–34 °C and humidified with 95% O2/5% CO2. Multielectrode arrays (A16x1-2mm-100-177, NeuroNexus) were used to record LFPs (connected to either a Multichannel Systems MP8I headstage, PGA amplifier and CED Micro1401 running Spike2 v7, or an INTAN RHD2000 running v2 software). Optical stimulation was delivered via a 200 μm fibre (M89L01–200, Thorlabs) positioned 40mm above the slice. This was connected via a fibre optic cable to LED cubes delivering either a blue (470 nm, M470F1, Thorlabs to activate the opsin) or yellow (590 nm, M590F2, Thorlabs as a control) LED driven up to a maximum current of 1.2 A (T-cube, ThorLabs). We report data from 21 sessions in quiescent brain slices, and 10 sessions in which seizure-like activity was induced by bath application of 200 mM 4-AP. Datasets were only excluded from in vitro seizure experiment analyses in cases where 4-AP did not elicit epileptiform activity.

In vivo NHP experiments

Experiments were conducted in two female macaca mulatta monkeys (age 4.3-5.3 years, weight: 5.7-6.7 kg), coded Z and Y. The animals were injected with optogenetic viruses under anaesthesia (2% sevoflurane and alfentanil 0.2-0.3 μg/kg/min i.v.) and aseptic conditions. Methylprednisolone (30 mg/kg followed by 5.4 mg/kg/h i.v. infusion) was given to reduce oedema, together with meloxicam (0.3 mg/kg s.c.). The injections were performed in the primary motor cortex (M1), following a craniotomy and dural resection to visualise the central sulcus. Z and Y both received AAV8-hSyn-Chronos-GFP (1012 VP/ml, University of North Carolina Vector Core, USA) in the right M1. Monkey Z was additionally injected with Lenti-hSyn-eYFP-2A-ChR2(H134R) (109 vp/ml, our construct, Vigene Biosciences) in the left M1 in a subsequent procedure. Injections used multiple stainless-steel needles (diameter= 0.3 mm, 1 mm separation, Y: 4 needles, Z: 8 needles) connected to Hamilton syringes via tubing filled with silicone oil. The syringes were mounted on ultra-micro-pumps (UMP3) synchronously controlled with the SYS-Micro4 controller (World Precision Instruments). 5 μl of virus was injected per site at multiple depths from 1-4 mm below the cortical surface at either 500 nl/min (Y) or 250 nl/min (Z). The total volume of virus injected is given in Supp Table 1.

Experiments were carried out under terminal anaesthesia in monkey Y (50 days after injection) and monkey Z (134 and 50 days after the injection of AAV-Chronos and Lenti-ChR2 respectively). Surgical preparation of the injection site was performed under inhalation anaesthesia (1-2% sevoflurane) after which we switched to intravenous infusion of ketamine (6 mg/kg/h), alfentanil (0.2-0.3 μg/kg/min) and midazolam (0.14 mg/kg/hr) in order to maintain cortical excitability. The animals were ventilated and hydrated, and heart rate, blood pressure, saturation, end-tidal CO2 and temperature were monitored throughout. Neural activity in monkey Y was recorded using a NeuroNexus probe (A4X1-tet-3mm-150-121) and in monkey Z using U-probes (260 μm shaft diameter, 32 channels, 100 μm linear spacing, Plexon Inc). Data were amplified and acquired at 25 kHz using the RHD2000 system (Intan Technologies). Light was delivered through a 200 μm fibre (M89L01–200, Thorlabs) inserted superficially into the cortex, mounted to the same LED cubes as used in the in vitro experiments. In some experiments in monkey Z, we additionally used an implanted LED (see section below) to deliver light to the tissue. After collecting data based on endogenous activity, 4-AP (100 mM) was injected into the cortex using a Hamilton syringe and ultra-micro-pump (UMP3) with the SYS-Micro4 controller (World Precision Instruments). Multiple injections of 1μl at 200 nl/min were made at the same site until sustained seizure activity was observed (typically 5–10 μl per hemisphere). Supplementary Table 1 describes the datasets collected in each NHP; all experiments were included in the analyses and no datapoints were excluded.

At the end of the experiment, monkeys were deeply anesthetized with propofol and transcardially perfused with phosphate-buffered saline followed by 4% paraformaldehyde. The brain tissue containing the injection/recording site was stereotaxically dissected and equilibrated in 30% sucrose before 20 μm horizontal sectioning. Immunostaining was performed with antibodies to identify the fluorescent eYFP or GFP reporter on each virus (anti-GFP; ab290 Abcam; 1:1000), neurons (anti-NeuN; ab104224 Abcam; 1:500), inhibitory interneurons (anti-GAD67; MAB5406 Millipore; 1:1000) and astroglia (anti-GFAP; ab4674 Abcam; 1:1000). Finally, Hoechst dye was added to stain cell nuclei. Zoomed out images were captured on an upright fluorescence microscope (Nikon Eclipse NiE) with DAPI (340-380 excitation; 435-485 emission), FITC (465-495 excitation; 515-555 emission) and TRITC (527-552 excitation, 557-633 emission) filter cubes via an Andor camera (Zyla, sCMOS) and 4x objective (NA=0.2). A Zeiss LSM800 Airyscan inverted confocal microscope was used for quantification purposes. Images were taken with a 20x objective (NA=0.8), 488nm and 561nm laser lines to acquire 1 μm Z-stacks (12 frames) and an image resolution of 1024 x 1024 pixels. The percentage of colocalised YFP/GFP reporters with NeuN, GAD67 or GFAP positive cells was quantified manually on merged images using ImageJ (NIH).

Implantable LED array

Extended Data Fig. 2a shows the implantable optrode fork. Optrode fabrication began with a 200 μm-thick silicon wafer which underwent a standard solvent clean procedure in n-methyl pyrrolidine (NMP) followed by isopropanol (IPA) and then rinsed in deionised water. A 1 μm-thick insulation SiO2 layer was deposited by chemical vapour deposition on the silicon surface. Ti/Au/Ti metallisation was deposited by evaporation on top of the insulation, and patterned by UV photolithography to outline the metal tracks and recording electrodes. Metal patterning was carried out by a selective wet etch based on NH4OH:H2O2 (1:2) for titanium, and a K3Fe(CN)6, Na2S2O3 and CS(NH2)2 in deionised water mixture for gold. The Ti/Au/Ti patterns were then capped with a second SiO2 insulation layer. Contact windows through the top insulation needed to access the bonding pads were opened by reactive ion etch (RIE), using a Ti/Ni metal mask which was deposited by e-beam evaporation and patterned by UV photolithography and wet etching. Optrode singulation was achieved by deep reactive ion etching (DRIE).

Micro-LEDs (DA2432, Cree) were bonded on the gold LED pads on the optrode shaft using off-the-shelf Au/Sn preforms (Inseto, 100 μm x 100 μm x 10 μm, comparable with the LED footprint). Using a pick-and-place Fineplacer Lamda tool, a preform was placed on each of the two LED pads, the LED was placed directly on top of the AuSn preforms, and the LED/preforms stack was heated to 320°C to melt the preform and bond the LED.

The silicone rubber used for encapsulation was NuSIL MED6015, an optically clear, solvent free, low viscosity silicon elastomer safe for human implantation. The two-part rubber was mixed in a vortex mixer (10 part A:1 part B). The optrode surface was prepared by a solvent clean in acetone and IPA in an ultrasonic bath, then rinsed in deionised water. The optrodes were dipped into the silicone mix and then mounted on the vacuum holder of a spin coater. A uniform thickness of the silicone around the optrode was achieved by spinning at 2000 rpm for 5 seconds and 4000 rpm 10 seconds. The silicone was cured at 150°C for 15min. The LED fork was inserted into the brain using a stereotaxic manipulator. We used a single LED at the tip of one shaft to deliver closed-loop stimulation. The LED was driven by a voltage-controlled constant current stimulator (DS4, Digitimer) up to a maximum current of 5mA. Extended Data Fig. 2b compares the total light power emitted by the LED and the fibre-coupled Thorlab system over the full experimental range, measured using an integrating sphere (OPM150, Artifex Engineering). In both cases, the light source was placed near the centre of the integrating sphere, which captures light emitted from all angles into an integrated calibrated photodiode.

Closed-loop stimulation

The closed-loop algorithm was implemented in custom-designed hardware based around a dsPIC30F6012A microcontroller running at 30MHz. The microcontroller sampled the LFP from one electrode at 500 Hz, applied a causal phase-shifting finite impulse response (FIR) filter, thresholded (just above the background noise level) and half-wave rectified the output to generate a voltage signal which controlled the LED current driver. The FIR filter convolved the input signal with a 512-sample kernel given by:

kernal(t)=αekffilttcos(2πffilttφ) (1)

where t <0 (for a causal filter working on past signals only), k determines the filter band-width and was set to 1.25 for all experiments, φ determines the extent to which the output is phase-advanced from the input, and fflit determines the central frequency of the pass-band. The amplitude and phase response of this filter are shown in Fig. 1a. In general, for our seizure experiments we chose fflit to be the dominant frequency of the seizure bursts (in the range 10-20 Hz), and for non-seizure recordings, we chose frequencies between 2-40 Hz. The remaining free parameter, α, is an overall scaling factor that determines the light intensity for a given filter output. We adjusted this in advance such that endogenous activity would drive the LED over its full current range. Note however that once engaged, CLOSe+ feedback often enhanced the oscillations such that the light pulses saturated at the maximum level.

CLOSe was delivered for epochs of fixed duration, each interspersed with an equal-duration epoch of no stimulation. We used phase-shifts, φ, from 0, 45°, […], 315° delivered in pseudorandomised order. We chose epoch durations between 5–120 s depending on the experiment, ensuring our datasets contained at least two repeats of each phase-shift. For quiescent/endogenous experiments we tended to use short-duration epochs, whereas for seizure experiments we selected in advance a duration such that at least one seizure event would likely occur within each epoch. Our quiescent brain slice recordings lasted between 11–91 min (mean 51 min), while our seizure sessions lasted between 28–211 min (mean 93 min). Our endogenous recordings in NHPs lasted between 10-14 min (mean 11 min) while our seizure datasets lasted between 63–71 min (mean 67 min).

Data analysis

Data were analysed using custom scripts written in Matlab (Mathworks, USA) and used the circ_stats toolbox for circular statistics59. All off-line filtering used 4-pole Butterworth filters passed in forward and reverse directions. LFP was down-sampled to 500 Hz after anti-alias filtering. Power spectra were compiled using Welch’s method using overlapping windows of length 512 sample points. CLOSe phase-shifts were adjusted by the relative phase between the LFP and high-gamma (>100 Hz) envelope which was determined by applying a Hilbert transform to the cross-correlation of these signals (Extended Data Fig. 1).

For data on quiescent mouse brain slices and endogenous activity in NHPs, we compiled power spectra of the LFP driving CLOSe for the entirety of stimulation/control epochs, and averaged power modulation around the closed-loop filter frequency (0.8–1.2ffilt). Additionally, for the NHP linear microelectrode datasets, we calculated the depth-profile of cycle-triggered averages of the other LFPs, aligned to troughs in the band-pass filtered (0.8–1.2ffilt) channel that was driving CLOSe.

Seizure events in mouse brain slices occurred sporadically and were readily distinguished from quiet interictal periods so we restricted our analysis to time-windows encompassing these events. The start times of these windows were identified using an appropriate threshold on the rectified LFP (typically 0.05-0.15 mV) and we calculated power spectra for a fixed duration that encompassed all the seizure bursts (typically around 20s). Within these windows, we additionally defined individual bursts as periods during which the rectified LFP was not less than threshold for more than 0.2 s, and excluded events with a duration less than 0.2 s. Typically the first burst within each seizure event was longer than subsequent bursts. Therefore, when computing the ratio of burst lengths under CLOSe to the no stimulation condition, we calculated this separately for first and subsequent bursts, before averaging over all bursts.

The seizure events in NHPs occurred more frequently, and it was not straightforward to define a threshold to demarcate their onset from background spontaneous activity. Therefore, we computed power spectra over the entirety of stimulation/control epochs for these data. To obtain a measure of seizure magnitude, we computed the amplitude envelope of the LFP (band-pass filtered 10-30 Hz, rectified, and smoothed with a 1 s Hanning window) and corrected for baseline activity by subtracting the mode average of this envelope. We then computed the autocorrelation function of this signal, which provides a visualisation of the temporal profile of seizure bursts. We quantified seizure magnitude from the area under this autocorrelation function (from -20 to +20 s). Note, however, that while the autocorrelation function reveals the temporal profile of seizure bursts (that is, the width of the peak reflects the duration of seizures), the area under this peak provides a composite measure that is also influenced by the number and duration of seizure bursts as well as their individual amplitudes. Therefore, we also calculated the proportion of total time for which this envelope exceeded different seizure thresholds ranging from 0 to 100% of the maximum amplitude seen in the no-stimulation condition. Finally, we calculated the frequency and duration of epochs for which the amplitude envelope exceeded each threshold level.

For rodent and NHP seizure datasets, we additionally calculated two metrics designed to quantify the stability of seizure cycles revealed by delay-embedded, band-pass filtered (in vitro: 5-30 Hz, in vivo: 10-30 Hz) LFP trajectories. We chose an embedding dimension of three, and obtained the optimal embedding delay from the average mutual information algorithm implemented by the Matlab function phaseSpaceReconstruction with default settings. Our first metric was geometric in nature and designed to assess variations in the instantaneous scalar radius of the three-dimensional trajectory (from the origin). We calculated the mean, μ(t), and standard deviation, σ(t), of this radius using a sliding window of 100 ms width through time. We then defined a trajectory Coefficient of Variation (CoV) as the proportional relationship between these:

σ(t)=CoV×μ(t) (2)

CoV was calculated by least-squares fit of Eq. 2 over time. We chose this regression approach (rather than calculating σ(t)/μ(t) and averaging over time) to avoid our result being skewed by quiescent epochs with low values of μ(t). Our second metric was approximate entropy (AppEn) which is an information-theoretic measure of unpredictability in time series. This was calculated using the Matlab function approximateEntropy with the default similarity criterion of 0.2 times the standard deviation.

The modulation of all-positive metrics (LFP power, seizure burst duration/magnitude, trajectory stability) relative to no-stimulation was analysed using log-transformed ratios (that is, a doubling/halving of seizure magnitude was treated as an equal and opposite modulation). We calculated the max/min modulation both for the raw datasets (that is, selecting the phase-shift that yielded the largest average effect), and for a sinusoidal fit through all phase-shifts in the dataset. The former may overestimate the modulation due to variability inherent in each measurement and the latter may underestimate modulation if the data is not well fit by a sinusoid; therefore, we show both values throughout. Additionally, we averaged our measures across datasets (aligned by adjusted phase-shift) and assessed the statistical significance of phase-dependent modulation using circular-linear correlation.

Modelling

We used a simple two-population variant of the Wilson-Cowan neural population model, which has been described in detail in previous publications14,15. The model comprised a single excitatory population and a single inhibitory population evolving according to the following differential equations:

dEdt=(E(t)+Sigm(a×E(t)b×I(t)+S(t)+P))/τe+ηe(t)dIdt=(I(t)+Sigm(c×E(t)d×I(t)+Q))/τi+ηi(t) (3)

where E(t) and I(t) are the activity of the excitatory and inhibitory neural populations at time t. The parameters a, b, c and d determine the strength of interaction between these populations, decaying with time constants τe and τi. This system additionally is subject to tonic drive, P and Q, and Gaussian inputs, ηe(t) and ηi(t), with zero mean and standard deviation, η, reflecting synaptic noise and inputs from the surrounding tissue. The LFP was modelled as a combination of the activity of both neuronal populations, which was fed in to the same closed-loop feedback algorithm as used in the experiments. Optical stimulation acted as an additional input, S(t), to the excitatory neuronal population. Finally, the sigmoid function is:

Sigm(x)=11+ex4 (4)

We used the Euler-Maruyama method to simulate this system with a 1 ms time-step. Parameters used for the simulations are shown in Supplementary Table 2, putting the system in a bistable state regime where a limit cycle coexists with the lower fixed point.

Extended Data

ED Fig. 1. Realigning phase-shifts relative to high gamma envelope.

ED Fig. 1

a LFP spectra from three different Emx1-ChR2 mouse brain slice sessions with different closed-loop filter frequencies. Bottom plot shows that the phase-shifts and frequencies of driven oscillations varied across sessions. b Cross-correlation (over all phase conditions) reveals a varying phase relationship between the LFP and high gamma envelope for different sessions, while the stimulation to high gamma phase was relatively constant. c Schematic of the phase-adjustment procedure. (1) During the experiment, the FIR filter generated optical stimulation that was phase-shifted relative to the LFP (by an amount set by the experimenter). This stimulation drove neural activity, for which we used the high gamma envelope as a surrogate measure, which then produced LFP. (2) To assess the phase-relationship between neural activity and resultant LFP, at the end of the experiment we measured the zero-lag phase of the overall LFP-gamma cross-correlation. (3) We added these two phase-shifts to produce an adjusted phase-shift of stimulation relative to high gamma envelope. We hypothesized that this overall phase-shift would determine whether the closed-loop dynamics was characterised by positive or negative feedback. d LFP spectra replotted after adjusting phase-shift relative to high gamma envelope. In addition, the frequency axis has been normalised by the filter frequency. As a result, the frequencies of oscillations driven by different phase-shifts are closely aligned. d Phase-shifts (relative to LFP) that drove maximal oscillation plotted against relative phase between LFP and high gamma envelope. Solid line indicates stimulation in phase with high gamma. Maximal modulation was typically obtained for phase-shifts advanced by 0-90° relative to this (circular mean 38°, dashed line).

ED Fig. 2. Implantable LED array used in NHP experiments.

ED Fig. 2

a Images of the silicon fork optrode comprising four shanks with 2 CREE DA2432 LEDs per shank encapsulated with silicone elastomer (NuSil MED-6015). Scale bar: 1 mm. b Measured light power output of each LED for different supply currents (blue). Also shown is the light power output for the commercial light source used for the other datasets. The horizontal axis encompasses the full range of stimulation intensities in both cases. Note that the datasets analysed here used a single LED to activate the tissue.

ED Fig. 3. Replication of in vitro results using viral delivery of opsins.

ED Fig. 3

a Example oscillations driven by CLOSe in quiescent brain slices taken from mice injected with AAV8-hSyn-Chronos-GFP, one of the viruses used in the NHP experiments. b Modulation of LFP power relative to no stimulation for different CLOSe phase-shifts (10 Hz filter). c Phase-dependent modulation of LFP for four different filter frequencies in slices taken from three animals. Colour indicates adjusted phase-shift associated with maximal oscillation. Dashed line shows log-linear fit to data. d 4-AP was then applied to induce seizure-like events. CLOSe modulated the duration of oscillatory bursts. Left: Max/min modulation of burst duration across 3 animals for raw data and sinusoidal fit. Colour shows phase-shift associated with max/min for individual animals. Right: Average modulation of burst duration averaged across three animals. e Same but for LFP power at seizure frequency. Error bars indicate s.e.m. over sessions. R and P values from circular-linear correlation over datasets.

ED Fig. 4. CLOSe modulates the frequency and duration of high-amplitude seizure states in vivo in NHPs.

ED Fig. 4

a Percentage of time spent in seizure state under no stimulation (black) and different CLOSe phase-shifts (coloured) for an example dataset. Seizure state was defined as smoothed, rectified LFP amplitude exceeding a particular threshold, ranging from zero up to the maximum amplitude observed in the no stimulation condition. b Change in time spent in seizure states under CLOSe+ (45° phase-shift) and CLOSe- (270° phase-shift) relative to no stimulation for the four datasets. c Average duration of seizure states exceeding each threshold level. d Relative change in seizure duration under CLOSe+ and CLOSe-. e Frequency of seizure states exceeding the threshold level. f Relative change in seizure frequency under CLOSe+ and CLOSe-. Thick bars in panels b,d,f indicate significant thresholds with significant phase-dependent modulation (P<0.05, circular-linear correlation over datasets).

ED Fig. 5. Seizure trajectories under different CLOSe phase-shifts in silico and in vitro.

ED Fig. 5

a 2-D delay-embedded LFP trajectories during seizure bursts for the in silico model under all CLOSe phase-shifts. Colour indicates when in the cycle stimulation was delivered. b 3-D trajectories viewed from angle indicated in panel a. c, d Same but for example mouse in vitro session.

ED Fig. 6. Comparison of closed-loop and open-loop stimulation strategies.

ED Fig. 6

a Model simulations comparing CLOSe- versus open-loop delivery of the same optical pattern. Left: Example simulations of LFP under CLOSe- (red) and associated stimulation pattern (cyan). This light pattern was then delivered during a second run of the model (open-loop aligned, yellow). In this case, the only difference was the use of a new noise seed, leading to subtle differences in the seizure dynamics following the onset of stimulation (dashed line). We also delivered the same stimulation pattern during a third run of the model (open-loop random, blue). In this case, the model used the new noise seed and the onset of stimulation occurred at a different phase of the seizure cycle. Right: Summary of 100 model simulations. Despite using the same stimulation pattern, open-loop stimulation performed significantly worse than CLOSe-, and on average extended seizure durations relative to no stimulation. Boxes show median and interquartile range, whiskers show max/min. P values from two-tailed, paired t-test over simulations. b Model simulations comparing no stimulation versus open-loop stimulation at constant frequency. Left: Example simulations of LFP under no stimulation (black) and open-loop stimulation at 20 Hz (grey). Note that open-loop stimulation entrained the seizure cycles and extended the duration of seizures. Right: Relative duration of seizure bursts for increasing intensity of stimulation at different frequencies (average of 100 model stimulations per intensity). Burst duration increases monotonically for all frequencies. Note also that 20 Hz (the frequency of seizure cycles under no stimulation) is most effective at extending seizure duration. c Left: Example seizure bursts elicited by bath application of 4-AP to Emx1-ChR2 mouse brain slices with no stimulation (black) and with open-loop stimulation at constant frequency (grey) triggered by burst onset. Note that open-loop stimulation entrains the seizure cycles and extends the burst duration. Also shown are example seizure bursts under CLOSe with different phase-shifts (colours). Right: Burst duration and LFP power at seizure frequency relative to no stimulation under CLOSe+ (blue), CLOSe- (red) and open-loop stimulation (grey). Mean of 4 sessions from 3 animals. Error bars indicate s.e.m. over sessions. P values from two-tailed, paired t-test over sessions.

ED Fig. 7. Model predictions for different closed-loop optogenetic seizure suppression strategies.

ED Fig. 7

Optogenetic activation/suppression of excitatory/inhibitory neurons can be considered as weak perturbations of the seizure trajectory in different directions in the model state-space. Peripheral plots show predicted impact on seizure burst duration of closed-loop optogenetic strategies that deliver each types of stimulation in a phase-dependent manner. Strategies that suppress excitatory neurons and/or activate inhibitory neurons are generally more effective than activation of excitatory neurons and/or suppression of inhibitory neurons. Nevertheless, most strategies can result in either lengthening or shortening of seizures depending on the phase at which stimulation is delivered, and in all cases, there are particular phases which are more effective at suppressing seizures. Thus optogenetic seizure suppression strategies using a range of different opsins/cell-targets may be improved by delivering stimulation in a closed-loop manner.

Supplementary Material

AS_VID1
Download video file (37.5MB, avi)
PR
SI

Acknowledgements

The project CANDO (Controlling Abnormal Network Dynamics with Optogenetics) is co-funded by the Wellcome Trust (102037; to AJ, AON, SNB, GJC, MOC, PD, MK, FLB, AJT) and the Engineering and Physical Sciences Research Council (A000026; to AJ, AON, SNB, GJC, MOC, PD, MK, FLB, AJT). We thank all members of the CANDO consortium (www.cando.ac.uk). AJ is a Wellcome Trust Senior Research Fellow (106149, AJ).

Footnotes

Author contributions

The in vitro experiments were performed and analysed by MT, AH, DW, FENL, MOC, AJT and AJ. The In vivo experiments were performed and analysed by BZ, MT, SNB and AJ. Virology and post-mortem histology were performed by CG, FM, EEM and GJC. The simulations were performed by YW, FH, MK and AJ. The closed-loop algorithm was developed by SNB and AJ. The optrode was designed and manufactured by EEC, ASI, RGB, ST, AP, NP, JG, ND, TGC, PD and AON. AJ wrote the manuscript, with input from all authors.

Competing interests

A.J., M.O.C., S.N.B. and P.D. are named as inventors in the patents EP3490669A1 and US20190168021, filed by Newcastle University, which cover aspects of the closed-loop stimulation method reported in this work. The other authors declare no competing interests.

Reporting Summary. Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Data availability

The source data supporting the results in this study are available from the Newcastle University research repository at http://doi.org/10.25405/data.ncl.19519630. All data generated during the study are available for research purposes from the corresponding author on reasonable request.

Code availability

Analysis and modelling code are available from the Newcastle University research repository at http://doi.org/10.25405/data.ncl.19519630.

References

  • 1.Uhlhaas PJ, Singer W. Neural synchrony in brain disorders: relevance for cognitive dysfunctions and pathophysiology. Neuron. 2006;52:155–168. doi: 10.1016/j.neuron.2006.09.020. [DOI] [PubMed] [Google Scholar]
  • 2.Shanechi MM. Brain-machine interfaces from motor to mood. Nature neuroscience. 2019;22:1554–1564. doi: 10.1038/s41593-019-0488-y. [DOI] [PubMed] [Google Scholar]
  • 3.Bouthour W, et al. Biomarkers for closed-loop deep brain stimulation in Parkinson disease and beyond. Nature reviews Neurology. 2019;15:343–352. doi: 10.1038/s41582-019-0166-4. [DOI] [PubMed] [Google Scholar]
  • 4.Cagnan H, Denison T, McIntyre C, Brown P. Emerging technologies for improved deep brain stimulation. Nature biotechnology. 2019;37:1024–1033. doi: 10.1038/s41587-019-0244-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Little S, et al. Adaptive deep brain stimulation in advanced Parkinson disease. Annals of neurology. 2013;74:449–457. doi: 10.1002/ana.23951. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Skarpaas TL, Jarosiewicz B, Morrell MJ. Brain-responsive neurostimulation for epilepsy (RNS(®) System) Epilepsy research. 2019;153:68–70. doi: 10.1016/j.eplepsyres.2019.02.003. [DOI] [PubMed] [Google Scholar]
  • 7.Grosenick L, Marshel JH, Deisseroth K. Closed-loop and activity-guided optogenetic control. Neuron. 2015;86:106–139. doi: 10.1016/j.neuron.2015.03.034. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Nicholson E, Kuzmin DA, Leite M, Akam TE, Kullmann DM. Analogue closed-loop optogenetic modulation of hippocampal pyramidal cells dissociates gamma frequency and amplitude. eLife. 2018;7 doi: 10.7554/eLife.38346. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Sohal VS, Zhang F, Yizhar O, Deisseroth K. Parvalbumin neurons and gamma rhythms enhance cortical circuit performance. Nature. 2009;459:698–702. doi: 10.1038/nature07991. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Siegle JH, Wilson MA. Enhancement of encoding and retrieval functions through theta phasespecific manipulation of hippocampus. eLife. 2014;3:e03061. doi: 10.7554/eLife.03061. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Stark E, et al. Pyramidal cell-interneuron interactions underlie hippocampal ripple oscillations. Neuron. 2014;83:467–480. doi: 10.1016/j.neuron.2014.06.023. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Kanta V, Pare D, Headley DB. Closed-loop control of gamma oscillations in the amygdala demonstrates their role in spatial memory consolidation. Nature communications. 2019;10:3970. doi: 10.1038/s41467-019-11938-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Hall TM, Nazarpour K, Jackson A. Real-time estimation and biofeedback of single-neuron firing rates using local field potentials. Nature communications. 2014;5:5462. doi: 10.1038/ncomms6462. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Borisyuk RM, Kirillov AB. Bifurcation analysis of a neural network model. Biological cybernetics. 1992;66:319–325. doi: 10.1007/bf00203668. [DOI] [PubMed] [Google Scholar]
  • 15.Wang Y, Goodfellow M, Taylor PN, Baier G. Dynamic mechanisms of neocortical focal seizure onset. PLoS computational biology. 2014;10:e1003787. doi: 10.1371/journal.pcbi.1003787. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Zhou Y, et al. Application of approximate entropy on dynamic characteristics of epileptic absence seizure. Neural regeneration research. 2012;7:572–577. doi: 10.3969/j.issn.1673-5374.2012.08.002. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Boyden ES, Zhang F, Bamberg E, Nagel G, Deisseroth K. Millisecond-timescale, genetically targeted optical control of neural activity. Nature neuroscience. 2005;8:1263–1268. doi: 10.1038/nn1525. [DOI] [PubMed] [Google Scholar]
  • 18.Taylor PN, et al. Optimal control based seizure abatement using patient derived connectivity. Frontiers in neuroscience. 2015;9:202. doi: 10.3389/fnins.2015.00202. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Tang E, Bassett DS. Colloquium: Control of dynamics in brain networks. Reviews of Modern Physics. 2018;90:031003. doi: 10.1103/RevModPhys.90.031003. [DOI] [Google Scholar]
  • 20.Tognoli E, Kelso JA. The metastable brain. Neuron. 2014;81:35–48. doi: 10.1016/j.neuron.2013.12.022. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Deco G, et al. Awakening: Predicting external stimulation to force transitions between different brain states. Proceedings of the National Academy of Sciences of the United States of America. 2019;116:18088–18097. doi: 10.1073/pnas.1905534116. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Jackson A, Mavoori J, Fetz EE. Long-term motor cortex plasticity induced by an electronic neural implant. Nature. 2006;444:56–60. doi: 10.1038/nature05226. [DOI] [PubMed] [Google Scholar]
  • 23.Zanos S, Rembado I, Chen D, Fetz EE. Phase-Locked Stimulation during Cortical Beta Oscillations Produces Bidirectional Synaptic Plasticity in Awake Monkeys. Current biology: CB. 2018;28:2515–2526.:e2514. doi: 10.1016/j.cub.2018.07.009. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Suffczynski P, Kalitzin S, Lopes Da Silva FH. Dynamics of non-convulsive epileptic phenomena modeled by a bistable neuronal network. Neuroscience. 2004;126:467–484. doi: 10.1016/j.neuroscience.2004.03.014. [DOI] [PubMed] [Google Scholar]
  • 25.Taylor PN, et al. A computational study of stimulus driven epileptic seizure abatement. PLoS One. 2014;9:e114316. doi: 10.1371/journal.pone.0114316. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Motamedi GK, et al. Optimizing parameters for terminating cortical afterdischarges with pulse stimulation. Epilepsia. 2002;43:836–846. doi: 10.1046/j.1528-1157.2002.24901.x. [DOI] [PubMed] [Google Scholar]
  • 27.Osorio I, Frei MG. Seizure abatement with single dc pulses: is phase resetting at play? International journal of neural systems. 2009;19:149–156. doi: 10.1142/s0129065709001926. [DOI] [PubMed] [Google Scholar]
  • 28.Berényi A, Belluscio M, Mao D, Buzsáki G. Closed-loop control of epilepsy by transcranial electrical stimulation. Science New York NY. 2012;337:735–737. doi: 10.1126/science.1223154. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Arlotti M, et al. Eight-hours adaptive deep brain stimulation in patients with Parkinson disease. Neurology. 2018;90:e971–e976. doi: 10.1212/wnl.0000000000005121. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Holt AB, et al. Phase-Dependent Suppression of Beta Oscillations in Parkinson’s Disease Patients. J Neurosci. 2019;39:1119–1134. doi: 10.1523/jneurosci.1913-18.2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Cagnan H, et al. Stimulating at the right time: phase-specific deep brain stimulation. Brain : a journal of neurology. 2017;140:132–145. doi: 10.1093/brain/aww286. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Brittain JS, Probert-Smith P, Aziz TZ, Brown P. Tremor suppression by rhythmic transcranial current stimulation. Current biology: CB. 2013;23:436–440. doi: 10.1016/j.cub.2013.01.068. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.McNamara CG, Rothwell M, Sharott A. Phase-dependent closed-loop modulation of neural oscillations in vivo. bioRxiv. 2020:2020.2005.2021.102335. doi: 10.1101/2020.05.21.102335. [DOI] [Google Scholar]
  • 34.Paz JT, et al. Closed-loop optogenetic control of thalamus as a tool for interrupting seizures after cortical injury. Nature neuroscience. 2013;16:64–70. doi: 10.1038/nn.3269. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Krook-Magnuson E, Armstrong C, Oijala M, Soltesz I. On-demand optogenetic control of spontaneous seizures in temporal lobe epilepsy. Nature communications. 2013;4:1376. doi: 10.1038/ncomms2376. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 36.Lu Y, et al. Optogenetic dissection of ictal propagation in the hippocampal-entorhinal cortex structures. Nature communications. 2016;7:10962. doi: 10.1038/ncomms10962. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Vormstein-Schneider D, et al. Viral manipulation of functionally distinct interneurons in mice, nonhuman primates and humans. Nature neuroscience. 2020 doi: 10.1038/s41593-020-0692-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.de Lanerolle NC, Kim JH, Robbins RJ, Spencer DD. Hippocampal interneuron loss and plasticity in human temporal lobe epilepsy. Brain research. 1989;495:387–395. doi: 10.1016/0006-8993(89)90234-5. [DOI] [PubMed] [Google Scholar]
  • 39.Andrioli A, Alonso-Nanclares L, Arellano JI, DeFelipe J. Quantitative analysis of parvalbumin-immunoreactive cells in the human epileptic hippocampus. Neuroscience. 2007;149:131–143. doi: 10.1016/j.neuroscience.2007.07.029. [DOI] [PubMed] [Google Scholar]
  • 40.Raimondo JV, Burman RJ, Katz AA, Akerman CJ. Ion dynamics during seizures. Frontiers in cellular neuroscience. 2015;9:419. doi: 10.3389/fncel.2015.00419. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41.González OC, et al. Role of KCC2-dependent potassium efflux in 4-Aminopyridine-induced Epileptiform synchronization. Neurobiology of disease. 2018;109:137–147. doi: 10.1016/j.nbd.2017.10.011. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42.Ledri M, Madsen MG, Nikitidou L, Kirik D, Kokaia M. Global optogenetic activation of inhibitory interneurons during epileptiform activity. The Journal of neuroscience : the official journal of the Society for Neuroscience. 2014;34:3364–3377. doi: 10.1523/jneurosci.2734-13.2014. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 43.Chang M, et al. Brief activation of GABAergic interneurons initiates the transition to ictal events through post-inhibitory rebound excitation. Neurobiology of disease. 2018;109:102–116. doi: 10.1016/j.nbd.2017.10.007. [DOI] [PubMed] [Google Scholar]
  • 44.Magloire V, Mercier MS, Kullmann DM, Pavlov I. GABAergic Interneurons in Seizures: Investigating Causality With Optogenetics. The Neuroscientist: a review journal bringing neurobiology, neurology and psychiatry. 2019;25:344–358. doi: 10.1177/1073858418805002. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 45.Jirsa VK, Stacey WC, Quilichini PP, Ivanov AI, Bernard C. On the nature of seizure dynamics. Brain : a journal of neurology. 2014;137:2210–2230. doi: 10.1093/brain/awu133. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46.Govorunova EG, et al. Kalium rhodopsins: Natural light-gated potassium channels. bioRxiv. 2021:2021.2009.2017.460684. doi: 10.1101/2021.09.17.460684. [DOI] [Google Scholar]
  • 47.Lo P-C, Lee Y-Y. Applicability of phase-locked loop to tracking the rhythmic activity in EEGS. Circuits, Systems and Signal Processing. 2000;19:171–186. doi: 10.1007/BF01204572. [DOI] [Google Scholar]
  • 48.Ladas TP, Chiang CC, Gonzalez-Reyes LE, Nowak T, Durand DM. Seizure reduction through interneuron-mediated entrainment using low frequency optical stimulation. Experimental neurology. 2015;269:120–132. doi: 10.1016/j.expneurol.2015.04.001. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 49.Graham RT, et al. Synergistic positive feedback underlying seizure initiation. bioRxiv. 2021:2021.2002.2028.433224. doi: 10.1101/2021.02.28.433224. [DOI] [Google Scholar]
  • 50.Alfonsa H, Lakey JH, Lightowlers RN, Trevelyan AJ. Cl-out is a novel cooperative optogenetic tool for extruding chloride from neurons. Nature communications. 2016;7:13495. doi: 10.1038/ncomms13495. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 51.Sahel JA, et al. Partial recovery of visual function in a blind patient after optogenetic therapy. Nature medicine. 2021 doi: 10.1038/s41591-021-01351-4. [DOI] [PubMed] [Google Scholar]
  • 52.Diester I, et al. An optogenetic toolbox designed for primates. Nature neuroscience. 2011;14:387–397. doi: 10.1038/nn.2749. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 53.Yazdan-Shahmorad A, et al. A Large-Scale Interface for Optogenetic Stimulation and Recording in Nonhuman Primates. Neuron. 2016;89:927–939. doi: 10.1016/j.neuron.2016.01.013. [DOI] [PubMed] [Google Scholar]
  • 54.Andersson M, et al. Optogenetic control of human neurons in organotypic brain cultures. Scientific reports. 2016;6:24818. doi: 10.1038/srep24818. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 55.Shen Y, Campbell RE, Côté DC, Paquet ME. Challenges for Therapeutic Applications of Opsin-Based Optogenetic Tools in Humans. Frontiers in neural circuits. 2020;14:41. doi: 10.3389/fncir.2020.00041. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56.Lamont C, et al. Silicone encapsulation of thin-film SiO(x), SiO(x)N(y)and SiC for modern electronic medical implants: a comparative long-term ageing study. Journal of neural engineering. 2021 doi: 10.1088/1741-2552/abf0d6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 57.Ramezani R, et al. On-Probe Neural Interface ASIC for Combined Electrical Recording and Optogenetic Stimulation. IEEE transactions on biomedical circuits and systems. 2018;12:576–588. doi: 10.1109/tbcas.2018.2818818. [DOI] [PubMed] [Google Scholar]
  • 58.Dehkhoda F, et al. Self-sensing of temperature rises on light emitting diode based optrodes. Journal of neural engineering. 2018;15:026012. doi: 10.1088/1741-2552/aaa56d. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 59.Berens P. CircStat: A MATLAB Toolbox for Circular Statistics. Journal of Statistical Software. 2009;31 [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

AS_VID1
Download video file (37.5MB, avi)
PR
SI

Data Availability Statement

The source data supporting the results in this study are available from the Newcastle University research repository at http://doi.org/10.25405/data.ncl.19519630. All data generated during the study are available for research purposes from the corresponding author on reasonable request.

Analysis and modelling code are available from the Newcastle University research repository at http://doi.org/10.25405/data.ncl.19519630.

RESOURCES