Towards Robust Classification with Deep Generative Forests

Alvaro H. C. Correia, Robert Peharz, Cassio P. de CamposarXiv 2020

Abstract

Decision Trees and Random Forests are staples of tabular data classification, yet they often fail to provide reliable uncertainty estimates or detect out-of-distribution (OOD) samples. This paper introduces Generative Forests (GeFs), which transform traditional tree-based models into deep probabilistic generative models. By modeling the joint distribution $p(X, Y)$, GeFs enable principled outlier detection and robustness quantification without compromising the predictive power of traditional Random Forests.

Introduction

Random Forests (RFs) are primarily discriminative models, focusing on learning class boundaries rather than the underlying data distribution. This limitation makes them prone to overconfidence when encountering anomalous data. Furthermore, standard RFs struggle to distinguish between aleatory uncertainty (inherent data noise) and epistemic uncertainty (lack of training data coverage). There is a critical need for models that combine the performance and interpretability of RFs with the probabilistic rigor of generative models to handle uncertainty in safety-critical applications.

Methodology

The authors propose Generative Forests (GeFs), a class of Probabilistic Circuits (PCs). The core component is the Generative Decision Tree (GeDT), where a standard decision tree is mapped to a computational graph. In this mapping, decision nodes are treated as "sum nodes" representing mixtures of paths, and leaf nodes are defined as probability density functions restricted to the leaf's specific feature space.

Figure 1: Conversion of a standard Decision Tree into a Generative Decision Tree (GeDT) represented as a Probabilistic Circuit.

The GeF+ model is a uniform mixture of these GeDTs that models the single joint distribution $p(X, Y)$. This structure allows for the efficient computation of the marginal likelihood $p(X)$ for outlier detection and the calculation of $\epsilon$-robustness—a measure of how much internal model weights can be perturbed before a classification changes. This robustness metric is highly interpretable and can be computed in linear time relative to the tree size.

Experimental Evaluation

The model was evaluated across several benchmarks:

  • Wine Quality Dataset: Used for OOD detection via transfer testing (e.g., training on white wine, testing on red wine).
  • OpenML-CC18 Benchmark: 12 diverse tabular datasets used to evaluate the correlation between $\epsilon$-robustness and accuracy.
  • MNIST & Fashion-MNIST: Used for visual confirmation of how robustness and marginal likelihood behave on image data.

Results and Discussion

GeF+ demonstrates superior outlier detection capabilities. On the Wine Quality dataset, when trained on white wine and tested on red wine, GeF+ achieved a ROC AUC of 0.981. This performance matches specialized Gaussian Kernel Density Estimators (0.979) and significantly outperforms the standard Random Forest baseline (0.784).

Figure 2: Outlier detection performance comparison on wine data. GeF+ matches specialized density estimators and significantly outperforms standard Random Forests.

Beyond outlier detection, the authors found a strict positive correlation between a prediction's $\epsilon$-robustness and its actual accuracy across all 12 OpenML datasets. Visual analysis of image data further confirmed that samples with the lowest $\epsilon$-robustness were those that were visually ambiguous or irregular, effectively disentangling aleatory and epistemic uncertainty. While a messy digit (aleatory uncertainty) might have a high $p(X)$ but low robustness, a random scribble (epistemic uncertainty) will have a very low $p(X)$.

Conclusion

Generative Forests provide a powerful framework for reliable machine learning by turning standard classifiers into native anomaly detectors. While current implementations use simple factorized leaf distributions, the architecture allows for more complex density estimators in the future. GeFs represent a significant step toward deep hybrid models that can fail gracefully in real-world environments.

Summary updated

BibTeX
@misc{correia2020towards,
  author = {Alvaro H. C. Correia and Robert Peharz and Cassio P. de Campos},
  title = {{Towards Robust Classification with Deep Generative Forests}},
  year = {2020},
  eprint = {2007.05721},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.05721},
}
Figure