[论文解读] sigmoidF1: A Smooth F1 Score Surrogate Loss for Multilabel Classification
该论文提出了一种平滑、可微分的代理损失函数 sigmoidF1,用于多标签分类任务,通过使用Sigmoid函数近似F1计算中的阶跃函数,直接优化宏观F1分数。在四个不同数据集(一个文本数据集,三个图像数据集)上,该方法在多个指标上均优于标准损失函数(如交叉熵),表明使用度量感知损失可提升多标签设定下的性能。
Multiclass multilabel classification is the task of attributing multiple labels to examples via predictions. Current models formulate a reduction of the multilabel setting into either multiple binary classifications or multiclass classification, allowing for the use of existing loss functions (sigmoid, cross-entropy, logistic, etc.). Multilabel classification reductions do not accommodate for the prediction of varying numbers of labels per example and the underlying losses are distant estimates of the performance metrics. We propose a loss function, sigmoidF1, which is an approximation of the F1 score that (1) is smooth and tractable for stochastic gradient descent, (2) naturally approximates a multilabel metric, and (3) estimates label propensities and label counts. We show that any confusion matrix metric can be formulated with a smooth surrogate. We evaluate the proposed loss function on text and image datasets, and with a variety of metrics, to account for the complexity of multilabel classification evaluation. sigmoidF1 outperforms other loss functions on one text and two image datasets and several metrics. These results show the effectiveness of using inference-time metrics as loss functions for non-trivial classification problems like multilabel classification.
研究动机与目标
- 解决多标签分类中标准损失函数(如交叉熵)与评估指标(如F1)之间的不一致问题。
- 通过引入基于Sigmoid近似的平滑代理函数,克服优化非可微分指标(如F1)的困难。
- 在单一统一的损失函数中实现标签预测与标签数量估计的联合优化。
- 证明将推理时使用的度量指标作为训练目标,可提升在多种模态和模型架构下的泛化性能。
提出的方法
- 提出使用Sigmoid函数对宏观F1分数进行平滑、可微分的近似,以替代F1计算中的硬阈值步骤。
- 将代理F1分数定义为logits的连续函数,从而支持通过随机梯度下降进行反向传播。
- 将损失函数表述为 $\mathcal{L}_{\widetilde{\mathit{F1}}} = 1 - \widetilde{\mathit{F1}}$,通过最小化平滑F1分数的倒数来实现优化。
- 将损失函数集成到标准深度学习流水线中,配合分类头和Sigmoid激活函数,支持端到端训练。
- 通过批量级别的宏观F1计算,确保所有类别上的度量实现全局优化。
- 提出一种无界变体 unboundedF1,以降低超参数敏感性,同时保持优异性能。
实验结果
研究问题
- RQ1能否构建一种平滑、可微分的宏观F1分数代理函数,使其在多标签分类训练过程中可直接优化?
- RQ2与传统的交叉熵等损失函数相比,使用sigmoidF1进行优化是否能在标准多标签指标上带来性能提升?
- RQ3sigmoidF1在不同数据模态(文本、图像)、模型架构和数据集规模下是否具有鲁棒性?
- RQ4所提出的损失函数能否同时提升多标签设定下的标签预测准确率与标签数量估计能力?
- RQ5在多标签学习中,将基于度量的损失(如F1)作为训练目标,与使用标准交叉熵相比,其影响如何?
主要发现
- 在1个文本数据集和3个图像数据集上,sigmoidF1在加权F1指标上均优于标准交叉熵及其他基线损失函数。
- 该方法在多种数据集和模型架构上均实现了精度、召回率和F1等多项目标的稳定提升。
- 在MS-COCO图像数据集上,sigmoidF1实现了15.20的宏观F1分数,优于基准中其他损失函数。
- 无界变体 unboundedF1 消除了超参数调优需求,在大多数指标上表现优于标准多分类损失函数。
- 性能提升在不同模型类型(包括CNN和基于BERT的模型)中均被观察到,表明其对架构和模态具有鲁棒性。
- 本研究提供了实证证据,表明使用度量感知损失(如sigmoidF1)进行训练,可实现训练目标与评估指标之间的更好对齐。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。