1 Introduction

Many natural systems exhibit long-range power-law correlations in their temporal dynamics [1,2,3,4,5]. The quantification of these correlations is widely used to determine the current state of the system or its changes caused by variable internal or external conditions. The application of conventional methods (spectral power or correlation function) enables such a quantification. However, the rapid decay of the correlation function for random processes and the time-varying behavior of the system affects the results and can lead to significant computational errors or even misinterpretations of the estimates for nonstationary data sets. The latter requires thorough signal pre-processing to avoid or at least reduce the effects of nonstationarity. As an alternative to conventional methods, approaches based on fluctuation analysis have been proposed [6,7,8], which involve the analysis of random walks and the consideration of a growing dependence instead of a decaying correlation function that takes values near zero in the region of long-range correlations and, therefore, the measurement noise becomes decisive for estimating the decay law. A comparison of several approaches is discussed, e.g., in [8]. Among them, the detrended fluctuation analysis (DFA) is probably the most popular [6, 7], although it also has some limitations, and it is necessary to know the impact of trends and nonstationarity on DFA performance [9,10,11]. DFA is quite robust with respect to missing data [12]. This method is a root mean square analysis of random walks or signal profiles that evaluates the standard deviation of detrended profiles as a function of segment lengths [13,14,15]. It introduces a global quantity (scaling exponent \(\alpha\)) associated with exponents describing the decay rate of the correlation function or spectral power. The complex organization of natural systems often produces processes that cannot be described by a single measure [16, 17], and more complex approaches based on the concept of multifractals are used to more clearly describe the dynamic features of the systems under study and the interplay of the involved subsystems [18,19,20]. A simple way is to evaluate the local scaling exponents associated with specific scale ranges and compare the features of short-, middle- and long-range correlations.

Although DFA is treated as a tool for processing non-stationary data due to the ability to de-trend the constructed signal profile, this procedure does not necessary eliminate slow variations in the local mean value. Thus, a piece-wise linear function, generally applied for de-trending, may not clearly describe such variations, especially if they include segments with different behavior of both the “pure” signal and the degree of non-stationarity. Moreover, nonstationarity is not limited to a trend and involves other types of time-varying behavior, such as intermittent dynamics or local energy changes. When data preprocessing is carried out, these types of nonstationarity usually remain in the signal and affect the characterization of correlation features with DFA scaling exponents. By analogy with many other approaches to signal processing, DFA adapts well to fairly homogeneous datasets, when the signal properties for different parts are similar. Otherwise, the impact of some segments may strongly outperform the impact of significant parts of the data sets. Recent works [21,22,23] have described these circumstances for various types of nonstationary behavior and have proposed a revised approach, extended DFA (EDFA), which evaluates two scaling exponents. The first exponent quantifies the features of correlations in accordance with the original DFA method, while the second exponent characterizes how the distribution of local fluctuations of the detrended signal’s profile varies with the segment length. Using both simulated and experimental data, it was found that such an extension of fluctuation analysis can be useful for diagnostic purposes since EDFA scaling exponents reflect different aspects of the complex organization of the measured datasets, and depending on the signal features, both can serve as diagnostic markers in physiological studies. In particular, they enable quantifying cerebro-vascular responses to abrupt changes in peripheral arterial pressure [21] and detecting specific changes in the brain dynamics during normal sleep and the opening of the blood–brain barrier [22, 23].

In the current study, we address the problem of characterizing changes in the electrical activity of the brain in rats caused by anesthesia. For this purpose, we apply DFA and its extension to electrocorticograms in two groups of animals, each of which received a different type of anesthesia at the recommended doses for surgery, namely injection anesthesia with zoletil / xylazine or inhalation anesthesia with isoflurane. This study aims to answer the following questions: (i) identify distinctions in ECoG recordings provoked by the type of anesthesia (or lack of such distinctions), and (ii) establish the potential of the recently proposed extension of DFA in quantifying transitions between states wakefulness–anesthesia for the case of optimal doses of anesthetics. The practical importance of the latter question is the possibility of better control of the depth of anesthesia during long-term physiological experiments, when sensitive diagnostic markers become of a high relevance. The paper is organized as follows: Section 2 briefly describes the conventional and extended DFA approaches, as well as the experimental data used in this work. Section 3 contains the main results and discussion of the study of wakefulness–anesthesia transitions using the EDFA method. Concluding remarks are summarized in Sect. 4.

2 Methods and experiments

2.1 DFA and its extension

