A Metaheuristic-Optimized Deep Learning Framework for Accurate
Classification of Obsessive–Compulsive Disorder Using Clinical Data
Based on the Ninja Optimization Algorithm
Safaa Zaman1,*, El-Sayed M. El-Kenawy2,3
1Information sciences department , College of life sciences , Kuwait University, Kuwait
2Department of Communications and Electronics, Delta Higher Institute of Engineering and Technology,
Mansoura 35111, Egypt
3Jadara Research Center, Jadara University, Irbid 21110, Jordan
Emails: S.3zaman@ku.edu.kw; skenawy@ieee.org
Abstract
The growing prevalence and clinical complexity of Obsessive–Compulsive Disorder (OCD) motivate the need
for reliable, data-driven decision-support systems capable of improving diagnostic accuracy and robustness
beyond traditional assessment methods. In this study, we propose an optimized deep learning framework that
integrates a Deep Learning framework distilled by Gradient Boosting Decision Trees (DeepGBM) with a novel
metaheuristic optimizer, the Ninja Optimization Algorithm (NiOA), to enhance OCD-related classification
using structured demographic and clinical data. The main contribution of this work lies in the design of a
unified optimization pipeline in which NiOA is employed for automated hyperparameter tuning of DeepGBM,
and in the comprehensive comparison of this approach against baseline deep learning models and alternative
metaheuristic optimizers, including Multiverse Optimization (MVO), Bat Algorithm (BA), and Particle
Swarm Optimization (PSO). Experimental evaluation demonstrates that, at the baseline stage, DeepGBM
outperforms Artificial Neural Networks (ANN), Convolutional Neural Networks (CNN), and Bidirectional
Long Short-Term Memory networks (BiLSTM), achieving an accuracy of 0.8970 and an F-score of 0.8935.
Following optimization, the proposed NiOA+DeepGBM framework achieves substantial performance gains,
reaching an accuracy of 0.9779, sensitivity of 0.9763, specificity of 0.9793, and an F-score of 0.9770,
consistently surpassing MVO+DeepGBM, BA+DeepGBM, and PSO+DeepGBM across all evaluation metrics.
These results confirm the superior capability of NiOA in navigating complex hyperparameter spaces and
enhancing both predictive accuracy and generalization. The implications of this work are significant for
intelligent mental health assessment, as the proposed NiOA-optimized DeepGBM model offers a robust,
clinically relevant decision-support tool that can assist clinicians in improving diagnostic reliability, reducing
uncertainty, and supporting the development of scalable, AI-driven mental healthcare systems.
Keywords: Obsessive–Compulsive Disorder; DeepGBM; Ninja Optimization Algorithm; Metaheuristic
Optimization; Clinical Decision Support Systems