Accepted for/Published in: JMIR Mental Health
Date Submitted: Feb 1, 2025
Date Accepted: Jul 17, 2025
Explainable AI for Depression Detection and Severity Classification from Activity Data
ABSTRACT
Background:
Depression is one of the most prevalent mental health disorders globally, affecting approximately 280 million people and frequently going undiagnosed or misdiagnosed. The growing ubiquity of wearable devices enables continuous monitoring of activity levels, providing a new avenue for data-driven detection and severity assessment of depression. However, existing machine learning (ML) models often exhibit lower performance when distinguishing overlapping subtypes of depression and frequently lack explainability, an essential component for clinical acceptance.
Objective:
This study aimed to develop and evaluate an interpretable machine learning framework for detecting depression and classifying its severity using wearable-actigraphy data, while addressing common challenges such as imbalanced datasets and limited model transparency.
Methods:
We used the Depresjon dataset and applied Adaptive Synthetic Sampling (ADASYN) to mitigate class imbalance. We extracted multiple statistical features (e.g., PSD Mean, Autocorrelation) and demographic attributes (e.g., Age) from the raw activity data. Five ML algorithms (Logistic Regression, Support Vector Machines, Random Forest, XGBoost, and Neural Networks) were assessed via accuracy, precision, recall, F1-score, specificity, and Matthew’s correlation coefficient. We further employed Shapley Additive Explanations (SHAP) and Local Interpretable Model-agnostic Explanations (LIME) to elucidate prediction drivers.
Results:
XGBoost achieved the highest overall accuracy of 84.94% for binary classification and 85.91% for multi-class severity. SHAP and LIME revealed PSD Mean, Age, and Autocorrelation as top predictors, highlighting circadian disruptions’ role in depression.
Conclusions:
Our interpretable framework reliably identifies depressed versus non-depressed individuals and differentiates mild from moderate depression. The inclusion of SHAP and LIME provides transparent, clinically meaningful insights, emphasizing the potential of explainable AI to enhance early detection and intervention strategies in mental healthcare. Clinical Trial: NA
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.