DFA is a method to identify self-similarity of signals in time – a way of quantifying an aspect of memory. How does it work, how do we interpret it and what can it tell us about disease?
Memory is one of the key functions of the brain, essentially the reconstruction of a past event in the present. How do you identify or quantify its presence? Neuroscientists have long looked to the electrical activity measured in the brain for clues. If we can find some evidence for similarity of the present to the past in this activity, that would be a glimpse of memory in the brain. Seen in this way, memory can be thought of as a relationship between some aspect of brain activity in the present to brain activity in the past – essentially temporal correlations or correlations across time. There are of course many different ways to slice and dice brain activity and look for such relationships in time. Here we discuss one of them called Detrended Fluctuation Analysis with respect to EEG and what it might tell us.
The basic principle
Detrended fluctuation analysis or DFA is a complicated name but, as an algorithm, is simpler than its name suggests. Let’s begin with the fluctuation analysis. What DFA is trying to do is to see how the magnitudes of fluctuations in any window of time is related to the magnitude of fluctuations in longer and longer windows of time. The magnitude of fluctuation in any given time window is basically calculated by a least squares method (essentially a standard deviation).
Now for the detrending. From a practical level this just means we remove local trends before we compute these metrics. For example, if you had a DC drift in your recording, this is a downward trend in your recording that would overwhelm how you compute the fluctuations and needs to be subtracted out. Such a drift is an example of a non-stationarity in the signal: a condition where the mean and/or standard deviation of the signal do not remain the same over time. There could be other intrinsic non-stationarities in the signal as well. How the detrending is done is simply to compute the standard deviation of the fluctuations after subtraction of a linear fit to the signal within the time window.
At the end of the exercise of calculating the standard deviation of detrended fluctuations for all length of time windows, what is arrived at is an exponent called α that tells you how fast the self-similarity falls off as the signal extends longer and longer in time. (α is also sometimes called H after Hurst who first came up with a similar and related measure – the Hurst exponent, that was modified/extended to create DFA).
α is calculated by looking at how the average magnitude of the detrended fluctuation (usually called F) changes as the length of the time window (L) increases. If the relationship is a power law or power function (an equation of the form F ~ Lα) this indicates a self-similarity (more about why this is so in later posts). Thus the DFA exponent is essentially the value of α that is obtained for the power function that best fits the data. (One quick and dirty way to visualize a power law is to transform both axes to log scale since this will turn a power law into a straight line log(F) ~ α *log(L) that can be fit with a straight line where α is now simply the slope).
The power law relationship is very important to the interpretation of self-similarity and computation of an exponent and reveals a ‘memory’ of structural characteristics. If the results can’t be fit very well with a power function, this implies that the basic premise of self-similarity does not hold up and you cannot find a value for α. The special characteristics and implications of this power law structure is a separate discussion in itself that we will post about subsequently.
How do you interpret α? You can imagine then if you have a straight line, each line segment looks just like any length of the line segment so you would get complete self-similarity – this gives you an α = 1. While this means that there is perfect self-similarity or memory, it also means that only one thing is remembered. On the other hand random noise has no memory and gives you H = 0.5. Consequently, for a process to indicate some memory you want it to be less than 1 but greater than 0.5, a range where it is neither perfect nor random and memory capacity is more optimal.
You can also get other values of α: When 0 < α < 0.5 it also suggests a temporal relationship but one that is anti-correlated rather than correlated (and is atypical of EEG signals). When 1 < α < 2 indicates a non-stationary process (such as can arise when the mean of the signal drifts or the overall amplitude grows and shrinks with changes in impedance of the measurements). Hopefully most of this is dealt with by the detrending so these will not arise often.
DFA on Eyes Open and Eyes Closed signals
DFA analysis has been widely used with EEG and MEG signals. Often instead of looking at the entire signal DFA is performed on filtered signals, for instance isolating the alpha band where there are thought to be oscillations. For example, Linkenkaer-Hansen et al. reported presence of long-range correlations and power-law scaling behaviour within the 10 to 20 Hz band (alpha and beta band) from MEG/EEG data recorded from 10 subjects with eyes open and closed condition, for a duration of 20 minutes. The power law behaviour was evident in the time-range of 5-300 seconds and the DFA scaling exponent in both the eyes closed (open circles) and eyes open (cross) conditions were 0.68 and 0.70, significantly higher than that of surrogate data which is shuffled to lose its temporal structure and was 0.5 (filled circles). Interestingly though there was not a statistically significant difference in the scaling exponent between eyes open and closed condition in both EEG and MEG although the increased alpha peak and therefore greater dominance of oscillations with eyes closed would be expected to produce a substantial difference (see related post Eyes Open, Eyes Closed and Variability in the EEG.
DFA in disease
Loss of long-range temporal correlations as demonstrated by a reduced value of α could also potentially be a biomarker for neurological disorders like Alzhiemer’s disease and schizophrenia as shown by Montez et al. and Nikulin et al. respectively. In case of Alzhiemer’s disease (from Montez et al), it was shown that the DFA-exponent was lower in patients compared to controls in the alpha band.
In case of schizophrenia the DFA or scaling exponent was lower in patients in both alpha and beta band compared to the controls (left image from Nikulin et al). The lower similarity or temporal correlations could be interpreted as a generalized indication of the difficulty patients have in holding a thread from the past or a greater propensity to forget the past.
Pitfalls in DFA interpretation
Although DFA has been quite widely used in the analysis of signals like EEG/MEG, it suffers from many limitations. First, reliable DFA analysis requires sufficiently long data and protects only against certain types of non-stationarities, as pointed out by Bryce and Sprague in this paper. Second, Heneghan and McDarby have explored the link between DFA and power spectral density analysis, concluding that these two methods provide equivalent information about long-term correlation and thus DFA analysis does not really add anything new. Finally, as with any other method in nonlinear analysis, computation of DFA depends on various parameter choices like how you choose the sizes of the time windows and their overlap. Different parameter choices can lead to different results making interpretation a challenge.
And last but not least, it is important to note that while DFA is an indication of self-similarity in temporal structure, the metric of fluctuation that it is based on is not the overall temporal pattern but the integrated fluctuations from a line of regression through the points. It is not out of the realm of possibility to have a totally different temporal pattern with similar deviations. In this way it says little about the details of temporal structure and only provides a glimpse of memory based on gross structural features over time.