The conventional DFA of signal x(i), \(i=1,\ldots ,N\) includes the following main steps [7]:

  1. (1)

    Building a profile

    $$\begin{aligned} y(k)=\sum _{i=1}^k x(i). \end{aligned}$$
    (1)
  2. (2)

    Division of y(k) into segments of equal length n with an estimate of the local trend \(y_n(k)\) for each of them. A linear trend is usually considered, although the method does not restrict the use of other functions, e.g., polynomials.

  3. (3)

    Detrended fluctuation analysis for a chosen n

    $$\begin{aligned} F(n) = \sqrt{\frac{1}{N} \sum _{k=1}^{N} \left[ y(k) - y_n(k) \right] ^2.} \end{aligned}$$
    (2)
  4. (4)

    Repeating steps (2) and (3) over a wide range of n to obtain the dependence

    $$\begin{aligned} F(n) \sim n^{\alpha }. \end{aligned}$$
    (3)

If a simple power-law behavior of F(n) takes place, the scaling exponent is computed as the slope of the linear function \(\lg F\) vs \(\lg n\). Otherwise, this function is quantitatively determined by local slopes in different \(\lg n\) ranges.

The inhomogeneous structure of natural processes can lead to significant distinctions between the local fluctuations of the profile y(k) from \(y_n(k)\), when the impact of various segments is very different, and some parts of signal provide much stronger fluctuations compared to other data segments. The main idea of EDFA is to analyze how distinctions in local fluctuations \(F_\textrm{loc}\) estimated within segments of length n vary with n. For this purpose, the difference between the maximum and minimum values of \(F_\textrm{loc}\) or the width of \(F_\textrm{loc}\) distribution can be considered. The first way is less suitable due to the possible presence of artifacts in x(i). The second way is a more stable procedure for the numerical analysis of local fluctuations. According to this procedure, the standard deviations of \(F_\textrm{loc}\) are computed over a wide range of n to obtain the dependence

$$\begin{aligned} \sigma (F_\textrm{loc}(n)) \sim n^{\beta }. \end{aligned}$$
(4)

Both quantities, \(\alpha\) and \(\beta\), describe different properties of the signal under study, namely its correlations in various scale ranges and the impact of nonstationarity depending on the scale.

2.2 Experimental data

The experimental procedures were performed on male Wistar rats (2 months old) in accordance with the standard Guide for the Care and Use of Laboratory Animals and the protocol approved by the Institutional Review Board of Saratov State University (No. 9 dated 06/26/2022). The rats were housed at a temperature of 25±2\(^o\) C, humidity 55%, and a light–dark cycle of 12:12 h. Animals were taken from the Pushchino vivarium (Russia) 1 week prior all procedures. At the first stage, silver electrodes with a tip diameter of 2–3 \(\mu\)m were implanted into the frontal cortex in coordinates (L: 2 mm, P: 2 mm) from Bregma on both sides of the midline; the implantation depth was 150 \(\mu\)m. ECoG wires were placed in burr holes on one side of the midline between the skull and the underlying dura mater and then fixed with dental acrylic. This procedure was carried out under inhalation anesthesia using 1% isoflurane at a dose of 1 L/min \(N_2O\)/\(O_2\) (70:30). At the second stage (after 10 days recovery), experiments with ECoG registration were performed. Two group of rats, each of which consisted of 7 animals, were assigned to two types of anesthesia: 1) injection anesthesia using zoletil / xylazine (100 mg/kg/10 mg/kg, Virbac Sante Animale, France/NITAFARM and Russia, respectively); 2) inhalation anesthesia using 1% isoflurane at 1 L/min \(N_2O\)/\(O_2\) (70:30) (Dexa Medica, USA). The experiments included 30–40 min of ECoG recording in the wakefulness state, and then the next 30–40 min during anesthesia at the optimal dose, i.e., the dose recommended for surgeries, which are not associated with changes in the blood-brain barrier [24, 25]. Two-channel ECoG were acquired in each experiment (Pinnacle Technology, Taiwan) with a sampling rate of 2 kHz. Their analysis using DFA and EDFA was carried out after data preprocessing, which included filtering using a Butterworth bandpass filter with cutoff frequencies of 0.5 Hz and 100 Hz and a notch filter 50 Hz. Removal of artifacts was carried out by the method [26].

3 Results and discussion

Both DFA and its extension, EDFA, reveal differences in the dependences \(\lg F\) vs \(\lg n\) and \(\lg \sigma (F_\textrm{loc})\) vs \(\lg n\), respectively. Typical examples are shown in Fig. 1 for two types of anesthetics and two states of the organism (wakefulness and anesthesia). According to this figure, the slopes of the given dependences are different in various scale ranges, and visually more pronounced distinctions appear in the region of long-range correlations. The latter does not necessarily mean that the region of short-range correlation is inappropriate for diagnostic purposes, since the within-group variability of scaling exponents may be stronger at large \(\lg n\). Figure 1 also shows that the local values of \(\alpha\) and \(\beta\) are quite close for \(\lg n < 2.5\) and become significantly different for \(\lg n > 3.0\).

