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

Dist Loss: Enhancing Regression in Few-Shot Region through Distribution Distance Constraint

Guangkun Nie, Gongzheng Tang, Shenda Hong

TL;DR

Dist Loss is a novel loss function designed to fix a major headache in deep learning: imbalanced regression. By forcing the distribution of a model's predictions to match the true distribution of labels—rather than just minimizing point-by-point error—it significantly boosts accuracy in "few-shot" regions where data is scarce but often critically important.

What Problem Does This Paper Address?

In the real world, data is rarely distributed evenly. In regression tasks—where we predict continuous values like age, price, or medical vitals—models tend to get very good at predicting common values (the "many-shot" region) but fail miserably at predicting rare, extreme values (the "few-shot" region).

Comparison of label distribution and model predictions with and without Dist Loss.

Consider a healthcare model predicting potassium levels from an ECG. Most people have normal levels. If a model simply predicts "normal" every time, its average error looks great, but it completely misses the rare, life-threatening cases of hyperkalemia. This "bias toward the mean" happens because standard loss functions (like MSE or L1) don't account for the global shape of the data; they only care about individual sample errors. As a result, vanilla models often produce predictions that are heavily concentrated around the mean, failing to capture the true variance of the target variable.

Methods

The authors introduce Dist Loss, a dual-objective loss function. It combines standard sample-wise error with a new distribution distance constraint. The goal is to ensure the model's output "looks" like the ground truth distribution.

Overview of the Dist Loss calculation process during training.

The process involves three clever steps:

  1. Generating Pseudo-labels: The authors use Kernel Density Estimation (KDE) on the entire training set to model the label distribution. During training, they sample from this KDE to create a sequence of "pseudo-labels" that represent what a balanced batch should look like.
  2. Constructing Pseudo-predictions: To compare the model's current batch of predictions to these pseudo-labels, they need to align them. They do this by sorting the model's predictions.
  3. Differentiable Sorting: Sorting is normally a non-differentiable operation (you can't take a gradient through it). To make this work in a neural network, the authors employ a fast differentiable sorting algorithm (based on projections onto permutation polytopes). This allows the model to learn how to "reshape" its output distribution during backpropagation.

By minimizing the distance between the sorted predictions and the sampled pseudo-labels, the model is incentivized to spread its predictions across the entire label space, even into the sparse, few-shot regions.

Datasets

The researchers evaluated Dist Loss on three diverse datasets:

  • IMDB-WIKI-DIR: A large-scale dataset for age estimation from facial images.
  • AgeDB-DIR: A smaller, more challenging "in-the-wild" age estimation dataset.
  • ECG-K-DIR: A newly curated healthcare dataset (sourced from MIMIC-IV) containing 375,745 pairs of ECG signals and potassium concentration values. This dataset is highly imbalanced, mimicking real-world clinical scenarios.

Key Insights and Ideas

  • Distribution Alignment vs. Point Accuracy: The "aha moment" here is that individual sample accuracy isn't enough for imbalanced data. By treating the batch as a mini-distribution and aligning it with the global prior, the model gains a "sense" of the rare regions it usually ignores.
  • Plug-and-Play Compatibility: Dist Loss isn't a replacement for existing imbalanced regression techniques like LDS (Label Distribution Smoothing) or FDS (Feature Distribution Smoothing); it’s a complement. It can be added to almost any existing pipeline to provide an extra boost.
  • No Extra Inference Cost: Because Dist Loss is only used during training, the final model is just as fast as a standard regressor during deployment.

Key Results

The results across all three datasets were impressive, particularly in the few-shot regions:

  • State-of-the-Art (SOTA): Dist Loss achieved the lowest Mean Absolute Error (MAE) in few-shot regions compared to all baselines. For example, on the AgeDB-DIR dataset, it reduced few-shot MAE from 12.89 (vanilla) to 9.12.
  • Synergy: When combined with other methods like Balanced MSE, Dist Loss pushed performance even further, achieving a few-shot MAE of 1.325 on the ECG-K-DIR dataset (compared to 1.771 for a vanilla model).
  • Efficiency: Training time analysis showed that Dist Loss is significantly faster than feature-level methods (like ConR or FDS) because it operates on the model's output rather than complex internal feature representations.

Limitations and Future Work

The authors noted one interesting quirk: while Dist Loss consistently wins on Mean Absolute Error (MAE), it occasionally underperforms on the Geometric Mean (GM) metric compared to Balanced MSE. They hypothesize this is due to a "cumulative multiplicative effect"—Dist Loss might produce slightly more frequent small errors, which the GM metric penalizes more heavily than the MAE.

Future work could involve exploring different ways to measure distribution distance beyond simple sorting, or applying this distribution-alignment logic to other domains like imbalanced object detection or time-series forecasting.

Summary updated

BibTeX
@inproceedings{nie2025dist,
  author = {Guangkun Nie and Gongzheng Tang and Shenda Hong},
  title = {{Dist Loss: Enhancing Regression in Few-Shot Region through Distribution Distance Constraint}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=YeSxbRrDRl},
}
Figure