Permutation Entropy and Irreversibility in Gait Kinematic Time Series from Patients with Mild Cognitive Decline and Early Alzheimer’s Dementia

Gait is a basic cognitive purposeful action that has been shown to be altered in late stages of neurodegenerative dementias. Nevertheless, alterations are less clear in mild forms of dementia, and the potential use of gait analysis as a biomarker of initial cognitive decline has hitherto mostly been neglected. Herein, we report the results of a study of gait kinematic time series for two groups of patients (mild cognitive impairment and mild Alzheimer’s disease) and a group of matched control subjects. Two metrics based on permutation patterns are considered, respectively measuring the complexity and irreversibility of the time series. Results indicate that kinematic disorganisation is present in early phases of cognitive impairment; in addition, they depict a rich scenario, in which some joint movements display an increased complexity and irreversibility, while others a marked decrease. Beyond their potential use as biomarkers, complexity and irreversibility metrics can open a new door to the understanding of the role of the nervous system in gait, as well as its adaptation and compensatory mechanisms.


Introduction
Within the large family of neurocognitive disorders, neurodegenerative dementias [1] are receiving increasing attention from the scientific community, to some extent proportional to their increasing prevalence in our ageing societies. "Neurodegenerative dementias" designates all conditions characterised by a progressive and slow deterioration of the central nervous system, causing symptoms and whose use is gaining followers in clinical practice and research. IGA assesses patient's specific problems by measuring how the body moves as a whole, by providing dozens of spatiotemporal parameters (e.g., walking speed or step length), and by further acquiring high-frequency kinematic measurements of those joints that align the lower extremity segments along the patient's gait cycle [34]. Analysing those hundreds of parameters is not straightforward, and the solution may come from data mining techniques, which have enough power to classify and relate them to assess the effect of a condition [35,36].
As described above, some attention has been devoted to the study of changes in kinematic and spatiotemporal parameters obtained with IGA in conditions of cognitive impairment. However, no attempt has yet been made to analyse gait signals as time series, for instance to assess their complexity, which should be altered or modified as a result of motor system lesion and system re-adaptation in patients with cognitive impairment. The rationale behind this is that brain signals to the muscles which provoke joint movement may become less continuous and less coordinated; inefficient joint movement noise may be added as a consequence of failure of some neuronal networks; and those signals may produce poor configurations that may not respond (or may respond wrongly) to purposeful cognitive commands such as changing velocity.
Herein, we present a cross sectional study aiming at analysing the complexity of gait in a cohort of patients with cognitive impairment in the stages of MCI and mild AD (mAD). For this, we rely on two complementary metrics. On one hand, the complexity is measured through the well-known permutation entropy (PE) [37][38][39], a metric assessing the presence of causal relationships in the progression of a time series by looking at the underlying permutation patterns. On the other hand, we complement this information with a metric assessing the irreversibility of the time series, also based on the study of the appearance frequency of permutation patterns [40]. While PE and irreversibility have previously been used to study gait dynamics (see, for instance, [41][42][43][44][45][46] for PE, and [47] for irreversibility), to our knowledge this is the first time both metrics have been used to characterise gait kinematics in mild neurodegenerative dementias. The results depict a situation richer than that which was initially hypothesised. While these two metrics allow a distinction to be made between cognitive impaired patients and healthy subjects and impaired patients with different degrees of impairment, complexity and irreversibility are increased for some joint movements, but are reduced in others. We also show that PE and irreversibility yield partially complementary information, thus suggesting that they are measuring two different aspects of gait kinematics.
The remainder of the paper is organised as follows. Section 2 reports the main results obtained, including statistical and data mining-based analyses of the differences between the three considered groups of people. Afterwards, Section 3 presents a discussion based on these results, focused on the corresponding biomedical implications, and lays the ground for future works. Finally, Section 4 describes all the involved materials and methods, including a description of the patient cohorts (Section 4.1), of how data was acquired and pre-processed (Section 4.2), and how PE and irreversibility are calculated (respectively, Sections 4.3 and 4.4).