Fig. 1
figure 1

Typical dependences assessed within the framework of DFA and EDFA for states of wakefulness and anesthesia for injection (a) and inhalation (b) anesthesia

To better visualize the distinctions, the local slopes of the dependences \(\lg F\) vs \(\lg n\) and \(\lg \sigma (F_\textrm{loc})\) vs \(\lg n\) were estimated within the sliding windows \(\lg n\) of size 0.7 at each time moment. Then the differences \(\Delta \alpha (t, \lg n) = \alpha (t, \lg n) - \alpha (0, \lg n)\) and \(\Delta \beta (t, \lg n) = \beta (t, \lg n) - \beta (0, \lg n)\) were computed. Figure 2 shows examples of \(\Delta \alpha (t, \lg n)\), which provide visually clearer recognition of distinctions in the transition between the states under study. Thus, Fig. 2a (the case of injection anesthesia) illustrates well-recognized distinctions in the region around \(\lg n = 2.9\), appearing at t=30 min when anesthesia was applied. Similar results are shown in Fig. 2b for inhalation anesthesia performed at t=35 min. The strongest differences in Fig. 2b are obtained for \(\lg n = 3.0\).

Fig. 2
figure 2

Changes in the local scaling exponents of DFA on the time scale plane for injection (a) and inhalation (b) anesthesia (typical examples)

Despite the distinctions are identified by eye, it should be noted that they are scale dependent, and the choice of the optimal range can essentially improve the diagnosis of ongoing changes in ECoG signals [27]. From this point of view, the estimation of local scaling exponents is more preferable than the consideration of global quantities in the entire range of scales, since averaging can make individual distinctions less pronounced. Aiming to compare such distinctions numerically, we computed the t-values of the Student’s t-test for 10 ECoG segments lasting 1 min for wakefulness and 10 analogous segments for anesthesia. Such a comparison was made for local scaling exponents estimated within \(\lg n\) windows of size 0.7. Figure 3 shows the dependences t vs \(\lg n\) for both scaling exponents \(\alpha\) and \(\beta\) and two types of anesthesia. This figure confirms the conclusion about the importance of choosing an appropriate scale range, where the differences between the states become more pronounced, i.e., t takes larger values. Thus, according to Fig. 3, significant distinctions (\(p<0.05\) associated with \(t>t_c\), where \(t_c = 2.23\)) occur not for all values of \(\lg n\). For an example in Fig. 3a (injection anesthesia) the optimal \(\lg n\) range is between 2.6 and 3.2, while better identification of differences using the EDFA \(\beta\)-exponent is achieved at smaller \(\lg n\) (about 1.8–1.9). Therefore, it is necessary to take into account both regions of relatively short-range and long-range correlations. An example in Fig. 3b (inhalation anesthesia) shows almost identical behavior for both scaling exponents with an optimal scale range around \(\lg n = 3.0\).

Next, we performed a more thorough analysis of different scale range for whole groups of animals and all ECoG recordings and evaluated the local scaling exponents \(\alpha _1\) and \(\beta _1\) (also using \(\lg n\) sliding window of size 0.7), quantifying the most pronounced distinctions for each rat in the region of relatively short-range correlations (we used range \(1.0< \lg n < 2.5\), although it depends on the subject, and changes in local slopes may differ), and local scaling exponents \(\alpha _2\) and \(\beta _2\), quantifying the scaling properties in the region of long-range correlations (we chose \(2.5< \lg n < 4.5\)). Figure 4 illustrates these characteristics for the 1-st registration channel in each experiment for the case of injection anesthesia. It shows that the states of wakefulness and anesthesia can be separated with both \(\alpha\) and \(\beta\) exponents. For short-range correlations (Fig. 4a), distinctions between states are visually recognized in at least 6 out of 7 rats using \(\alpha _1\) and \(\beta _1\) when providing formal clustering. In the region of long-range correlations, the best recognition takes place for \(\alpha _2\) (also in at least 6 out of 7 rats). For this reason, we can conclude that the analysis of distinctions between ECoG signals in the states under consideration should not be limited to the region of long-range correlations, but it is preferable to consider a wider region of \(\lg n\).

Fig. 3
figure 3

Dependences of t-values of Student’s t-test on the time scale for ECoG signals for injection (a) and inhalation (b) anesthesia. The results are shown for the experimental data used in Fig. 2. The local values of the scaling exponents estimated within \(\lg n\) sliding window of size 0.7 were used for these estimations. Significant distinctions (\(p < 0.05\)) are related to values exceeding the critical value \(t_c = 2.23\)

Fig. 4
figure 4

