# SimLoss: Class Similarities in Cross Entropy

arXiv: https://arxiv.org/abs/2003.03182 · HTML: https://mlsanity.com/paper/2003.03182/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 6 Mar 2020.

## Built on by (most cited first, 5 of 5)

- [Fine-grained TLS services classification with reject option](https://mlsanity.com/paper/2202.11984/) (2022)
- [The Tree Loss: Improving Generalization with Many Classes](https://mlsanity.com/paper/2204.07727/) (2022)
- [Towards Establishing Systematic Classification Requirements for Automated Driving](https://mlsanity.com/paper/2307.14058/) (2023)
- [Integrating ConvNeXt and Vision Transformers for Enhancing Facial Age Estimation](https://mlsanity.com/paper/2511.00123/) (2025)
- [When Labels Have Structure: Improving Image Classification with Hierarchy-Aware Cross-Entropy](https://mlsanity.com/paper/2605.06274/) (2026)

## Abstract (arXiv)

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. 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.
