[论文解读] Alternate Loss Functions for Classification and Robust Regression Can Improve the Accuracy of Artificial Neural Networks
本文提出了四种新的损失函数——L、M、full L 和 full M——用于分类任务,以及一种平滑绝对误差(SMAE)损失用于鲁棒回归,所有损失函数均旨在通过提供比标准交叉熵或均方误差更优的误差惩罚机制来提升神经网络的准确性。新提出的损失函数,尤其是SMAE和L/M变体,在图像、文本和回归基准测试中显著优于传统损失函数,且仅需极少的超参数调优。
All machine learning algorithms use a loss, cost, utility or reward function to encode the learning objective and oversee the learning process. This function that supervises learning is a frequently unrecognized hyperparameter that determines how incorrect outputs are penalized and can be tuned to improve performance. This paper shows that training speed and final accuracy of neural networks can significantly depend on the loss function used to train neural networks. In particular derivative values can be significantly different with different loss functions leading to significantly different performance after gradient descent based Backpropagation (BP) training. This paper explores the effect on performance of using new loss functions that are also convex but penalize errors differently compared to the popular Cross-entropy loss. Two new classification loss functions that significantly improve performance on a wide variety of benchmark tasks are proposed. A new loss function call smooth absolute error that outperforms the Squared error, Huber and Log-Cosh losses on datasets with significantly many outliers is proposed. This smooth absolute error loss function is infinitely differentiable and more closely approximates the absolute error loss compared to the Huber and Log-Cosh losses used for robust regression.
研究动机与目标
- 探究替代性损失函数是否能够超越标准交叉熵和均方误差,在深度神经网络中提升准确率和训练动态性能。
- 设计凸性、无限可微的损失函数,以更精确地逼近分类和鲁棒回归的理想误差惩罚机制。
- 在多种架构和数据集(包括视觉和NLP基准)上评估新损失函数的性能表现。
- 提出一种平滑、无超参数的Huber和Log-Cosh损失替代方案,用于鲁棒回归,以更精确地逼近绝对误差。
- 证明基于统计估计理论设计的损失函数并不一定最优,可通过有针对性的设计实现进一步优化。
提出的方法
- 提出L和M损失函数作为二元交叉熵的凸替代方案,其中L对误分类样本的惩罚较轻,M则更严厉。
- 引入full L和full M损失函数作为增强版本,通过同时建模标签和预测的不确定性,以提升泛化能力。
- 提出平滑绝对误差(SMAE)损失,作为均方绝对误差(MAE)的无限可微、无超参数的近似,适用于鲁棒回归。
- SMAE在数学上被定义为一种平滑且凸的函数,能紧密逼近绝对误差,且无需像Huber损失那样依赖超参数。
- 使用Adam优化器以固定学习率1e-5在多个基准上进行训练,包括Imagenette、CFPB和IMDB,采用VGG-19、LSTM和BERT等标准架构。
- 在训练准确率、测试准确率、损失曲线和收敛速度等方面,对比五种损失函数的表现:二元交叉熵(BCE)、L、M、full L和full M。
实验结果
研究问题
- RQ1在深度神经网络中,替代性凸损失函数是否能够超越标准二元交叉熵,提升分类准确率?
- RQ2L和M损失函数在梯度动态和收敛行为方面与交叉熵相比表现如何?
- RQ3一种平滑、无限可微的损失函数是否能在存在重尾异常值的回归任务中超越Huber和Log-Cosh损失?
- RQ4所提出的SMAE损失是否在无需额外超参数的情况下保持对异常值的鲁棒性?
- RQ5这些新损失函数是否能在不同架构和领域(如计算机视觉和NLP)之间实现良好泛化?
主要发现
- 在Imagenette基准上,full L损失实现了78%的测试准确率,优于二元交叉熵(74%)及其他变体。
- 在CFPB文本分类基准上,L和M损失函数使测试准确率相比二元交叉熵最高提升了4个百分点。
- 在IMDB情感分析基准上,full L损失达到85.77%的测试准确率,超过二元交叉熵(85.51%)及其他损失函数。
- SMAE损失在回归任务中表现出对异常值的优越鲁棒性,且无需调参,优于Huber和Log-Cosh损失。
- 使用L和M损失训练的模型展现出更快的收敛速度和更稳定的损失曲线,如图7和图8所示,表明优化动态得到改善。
- full L和full M损失在所有评估基准上均表现出一致的性能提升,表明其在不同任务和架构间具有强大的泛化能力。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。