Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Wednesday, July 01, 2020 at 8:00 PM to 10:00 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?

Accepted for/Published in: JMIR Mental Health

Date Submitted: Feb 1, 2025
Date Accepted: Jul 17, 2025

The final, peer-reviewed published version of this preprint can be found here:

Explainable AI for Depression Detection and Severity Classification From Activity Data: Development and Evaluation Study of an Interpretable Framework

Ahmed I, Brahmacharimayum A, Ali RH, Khan TA, Ahmad MO

Explainable AI for Depression Detection and Severity Classification From Activity Data: Development and Evaluation Study of an Interpretable Framework

JMIR Ment Health 2025;12:e72038

DOI: 10.2196/72038

PMID: 40934462

PMCID: 12425426

Explainable AI for Depression Detection and Severity Classification from Activity Data

  • Iftikhar Ahmed; 
  • Anushree Brahmacharimayum; 
  • Raja Hashim Ali; 
  • Talha Ali Khan; 
  • Muhammad Ovais Ahmad

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

Please cite as:

Ahmed I, Brahmacharimayum A, Ali RH, Khan TA, Ahmad MO

Explainable AI for Depression Detection and Severity Classification From Activity Data: Development and Evaluation Study of an Interpretable Framework

JMIR Ment Health 2025;12:e72038

DOI: 10.2196/72038

PMID: 40934462

PMCID: 12425426

Download PDF


Request queued. Please wait while the file is being generated. It may take some time.

© 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.