Time irreversibility of resting brain activity in the healthy brain and pathology

Characterising brain activity at rest is of paramount importance to our understanding both of general principles of brain functioning and of the way brain dynamics is affected in the presence of neurological or psychiatric pathologies. We measured the time-reversal symmetry of spontaneous electroencephalographic brain activity recorded from three groups of patients and their respective control group under two experimental conditions (eyes open and closed). We evaluated differences in time irreversibility in terms of possible underlying physical generating mechanisms. The results showed that resting brain activity is generically time-irreversible at sufficiently long time scales, and that brain pathology is generally associated with a reduction in time-asymmetry, albeit with pathology-specific patterns. The significance of these results and their possible dynamical aetiology are discussed. Some implications of the differential modulation of time asymmetry by pathology and experimental condition are examined.


INTRODUCTION
Even in the absence of exogenous stimulation and for constant values of the parameters controlling its dynamics, the brain generates fluctuations characterized by non-random patterns over a wide range of spatial and temporal scales (Arieli et al., 1996;Van de Ville et al., 2010;Deco et al., 2011) re-edited across the cortical space in a non-random way (Cossart et al., 2003;Kenet et al., 2003;Beggs and Plenz, 2004;Ikegaya et al., 2004;Dragoi and Tonegawa, 2011;Betzel et al., 2012).
Characterizing resting activity is important for at least three main partially interrelated reasons. On the one hand, accumulating evidence shows that neurological and psychiatric conditions are associated with alterations of several aspects of resting local activity structure, i.e., of how information is processed in each brain region (Zhang and Raichle, 2010;Alderson-Day et al., 2015;Hohenfeld et al., 2018). On the other hand, spontaneous fluctuations are intimately related to stimulus-induced ones (Luczak et al., 2009;Shew et al., 2009;Smith et al., 2009), so that characterizing the former also provides insight onto the latter. No less importantly, the structure of resting brain activity fluctuations gives away key aspects of the physics of the underlying system producing them (Papo, 2014). For instance, if the brain is understood as a complex thermodynamic machine, the activity recorded with standard system-level neuroimaging techniques can be thought of as thermal fluctuations through which the energy is dissipated to ensure its functioning (Livi, 2013). Within this framework, the generic complex spatio-temporal scaling properties of resting brain activity, including scale invariance and long-range temporal memory (Novikov et al., 1997;Linkenkaer-Hansen et al., 2001;Bianco et al., 2007;Gong et al., 2007;Wink et al., 2008;Freyer et al., 2009;Expert et al., 2011), can be understood as indicators of the fact that the brain operates away from equilibrium (Papo, 2013b).
Quantifying the extent to which a system such as the brain deviates from equilibrium conditions is an important issue. The fluctuations of a system at equilibrium obey detailed balance of the probability fluxes, a condition whereby the net current between any pair of states vanishes at long enough times, i.e., given two states x and y and a transition rate W(·) following condition holds: ρ(x)W(x → y) = ρ(y)W(y → x), where ρ(·) is the equilibrium probability distribution. Importantly, this condition can be understood in terms of symmetry property of the probability distributions P(ω t ) = P(Iω t ) of a trajectory ω t = (ω 1 , ω 2 , . . . , ω t ) of length t and its time-reversed one, where I denotes the time reverse operator. In systems outside of equilibrium, this symmetry is broken due to the presence of non-conservative forces: energy dissipation happens with an irreversible increase of entropy, and the time reversal symmetry is then broken. Beyond such explicit dissipation, irreversibility can also be due to the presence of memory, which acts as a hidden dissipative external force in a process (Puglisi and Villamaina, 2009); and, it is destroyed by the presence of noise (Porporato et al., 2007;Xia et al., 2014).
Time irreversibility provides valuable information on the statistical properties of the generating processes of given stochastic dynamics. On the one hand, reversibility implies stationarity (Lawrance, 1991). On the other hand, linear Gaussian random processes and static non-linear transformations of such processes are reversible, and significant time irreversibility excludes Gaussian linear processes or linear ARMA models as possible generating dynamics, implying instead non-linear dynamics or (linear or non-linear) non-Gaussian (Weiss, 1975;Cox et al., 1981;Lawrance, 1991;Stone et al., 1996). The asymmetry under time reversal of some system variable's statistical properties provides a quantitative estimate of the thermodynamic entropy production t of the system generating the activity, even when the details of the system are unknown (Gaspard, 2005;Andrieux et al., 2007;Roldán and Parrondo, 2010). Note that the coarse-grained entropy production provides a lower bound on the true one (Seifert, 2019). This fundamental relation between thermodynamic entropy (a macroscopic quantity) and Kolmogorov-Sinai entropy (a microscopic quantity) has in particular been proven to hold for systems in non-equilibrium steady state (NESS) (Gaspard, 2004;Roldán and Parrondo, 2010). t can be represented in terms of the ratio t = ln P(ω t )/P(Iω t ) . This quantity is identically equal to zero for each trajectory separately if detailed balance is satisfied, but always non-negative otherwise. Non-equilibrium systems obey fluctuation relations which hold for any stationary time series, independently of their dynamics (Evans et al., 1993;Gallavotti and Cohen, 1995;Crooks, 2000;Evans and Searles, 2002).
In particular, the following relation provides a quantitative expression for the probability of entropy of a finite non-equilibrium flowing in a direction opposite to that dictated by the second law of thermodynamics, when considered in a finite time. This relation illustrates the fact that for out-equilibrium dynamics the negative tail of the probability distribution decays faster than the positive one. Not surprisingly, time irreversibility metrics have extensively been used to characterize real-world systems, with a special attention being devoted to economic and financial time series (Ramsey and Rothman, 1996;Zumbach, 2009;Xia et al., 2014). Time reversal asymmetry has also been used to characterize healthy and pathological activity of biological systems, particularly the human heart (Costa et al., 2005;Guzik et al., 2006;Porta et al., 2006Porta et al., , 2008Porta et al., , 2009Piskorski and Guzik, 2007;Karmakar et al., 2009;Hou et al., 2010), but also to classify hand tremor (Timmer et al., 1993). However, the timereversal symmetry properties of brain activity have attracted little attention (Paluš, 1996;Van der Heyden et al., 1996;Ehlers et al., 1998;Visnovcova et al., 2014;Yao et al., 2019) and have not yet been systematically examined. For instance, Paluš (1996) found the mutual information between EEG time series and their lagged versions to be time-asymmetric. However, since the asymmetry in the peaks of the mutual information, itself symmetric, may not be equivalent to the temporal asymmetry of the underlying process, the observed properties were tentatively explained as reflecting non-stationary non-linear deterministic oscillatory episodes randomly distributed in a noisy background. Three studies examined time irreversibility in epilepsy, consistently reporting increased irreversibility for ictal activity in both scalp and intracranially recorded electrical brain activity ( Van der Heyden et al., 1996;Schindler et al., 2016;Martínez et al., 2018). The surgical removal of brain areas generating timeirreversible iEEG signals was associated with seizure-free postsurgical outcome (Schindler et al., 2016).
Here we address the following main questions: what is the typical time asymmetry of brain activity at rest? How is it modified by a simple experimental condition such as opening and closing eyes? How does it vary in neurological and psychiatric brain pathologies? We conjectured that, insofar as entropy production determines the performance of thermal machines such as the brain, and disease is thought to be associated with impaired self-organizing capabilities, abnormal time reversal symmetry properties may be a marker of pathology and may be differentially affected by different neurological and psychiatric diseases. These questions are addressed by analysing a large set of EEG recordings, comprising three groups of patients and the corresponding control groups, through a recently proposed irreversibility metric based on the assessment of permutation patterns (Zanin et al., 2018). Results suggest that the human brain is generically time-irreversible; that such property is increased in eyes open resting states, with respect to eyes closed ones; and that pathologies like Parkinson's disease and schizophrenia decrease the irreversibility. We further show that irreversibility is non-trivially modified by filtering the EEG signal at different bands, and that its nature can be studied by resorting to surrogate time series.