Complexity Measures are Related with Preferred Walking Speed and Cognitive Impairment
Figures 1 and 2 report the values of the permutation entropy (PE) and irreversibility (IRR) calculated on time series of healthy subjects, patients with mild cognitive impairment (MCI) and mild forms of Alzheimer's dementia (mAD), according to the normalised walking speed. Figure 3 further shows the estimation and 95% confidence intervals of the beta coefficient from linear mixed models relating PE and IRR with age, preferred walking speed, group of cognitive impairment and the interaction between group of cognitive impairment and walking speed.
There is a limited effect of age on the PE and IRR of joint time series. Only IRR of hip rotation and forefoot adduction shows a significant effect, but with a relatively small effect size. The preferred walking speed influences both PE and IRR, but not in an equivalent way. PE of all joint kinematic time series, with the exception of the one referring to pelvic obliquity, shows a decrease for higher walking speed. In contrast, IRR is only increased at higher speed in hip flexion, knee adduction, knee flexion, ankle flexion, ankle rotation and forefoot flexion. PE of the time series is generally not changed in the group of patients with MCI. Only PE of ankle rotation is decreased in patients with MCI, this effect being higher with decreasing walking speed. The effect of MCI on PE of forefoot adduction is dependent on the interaction with walking speed; specifically, at higher speeds, there is a decrease in the PE of forefoot adduction in MCI patients in comparison to healthy subjects.
PE of the kinematic time series shows different changes in the group of mAD. PE of pelvic obliquity and hip flexion shows a significant difference for mAD in comparison to healthy subjects, which is dependent on the walking speed. Specifically, patients with lower preferred walking speed show a higher increase in PE of these two time series. Moreover, the decrease in PE of ankle flexion at higher walking speeds is more pronounced in patients with mAD with respect to healthy subjects. IRR of pelvic tilt shows different changes in the MCI and mAD groups. There is a decrease with respect to healthy subjects if walking speed is not considered, but IRR rises higher than in healthy subjects (for whom there was no effect of WS ) when WS increases. In the case of MCI, IRR of ankle rotation is increased in comparison to healthy subjects, but this difference decreases at higher walking speeds. In the case of mAD, there are significant effects for IRR of hip flexion, hip rotation and ankle flexion, which are lower than in healthy people, this difference being less marked as WS increases (with the exception of hip rotation, for which the beta coefficient of the interaction is not statistically different from zero).

Random Forests Detect a Distinguishable Pattern between the Different Groups of Cognitive Impairment
In contrast to linear mixed models, random forests are able to capture multidimensional patterns, which may help to detect more complex differences in entropy and irreversibility for different degrees of cognitive impairment. Herein, we report the performance of random forests trained with real data, in terms of the classification score, and compare it with the performance of random forests trained with 10 randomly shuffled data sets-see Figure 4, top panels.
Using either entropy or irreversibility of kinematic time series, random forests detect differences between groups, with a classification score between 75% and 83%. The prediction capacity is higher for separating healthy subjects from cognitive impaired groups than for discriminating between MCI and mAD patients. The combination of entropy and irreversibility improves the classification performance, particularly if the preferred walking speed is included in the algorithm. These prediction scores are around 80-85%, which are good enough to support that there are differences in the patterns of complexity between groups, although an overlap is still present.
The bottom panels in Figure 4 further report the classification score in the form of ROC curves. In order to obtain representative results, the classification was performed using half of the instances (randomly drawn) for training and half for the testing; the process was repeated 100 times, and the resulting ROC curves averaged. It can be appreciated that the classification with both entropy and irreversibility always yields higher curves than those only considering one single metric, thus confirming the previously shown results.

Permutation Entropy and Irreversibility Yield Complementary Information
In Figure 5, we show a scatterplot of PE and IRR for the time series of each joint movement for the same gait cycle. To analyse the correlation between PE and IRR, we calculated two coefficients: one corresponding to the within-subject variance, and a second one to the between-subject variance. Figure 6 shows that, in general, within-subject correlations are significantly higher than between-subject correlations. Moreover, most within-subject correlations show statistical significance; in contrast, in the case of between-subject correlations, we found statistical significant coefficients only for some kinematic joint time series. It is worth noting the variable degree of correlation, mainly depending on the type of joint kinematic time series. In the case of the within-subject correlation, there are small differences between groups with different degrees of cognitive impairment. On the other hand, between-subject correlation coefficients are more sensitive to the group of cognitive impairment.   Figure 6. Forest plots showing the correlation coefficient between permutation entropy and the amount of irreversibility, controlled by age and walking speed. Left and right panels respectively report within-subject and between-subject correlations. Squares represent the mean value of each beta coefficient, and horizontal dashed lines the corresponding 95% bootstrap intervals. Different colours are used to show the different groups.

