Why is it invalid to directly compare absolute loss values between models trained with different loss functions?
Quick Overview
Asks why loss values from models trained with different loss functions, such as cross-entropy and hinge loss, cannot be compared directly. Tests reasoning about what a loss value measures, which settings change the reported number, and how to set up a fair comparison between models.
Why is it invalid to directly compare absolute loss values between models trained with different loss functions?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: easy
Interview Round: Other
Why is it invalid to directly compare absolute loss values between models trained with different loss functions?
For example, one classifier finishes with a cross-entropy loss of 0.3 and another, trained with hinge loss, finishes at 0.5. Explain why these two numbers do not tell you which model is better.
```hint Look at the units
Ask what each loss value is measured in and what its smallest achievable value is. Then check whether two different losses would always rank the same set of predictions in the same order.
```
### What a Strong Answer Covers
- What each loss is measured in and the scale of its values.
- How each loss's achievable minimum and its weighting of errors affect a comparison between models.
- Implementation settings that change the reported number even when the loss is the same.
- How to compare the models fairly.
### Follow-up Questions
- Two models were trained with MSE and MAE. How would you choose the single metric used to compare them?
- What has to match before you can compare loss curves from two training runs that use the same loss?
- How can validation cross-entropy go up while validation accuracy also goes up?
- How does label smoothing change what a "good" cross-entropy value looks like?
Overview: Asks why loss values from models trained with different loss functions, such as cross-entropy and hinge loss, cannot be compared directly. Tests reasoning about what a loss value measures, which settings change the reported number, and how to set up a fair comparison between models.
Why is it invalid to directly compare absolute loss values between models trained with different loss functions?
For example, one classifier finishes with a cross-entropy loss of 0.3 and another, trained with hinge loss, finishes at 0.5. Explain why these two numbers do not tell you which model is better.
What a Strong Answer Covers Guidance
What each loss is measured in and the scale of its values.
How each loss's achievable minimum and its weighting of errors affect a comparison between models.
Implementation settings that change the reported number even when the loss is the same.
How to compare the models fairly.
Follow-up Questions Guidance
Two models were trained with MSE and MAE. How would you choose the single metric used to compare them?
What has to match before you can compare loss curves from two training runs that use the same loss?
How can validation cross-entropy go up while validation accuracy also goes up?
How does label smoothing change what a "good" cross-entropy value looks like?