Machine Learning Approaches for Chronic Pain Classification and Management: A Comparative Analysis Using the NHANES Dataset

Authors

  • Muhammad Umer Istiaq International Collaborative Research Group, Lahore, Pakistan.
  • Sehrush Seemab International Collaborative Research Group, Lahore, Pakistan.
  • Imran Ahmad Riphah International University, Malakand Campus, Lower Dir, Pakistan.
  • Hafiz Muneeb Ahmad International Institute of Technology, Culture and Health Sciences, Gujranwala, Pakistan.
  • Sadaf Ayesha Riphah International University, Lahore Campus, Lahore, Pakistan.
  • Sunbal Faraz Hayat Pakistan Navy, Islamabad, Pakistan.
  • Sheraz Ahmad Iqra National University, Peshawar, Pakistan.

DOI:

https://doi.org/10.56979/1102/2026/1425

Keywords:

Chronic Pain, Machine Learning, NHANES, Classification, Random Forest, XGBoost, Artificial Neural Network, Support Vector Machine, Explainable AI, Feature Importance

Abstract

Chronic pain affects over 30% of the global population, representing a major socio-economic and clinical burden. Current pain assessment is largely subjective, and machine learning (ML) offers a data-driven alternative for classifying chronic pain severity. This study evaluated five supervised ML algorithms (Logistic Regression, Random Forest, Support Vector Machine, XGBoost, and an Artificial Neural Network) for classifying chronic musculoskeletal pain severity (mild, moderate, severe) using pooled NHANES data (2015–2016 and 2017–2018), yielding an analytic sample of 9,971 adults, of whom 2,890 met a physician-diagnosed case definition based on arthritis and/or gout. Eight clinically relevant features spanning physiological, psychological, and behavioral domains were engineered, and models were evaluated using accuracy, AUC-ROC, macro F1-score, and Matthews correlation coefficient (MCC). XGBoost and Random Forest achieved the highest cross-validation accuracy (47.9% and 46.9%), significantly outperforming the ANN and simpler baselines, though the ANN achieved the highest macro F1-score and MCC on the held-out test set. Additional gradient-boosting variants, a deep neural network, and an explainability analysis were also evaluated as robustness checks, with LightGBM achieving the best overall held-out performance and the deep neural network underperforming the tree-based ensembles. Sleep disturbance, age, depression severity, and BMI emerged as the most consistently informative predictors, though all effect sizes were modest. These findings indicate that routinely collected demographic and clinical covariates provide limited discriminative power for fine-grained chronic pain severity classification, underscoring the need for richer feature sets in future ML-based pain assessment tools.

Downloads

Published

2026-09-01

How to Cite

Muhammad Umer Istiaq, Sehrush Seemab, Imran Ahmad, Hafiz Muneeb Ahmad, Sadaf Ayesha, Sunbal Faraz Hayat, & Sheraz Ahmad. (2026). Machine Learning Approaches for Chronic Pain Classification and Management: A Comparative Analysis Using the NHANES Dataset. Journal of Computing & Biomedical Informatics, 11(02). https://doi.org/10.56979/1102/2026/1425

Issue

Section

Articles