Discussion
In this paper, we have shown that PE and IRR of joint kinematic time series along the gait cycle are modified in two stages of cognitive decline. Both PE and IRR depend on the walking speed. Moreover, the differences throughout different levels of cognitive impairments are also dependent on preferred walking speed, which is decreased in some patients. Interestingly, the effect of ageing seems more limited than the impact of cognitive dysfunction and walking speed. We have also demonstrated that the differences in kinematic complexity may allow discrimination between groups with different cognitive involvement. Lastly, we have demonstrated that PE and IRR provide complementary properties to provide more in depth insight into the complexity of gait kinematics. The relationship between PE and IRR in a gait cycle depends on the joint described by the kinematic time series, and on the group of patients in which it is studied.
In biological terms, measures of complexity such as PE and IRR may help in better understanding the processes of motor impairment/adaptation that occur in people with cognitive impairment. There are changes in complexity that are shared by both groups of patients: for instance, the amount of irreversibility of the pelvic tilt kinematic signal is decreased in both groups (MCI and mAD), being lower in patients with lower walking speed, thus denoting a decreased complexity of this joint movement in patients with slower gait. Interestingly, there are changes in complexity that are not shared by both groups of patients. We have shown that there is an increase in complexity at distal joints in MCI (decreased PE of ankle flexion and increased IRR of ankle rotation) that is higher in patients with MCI and lower speeds, and that is yet practically absent in patients with mAD. In parallel, patients with mAD show a decreased complexity for proximal joints (increased PE in the hip flexion and pelvic obliquity kinematic signals and decreased IRR of hip flexion and hip rotation) and for the forefoot flexion. These differences are again sharper in patients with lower WS. The increase in differences in patients with lower WS deserves special consideration. Two hypotheses can be proposed. Firstly, patients with cognitive impairment may use different kinematic complexity when they walk more slowly. Secondly, patients who walk more slowly may also be more severely affected in terms of motor capacity, with a consequent stronger alteration of kinematic complexity. It is difficult to check which one of these two hypotheses is true with our experimental design; further studies are needed to clarify how patients with cognitive decline adapt their gait complexity to different walking speeds.
The discrimination between groups based on complexity measures of kinematic joint time series is also a finding of biological significance. It is worth highlighting that, while it is in theory possible to build a diagnostic tool based on the presented results, this is not the aim of this work. On the contrary, classification models are here used to quantify the differences in gait adaptations in people with mild cognitive alterations. The presence of significant motor alterations in early/mild phases of cognitive deterioration, and the understanding of their biological foundations, is relevant for interpreting changes in later phases of cognitive impairment. Previous studies demonstrated that motor impairment slowly progresses from early phases, although symptoms were believed to only arise in later phases [17]; in contrast, our results support that kinematic disorganisation is also present at early phases of cognitive impairment. This makes a case for the use of complexity measures in future studies and in the creation of gait-based biomarkers, possibly in conjunction with simpler acquisition technologies, e.g., wearable accelerometers.
Beyond widening the methodological framework to study complexity of gait kinematic time series, the paper's main contributions are that (i) gait complexity changes at early mild cognitive impairment, and (ii) changes in gait complexity differ between MCI and mAD.
From a purely methodological point of view, our study also demonstrates that PE and IRR provide information about complementary properties in the evaluation of biological time series. By separately analysing within-and between-subject correlations, we have shown that PE and IRR share a higher proportion of intra-subject variance, which means that changes within the same subject in PE are also accompanied by changes in IRR. The correlation is far from being perfect, and we have shown that it varies depending on the considered joint time series. In contrast, between-subject correlation is generally low, which means that, excluding the potential effect of preferred walking speed, a subject with higher PE will not necessarily have a lower IRR. This implies that IRR and PE are reflecting different system and gait processes.
Some limitations of the proposed work have to be acknowledged. Mild cognitive decline and mild Alzheimer's dementia were defined according to clinical criteria, i.e., without the use of biomarkers and advanced imaging protocols. While this represents the current clinical practice in most health centres, this limits the possibility of correlating gait changes with this kind of biomarkers. As a second limitation, our study has a transversal design, while some features of cognitive decline have a dynamic behaviour. Even though this does not detract from the contributions of our study, relationships between complexity and future progression of the patients can only be hypothesised. Finally, it is worth noting that this study is non-interventional, as patients are observed while using their preferred walking speed. We did not explore whether complexity measures of gait kinematics could change due to external interventions or to modified walking speed; this prevents the interpretation of the observed relationships as causal ones. Such an interventional approach can be an interesting paradigm for future studies, relating changes in complexity with adaptations to different gait spatiotemporal outputs.
In conclusion, our study uses PE and IRR to characterise the complexity of gait kinematic time series in mild cognitive decline and mild Alzheimer's dementia. We found that there is a pattern of complexity measures that distinguish cognitive impaired patients from healthy subjects and impaired patients with different degree of impairment. The pattern is characterised by increased complexity in some joint movements and decreased complexity in others. We also show that PE and IR may be partially complementary indices, capturing different aspects of complexity in gait kinematics time series.

