Feasibility of machine learning based predictive modelling of postoperative hyponatremia after pituitary surgery



Hyponatremia after pituitary surgery is a frequent finding with potential severe complications and the most common cause for readmission. Several studies have found parameters associated with postoperative hyponatremia, but no reliable specific predictor was described yet. This pilot study evaluates the feasibility of machine learning (ML) algorithms to predict postoperative hyponatremia after resection of pituitary lesions.


Retrospective screening of a prospective registry of patients who underwent transsphenoidal surgery for pituitary lesions. Hyponatremia within 30 days after surgery was the primary outcome. Several pre- and intraoperative clinical, procedural and laboratory features were selected to train different ML algorithms. Trained models were compared using common performance metrics. Final model was internally validated on the testing dataset.


From 207 patients included in the study, 44 (22%) showed a hyponatremia within 30 days postoperatively. Hyponatremic measurements peaked directly postoperatively (day 0–1) and around day 7. Bootstrapped performance metrics of different trained ML-models showed largest area under the receiver operating characteristic curve (AUROC) for the boosted generalized linear model (67.1%), followed by the Naïve Bayes classifier (64.6%). The discriminative capability of the final model was assessed by predicting on unseen dataset. Large AUROC (84.3%; 67.0–96.4), sensitivity (81.8%) and specificity (77.5%) with an overall accuracy of 78.4% (66.7–88.2) was reached.


Our trained ML-model was able to learn the complex risk factor interactions and showed a high discriminative capability on unseen patient data. In conclusion, ML-methods can predict postoperative hyponatremia and thus potentially reduce morbidity and improve patient safety.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2

Availability of data and material

