Introduction

A wide range of cognitive functions are associated with changes in the oscillatory activity within and between different brain regions (Buzsáki and Wang 2012). In particular, high-frequency \(\gamma\) rhythms (60–80 Hz), have been associated with feature binding (Uhlhaas et al. 2009), learning (Gruber et al. 2002) and attention (Fries 2009). Although these relations are statistical in nature, they support the theory that oscillations are mechanism to dynamically route information across brain networks enabling cognition (Sejnowski and Paulsen 2006).

Recently, the use of non-invasive transcranial electrical stimulation (tES) has gained popularity for probing the causal role of oscillations in cognition, as it enables the manipulation of rhythmic activity in the brain (Fröhlich et al. 2015; Ruffini et al. 2012). Of particular interest, transcranial alternating current stimulation (tACS) delivers oscillatory currents to the scalp that result in weak but physiologically relevant electric fields (Ruffini et al. 2012; Miranda et al. 2006, 2013, 2018) that influence neuronal firing (Ruffini et al. 2019; Luke Johnson et al. 2019; Krause et al. 2019). Thus, tACS can concurrently modulate ongoing brain oscillations (Cecere et al. 2015) and activate synaptic plasticity mechanisms that account for its after-effects (Vossen et al. 2015). A classic example is the application of tACS within the visual cortex at the individual peak \(\alpha\) frequency, which enhances oscillation at this frequency (Cecere et al. 2015). The enhancement of endogenous oscillations has been linked to behavioral changes (e.g., modulation of processes like working memory (Polanía and Paulus 2012; Braun et al. 2017) or contrast sensitivity (Helfrich et al. 2014; Laczó et al. 2012)). However, such a frequency-specific enhancement of neural oscillations is not consistent. In fact, the response to tACS stimulation in the motor (Neuling et al. 2013; Feurra et al. 2013), prefrontal (Marshall et al. 2011), and parieto-occipital cortex (Ruhnau et al. 2016; Zaehle et al. 2010) varies depending on the oscillations that are found on those brain areas at the moment of the stimulation. These results seem to support the idea that brain activity changes in response to tACS depend on the precise relationship between endogenous and exogenous dominant frequencies, as suggested by modeling (Molaee-Ardekani et al. 2013; Herrmann et al. 2016) and animal studies (Márquez-Ruiz et al. 2016).

To further dissect the interaction between tACS and endogenous oscillations, as well as its relation to behavior, we investigate the effects of tACS on the visual cortex of participants engaged in a change-of-speed detection task. This exploratory study aims to (1) provide a description of the responses of the visual cortex to tACS while engaged on a visual task, and (2) understand whether and how Lempel–Ziv–Welch Complexity (LZW) can be useful in characterizing such interaction.

The rationale for the use of LZW as a metric of brain dynamics rests on the fact that LZW captures dynamic and non-linear regularities of time-series, such as correlations over many timescales or self-similarity (Lempel and Ziv 1976), and has been considered an indirect estimator of cortical excitability (Abásolo et al. 2015). As previously reported in both magnetoencephalography and EEG studies, the complexity of brain activity is modulated by cognitive demands, brain state and brain health. For instance, schizophrenia and depression patients display higher LZW complexity in both spontaneous and cognitive task-related oscillatory activity compared to age-matched healthy controls (Li et al. 2008), which decreases after pharmacological treatment (Méndez et al. 2012), and also increases under the influence of psychedelics (Carhart-Harris and Friston 2019). Spontaneous EEG complexity as measured by LZW decreases during anesthesia and NREM sleep, in neurodegeneration (Ruffini et al. 2019) as well as in patients with diverse disorders of consciousness (Casali et al. 2013), for example. In NREM sleep, where neuronal upregulation and excitability are observed (Niethard et al. 2017) the EEG becomes more predictable and has a lower LZW value compared to wakefulness or REM sleep, Andrillon et al. (2016), where down-regulation results in decreased neural firing, implying that there is a relationship between complexity as estimated with LZW and neuronal excitability. Moreover, in a recent in-vitro study (DAndola et al. 2018), the authors demonstrated that perturbational complexity with TMS (Transcranial Magnetic Stimulation) can be modulated by reduction of bistability and enhancement of excitability, providing as well insights on the mechanisms of these measurements in humans. Taken together, these observations raise the prospect of quantifying brain signals through the use of LZW (Ruffini 2017).

In the present study we deliver tACS to participants that were engaged in a change-of-speed detection paradigm (see Fig. 1a). The task was chosen as it produces a well-known and reproducible spectral signature in the visual cortex [as assessed with MEG (Hoogenboom et al. 2006, 2010) and EEG (Muthukumaraswamy 2013)]: an increase of \(\gamma\) activity with a decrease of \(\alpha\) and \(\beta\) power in the early visual cortex as the visual stimulus appears (VSO) or changes speed (CSO, see Fig. 1a) (Hoogenboom et al. 2006, 2010; Muthukumaraswamy 2013). Moreover, a direct correlation with behavior has been established, with trials with stronger \(\gamma\)-power predicting shorter RT (Hoogenboom et al. 2010).

