Identification of Selective Attention Strategies in Older Adults Using Biomechanical Analysis of Gait Kinematic Data Based on Machine Learning

Author(s):
Mostafa Haj LotfalianMostafa Haj LotfalianMostafa Haj Lotfalian ORCID1, Elham Dehghan NiriElham Dehghan NiriElham Dehghan Niri ORCID2,*, Fateme Zare BidokiFateme Zare Bidoki3
1Department of Physical Education and Sport Sciences, Faculty of Psychology and Educational Sciences, Yazd University, Yazd, Iran
2Department of Behavioral and Cognitive Sciences in Sport, Faculty of Sport Sciences and Health, University of Tehran, Tehran, Iran
3Department of Sports Injury and Biomechanics, Faculty of Sports and Health Sciences, University of Tehran, Tehran, Iran

Journal of Motor Control and Learning:Vol. 8, issue 2; e168769
Published online:May 31, 2026
Article type:Research Article
Received:Dec 03, 2025
Accepted:May 12, 2026
How to Cite:Haj Lotfalian M, Dehghan Niri E, Zare Bidoki F. Identification of Selective Attention Strategies in Older Adults Using Biomechanical Analysis of Gait Kinematic Data Based on Machine Learning. J Motor Control Learn. 2026;8(2):e168769. doi: https://doi.org/10.69107/jmcl-168769

Abstract

Background:

Aging is associated with gradual declines in neuromuscular and skeletal function, which affect motor and cognitive control and alter gait patterns. Selective attention, particularly the distinction between internal and external focus, plays a critical role in motor control in older adults.

Objectives:

This study aimed to evaluate the ability of machine learning models using joint kinematic features to distinguish between two attentional strategies during gait in older adults.

Methods:

Nineteen healthy older women participated in this study. Kinematic data for 12 degrees of freedom of lower- and upper-limb joints in the sagittal plane were recorded using the OpenCap system. Each participant walked along a 5-meter path under two attentional conditions: internal focus and external focus. Angular displacement, angular velocity, and combined features were used to train bagged decision tree models. The first three principal components were used for dimensionality reduction, and the models were evaluated on test data.

Results:

The angular displacement-based model achieved the highest test accuracy of 76.2% and a notable area under the receiver operating characteristic curve, whereas the angular velocity and combined models showed lower performance, with approximately 62% accuracy. Under the current summary-statistics feature framework, angular displacement features demonstrated stronger discriminative capability, likely reflecting more stable and regular gait cycles in older adults.

Conclusions:

Joint angular displacement features offer practical and reliable indicators for identifying attention strategies in older adults. These findings support the development of low-cost, noninvasive tools for cognitive-motor monitoring, rehabilitation, and fall prevention. Future research with larger samples and time-series models may improve generalizability and predictive accuracy.

1. Background

Aging involves gradual declines in nervous, muscular, and skeletal function, affecting both motor and cognitive control (1, 2). Consequently, older adults rely more on conscious movement regulation and are more susceptible to attentional fluctuations. Attentional focus in motor learning is typically categorized as internal focus, which directs attention to body movements, or external focus, which directs attention to movement effects in the environment (2, 3). Internal focus can disrupt automaticity, increase co-contraction, and reduce movement fluency (4-6), whereas external focus promotes more automatic control and improved performance, particularly in older adults (1, 2, 7, 8). These changes underscore the importance of understanding how attention affects gait, a fundamental motor skill.
Gait is a complex, dynamic task that requires coordination of the nervous, muscular, and skeletal systems and is strongly influenced by cognitive processes (9). Age-related sensory, muscular, and cognitive declines can impair gait stability and postural control, increasing fall risk (10, 11). Internal focus can disrupt natural gait patterns and stability, whereas external focus promotes smoother and more stable walking (6-8). These observations highlight the need for analyses beyond global spatiotemporal parameters, such as gait speed or step length (12, 13).
Examining kinematic and kinetic features, including joint angles, angular velocities, range of motion, and joint moments, provides more detailed insight into neuromotor mechanisms, including coordination, co-contraction, and postural control (6, 14, 15). These metrics are particularly relevant in older adults because of their increased vulnerability. The complexity of kinematic data often limits the applicability of classical statistical approaches, making machine learning an attractive alternative. Machine learning can capture nonlinear relationships and hidden patterns in movement data and has been successfully applied to predict visual attention (16) and classify mental states from electroencephalography (17). Decision tree-based algorithms, such as random forests and bagging trees, have demonstrated strong performance in identifying behavioral and motor patterns (18); for example, a decision tree predicted mental fatigue in older adults with nearly 93% accuracy using only three spatiotemporal features (19). Collectively, these findings suggest that machine learning is a powerful tool for exploring cognitive-motor interactions and attentional effects on movement.

