Why is standard multiclass cross-entropy loss suboptimal when predicting ordinal labels?

Quick Overview

Asks why standard multiclass cross-entropy is a poor fit for ordinal targets such as star ratings. Tests whether you can explain how the loss treats errors of different sizes, how that relates to metrics like MAE, and which ordinal-aware models and losses work better.

Why is standard multiclass cross-entropy loss suboptimal when predicting ordinal labels?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Why is standard multiclass cross-entropy loss suboptimal when predicting ordinal labels? Take a model that predicts a 1 to 5 star rating as the running example. ```hint Look at the formula For a single example, which of the predicted class probabilities does cross-entropy actually use? ``` ```hint Compare with the metric Ordinal tasks are usually scored with MAE or quadratic weighted kappa. Would those metrics treat a 4-star miss and a 1-star miss on a true 5-star review the same way? ``` ### What a Strong Answer Covers - How cross-entropy scores a prediction and whether it accounts for the distance between the predicted and true class. - The resulting mismatch between the training loss and ordinal evaluation metrics such as MAE or weighted kappa. - What independent per-class logits mean for learning the order and for the shape of the predicted distributions. - At least one ordinal-aware alternative (cumulative or threshold models, regression on the rank, distance-aware losses) and how it encodes the order. - When plain cross-entropy is still good enough. ### Follow-up Questions - How does CORAL make its predicted cumulative probabilities rank-consistent, and why does that matter at prediction time? - If the metric is MAE, which point prediction should you read off a predicted class distribution, and why is argmax the wrong choice? - If you regress on the rank with MSE, how do you turn the continuous output back into classes? - How do soft labels spread over neighbouring classes change the gradient compared with one-hot targets?

Overview: Asks why standard multiclass cross-entropy is a poor fit for ordinal targets such as star ratings. Tests whether you can explain how the loss treats errors of different sizes, how that relates to metrics like MAE, and which ordinal-aware models and losses work better.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Why is standard multiclass cross-entropy loss suboptimal when predicting ordinal labels? Take a model that predicts a 1 to 5 star rating as the running example.

What a Strong Answer Covers Guidance

  • How cross-entropy scores a prediction and whether it accounts for the distance between the predicted and true class.
  • The resulting mismatch between the training loss and ordinal evaluation metrics such as MAE or weighted kappa.
  • What independent per-class logits mean for learning the order and for the shape of the predicted distributions.
  • At least one ordinal-aware alternative (cumulative or threshold models, regression on the rank, distance-aware losses) and how it encodes the order.
  • When plain cross-entropy is still good enough.

Follow-up Questions Guidance

  • How does CORAL make its predicted cumulative probabilities rank-consistent, and why does that matter at prediction time?
  • If the metric is MAE, which point prediction should you read off a predicted class distribution, and why is argmax the wrong choice?
  • If you regress on the rank with MSE, how do you turn the continuous output back into classes?
  • How do soft labels spread over neighbouring classes change the gradient compared with one-hot targets?