Assessing Irreversibility in Time Series
In general terms, the time asymmetry of a stationary driven system can be determined by the Kullback-Leibler (KL) distance between probability distributions representing the forward and reverse trajectory (respectively, p andp): The KL distance can be thought of as the mean of the difference between p andp, and quantifies the distinguishability or, loosely, the distance between these two probability distributions (Gaspard, 2005;Andrieux et al., 2007;Porporato et al., 2007). The KL distance is not just an estimator of entropy production's lower bound but it also provides a general method to distinguish between equilibrium and NESS (Roldán and Parrondo, 2010). While Equation (2) defines a general rule for estimating irreversibility, it does not define what p andp should represent. Consequently, various methods to quantify time reversibility from empirical time series have been proposed and applied to real-world problems, particularly biological and financial systems (Diks et al., 1995;Paluš, 1996;Ramsey and Rothman, 1996;Daw et al., 2000;Kennel, 2004;Costa et al., 2005Costa et al., , 2008Casali et al., 2008;Zumbach, 2009;Lacasa et al., 2012;Donges et al., 2013;Xia et al., 2014;Lacasa and Flanagan, 2015;Flanagan and Lacasa, 2016). Here, we use a method (Graff et al., 2013;Martínez et al., 2018;Zanin et al., 2018) based on permutation entropy (Bandt and Pompe, 2002;Zanin et al., 2012). This method presents various advantages: it has no free parameters other than the embedding dimension of the permutation entropy; as visibility graph methods (Lacasa et al., 2012) it is not an all-or-none measure of irreversibility, so that its use is also meaningful for non-stationary signals, which are by definition irreversible, and is temporally local, and therefore allows assessing fluctuations; however, unlike visibility graphs, it does not rely on scaling arguments and its convergence speed is faster and hypothesis testing more straightforward. For the sake of completeness, we here review the method, starting by the definition of the permutation patterns.

