STRIDE
Stride-level Tracking and Integrated Decision Extraction: cognition and gait from one T-maze video
Abstract
Motor impairments can precede cognitive decline in neurodegenerative disease, yet preclinical assessments in mouse models usually evaluate the two domains in isolation. STRIDE extracts cognitive and stride-level gait metrics from the same T-maze video. We applied it to amyloid (AppNL-F) and tau (hMAPTS305N;IVS10+3) knock-in mice at 6 and 16 to 18 months (n = 77).
At 6 months, gait features classified tau mice without error (AUC = 1.00) while choice accuracy was indistinguishable across genotypes. Regional analysis revealed a gait-mode switching deficit: wild-type mice shifted to an exploratory gait at the decision junction, tau mice kept an inflexible locomotion gait. Early exploratory differences converged with normal aging while cognitive deficits emerged only later, separating age-related from disease-specific change. The tau trajectory through multimodal feature space was orthogonal to the wild-type aging axis. AppNL-F mice were indistinguishable from wild type. Gait signatures within a structured cognitive task detect tauopathy before cognitive impairment emerges.
See it in action
Six-month-old wild-type (top) and tau (bottom) mice walking at the same speed, 15 to 25 cm/s, in the same 2.5-second window, played at a quarter speed. Lines are the tracked skeleton, dots are footprints, distance is in body lengths. The tau mouse takes more, shorter strides: watch the stride counters.
The header video is a single trial as STRIDE sees it: the maze masked out of the frame, the 15-keypoint skeleton tracked on every frame at 120 fps.
One video, two phenotypes
Cognition
Arm choice with depth-validated entry, learning curves and days to criterion, reward-reversal detection, choice latency, junction exploration time and snout probes: 11 T-maze metrics per trial.
Gait
Swing and stance detection per hind paw, stride segmentation, 16 stride-level metrics (stride and step length, step width, duration, step frequency, duty factor, temporal symmetry, body elongation, lateral sway of snout, tail base and tail tip) plus 3 regional measures.
Statistics
Linear mixed models with genotype and sex as fixed effects, stride speed and body length as covariates and mouse as a random intercept; FDR correction across metrics; a WT-vs-Tau logistic classifier on per-mouse features.
How it works
Raw video and the two SLEAP models go in; per-trial decision tables and per-stride gait tables come out. Every stage is gated: calibration is verified before any metric is reported in centimetres, and a clip is skipped rather than silently mis-scored when its maze regions cannot be found.
| Stage | What it does | Output |
|---|---|---|
| 1 Calibration | Pixel-to-centimetre scale from a calibration target in view, lens-distortion check | verified px/cm |
| 2 Pose and ROI inference | Top-down SLEAP models: 15-keypoint pose at every frame, 7-region maze segmentation | .slp pose file, .rois.yml per clip |
| 3 T-maze decisions | Gate crossing, arm entry with dwell validation, correctness against the reward side, protocol rules | decisions table |
| 4 Stride detection | Paw velocity thresholds, swing phases, foot strikes, stride boundaries | strides per clip |
| 5 Filtering | Confidence, maze-edge and angular-velocity filters select straight, well-tracked strides | filtered strides |
| 6 Metrics | Spatial, temporal and body-sway metrics per stride; region tags (stem, junction, arm) | gait table |
| 7 Models | Mixed models, FDR, classifier | effect tables and figures |
Figure 1. (a) The T-maze: a 110 cm stem in four 20 cm segments, a 10 cm junction and two 27.5 cm arms, filmed from below the transparent floor. (b) Two SLEAP models, pose and region segmentation, feed the decision and gait modules. (c) Pose predictions against ground truth and the seven regions with body occupancy. (d) 77 mice at 6 months (48) and 16 to 18 months (29), 6,537 trials, balanced by sex and genotype.
Stride metrics follow the open-field stride analysis of Sheppard et al. (Sheppard et al., 2022) and the gait definitions of Bellardita and Kiehn (Bellardita & Kiehn, 2015); pose estimation uses SLEAP (Pereira et al., 2022).
Results
Figures and numbers below are from the current manuscript draft (6 and 16 to 18 months, 77 mice). The 3-month and 24-month cohorts recorded since are being folded into the next revision.
STRIDE extracts 30 behavioral metrics with high concordance to manual scoring. Per-mouse choice accuracy from the pipeline agreed with a human scorer (r = 0.881, 77 mice) with 97.9% trial-level concordance over 6,218 trials. Pose localization error was below 1 mm at the median and below 3 mm at the 95th percentile on held-out frames; region boundaries were localized with similar precision.
Figure 2. (a) Metrics available from manual scoring versus the pipeline. (b) Automated versus manual accuracy per mouse. (c) Per-keypoint pose error, 95th-percentile circles and full distributions. (d) Per-region corner error.
Early exploratory deficits in tau mice precede cognitive impairment. At 6 months all genotypes learned the task at the same rate. Tau mice nevertheless spent less time exploring the junction before committing (110 versus 318 ms) and made fewer snout probes (1.5 versus 2.1 per trial). With age the exploratory metrics converged while cognition diverged: by 18 months tau accuracy had fallen toward chance (53%) while wild type held at 66%.
Figure 3. (a) Accuracy and days to criterion at 6 and 18 months. (b) Junction occupancy per genotype at 6 months. (c) Snout-probe positions at the junction. (d) T-maze metric trajectories from young to aged. (e) Junction metrics that differ at 6 months.
Gait signatures are present before symptoms and intensify with age. Mixed models on 14 gait metrics, with body length and speed as covariates and mouse as a random intercept, found 7 metrics altered in tau mice at 6 months: shorter strides, higher step frequency, lower duty factor, a more compact body and reduced sway. By 18 months 9 metrics were altered and stride length had reversed, tau mice now taking longer strides than wild type, with every tau mouse above the wild-type median.
Figure 4. (a, b) Mixed-model results for 14 gait metrics at 6 months (13,350 strides, 18 mice) and 18 months (18,307 strides, 29 mice): significance heatmap and standardized effect against wild type, stars mark FDR below 0.05. (c, d) Per-mouse values for six metrics. (e to g) Lateral sway of snout, tail base and tail tip across the stride cycle.
Tau mice fail to switch gait modes at the decision junction. At the junction, wild-type mice slowed into an exploratory gait, 514 ms per stride at a duty factor of 0.85, while tau mice kept a locomotion gait, 393 ms at 0.79, although both slowed to about 13 cm/s. The tau stride-length effect grew from stem to junction to arm, and the number of significant regional effects rose from 3 at 6 months to 12 at 18 months.
Figure 5. (a) Junction behavior and gait at 6 and 18 months. (b) Regional effect sizes for 14 gait metrics across stem, junction and arm. (c) Tau effect size by region. (d) Per-mouse gait modulation, junction minus stem, at 18 months.
Multimodal features detect tau before cognitive deficits emerge. Projected onto the wild-type aging axis, tau mice moved less than half as far with age (0.41 versus 1.00) from a lower starting point: a trajectory orthogonal to normal aging, not accelerated aging. Gait alone separated wild-type from tau mice at 6 months without error (AUC = 1.00), when accuracy could not. A four-class model of age and genotype reached AUC 0.98 and 84% accuracy. AppNL-F mice were not separable from wild type at either age.
Figure 6. (a) Behavioral aging score along the wild-type axis. (b) Age prediction per genotype and feature domain. (c) Pairwise genotype classification at each age. (d) Four-class confusion matrix, wild type versus tau by age. (e) Gait-feature PCA with aging trajectories.
Use STRIDE on your own maze
STRIDE is modular. The gait module needs only three things: a SLEAP pose file with the snout, tail base and the four paws (other skeletons can be mapped), a region file marking a straight corridor, and the pixel-to-centimetre scale and frame rate of your recording. The T-maze module needs the seven-region geometry of a T. A different maze therefore keeps the full gait analysis and swaps only the region definitions.
Recording matters more than the camera brand. From our three rigs: at least 20 to 25 px/cm on the maze floor, at least 100 fps (60 fps loses about a quarter of swing phases to the 5-frame minimum; 30 fps cannot resolve strides), and low-compression video. Cognitive scoring works at any of these frame rates on a top-down or bottom-up view.
Web tools preview
Both tools run entirely in your browser. Nothing is uploaded; your video never leaves your machine.
Rig checker
Drop in a video, say what is in it (T-maze, another maze, open field, treadmill), mark a known distance and the mouse. The page reports which STRIDE modules the recording supports, what to change, and writes the config and commands to run.
STRIDE viewer
Load a pose file and a region file, optionally with the video. See regions and trajectories on the frame, swings and strides on a timeline, the pipeline’s filters applied stride by stride, and two clips compared at matched speed.
Data and models
Trained SLEAP models (pose and region segmentation) and an example clip with its expected outputs will be deposited with the publication. Code: github.com/talmolab/STRIDE (private until publication).
Citation
Li Y, Ling L, Chou R, Ketterer-Sykes EB, Andrews NA, Han C, Liao C, Lee CT, Lee KF*, Pereira TD*. Dual cognitive and motor phenotyping for early detection of Alzheimer’s Disease progression in mouse models. In preparation (target: Nature Communications; submission November 2026).
@unpublished{li2026dual, author = {Li, Yipeng and Ling, L. and Chou, R. and Ketterer-Sykes, E. B. and Andrews, N. A. and Han, C. and Liao, C. and Lee, C. T. and Lee, K. F. and Pereira, Talmo D.}, title = {Dual cognitive and motor phenotyping for early detection of Alzheimer's Disease progression in mouse models}, note = {In preparation (target: Nature Communications; submission November 2026)}, year = {2026}}Software: STRIDE v0.1.0, MIT license, github.com/talmolab/STRIDE. A software DOI will be added on release.
Acknowledgements
Talmo Lab, Salk Institute for Biological Studies. Full acknowledgements and funding to be added.