AnyLoss: Transforming Classification Metrics into Loss Functions
Doheon Han, Nuno Moniz, Nitesh V Chawla

TL;DR
This paper introduces AnyLoss, a method to convert any confusion matrix-based evaluation metric into a differentiable loss function, enabling direct optimization in neural network training, especially benefiting imbalanced datasets.
Contribution
The paper presents a novel, general-purpose approach to transform non-differentiable metrics into differentiable loss functions using approximation, facilitating direct metric optimization during training.
Findings
Effective in handling imbalanced datasets
Achieves competitive training speed
Demonstrates broad applicability across metrics
Abstract
Many evaluation metrics can be used to assess the performance of models in binary classification tasks. However, most of them are derived from a confusion matrix in a non-differentiable form, making it very difficult to generate a differentiable loss function that could directly optimize them. The lack of solutions to bridge this challenge not only hinders our ability to solve difficult tasks, such as imbalanced learning, but also requires the deployment of computationally expensive hyperparameter search processes in model selection. In this paper, we propose a general-purpose approach that transforms any confusion matrix-based metric into a loss function, \textit{AnyLoss}, that is available in optimization processes. To this end, we use an approximation function to make a confusion matrix represented in a differentiable form, and this approach enables any confusion matrix-based metric…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMachine Learning and Data Classification