2. Objectives

Although machine learning has been increasingly applied to motor control, evidence regarding its ability to distinguish attentional strategies during gait in older adults remains limited, particularly when different kinematic feature types, including angular displacement, angular velocity, or combinations thereof, are considered. This study aimed to evaluate whether models trained on joint kinematic features can differentiate internal from external attentional focus during gait in older adults. Based on prior evidence that attentional focus influences joint coordination and movement organization, we hypothesized that machine learning models could classify internal versus external focus above chance and that the type of kinematic features used, or their combination, could influence model performance.

3. Methods

3.1. Participants

Nineteen healthy older women (mean age: 60.7 ± 6.4 years; height: 157.7 ± 6.0 cm; weight: 72.5 ± 12.0 kg) voluntarily participated in this study. All participants provided written informed consent after receiving a full explanation of the study objectives and procedures. The inclusion criteria were good general health, the ability to walk independently on a flat surface, and the absence of neurological or musculoskeletal disorders that could affect gait patterns. Individuals with a history of lower-limb injury or surgery within the previous 6 months, active pain during movement, or observable balance problems were excluded. To minimize the potential effects of anxiety or unfamiliarity with the laboratory environment, participants performed several practice walking trials before data collection to promote stable and natural gait patterns.

3.2. Procedure

Kinematic gait data were collected using the OpenCap motion analysis system (20). Virtual markers were defined on anatomical landmarks, and movements were reconstructed in OpenSim. For each participant, kinematic data were extracted for 12 degrees of freedom (DOFs) in the sagittal plane, including pelvic anterior-posterior tilt, trunk flexion, hip flexion, knee flexion, ankle dorsiflexion, arm flexion, and elbow flexion. All data were normalized to 100% of the gait cycle to enable comparisons across participants. Each participant walked along a 5-meter straight path under two attentional conditions: internal focus and external focus. In each condition, six consecutive gait cycles were recorded. The order of attentional conditions was randomized to prevent potential learning or fatigue effects (Figure 1).
Gait analysis setup with two cameras and a calibration board based on the OpenCap system (left) and posterior view of gait analysis for one participant (right).
Figure 1.

Gait analysis setup with two cameras and a calibration board based on the OpenCap system (left) and posterior view of gait analysis for one participant (right).

3.3. Attentional Protocol

Two attentional strategies were evaluated. In the internal focus condition, participants attended to bodily sensations and movement cues, such as knee angle, foot-ground contact, and balance. In the external focus condition, attention was directed to environmental cues, including the walkway, a target point, and the interaction between movement and the environment. Verbal instructions were provided and briefly practiced before testing. To ensure adherence, a binary self-report response (Yes/No) was collected after each trial; trials marked "No" were excluded from analysis. This procedure ensured that only gait cycles performed with confirmed attentional compliance were included in the machine learning dataset.

3.4. Data Processing and Machine Learning Analysis

