Skip to main content
QUICK REVIEW

[Paper Review] Rediscovering BCE Loss for Uniform Classification

Qiufu Li, Xi Jia|arXiv (Cornell University)|Mar 12, 2024
Currency Recognition and DetectionComputer Science12 citations
TL;DR

The paper introduces uniform classification with a unified threshold and derives a BCE-based loss with a learnable bias that yields a unified threshold, showing BCE loss improves uniform and sample-wise accuracy over SoftMax across multiple datasets and feature extractors.

ABSTRACT

This paper introduces the concept of uniform classification, which employs a unified threshold to classify all samples rather than adaptive threshold classifying each individual sample. We also propose the uniform classification accuracy as a metric to measure the model's performance in uniform classification. Furthermore, begin with a naive loss, we mathematically derive a loss function suitable for the uniform classification, which is the BCE function integrated with a unified bias. We demonstrate the unified threshold could be learned via the bias. The extensive experiments on six classification datasets and three feature extraction models show that, compared to the SoftMax loss, the models trained with the BCE loss not only exhibit higher uniform classification accuracy but also higher sample-wise classification accuracy. In addition, the learned bias from BCE loss is very close to the unified threshold used in the uniform classification. The features extracted by the models trained with BCE loss not only possess uniformity but also demonstrate better intra-class compactness and inter-class distinctiveness, yielding superior performance on open-set tasks such as face recognition.

Motivation & Objective

  • Introduce the concept of uniform classification and class-wise uniform classification.
  • Define and compare new metrics for uniformity, including uniform classification accuracy.
  • Derive a BCE-based loss with a learnable bias that enforces a unified threshold.
  • Demonstrate BCE loss advantages over SoftMax in uniform and sample-wise tasks across datasets and models.

Proposed method

  • Define uniform classification and its metrics (uniform accuracy, class-wise uniform accuracy, sample-wise accuracy).
  • Re-derive SoftMax and BCE losses and connect their biases to feature uniformity.
  • Design two BCE-based uniform losses (L_bce-u and L_bce-d) with learnable biases that converge to unified thresholds.
  • Provide theoretical convergence results showing bias converges to a unified threshold under certain conditions.
  • Empirically validate across six datasets and three feature extractors using both linear and normalized classifiers.
Figure 1: The visual comparison of performance of ResNet50 trained by $L_{\text{soft-nu}}$ and $L_{\text{bce-nu}}$ with various $\gamma$ on ImageNet-1K. Although $L_{\text{bce-nu}}$ performs poorly when $\gamma$ is too small or too large, for $\gamma$ varying in $[32,192]$ , its uniform accuracy is
Figure 1: The visual comparison of performance of ResNet50 trained by $L_{\text{soft-nu}}$ and $L_{\text{bce-nu}}$ with various $\gamma$ on ImageNet-1K. Although $L_{\text{bce-nu}}$ performs poorly when $\gamma$ is too small or too large, for $\gamma$ varying in $[32,192]$ , its uniform accuracy is

Experimental results

Research questions

  • RQ1Can a single, unified threshold across all samples improve open-set and uniform classification tasks?
  • RQ2Do BCE-based losses with learnable biases yield more uniform features and higher uniform classification accuracy than SoftMax losses?
  • RQ3How do different BCE-based uniform losses compare in terms of convergence and performance on open-set and face recognition tasks?
  • RQ4To what extent do learned biases correspond to the unified thresholds used in uniform classification?
  • RQ5What is the relationship between feature uniformity, intra-class compactness, and inter-class distinctiveness under BCE-based training?

Key findings

  • BCE loss with a unified bias can learn a unified threshold for uniform classification.
  • Models trained with BCE loss achieve higher uniform classification accuracy than SoftMax loss on multiple datasets.
  • Learned biases in the BCE-based losses closely approximate the unified threshold used in uniform classification.
  • Features from BCE-trained models exhibit improved uniformity, intra-class compactness, and inter-class separability, benefiting open-set tasks such as face recognition.
  • Two BCE-based uniform losses (L_bce-u and L_bce-d) are proposed and shown to converge the threshold under certain conditions.
Figure 2: The distributions of positive and negative classification metrics of ResNet50 trained by $L_{\text{soft-nu}}$ (left) and $L_{\text{bce-nu}}$ (right) on ImageNet-1K. The smaller overlap between the positive and negative metrics of $L_{\text{bce-u}}$ and $L_{\text{bce-nu}}$ indicates that th
Figure 2: The distributions of positive and negative classification metrics of ResNet50 trained by $L_{\text{soft-nu}}$ (left) and $L_{\text{bce-nu}}$ (right) on ImageNet-1K. The smaller overlap between the positive and negative metrics of $L_{\text{bce-u}}$ and $L_{\text{bce-nu}}$ indicates that th

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.