Because of its huge artefacts, it is notoriously difficult to study brain activity during tACS especially if it is desired to study brain activity at or near the stimulation frequency (Bland and Sale 2019). To avoid this problem, we designed an interleaved tACS-EEG protocol that stimulates the visual cortex during 5 s concurrently with the visual stimuli with tACS at either 10 or 70 Hz (\(\hbox {tACS}_{70}\) and \(\hbox {tACS}_{10}\) respectively). We recorded resting EEG before the application of tACS (pre-EEG), immediately after a tACS event (stim-EEG), immediately at the completion of the cognitive task (post-EEG) or 15min after (postII-EEG). Based on previous studies, we reasoned that \(\hbox {tACS}_{70}\) and \(\hbox {tACS}_{10}\) would have a differential impact on brain dynamics and behavior. First, we expected that \(\hbox {tACS}_{70}\) and \(\hbox {tACS}_{10}\) would enhance oscillatory activity at the stimulated frequencies, reducing reaction times when enhancing \(\gamma\) oscillations. Second, we should observe and enhancement of oscillations phase-locked oscillations after tACS events as a possible indication of an entrainment effects (Fröhlich and McCormick 2010; Thut et al. 2011; Krause et al. 2019; Luke Johnson et al. 2019). Finally, we hypothesized that \(\hbox {tACS}_{70}\) and \(\hbox {tACS}_{10}\) would have a differential impact on the complexity of brain dynamics as measured by LZW, with trials with shorter reaction times associated with lower EEG complexity.

Materials and methods

Participants

Thirty healthy subjects (mean age of \(26.6 \pm 4.9\hbox { years}\), 13 male) participated in a randomized, double-blind, crossover study with 3 sessions (control, \(\hbox {tACS}_{10}\) and \(\hbox {tACS}_{70}\)) separated by a 1-week washout period to avoid carryover effects (Brunoni et al. 2011). Participants without a history of neurological or psychiatric disorders, or any other contraindication to tES (Brunoni et al. 2011), gave written informed consent and received compensation. The study was conducted at Hospital Clinic in Barcelona and approved its ethics committee (Comité Ético de Investigación Clínica del Hospital Clínic de Barcelona).

tACS protocol and EEG recording