Permutation Patterns
The idea of analysing a time series through its permutation patterns was introduced by Bandt and Pompe (2002), and since then received an increasing attention from the scientific community (Amigó, 2010;Zanin et al., 2012;Riedl et al., 2013). Given a time series X = {x t }, with t = 1 . . . N, this is usually divided in overlapping regions of length D, such that: s → (x s , x s+τ , . . . , x s+τ (D−2) , x s+τ (D−1) ). (3) D is called the embedding dimension and controls the quantity of information included in each region, while τ is the embedding delay. s further controls the beginning of each region, and thus the degree of overlap between regions. In this study we consider D = 3 and τ = 1. While larger values of D may allow detecting more complex dynamics, their use also requires longer time series to reach statistically significant results, especially in the case of EEG time series, which are highly noisy. On the other hand, larger values of τ are used when sampling continuous systems whose characteristic frequency is not known, which is not the present case.
Once these regions have been defined, an ordinal pattern is associated to each one of them. The elements composing each region are sorted in increasing order, and the ordinal pattern corresponding to the required permutation is saved for further analysis. In other words, the permutation π = (r 0 , r 1 , . . . , r D−1 ) of (0, 1, . . . , D − 1) is the one fulfilling: See Figure 1 for a graphical representation of the six permutation patterns that can appear for D = 3.

From Permutation Patterns to Irreversibility
The irreversibility of a time series is then estimated by looking at asymmetries in the appearance frequencies of the corresponding permutation patterns. Specifically, for D = 3, 6 patterns can appear, paired as follows: (1, 2, 0) t.r. ↔ (0, 2, 1), with t.r. ↔ representing a time reversal transformation. In other words, a region corresponding to the pattern (0, 1, 2) (for instance, a monotonically increasing series) will become (2, 1, 0) after a time reversal operation (in the previous example, it will become a monotonically decreasing series). This idea is also graphically represented in Figure 1. A time series will thus be reversible if and only if all permutation patterns composing the previous pairs appear with approximatively the same frequency; if this does not happen, a time arrow can be derived from the predominant presence of one of the patterns composing the pair. In other words, and to illustrate, suppose a trivially irreversible time series with monotonically increasing values; only one permutation pattern can appear, i.e., (0, 1, 2), which will transform to (2, 1, 0) under a time reversal transformation. Given a new realization of the same time series, assessing the relative abundance of (0, 1, 2) over (2, 1, 0) will allow to easily define if we are looking at the original or at the time reversed time series. This is nevertheless not possible if the appearance probabilities of both patterns is approximately the same.
A statistical test can easily be designed, by comparing the probability distributions of patterns in the forward and reversed time series. Specifically, if the time series is reversible, the number of times the two permutation patterns forming a pair appear should be similar-i.e., should not be different, in a statistical sense. Following the previous example, let us denote by n (0,1,2) FIGURE 1 | Calculation of permutation patterns and irreversibility. The six graphs represent the six possible permutation of a time series values for D = 3. The three arrows indicate how each pattern will be transformed under a time reversal operation. and n (2,1,0) respectively the number of times the patterns (0, 1, 2) and (2, 1, 0) have appeared; and let us define: p = n (0,1,2) n (0,1,2) + n (2,1,0) .
The time series is not reversible if we can reject the null hypothesis that p = 0.5 in a two-sided binomial test. Note that the test should be repeated for all pairs of permutation patterns-three times in the case of D = 3.