Only trials confirmed by the post-trial self-report manipulation check were included for feature extraction and subsequent machine learning analysis. Kinematic data for all 12 DOFs under both attentional strategies (internal focus = 0; external focus = 1) were processed. For each participant, condition, and repetition, four summary features were computed per DOF: mean, maximum, minimum, and range. This approach reduces dimensionality and mitigates overfitting by providing a compact and stable representation of joint behavior suitable for ensemble-based classification, although it sacrifices some within-cycle temporal dynamics. Each trial thus yielded a 48-feature vector (4 × 12), resulting in a combined dataset of 228 × 48 entries across all participants and conditions.
To explore the influence of different feature types, two additional datasets were prepared: One using angular velocity features and another combining displacement and velocity features, yielding a 228 × 96 matrix. Principal component analysis (PCA) was applied to reduce dimensionality and the feature-to-sample imbalance. The first three components were selected as model inputs to balance overfitting risk against the need to capture most of the variance.
For classification, a bagged decision trees algorithm was used, generating multiple trees on bootstrap samples and averaging outputs to reduce variance and improve stability. Participant-level splitting prevented data leakage: data from four participants (approximately 20%) were reserved for final testing, and the remaining participants (approximately 80%) were used for training and cross-validation.
To assess model robustness, repeated participant-wise cross-validation was performed by iteratively holding out four participants for testing and training on the remainder. This allowed evaluation of all possible leave-four-participants-out folds and computation of the mean and standard deviation of performance metrics, ensuring that the results were not biased by test-set composition.
Performance was interpreted relative to a chance-level accuracy of 50%. In addition to overall accuracy, sensitivity, specificity, balanced accuracy, and 95% confidence intervals (Wilson method) were calculated for the independent test set to enhance clinical relevance and statistical transparency.

4. Results

To evaluate the ability of a bagged decision trees algorithm to classify attentional strategy (internal vs external) from gait kinematics, three machine learning models were developed: one using angular displacement features, one using angular velocity features, and one combining both. All analyzed gait cycles were confirmed by post-trial self-report as compliant with the instructed attentional focus. Trials marked as noncompliant were excluded before feature extraction. PCA was applied to reduce dimensionality, and the first three principal components were used as model inputs. The variance explained by these components was 28.4%, 19.7%, and 9.7% for the displacement model (total, 57.8%); 44.3%, 15.2%, and 11.5% for the velocity model (total, 71.0%); and 50.6%, 21.5%, and 8.3% for the combined model (total, 80.4%).
Figure 2 presents the confusion matrices of the three models during the validation phase. As shown in the figure, the displacement-based model achieved the highest accuracy in correctly classifying internal and external attentional conditions, with substantially fewer type II errors than the other two models. The velocity and combined models showed poorer performance, misclassifying a larger number of samples during validation (Figure 2).
Confusion matrices of the displacement, velocity, and combined models during the validation phase.
Figure 2.

Confusion matrices of the displacement, velocity, and combined models during the validation phase.

Table 1 summarizes model performance on the independent test set. The angular displacement model showed the highest accuracy (76.2%; 95% CI: 61.7% - 86.2%), with 73.9% sensitivity, 78.9% specificity, and 76.4% balanced accuracy. The angular velocity and combined models achieved 61.9% accuracy, with balanced accuracies of 62.1% and 61.9%, respectively. Despite overlapping confidence intervals due to the modest test set (n = 42), the displacement model consistently outperformed the other models (Table 1).
Table 1.Performance Metrics of the Bagging Models During Validation and Testing a
MetricDisplacementVelocityCombined
Validation accuracy87.464.565.0
Test accuracy76.261.961.9
Mean accuracy (CV ± SD)75.9 ± 5.261.7 ± 4.861.6 ± 5.0
95% CI (test accuracy)61.7 - 86.246.8 - 75.046.8 - 75.0
Sensitivity73.960.961.9
Specificity78.963.261.9
Balanced accuracy76.462.161.9
Error cost (test)101616
Prediction speed (obs/s)~860~960~880
Training time (s)6.763.653.73

a Values are expressed as percent unless indicated.

Repeated participant-wise cross-validation confirmed these findings. The displacement model showed stable performance (mean accuracy, 75.9% ± 5.2%; balanced accuracy, 76.1% ± 5.0%), whereas the velocity and combined models showed lower and more variable performance, indicating that displacement-based predictions were robust across different test folds.
Figure 3 illustrates the receiver operating characteristic curves of the three models during the testing phase. The area under the curve was largest for the displacement model, indicating superior discriminative ability compared with the other models. In contrast, the receiver operating characteristic curves of the velocity and combined models were closer to the diagonal line, reflecting lower discriminatory power between the two attentional classes (Figure 3).
Receiver operating characteristic curves of the models in the testing phase.
Figure 3.