Optimized, multichannel tACS was applied using gelled Ag/AgCl electrodes with a contact area of \(\pi \hbox { cm}^2\) (Pitrodes, Neuroelectrics) placed at PO3, PO4 and Oz (10-10 EEG system) to target BA17, following the findings in Hoogenboom et al. (2006). During control sessions, a zero current was applied. Montage optimization was performed using the Stimweaver algorithm described in Ruffini et al. (2014). Briefly, solutions were found using constrained least squares comparing weighted target and E-field cortical maps to optimize current intensities, while the optimal electrode number and locations were selected using an algorithm that searches in montage configuration space. The target was defined in terms of the normal component of the electric field (\(E_n\)), which was set to 0.25 V/m in the region of interest. Constraints in the optimization problem included a maximal current at any electrode of 2.0 mA, and a maximal total injected current of 4.0 mA (see Ruffini et al. 2014 for rationale). The optimizations were performed in a head model based on the Colin27 dataset (Miranda et al. 2013) and a five-compartment finite element model (FEM, with following tissues and conductivities: scalp (0.33 S/m), skull (0.008 S/m), CSF (including ventricles, 1.79 S/m), WM (0.4 S/m) and WM (0.15 S/m). Figure 1c shows the normal component of the resulting electric field distribution. For tACS, the optimized sinusoidal currents were of the form \(I_k= A_k\, \sin (2\pi f t)\) using three electrodes. Their amplitudes were PO3 = -0.8, PO4 = -0.4 and Oz = \(1.2\,\mu \hbox {A}\) (peak to peak, no offset to baseline, with the sign indicating a \(180^o\) phase difference).

Fig. 1
figure 1

Experimental paradigm and behavioral responses. a Visual change-detection task: subjects were instructed to report the change of speed of an unpredictable visual stimulus. The fixation period was followed by the presentation of a sine-wave grating moving inwards, centered at the fixation point. tACS is delivered in intervals of 5 s at the visual stimulation onset (VSO) during 5 s in tACS sessions during EEG recording (interleaved tACS protocol). At a random time between 1 and 3 s, the velocity of the moving grating increases (CSO). Subjects reported a change of speed by a key-press with the right finger and received feedback OK/KO on correct detection (less than 0.8s after CSO). b Experimental procedure. Each session starts and ends with 3 min of eyes open at resting state (pre, post and postII) during fixation. tACS/control intervals contained 240 trials of the visual task, adding up to 30 min of stimulation. EEG was recorded at baseline (pre-EEG), during (interleaved with tACS events) and after (post-EEG and postII-EEG) the execution of the visual detection-task. c Current flow of the tACS using a multi-electrode optimized montage (Ruffini et al. 2014), revealing the highest current flow in the occipital cortex (stimulation electrodes located at PO3, PO4, Oz) as positive values indicate that the E-field is directed into the cortical surface. d Reaction time in ms for the different stimulation protocols. Error bars indicate SEM

tACS was delivered in 5 s long events (following Vossen et al. 2015) at the onset of the visual stimuli (VSO, see Fig. 1a). The stimulation device was forced to start (and end) each tACS event at phase 0 (i.e., zero current). Each session consisted of 240 tACS events, adding up to a total stimulation time of 20 min.

EEG was recorded before (pre-EEG), immediately after tACS (stim-EEG) and after tACS (post and post II- EEG, see Fig. 1b) with gelled Ag/AgCl electrodes of \(\pi \hbox { cm}^2\) contact area (Pitrodes, Neuroelectrics SL); placed at Pz, P7, P8, O1 and O2 and referenced to the right earlobe. Signals were recorded at a sampling rate of 500 S/s with the same device used for tACS (Starstim, Neuroelectrics SL). The device has a hardware filter at 250 Hz and electrode impedance was kept below \(10\hbox { k}\varOmega\).

Experimental procedure

After the placement of the tACS-EEG electrodes, participants were familiarized with the behavioral task by conducting ten test trials. Then, the experiment started with the recording of 3 min of eyes-open EEG (while gazing at a fixation point), 3 min of eyes-closed EEG and continued with the behavioral task. The task was organized into 4 blocks of 60 trials each, with 5–15 min breaks across blocks so that the participants could rest. Each session ended with 3 min of resting-state EEG (during fixation) and 3 min of eyes-closed rest EEG at the end of the behavioral task (post-EEG) and 15 min later (postII-EEG).

Behavioral task

Participants were required to respond with a keypress to the change-of-speed of an inward-moving visual stimulus (Hoogenboom et al. 2006, 2010). Each trial began with the display of a fixation point (Gaussian point of diameter \(0.5^\circ\)), and subjects were instructed to fixate to that position through the length of the trial. After 1 to 1.5 s (interval randomly chosen from a uniform distribution of 1–1.5 s), the fixation point was replaced by a moving grating (a sine wave of \(5^\circ\) located at the fovea contracting towards the fixation point at a spatial frequency of 4 cycles/deg, with an initial velocity of 1.6 deg/s and 100% contrast, see Fig. 1a, Visual Stimulus Onset or VSO). After 6–8 s (interval randomly chosen from a uniform distribution of 6–8 s), its velocity increased to 2.2 deg/s (CSO =change of speed onset), until the response was reported or 0.8 s passed (see Fig. 1a). Subjects were instructed to report the velocity increase with a button press on a keyboard, which made the moving grating disappear. Feedback was provided to participants via OK/KO signs after their response. A response earlier than 0.2 s after CSO was reported as KO. Stimuli were displayed on a 24” LCD screen 60 cm in front of the subject (seated in a room with dim lights), with a vertical refresh rate of 60Hz. All stimuli were delivered using the Presentation software (Neurobehavioral Systems, Inc.).

Data analysis

The analysis was performed using customized Matlab code (MathWorks Inc. Natick, MA, USA), and FieldTrip (Oostenveld et al. 2011).

Behavioral analysis

Subject responses were quantified in terms of the percentage of correct responses (PC, i.e., fraction of correct detections of the velocity change) and reaction time (RT, i.e., delay in ms between CSO and the keypress). Sessions whose PC was smaller than 85% were rejected. Generalized linear mixed-effects regression model (GLMM) were used to test for differences in RT/PC across tACS protocol. In the GLMM, the session ID (\(\hbox {tACS}_{10}\), \(\hbox {tACS}_{70}\) and control) is a fixed effect, while experimental block (from 1 to 4) and the subject number (1 to 23) are random effects. RT was modeled with an inverse-link function and PC with an identity-link function.

EEG data processing

EEG responses immediately after a tACS event (stim-EEG) were analyzed starting 50 ms from the end of the tACS event. The residual amplitude clipping observed at the start of those epochs due to the presence of tACS events was corrected as described in the Supplementary Material. In parallel, raw EEG from rest intervals (pre-EEG, post-EEG and postII-EEG, see Fig. 1b) was segmented into 1 second epochs. All EEG-epochs were processed as follows: epochs were individually transformed into the spectral domain using the direct FFT transformation. Bins not in the frequency ranges of [60,80] and [5,40] Hz were removed and subsequently returning to the temporal domain applying the inverse Fourier transform. Epochs were then referenced to the Pz electrode. Epochs containing signals with amplitude out of the \(\pm 50\hbox { uV}\) range were rejected as they were considered muscle artifacts. Subjects containing less than 60 artifact-free 1s epochs (at any electrode) were rejected, as a compromise between a sufficient number of epochs and subjects for a significant statistical analysis. As result, 7 subjects out of the 30 were discarded from further analysis.

Spectral and phase-locking value analysis

Two different methodologies were used to conduct spectral analysis. On one hand, epochs at the onset of speed change (CSO, Fig.  1a) were analyzed by means of the time-frequency representations (TFRs) as described in Hoogenboom et al. (2006). Briefly, TFRs of frequencies between 30 and 100 Hz were obtained using the multi-tapering method in steps of 2.5 Hz. A smoothing of \(\pm 5\hbox { Hz}\) (squared function) was applied to each center frequency. TFRs of frequencies between 5 and 30 Hz were computed using a wavelet transform with Hanning windows of 200 ms displaced in steps of 10 ms. The TFR were expressed as percent change with respect to the baseline (200 ms before CSO). On the other hand, the power at \(\theta =[5,8]\hbox { Hz}\), \(\alpha =[8,13]\hbox { Hz}\), \(\beta =[13,25]\hbox { Hz}\), low-\(\gamma =[30-40]\hbox { Hz}\), and \(\gamma =[60-80]\hbox { Hz}\) bands was computed via trapezoidal integration of the power spectral density (PSD) of EEG-epochs. PSD values were extracted from every EEG-epochs and then averaged. Calculated power was referenced (divided) to band power obtained from the pre-EEG-eyes-open epochs. Phase-locking value at the frequency of interest f was calculated for \(\alpha\) (10 Hz) and \(\gamma\) (70 Hz) frequencies following (Ruhnau et al. 2016). Briefly, the PLV is defined as:

$$\begin{aligned} PLV(f)= \Bigg |\frac{ 1}{N} \sum _{n=1}^{N} \frac{ c_n(f)}{|c_n(f)|} \Bigg | \end{aligned}$$
(1)

where \(c_n(f)\) is the complex Fourier coefficient of trial n at a frequency f.

Complexity analysis

LZW is a data compression algorithm, calculated as described in Lempel and Ziv (1976), Ruffini (2017), Ruffini (2017). Briefly, the goal of LZW is to look for repeating patterns in the data. In our case, consider an initial time-series of length n. The algorithm first binarizes the time-series in terms of its median value, as it is a robust metric against outliers, assigning zeros to all values below the median and ones to all values above the median. Each one and zero value are then converted into a string ‘1’ or ‘0’, and thus, the time series is converted into a string of 1 and 0 characters (see Supplementary Material). The algorithm, then initializes a dictionary that contains all strings of length one and scans through the input string sequentially until it builds a string that does not belong to the dictionary, and then adds it to the dictionary. This process is repeated until the entire input string has been scanned. Following this process, we obtain a set of words c(n) that comprise the dictionary. The length of the compressed sequence encoded by LZW is closely related to the length of this dictionary, and the compressed length is essentially given by \(l_{LZW}=c(n) \log _2[c(n)+\log _2[A]] \sim c(n) \log _2 [c(n)]\). We call the compression ratio the ratio of \(l_{LZW}\) with respect to the original string length. In this paper, the input time series for the LZW were 4-s epochs filtered in the \(\theta\), \(\alpha\), \(\beta\), low-\(\gamma\), and \(\gamma\) bands for each electrode and each subject separately..

Statistical analysis

A generalized linear mixed model (GLMM) was used to test for differences in the EEG power across tACS protocols. In the GLMM, the session (\(\hbox {tACS}_{10}\), \(\hbox {tACS}_{70}\) and control), EEG intervals (pre, post and postII) are fixed effects, while experimental block (from 1 to 4) and the subject number (1 to 23) are random effects. A GLMM was trained for the oscillatory power within occipital electrodes and another one for parietal electrodes. Further details in the Supplementary Material. Statistical significance was considered for a threshold of 0.05. Pairwise analysis is conducted by means of the Ranksum U-test, without assuming gaussianity of the data.

Results

Reproducing the neural signature of the task with control sessions

The visual change-detection task has been linked to the activation of early visual areas, where it induces a reliable increase of \(\gamma\)-activity and reductions of \(\alpha\) and \(\beta\) oscillations at both the onset of visual stimulation (VSO) and at the onset of the change of speed (CSO) (see Fig. 1a) (Hoogenboom et al. 2006, 2010). Consistent with previous reports, in control sessions we observed a \(\gamma\) power enhancement in occipital electrodes (Fig. 2a) 0.2 seconds after CSO that decays around 0.4 s, while \(\alpha\) and \(\beta\) power display sustained reduction for longer latencies. Taken together, these findings replicate the well-known neural signature associated with the task (Hoogenboom et al. 2006, 2010).

Fig. 2
figure 2

Visually induced responses in the EEG signals as described by its oscillatory profile. a Time-frequency representation of oscillatory response aligned to speed-change onset (CSO), expressed as a percentage of change with respect to baseline (−200 to 0 ms)-control sessions only. b Percentage of change of endogenous \(\alpha\) and \(\gamma\) power immediately after tACS events in occipital electrodes (0.25–1.25 s after tACS at O1–O2). Asterisks indicate statistical significance as assessed by pairwise analysis of GLMM factors (three asterisks indicate p < 0.001, two asterisks indicate 0.001 < p < 0.05, see Methods for the model details). Error bars indicate standard error of the mean (SEM)

Immediate effects: tACS enhances endogenous oscillatory power

Next, we aim to test whether \(\hbox {tACS}_{70}\) and \(\hbox {tACS}_{10}\) enhance oscillatory activity at the stimulated frequencies immediately after tACS events. We examined the \(\alpha\) and \(\gamma\) power after each tACS stimulation event (0.25–1.25s after tACS event, stim-EEG, Fig. 1a) and compared that to baseline oscillatory power (pre-EEG intervals, see Fig. 1b). As our target stimulation was the cortical area BA17, we focused our analysis to the power within electrodes O1 and O2 (Fig. 1d). Statistical analysis was conducted using a GLMM, where tACS protocol and EEG interval were fixed effects and experimental block and subject number were random effects (see Supplementary Material for details).

The GLMM revealed a significant interaction between tACS protocol and EEG-interval (p  <  0.001, t-value = 10.7). Post-hoc analysis of the model factors revealed the expected increase in \(\alpha\)-power after \(\hbox {tACS}_{10}\) (p  <  0.05, \(\hbox {pre-EEG - stim-EEG} = 1.14 \pm 0.09\) (\(\hbox {mean }\pm \hbox { standard}\) error of the mean SEM)) as compared to baseline (Fig. 2b). Similarly, an expected increase in \(\gamma\)-power is observed after \(\hbox {tACS}_{70}\) (p < 0.05, \(pre-EEG - stim-EEG =0.46 \pm 0.1\)), as well as in control sessions due to the presence of the task (p < 0.05, % change of pre-EEG from \(\hbox {stim-EEG} = 0.16 \pm 0.07\)). While no statistically significant change in \(\alpha\)-power is observed after \(\hbox {tACS}_{70}\) or control with respect to baseline, an increase in \(\gamma\)-power is reported after \(\hbox {tACS}_{10}\), an increase that is statistically significantly larger than the increase in \(\gamma\)-power after \(\hbox {tACS}_{70}\) (p < 0.001, with a Cohen’s D effect size of d=0.59 and d=0.12, respectively) or control (p < 0.001, d=0.47 and d=0.376).

One potential concern is that the observed power change due to tACS may be due to an accumulative effect (plasticity) of tACS over the entire study session and not due to an immediate effect of tACS. To test for this possibility, we defined a GLMM (tACS protocol applied, EEG interval and experimental block are random effects, while the subject number is a fixed effect) and found that the described effects are present in all four blocks of the task (p < 0.001, see Supplementary Material for details). Thus, changes in the oscillatory power after tACS cannot be attributed to an accumulating plastic effect. Another potential concern is that this immediate effect is not spatially localized to the tACS stimulation site (Fig. 1c). To assess this, we defined a GLMM for parietal electrodes (P7 and P8) (where tACS protocol applied, and EEG interval are fixed effects, while experimental block and the subject number are random effects). No statistical differences for \(\alpha\)-power across tACS protocols were found. Interestingly, \(\gamma\)-power after \(\hbox {tACS}_{70}\) in parietal electrodes remained lower than \(\gamma\)-power after \(\hbox {tACS}_{10}\) (p < 0.001), as observed in occipital electrodes. This suggests that, while the modulation of \(\alpha\)-power was spatially localized at the stimulation electrodes, modulation of \(\gamma\)-power recruited cortical areas out of the focus of stimulation.

Immediate effects: tACS induces phase-locked responses

Next, we proceed to test whether we proceed to test whether tACS induce an enhancement of oscillations immediately after tACS that are phase locked to tACS events as a possible indication of an entrainment effect (Thut et al. 2011). For that, we analyzed the power of phase-locked oscillatory activity in terms of the phase-locking value [PLV, also referred as inter-trial phase coherence, see (Ruhnau et al. 2016; Lachaux et al. 1999)] at at \(\alpha\) and \(\gamma\) frequencies, see Fig. 3b (\(\alpha\)-PLV and \(\gamma\)-PLV, respectively).

The PLV was extracted at the EEG intervals after each tACS stimulation event (0.25–1.25s after tACS event, stim-EEG, Fig. 1a) within occipital electrodes (O1 and O2), our target area for tACS. Results show that, while \(\alpha\)-PLV and \(\gamma\)-PLV is above zero for all three conditions—\(\hbox {tACS}_{10}\), \(\hbox {tACS}_{70}\) and control—\(\gamma\)-PLV increases at the onset of \(\hbox {tACS}_{10}\) events compared to \(\hbox {tACS}_{70}\) (p < 0.05) and control (p < 0.05) as tested via Ranksum U-test. No differences in \(\alpha\)-PLV are observed in comparing any of the sessions.

Fig. 3
figure 3

Stimulation-related phase-locking value. Phase-locking value at \(\alpha\) and \(\gamma\) frequencies at the onset of tACS events in occipital electrodes (0.25–1.25s after tACS event at O1O2) for the three different conditions (\(\hbox {tACS}_{10}\), \(\hbox {tACS}_{70}\) and control). Error bars indicate SEM

Immediate effects of tACS on LZW complexity

As previously discussed, algorithmic complexity provides the means to study the structure of oscillatory brain dynamics beyond stationary methods based on spectral features. To further elucidate the manner in which tACS affects brain complexity, we estimated it using the LZW metric for the \(\hbox {tACS}_{10}\), \(\hbox {tACS}_{70}\) and control conditions using the EEG collected immediately after each tACS event (0.25–1.25 s after tACS event, see Fig. 1a). The results are presented in Fig. 4a, which displays an increase in LZW complexity during \(\hbox {tACS}_{10}\) compared to the control condition in the high \(\gamma\)-band (\(\gamma\)-LZW, asterisks indicate p  <  0.05).

To further explore whether LZW can be used to characterize brain response to a particular external stimulus, we proceed to test whether the presence of the task itself already induced a change in brain complexity as compared to resting pre-EEG in control sessions. This is displayed in Fig. 4b, where an increase in LZW at \(\theta\) and \(\alpha\) bands is reported (Ranksum U-test, p < 0.05). These results suggest that the presence of a cognitive task induces a change in the cortical dynamics that can be estimated through the analysis of complexity.

Fig. 4
figure 4

tACS after effects in power and signal complexity. a Change in LZW at \(\gamma\) band during the tACS condition in occipital electrodes. Asterisks indicate p < 0.05. b LZW complexity in different bands in control sessions. Error bars indicate SEM

After effects: tACS enhances endogenous oscillatory power

Next, to further investigate to what extent tACS enhances endogenous oscillations in a lasting manner, we analyzed the EEG at post-EEG intervals (3 min resting state intervals recorded when the task is completed, see Fig. 1b) and 15 min after that (postII EEG intervals). The interaction between tACS stimulation type and EEG-interval was confirmed by a pairwise analysis of the GLMM factors (where tACS protocol applied and EEG interval are fixed effects, while experimental block and the subject number are random effects). This analysis shows that the enhancement of \(\alpha\) and \(\gamma\)-power after \(\hbox {tACS}_{10}\) were maintained in both post- and postII-EEG conditions as compared to baseline (pre-EEG intervals; p < 0.001; Fig. 2c). No significant change in \(\gamma\)-power in occipital electrodes after \(\hbox {tACS}_{70}\) was observed in the post-EEG compared to control sessions or to pre-EEG (p < 0.001). However, in postII-EEG, the \(\gamma\)-power after \(\hbox {tACS}_{70}\) sessions was statistically smaller than the \(\gamma\)-power observed in control and \(\hbox {tACS}_{10}\) sessions (p < 0.001).

Behavioral responses are altered during tACS

The visual task required the subjects to report the acceleration of an inward-moving grating (Fig. 1a). We measured behavior through the analysis of Reaction Time (RT) and the Percentage of Correct Responses (PC). The interaction between session and behavioral metrics was assessed with a GLMM, where tACS protocol is a fixed effect, and experimental block and subject number are random effects (see Supplementary material). Further pairwise analysis reveals that RTs of trials where tACS was active were significantly longer than observed in control trials (p  <  0.001), as shown in Fig. 1d. The slowing due to stimulation was observed in all the blocks of the task (interaction of tACS stimulation type and RT is significant in all the blocks, p  <  0.001), and is not tACS-frequency specific. Percentage of correct responses (PC\(_\mathrm{control}\)= 97.6 (± 0.4), PC\(_{10Hz}\)= 96.8 (± 0.5), PC\(_{70Hz}\)= 96.9 (± 0.7), mean ± STE) was not altered by the presence of tACS stimulation. However, while RT seems to be altered by the presence of tACS, these differences cannot be uniquely attributed to a physiological impact of the tACS, as the sensory reports of participants exposed to active vs. control tACS sessions were different. In particular, 66% of participants reported feeling no stimulation in control sessions, in contrast to the 16% and 26% of participants who reported no-stimulation in \(\hbox {tACS}_{10}\) and \(\hbox {tACS}_{70}\) sessions respectively. Thus, control sessions cannot be considered sham (see Materials and Methods) and RT differences observed could be attributed to tACS being a distracting element.

Predicting behavior from oscillatory activity

To further understand the relationship between RT and its neural signature, we tested for the ability of oscillatory activity to predict behavioral responses as described in Hoogenboom et al. (2010), where increased \(\gamma\)-band activity in the 60–80 Hz range of the calcarine sulcus was found to predict shorter RT in the particular visual change-detection task. This relationship was replicated in our control sessions, where the Pearson correlation between \(\gamma\)-power and RT displayed a significant negative correlation in occipital electrodes (r = −0.05, p < 0.05 two-tailed one-sample t test). Does larger \(\gamma\)-power predict shorter RT when tACS is applied? As in control sessions, in \(\hbox {tACS}_{70}\), trials with larger \(\gamma\)-power correlated with shorter RT, maintaining the physiological relationship between \(\gamma\)-power and behavior (r = −0.04 and r = −0.06, respectively). Interestingly, in \(\hbox {tACS}_{10}\) sessions, trials with the higher power in low-\(\gamma\) frequencies (30–40Hz) at occipital electrodes predicted shorter RT, extending the frequency band that correlates with behavior reported in Hoogenboom et al. (2010).

Next, to further explore whether LZW can be used to characterize brain response to a particular external stimulus, we proceed to test whether LZW can be used as a predictor of behavioral responses (Pearson correlation). Our results suggest that there is a significant positive correlation between \(\gamma\)-LZW and RT in control sessions, indicating that complexity in occipital cortex decreases with faster responses (r = 0.03; p < 0.05 two-tailed one-sample t test). Interestingly, tACS alters this relationship: no significant correlation appears at \(\hbox {tACS}_{70}\) sessions, while an lower \(\alpha\)-LZW at \(\hbox {tACS}_{10}\) sessions predicts faster responses (r = 0.03; p < 0.05; two-tailed one-sample t test).

Discussion

In this study, we examined how tACS alters immediate and short-term physiology using an intermittent-tES protocol, and explored the feasibility of using complexity metrics (i.e., LZW) to describe possible complex interactions linking with with complexity theories of brain function. From a technical point of view, the use of intermittent or event-related tES protocols allows the perturbation of endogenous oscillations in crucial time points in a cognitive task. This approach has already been shown valuable in prior studies (Braun et al. 2017; Vossen et al. 2015; Braun et al. 2017; Ruhnau et al. 2016), where the impact of tACS stimulation events of 2–10 s duration have been explored in several cortical areas, successfully altering oscillatory power (Vossen et al. 2015) and linking \(\gamma\)-oscillations to lucid dreaming (Voss et al. 2014). However, other studies have failed to find an effect of concurrent stimulation, as attempts using EEG during tES have proven to be challenging (Helfrich et al. 2014; Voss et al. 2014; Ruhnau et al. 2016), mostly due to the technical difficulties introduced by the concurrent EEG-tACS recording (Barban et al. 2019). Here, we introduce an intermittent, interleaved-tACS-EEG protocol where EEG is recorded immediately after tACS events to probe cognition in a repeated manner, analogous to event related EEG protocols.

In particular, we characterized the impact of tACS on the visual cortex (Oz, PO3, PO4) while participants were involved in a change-of-speed visual task (Fig. 1a). The stimulation montage was selected to maximize tACS currents in the BA17 and to record EEG using the nearest possible electrodes. Here, we first reproduced the spectral signature of the task in the control sessions and then tested whether we can alter this signature by perturbing the visual system with tACS at 10 and 70Hz. Briefly, while the task induces a reliable \(\gamma\)-oscillation, trials with faster responses correlated with stronger \(\gamma\)-power, as reported in Hoogenboom et al. (2010).

Compared to baseline, interleaved \(\hbox {tACS}_{10}\) enhanced \(\alpha\)-oscillations immediately after the stimulation event, as well as at the end of the experiment (post- EEG) and 15 min later (post II-EEG). These results replicate previous reports using both interleaved Li et al. (2008), Vossen et al. (2015) and continuous \(\alpha\)-tACS protocols (Herrmann et al. 2016; Cecere et al. 2015). In our study, \(\hbox {tACS}_{10}\) also enhanced \(\gamma\)-oscillations at the onset of the tACS event, which lasted up to both post-EEG and postII-EEG intervals. The boosting of oscillatory power at frequencies other than the frequency of stimulation is not rare (Helfrich et al. 2014; Voss et al. 2014; Ruhnau et al. 2016), but an understanding of which endogenous oscillation frequencies will be affected by a particular tACS frequency is still missing. Our study is consistent with others showing that frequency-specific responses to tACS can also influence higher frequencies such as its harmonics (Ruhnau et al. 2016), and contributes to methods for the characterization of tACS and EEG interaction. Interestingly, the presence of \(\hbox {tACS}_{10}\) in occipital cortex enhances \(\gamma\)-oscillations that are phase locked to the tACS burst, as reflected by the PLV metrics. Finally, as in control sessions and in the literature, trials with stronger \(\gamma\)-responses predict shorter RT, and thus, the presence of \(\hbox {tACS}_{10}\) does not alter the expected physiology-behavior relationship.

On the other hand, \(\hbox {tACS}_{70}\) stimulation had no significant impact on \(\gamma\)-oscillations that were phase locked to tACS events as compared to \(\hbox {tACS}_{10}\), but instead increased not phase-locked \(\gamma\)-power immediately after the tACS event, in comparison to baseline. Surprisingly, \(\hbox {tACS}_{70}\) reduced \(\gamma\)-power at post-EEG intervals, after the task and tACS stimulation had finished. The same trend was observed at the end of experimental blocks (60 trials), where \(\gamma\)-power seemed to decrease in \(\hbox {tACS}_{70}\) sessions. In hand, as in control sessions and the literature, trials with stronger \(\gamma\)-responses predict shorter RT, and thus, the presence of \(\hbox {tACS}_{70}\) does not alter the expected physiology–behavior relationship. Nonetheless, the presence of tACS (both \(\hbox {tACS}_{10}\) and \(\hbox {tACS}_{70}\)) increases RT as compared to control conditions, although this change cannot be uniquely associated to tACS. In fact, participants in this study were able to differentiate between tACS and control sessions (i.e., about 80% of participants), although they were not able to identify the two different stimulation protocols. Instead, our results in applying interleaved tACS suggest that \(\hbox {tACS}_{70}\) and \(\hbox {tACS}_{10}\) modulate oscillatory activity at frequencies other than the stimulated frequencies. This poses a challenge to the simple assumption that the neural processes will align its phase with the one of the external tACS oscillator as a direct pacemaker (Fröhlich et al. 2015; Neuling et al. 2013). The lack of frequency specificity has been reported elsewhere (Ruhnau et al. 2016), highlighting the need for metrics that describes such interaction.

Next, we explored the feasibility of using LZW to characterize the interaction between tACS and endogenous oscillations. During control sessions, we observed that the presence of the task induced a change in LZW as compared to resting pre-EEG, suggesting that the presence of a cognitive task induces a change in the cortical dynamics that can be estimated through the analysis of complexity. At the same time, trials with lower \(\gamma\)-LZW predicted shorter RTs. Our analysis establishes a relationship between a complexity metric and behavior that complements others observed in the literature, where it is reported that LZW decreases in schizophrenia, depression and in healthy controls when the participants perform a mental arithmetic task compared to their resting state EEG (Li et al. 2008). While the precise neurophysiological interpretation of complexity metrics needs further research, previous studies suggest that LZW is a non-linear estimator of cortical excitation (Abásolo et al. 2015). Can then LZW be used to measure changes in cortical excitation due to tACS? To address this, we explored whether tACS alters the LZW signature. \(\hbox {tACS}_{10}\) increases \(\gamma\)-LZW, an increase that is associated with longer RTs. In fact, similar to control sessions, trials with lower \(\alpha\)-LZW predicted shorter RTs. A possible explanation for this relationship may be that when responses are fast (and correct) cortical circuits are more fluently engaged in the task, and this restricts their dynamics to a particular reduced set of patterns leading to a decrease in LZW in alignment with our initial hypothesis. Since typically low complexity is related to more structure and predictability, it is expected to decrease when the brain dynamics are task specific and more constrained by the repetitive pattern of the task. As such, \(\hbox {tACS}_{10}\) seems to make the visual system less structured and predictable, slowing task execution. This phenomenon could be simply explained by a shift in attention away from the task. For example, Zarafshan et al. (2016) report an increase in EEG complexity during a cognitive task in children with attention-deficit/hyperactivity disorder during a visual cognitive task compared to healthy controls.

Such relationship between LZW, oscillatory power and behavioral responses hint to the possibility that \(\hbox {tACS}_{10}\) increases inhibition in the visual cortex by enhancing \(\alpha\) oscillations, ultimately reflecting a reduction of network alignment to visual stimuli. These results are in agreement with recent studies that report a local encoding of visual stimuli and feedforward communication with higher cortical areas that are mediated by \(\gamma\)-band oscillations (Uhlhaas et al. 2009; Fries 2009; Gruber et al. 2002), while local \(\alpha\)-band oscillations are involved in inhibitory feedback control processes and long-range \(\alpha\)-oscillations modulate feedback communication with distant areas (Buzsáki and Wang 2012). Along these lines, behavioral tasks that emphasize top-down control of visual system display augmented synchronization in the low-frequency bands, while local and intra-area synchronization in higher frequency bands is reported in tasks that mostly recruit feed-forward communication (Fries 2009; Sejnowski and Paulsen 2006; Castellano et al. 2014). In contrast, changes in \(\gamma\)-band oscillations induced by \(\hbox {tACS}_{10}\) (both phase locked to the tACS cycle or not) do not seem to alter the relation between \(\gamma\)-power and behavior, as in all tACS sessions trials, higher \(\gamma\)-power correlated with shorter RTs. The physiological changes induced by tACS may either impact the local encoding of the visual task or produce a shift in attentional resources, possibly due to the presence of tACS itself. Such differences determine whether changes in cortical dynamics imply a direct interaction with cortical dynamics or an indirect modulation due to sensory modulations. While participants were able to identify control conditions, no sensory report differences were found for the two different stimulation frequencies (\(\hbox {tACS}_{10}\) or \(\hbox {tACS}_{70}\)), as evaluated by the secondary effects questionnaires. Until further studies are conducted to understand sensory differences associated with tACS, we can argue for a frequency-specific modulation of cortical dynamics due to tACS. Note to this end that by frequency specificity, we mean that tACS applied at different frequencies clearly elicits a differential response to the endogenous oscillations that may, ultimately, involve several bands. Endogenous oscillations were modified in oscillations that were not directly targeted by the stimulation frequency, as in our study \(\hbox {tACS}_{10}\) also enhanced and entrained \(\gamma\)-oscillations.

Finally, one of the main limitations of our study relies on the association between the physiological changes due to tACS and the behavioral changes (i.e., increase in RT). The lack of a robust sham protocol may raise the suspicion that the RT differences observed could ultimately be attributed to the presence of sensory stimulation associated to tACS acting as a distractor. However, the fact that the physiological changes presented (brain-complexity metrics and oscillatory power changes) are specific to the tACS protocol, and that the RT changes seem to be different for the tACS protocols at the trend level, leads us to believe that the behavioral correlates are indeed due to the modulation of endogenous activity by tACS, in agreement with findings with invasive recordings (Krause et al. 2019; Luke Johnson et al. 2019). Improving the current experimental protocol by introducing a proper sham condition capable of inducing sensory stimulation similar to active tACS will allow to evaluate this further, e.g., as used in Dagan et al. (2018); Neri et al. (2020) and discussed in Fonteneau et al. (2019).

Conclusions

The study of cognition may benefit from the combination of tACS and EEG to probe causal relationships between physiology and behavior. However, to maximize the return from such efforts, more research is necessary to understand the complex interplay between endogenous and tACS-inducing oscillations. In this study, we reported the differential effects of \(\hbox {tACS}_{10}\) and \(\hbox {tACS}_{70}\) on the oscillatory response of the visual cortex. To study the impact of tACS and cognitive task on brain dynamics, we introduced the use of an algorithmic complexity inspired metric (LZW) that has been used with success in the analysis of resting EEG or in TMS-EEG consciousness studies (Casali et al. 2013). As argued elsewhere, metrics such as LZW are believed to reflect neuronal excitation-inhibition balance (Ruffini 2017; Gao et al. 2016) and can characterize brain dynamics as it engages with the external world (Ruffini 2017). Our vision is that a complexity perspective will provide useful tools for the characterization of the excitability patterns of cortical areas timescales appropriate for quantifying changes induced by cognitive tasks.