# The Real-World-Weight Cross-Entropy Loss Function: Modeling the Costs of Mislabeling

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

## Key facts

- Cited by 64 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 3 Jan 2020.

## Built on by (most cited first, 30 of 64)

- [Non-IID data and Continual Learning processes in Federated Learning: A long road ahead](https://mlsanity.com/paper/2111.13394/) (2021)
- [Generative Modeling of Turbulence](https://mlsanity.com/paper/2112.02548/) (2021)
- [Uni-Layout: Integrating Human Feedback in Unified Layout Generation and Evaluation](https://mlsanity.com/paper/2508.02374/) (2025)
- [ECONet: Efficient Convolutional Online Likelihood Network for Scribble-based Interactive Segmentation](https://mlsanity.com/paper/2201.04584/) (2022)
- [Phase Recognition in Contrast-Enhanced CT Scans based on Deep Learning and Random Sampling](https://mlsanity.com/paper/2203.11206/) (2022)
- [LaneSNNs: Spiking Neural Networks for Lane Detection on the Loihi Neuromorphic Processor](https://mlsanity.com/paper/2208.02253/) (2022)
- [Medical Image Segmentation with InTEnt: Integrated Entropy Weighting for Single Image Test-Time Adaptation](https://mlsanity.com/paper/2402.09604/) (2024)
- [Comparative validation of surgical phase recognition, instrument keypoint estimation, and instrument instance segmentation in endoscopy: Results of the PhaKIR 2024 challenge](https://mlsanity.com/paper/2507.16559/) (2025)
- [Scenario generation for market risk models using generative neural networks](https://mlsanity.com/paper/2109.10072/) (2021)
- [FedSyn: Synthetic Data Generation using Federated Learning](https://mlsanity.com/paper/2203.05931/) (2022)
- [LCDctCNN: Lung Cancer Diagnosis of CT scan Images Using CNN Based Model](https://mlsanity.com/paper/2304.04814/) (2023)
- [Balanced and Explainable Social Media Analysis for Public Health with Large Language Models](https://mlsanity.com/paper/2309.05951/) (2023)
- [Guided Masked Self-Distillation Modeling for Distributed Multimedia Sensor Event Analysis](https://mlsanity.com/paper/2404.08264/) (2024)
- [How many samples are needed to train a deep neural network?](https://mlsanity.com/paper/2405.16696/) (2024)
- [Event Detection on Dynamic Graphs](https://mlsanity.com/paper/2110.12148/) (2021)
- [Generalization capabilities of conditional GAN for turbulent flow under changes of geometry](https://mlsanity.com/paper/2302.09945/) (2023)
- [Exploring Large-scale Unlabeled Faces to Enhance Facial Expression Recognition](https://mlsanity.com/paper/2303.08617/) (2023)
- [SemSegLoss: A python package of loss functions for semantic segmentation](https://mlsanity.com/paper/2106.05844/) (2021)
- [A novel Deep Learning approach for one-step Conformal Prediction approximation](https://mlsanity.com/paper/2207.12377/) (2022)
- [Adaptive Multi-scale Online Likelihood Network for AI-assisted Interactive Segmentation](https://mlsanity.com/paper/2303.13696/) (2023)
- [3DS-SLAM: A 3D Object Detection based Semantic SLAM towards Dynamic Indoor Environments](https://mlsanity.com/paper/2310.06385/) (2023)
- [Skin Cancer Detection utilizing Deep Learning: Classification of Skin Lesion Images using a Vision Transformer](https://mlsanity.com/paper/2407.18554/) (2024)
- [Automatic defect segmentation by unsupervised anomaly learning](https://mlsanity.com/paper/2202.02998/) (2022)
- [LMFLOSS: A Hybrid Loss For Imbalanced Medical Image Classification](https://mlsanity.com/paper/2212.12741/) (2022)
- [FLCC: Efficient Distributed Federated Learning on IoMT over CSMA/CA](https://mlsanity.com/paper/2304.13549/) (2023)
- [Background-Foreground Segmentation for Interior Sensing in Automotive Industry](https://mlsanity.com/paper/2109.09410/) (2021)
- [DXM-TransFuse U-net: Dual Cross-Modal Transformer Fusion U-net for Automated Nerve Identification](https://mlsanity.com/paper/2202.13304/) (2022)
- [Resolution enhancement of placenta histological images using deep learning](https://mlsanity.com/paper/2208.00163/) (2022)
- [CAMRI Loss: Improving Recall of a Specific Class without Sacrificing Accuracy](https://mlsanity.com/paper/2209.10920/) (2022)
- [Xtreme Margin: A Tunable Loss Function for Binary Classification Problems](https://mlsanity.com/paper/2211.00176/) (2022)

## Abstract (arXiv)

In this paper, we propose a new metric to measure goodness-of-fit for classifiers, the Real World Cost function. This metric factors in information about a real world problem, such as financial impact, that other measures like accuracy or F1 do not. This metric is also more directly interpretable for users. To optimize for this metric, we introduce the Real-World- Weight Crossentropy loss function, in both binary and single-label classification variants. Both variants allow direct input of real world costs as weights. For single-label, multicategory classification, our loss function also allows direct penalization of probabilistic false positives, weighted by label, during the training of a machine learning model. We compare the design of our loss function to the binary crossentropy and categorical crossentropy functions, as well as their weighted variants, to discuss the potential for improvement in handling a variety of known shortcomings of machine learning, ranging from imbalanced classes to medical diagnostic error to reinforcement of social bias. We create scenarios that emulate those issues using the MNIST data set and demonstrate empirical results of our new loss function. Finally, we sketch a proof of this function based on Maximum Likelihood Estimation and discuss future directions.
