# A surrogate loss function for optimization of Fβ score in binary classification with imbalanced data

arXiv: https://arxiv.org/abs/2104.01459 · HTML: https://mlsanity.com/paper/2104.01459/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- Builds on 10 of its 27 references that are in the map.
- First posted on arXiv 3 Apr 2021.

## Builds on (most cited first, 10 of 10)

- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Class-Balanced Loss Based on Effective Number of Samples](https://mlsanity.com/paper/1901.05555/) (2019)
- [Generalized Cross Entropy Loss for Training Deep Neural Networks with Noisy Labels](https://mlsanity.com/paper/1805.07836/) (2018)
- [A systematic study of the class imbalance problem in convolutional neural networks](https://mlsanity.com/paper/1710.05381/) (2017)
- [The Devil is in the Tails: Fine-grained Classification in the Wild](https://mlsanity.com/paper/1709.01450/) (2017)
- [Scalable Learning of Non-Decomposable Objectives](https://mlsanity.com/paper/1608.04802/) (2016)
- [Online and Stochastic Gradient Methods for Non-decomposable Loss Functions](https://mlsanity.com/paper/1410.6776/) (2014)
- [Optimizing Non-decomposable Performance Measures: A Tale of Two Classes](https://mlsanity.com/paper/1505.06812/) (2015)
- [Optimizing Non-decomposable Measures with Deep Networks](https://mlsanity.com/paper/1802.00086/) (2018)

## Built on by (most cited first, 5 of 5)

- [AnyLoss: Transforming Classification Metrics into Loss Functions](https://mlsanity.com/paper/2405.14745/) (2024)
- [Predicting O-GlcNAcylation Sites in Mammalian Proteins with Transformers and RNNs Trained with a New Loss Function](https://mlsanity.com/paper/2402.17131/) (2024)
- [Exact Reformulation and Optimization for Direct Metric Optimization in Binary Imbalanced Classification](https://mlsanity.com/paper/2507.15240/) (2025)
- [Reformulating van Rijsbergen's Fβ metric for weighted binary cross-entropy](https://mlsanity.com/paper/2210.16458/) (2022)
- [Enhancing Operational Safety via Agentic Dialogue Hazard Identification Analysis](https://mlsanity.com/paper/2606.03812/) (2026)

## Abstract (arXiv)

The Fβ score is a commonly used measure of classification performance, which plays crucial roles in classification tasks with imbalanced data sets. However, the Fβ score cannot be used as a loss function by gradient-based learning algorithms for optimizing neural network parameters due to its non-differentiability. On the other hand, commonly used loss functions such as the binary cross-entropy (BCE) loss are not directly related to performance measures such as the Fβ score, so that neural networks optimized by using the loss functions may not yield optimal performance measures. In this study, we investigate a relationship between classification performance measures and loss functions in terms of the gradients with respect to the model parameters. Then, we propose a differentiable surrogate loss function for the optimization of the Fβ score. We show that the gradient paths of the proposed surrogate Fβ loss function approximate the gradient paths of the large sample limit of the Fβ score. Through numerical experiments using ResNets and benchmark image data sets, it is demonstrated that the proposed surrogate Fβ loss function is effective for optimizing Fβ scores under class imbalances in binary classification tasks compared with other loss functions.