Scaling and Noise in the Irreversibility of EEG Data
The previously described test yields a result that could prima facie be used to understand brain dynamics, i.e., one could simply assess whether or not an EEG time series is irreversible. This direct approach nevertheless masks important information, as it tells nothing about the time scales at which such irreversibility appears; may be sensitive to noise; and could be misleading when comparing time series of different lengths, as one could not exclude that the non-irreversibility of a short time series may be due to its reduced length, and not to a reversible underlying dynamics. We here solve this problem by calculating how the irreversibility evolves as a function of the scale over which such irreversibility is assessed. To illustrate, let us consider an EEG time series composed of N data points, and a window length (the irreversibility scale) of n, such that n < N. We firstly extract all overlapping sub-regions of size n, and evaluate their irreversibility; if at least a 90% of those sub-regions are irreversible in a statistically significant way (α = 0.01), then the whole time series is considered as irreversible for the time scale n. Finally, we average over all channels and all trials / subjects of a data set, to obtain the fraction of times a channel has been detected as irreversible at a given time scale n, and the evolution of such fraction as a function of n.

Model of Noisy Irreversible Time Series
In order to assess whether the irreversibility evolution may only be due to noise, we here consider a simple dynamical model contaminated with additive Gaussian noise. The chosen model is the well-known logistic map (Ausloos and Dirickx, 2006), defined as: r is a parameter defining the dynamics of the map, here fixed to 4 to ensure a chaotic evolution. Additionally, σ is a parameter defining the quantity of additive noise, and ξ random numbers drawn from a normal distribution N (0, 1). The logistic map has here been chosen as it presents a nontrivial dynamics, but at the same time its irreversibility can be detected even in short time series (Zanin et al., 2018).

Testing Irreversibility Through Surrogate Time Series
As a final issue, we further analyse the source of the irreversibility of brain dynamics by using surrogate time series-see section 3.3. Such series are obtained through the Iterative Amplitude Adjusted Fourier Transform (IAAFT) algorithm (Schreiber and Schmitz, 1996). IAAFT works by iteratively performing a random phase transformation of the original time series, aimed at creating surrogates that preserve both the linear (auto-)correlation and the amplitude of the signal.

EEG Data Sets
Below are described the four data sets considered in this study; additionally, Table 1 reports their main characteristics, and Figure 2 the corresponding power spectra for control subjects. Unless otherwise specified, no further processing has been performed, i.e., the whole broadband signal has been considered without additional noise reduction or artifact elimination steps.

Motor Movement/Imagery Data Set
This EEG data set is described in (Schalk et al., 2004), and can be downloaded from https://www.physionet.org/pn4/eegmmidb/ (Goldberger et al., 2000). The full data set comprises recordings of subjects performing different motor/imagery tasks, albeit only the eyes open/closed resting-state conditions are here considered. A total of 110 trials (one per subject) are available, recorded with a 64-channel EEG (BCI2000 system). The 64 electrodes were located as per the international 10-10 system, excluding electrodes Nz, F9, F10, FT9, FT10, A1, A2, TP9, TP10, P9, and P10.

Parkinson's Disease Data Set
The EEG data set of Parkinson's patients was recorded at Istanbul Medipol University Hospital in Istanbul. PD patients were diagnosed according to the criteria of "United Kingdom Parkinson's Disease Society Brain Bank" (Daniel and Lees, 1993). The Unified Parkinson's Disease Rating Scale (UPDRS) (Lang and S, 1989) was used in order to determine the clinical features of PD; and the Hoehn-Yahr scale (Hoehn and Yahr, 1967) was used to determine the disease stage. A total of 74 patients (ages 56 − 86, median of 74) and 22 matched control subjects (ages 54 − 89, median of 67) have here been analyzed. All patients with PD were evaluated 60-90 min after their morning dose of levodopa for the EEG recordings. EEG of all healthy controls and Parkinson's Disease patients were recorded in a dimly isolated room. EEG was recorded according to 10-20 system with Brain Amp 32-channel DC system machine from 32 different electrodes. The EEG was recorded with a sampling rate of 500 Hz and with band limits of 0.01 − 250 Hz. All impedances were kept below 10kohm and two earlobe electrodes (A1-A2) served as reference electrodes.

