Manuscript Offprint

arXiv:2609.11366

Local Robustness Quantification for Naive Bayes Classifiers and Generative Forests: a General Approach

Adrián Detavernier, Jasper De Bock

Abstract

We provide methods for calculating the robustness of the predictions of two types of generative classifiers whose underlying distribution is a Probabilistic Graphical Model (PGM): naive Bayes classifiers and generative forests (a probabilistic extension of random forests). Following the paradigm of robustness quantification, we define the robustness of a prediction as the extent to which the distribution of the classifier can be perturbed without changing this prediction. We consider perturbations obtained by varying the local models of the PGMs within general neighborhoods and focus in particular on epsilon-contamination, total variation distance and chi-squared divergence balls. We test our methods on benchmark datasets, demonstrate that the robustness value of a prediction serves as an indicator for its trustworthiness and compare our approach with other such indicators.

Keywords: trustworthy classification, generative forests, naive Bayes classifier, imprecise probabilities

1. Introduction

Say that you are writing a paper and the deadline is approaching, so you have to quickly finish the paper and submit it. However, the central proof of the paper is not working yet, so, to save time, you decide to consult a Large Language Model (LLM) to write the proof for you. You get the proof from the LLM, but you realize that time's up and that you are not able to check the proof before submitting the paper. 1{}^{1} Would you trust the proof of the LLM? Would you take the risk? Or would you only do it if the LLM is extremely confident about the proof? If such a (hopefully unrealistic) situation arises, it would be very useful if the LLM were to give us some indication of the trustworthiness of its output. Similarly for other high-stakes settings, such as medical diagnosis, it would be very useful if a model were able to assess the trustworthiness of its own predictions such that the user could take this information into account when making decisions based on these predictions.

In this paper, we consider one possible approach that attempts to accompany the individual predictions of a classifier with an indication of their trustworthiness: Robustness Quantification (RQ) (Detavernier and De Bock, 2025). RQ in particular quantifies the so-called robustness of a classifier's predictions, which is the extent to which the model can be perturbed without changing the prediction, the idea being that predictions with high robustness are more trustworthy because they are less sensitive to errors made while training.

  1. Disclaimer: this situation is purely hypothetical and does not reflect the actual practices of the author(s).

© 2026 A. Detavernier & J. De Bock.

the model. RQ has so far been studied for classifiers based on several types of Probabilistic Graphical Models (PGMs): the Naive Bayes Classifier (NBC) (Detavernier and De Bock, 2025), for Generative Forests (GeFs) (Correia et al., 2020b), and for Bayesian networks and Markov random fields (De Bock et al., 2014). These results have furthermore shown that the robustness of a prediction, defined in this way, can be a useful indicator for its trustworthiness, in the sense that predictions with a higher robustness value tend to be correct more often than predictions with a lower robustness value.

In this work, we show how RQ can be reduced to an optimization problem. Additionally, we use ideas from imprecise probability theory (Augustin et al., 2014) and credal classification (Corani et al., 2014) to provide general methods for reducing this optimization problem to local optimizations if the PGM is an NBC or GeF that is perturbed by local perturbations of its local probability or weight functions, respectively. In doing so, we generalize existing methods that focussed on ε\varepsilon-contamination perturbations. We illustrate this generality by considering as perturbations total variation distance and chi-squared divergence balls, and we show in our experiments that the resulting robustness values still correlate with accuracy, and moreover that they are competitive with those obtained with ε\varepsilon-contamination and with indicators of trustworthiness that are based on uncertainty.

References (19)