Principled Algorithms for Optimizing Generalized Metrics in Binary Classification
Anqi Mao, Mehryar Mohri, Yutao Zhong
TL;DR
This work tackles optimizing generalized binary classification metrics that are ratios of linear forms in TP/FP/TN/FN under class imbalance and asymmetric costs. It reframes metric optimization as a generalized cost-sensitive learning problem, introduces a surrogate-loss family with ${\mathscr H}$-consistency guarantees, and derives finite-sample generalization bounds. The METRO algorithms offer a principled, finite-sample approach to find near-optimal predictors for these metrics via a lambda-search and convex surrogate losses, with cross-validation as a practical alternative. Experiments on CIFAR-10/100 and SVHN demonstrate consistent gains over prior baselines, validating the framework's theoretical and practical benefits for metric-aware binary classification.
Abstract
In applications with significant class imbalance or asymmetric costs, metrics such as the $F_β$-measure, AM measure, Jaccard similarity coefficient, and weighted accuracy offer more suitable evaluation criteria than standard binary classification loss. However, optimizing these metrics present significant computational and statistical challenges. Existing approaches often rely on the characterization of the Bayes-optimal classifier, and use threshold-based methods that first estimate class probabilities and then seek an optimal threshold. This leads to algorithms that are not tailored to restricted hypothesis sets and lack finite-sample performance guarantees. In this work, we introduce principled algorithms for optimizing generalized metrics, supported by $H$-consistency and finite-sample generalization bounds. Our approach reformulates metric optimization as a generalized cost-sensitive learning problem, enabling the design of novel surrogate loss functions with provable $H$-consistency guarantees. Leveraging this framework, we develop new algorithms, METRO (Metric Optimization), with strong theoretical performance guarantees. We report the results of experiments demonstrating the effectiveness of our methods compared to prior baselines.