Distinctions between the local scaling exponents quantifying the regions of relatively short-range correlations (a) and long-range correlations (b) for the 1-st registration channel in experiments with injection anesthesia

A more detailed presentation of the results for all recordings and two types of anesthesia is given in Table 1. Let us discuss this table in terms of choosing the most appropriate numerical measure and scale range. For the first type of anesthetics, significant distinctions (\(p<0.05\)) between the states of wakefulness and anesthesia were found in 12 out of 14 ECoG recordings (\(t>2.23\)) in the area of short-range correlations (\(\alpha _1\)) and in all recordings in the region of long-range correlations (\(\alpha _2\)). Thus, the conventional DFA method provides a reliable diagnosis of ECoG changes caused by changed physiological state. Consideration of the extended algorithm with an additional estimate of the \(\beta\)-exponent leads to the following results: the transition between the states of wakefulness and anesthesia is identified in 12 out of 14 ECoG recordings in the area of short-range correlations (\(\beta _1\)) and in 11 out of 14 ECoG recordings in the region of long-range correlations (\(\beta _2\)).

Table 1 Statistical analysis of whole groups of experiments

For the second type of anesthetic, the results are quite similar. Changes in the physiological state were found during the analysis of ECoG signals in 12 out of 14 recordings with \(\alpha _1\) and in 12 out of 14 recordings with \(\alpha _2\). When applying the EDFA method, the corresponding diagnostics are carried out in 6 out of 14 recordings with \(\beta _1\) and in 12 out of 14 recordings with \(\beta _2\). Although the results obtained with \(\beta _1\) are much less informative in the latter case, it should be noted that reliable diagnostics is achieved in all ECoG recordings for at least one scaling exponent (\(\alpha\) or \(\beta\)). Based on the maximum value of t, we can conclude that the use of \(\alpha\) was preferable in 12 out of 14 recordings for injection anesthesia and in 9 out of 14 recordings for inhalation anesthesia. Advantages of EDFA were observed in 2 and 5 recordings, respectively. Nevertheless, there was an example (the case of inhalation anesthesia, rat 4, 2nd channel), where distinctions were identified with \(\beta _2\) exponent, and not with \(\alpha _{1,2}\) exponents. Thus, we can conclude that EDFA represents an extension of conventional fluctuation analysis, which does not necessarily provide better recognition capabilities, but gives additional information about the complex organization of experimental datasets. Using this information, the analysis of physiological experiments can be performed more thoroughly than using only one diagnostic marker (in our case, \(\alpha\) or \(\beta\) exponent).

Conventional DFA analysis did not reveal significant differences between the results for the two types of anesthesia when comparing results averaged over all animals and channels. Both injection and inhalation anesthesia led to similar changes in brain dynamics in the regions of short- and long-range correlations. Nevertheless, their quantitative assessment in terms of scaling exponents has some differences. Thus, DFA showed higher t-values in both regions of short- and long-range correlations for injection anesthesia (t=4.24 and t=4.53) compared with inhalation anesthesia (t=3.10 and t=3.92). An extended method provided higher t-values in the region of short-range correlations for injection anesthesia (t=3.77) vs t=2.51 for inhalation anesthesia, while a different effect was found in the region of long-range correlations (t=2.73 vs t=3.39). Therefore, there are some differences in the time-varying dynamics of the analyzed processes depending on the scale between the two types of anesthesia.

4 Conclusion

We considered the application of DFA and its extension, EDFA, to quantify anesthesia-induced changes in the electrical activity of the brain in rats. Two types of anesthesia were used: injection and inhalation anesthesia at doses recommended for surgery. Despite individual intra-group distinctions, we can state the similarity of the responses characterized by both the scaling exponents of the conventional DFA and its extended version. In both cases, differences can be detected between regions of relatively short-range correlations and long-range correlations, and all of these regions contain important information which can be applied for diagnosing the effects of anesthesia. Moreover, the maximum distinctions between the states of wakefulness and anesthesia demonstrate a quite complex dependence on the scale, and therefore, accurate processing of experimental data with an estimate of local scaling exponents seems to be preferable than an estimate of global quantities in a wide range of scales.

According to statistical analysis for the whole groups of animals, the conventional DFA approach often outperforms EDFA, providing higher t-values of the Student’s t-test that quantify inter-state distinctions. Nevertheless, EDFA also confirms significant distinctions between the states of wakefulness and anesthesia, supporting the conclusion obtained with DFA and, in some cases, improving diagnosis carried out within the conventional algorithm. For this reason, its application is useful for the careful study of experimental datasets, in particular, in long-term physiological experiments when sensitive diagnostic markers are required. Further, it is planned to explore the method’s ability to better link brain states to different dynamics around a critical phase transition, which has been examined in several earlier studies, but remains a very under-explored and promising area of research [28].