The Fermi–Dirac distribution provides a calibrated probabilistic output for binary classifiers

Sung‐Cheol Kim, Adith S. Arun, Mehmet Eren Ahsen, Robert Vogel, Gustavo StolovitzkyProceedings of the National Academy of Sciences 2021 · DOI

TL;DR

This paper introduces a novel approach to binary classification by drawing a surprising parallel between the Fermi-Dirac distribution in quantum physics and the probability of correctly classifying items. This connection allows for calibrated probabilistic outputs from classifiers, leading to better threshold selection, more robust AUC variance estimation, and a new ensemble learning method called FiDEL.

What Problem Does This Paper Address?

In machine learning, binary classifiers are fundamental tools used across many domains, from medical diagnosis to financial forecasting. While these classifiers often output a "score" indicating their confidence, this score isn't always a well-calibrated probability of the item belonging to the positive class. This lack of calibration makes it difficult to reliably combine classifiers or interpret their outputs in a probabilistic sense. Furthermore, evaluating classifier performance, particularly with metrics like the Area Under the ROC Curve (AUC), can be challenging due to issues with estimating variance and confidence intervals. The paper aims to address these limitations by providing a principled way to derive calibrated probabilistic outputs from binary classifiers.

Methods

The core innovation of this paper lies in establishing a formal equivalence between the rank-ordered output of a binary classifier and the Fermi-Dirac (FD) distribution, which describes how fermions occupy quantum states.

  • Fermi-Dirac Mapping: The authors propose that the probability of an item being in the positive class at a given rank (based on its classifier score) can be modeled by the FD distribution. This mapping allows them to interpret classifier properties like the AUC in terms of physical system parameters:
  • Temperature (β): Corresponds to the "imperfection" of the classifier. A perfect classifier has zero temperature, while a random one has infinite temperature.
  • Chemical Potential (μ): Relates to the optimal decision threshold for separating classes.
  • Calibrated Probabilistic Output: By fitting the FD distribution to the observed rank-conditioned class probabilities (derived from the classifier's AUC and prevalence of the positive class), they obtain a calibrated probability for each item.
  • Optimal Threshold Selection: The FD distribution provides a principled way to determine the optimal decision threshold that maximizes balanced accuracy, by setting the log-likelihood ratio to zero.
  • AUC Variance Estimation: The FD framework allows for a closed-form derivation of the variance of the AUC, which is independent of assumptions about the underlying score distributions.
  • FiDEL Ensemble Learning: A new ensemble method, FiDEL (Fermi-Dirac-based ensemble learning), is introduced. It leverages the calibrated FD-based probabilities from individual classifiers to combine them into a more robust ensemble. FiDEL uses the FD parameters (β and μ) of base classifiers to weight their contributions.

Datasets

The paper uses simulated data for initial validation of the theoretical framework. For evaluating the FiDEL ensemble method, they utilize datasets from two Kaggle competitions:

  • West Nile Virus (WNV) Prediction Challenge: A binary classification problem with a low positive class prevalence (p=0.08) and 10,506 data points.
  • Springleaf Marketing Response (SMR) Challenge: A binary classification problem with a higher positive class prevalence (p=0.24) and 22,000 data points.

These datasets are described as having vastly different prevalence rates and a substantial number of data points, making them suitable for testing the robustness of the proposed methods.

Key Insights and Ideas

  • Physics-Inspired Machine Learning: The most striking insight is the unexpected and formal connection between quantum statistical mechanics (Fermi-Dirac distribution) and binary classification ranking statistics. This suggests that fundamental physical principles can offer powerful new perspectives on machine learning problems.
  • Calibrated Probabilities from Ranks: The paper demonstrates that by focusing on the rank of an item's score (rather than the score itself), one can derive well-calibrated probabilities, even when the underlying score distribution is unknown. This is a significant departure from methods that rely on score distributions or heuristic transformations.
  • Interpretable Classifier Metrics: The mapping to physical parameters (temperature for error, chemical potential for threshold) provides a more intuitive understanding of classifier behavior and performance.
  • Robust AUC Variance: Deriving a closed-form expression for AUC variance without assuming specific score distributions is a valuable contribution for statistical rigor in evaluating classifiers.
  • Ensemble Learning via Calibrated Probabilities: FiDEL offers a principled way to combine classifiers by leveraging their calibrated probabilistic outputs, potentially leading to better generalization than individual models or simpler ensemble methods.

Key Results

  • Rank-Conditioned Probability Fit: The paper shows a strong empirical fit (Pearson correlation > 0.99) between the rank-conditioned positive class probability derived from simulated data and the fitted Fermi-Dirac distribution.
  • Optimal Threshold Accuracy: The proposed FD-based method for determining the optimal rank threshold (r*) closely matches the empirically determined threshold that maximizes balanced accuracy (correlation R=0.98).
  • AUC Variance Agreement: The FD-based method for estimating AUC variance shows high correlation (R=0.99) with the established DeLong method, indicating its reliability.
  • FiDEL Performance: On the WNV and SMR Kaggle datasets, the FiDEL ensemble method consistently outperformed both the best individual base classifier and a baseline "wisdom of crowds" ensemble across various combinations of base classifiers (M=3 to 10). For instance, in the WNV challenge, FiDEL's AUC was robustly higher than the best individual classifier and the WoC ensemble.

Limitations and Future Work

  • Approximation of Rank Probability: The paper acknowledges that the FD distribution is an approximation of the true rank-conditioned class probability, especially when dealing with a single test set rather than an ensemble of test sets.
  • Class-Conditional Independence Assumption: The FiDEL ensemble method relies on the assumption that base classifiers are class-conditionally independent. While the study shows FiDEL is robust to moderate violations of this assumption (up to a correlation of ~0.4-0.5), significant correlation can degrade performance.
  • Data Requirements: To use the FD framework, one needs to estimate the AUC and prevalence from a validation or training set. In practical scenarios where test set labels are unavailable, this requires careful handling of data splits.
  • Future Work: The authors suggest exploring modifications to FiDEL to account for correlations between base classifiers. They also mention that incorporating additional information beyond AUC and prevalence (e.g., precision-recall curve information) could further improve the rank-conditioned class probability estimation. They envision practical applications in areas like medical diagnostics, where calibrated probabilities can serve as valuable decision aids.

Summary updated

Abstract

Binary classification is one of the central problems in machine-learning research and, as such, investigations of its general statistical properties are of interest. We studied the ranking statistics of items in binary classification problems and observed that there is a formal and surprising relationship between the probability of a sample belonging to one of the two classes and the Fermi-Dirac distribution determining the probability that a fermion occupies a given single-particle quantum state in a physical system of noninteracting fermions. Using this equivalence, it is possible to compute a calibrated probabilistic output for binary classifiers. We show that the area under the receiver operating characteristics curve (AUC) in a classification problem is related to the temperature of an equivalent physical system. In a similar manner, the optimal decision threshold between the two classes is associated with the chemical potential of an equivalent physical system. Using our framework, we also derive a closed-form expression to calculate the variance for the AUC of a classifier. Finally, we introduce FiDEL (Fermi-Dirac-based ensemble learning), an ensemble learning algorithm that uses the calibrated nature of the classifier's output probability to combine possibly very different classifiers.
BibTeX
@inproceedings{kim2021fermidirac,
  author = {Sung‐Cheol Kim and Adith S. Arun and Mehmet Eren Ahsen and Robert Vogel and Gustavo Stolovitzky},
  title = {{The Fermi–Dirac distribution provides a calibrated probabilistic output for binary classifiers}},
  booktitle = {Proceedings of the National Academy of Sciences},
  year = {2021},
  doi = {10.1073/pnas.2100761118},
}
Figure