Skip to main content
QUICK REVIEW

[论文解读] Sparse-softmax: A Simpler and Faster Alternative Softmax Transformation

Shaoshi Sun, Zhenyuan Zhang|arXiv (Cornell University)|Dec 23, 2021
Neural Networks and Applications被引用 6
一句话总结

本文提出了一种稀疏化Softmax(sparse-softmax),作为标准Softmax的简化且更快速的替代方案,通过仅对前k个logits进行归一化来强制实现稀疏性,显著提升了高维分类任务中的收敛速度与性能。实验结果表明,该方法在NLP和图像分类任务中均优于基线模型,尤其在结合预训练模型时表现更优。

ABSTRACT

The softmax function is widely used in artificial neural networks for the multiclass classification problems, where the softmax transformation enforces the output to be positive and sum to one, and the corresponding loss function allows to use maximum likelihood principle to optimize the model. However, softmax leaves a large margin for loss function to conduct optimizing operation when it comes to high-dimensional classification, which results in low-performance to some extent. In this paper, we provide an empirical study on a simple and concise softmax variant, namely sparse-softmax, to alleviate the problem that occurred in traditional softmax in terms of high-dimensional classification problems. We evaluate our approach in several interdisciplinary tasks, the experimental results show that sparse-softmax is simpler, faster, and produces better results than the baseline models.

研究动机与目标

  • 为解决标准Softmax在高维分类任务(d ≥ 100类)中收敛缓慢的问题。
  • 开发一种更简单、更高效的Softmax替代方案,利用输出分布中的稀疏性。
  • 评估稀疏化Softmax在多样化任务(包括NLP和图像分类)中的有效性。
  • 探究稀疏化Softmax是否通过减小交叉熵损失中的边际差距,缓解了预训练模型中的过拟合问题。

提出的方法

  • 稀疏化Softmax从输入向量z中选取前k个logits,其余设为零后再应用Softmax归一化。
  • 其变换定义为:若z_i属于前k个,则p_i = exp(z_i) / sum_{j in Ω_k} exp(z_j),否则为0。
  • 训练过程中使用改进的交叉熵损失函数,仅关注前k个预测结果,以提升优化效率。
  • 该方法在序列到序列任务(如摘要生成、问题生成)和图像分类(CIFAR-100)上进行了评估。
  • 实验对比了在微调和预训练模型设置下,稀疏化Softmax与标准Softmax的表现。
  • 超参数k通过平衡稀疏性与性能进行调优,k=5在序列任务中表现出显著提升。

实验结果

研究问题

  • RQ1通过前k个logits选择在Softmax输出中强制实现稀疏性,是否能提升高维分类任务中的收敛速度?
  • RQ2在NLP序列到序列任务(如摘要生成和问题生成)中,稀疏化Softmax与标准Softmax相比性能如何?
  • RQ3稀疏化Softmax是否能通过减小交叉熵损失中的边际差距,有效缓解预训练模型中的过拟合?
  • RQ4稀疏化Softmax的性能增益是否在不同模型架构和数据集(包括图像分类)中保持一致?
  • RQ5稀疏化Softmax的优势是否依赖于预训练权重,尤其是在高维输出空间中?

主要发现

  • 在Gigaword-10k数据集上,稀疏化Softmax在束搜索大小为1时,ROUGE-1提升0.67%,ROUGE-2提升0.79%,优于标准Softmax。
  • 在束搜索大小为5时,稀疏化Softmax实现ROUGE-1高出0.28%、ROUGE-2高出0.55%,表明其在解码质量上具有持续优势。
  • 在SQuAD 1.1的问题生成任务中,稀疏化Softmax在BLEU-1、BLEU-2、BLEU-3和BLEU-4上分别优于基线0.90%、0.62%、0.80%和0.82%。
  • 在CIFAR-100上,稀疏化Softmax在Densenet上未见提升(top-1准确率76.2% vs. 73.7%),表明在非预训练设置下收益有限。
  • 在InceptionV3(预训练模型)上,稀疏化Softmax将top-1准确率从77.1%提升至77.8%,证实其在预训练框架中的有效性。
  • 结果表明,稀疏化Softmax在减少过拟合并提升高维输出预训练模型的优化效率方面尤为有效。

更好的研究,从现在开始

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

无需绑定信用卡

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