Participants
The present study relies on kinematic data recorded for three groups of people, i.e., MCI, mAD and matched control subjects. Figure 7 depicts a flow diagram indicating the recruitment and selection process of subjects; additionally, Table 1 shows the features of the finally included subjects.   We recruited two groups of patients with cognitive impairment, one with MCI and a second one with mAD. Thirty-five MCI patients and 33 patients with mAD were screened, but finally 28 and 29 were finally included. MCI and mAD patients were recruited in the memory unit of Hospital Universitario Infanta Sofía, Madrid, Spain, and had been diagnosed according to Petersen's criteria [4] and 2011 NIA-AA diagnostic criteria of probable AD [48], respectively. Patients were evaluated following a protocol that included a personal interview, medical history, full neurological examination, brain imaging, assessment of the global impact of the cognitive impairment by means of clinical dementia rating [49], evaluation of behavioural problems by means of the Blessed dementia rating scale [50], brain imaging and a battery of neuropsychological tests, including at least the MMSE test [51,52], digit span test [53,54], digit inverse test [53,54], free and cued selective reminding test [55,56], clock drawing test [57] and Rey-Osterrieth complex figure (copy and memory) [56,58]. Inclusion criteria for patients were: Ninety matching voluntary subjects were recruited ad hoc to build a control group with no cognitive complaints and no abnormalities in the mini mental state examination (MMSE) [51]. Inclusion criteria included:

Control group
• Age between 50 years and 75 years; • Absence of orthopaedic lesions or major surgery within the previous five years; • Absence of cognitive complaints; • Absence of a current diagnosis of an inter-current systemic neurologic or cardiorespiratory disease; • Absence of severe visual or auditory disability, and • A score higher than 28 points in the MMSE test [51,52].
Control subjects had a similar age and sex distribution to the groups with cognitive impairment. Two subjects were discarded for orthopaedic or clinical reasons, making a final number of 87 volunteers.
Note that the two groups of patients do not match in number due to the limited availability of participants that fulfilled the inclusion criteria. However, the size of both cohorts is large enough to support the statistical significance of our results. Additionally, group imbalance has been taken into account in the classification tasks, through the execution of the same tasks on randomly shuffled data.
Our local Ethics Committee approved this study and individuals were all subjected to examination after informed written consent. The work was carried out in accordance with the Code of Ethics of the World Medical Association (Declaration of Helsinki).