Receiver operating characteristic curves of the models in the testing phase.

Overall, the displacement-based model demonstrated acceptable performance, with a test accuracy of 76.2% for predicting attentional strategy from gait kinematic features. Given the complexity of biomechanical datasets and the limited sample size, this level of accuracy can be considered acceptable for a pilot investigation involving high-dimensional biomechanical data and a limited sample size.

5. Discussion

This study demonstrated that sagittal-plane joint kinematics, analyzed using a bagged decision trees algorithm, can moderately but consistently differentiate internal from external attentional strategies in older adults, with performance exceeding chance. After PCA reduction, the angular displacement model achieved approximately 76% test accuracy with a high receiver operating characteristic area, whereas the velocity-based and combined models performed near chance, with approximately 62% accuracy. These results indicate that joint displacement patterns contain meaningful information about attentional states, aligning with evidence that shifts in attentional focus can modify movement patterns and gait stability in aging populations (21, 22).
The superior performance of the displacement-based model likely reflects the stability of spatial joint configurations across gait cycles in older adults, whose walking patterns exhibit slower cadence and reduced variability. In contrast, angular velocity is more sensitive to transient timing shifts and sensor noise, and reduction to static summary statistics may have further attenuated its discriminative potential. Therefore, the observed advantage of displacement should be interpreted within the context of this feature-engineering framework rather than as definitive evidence of its intrinsic superiority. Future studies using time-series-aware representations, such as spline coefficients, wavelet transforms, or sequence-based models, may provide additional insight.
Combining displacement and velocity features did not improve performance, potentially because of collinearity between predictors, competition during model training, and the prioritization of variance over class separability in PCA. Many velocity-related cues are inherently temporal, and the static summary features used here may have failed to capture these dynamics. Consequently, the combined model provided no additional independent information beyond displacement alone.
These findings are consistent with motor control theories. Directing attention externally enhances automaticity and postural control, whereas an internal focus increases conscious control, restricts degrees of freedom, and produces stereotyped joint patterns, consistent with the constrained action hypothesis (23). Physiologically, an external focus promotes flexible joint organization, which displacement measures can effectively detect, whereas velocity features are more prone to transient fluctuations and noise (24).
From a practical perspective, these results suggest that joint displacement alone may serve as a low-cost, noninvasive indicator for monitoring attentional strategies in older adults. Such measures could support clinical and home-based applications, including gait training, fall risk assessment, rehabilitation, and real-time attentional feedback (20).
Despite careful design, several limitations should be noted. First, attentional adherence was verified only by post-trial self-report, not by objective neurophysiological measures; future studies could incorporate electroencephalography or cognitive probes to strengthen causal inference. The study included only 19 older women, limiting generalizability to men and the ability to fully capture between-subject variability. Only sagittal-plane kinematics were analyzed, whereas the frontal and transverse planes may contain additional attention-relevant information. Participants' cognitive status was not formally assessed, which could confound attentional effects.
Methodologically, PCA was restricted to the first three components to reduce dimensionality and highlight overall patterns, but this restriction may have obscured subtle differences in individual joint motions or gait phases. The moderate test accuracy of the displacement-based model (76.2%) represents an improvement over chance but should be interpreted cautiously; future work should include baseline classifiers, larger samples, and post hoc analyses of feature contributions. Finally, data were collected during controlled level walking; therefore, generalizability to real-world environments remains to be investigated.

5.1. Conclusions

This study demonstrated that angular joint displacement features, particularly after dimensionality reduction, provide meaningful information about attentional states (internal vs external) during gait in older adults. A machine learning model based on these features accurately classified attentional strategies, whereas velocity-based and combined models showed weaker performance. These findings indicate that angular kinematics can serve as a practical, low-cost indicator for monitoring cognitive-motor interactions in older adults. Future research should include larger sample sizes, time-series-based models, and evaluations in real-world walking environments to enhance generalizability.

Footnotes

