r-softmax: Generalized Softmax with Controllable Sparsity Rate

Klaudia Bałazy, Łukasz Struski, Marek Śmieja, Jacek Tabor
4/11/2023
cs.LG

No confident code implementation found for this paper.

Abstract

Nowadays artificial neural network models achieve remarkable results in many disciplines. Functions mapping the representation provided by the model to the probability distribution are the inseparable aspect of deep learning solutions. Although softmax is a commonly accepted probability mapping function in the machine learning community, it cannot return sparse outputs and always spreads the positive probability to all positions. In this paper, we propose r-softmax, a modification of the softmax, outputting sparse probability distribution with controllable sparsity rate. In contrast to the existing sparse probability mapping functions, we provide an intuitive mechanism for controlling the output sparsity level. We show on several multi-label datasets that r-softmax outperforms other sparse alternatives to softmax and is highly competitive with the original softmax. We also apply r-softmax to the self-attention module of a pre-trained transformer language model and demonstrate that it leads to improved performance when fine-tuning the model on different natural language processing tasks.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{baazy2023rsoftmax,
  title  = {r-softmax: Generalized Softmax with Controllable Sparsity Rate},
  author = {Klaudia Bałazy and Łukasz Struski and Marek Śmieja and Jacek Tabor},
  year   = {2023},
  eprint = {2304.05243},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.05243v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2304.05243.svg)](https://codeofpaper.com/paper/2304.05243)

Discussion