SimLoss: Class Similarities in Cross Entropy

Konstantin Kobs, Michael Steininger, Albin Zehe, Florian Lautenschlager, Andreas Hotho
3/6/2020
cs.LGstat.ML

Official code: konstantinkobs/SimLoss (25 stars, Python, last commit 2021-06-18).

Abstract

One common loss function in neural network classification tasks is Categorical Cross Entropy (CCE), which punishes all misclassifications equally. However, classes often have an inherent structure.

Show full abstract

For instance, classifying an image of a rose as "violet" is better than as "truck". We introduce SimLoss, a drop-in replacement for CCE that incorporates class similarities along with two techniques to construct such matrices from task-specific knowledge. We test SimLoss on Age Estimation and Image Classification and find that it brings significant improvements over CCE on several metrics. SimLoss therefore allows for explicit modeling of background knowledge by simply exchanging the loss function, while keeping the neural network architecture the same. Code and additional resources can be found at https://github.com/konstantinkobs/SimLoss.

View on arXivView PDF

Code Implementations(1)

A PyTorch implementation of our proposed loss function from the paper "SimLoss: Class Similarities in Cross Entropy"

253Python, ShellMar 2, 20205 years ago

Similar Papers

Cite this paper

@article{kobs2020simloss,
  title  = {SimLoss: Class Similarities in Cross Entropy},
  author = {Konstantin Kobs and Michael Steininger and Albin Zehe and Florian Lautenschlager and Andreas Hotho},
  year   = {2020},
  eprint = {2003.03182},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2003.03182}
}

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

Discussion