[Paper Review] Never mind the metrics -- what about the uncertainty? Visualising confusion matrix metric distributions
This paper proposes visualizing the uncertainty in confusion matrix-based performance metrics using Bayesian posterior predictive distributions, revealing that uncertainty from small sample sizes often eclipses differences between classifiers. By modeling true and false positive rates via beta-binomial distributions and visualizing metric contours in ROC space, it demonstrates that performance claims should be tempered by this inherent uncertainty, especially under class imbalance or low data abundance.
There are strong incentives to build models that demonstrate outstanding predictive performance on various datasets and benchmarks. We believe these incentives risk a narrow focus on models and on the performance metrics used to evaluate and compare them -- resulting in a growing body of literature to evaluate and compare metrics. This paper strives for a more balanced perspective on classifier performance metrics by highlighting their distributions under different models of uncertainty and showing how this uncertainty can easily eclipse differences in the empirical performance of classifiers. We begin by emphasising the fundamentally discrete nature of empirical confusion matrices and show how binary matrices can be meaningfully represented in a three dimensional compositional lattice, whose cross-sections form the basis of the space of receiver operating characteristic (ROC) curves. We develop equations, animations and interactive visualisations of the contours of performance metrics within (and beyond) this ROC space, showing how some are affected by class imbalance. We provide interactive visualisations that show the discrete posterior predictive probability mass functions of true and false positive rates in ROC space, and how these relate to uncertainty in performance metrics such as Balanced Accuracy (BA) and the Matthews Correlation Coefficient (MCC). Our hope is that these insights and visualisations will raise greater awareness of the substantial uncertainty in performance metric estimates that can arise when classifiers are evaluated on empirical datasets and benchmarks, and that classification model performance claims should be tempered by this understanding.
Motivation & Objective
- To address the growing over-reliance on single-point performance metrics in machine learning, which often overlooks estimation uncertainty.
- To highlight that uncertainty in confusion matrix entries—especially with few positive or negative examples—can overshadow differences between classifiers.
- To provide a visual and probabilistic framework for understanding how performance metrics like Balanced Accuracy and MCC vary under uncertainty.
- To advocate for a shift in focus from performance shoot-outs to data quality and representativeness, especially in imbalanced or low-data regimes.
- To develop interactive tools that visualize the discrete posterior predictive distributions of performance metrics, grounded in binomial and beta-binomial models.
Proposed method
- Representing binary confusion matrices as points in a 3D compositional lattice, where each point corresponds to a unique combination of true and false positive/negative counts.
- Deriving and visualizing the contours of performance metrics (e.g., BA, MCC) in terms of true positive and true negative rates, forming the basis of ROC space.
- Using binomial and beta-binomial models to compute the exact posterior predictive probability mass functions (PMFs) of confusion matrix entries given observed data and prior beliefs.
- Transforming the posterior PMFs of confusion matrices into posterior PMFs of performance metrics, enabling uncertainty-aware comparisons.
- Creating interactive visualizations and animations to explore how metric values and their uncertainty change across different sample sizes and class imbalances.
- Extending the framework to multinomial classification via one-vs-all decomposition and considering Dirichlet-multinomial models for future generalization.
Experimental results
Research questions
- RQ1How does uncertainty in confusion matrix entries affect the reliability of commonly used performance metrics like Balanced Accuracy and Matthews Correlation Coefficient?
- RQ2To what extent can small sample sizes—especially for rare classes—render differences in empirical classifier performance statistically meaningless?
- RQ3How do the geometric properties of performance metric contours in ROC space relate to underlying discrete confusion matrix distributions?
- RQ4In what ways does class imbalance distort the interpretation of performance metrics, and how can uncertainty modeling help clarify this?
- RQ5Can visualizations of posterior predictive distributions of metrics help researchers and practitioners better assess the robustness of classifier performance claims?
Key findings
- Performance metrics such as Balanced Accuracy and Matthews Correlation Coefficient exhibit significant uncertainty when evaluated on small datasets, especially with imbalanced class distributions.
- The posterior predictive distributions of confusion matrix entries, modeled via beta-binomial distributions, reveal that observed metric values can vary widely even with the same empirical confusion matrix.
- Discrete posterior predictive PMFs of true and false positive rates show that metric estimates are inherently uncertain, particularly when the number of positive or negative examples is low.
- Visualizations demonstrate that the geometry of metric contours in ROC space reflects how sensitivity to class imbalance varies across different metrics.
- The uncertainty in performance estimates often exceeds the differences between classifiers, suggesting that performance rankings based on single-point metrics may be misleading.
- The authors conclude that more data—particularly representative data for rare classes—is essential to reduce uncertainty, and that current performance claims should be accompanied by uncertainty-aware interpretations.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.