A study published in Scientific Reports introduces a cost-effective, non-invasive method for detecting anxiety and depression using gait data and machine learning.
By analyzing how people walk—captured through accessible tools like the Microsoft Kinect—researchers developed a system that could support early detection and continuous mental health monitoring, particularly in young adults. The approach offers an objective alternative to traditional assessments, addressing key challenges like cost, subjectivity, and scalability.
Study: Recognition of anxiety and depression using gait data recorded by the kinect sensor: a machine learning approach with data augmentation. Image Credit: SewCreamStudio/Shutterstock.com
Background
Mental health conditions such as depression and anxiety are known to influence how we move. Previous research has identified changes in gait—like slower walking speed, reduced step length, and altered cadence—in individuals with affective disorders. These motor patterns can serve as behavioral markers of emotional states.
While several studies have used wearable sensors to explore this connection, devices like accelerometers or IMUs can be intrusive or expensive. More recently, markerless motion capture systems such as the Microsoft Kinect have made it easier to collect accurate gait data in natural, unobtrusive ways. Machine learning models have also been applied to predict mental health status from gait features, but many earlier efforts were limited by small sample sizes, subjective labels, or lab-only testing environments.
This study aims to overcome those limitations by validating gait-based classification models in a young, healthy population, using affordable technology and robust machine learning techniques.
The Study
Fifty healthy participants aged 19 to 27—mostly university students—were recruited for the study. All were screened to rule out any neurological, musculoskeletal, or psychiatric conditions, and none were taking medication that might affect gait.
Participants completed two standardized mental health questionnaires: the Beck Depression Inventory-II (BDI-II) and the General Anxiety Disorder-7 (GAD-7). Their gait was then recorded in a lab setting using a Microsoft Kinect sensor.
Researchers extracted spatiotemporal gait features such as step length, stride length, walking speed, cadence, and step width variability. Since the dataset showed class imbalance, especially fewer cases at higher severity levels, data augmentation techniques were applied to help balance the training data and improve model reliability.
Several machine learning models were tested, including deep neural networks, support vector machines, naïve Bayes classifiers, and linear discriminant analysis. The models were trained and validated using a ten-fold cross-validation strategy, and hyperparameters were fine-tuned to optimize performance. Evaluation metrics included accuracy, precision, F1-score, and ROC curve analysis.
Results and Discussion
The models were able to classify depression levels with around 87 % accuracy and anxiety with about 62 % accuracy. The higher performance in detecting depression is consistent with earlier studies showing more pronounced gait-related changes in individuals with depressive symptoms. Anxiety-related gait patterns were found to be subtler, which, along with class imbalance, may explain the lower accuracy.
Key gait features such as step speed and gait cycle duration varied significantly between participants with differing depression scores. Slower walking speed and shorter steps were common in individuals with higher depression levels. While anxiety-related differences were less distinct, the use of data augmentation helped improve model performance.
Among the models tested, deep neural networks and support vector machines consistently performed best, especially when combined with fine-tuning and augmented training data. The findings suggest these methods could be viable for use in real-world, non-clinical settings.
Conclusion
This study supports the growing view that gait patterns can serve as reliable indicators of mental health. By using affordable motion-capture technology and machine learning, the researchers demonstrated a scalable, non-intrusive approach for detecting depression—and to a lesser extent, anxiety—among young adults.
Such tools could eventually complement traditional mental health assessments, particularly in settings where continuous monitoring is needed but clinical resources are limited. As interest grows in digital mental health solutions, gait analysis may offer a practical piece of the puzzle.
Journal Reference
Shoryabi M., Hajipour A., et al. (2025). Recognition of anxiety and depression using gait data recorded by the kinect sensor: a machine learning approach with data augmentation. Scientific Reports 15, 22489. DOI: 10.1038/s41598-025-06535-3, https://www.nature.com/articles/s41598-025-06535-3