Scalp (Epilepsy) Data Set
The CHB-MIT Scalp EEG data set is described in (Shoeb, 2009) and is available for download at https://www.physionet.org/pn6/ chbmit/ (Goldberger et al., 2000). It consists of EEG recordings from pediatric subjects (22 subjects, 5 males, ages 3 − 22, and 17 females, ages 1.5 − 19) with intractable seizures and free of anti-seizure medication. Note that sub-windows free of seizures are here analyzed alongside other groups' control subjects. All signals were sampled at 256 Hz with 23 sensors, located according to the International 10-20 system. Note that Ref. (Shoeb, 2009) provides no information about the eyes status while recording; in what follows we suppose that all data correspond to an eyes open resting-state condition. As seizures can be of short duration, and for the sake of having time series of similar characteristics across all data sets, only seizure segments longer than 30 s have here been considered, for a total of 92 instances. The same number of seizure-free segments, of equal duration, have randomly been chosen.

Schizophrenia Data Set
This data set includes resting state EEG recordings for a set of schizophrenia patients and matched control subjects, as described in Olejarczyk and Jernajczyk (2017) and available at http://dx.doi.org/10.18150/repod.0107441. The 14 patients (7 males, 27.9 ± 3.3 years, and 7 females, 28.3 ± 4.1 years) FIGURE 3 | Evolution of the fraction of irreversible channels, as a function of the considered window length, for all control subjects. The left and right panels, respectively, represent data for eyes closed and open resting states. Results here reported correspond to control subjects only, irrespectively of the name in the label-which represents the name of the data set.

Time Irreversibility of Control Subjects
As a first approach, we calculated how the irreversibility of the healthy (control) brain dynamics evolves as a function of the length of the considered signal. Figure 3 reports the evolution of the fraction of irreversible time windows, as a function of their length-as described in section 2.1.3. Several interesting facts ought to be highlighted.
First of all, all results are quite homogeneous across the considered data sets. This suggests that specific elements, like the used EEG machine, the number of channels or the recording setup have little effect in the metric; and thus that brain irreversibility is a robust property.
Secondly, it can be appreciated that the result is a monotonically increasing value with a small slope; even for time windows of 100 s, irreversibility is not detected in about 30% of the cases. The underlying dynamics may thus be irreversible, but a large amount of noise is likely masking such characteristic, so that it can only reliably be detected using long time series. To clarify this point, the left panel of Figure 4 reports the results for the Parkinson's disease and Schizophrenia data sets (in the eyes closed condition), along with those of the logistic map for different values of additive noise -as defined in section 2.1.4. While the shapes seem prima facie equal, two important aspects stand out. On one hand, while the irreversibility for the logistic map grows almost linearly with the size of the time window, that of the two EEG data sets seems to grow in a sub-linear way. On the other hand, the behavior for very short time series is very different, both between the two EEG data sets, and between the EEG data sets and the logistic map-see the magnification in Figure 4, right. The observed time series are thus the result of a complex interplay between an irreversible dynamics and observational noise.
We then analyzed differences in irreversibility between the eyes open and closed conditions. Figure 5 reports the evolution of the fraction of irreversible windows in the eyes open condition, as a function of the fraction for the eyes closed one. Each graph is constructed by searching, for a point of coordinates (x, y), the minimum window length for which the fraction of irreversible time series in the eyes closed condition is equal or greater than x; then y is set equal to the fraction of irreversible time series in the eyes open condition for that same window length. Points above the main diagonal (dashed gray line) thus indicate that, for a same window length, brain dynamics is more irreversible in the eyes open condition.
The left and right panels of Figure 5 respectively report the results corresponding to the motor imaging and Parkinson's disease data sets, i.e., the two for which both conditions were available. In both cases the line is above the main diagonal, indicating that the brain is more irreversible in the eyes open condition. This is in agreement with the hypothesis that cognitive activity is associated with irreversibility. Even at rest, leaving the eyes open implies a larger amount of inputs to be processed, and hence a higher activity and irreversibility.

