Skip to main content
QUICK REVIEW

[论文解读] Evaluation of Neural Architectures Trained with Square Loss vs Cross-Entropy in Classification Tasks

Like Hui, Mikhail Belkin|arXiv (Cornell University)|Jun 12, 2020
Domain Adaptation and Few-Shot Learning参考文献 42被引用 53
一句话总结

该论文通过实证比较平方损失与交叉熵在 NLP、ASR 和视觉任务中的表现,结果显示平方损失通常与交叉熵相匹配或优于交叉熵,尤其在 NLP/ASR 方面。

ABSTRACT

Modern neural architectures for classification tasks are trained using the cross-entropy loss, which is widely believed to be empirically superior to the square loss. In this work we provide evidence indicating that this belief may not be well-founded. We explore several major neural architectures and a range of standard benchmark datasets for NLP, automatic speech recognition (ASR) and computer vision tasks to show that these architectures, with the same hyper-parameter settings as reported in the literature, perform comparably or better when trained with the square loss, even after equalizing computational resources. Indeed, we observe that the square loss produces better results in the dominant majority of NLP and ASR experiments. Cross-entropy appears to have a slight edge on computer vision tasks. We argue that there is little compelling empirical or theoretical evidence indicating a clear-cut advantage to the cross-entropy loss. Indeed, in our experiments, performance on nearly all non-vision tasks can be improved, sometimes significantly, by switching to the square loss. Furthermore, training with square loss appears to be less sensitive to the randomness in initialization. We posit that training using the square loss for classification needs to be a part of best practices of modern deep learning on equal footing with cross-entropy.

研究动机与目标

  • 评估平方损失在现代神经分类器在 NLP、ASR 与计算机视觉任务中的表现是否可以匹配或超过交叉熵。
  • 使用文献报道的超参数评估一系列架构(CNN、LSTM、Transformer),并在需要时调整学习率。
  • 在等成本预算下,确定平方损失的性能和训练稳定性与交叉熵相比的差异。

提出的方法

  • 在 NLP、ASR 和视觉领域的 28 个神经模型/数据集组合上比较平方损失和交叉熵。
  • 使用文献中关于交叉熵的架构和超参数;仅替换损失为平方损失(并调整学习率)。
  • 在训练平方损失时应用损失缩放以适应大类别数量,并在训练时移除 softmax(如建议)。
  • 在多个随机初始化下,用领域特定指标(准确率、F1、PER/CER/WER、Top-5 准确率)进行评估。
  • 为平方损失运行两种协议:标准训练和使用与 CE 相同的 epoch 数进行训练,以实现计算量对齐。

实验结果

研究问题

  • RQ1平方损失在不同架构和数据集上是否提供与交叉熵相当或更优的准确率?
  • RQ2在任务之间等化计算资源(相同的 epoch)时,平方损失相对于交叉熵的表现如何?
  • RQ3是否存在领域相关的损失函数性能模式(例如 NLP/ASR 与计算机视觉之间)?

主要发现

  • 平方损失在整体上 28 个任务中有 22 个任务取得更好或等于交叉熵的准确率。
  • 平方损失在大多数实验中通常表现出更小的随机性方差。
  • 在 NLP 和 ASR 中,平方损失通常优于交叉熵;在视觉领域,交叉熵总体略有优势,但存在例外(如 ImageNet 上的 EfficientNet)。
  • 通过匹配 epoch 数来等化计算量,在非视觉任务中并未消除平方损失的优势,且可能保持或提升性能。
  • 在使用平方损失训练时建议移除 softmax 层,以避免优化障碍;损失缩放有助于多类别问题。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。