Skip to main content
QUICK REVIEW

[论文解读] PolyLoss: A Polynomial Expansion Perspective of Classification Loss Functions

Zhaoqi Leng, Mingxing Tan|arXiv (Cornell University)|Apr 26, 2022
Advanced Neural Network ApplicationsComputer Science被引用 84
一句话总结

PolyLoss 提出一个多项式展开框架来设计分类损失,显示对简单的领先系数调优(Poly-1)在图像分类、检测、分割和3D检测任务中持续优于交叉熵和焦点损失。

ABSTRACT

Cross-entropy loss and focal loss are the most common choices when training deep neural networks for classification problems. Generally speaking, however, a good loss function can take on much more flexible forms, and should be tailored for different tasks and datasets. Motivated by how functions can be approximated via Taylor expansion, we propose a simple framework, named PolyLoss, to view and design loss functions as a linear combination of polynomial functions. Our PolyLoss allows the importance of different polynomial bases to be easily adjusted depending on the targeting tasks and datasets, while naturally subsuming the aforementioned cross-entropy loss and focal loss as special cases. Extensive experimental results show that the optimal choice within the PolyLoss is indeed dependent on the task and dataset. Simply by introducing one extra hyperparameter and adding one line of code, our Poly-1 formulation outperforms the cross-entropy loss and focal loss on 2D image classification, instance segmentation, object detection, and 3D object detection tasks, sometimes by a large margin.

研究动机与目标

  • 将损失函数设计动机化为多项式展开,以统一并扩展 CE 和 focal 损失。
  • 将 PolyLoss 介绍为多项式基 (1-P_t)^j 的线性组合,以便针对任务/数据集进行定制。
  • 证明调整多项式系数,尤其是首项,在尽量少的代码改动下即可带来实用提升。
  • 在 2D 图像分类、实例分割、3D 目标检测和多任务设置中展示实证改进。

提出的方法

  • 将 CE 和 focal 损失表示为 (1 - P_t) 的多项式基的无限级数。
  • 提出 PolyLoss:L = sum_j alpha_j (1 - P_t)^j,其中 alpha_j 为非负。
  • 表明 CE 对应于 alpha_j = 1/j;focal 损失对应于系数的水平平移,由 gamma 决定。
  • 提出简单的 Poly-1 损失:L_Poly-1 = -log(P_t) + epsilon_1 (1 - P_t),只有一个可调的 epsilon_1。
  • 对 epsilon_1 进行有针对性的网格搜索(额外的一行代码)以提升性能。
  • 在 ImageNet-1K/21K、COCO 和 Waymo Open Dataset 上对多种模型进行评估。

实验结果

研究问题

  • RQ1分类损失的多项式展开视角能否在 PolyLoss 下统一 CE 和 focal 损失?
  • RQ2是否通过垂直调整首项等前导多项式系数(尤其是第一项)在最小化超参数负担下带来更好的任务/数据集性能?
  • RQ3相较于 CE 和 focal 损失,PolyLoss 在多种任务(2D/3D 检测、分割和大规模分类)上的表现如何?
  • RQ4从 PolyLoss 框架中可以得出关于不平衡数据集损失设计的哪些见解?

主要发现

  • 使用简单的 Poly-1 形式的 PolyLoss 在各任务上优于交叉熵和 focal 损失:ImageNet-1K +0.4%(87.2 vs 86.8),ImageNet-21K +0.6%(46.4 vs 45.8),COCO 检测/分割 +0.4%(87.2 vs 86.8),Waymo 3D 检测 +2.5%(49.7 vs 47.2)。
  • 在多种模型和任务中,Poly-1 始终提升性能,相对基线(CE 或 focal)的增益包括 +0.6、+0.4、+2.5、+2.1、+0.4、+0.7、+0.5、+0.8。
  • 首项多项式项 (1 - P_t) 在训练过程中贡献了大量梯度,其系数的调优可显著提升准确性。
  • 对于不平衡的 ImageNet-21K,第一项多项式的正 epsilon 会提升预测置信度和准确性;而对于基于 COCO 的检测,负的 epsilon 可以减少过度自信的预测并改善指标。
  • PolyLoss 在与较大模型(如 EfficientNetV2)相比下实现了速度/效率的同等,并且在几乎不需要代码改动的情况下,接近或超过 CE/focal 的性能。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。