NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Metrizing the Label Space with Semantic Loss Functions

This direction is split into other directions: uniform misclassification penalty. Its last version stays readable and citable here.

Version 1 of 1104 papers105 conceptsfrozen 2026-10-04

In standard machine learning, we treat classification as a "flat" problem. If a model is trained to identify dog breeds and mistakes a Siberian Husky for a Golden Retriever, the standard Cross-Entropy loss penalizes that error exactly the same as if the model had called the husky a "Toaster."

This "all-or-nothing" approach, as noted by Meihao Chen and Kyunghyun Cho in Graph Convolutional Networks for Classification with a Structured Label Space, ignores the rich semantic structure of the real world. Recent research across vision, language, and robotics suggests that by "metrizing" the label space—teaching models that some mistakes are "less wrong" than others—we can achieve better generalization, more robust uncertainty quantification, and safer autonomous systems.

The Problem with Flat Objectives

Traditional training objectives like Maximum Likelihood Estimation (MLE) or Cross-Entropy assume a categorical distribution where every class is equidistant from every other class. This lack of topological structure prevents models from learning the underlying relationships between concepts.

As Siyu Ren and Kenny Q. Zhu argue in their work on Earth Mover Distance Optimization (EMO), this binary view of correctness is particularly damaging in language modeling. A model that predicts "sofa" instead of "couch" is penalized as harshly as one that predicts "bicycle." This forces the model to spend its capacity memorizing exact tokens rather than learning the semantic manifold of the vocabulary.

Mechanisms for Semantic Awareness

To fix this, researchers have introduced several ways to bake "distance" into the loss function:

1. Hierarchical and Tree-based Losses

If classes are organized in a taxonomy (e.g., Animal $\rightarrow$ Mammal $\rightarrow$ Dog), we can scale the penalty based on how high up the tree the first common ancestor is. Yujie Wang and Mike Izbicki introduced the Tree Loss, which forces semantically similar classes to share parameters. This provides a provable improvement in generalization error, especially in "many-class" scenarios like ImageNet, because the model learns features that are useful for entire branches of the hierarchy simultaneously.

2. Optimal Transport and Wasserstein Metrics

Instead of measuring the distance between two discrete points, we can treat the model's prediction as a distribution and calculate the "cost" of moving that distribution to the ground truth. Xiaofeng Liu applied this in Reinforced Wasserstein Training for autonomous driving. In this framework, mistaking a pedestrian for a road is assigned a much higher "transport cost" than mistaking a car for a bus, forcing the model to prioritize avoiding catastrophic errors.

3. Semantic Smoothing and Priors

Rather than a "one-hot" target where the probability of the correct class is 1 and all others are 0, we can "smooth" the target distribution based on semantic similarity. Zuchao Li and colleagues developed the Data-dependent Gaussian Prior (D2GPo), which rewards models for making "reasonable" mistakes. By assigning a small amount of target probability to synonyms or related concepts, the training signal becomes more informative and less brittle.

Why It Works: Intuition and Benefits

The primary intuition behind these methods is graceful degradation. When a model is uncertain, a flat loss function gives it no guidance on which "wrong" answer to pick. A semantic loss function, however, acts as a regularizer that pulls the model toward the most plausible neighborhood of the label space.

  • Efficiency in Uncertainty: In Conformal Prediction, Ariel Fargion and Tom Tirer showed in Enhancing Conformal Prediction via Class Similarity that penalizing semantically unrelated classes actually reduces the average size of prediction sets. By forcing the model to be "coherently wrong," the resulting confidence intervals become tighter and more useful.
  • Robustness to Noise: Gautam Rajendrakumar Gare and John Galeotti demonstrated that Projective Loss Functions allow models to "relax" their penalty when confusing similar objects. This makes the training process significantly more robust to noisy or mislabeled data, as the model isn't forced to learn sharp, arbitrary boundaries between semantically overlapping concepts.
  • Overcoming Knowledge Inertia: In Visual Question Answering (VQA), models often rely on "knowledge inertia"—guessing "yellow" for a banana regardless of the image. Corentin Kervadec and Christian Wolf found that estimating the semantic structure of the answer space helps models distinguish between near-misses and hallucinations, forcing them to look closer at the visual evidence to resolve fine-grained differences.

Applications Across Domains

The shift toward semantic-aware objectives is visible across diverse fields:

By treating the output space as a metric space rather than a flat list, these researchers are moving machine learning closer to human-like reasoning, where the severity of a mistake is as important as the mistake itself.

Papers in this version

Showing 60 of 104 papers.

History & citationVersion 1 · 2026-10-04

Split into other directions · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_metrizing_the_label_space_with_semantic__580e9eda,
  title = {Metrizing the Label Space with Semantic Loss Functions},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/metrizing-the-label-space-with-semantic-loss-functions/rdr_580e9edaa8544b9dbd775ea558fc46ed},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-28},
}

This exact version (version 1, frozen text):

@misc{lacuna_metrizing_the_label_space_with_semantic__580e9eda_v1,
  title = {Metrizing the Label Space with Semantic Loss Functions},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/metrizing-the-label-space-with-semantic-loss-functions/rdr_580e9edaa8544b9dbd775ea558fc46ed/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-28},
}