NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Consistent Classification Algorithms for Multi-class Non-Decomposable Performance Metrics

Harish G. Ramaswamy, Harikrishna Narasimhan, Shivani AgarwalarXiv 2015

Abstract

We study consistency of learning algorithms for a multi-class performance metric that is a non-decomposable function of the confusion matrix of a classifier and cannot be expressed as a sum of losses on individual data points; examples of such performance metrics include the macro F-measure popular in information retrieval and the G-mean metric used in class-imbalanced problems. While there has been much work in recent years in understanding the consistency properties of learning algorithms for 'binary' non-decomposable metrics, little is known either about the form of the optimal classifier for a general multi-class non-decomposable metric, or about how these learning algorithms generalize to the multi-class case. In this paper, we provide a unified framework for analysing a multi-class non-decomposable performance metric, where the problem of finding the optimal classifier for the performance metric is viewed as an optimization problem over the space of all confusion matrices achievable under the given distribution. Using this framework, we show that (under a continuous distribution) the optimal classifier for a multi-class performance metric can be obtained as the solution of a cost-sensitive classification problem, thus generalizing several previous results on specific binary non-decomposable metrics. We then design a consistent learning algorithm for concave multi-class performance metrics that proceeds via a sequence of cost-sensitive classification problems, and can be seen as applying the conditional gradient (CG) optimization method over the space of feasible confusion matrices. To our knowledge, this is the first efficient learning algorithm (whose running time is polynomial in the number of classes) that is consistent for a large family of multi-class non-decomposable metrics. Our consistency proof uses a novel technique based on the convergence analysis of the CG method.

Introduction

In standard machine learning, optimization typically focuses on "decomposable" losses—metrics like accuracy where the total error is simply the sum of errors on individual data points. However, many real-world tasks require "non-decomposable" metrics, such as the F-measure (common in information retrieval) or the G-mean (used for imbalanced data). These metrics are functions of the entire confusion matrix and cannot be broken down into a simple sum of individual losses.

While researchers have established methods to handle these metrics for binary classification (often by tuning a single threshold), the multi-class case is significantly more complex. In a multi-class setting, the number of parameters to tune scales with the number of classes, making traditional brute-force searches computationally prohibitive. This paper addresses this gap by providing both the theoretical form of the optimal multi-class classifier and an efficient, provably consistent algorithm to learn it.

Theoretical Framework: The Geometry of Confusion

The authors approach the problem by viewing the search for an optimal classifier as an optimization problem over the space of all achievable confusion matrices. A key insight is that the set of all possible confusion matrices for a given data distribution is convex. This geometric property allows the use of powerful tools from convex optimization to navigate the space of classifiers.

They prove that for a wide range of metrics, the optimal multi-class classifier is a cost-sensitive classifier. The "costs" (or gains) for this classifier are determined by the gradient of the performance metric evaluated at the optimal confusion matrix. Furthermore, while a single deterministic classifier might be optimal for decomposable metrics, non-decomposable metrics often require a randomized classifier (or an ensemble) to reach the true optimum, particularly when the data distribution is not continuous.

The BayesCG Algorithm

To avoid a brute-force search over all possible cost matrices, the authors introduce BayesCG, which adapts the Conditional Gradient (CG) method (also known as Frank-Wolfe optimization). Instead of optimizing the metric directly, BayesCG proceeds iteratively:

  1. Gradient Calculation: In each step, it calculates the gradient of the metric based on the current classifier's performance.
  2. Cost-Sensitive Step: It solves a simple cost-sensitive classification problem (using a plug-in approach with class probability estimates) to find a "direction" for improvement.
  3. Ensemble Update: The final classifier is constructed as an ensemble of these intermediate classifiers.

For metrics that are concave but not smooth (like the G-mean), the authors prescribe applying BayesCG to a smooth approximation of the metric to maintain consistency.

Multi-class Performance Metrics

The framework is applicable to a wide variety of metrics used in practice. These metrics can be categorized by their mathematical properties, such as concavity and smoothness, which determine the specific implementation of the BayesCG algorithm.

Table 1: Summary of common multi-class performance metrics and their mathematical properties.

As shown in Table 1, metrics like the H-Mean, Q-Mean, and G-Mean are concave but non-smooth, requiring the smoothing techniques mentioned above. Others, like the Macro F1-metric, present additional challenges due to non-concavity.

Consistency and Regret Bounds

This research is primarily theoretical, focusing on proving statistical consistency and providing regret bounds. The authors demonstrate that as the number of training samples increases, the performance of the BayesCG algorithm converges to the theoretical optimum. They provide explicit "regret bounds"—mathematical guarantees on the rate of convergence. By using gradients to update the "costs" in each iteration, BayesCG avoids exponential complexity, making the algorithm polynomial in the number of classes and thus computationally efficient for large-scale problems.

Limitations and Future Work

While BayesCG is a significant step forward, it has some limitations:

  • Concavity Constraint: The algorithm is primarily designed for concave functions. While many popular metrics fit this, some (like the Macro F-measure) are non-concave. The authors suggest that a variant might work for "pseudo-linear" metrics, but this remains for future exploration.
  • Smoothness Requirement: The core proof relies on metric smoothness. While smoothing workarounds exist, they add complexity in choosing the right approximation parameters.
  • Computational Iterations: Although polynomial in the number of classes, the iterative nature of the algorithm means that in very large-scale settings, the number of iterations needed for convergence could be a practical concern.

Summary updated

BibTeX
@misc{ramaswamy2015consistent,
  author = {Harish G. Ramaswamy and Harikrishna Narasimhan and Shivani Agarwal},
  title = {{Consistent Classification Algorithms for Multi-class Non-Decomposable Performance Metrics}},
  year = {2015},
  eprint = {1501.00287},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1501.00287},
}
Figure