Change in the Irreversibility Due to Pathological Conditions
An interesting question is to understand how different pathologies may affect the irreversibility of the brain, as the latter may yield information about the effect of the former on brain dynamics. Figure 6 reports on the evolution of the irreversibility of patients, as a function of the corresponding irreversibility in the control subjects (note that these graphs have to be interpreted in a way similar to that of Figure 5).
In three of the four data sets, patients exhibit a lower irreversibility, which is especially marked in the case of schizophrenia. These pathologies thus seem to reduce the brain's ability to respond to stimuli; or in other words, make the brain less prone to deviate from equilibrium. This is nevertheless not FIGURE 4 | Evolution of the fraction of irreversible channels, as a function of the considered window length, for the Schizophrenia and Parkinson's disease data sets, and for the synthetic noisy model (gray lines). From top to bottom, the four gray lines correspond to noise levels of σ = 0.63, 0.66, 0.69, 0.72. The left and right panels respectively represent the whole results, and a zoom for short window lengths. In all cases, only control subjects have been considered. homogeneous: while the difference mainly appears for long time series in the Parkinson's disease and the schizophrenia cases, this is not that marked in the case of the epilepsy. This seems to indicate that the brain's dynamical alterations in the two former conditions are identifiable at long time scales, while ictal events are more temporally local. Parkinson's disease in the eyes closed condition is the exception, displaying a small increase in irreversibility (albeit with no statistical significance). This suggests that, in this pathology, brain dynamics differs in the two conditions, being the irreversibility only different in the eyes open one. This effect may be the result of the visual misperceptions and hallucinations characterizing this pathology, which may have a lower impact in eyes closed conditions (Davidsdottir et al., 2005;Shine et al., 2011).
We further study if these differences between control subjects and patients are consistent across all frequencies, or are specific to some bands. Note that such analysis is also required to exclude that the irreversibility is just a spurious result coming from artifacts or muscular movements. Toward this aim, Figure 7 depicts three cases: results for the broadband signal (as presented in Figure 6), black lines; for signals filtered with a low-pass filter at 50 Hz, blue lines; and for signals filtered with a lowpass filter at 30 Hz, aqua lines. When the low-pass filter is applied, a corresponding downsampling is also executed, in order to avoid spurious slow dynamics that may bias the irreversibility values.
Results strongly differ for the three data sets. Firstly, in the case of schizophrenia, applying the filters yields a strong reduction in the difference in irreversibility; on the other hand, the opposite was seen in the case of the Parkinson's disease data set for eyes open, for which the difference between control subjects and patients was substantially increased. Even stronger is the effect of filtering in the case of epilepsy, in which case not only the difference between control subjects and patients is increased, but the difference in irreversibility even changed sign. This suggests the presence of a complex relationship between irreversibility, dynamics at different frequencies and pathologies. In the case of schizophrenia, patients seem to suffer from reduced irreversibility at high frequencies; while the opposite, i.e., a marked lower reversibility mainly at low frequencies, arises in Parkinson's disease patients.
We finally analyzed how this irreversibility of brain dynamics is spatially distributed throughout the brain in the three pathological conditions here considered. Figure 8 reports the average irreversibility value according to the EEG sensor, for the broadband signal. This value was calculated by averaging the irreversibility obtained for all window lengths, i.e., by averaging the curves of Figure 3; it therefore represents an overview of   Figure 6; blue and aqua lines to the signals filtered with respectively a low-pass filter at 50 and 30 Hz. *assumed state. the dynamics of the brain at all possible time scales. The four right-most panels of Figure 8 further report the difference in irreversibility between patients and control subjects-red shades indicating a higher irreversibility in the former. In the case of the Parkinson's disease in eyes closed conditions, patients were characterized by higher irreversibility in the frontal and occipital regions, while this metric was lower in most other regions. In all other cases, the drop in irreversibility characterizing patients was more spread, and especially strong on a very extended scalp region, spanning frontal, central and parietal regions.

Nature of Brain Irreversibility
As a final issue, we analyse the possible origin of the observed irreversibility. As discussed in section 2.1, the statistical significance of all presented results has been calculated through the p-value of a two-sided binomial test; note that this is equivalent to considering that all values composing the time series are independent, and is thus equivalent to comparing the irreversibility against randomly shuffled series. We explore another possibility, i.e., the use of IAAFT surrogate time series, which preserve linear autocorrelation and amplitude of the FIGURE 8 | Evolution of the average irreversibility by EEG channel in the three data sets corresponding to pathological conditions. Panels in the first and second columns depict the fraction of irreversible windows per channel, the left (right) ones to control subjects (patients). The four right-most panels depict the difference between the patients and the control subjects; positive values (red shapes) indicate a higher irreversibility in patients. *assumed state.
data-see section 2.1.5 for details. Comparing the results yielded by both approaches allows to partly understand the nature of the observed irreversibility. A statistically significant result in the binomial test suggests the presence of any kind of irreversibility, or of a weak version of it. If such irreversibility is maintained in the surrogates, it is possibly caused by the FIGURE 9 | Comparison of the fraction of irreversible channels, when the statistical significance is calculated against shuffled time series (black lines) and IAAFT surrogates (blue dashed lines). The red dotted lines (right axes) depict the evolution of the standard deviation of the irreversibility observed in the surrogated time series. *assumed state.
linear autocorrelation structure of the time series-as this property is maintained by the IAAFT. On the other hand, if the irreversibility is reduced in the surrogate signals, then the linear autocorrelation can be discarded as a cause-hence indicating a strong irreversibility. Figure 9 reports the evolution of the irreversibility both in the original time series (black lines) and in the IAAFT surrogates (blue dashed lines). A strong heterogeneity in results can be observed. On one hand, time series in the motor imagery and schizophrenia data sets display a similar or lower irreversibility both in the raw time series and in the surrogate ones, thus indicating that its origin resides in the autocorrelation structure. On the other hand, all cases of the Parkinson's Disease data set can be associated with strong irreversibility, as this is lost in the surrogates. An intermediate result is finally observed in the case of epilepsy: while inter-ictal windows are more irreversible, ictal ones are characterized by a larger distance from surrogates' irreversibility; this suggests that ictal activity is less irreversible in a weak sense, but more irreversible in a strong sense with respect to inter-ictal activity, as already suggested in the literature (Van der Heyden et al., 1996;Schindler et al., 2016;Martínez et al., 2018).