Anonymized raw data files and custom-made code are available from the corresponding author upon reasonable request.


  1. 1.

    Little AS, Kelly DF, White WL, Gardner PA, Fernandez-Miranda JC, Chicoine MR, Barkhoudarian G, Chandler JP, Prevedello DM, Liebelt BD, Sfondouris J, Mayberg MR, Group TS (2019) Results of a prospective multicenter controlled study comparing surgical outcomes of microscopic versus fully endoscopic transsphenoidal surgery for nonfunctioning pituitary adenomas: the Transsphenoidal Extent of Resection (TRANSSPHER) Study. J Neurosurg. https://doi.org/10.3171/2018.11.jns181238

    Article  PubMed  Google Scholar 

  2. 2.

    Agam M, Wedemeyer MA, Carmichael JD, Weiss MH, Zada G (2017) 152 Complications associated with transsphenoidal pituitary surgery: experience of 1171 consecutive cases treated at a single tertiary care pituitary center. Neurosurgery 64:237–237. https://doi.org/10.1093/neuros/nyx417.152

    Article  Google Scholar 

  3. 3.

    Agam MS, Wedemeyer MA, Wrobel B, Weiss MH, Carmichael JD, Zada G (2018) Complications associated with microscopic and endoscopic transsphenoidal pituitary surgery: experience of 1153 consecutive cases treated at a single tertiary care pituitary center. J Neurosurg. https://doi.org/10.3171/2017.12.jns172318

    Article  PubMed  Google Scholar 

  4. 4.

    Patel KS, Shu Chen J, Yuan F, Attiah M, Wilson B, Wang MB, Bergsneider M, Kim W (2019) Prediction of post-operative delayed hyponatremia after endoscopic transsphenoidal surgery. Clin Neurol Neurosurg 182:87–91. https://doi.org/10.1016/j.clineuro.2019.05.007

    Article  PubMed  Google Scholar 

  5. 5.

    Hussain NS, Piper M, Ludlam WG, Ludlam WH, Fuller CJ, Mayberg MR (2013) Delayed postoperative hyponatremia after transsphenoidal surgery: prevalence and associated factors. J Neurosurg 119(6):1453–1460. https://doi.org/10.3171/2013.8.JNS13411

    Article  PubMed  Google Scholar 

  6. 6.

    Zada G, Liu CY, Fishback D, Singer PA, Weiss MH (2007) Recognition and management of delayed hyponatremia following transsphenoidal pituitary surgery. J Neurosurg 106(1):66–71. https://doi.org/10.3171/jns.2007.106.1.66

    CAS  Article  PubMed  Google Scholar 

  7. 7.

    Tomita Y, Kurozumi K, Inagaki K, Kameda M, Ishida J, Yasuhara T, Ichikawa T, Sonoda T, Otsuka F, Date I (2019) Delayed postoperative hyponatremia after endoscopic transsphenoidal surgery for pituitary adenoma. Acta Neurochir (Wien) 161(4):707–715. https://doi.org/10.1007/s00701-019-03818-3

    Article  Google Scholar 

  8. 8.

    Krogh J, Kistorp CN, Jafar-Mohammadi B, Pal A, Cudlip S, Grossman A (2018) Transsphenoidal surgery for pituitary tumours: frequency and predictors of delayed hyponatraemia and their relationship to early readmission. Eur J Endocrinol 178(3):247–253. https://doi.org/10.1530/EJE-17-0879

    CAS  Article  PubMed  Google Scholar 

  9. 9.

    Zoli M, Mazzatenta D, Faustini-Fustini M (2016) Transient delayed hyponatremia after transsphenoidal surgery: attempting to enlighten the epidemiology and management of a still-obscure complication. World Neurosurg 90:654–656. https://doi.org/10.1016/j.wneu.2016.02.015

    Article  PubMed  Google Scholar 

  10. 10.

    Barber SM, Liebelt BD, Baskin DS (2014) Incidence, etiology and outcomes of hyponatremia after transsphenoidal surgery: experience with 344 consecutive patients at a single tertiary center. J Clin Med 3(4):1199–1219. https://doi.org/10.3390/jcm3041199

    Article  PubMed  PubMed Central  Google Scholar 

  11. 11.

    Kinoshita Y, Tominaga A, Arita K, Sugiyama K, Hanaya R, Hama S, Sakoguchi T, Usui S, Kurisu K (2011) Post-operative hyponatremia in patients with pituitary adenoma: post-operative management with a uniform treatment protocol. Endocr J 58(5):373–379. https://doi.org/10.1507/endocrj.k10e-352

    CAS  Article  PubMed  Google Scholar 

  12. 12.

    Kristof RA, Rother M, Neuloh G, Klingmuller D (2009) Incidence, clinical manifestations, and course of water and electrolyte metabolism disturbances following transsphenoidal pituitary adenoma surgery: a prospective observational study. J Neurosurg 111(3):555–562. https://doi.org/10.3171/2008.9.JNS08191

    Article  PubMed  Google Scholar 

  13. 13.

    Hensen J, Henig A, Fahlbusch R, Meyer M, Boehnert M, Buchfelder M (1999) Prevalence, predictors and patterns of postoperative polyuria and hyponatraemia in the immediate course after transsphenoidal surgery for pituitary adenomas. Clin Endocrinol (Oxf) 50(4):431–439. https://doi.org/10.1046/j.1365-2265.1999.00666.x

    CAS  Article  Google Scholar 

  14. 14.

    Boscoe A, Paramore C, Verbalis JG (2006) Cost of illness of hyponatremia in the United States. Cost Eff Resour Alloc 4:10. https://doi.org/10.1186/1478-7547-4-10

    Article  PubMed  PubMed Central  Google Scholar 

  15. 15.

    Hollon TC, Parikh A, Pandian B, Tarpeh J, Orringer DA, Barkan AL, McKean EL, Sullivan SE (2018) A machine learning approach to predict early outcomes after pituitary adenoma surgery. Neurosurg Focus 45(5):E8. https://doi.org/10.3171/2018.8.FOCUS18268

    Article  PubMed  Google Scholar 

  16. 16.

    Cote DJ, Alzarea A, Acosta MA, Hulou MM, Huang KT, Almutairi H, Alharbi A, Zaidi HA, Algrani M, Alatawi A, Mekary RA, Smith TR (2016) Predictors and rates of delayed symptomatic hyponatremia after transsphenoidal surgery: a systematic review [corrected]. World Neurosurg 88:1–6. https://doi.org/10.1016/j.wneu.2016.01.022

    Article  PubMed  Google Scholar 

  17. 17.

    Deaver KE, Catel CP, Lillehei KO, Wierman ME, Kerr JM (2018) Strategies to reduce readmissions for hyponatremia after transsphenoidal surgery for pituitary adenomas. Endocrine 62(2):333–339. https://doi.org/10.1007/s12020-018-1656-7

    CAS  Article  PubMed  Google Scholar 

  18. 18.

    Jahangiri A, Wagner J, Tran MT, Miller LM, Tom MW, Kunwar S, Blevins L Jr, Aghi MK (2013) Factors predicting postoperative hyponatremia and efficacy of hyponatremia management strategies after more than 1000 pituitary operations. J Neurosurg 119(6):1478–1483. https://doi.org/10.3171/2013.7.JNS13273

    Article  PubMed  Google Scholar 

  19. 19.

    van Niftrik CHB, van der Wouden F, Staartjes VE, Fierstra J, Stienen MN, Akeret K, Sebok M, Fedele T, Sarnthein J, Bozinov O, Krayenbuhl N, Regli L, Serra C (2019) Machine learning algorithm identifies patients at high risk for early complications after intracranial tumor surgery: registry-based cohort study. Neurosurgery 85(4):E756–E764. https://doi.org/10.1093/neuros/nyz145

    Article  PubMed  Google Scholar 

  20. 20.

    Senders JT, Staples PC, Karhade AV, Zaki MM, Gormley WB, Broekman MLD, Smith TR, Arnaout O (2018) Machine learning and neurosurgical outcome prediction: a systematic review. World Neurosurg 109:476–486. https://doi.org/10.1016/j.wneu.2017.09.149

    Article  PubMed  Google Scholar 

  21. 21.

    Serra C, Burkhardt JK, Esposito G, Bozinov O, Pangalu A, Valavanis A, Holzmann D, Schmid C, Regli L (2016) Pituitary surgery and volumetric assessment of extent of resection: a paradigm shift in the use of intraoperative magnetic resonance imaging. Neurosurg Focus 40(3):E17. https://doi.org/10.3171/2015.12.FOCUS15564

    Article  PubMed  Google Scholar 

  22. 22.

    Maldaner N, Serra C, Tschopp O, Schmid C, Bozinov O, Regli L (2018) Modern management of pituitary adenomas: current state of diagnosis, treatment and follow-up. Praxis (Bern 1994) 107(15):825–835. https://doi.org/10.1024/1661-8157/a003035

    Article  Google Scholar 

  23. 23.

    Chawla NV, Bowyer KW, Hall LO, Kegelmeyer WP (2002) SMOTE: synthetic minority over-sampling technique. J Artif Int Res 16(1):321–357

    Google Scholar 

  24. 24.

    Menardi G, Torelli N (2014) Training and assessing classification rules with imbalanced data. Data Min Knowl Disc 28(1):92–122. https://doi.org/10.1007/s10618-012-0295-5

    Article  Google Scholar 

  25. 25.

    Knosp E, Steiner E, Kitz K, Matula C (1993) Pituitary adenomas with invasion of the cavernous sinus space: a magnetic resonance imaging classification compared with surgical findings. Neurosurgery 33(4):610–617. https://doi.org/10.1227/00006123-199310000-00008

    CAS  Article  PubMed  Google Scholar 

  26. 26.

    Hardy J, Vezina JL (1976) Transsphenoidal neurosurgery of intracranial neoplasm. Adv Neurol 15:261–273

    CAS  PubMed  Google Scholar 

  27. 27.

    Serra C, Staartjes VE, Maldaner N, Muscas G, Akeret K, Holzmann D, Soyka MB, Schmid C, Regli L (2018) Predicting extent of resection in transsphenoidal surgery for pituitary adenoma. Acta Neurochir (Wien) 160(11):2255–2262. https://doi.org/10.1007/s00701-018-3690-x

    Article  Google Scholar 

  28. 28.

    Samuel AM, Grant RA, Bohl DD, Basques BA, Webb ML, Lukasiewicz AM, Diaz-Collado PJ, Grauer JN (2015) Delayed surgery after acute traumatic central cord syndrome is associated with reduced mortality. Spine (Phila Pa 1976) 40(5):349–356. https://doi.org/10.1097/brs.0000000000000756

    Article  Google Scholar 

  29. 29.

    Zada G, Woodmansee WW, Iuliano S, Laws ER (2010) Perioperative management of patients undergoing transsphenoidal pituitary surgery. Asian J Neurosurg 5(1):1–6

    PubMed  PubMed Central  Google Scholar 

  30. 30.

    Kelly DF, Laws ER Jr, Fossett D (1995) Delayed hyponatremia after transsphenoidal surgery for pituitary adenoma. Report of nine cases. J Neurosurg 83(2):363–367. https://doi.org/10.3171/jns.1995.83.2.0363

    CAS  Article  PubMed  Google Scholar 

  31. 31.

    Burke WT, Cote DJ, Iuliano SI, Zaidi HA, Laws ER (2018) A practical method for prevention of readmission for symptomatic hyponatremia following transsphenoidal surgery. Pituitary 21(1):25–31. https://doi.org/10.1007/s11102-017-0843-5

    Article  PubMed  Google Scholar 

  32. 32.

    Skinner DC (2009) Rethinking the stalk effect: a new hypothesis explaining suprasellar tumor-induced hyperprolactinemia. Med Hypotheses 72(3):309–310. https://doi.org/10.1016/j.mehy.2008.08.030

    CAS  Article  PubMed  Google Scholar 

  33. 33.

    Kruse A, Astrup J, Gyldensted C, Cold GE (1995) Hyperprolactinaemia in patients with pituitary adenomas. The pituitary stalk compression syndrome. Br J Neurosurg 9(4):453–457. https://doi.org/10.1080/02688699550041089

    CAS  Article  PubMed  Google Scholar 

  34. 34.

    Olson BR, Gumowski J, Rubino D, Oldfield EH (1997) Pathophysiology of hyponatremia after transsphenoidal pituitary surgery. J Neurosurg 87(4):499–507. https://doi.org/10.3171/jns.1997.87.4.0499

    CAS  Article  PubMed  Google Scholar 

  35. 35.

    Kovacs KJ, Foldes A, Sawchenko PE (2000) Glucocorticoid negative feedback selectively targets vasopressin transcription in parvocellular neurosecretory neurons. J Neurosci 20(10):3843–3852

    CAS  Article  Google Scholar 

  36. 36.

    Kalogeras KT, Nieman LK, Friedman TC, Doppman JL, Cutler GB Jr, Chrousos GP, Wilder RL, Gold PW, Yanovski JA (1996) Inferior petrosal sinus sampling in healthy subjects reveals a unilateral corticotropin-releasing hormone-induced arginine vasopressin release associated with ipsilateral adrenocorticotropin secretion. J Clin Invest 97(9):2045–2050. https://doi.org/10.1172/JCI118640

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  37. 37.

    Oelkers W (1989) Hyponatremia and inappropriate secretion of vasopressin (antidiuretic hormone) in patients with hypopituitarism. N Engl J Med 321(8):492–496. https://doi.org/10.1056/NEJM198908243210802

    CAS  Article  PubMed  Google Scholar 

  38. 38.

    Green HH, Harrington AR, Valtin H (1970) On the role of antidiuretic hormone in the inhibition of acute water diuresis in adrenal insufficiency and the effects of gluco- and mineralocorticoids in reversing the inhibition. J Clin Invest 49(9):1724–1736. https://doi.org/10.1172/JCI106390

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  39. 39.

    Kleeman CR, Czaczkes JW, Cutler R (1964) Mechanisms of impaired water excretion in adrenal and pituitary insufficiency. IV. Antidiuretic hormone in primary and secondary adrenal insufficiency. J Clin Invest 43:1641–1648. https://doi.org/10.1172/jci105039

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  40. 40.

    Fleseriu M, Hashim IA, Karavitaki N, Melmed S, Murad MH, Salvatori R, Samuels MH (2016) Hormonal replacement in hypopituitarism in adults: an endocrine society clinical practice guideline. J Clin Endocrinol Metab 101(11):3888–3921. https://doi.org/10.1210/jc.2016-2118

    CAS  Article  Google Scholar 

  41. 41.

    Amann K, Benz K (2013) Structural renal changes in obesity and diabetes. Semin Nephrol 33(1):23–33. https://doi.org/10.1016/j.semnephrol.2012.12.003

    Article  PubMed  Google Scholar 

  42. 42.

    Coiro V, Chiodera P (1987) Effect of obesity and weight loss on the arginine vasopressin response to insulin-induced hypoglycaemia. Clin Endocrinol (Oxf) 27(2):253–258. https://doi.org/10.1111/j.1365-2265.1987.tb01151.x

    CAS  Article  Google Scholar 

  43. 43.

    Kuhn M, Johnson K (2013) Applied predictive modeling, vol 26. Springer, Berlin

    Book  Google Scholar 

  44. 44.

    Senders JT, Arnaout O, Karhade AV, Dasenbrock HH, Gormley WB, Broekman ML, Smith TR (2018) Natural and artificial intelligence in neurosurgery: a systematic review. Neurosurgery 83(2):181–192. https://doi.org/10.1093/neuros/nyx384

    Article  PubMed  Google Scholar 

  45. 45.

    Staartjes VE, Serra C, Muscas G, Maldaner N, Akeret K, van Niftrik CHB, Fierstra J, Holzmann D, Regli L (2018) Utility of deep neural networks in predicting gross-total resection after transsphenoidal surgery for pituitary adenoma: a pilot study. Neurosurg Focus 45(5):E12. https://doi.org/10.3171/2018.8.FOCUS18243

    Article  PubMed  Google Scholar 

  46. 46.

    Staartjes VE, Zattra CM, Akeret K, Maldaner N, Muscas G, Bas van Niftrik CH, Fierstra J, Regli L, Serra C (2019) Neural network-based identification of patients at high risk for intraoperative cerebrospinal fluid leaks in endoscopic pituitary surgery. J Neurosurg. https://doi.org/10.3171/2019.4.jns19477

    Article  PubMed  Google Scholar 

  47. 47.

    Liu Y, Liu X, Hong X, Liu P, Bao X, Yao Y, Xing B, Li Y, Huang Y, Zhu H, Lu L, Wang R, Feng M (2019) Prediction of recurrence after transsphenoidal surgery for cushing’s disease: the use of machine learning algorithms. Neuroendocrinology 108(3):201–210. https://doi.org/10.1159/000496753

    CAS  Article  PubMed  Google Scholar 

Download references


No funding was received for this research

Author information



Corresponding author

Correspondence to Stefanos Voglis.

Ethics declarations

Conflict of interest

No Conflicts of Interest.

Ethical approval

All procedures performed in studies involving human participants were in accordance with the ethical standards of the institutional and local ethics review board and with the 1964 Helsinki declaration and its later amendments or comparable ethical standards.

Informed consent

Informed consent was obtained from all individual participants included in the study and data was treated according to the local ethical regulations and the Declaration of Helsinki.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary material 1 (PDF 18 kb)

Supplementary material 2 (PDF 16 kb)

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Voglis, S., van Niftrik, C.H.B., Staartjes, V.E. et al. Feasibility of machine learning based predictive modelling of postoperative hyponatremia after pituitary surgery. Pituitary 23, 543–551 (2020). https://doi.org/10.1007/s11102-020-01056-w

Download citation


  • Pituitary surgery
  • Adenoma
  • Hyponatremia
  • Sodium
  • Machine learning
  • Artificial intelligence