A proposal for distinguishing between bacterial and viral meningitis using genetic programming and decision trees

  • Gianni D’Angelo
  • Raffaele Pilla
  • Carlo Tascini
  • Salvatore RamponeEmail author
Methodologies and Application


Meningitis is an inflammation of the protective membranes covering the brain and the spinal cord. Meningitis can have different causes, and discriminating between meningitis etiologies is still considered a hard task, especially when some specific clinical parameters, mostly derived from blood and cerebrospinal fluid analysis, are not completely available. Although less frequent than its viral version, bacterial meningitis can be fatal, especially when diagnosis is delayed. In addition, often unnecessary antibiotic and/or antiviral treatments are used as a solution, which is not cost or health effective. In this work, we address this issue through the use of machine learning-based methodologies. We consider two distinct cases. In one case, we take into account both blood and cerebrospinal parameters; in the other, we rely exclusively on the blood data. As a result, we have rules and formulas applicable in clinical settings. Both results highlight that a combination of the clinical parameters is required to properly distinguish between the two meningitis etiologies. The results on standard and clinical datasets show high performance. The formulas achieve 100% of sensitivity in detecting a bacterial meningitis.


Meningitis Meningitis etiology Bacterial meningitis Viral meningitis Genetic programming Symbolic regression Decision rules Machine learning Decision tree Neural network 


Compliance with ethical standards

Conflict of interest

Authors declare that they have no conflict of interest.

Ethical approval

All procedures performed in studies involving human participants were in accordance with the ethical standards of the institutional and/or national research committee 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.


  1. Affenzeller M (2009) Genetic algorithms and genetic programming: modern concepts and practical applications. CRC Press, Boca RatonzbMATHGoogle Scholar
  2. Attia J, Hatala R et al (1999) The rational clinical examination. Does this adult patient have acute meningitis? JAMA 282(2):175–181Google Scholar
  3. Bansal R, Gaur N et al (2016). Outlier detection: applications and techniques in data mining. In: 2016 6th international conference: cloud system and big data engineering (Confluence)Google Scholar
  4. Bonadio WA (1992) The cerebrospinal fluid: physiologic aspects and alterations associated with bacterial meningitis. Pediatr Infect Dis J 11(6):423–431Google Scholar
  5. Bonsu BK, Harper MH (2004) Differentiating acute bacterial meningitis from acute viral meningitis among children with cerebrospinal fluid pleocytosis: a multivariable regression model. Pediatr Infect Dis J 23(6):7Google Scholar
  6. Chalmers AC, Aprill BS et al (1990) Cerebrospinal fluid and human immunodeficiency virus: findings in healthy, asymptomatic, seropositive men. Arch Intern Med 150(7):1538–1540Google Scholar
  7. Choi C (2001) Bacterial meningitis in aging adults. Clin Infect Dis 33(8):1380–1385Google Scholar
  8. Chonmaitree T, Baldwin CD et al (1989) Role of the virology laboratory in diagnosis and management of patients with central nervous system disease. Clin Microbiol Rev 2(1):1–14Google Scholar
  9. Connolly KJ, Hammer SM (1990) The acute aseptic meningitis syndrome. Infect Dis Clin N Am 4(4):599–622Google Scholar
  10. Conrad AJ, Schmid P et al (1995) Quantifying HIV-1 RNA using the polymerase chain reaction on cerebrospinal fluid and serum of seropositive individuals with and without neurologic abnormalities. J Acquir Immune Defic Syndr Hum Retrovirol 10(4):425–435Google Scholar
  11. Curtis S, Stobart K et al (2010) Clinical features suggestive of meningitis in children: a systematic review of prospective data. Pediatrics 126(5):952–960Google Scholar
  12. D’Angelo G, Rampone S (2014a) Diagnosis of aerospace structure defects by a HPC implemented soft computing algorithm. In: 2014 IEEE international workshop on metrology for aerospace (Metroaerospace). pp 408–412Google Scholar
  13. D’Angelo G, Rampone S (2014b) Towards a HPC-oriented parallel implementation of a learning algorithm for bioinformatics applications. BMC Bioinform 15:S2Google Scholar
  14. D’Angelo G, Rampone S (2015) Shape-based defect classification for non destructive testing. In: 2015 2nd IEEE international workshop on metrology for aerospace (Metroaerospace). pp 406–410Google Scholar
  15. D’Angelo G, Rampone S, et al (2015a) An artificial intelligence-based trust model for pervasive computing. In: 2015 10th international conference on P2p, parallel, grid, cloud and internet computing (3pgcic). pp 701–706Google Scholar
  16. D’angelo G, Palmieri F et al (2015) An uncertainty-managing batch relevance-based approach to network anomaly detection. Appl Soft Comput 36:408–418Google Scholar
  17. D’Angelo G, Rampone S (2016) Feature extraction and soft computing methods for aerospace structure defect classification. Measurement 85:192–209Google Scholar
  18. D’Angelo G, Laracca M et al (2016a) Automated eddy current non-destructive testing through low definition lissajous figures. In: 2016 IEEE metrology for aerospace (Metroaerospace). pp 280–285Google Scholar
  19. D’Angelo G, Rampone S et al (2016b) Developing a trust model for pervasive computing based on Apriori association rules learning and Bayesian classification. Soft Comput 21:6297–6315Google Scholar
  20. D’Angelo G, Pilla R et al (2017) Toward a soft computing-based correlation between oxygen toxicity seizures and hyperoxic hyperpnea. Soft Comput 22:1–7Google Scholar
  21. Davis J, Goadrich M (2006) The relationship between precision-recall and ROC curves. In: Proceedings of the 23rd international conference on Machine learning. ACM: Pittsburgh, pp 233–240Google Scholar
  22. Dubos F, Lamotte B et al (2006) Clinical decision rules to distinguish between bacterial and aseptic meningitis. Arch Dis Child 91(8):647–650Google Scholar
  23. Duffy J, Engle-Warnick J (2002) Using symbolic regression to infer strategies from experimental data. In: Chen S-H (ed) Evolutionary computation in economics and finance. Physica-Verlag, Heidelberg, pp 61–82Google Scholar
  24. Durand ML, Calderwood SB et al (1993) Acute bacterial meningitis in adults: a review of 493 episodes. N Engl J Med 328(1):21–28Google Scholar
  25. Echevarria JM, Casas I et al (1994) Detection of varicella-zoster virus-specific DNA sequences in cerebrospinal fluid from patients with acute aseptic meningitis and no cutaneous lesions. J Med Virol 43(4):331–335Google Scholar
  26. Feigin RD, McCracken GH Jr et al (1992) Diagnosis and management of meningitis. Pediatr Infect Dis J 11(9):785–814Google Scholar
  27. Francois O, Leray P (2007) Generation of incompliete test-data using Bayesinan networks. In: 2007 international joint conference on neural networksGoogle Scholar
  28. Freedman SB, Marrocco A, Pirie J, Dick PT (2001) Predictors of bacterial meningitis in the era after Haemophilus influenzae. Arch Pediatr Adolesc Med 155(12):7Google Scholar
  29. Gaschignard J, Levy C et al (2011) Neonatal bacterial meningitis: 444 cases in 7 years. Pediatr Infect Dis J 30(3):212–217Google Scholar
  30. Geiseler PJ, Nelson KE et al (1980) Community-acquired purulent meningitis: a review of 1316 cases during the antibiotic era, 1954–1976. Rev Infect Dis 2(5):725–745Google Scholar
  31. Glimaker M, Johansson B et al (2015) Adult bacterial meningitis: earlier treatment and improved outcome following guideline revision promoting prompt lumbar puncture. Clin Infect Dis 60(8):1162–1169Google Scholar
  32. Gnann JW (2004) Meningitis and encephalitis caused by mumps virus. In: Sheld WM, Whitley RJ, Marra CM (eds) Infections of the central nervous system. 3rd edn. Lippincott Williams & Wilkins, Philadelphia, pp. 231–241Google Scholar
  33. Gorse GJ, Thrupp LD et al (1984) Bacterial meningitis in the elderly. Arch Intern Med 144(8):1603–1607Google Scholar
  34. Gray LD, Fedorko DP (1992) Laboratory diagnosis of bacterial meningitis. Clin Microbiol Rev 5(2):130–145Google Scholar
  35. Guerra-Romero L, Tauber MG et al (1992) Lactate and glucose concentrations in brain interstitial fluid, cerebrospinal fluid, and serum during experimental pneumococcal meningitis. J Infect Dis 166(3):546–550Google Scholar
  36. Hansson LO, Axelsson G et al (1993) Serum C-reactive protein in the differential diagnosis of acute meningitis. Scand J Infect Dis 25(5):625–630Google Scholar
  37. Hasbun R, Abrahams J et al (2001) Computed tomography of the head before lumbar puncture in adults with suspected meningitis. N Engl J Med 345(24):1727–1733Google Scholar
  38. Hautamaki V, Karkkainen I et al (2004) Outlier detection using k-nearest neighbour graph. In: Proceedings of the 17th international conference on pattern recognition, 2004. ICPR 2004Google Scholar
  39. Hayden RT, Frenkel LD (2000) More laboratory testing: greater cost but not necessarily better. Pediatr Infect Dis J 19(4):290–292Google Scholar
  40. Hollander H, Levy JA (1987) Neurologic abnormalities and recovery of human immunodeficiency virus from cerebrospinal fluid. Ann Intern Med 106(5):692–695Google Scholar
  41. Hollander H, Stringari S (1987) Human immunodeficiency virus-associated meningitis: clinical course and correlations. Am J Med 83(5):813–816Google Scholar
  42. Hussein AS, Shafran SD (2000) Acute bacterial meningitis in adults: a 12-year review. Medicine (Baltimore) 79(6):360–368Google Scholar
  43. Huy NT, Thao NT et al (2010) Cerebrospinal fluid lactate concentration to distinguish bacterial from aseptic meningitis: a systemic review and meta-analysis. Crit Care 14(6):R240Google Scholar
  44. Jaeger F, Leroy J et al (2000) Validation of a diagnosis model for differentiating bacterial from viral meningitis in infants and children under 3.5 years of age. Eur J Clin Microbiol Infect Dis 19(6):418–421Google Scholar
  45. Jain AK, Mao J et al (1996) Artificial neural networks: a tutorial. Computer 29(3):31–44Google Scholar
  46. Kang H (2013) The prevention and handling of the missing data. Korean J Anesthesiol 64(5):402–406Google Scholar
  47. Kennedy DH, Fallon RJ (1979) Tuberculous meningitis. JAMA 241(3):264–268Google Scholar
  48. Kim KS (2010) Acute bacterial meningitis in infants and children. Lancet Infect Dis 10(1):32–42Google Scholar
  49. Kleine TO, Zwerenz P et al (2003) New and old diagnostic markers of meningitis in cerebrospinal fluid (CSF). Brain Res Bull 61(3):287–297Google Scholar
  50. Kohavi R (1995) A study of cross-validation and bootstrap for accuracy estimation and model selection. In: Proceedings of the 14th international joint conference on Artificial intelligence, vol 2. Morgan Kaufmann Publishers Inc., Montreal, pp 1137–1143Google Scholar
  51. Konar A (2000) Artificial intelligence and soft computing: behavioral and cognitive modeling of the human brain. CRC Press Inc., Boca RatonGoogle Scholar
  52. Koza JR (1992) Genetic programming: on the programming of computers by means of natural selection. MIT Press, CambridgezbMATHGoogle Scholar
  53. La Scolea LJ Jr., Dryja D (1984) Quantitation of bacteria in cerebrospinal fluid and blood of children with meningitis and its diagnostic significance. J Clin Microbiol 19(2):187–190Google Scholar
  54. Lewis DD (1998) Naive (Bayes) at forty: the independence assumption in information retrieval. In: Proceedings of the 10th European conference on machine learning, Springer, New York, pp 4–15Google Scholar
  55. Maxson S, Lewno MJ et al (1994) Clinical usefulness of cerebrospinal fluid bacterial antigen studies. J Pediatr 125(2):235–238Google Scholar
  56. McArthur JC (1987) Neurologic manifestations of AIDS. Medicine (Baltimore) 66(6):407–437Google Scholar
  57. Morales Casado MI, Moreno Alonso F et al (2016) Ability of procalcitonin to predict bacterial meningitis in the emergency department. Neurologia 31(1):9–17Google Scholar
  58. Mylonakis E, Hohmann EL et al (1998) Central nervous system infection with Listeria monocytogenes: 33 years’ experience at a general hospital and review of 776 episodes from the literature. Medicine (Baltimore) 77(5):313–336Google Scholar
  59. Ni H, Knight AI et al (1992) Polymerase chain reaction for diagnosis of meningococcal meningitis. Lancet 340(8833):1432–1434Google Scholar
  60. Nigrovic LE, Kuppermann N, Malley R (2002) Development and validation of a multivariable predictive model to distinguish bacterial from aseptic meningitis in children in the post-Haemophilus influenzae era. Pediatrics 110(4):8Google Scholar
  61. Pai M, Flores LL et al (2003) Diagnostic accuracy of nucleic acid amplification tests for tuberculous meningitis: a systematic review and meta-analysis. Lancet Infect Dis 3(10):633–643Google Scholar
  62. Pratt RD, Nichols S et al (1996) Virologic markers of human immunodeficiency virus type 1 in cerebrospinal fluid of infected children. J Infect Dis 174(2):288–293Google Scholar
  63. Quinlan JR (1993) C4.5: Programs for machine learning. Morgan Kaufmann Publishers Inc, BurlingtonGoogle Scholar
  64. Radstrom P, Backman A et al (1994) Detection of bacterial DNA in cerebrospinal fluid by an assay for simultaneous detection of Neisseria meningitidis, Haemophilus influenzae, and streptococci using a seminested PCR strategy. J Clin Microbiol 32(11):2738–2744Google Scholar
  65. Ramers C, Billman G et al (2000) Impact of a diagnostic cerebrospinal fluid enterovirus polymerase chain reaction test on patient management. JAMA 283(20):2680–2685Google Scholar
  66. Revett K (2006) A neural network based classifier for acute meningitis. In: Reljin B, Stankovic S (eds) Proceedings of 8th seminar on neural network applications in electrical engineering, NEUREL-2006, September 25–27 2006, IEEE, BelgradeGoogle Scholar
  67. Revett K, Gorunescu F et al (2006). A machine learning approach to differentiating bacterial from viral meningitisGoogle Scholar
  68. Romero JR (2002) Diagnosis and management of enteroviral infections of the central nervous system. Curr Infect Dis Rep 4(4):309–316Google Scholar
  69. Rotbart HA, Sawyer MH et al (1994) Diagnosis of enteroviral meningitis by using PCR with a colorimetric microwell detection assay. J Clin Microbiol 32(10):2590–2592Google Scholar
  70. Şahin DÖ, Ateş N et al (2016) Feature selection in text classification. In: 2016 24th signal processing and communication application conference (SIU)Google Scholar
  71. Sakushima K, Hayashino Y et al (2011) Diagnostic accuracy of cerebrospinal fluid lactate for differentiating bacterial meningitis from aseptic meningitis: a meta-analysis. J Infect 62(4):255–262Google Scholar
  72. Sánchez-Maroño N, Alonso-Betanzos A et al (2007) Filter methods for feature selection: a comparative study. In: Yin H, Tino P, Corchado E, Byrne W, Yao X (eds) Intelligent data engineering and automated learning—IDEAL 2007: 8th international conference, Birmingham, proceedings. Springer, Berlin, pp 178–187Google Scholar
  73. Saravolatz LD, Manzor O et al (2003) Broad-range bacterial polymerase chain reaction for early detection of bacterial meningitis. Clin Infect Dis 36(1):40–45Google Scholar
  74. Sawyer MH, Holland D et al (1994) Diagnosis of enteroviral central nervous system infection by polymerase chain reaction during a large community outbreak. Pediatr Infect Dis J 13(3):177–182Google Scholar
  75. Schlech WF 3rd, Ward JI et al (1985) Bacterial meningitis in the United States, 1978 through 1981: The National bacterial meningitis surveillance study. JAMA 253(12):1749–1754Google Scholar
  76. Schuchat A, Robinson K et al (1997) Bacterial meningitis in the United States in 1995: active surveillance team. N Engl J Med 337(14):970–976Google Scholar
  77. Searson DP (2015) GPTIPS 2: an open-source software platform for symbolic data mining. In: Gandomi AH et al (eds) Handbook of genetic programming applications, vol 22. Springer, New YorkGoogle Scholar
  78. Sessa J, Syed D (2016) Techniques to deal with missing data. In: 2016 5th international conference on electronic devices, systems and applications (ICEDSA)Google Scholar
  79. Shoji H, Honda Y et al (1992) Detection of varicella-zoster virus DNA by polymerase chain reaction in cerebrospinal fluid of patients with herpes zoster meningitis. J Neurol 239(2):69–70Google Scholar
  80. Sinner SW, Tunkel AR (2002) Approach to the diagnosis and management of tuberculous meningitis. Curr Infect Dis Rep 4(4):324–331Google Scholar
  81. Spanos A, Harrell FE Jr et al (1989) Differential diagnosis of acute meningitis: an analysis of the predictive value of initial observations. JAMA 262(19):2700–2707Google Scholar
  82. Sutinen J, Sombrero L et al (1998) Etiology of central nervous system infections in the Philippines and the role of serum C-reactive protein in excluding acute bacterial meningitis. Int J Infect Dis 3(2):88–93Google Scholar
  83. Taha A, Hegazy OM (2010) A proposed outliers identification algorithm for categorical data sets. In: 2010 the 7th international conference on informatics and systems (INFOS)Google Scholar
  84. Tarafdar K, Rao S et al (2001) Lack of sensitivity of the latex agglutination test to detect bacterial antigen in the cerebrospinal fluid of patients with culture-negative meningitis. Clin Infect Dis 33(3):406–408Google Scholar
  85. Tedder DG, Ashley R et al (1994) Herpes simplex virus infection as a cause of benign recurrent lymphocytic meningitis. Ann Intern Med 121(5):334–338Google Scholar
  86. Thigpen MC, Whitney CG et al (2011) Bacterial meningitis in the United States, 1998–2007. N Engl J Med 364(21):2016–2025Google Scholar
  87. Thwaites GE, Caws M et al (2004) Comparison of conventional bacteriology with nucleic acid amplification (amplified mycobacterium direct test) for diagnosis of tuberculous meningitis before and after inception of antituberculosis chemotherapy. J Clin Microbiol 42(3):996–1002Google Scholar
  88. Thwaites GE, Lan NT et al (2005) Effect of antituberculosis drug resistance on response to treatment and outcome in adults with tuberculous meningitis. J Infect Dis 192(1):79–88Google Scholar
  89. Tunkel AR (2001) Bacterial meningitis. Lippincott Williams & Wilkins, PhiladelphiaGoogle Scholar
  90. Tunkel AR, Hartman BJ et al (2004) Practice guidelines for the management of bacterial meningitis. Clin Infect Dis 39(9):1267–1284Google Scholar
  91. Tzanakaki G, Tsopanomichalou M et al (2005) Simultaneous single-tube PCR assay for the detection of Neisseria meningitidis, Haemophilus influenzae type b and Streptococcus pneumoniae. Clin Microbiol Infect 11(5):386–390Google Scholar
  92. van de Beek D, de Gans J et al (2004) Clinical features and prognostic factors in adults with bacterial meningitis. N Engl J Med 351(18):1849–1859Google Scholar
  93. Viallon A, Pouzet V et al (2000) Rapid diagnosis of the type of meningitis (bacterial or viral) by the assay of serum procalcitonin. Presse Med 29(11):584–588Google Scholar
  94. Viallon A, Botelho-Nevers E et al (2016) Clinical decision rules for acute bacterial meningitis: current insights. Open Access Emerg Med 8:7–16Google Scholar
  95. Vipin Kumar SM (2014) Feature selection: a literature review. Smart Comput Rev 4(3):19Google Scholar
  96. Wenger JD, Hightower AW et al (1990) Bacterial meningitis in the United States, 1986: report of a multistate surveillance study: the bacterial meningitis study group. J Infect Dis 162(6):1316–1323Google Scholar
  97. Witten IH, Frank E et al (2011) Data mining: practical machine learning tools and techniques. Morgan Kaufmann Publishers Inc, BurlingtonzbMATHGoogle Scholar
  98. Zugar A (2004) Tuberculosis of the central nervous system. Lippincott Williams & Wilkins, PhiladelphiaGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  1. 1.Department of Law, Economics, Management and Quantitative Methods (DEMM)University of SannioBeneventoItaly
  2. 2.External PharmacySt. John of God – Fatebenefratelli HospitalBeneventoItaly
  3. 3.University of SalernoBaronissiItaly
  4. 4.First Division of Infectious DiseasesCotugno Hospital, Azienda Ospedaliera dei ColliNaplesItaly

Personalised recommendations