3D Gait Analysis and Data Preprocessing
Gait analysis was performed with a Codamotion system (Charnwood Dynamics Ltd., Rothley, UK). Twenty-four light emission markers were attached to the same number of positions of the subject's legs, according to an anthropological segment model designed by the manufacturer, and signals were recorded at 200 Hz while the subjects were performing the task. Subjects were incited to walk 10-15 times from one end to the other of a 7 m long walkway path (between 5 and 7 gait cycles per walkway) at their natural, spontaneous speed. The system acquired continuous real-time kinematic data during each complete walk over the walkway. After the acquisition session, individual gait cycles were isolated, by manually marking their beginning (heel contact) and their end (next heel contact of the same foot). Cycles were then reviewed to select those in which the gait was more stable, which usually coincided with those obtained from the 3-5 central meters of the walkway. Next, each selected cycle was again reviewed to check the consistency of the signal reception. The whole post-acquisition selection process was performed by two independent reviewers, with the help of a custom software programmed in R. This program is designed to detect abnormalities in cycle marking or signal reception, and to eliminate outliers in discrete kinematic parameters that might mean marker failure or displacement, and which might have escaped the manual revisions. This data validation process resulted in 25 valid cycles from each side (left or right leg of the individuals). For every side gait cycle, we studied the time series (201 time epochs) of the 3 angular planes (sagital, horizontal and coronal planes) from 5 joints (pelvis, hip, knee, ankle and forefoot).

Permutation Patterns and Entropy
The concept of permutation patterns, and especially of permutation entropy (PE), was introduced by Bandt and Pompe in a seminal paper in 2002 [37]. In short, given a time series, PE is based on the idea of finding the order patterns that result in sorted (ascending) sub-sequences, and of then studying the probability distribution (and eventually the entropy) of these patterns. PE then allows assessment of the temporal causality of a time series, in a computationally efficient and almost parameter-free way. Since its introduction, PE has been used to tackle multiple problems, from estimating the complexity of a time series, to identifying the nature (chaotic vs. stochastic) of the process generating it. While a brief mathematical formulation is provided below, the interested reader can find further information in several reviews, e.g., [38,39].
Let us start with a time series X = {x t : t = 1 . . . N}, thus composed of N data points. A vector of consecutive points can be associated to each time index t, such that s t → (x t , x t+1 , . . . , x t+D+1 ). Note that we here fix D, also known as the embedding dimension, to 3, due to the limited length of the available time series [59]. We additionally consider perfectly overlapping time series-i.e., we fix τ = 1, according to the standard PE formalism [38].
Each vector can then be associated to a permutation pattern, defined as the permutation that should be applied to the vector to obtain a sorted sequence. To illustrate, suppose that X = {0, 3, 2, 5, 1, . . .}; s 1 will then be defined as s 1 = (0, 3,2), and the corresponding permutation pattern will be π(132)-as the smallest element is the first, followed by the third and the second, i.e., x 1 < x 3 < x 2 . It is easy to see that only D! patterns can appear-and, in this case, 3! = 6. One can then construct a probability distribution p(π 1 , . . . , π 6 ), and define the normalised permutation entropy through the Shannon entropy of p: As has exhaustively been studied, PE values close to 1 suggest the presence of stochastic (random) processes; on the other hand, 0 ≤ PE < 1 implies the presence of some temporal causality in the generating dynamics, such as, for instance, a chaotic behaviour.

Irreversibility of Time Series
In mathematical terms, a time series can be defined as irreversible whenever there is a lack of invariance of its statistical properties under the operation of time reversal [60,61]. Thus, given a time series X = {x t : t = 1 . . . N}, its time reversed version X t.r. = (x N , . . . , x 1 ), and a generic function f , X is said to be irreversible if f (X ) = f (X t.r. ). More intuitively, an irreversible time series is one in which the observer can easily identify a time arrow, or a preferred temporal direction in the progression [61]-as is the case of a movie showing a glass falling and breaking on the ground. Irreversibility can be due to different causes, as for instance nonlinear dynamics, non-Gaussian (linear or nonlinear) generative models, or in general the presence of a memory [62]. Assessing irreversibility is therefore tantamount to assessing the degree of time series predictability and non-linearity; it is thus conceptually not distant from the idea underpinning PE.
We here measure the irreversibility of gait dynamics through the metric based on permutation patterns recently proposed in [40]. Note that several similar methods have been proposed in parallel, as for instance in [63,64]. Starting from a time series X and the corresponding permutation patterns π t , it is based on the idea that each pattern maps to a different one under the operation of time reversal. For instance, if at time t the pattern π(123) is found, reversing the time series will necessarily imply that π t+2 = (321)-note that a constant of 2 is added to account for the embedding dimension, here fixed to D = 3. To illustrate, if s = (4, 5, 6), and hence π = (123), its time reversal will necessarily be s t.r. = (6,5,4), thus leading to π t.r. = (321). A simple test can then be designed: the time series is irreversible when p(π 123 ) is different from p(π 321 ) in a statistically significant way, as the relative abundance of any of those two patterns can be used to define a preferred time direction. Note that a similar argument holds for the pairs of patterns (π 213 , π 312 ) and (π 231 , π 132 ).
Using a similar idea, one can easily calculate the amount of irreversibility of a time series. Specifically, let us consider the distributions P f = (π 123 , π 213 , π 231 ) and P b = (π 321 , π 312 , π 132 ), the latter being equivalent to the former under the operation of time reversal. The more P f and P b differ, the more clear is the irreversibility of the time series. This can easily be quantified through the Kullback-Leibler divergence: Values of D KL close to zero indicate that the time series is reversible; on the other hand, the higher is D KL , the more irreversible the time series is.

