From SoftMax to Sparsemax: A Sparse Model of Attention and Multi-Label Classification

Abstract

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.

Cite

Text

Martins and Astudillo. "From SoftMax to Sparsemax: A Sparse Model of Attention and Multi-Label Classification." International Conference on Machine Learning, 2016.

Markdown

[Martins and Astudillo. "From SoftMax to Sparsemax: A Sparse Model of Attention and Multi-Label Classification." International Conference on Machine Learning, 2016.](https://mlanthology.org/icml/2016/martins2016icml-softmax/)

BibTeX

@inproceedings{martins2016icml-softmax,
  title     = {{From SoftMax to Sparsemax: A Sparse Model of Attention and Multi-Label Classification}},
  author    = {Martins, Andre and Astudillo, Ramon},
  booktitle = {International Conference on Machine Learning},
  year      = {2016},
  pages     = {1614-1623},
  volume    = {48},
  url       = {https://mlanthology.org/icml/2016/martins2016icml-softmax/}
}