A supervised machine-learning algorithm predicts intraoperative CSF leak in endoscopic transsphenoidal surgery for pituitary adenomas

J Neurosurg Sci. 2023 Aug;67(4):393-407. doi: 10.23736/S0390-5616.21.05295-4. Epub 2021 Aug 3.

Abstract

Background: Despite advances in endoscopic transnasal transsphenoidal surgery (E-TNS) for pituitary adenomas (PAs), cerebrospinal fluid (CSF) leakage remains a life-threatening complication predisposing to major morbidity and mortality. In the current study we developed a supervised ML model able to predict the risk of intraoperative CSF leakage by comparing different machine learning (ML) methods and explaining the functioning and the rationale of the best performing algorithm.

Methods: A retrospective cohort of 238 patients treated via E-TNS for PAs was selected. A customized pipeline of several ML models was programmed and trained; the best five models were tested on a hold-out test and the best classifier was then prospectively validated on a cohort of 35 recently treated patients.

Results: Intraoperative CSF leak occurred in 54 (22,6%) of 238 patients. The most important risk's predictors were: non secreting status, older age, x-, y- and z-axes diameters, ostedural invasiveness, volume, ICD and R-ratio. The random forest (RF) classifier outperformed other models, with an AUC of 0.84, high sensitivity (86%) and specificity (88%). Positive predictive value and negative predictive value were 88% and 80% respectively. F1 score was 0.84. Prospective validation confirmed outstanding performance metrics: AUC (0.81), sensitivity (83%), specificity (79%), negative predictive value (95%) and F1 score (0.75).

Conclusions: The RF classifier showed the best performance across all models selected. RF models might predict surgical outcomes in heterogeneous multimorbid and fragile populations outperforming classical statistical analyses and other ML models (SVM, ANN etc.), improving patient management and reducing preventable morbidity and additional costs.

MeSH terms

  • Adenoma* / surgery
  • Cerebrospinal Fluid Leak / diagnosis
  • Cerebrospinal Fluid Leak / etiology
  • Cerebrospinal Fluid Leak / surgery
  • Endoscopy / adverse effects
  • Humans
  • Machine Learning
  • Pituitary Neoplasms* / complications
  • Pituitary Neoplasms* / surgery
  • Retrospective Studies