Effect of Cognitive Decline on Permutation Entropy and Irreversibility of Every Joint Kinematic Time Series: Univariate Study
We estimated the mean difference in the permutation entropy and the amount of irreversibility of the kinematic joint time series between groups (using healthy subjects as reference) by means of mixed effect models. We considered subjects and side nested on subject as random intercept. As fixed effects, we included group according to cognitive performance, age, normalised walking speed and the interaction of normalised walking speed and the cognitive group. This analysis was performed using package lmer in R. We used beta coefficients for fixed effects as effect statistics, and their 95% CI were calculated by means of parametric bootstrapping.

Correlation of Permutation Entropy and Irreversibility of Every Joint Kinematic Time Series in Each Joint Time Series
We used Bayesian, bi-response regressions for continuous variables programmed with non-informative priors (2,300,000 iterations of the Markov chain Monte Carlo algorithm with a burn-in of 300,000, and thinning of 100) using the MCMCglmm package in R [65] to calculate the degree of relationship between permutation entropy and irreversibility in every joint kinematic time series from each group, and, in that way, assess how much independent information permutation entropy and amount of irreversibility are providing. On the basis of variance-covariance matrices of the models, we calculated two correlation coefficients: one within-subjects and one between-subjects using the method described by Dingemanse and Dochtermann [66]. We used the 95% highest posterior interval as credible interval.

Classification Tasks
Classification tasks were performed through the well-known random forest (RF) model [67]. This model is constructed by merging an ensemble of decision tree classifiers, each one trained on a different and random subset of features and instances; the final classification is made by choosing the output class selected by the majority of the trees. The choice of the RF model was guided by three advantages [68]: (i) its recognised accuracy in classification tasks, usually superior to other models; (ii) its resilience to overfitting, especially in the case of limited availability of instances in the training phase; and (iii) its computational efficiency. In all tasks, we used the implementation included in the scikit-learn Python library [69]. Except for the number of trees, fixed to 1.000 , all other parameters have been left at the default value.
In order to estimate the generalisation accuracy of all models, a leave-one-out cross-validation (LOO CV) strategy was implemented [35]. An independent model was trained N times, with N being the number of instances in the data set. All data, except for those corresponding to a single instance, were used for training, for then for obtaining the prediction on the excluded instance. The final accuracy was then calculated as the fraction of times (i.e., of models) corresponding to a correct classification.

Acknowledgments:
We acknowledge the contribution of the volunteers, the patients and their families who generously collaborated to build the gait dataset used in this study. We are also grateful to Michael Paul for kindly editing the English of this manuscript. The acquisition and processing of gait data were funded by Escuela de Fisioterapia de la ONCE-UAM through a private donation.
Conflicts of Interest: I.P.-V. has received travel expenses from Roche Spain, Novartis and Genzyme-Sanofi for international and national meetings over the last 3 years; she holds a patent for an affordable eye tracking system to measure eye movement in neurological diseases and holds stock options in Aura Innovative Robotics. She has received travel expenses from European Academy of Neurology and European Committee for Treatment and Research in Multiple Sclerosis. D.G.-A. has received travel expenses from Biogen, PTC, Novartis, Roche and Shire and speaker fees from PTC and Shire. He holds stock in Aura Innovative Robotics and a patent for an affordable eye tracking system to measure eye movement in neurological diseases. He has received travel expenses from European Academy of Neurology. The rest of authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: