Formal Analysis of Tree-Based Machine Learning Models Using Coloured Petri Nets
Andressa C. M. da Silveira, Álvaro Sobrinho, Leandro Dias da Silva, Muhammad Asif Nauman, Danilo F. S. Santos, Ângelo Perkusich · 2025
Developers typically build Machine Learning (ML) models for classification tasks in medical diagnosis. These models can make inferences from unseen data collected from sensors, aiding decision-making during medical interventions. However, ML models are prone to inaccurate classifications. Such misclassifications risk underestimating diagnoses and can result in severe health complications for undiagnosed patients. To mitigate these risks, formal modeling and analysis are crucial in the software development process. These activities help address the adverse effects of misleading classifications and improve the quality of ML models. This paper presents a simulation-based method using coloured Petri nets to enhance the explainability and accuracy of decision tree and Random Forest (RF) models. An experiment with three datasets for COVID-19 and five for Influenza screening shows that applying our simulation-based method results in more explainable models. The experiment also shows improvement in accuracy measures for RF models.