DISCUSSION AND CONCLUSIONS
We used a permutation-entropy based metric to quantify the time-reversal symmetry of spontaneous EEG activity from three groups of patients under two experimental conditions (eyes open and closed). Our results show that resting brain activity is generically time irreversible, and that irreversibility is modulated by simply opening or closing eyes, and altered in a pathologyspecific way by psychiatric and neurological disease.
The presence of resting time-reversal asymmetry of electrical activity is consistent with a vision of the brain as a generically outof-equilibrium system. Our results indicate that at sufficiently long time scales the healthy brain may in fact be operating close to a NESS (Livi, 2013). Moreover, insofar as it has the shape of Equation (1)'s fluctuation relation, the proposed asymmetry quantifier provides information as to the system's distance from equilibrium. Equilibrium systems fulfill fluctuationdissipation relations (FDRs). Translated in terms of neural activity, these relations would reflect a substantial equivalence between spontaneous and task-induced brain fluctuations, so that the presence of FDRs would considerably simplify the characterization of the latter, by allowing to base it merely on the correlation properties of the former (Papo, 2013a). While the brain as any other biophysical system is not expected to fulfill such equilibrium relations, the extent to which these are violated can nonetheless provide important information on the relation between resting and task-induced activity. The most intuitive way to probe FDR violations would in general consist in comparing correlations of the unperturbed system with stimulusor generally task-induced ones (Martin et al., 2001). However, this method has various shortcoming: (1) it requires separate measures of the correlation and response functions, the latter relying on external perturbations; (2) external perturbations, the effects of which are often difficult to control in a neuroscience context, only represent exogenously promoted cognitive or motor functions; (3) there is no way that perturbations are small enough to guarantee that the measurements are made within the linear response regime. An alternative method to quantify a NESS involves evaluating the property of detailed balance between microstastes of an appropriately coarse-grained mesoscopic representation of the system's dynamics (Rupprecht and Prost, 2016). The proposed method is in some sense a measure of detailed balance violation (Zanin et al., 2018), and provides the time-scale-specific magnitude of the distance from equilibrium. Finally, while the coarse-graining implicit in both EEG data and in our analyses lose parts of the genuine physical entropy production of the underlying system, the proposed timeirreversibility quantifier can nonetheless be thought to give a lower bound of the system's true one (Seifert, 2019).
If time-reversal symmetry reflects a genuine indicator of brain activity efficiency, one would expect that it would vary in a task-and condition-specific manner. Our results show that irreversibility can be modified by an experimental condition as simple as opening and closing eyes (see Figure 5), consistent with an entropy production interpretation of observed timereversal symmetry. Our results also generally point to decreased irreversibility in pathology, the lowered proneness to depart from equilibrium being most conspicuous in the schizophrenia group (see Figure 6). Pathological dynamics seems reminiscent of nonequilibrium systems recovering equilibrium properties at certain scales (Egolf, 2000). In addition, irreversibility patterns showed some degree of pathology-specificity, particularly conspicuous at faster time scales (see Figure 3). An important general message is then that irreversibility induces a time scale, identified by the transition to irreversibility, both in healthy activity and in pathology. Furthermore, the scales at which irreversibility departs from the healthy pattern also showed some pathology-specificity.
Time-reversal symmetry alterations showed pathologyspecific frequency content (see Figure 8). This may indicate that the irreversibility pattern consistently seen in healthy controls across different data sets analyzed in our study may result from a specific composition of the broad-band frequency spectrum. Conversely, this also suggests that frequency-specific dysfunction associated with various pathologies (Lee et al., 2001;Başar and Güntekin, 2008;Oswal et al., 2013;Roach et al., 2013;Little and Brown, 2014), usually seen from an exquisitely dynamic view-point, may ultimately affect basic aspects of normal brain efficiency.
The results of our tests using surrogate time series show a condition-specific dynamical etiology of time reversibility. In particular, in some pathologies, irreversibility may stem from changes in local linear autocorrelations, while in others it may be a consequence of a different dynamical mechanism, the exact nature of which can only be found by surrogate testing of a different nature from the one used in the present study. Time irreversibility in the data may be caused by some trivial static non-linearity rather than by genuine non-linear dynamics of the system generating the EEG ( Van der Heyden et al., 1996). In our study, the role of additive noise was systematically examined and it was showed to decrease as expected irreversibility (see Figure 4). On the other hand, when reversibility can be rejected, a static transformation of a linear Gaussian random process can be excluded as an appropriate model for the time series (Cox et al., 1981). Evidence abounds for weak non-linearity in multichannel EEG (Pezard et al., 1994;Rombouts et al., 1995) and in the interdepencies between EEG channels (Paluš, 1996;Breakspear and Terry, 2002). However, the role of non-linearity per se in irreversibility may be a complex one, as suggested by increased nonlinearity (Pezard et al., 2001) but decreased irreversibility in Parkinson's disease in the eyes open (though not in the eyes closed) condition. The frequency-specificity of the irreversibility patterns in the various pathologies considered in the present study may stem from pathology-specific nonlinear features, e.g., bistability and non-diffusivity, associated with non-Gaussian statistics appearing at certain scales of the underlying dynamics (Freyer et al., 2009). Again non-Gaussianity and irreversibility may have a complex, possibly scale-dependent relationship, as the equilibrium systems can exhibit non-Gaussian fluctuations, and conversely non-equilibrium systems can exhibit Gaussian fluctuations.
Finally, the topographically distributed nature of changes in irreversibility with respect to healthy controls would point to diffuse impairment, even for pathologies with localized etiologies such as Parkinson's disease. Although scalp topographical results should always be interpreted with caution, higher frontoposterior irreversibility values in Parkinson's disease may point to compensatory mechanisms (Blesa et al., 2017). Altogether, our results may suggest that pathology may change the dynamic process underlying brain dynamics, pushing activity not only toward qualitatively different statistical and dynamical regimes (Buiatti et al., 2007;Papo, 2014), but also toward different thermodynamical ones. However, given the role of connectivity and network topology in brain physiology (Bullmore and Sporns, 2009;Bashan et al., 2012;Bartsch and Ivanov, 2014;Bartsch et al., 2015;Liu et al., 2015;Ivanov et al., 2016;Lin et al., 2016), appraising the overall significance of time-reversal symmetry in brain functioning will require understanding the properties of their spatial distribution.
In conclusion, irreversibility may represent a signature of normal functioning and with the potential to highlight pathology. More generally, the evaluation of irreversibility by comparing the information content of time-reversed processes provides a bridge between dynamics, information and thermodynamics of the brain, and may ultimately help understanding fundamental questions (but otherwise experimentally hard to address) such as information erasure, which is connected to entropy production through Landauer's principles (Gaspard, 2015). The properties and significance of time scales, the scale-and sampling rate-dependence, etiology, sensitivity, and specificity of time irreversibility as well as the topology across the cortical space will have to be examined with larger and more controlled samples before their clinical significance is corroborated.

DATA AVAILABILITY STATEMENT
The datasets generated for this study will not be made publicly available as these are clinical data subject to a strict privacy policy.

ETHICS STATEMENT
Ethical review and approval was not required for the study on human participants in accordance with the local legislation and institutional requirements. The patients/participants provided their written informed consent to participate in this study.

AUTHOR CONTRIBUTIONS
MZ and DP conceived the idea and designed the study. MZ performed all data processing and statistical analyses. BG, TA, and LH coordinated the Parkinson's data acquisition. DP and BG interpreted the results. All authors contributed to the final manuscript.

ACKNOWLEDGMENTS
The data collected in Istanbul Medipol University was supported with a TÜBİTAK Project (No: 214S111). DP acknowledges financial support from the program Accueil de Talents of the Méetropole Européenne de Lille and from the Labex (laboratory of excellence) DISTALZ (Development of Innovative Strategies for a Transdisciplinary approach to Alzheimer's disease).