Average-K classification is an alternative to top-K classification in which the number of labels returned varies with the ambiguity of the input image but must average to K over all the samples. A simple method to solve this task is to threshold the softmax output of a model trained with the cross-entropy loss. This approach is theoretically proven to be asymptotically consistent, but it is not guaranteed to be optimal for a finite set of samples. In this paper, we propose a new loss function based on a multi-label classification head in addition to the classical softmax. This second head is trained using pseudo-labels generated by thresholding the softmax head while guaranteeing that K classes are returned on average. We show that this approach allows the model to better capture ambiguities between classes and, as a result, to return more consistent sets of possible classes. Experiments on two datasets from the literature demonstrate that our approach outperforms the softmax baseline, as well as several other loss functions more generally designed for weakly supervised multi-label classification. The gains are larger the higher the uncertainty, especially for classes with few samples.
翻译:平均K分类是一种替代top-K分类的方法,其中返回的标签数量随输入图像的歧义程度变化,但必须对所有样本的平均值为K。解决该问题的一个简单方法是对使用交叉熵损失训练的模型的softmax输出设置阈值。该理论方法在渐近一致性上已被证明有效,但无法保证在有限样本集上达到最优。本文提出了一种基于多标签分类头(除经典softmax之外)的新型损失函数。该第二分类头通过阈值化softmax头生成的伪标签进行训练,同时保证平均返回K个类别。研究表明,该方法使模型能够更好地捕捉类别间的歧义性,从而返回更一致的候选类别集。在文献中两个数据集上的实验表明,我们的方法优于softmax基线以及几种通常用于弱监督多标签分类的损失函数。在不确定性更高时——尤其是针对样本量较少的类别——性能提升更为显著。