Consistent Classification with Generalized Metrics

Xiaoyan Wang, Ran Li, Bowei Yan, Oluwasanmi KoyejoarXiv 2019

TL;DR

This paper introduces a theoretical framework for understanding when weighted classifiers achieve optimal performance in multi-output classification tasks, especially when dealing with complex, generalized metrics. They provide a practical post-processing technique that consistently improves classifier performance across various datasets and metrics.

What Problem Does This Paper Address?

In machine learning, especially for complex tasks like multi-output classification (where an instance can have multiple labels simultaneously), choosing the right metric and classifier is crucial. While using "weighted losses" is a common heuristic for optimizing performance metrics, it's not always clear when this approach leads to provably optimal and consistent results. This paper tackles this gap by characterizing the exact conditions under which weighted classification is guaranteed to be Bayes optimal for multi-output problems, even when labels are correlated. They also address how to handle averaged metrics, which are frequently used in practice but can lead to different optimal classifiers depending on the averaging method.

Methods

The authors develop a theoretical framework based on "confusion tensors" to analyze multi-output classification metrics. They establish necessary and sufficient conditions for when optimizing a generalized metric is equivalent to learning a weighted classifier. A key contribution is the characterization of Bayes optimal classifiers for averaged multi-output metrics, distinguishing between micro-averaging and macro-averaging. For fractional-linear metrics (a common class including F-measure), they propose a "plug-in estimator" that acts as a post-processing step. This estimator is shown to be consistent, meaning it converges to the optimal performance with more data, and is easily implemented. They also introduce a bisection algorithm to efficiently find the optimal weights for this post-processing step.

Datasets

The paper uses synthetic data to explore the advantages of their weighted classifier approach under varying conditions. They also evaluate their methods on several benchmark datasets from the UCI Machine Learning Repository, including:

  • Car Evaluation (CAR)
  • Nursery (NURSERY)
  • Contraceptive Method Choice (CMC)
  • Phish (PHISH)
  • Student Performance (STUDENT)

Additionally, they conduct experiments on the MovieLens 100K Dataset for multi-output rating prediction.

Key Insights and Ideas

  • Geometry of Feasible Confusion Tensors: The paper reveals that optimizing many generalized metrics can be reduced to maximizing a weighted loss, providing a geometric interpretation of Bayes optimality.
  • Averaging Matters: The choice between micro- and macro-averaging for multi-output metrics significantly impacts the resulting Bayes optimal classifier, especially for non-linear metrics. Micro-averaging leads to shared loss matrices across outputs, while macro-averaging allows for decomposable optimal classifiers per output.
  • Post-Processing Power: A simple plug-in estimator, applied as a post-processing step to existing classifiers, can consistently improve performance for fractional-linear metrics without requiring a complete retraining of the model.
  • Consistency is Achievable: The proposed methods provide a way to achieve provably consistent classifiers, meaning their performance improves predictably with more data, even for complex multi-output scenarios.

Key Results

  • The paper provides theoretical characterizations for when weighted classification is Bayes optimal in multi-output settings, unifying existing results for binary, multiclass, and multilabel classification.
  • They demonstrate that their proposed plug-in estimator, when applied as post-processing, consistently improves performance over standard classifiers. For instance, on synthetic data, they show performance ratios (consistent vs. standard) of over 3 in certain scenarios.
  • Experiments on UCI datasets and the MovieLens dataset show that their "consistent" classifiers (e.g., C-LogReg, C-DT, C-OrdRec) consistently outperform their non-consistent counterparts across various metrics (Ordinal, Micro-F1, Weighted) and averaging schemes (micro/macro). For example, in Table 3, performance ratios for LogReg are often above 1.1, and for Weighted metric, they can reach over 2.4.

Limitations and Future Work

  • Computational Cost: While the post-processing step is efficient, the initial probability estimation might still be computationally intensive depending on the chosen base learner.
  • Assumptions: The theoretical results often rely on certain regularity assumptions about the data distribution (e.g., absolute continuity of conditional probabilities).
  • Future Work: The authors mention exploring the gap between finite sample and population analysis for multi-task learning problems, particularly concerning structural assumptions that correlate outputs. They also leave the details of an ERM (Empirical Risk Minimizer) estimator for weighted losses for a longer version of the manuscript.

Summary updated

BibTeX
@misc{wang2019consistent,
  author = {Xiaoyan Wang and Ran Li and Bowei Yan and Oluwasanmi Koyejo},
  title = {{Consistent Classification with Generalized Metrics}},
  year = {2019},
  eprint = {1908.09057},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.09057},
}
Figure