Is gait more individual at slow speed?

Knee-flexion cycles of 52 healthy adults walking at five speeds, analysed with participant-level statistics: re-identification, variance decomposition, functional PCA, grouped cross-validation and clustering stability.

Code and data: github.com/Pchambet/Gait-Analysis · every number on this page is generated by make run · 2,544 cycles, 52 participants, 5 conditions
TL;DR

Why it matters

Clinical gait analysis compares a patient's curves with a reference band, and the original course project concluded that asking patients to walk slowly could expose individual abnormalities. That claim deserves a test before it shapes a protocol. In these data slow walking adds stride-to-stride noise at both levels without making individual signatures more distinctive.

Data

Five MATLAB files, one per speed instruction, each holding knee flexion-extension time-normalised to 101 samples per cycle (heel strike to heel strike) plus spatio-temporal parameters. Participants are keyed by their position in the files because one label (SS2014004) is shared by two different people; 16 very-slow cycles that duplicate another stride of the same person are removed. Ages 19–67, 29 men.

conditioninstructioncyclesspeed (m/s)stance (% cycle)cadence (steps/min)
C1 very slow0-0.4 m/s5040.2974.442
C2 slow0.4-0.8 m/s5120.6168.372
C3 medium0.8-1.2 m/s5100.9865.0100
C4 spontaneousself-selected5141.1564.0108
C5 fastself-selected fast5041.6361.4128

1. Does slow walking make gait more individual?

A cycle is matched to its nearest neighbour among all other cycles at the same speed (leave-one-cycle-out); accuracy is the share matched to the right participant. Intervals are participant-level bootstrap percentiles (2,000 resamples), and condition differences are paired on the same resampled participants.

Same-speed re-identification from one cycle (52 participants)

Raw curves identify people best at spontaneous and fast speed. Registering toe-off narrows the gap; DTW with a 10 % band (a common default, not tuned on these data) stays between 49 % and 54 % at every speed, 8 to 10 points below raw Euclidean at spontaneous and fast speed. A narrower 2 % band, checked post hoc, beats Euclidean at every speed: light warping helps, wider warping removes timing differences that are part of a person's signature.

Variance components, averaged over the cycle

Slow walking widens both spreads by a similar factor, so the share of variance that belongs to the person (ICC) does not change.

Pointwise ICC along the gait cycle

Pointwise ICC: at medium to fast speed the person shows most in loading response (10-15 % of the cycle) and least around toe-off and terminal swing. At slow speed that peak flattens, together with the loading bump itself.

Re-identification across speeds (raw curves)

A signature transfers only between C3 and C4, whose speed ranges overlap (42 % to 46 %); every other pair, neighbours included, is at 3 % to 20 % (13 % on average off the diagonal).

2. How does speed deform the curve?

Mean knee flexion per speed (95 % CI over participants)

Faster walking raises loading-response flexion and peak swing flexion and shortens stance (toe-off moves earlier).

Loading-response excursion per participant

Each grey line is a participant. The first bump grows with speed in all 52 participants; Friedman chi2 = 192, p = 2e-40.

comparisonmean change (deg)participants upHolm p
C2 - C1+2.0 [+1.4, +2.7]44 / 522.8e-07
C3 - C2+4.9 [+4.1, +5.8]51 / 521.4e-09
C4 - C3+2.0 [+1.4, +2.6]43 / 522.8e-07
C5 - C4+4.6 [+4.0, +5.3]52 / 521.4e-09

Functional PCA on participant-by-speed mean curves: the first component explains 58 % of the variance and correlates with measured speed at Spearman rho = 0.92; the next components are almost speed-free (|rho| ≤ 0.13).

3. Can one cycle tell the speed?

Each participant contributes cycles to every class, so folds are grouped by participant: the model is always tested on people it has never seen. The cycle-level split is shown only to measure the leakage.

Speed class from one cycle

Stance duration alone reaches 55%; the curve shape lifts it to 70%. Errors fall almost only between neighbouring speeds, mostly C3 and C4, whose instructions overlap. The leaky split flatters the nearest-neighbour model most (+11 points) because it can recognise the person.

modelgrouped CVcycle-level CVgap
Stance duration only (logistic)54.7% (51.7% to 57.7%)55.2%+0.5 pts
8 FPCA scores (logistic)70.1% (66.7% to 73.3%)71.4%+1.4 pts
Gradient boosting, 101 samples66.7% (63.8% to 69.7%)72.9%+6.2 pts
1-NN, DTW band 10 %48.4% (45.6% to 51.0%)59.5%+11.2 pts

4. Clustering, revisited

DTW k-medoids on all cycles

At k = 5 the DTW k-medoids clusters agree with the speed labels at ARI only 0.15, and only k = 2 survives participant resampling (median ARI 0.86, against 0.55 at k = 5). Strides of one participant at one speed mostly share a cluster (77 %, against 51 % for random strides of the same speed): the clusters follow people more than speed instructions.

Re-running the original course pipeline (DTW k-medoids on spontaneous cycles, distances to the three medoids, k-means with k = 5) gives ARI 0.17 against the speed labels. Its headline "within-person variance" (26.88 at very slow versus 8.31 at fast speed, a ratio of 3.2) is not reproduced in absolute value (the original picked its medoids from an unconverged initialisation and did not seed k-means) but its ratio is: 392 versus 133, a ratio of 2.9. Its "lowest at fast speed" is not: the minimum is at C3 (96). That number is the variance of a distance to spontaneous-speed medoids: slow cycles sit far from those medoids, so their distances, and the spread of those distances, are larger. Scaled by the mean distance, the spread is the same at both speeds (coefficient of variation 0.15 versus 0.16).

Limitations

References