References

  • 1.
    de Melker Worms JLA, Stins JF, van Wegen EEH, Verschueren SMP, Beek PJ, Loram ID. Effects of attentional focus on walking stability in elderly. Gait Posture. 2017;55:94-99. [PubMed ID: 28433868]. https://doi.org/10.1016/j.gaitpost.2017.03.031.
  • 2.
    de Melker Worms JLA, Stins JF, van Wegen EEH, Loram ID, Beek PJ. Influence of focus of attention, reinvestment and fall history on elderly gait stability. Physiological Reports. 2017;5(1). e13061. [PubMed ID: 28077603]. [PubMed Central ID: PMC5256154]. https://doi.org/10.14814/phy2.13061.
  • 3.
    Scheibner HJ, Bogler C, Gleich T, Haynes JD, Bermpohl F. Internal and external attention and the default mode network. Neuroimage. 2017;148:381-389. [PubMed ID: 28110087]. https://doi.org/10.1016/j.neuroimage.2017.01.044.
  • 4.
    Wulf G, McNevin N, Shea CH. The automaticity of complex motor skill learning as a function of attentional focus. Q J Exp Psychol A. 2001;54(4):1143-1154. [PubMed ID: 11765737]. https://doi.org/10.1080/713756012.
  • 5.
    Wulf G, Shea C, Park JH. Attention and motor performance: Preferences for and advantages of an external focus. Res Q Exerc Sport. 2001;72(4):335-344. [PubMed ID: 11770783]. https://doi.org/10.1080/02701367.2001.10608970.
  • 6.
    Mak TCT, Young WR, Lam WK, Tse ACY, Wong TWL. The role of attentional focus on walking efficiency among older fallers and non-fallers. Age Ageing. 2019;48(6):811-816. [PubMed ID: 31579906]. [PubMed Central ID: PMC6814087]. https://doi.org/10.1093/ageing/afz113.
  • 7.
    Mak TCT, Young WR, Chan DCL, Wong TWL. Gait stability in older adults during level-ground walking: the attentional focus approach. J Gerontol B Psychol Sci Soc Sci. 2020;75(2):274-281. [PubMed ID: 30299520]. https://doi.org/10.1093/geronb/gby115.
  • 8.
    Mak TCT, Ng SSM, Chan DCL, Wong TWL. The influence of attentional focus on gait stability and conscious movement processing during challenging walking conditions in older adults. J Gerontol B Psychol Sci Soc Sci. 2025;80(6). gbaf059. [PubMed ID: 40117215]. [PubMed Central ID: PMC12070263]. https://doi.org/10.1093/geronb/gbaf059.
  • 9.
    Wulf G. Attentional focus and motor learning: a review of 15 years. Int Rev Sport Exerc Psychol. 2013;6(1):77-104. https://doi.org/10.1080/1750984X.2012.723728.
  • 10.
    Shkuratova N, Morris ME, Huxham F. Effects of age on balance control during walking. Arch Phys Med Rehabil. 2004;85(4):582-588. [PubMed ID: 15083433]. https://doi.org/10.1016/j.apmr.2003.06.021.
  • 11.
    Verghese J, LeValley A, Hall CB, Katz MJ, Ambrose AF, Lipton RB. Epidemiology of gait disorders in community-residing older adults. J Am Geriatr Soc. 2006;54(2):255-261. [PubMed ID: 16460376]. [PubMed Central ID: PMC1403740]. https://doi.org/10.1111/j.1532-5415.2005.00580.x.
  • 12.
    Kim T, Jimenez-Diaz J, Chen J. The effect of attentional focus in balancing tasks: A systematic review with meta-analysis. J Hum Sport Exerc. 2017;12(2):463-479. https://doi.org/10.14198/jhse.2017.122.22.
  • 13.
    da Silva GM, Bezerra MEC. External focus in long jump performance: A systematic review. Motor Control. 2020;25(1):136-149. [PubMed ID: 33207315]. https://doi.org/10.1123/mc.2020-0037.
  • 14.
    Raisbeck LD, Diekfuss JA, Grooms DR, Schmitz R. The effects of attentional focus on brain function during a gross motor task. J Sport Rehabil. 2019;29(4):441-447. [PubMed ID: 31629324]. https://doi.org/10.1123/jsr.2018-0026.
  • 15.
    Richer N, Ly K, Fortier N, Lajoie Y. Absence of ankle stiffening while standing in focus and cognitive task conditions in older adults. J Mot Behav. 2020;52(2):167-174. [PubMed ID: 30961472]. https://doi.org/10.1080/00222895.2019.1599808.
  • 16.
    Chakraborty P, Yousuf MA, Rahman S, editors. Predicting level of visual focus of human's attention using machine learning approaches. Proceedings of International Conference on Trends in Computational and Cognitive Engineering:. Proceedings of International Conference on Trends in Computational and Cognitive Engineering: Proceedings of TCCE. 2020. p. 683-694.
  • 17.
    Acı Çİ, Kaya M, Mishchenko Y. Distinguishing mental attention states of humans via an EEG-based passive BCI using machine learning methods. Expert Syst Appl. 2019;134:153-166. https://doi.org/10.1016/j.eswa.2019.05.057.
  • 18.
    Yang J, Sui H, Jiao R, Zhang M, Zhao X, Wang L, et al. Random-forest-algorithm-based applications of the basic characteristics and serum and imaging biomarkers to diagnose mild cognitive impairment. Curr Alzheimer Res. 2022;19(1):76-83. [PubMed ID: 35088670]. [PubMed Central ID: PMC9189735]. https://doi.org/10.2174/1567205019666220128120927.
  • 19.
    Haj Lotfalian M, Samadi H, Abootalebi V. Main features for detecting mental fatigue in elderly gait: A machine learning approach. J Motor Control Learn. 2025;7(7). https://doi.org/10.5812/jmcl-161864.
  • 20.
    Uhlrich SD, Falisse A, Kidziński Ł, Muccini J, Ko M, Chaudhari AS, et al. OpenCap: Human movement dynamics from smartphone videos. PLoS Comput Biol. 2023;19(10). e1011462. [PubMed ID: 37856442]. [PubMed Central ID: PMC10586693]. https://doi.org/10.1371/journal.pcbi.1011462.
  • 21.
    McGibbon CA, Krebs DE. Age-related changes in lower trunk coordination and energy transfer during gait. J Neurophysiol. 2001;85(5):1923-1931. [PubMed ID: 11353009]. https://doi.org/10.1152/jn.2001.85.5.1923.
  • 22.
    Zhai M, Huang Y, Zhou S, Jin Y, Feng J, Pei C, et al. Effects of age-related changes in trunk and lower limb range of motion on gait. BMC Musculoskelet Disord. 2023;24(1). 234. [PubMed ID: 36978129]. [PubMed Central ID: PMC10044394]. https://doi.org/10.1186/s12891-023-06301-4.
  • 23.
    Kerrigan DC, Lee LW, Collins JJ, Riley PO, Lipsitz LA. Reduced hip extension during walking: healthy elderly and fallers versus young adults. Arch Phys Med Rehabil. 2001;82(1):26-30. [PubMed ID: 11239282]. https://doi.org/10.1053/apmr.2001.18584.
  • 24.
    Gimmon Y, Riemer R, Rashed H, Shapiro A, Debi R, Kurz I, et al. Age-related differences in pelvic and trunk motion and gait adaptability at different walking speeds. J Electromyogr Kinesiol. 2015;25(5):791-799. [PubMed ID: 26091623]. https://doi.org/10.1016/j.jelekin.2015.05.003.

Crossmark
Crossmark
Checking
Share on
Cited by
Metrics

Purchasing Reprints

  • Copyright Clearance Center (CCC) handles bulk orders for article reprints for Brieflands. To place an order for reprints, please click here (   https://www.copyright.com/landing/reprintsinquiryform/ ). Clicking this link will bring you to a CCC request form where you can provide the details of your order. Once complete, please click the ‘Submit Request’ button and CCC’s Reprints Services team will generate a quote for your review.
Search Relations

Author(s):

Related Articles