Deciphering risk factors for severe postherpetic neuralgia in patients with herpes zoster: an interpretable machine learning approach

Reg Anesth Pain Med. 2025 Jan 8:rapm-2024-106003. doi: 10.1136/rapm-2024-106003. Online ahead of print.

Abstract

Introduction: Postherpetic neuralgia (PHN) is a common complication of herpes zoster (HZ). This study aimed to use a large real-world electronic medical records database to determine the optimal machine learning model for predicting the progression to severe PHN and to identify the associated risk factors.

Methods: We analyzed the electronic medical records of 23,326 patients diagnosed with HZ from January 2010 to June 2020. PHN was defined as pain persisting for ≥90 days post-HZ, based on diagnostic and prescription codes. Five machine learning algorithms were compared with select the optimal predictive model and a subsequent risk factor analysis was conducted.

Results: Of the 23,326 patients reviewed, 8,878 met the eligibility criteria for the HZ cohort. Among these, 801 patients (9.0%) progressed to severe PHN. Among the various machine learning approaches, XGBoost-an approach that combines multiple decision trees to improve predictive accuracy-performed the best in predicting outcomes (F1 score, 0.351; accuracy, 0.900; area under the receiver operating characteristic curve, 0.787). Using this model, we revealed eight major risk factors: older age, female sex, history of shingles and cancer, use of immunosuppressants and antidepressants, intensive initial pain, and the neutrophil-to-lymphocyte ratio. When patients were categorized into low-risk and high-risk groups based on the predictive model, PHN was seven times more likely to occur in the high-risk group (p<0.001).

Conclusions: Leveraging machine learning analysis, this study identifies an optimal model for predicting severe PHN and highlights key associated risk factors. This model will enable the establishment of more proactive treatments for high-risk patients, potentially mitigating the progression to severe PHN.

Keywords: CHRONIC PAIN; Neuralgia; Pain Measurement; Quality Improvement.