Beyond the Mean: Distribution-Aware Loss Functions for Bimodal Regression
Authors: Abolfazl Mohammadi-Seif, Carlos Soares, Rita P. Ribeiro, Ricardo Baeza-Yates
Organizations: Department of Engineering, Universitat Pompeu Fabra, Roc Boronat St., Barcelona, 08018, Barcelona, Spain. · Department of Engineering, University of Porto, Praça de Gomes Teixeira, Porto, 4099-002, Portugal. · Faculty of Sciences, University of Porto, 4169-007 Porto, Portugal. · INESC TEC, 4200-465 Porto, Portugal.
Despite the strong predictive performance achieved by machine learning models across many application domains, assessing their trustworthiness through reliable estimates of predictive confidence remains a critical challenge. This issue arises in scenarios where the likelihood of error inferred from learned representations follows a bimodal distribution, resulting from the coexistence of confident and ambiguous predictions. Standard regression approaches often struggle to adequately express this predictive uncertainty, as they implicitly assume unimodal Gaussian noise, leading to mean-collapse behavior in such settings. Although Mixture Density Networks (MDNs) can represent different distributions, they suffer from severe optimization instability. We propose a family of distribution-aware loss functions integrating normalized RMSE with Wasserstein and Cramér distances. When applied to standard deep regression models, our approach recovers bimodal distributions without the volatility of mixture models. Validated across four experimental stages, our results show that the proposed Wasserstein loss establishes a new Pareto efficiency frontier: matching the stability of standard regression losses like MSE in unimodal tasks while reducing Jensen-Shannon Divergence by 45% on complex bimodal datasets. Our framework strictly dominates MDNs in both fidelity and robustness, offering a reliable tool for aleatoric uncertainty estimation in trustworthy AI systems.
Figures & tables
Figure 1: Bimodal distribution of targets (a). Standard regression models trained with MSE fail to capture the underlying bimodal distribution (b).
Table 1: Summary of the 17 datasets used across the four-stage experimental protocol.
Figure 2: Qualitative comparison of predictive distributions (Orange) versus Ground Truth (Blue) on the Two Path dataset.
Configuration
Test Loss
RMSE ↓
Wasserstein ↓
JS Div ↓
ΔBC↓
Wasser-Simple
0.535
2.62
1.80
0.63
0.29
Wasser-Range
0.581
2.90
1.71
0.59
0.34
Cramer-Simple
0.542
2.77
1.73
0.62
0.14
Cramer-Range
0.576
2.94
1.38
0.54
0.39
Wasser-Simple (Def)
0.777
3.65
0.30
0.37
0.03
MDN (NLL)
0.071
3.82
1.61
0.54
0.15
Table 2: Performance comparison on synthetic datasets.
Unimodal ( S=0 )
Transition ( S=0.5 )
Bimodal ( S=1 )
Configuration
RMSE
JS Div
RMSE
JS Div
RMSE
JS Div
ΔBC
Proposed Methods
Wasser-Simple
0.939
0.427
0.467
0.387
0.509
0.441
0.105
Wasser-Range
0.977
0.430
0.491
0.366
0.532
0.436
0.171
Cramer-Simple
0.951
0.457
0.481
0.392
0.501
0.472
0.129
Cramer-Range
0.988
0.440
0.480
0.378
0.518
0.441
0.156
Table 3: Performance snapshots at critical separation intervals ( S ) in synthetic datasets.
Figure 3: Evolution of predictive densities on Bike Sharing (Hour) . Blue Area: Ground Truth. Orange Area: Predicted Distribution.
Configuration
Test Loss
RMSE ↓
Wasserstein ↓
JS Div ↓
ΔBC↓
Wasser-Simple
0.232
0.330
0.083
0.306
0.045
Wasser-Range
0.251
0.342
0.079
0.300
0.112
Cramer-Simple
0.222
0.324
0.085
0.306
0.046
Cramer-Range
0.249
0.344
0.101
0.329
0.071
Wasser-Simple (Def)
0.342
0.367
0.081
0.291
0.018
MDN (NLL)
-0.246
0.525
0.084
0.300
0.033
Table 4: Aggregated performance on Real-World Bimodal Datasets.
Figure 4: Qualitative comparison on the Protein Structure dataset. Top Row: MSE and HMLP collapse to unimodal averages in sparse regions, while MDN captures bimodality but exhibits disjoint peaks. Bottom Row: MLPQ and Proposed method (Center) provide a strong approximation. Notably, increasing to α=7 (Right) results in high coverage of the bimodal support.
Configuration
Test Loss
RMSE ↓
Wasserstein ↓
JS Div ↓
ΔBC↓
Wasser-Simple
0.092
0.088
0.052
0.402
0.060
Wasser-Range
0.109
0.088
0.058
0.434
0.032
Cramer-Simple
0.099
0.108
0.071
0.437
0.061
Cramer-Range
0.131
0.118
0.086
0.413
0.040
Wasser-Simple (Def)
0.237
0.153
0.112
0.452
0.044
MDN (NLL)
-2.105
0.069
0.024
0.338
0.046
Table 5: Performance on the Trimodal Bike Sharing dataset.
Complexity
Configuration
RMSE ↓
Wasserstein ↓
JS Div. ↓
ΔBC↓
Unimodal
Wasser-Simple
1.050
0.254
0.441
0.151
Wasser-Range
1.060
0.253
0.471
0.134
Cramer-Simple
1.036
0.280
0.536
0.146
Cramer-Range
1.068
0.251
0.506
0.149
Wasser-Simple (Def)
1.089
0.172
0.157
0.147
MDN
1.066
0.261
0.218
0.040
Table 6: Comprehensive performance on Image Complexity Assessment.
Figure 5: Distributional Fidelity (JS Divergence) across all Image Datasets.
Figure 6: Pareto Efficiency Frontier (stage IV Bimodal Datasets).
Efficient uncertainty quantification (UQ) is essential for trustworthy large-scale learning. Existing UQ methods for regression tasks mainly operate under the assumption that the conditional label marginal satisfies single-peak parametric models, e.g., Gaussians, where the negative log-likelihood function simplifies to the mean square error. However, such single-peak assumptions fail in regression tasks featuring multi-modal distributions. On the other hand, semi-parametric methods which achieve strong regression performance for multi-modal distributions often lack efficient quantification on their prediction variances. In this work, we extend UQ techniques based on Variational Bayesian Inference (VBI) to two widely used semi-parametric regression models that yield histogram-like reconstructions of the conditional label densities: Quantile Regression (QR) and Classification Restoration (CR). Our approach introduces a unified, distribution-agnostic framework that simultaneously achieves accurate estimation of complex conditional distributions and highly efficient UQ. Theoretically, our method is grounded in novel formulations of QR and CR within the VBI framework, yielding analytic Evidence Lower Bounds (ELBO) to streamline training and a closed-form or analytically approximated predictive density for efficient inference. Empirically, we evaluate our methods on three large-scale regression benchmarks with multi-modal label distributions. Our framework outperforms state-of-the-art multi-modal regression baselines, and even matches predictive performance of computationally expensive ensemble models. Furthermore, by leveraging epistemic uncertainty estimation, our approach enables highly data-efficient active learning strategies.
Large language models (LLMs) have emerged as flexible regressors capable of predicting real-valued quantities from heterogeneous inputs. Yet most LLM regression objectives optimize predictions independently, often yielding poor calibration. We introduce Distribution-Aware Reward (DAR), an on-policy reinforcement learning objective that instead jointly evaluates the empirical predictive distribution formed by multiple predictions for the same input. To translate this distribution-level objective into rollout-level rewards, we assign each prediction credit based on its leave-one-out contribution to the quality of the overall predictive distribution. This encourages predictions that are well-centered and appropriately dispersed around the target. We evaluate on three regression settings: a synthetic task probing interpolation and extrapolation, and two real-world scientific tasks involving code and molecular data. Across tasks, DAR produces better-calibrated uncertainty estimates while consistently reducing prediction error and improving ranking quality over supervised fine-tuning and pointwise reinforcement learning. Together, these results highlight the benefits of distribution-aware training for LLM regression.
Jungsoo Park, Hyungjoo Chae, Ethan Mendes +4
Georgia Institute of Technology · Allen Institute for AI
Implicit neural representations (INRs) offer compact encoding of volumes, but as lossy approximators, inevitably have prediction errors. We consider INRs that can simultaneously encode relative error scales by predicting distributions using tools from uncertainty estimation. Typically, uncertainty estimation relies on computationally expensive approaches or on predefined parametric assumptions about the predictive distribution (e.g., Gaussian). In this study, we propose a lightweight method that reformulates regression-based INR training as a classification task by discretizing continuous targets into bins, enabling flexible distribution modeling to capture complex multimodal behaviors. We analyze the trade-off between regression and classification for INR training and demonstrate that the classification setting tends to achieve high reconstruction quality and competitive error awareness through uncertainty estimation, compared to regression-based approaches.