[论文解读] From Softmax to Sparsemax: A Sparse Model of Attention and Multi-Label Classification
引入稀疏最大化(sparsemax),一种类似 softmax 的激活函数,可产生稀疏的概率分布,推导其性质与雅可比矩阵,提出一个凸的 sparsemax 损失,并展示其在多标签分类和自然语言处理中的选择性注意力方面的优势。
We propose sparsemax, a new activation function similar to the traditional softmax, but able to output sparse probabilities. After deriving its properties, we show how its Jacobian can be efficiently computed, enabling its use in a network trained with backpropagation. Then, we propose a new smooth and convex loss function which is the sparsemax analogue of the logistic loss. We reveal an unexpected connection between this new loss and the Huber classification loss. We obtain promising empirical results in multi-label classification problems and in attention-based neural networks for natural language inference. For the latter, we achieve a similar performance as the traditional softmax, but with a selective, more compact, attention focus.
研究动机与目标
- 说明在注意力和多标签场景中需要稀疏的概率输出的动机。
- 形式化 sparsemax 变换并推导其闭式解及关键性质。
- 引入一个基于 sparsemax 的凸且可微的损失函数,类似于逻辑损失。
- 展示 sparsemax 在多标签分类基准测试和自然语言推理的注意力机制中的有效性。
提出的方法
- 将 sparsemax 定义为向量在概率单纯形上的欧几里得投影。
- 给出 sparsemax 的闭式解,以及基于阈值 tau(z) 的 O(K) 评估算法。
- 推导 sparsemax 的雅可比矩阵并展示高效的向量-雅可比积以进行反向传播。
- 引入 sparsemax 损失,作为凸、可微的对比于逻辑损失的类比,梯度为 -q + sparsemax(z)。
- 将损失推广到多标签分类和稀疏标签比例。
- 将 sparsemax 应用于神经注意力,在自然语言推理的注意力机制中替代 softmax。
实验结果
研究问题
- RQ1在保留 softmax 的有用性质的同时,sparsemax 能否产生稀疏后验分布?
- RQ2如何构造一个与 sparsemax 配对训练的凸且可微损失?
- RQ3与基于 softmax 的模型相比,基于 sparsemax 的模型在多标签分类和基于注意力的 NLP 任务中是否具有竞争力?
- RQ4在实际应用中,稀疏最大化的计算特性(例如雅可比、反向传播效率)是什么?
主要发现
- sparsemax 能通过投影到简单形来输出稀疏的概率分布,与 softmax 拥有全支持度不同。
- sparsemax 变换是分段线性的,具有闭式解,并且可以在 O(K) 时间内计算。
- sparsemax 的雅可比矩阵使反向传播高效,类似于 softmax,在支撑集较小时可能更新更快。
- 所提 sparsemax 损失是凸的、可微的,在二分类情况下收敛到与 Huber 损失相关的形式。
- 在标签比例估计和多标签分类中,sparsemax 显示出具有竞争力或优越的性能,尤其是在信号强度增加时。
- 在 NLP 注意力实验中,SparseAttention 的性能与 SoftAttention 相当,具有非零、选择性注意力聚焦。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。