# Squared Earth Mover's Distance-based Loss for Training Deep Neural Networks

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

## Key facts

- Cited by 45 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 17 Nov 2016.

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

- [Hierarchical Neural Coding for Controllable CAD Model Generation](https://mlsanity.com/paper/2307.00149/) (2023)
- [Making Images Real Again: A Comprehensive Survey on Deep Image Composition](https://mlsanity.com/paper/2106.14490/) (2021)
- [Benign Overfitting in Multiclass Classification: All Roads Lead to Interpolation](https://mlsanity.com/paper/2106.10865/) (2021)
- [Non-Contrastive Unsupervised Learning of Physiological Signals from Video](https://mlsanity.com/paper/2303.07944/) (2023)
- [Advancing Sequential Numerical Prediction in Autoregressive Models](https://mlsanity.com/paper/2505.13077/) (2025)
- [Image Composition Assessment with Saliency-augmented Multi-pattern Pooling](https://mlsanity.com/paper/2104.03133/) (2021)
- [EVORA: Deep Evidential Traversability Learning for Risk-Aware Off-Road Autonomy](https://mlsanity.com/paper/2311.06234/) (2023)
- [Video Quality Assessment: A Comprehensive Survey](https://mlsanity.com/paper/2412.04508/) (2024)
- [Interpretable Vision-Language Survival Analysis with Ordinal Inductive Bias for Computational Pathology](https://mlsanity.com/paper/2409.09369/) (2024)
- [Generalization for multiclass classification with overparameterized linear models](https://mlsanity.com/paper/2206.01399/) (2022)
- [PIETRA: Physics-Informed Evidential Learning for Traversing Out-of-Distribution Terrain](https://mlsanity.com/paper/2409.03005/) (2024)
- [CLIP-PCQA: Exploring Subjective-Aligned Vision-Language Modeling for Point Cloud Quality Assessment](https://mlsanity.com/paper/2501.10071/) (2025)
- [Optical Flow for Video Super-Resolution: A Survey](https://mlsanity.com/paper/2203.10462/) (2022)
- [GeoGCN: Geometric Dual-domain Graph Convolution Network for Point Cloud Denoising](https://mlsanity.com/paper/2210.15913/) (2022)
- [Relax, it doesn't matter how you get there: A new self-supervised approach for multi-timescale behavior analysis](https://mlsanity.com/paper/2303.08811/) (2023)
- [Poisson Ordinal Network for Gleason Group Estimation Using Bi-Parametric MRI](https://mlsanity.com/paper/2407.05796/) (2024)
- [The Earth Mover's Pinball Loss: Quantiles for Histogram-Valued Regression](https://mlsanity.com/paper/2106.02051/) (2021)
- [United We Learn Better: Harvesting Learning Improvements From Class Hierarchies Across Tasks](https://mlsanity.com/paper/2107.13627/) (2021)
- [From Chatter to Matter: Addressing Critical Steps of Emotion Recognition Learning in Task-oriented Dialogue](https://mlsanity.com/paper/2308.12648/) (2023)
- [Impact of Sunglasses on One-to-Many Facial Identification Accuracy](https://mlsanity.com/paper/2412.05721/) (2024)
- [Comparative assessment of federated and centralized machine learning](https://mlsanity.com/paper/2202.01529/) (2022)
- [SiNC+: Adaptive Camera-Based Vitals with Unsupervised Learning of Periodic Signals](https://mlsanity.com/paper/2404.13449/) (2024)
- [TabTreeFormer: Tabular Data Generation Using Hybrid Tree-Transformer](https://mlsanity.com/paper/2501.01216/) (2025)
- [A Deep Drift-Diffusion Model for Image Aesthetic Score Distribution Prediction](https://mlsanity.com/paper/2010.07661/) (2020)
- [On Understanding and Mitigating the Dimensional Collapse of Graph Contrastive Learning: a Non-Maximum Removal Approach](https://mlsanity.com/paper/2203.12821/) (2022)
- [Constrained Mass Optimal Transport](https://mlsanity.com/paper/2206.13352/) (2022)
- [Tetris-inspired detector with neural network for radiation mapping](https://mlsanity.com/paper/2302.07099/) (2023)
- [Enhanced detection of the presence and severity of COVID-19 from CT scans using lung segmentation](https://mlsanity.com/paper/2303.09440/) (2023)
- [Differentiable Earth Mover's Distance for Data Compression at the High-Luminosity LHC](https://mlsanity.com/paper/2306.04712/) (2023)
- [A Canonical Data Transformation for Achieving Inter- and Within-group Fairness](https://mlsanity.com/paper/2310.15097/) (2023)

## Abstract (arXiv)

In the context of single-label classification, despite the huge success of deep learning, the commonly used cross-entropy loss function ignores the intricate inter-class relationships that often exist in real-life tasks such as age classification. In this work, we propose to leverage these relationships between classes by training deep nets with the exact squared Earth Mover's Distance (also known as Wasserstein distance) for single-label classification. The squared EMD loss uses the predicted probabilities of all classes and penalizes the miss-predictions according to a ground distance matrix that quantifies the dissimilarities between classes. We demonstrate that on datasets with strong inter-class relationships such as an ordering between classes, our exact squared EMD losses yield new state-of-the-art results. Furthermore, we propose a method to automatically learn this matrix using the CNN's own features during training. We show that our method can learn a ground distance matrix efficiently with no inter-class relationship priors and yield the same performance gain. Finally, we show that our method can be generalized to applications that lack strong inter-class relationships and still maintain state-of-the-art performance. Therefore, with limited computational overhead, one can always deploy the proposed loss function on any dataset over the conventional cross-entropy.
