Abstract
Probability distributions produced by the cross-entropy loss for ordinal classification problems can possess undesired properties. We propose a straightforward technique to constrain discrete ordinal probability distributions to be unimodal via the use of the Poisson and binomial probability distributions. We evaluate this approach in the context of deep learning on two large ordinal image datasets, obtaining promising results.
Introduction
Ordinal classification tasks involve predicting labels that have a natural, sequential order—such as age groups, movie ratings, or disease stages. Standard deep learning approaches typically treat these as categorical classification problems using a Softmax output and cross-entropy loss. However, this method ignores the ordinal relationship between classes. A model might incorrectly predict "Baby" for an "Adult" image with the same penalty as predicting "Teen," often resulting in erratic, multi-modal probability distributions.
Methodology
The core proposal is to enforce unimodality—ensuring the probability distribution has a single peak and tapers off as distance from that peak increases. This is achieved by parameterizing the final layer of a neural network to output the parameters of a discrete probability distribution rather than independent class scores.
Distribution Parameterization
The authors explore two primary extensions:
- Poisson Extension: The network predicts a single scalar $\lambda$, representing the mean of a Poisson distribution.
- Binomial Extension: The network predicts a success probability $p$ for a Binomial distribution.
To allow the model to control the "spread" or variance of these distributions independently of the mean, a temperature parameter ($\tau$) is introduced in a final normalization step. Additionally, the Earth Mover’s Distance (EMD) loss is utilized to explicitly penalize the model for placing probability mass far from the ground truth label.
Experimental Results
The proposed methods were evaluated on two large-scale image datasets: Diabetic Retinopathy (DR) (5 severity levels) and the Adience Face Dataset (8 age groups).
Performance Metrics
The models were evaluated using the Quadratic Weighted Kappa (QWK), which is sensitive to the magnitude of ordinal errors. The Binomial formulation, in particular, consistently achieved superior QWK scores compared to standard cross-entropy and regression-based baselines.
Key Insights
- Structural Regularization: Forcing unimodality prevents "nonsensical" predictions. In age estimation, it ensures that if the model is wrong, it is "near-miss" wrong (e.g., predicting "Teen" instead of "Adult") rather than predicting two wildly different ages.
- Top-k Accuracy: Unimodal models showed significantly better Top-2 and Top-3 accuracy. Because the mass is concentrated around the peak, the true class is almost always adjacent to the predicted class if it isn't the top choice.
- Binomial Flexibility: The Binomial distribution outperformed the Poisson distribution because it offers more flexibility in distributing probability mass across a fixed number of classes, whereas the Poisson distribution's variance is strictly tied to its mean.
Limitations
While effective, the approach has limitations. The Poisson distribution's mean-variance link remains a constraint. Furthermore, the model assumes uniform "distances" between integer class labels, which may not reflect real-world semantics. Finally, in rare cases where data is truly ambiguous (multimodal), a unimodal constraint could hinder performance.
Conclusion
By incorporating unimodal constraints through Poisson and Binomial parameterization, we can significantly improve the reliability and performance of deep learning models on ordinal classification tasks. This approach produces more sensible probability distributions and achieves state-of-the-art results on key ordinal metrics.
Summary updated