This paper challenges the standard way we think about regression in deep learning. While most of us default to Mean Squared Error ($\ell_2$ loss) to predict a single scalar value, the authors argue that we should be predicting a distribution instead—even if we only care about the final number.
TL;DR
The authors introduce Histogram Loss (HL), a method that converts regression targets into "soft" distributional targets. They demonstrate that learning to predict a distribution rather than a single value significantly improves accuracy, primarily because it creates a smoother optimization landscape with more stable gradients.
What Problem Does This Paper Address?
In supervised learning, we’ve seen massive gains in classification by using "soft targets"—techniques like label smoothing or distillation where we don't just tell the model "this is a cat," but rather "this is 90% cat and 10% dog."
Regression has lagged behind in this regard. The standard approach is to minimize the distance between a predicted scalar and the ground truth (using $\ell_2$ or $\ell_1$ loss). However, these losses can be difficult to optimize in deep networks; gradients can become erratic or explode, leading to sub-optimal generalization. The authors ask: Can we treat regression like a classification problem over a distribution to make it easier for the model to learn?
Methods
The core contribution is the Histogram Loss (HL). Here is how it works:
- Binning: The range of possible target values is divided into $k$ discrete bins.
- Target Smoothing: Instead of a "hard" target (a single point), the target is converted into a Truncated Gaussian distribution centered at the true value. This spreads the "truth" across several neighboring bins.
- The Model: The neural network outputs a vector (via a softmax layer) representing the probability of the target falling into each bin—essentially a histogram.
- The Loss: The model minimizes the Kullback–Leibler (KL) divergence (or cross-entropy) between the predicted histogram and the target Gaussian distribution.
- Prediction: To get a final scalar value for evaluation, the model simply calculates the expected value (the mean) of its predicted histogram.
Datasets
The authors evaluated their approach on three diverse regression benchmarks:
- CT Position: Predicting the relative location of a CT slice in the body (385 features).
- Song Year: Predicting the release year of a song from audio features (90 features).
- Bike Sharing: Predicting hourly bike rental counts based on environmental and seasonal settings (16 features).
Key Insights and Ideas
- Optimization > Representation: A common assumption is that harder tasks force models to learn "better" internal features (representations). The authors tested this by swapping the learned features between $\ell_2$ models and HL models. Surprisingly, they found that the HL model's advantage didn't come from better features, but from the fact that the loss function itself was easier to optimize.
- Stable Gradients: The authors provide a mathematical proof showing that the gradient of the Histogram Loss is more "well-behaved." Unlike $\ell_2$ loss, where the gradient is proportional to the potentially large error $|f(x) - y|$, the HL gradient is bounded by the difference between predicted and target probabilities ($|p_i - f_i(x)|$), which is always between 0 and 1.
- Softmax isn't enough: They compared HL against a model that used a softmax layer but still optimized for $\ell_2$ error. The HL approach still won, proving that the benefit comes from the distributional target, not just the architectural change of adding a softmax layer.
Key Results
The performance gains were substantial, particularly on the CT Position dataset:
- Accuracy: On the CT Position task, HL-Gaussian achieved a Mean Absolute Error (MAE) of 8.992, compared to 19.110 for the standard $\ell_2$ network.
- Convergence: HL-Gaussian converged significantly faster and more smoothly than standard regression. While $\ell_2$ models often showed "spiky" gradient behavior, the HL models maintained stable, consistent progress throughout training.
- Robustness: The method proved robust to hyperparameters; performance remained high across a wide range of bin counts (from 25 to 500) and different variances for the target Gaussian.
Limitations and Future Work
- Fixed Binning: The current implementation relies on a pre-defined, fixed set of bins. If the target range is extremely large or the data is highly sparse, choosing these bins becomes difficult. The authors suggest that future work could involve learning the bin centers and widths dynamically.
- Dimensionality: This study focused on univariate regression (predicting one number). Extending this to multivariate regression (predicting multiple correlated numbers) would require dealing with the "curse of dimensionality" in the histogram.
- Hyperparameter Tuning: While robust, users still need to select the number of bins and the variance ($\sigma$) of the target distribution, adding two more knobs to turn compared to standard $\ell_2$ regression.
Summary updated