arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1802.07595cs.LG
收藏

用于深度Top-k分类的平滑损失函数

Smooth Loss Functions for Deep Top-k Classification

Department of Engineering ScienceUniversity of Oxford(牛津大学工程科学系);Alan Turing Institute(艾伦图灵研究所)

Leonard Berrada, Andrew Zisserman, M. Pawan Kumar

摘要:

top-k误差是机器学习和计算机视觉中性能的常用度量。在实践中,top-k分类通常是用交叉熵损失训练的深度神经网络来执行的。理论结果确实表明,交叉熵是一个最佳的学习目标,这样的任务在无限的数据的限制。然而,在有限且有噪声的数据的背景下,使用专门为top-k分类设计的损失函数可以带来显著的改进。我们的经验证据表明,损失函数必须是平滑的,并且具有非稀疏梯度,以便与深度神经网络一起工作。因此,我们引入了一系列平滑的损失函数,它们适合通过深度学习进行top-k优化。广泛使用的交叉熵是我们家族的一个特例。评估我们的平滑损失函数在计算上具有挑战性:一个简单的算法需要$\mathcal{O}(\binom{n}{k})$操作,其中n是类的数量。由于连接到多项式代数和分而治之的方法,我们提供了一个算法的时间复杂度为$\mathcal{O}(k n)$。此外,我们提出了一种新的近似,以获得快速和稳定的单浮点精度的GPU上的算法。对于k=5的主要用例,我们比较了交叉熵损失和基于边缘的损失在各种噪声和数据大小的情况下的性能。我们的研究表明,我们的损失是更强大的噪声和过拟合比交叉熵。

英文摘要:

The top-k error is a common measure of performance in machine learning and computer vision. In practice, top-k classification is typically performed with deep neural networks trained with the cross-entropy loss. Theoretical results indeed suggest that cross-entropy is an optimal learning objective for such a task in the limit of infinite data. In the context of limited and noisy data however, the use of a loss function that is specifically designed for top-k classification can bring significant improvements. Our empirical evidence suggests that the loss function must be smooth and have non-sparse gradients in order to work well with deep neural networks. Consequently, we introduce a family of smoothed loss functions that are suited to top-k optimization via deep learning. The widely used cross-entropy is a special case of our family. Evaluating our smooth loss functions is computationally challenging: a naïve algorithm would require $\mathcal{O}(\binom{n}{k})$ operations, where n is the number of classes. Thanks to a connection to polynomial algebra and a divide-and-conquer approach, we provide an algorithm with a time complexity of $\mathcal{O}(k n)$. Furthermore, we present a novel approximation to obtain fast and stable algorithms on GPUs with single floating point precision. We compare the performance of the cross-entropy loss and our margin-based losses in various regimes of noise and data size, for the predominant use case of k=5. Our investigation reveals that our loss is more robust to noise and overfitting than cross-entropy.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