Exploring Alternatives to Softmax Function

Kunal Banerjee, Vishak Prasad C, Rishi Raj Gupta, Karthik Vyas, Anushree H +1 more
11/23/2020
cs.LG

Official code: kunalbanerjee/softmax_alternatives (2 stars, Python, GPL-3.0, last commit 2021-08-24).

Abstract

Softmax function is widely used in artificial neural networks for multiclass classification, multilabel classification, attention mechanisms, etc. However, its efficacy is often questioned in literature.

Show full abstract

The log-softmax loss has been shown to belong to a more generic class of loss functions, called spherical family, and its member log-Taylor softmax loss is arguably the best alternative in this class. In another approach which tries to enhance the discriminative nature of the softmax function, soft-margin softmax (SM-softmax) has been proposed to be the most suitable alternative. In this work, we investigate Taylor softmax, SM-softmax and our proposed SM-Taylor softmax, an amalgamation of the earlier two functions, as alternatives to softmax function. Furthermore, we explore the effect of expanding Taylor softmax up to ten terms (original work proposed expanding only to two terms) along with the ramifications of considering Taylor softmax to be a finite or infinite series during backpropagation. Our experiments for the image classification task on different datasets reveal that there is always a configuration of the SM-Taylor softmax function that outperforms the normal softmax function and its other alternatives.

View on arXivView PDF

Code Implementations(1)

GPL-3.0

Code for "Exploring Alternatives to Softmax Function"

24Python, ShellNov 30, 20205 years agoGPL-3.0

Similar Papers

Cite this paper

@article{banerjee2020exploring,
  title  = {Exploring Alternatives to Softmax Function},
  author = {Kunal Banerjee and Vishak Prasad C and Rishi Raj Gupta and Karthik Vyas and Anushree H and Biswajit Mishra},
  year   = {2020},
  eprint = {2011.11538},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2011.11538}
}

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/2011.11538.svg)](https://codeofpaper.com/paper/2011.11538)

Discussion