Why do Bayes-optimal multi-label predictions differ under Hamming loss and subset 0-1 loss?
Quick Overview
Asks why the best possible multi-label prediction can change depending on whether a model is judged by Hamming loss or by subset 0-1 loss. Tests Bayes decision theory for multi-label classification, label dependence, and matching the model and decoding to the evaluation metric.
Why do Bayes-optimal multi-label predictions differ under Hamming loss and subset 0-1 loss?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
In multi-label classification each input $x$ has a binary label vector $y = (y_1, \dots, y_K)$. Hamming loss counts the fraction of individual labels predicted wrongly, while subset 0-1 loss is 1 unless the whole predicted vector matches exactly.
Why can the Bayes-optimal multi-label prediction differ depending on whether you are minimizing Hamming loss or subset 0-1 loss?
```hint Write the expected loss
For a fixed candidate prediction $\hat y$, write the expected value of each loss given $x$. Note which probabilities each expression depends on.
```
```hint Try two labels
Build a joint distribution over two labels where the labels are strongly dependent, then compute both optimal predictions.
```
### What a Strong Answer Covers
- The Bayes-optimal decision rule for Hamming loss and why it only needs per-label probabilities
- The Bayes-optimal decision rule for subset 0-1 loss and why it needs the joint distribution
- A concrete distribution where the two optimal predictions disagree
- The conditions under which the two optima coincide
- What the difference means for model choice and decoding
### Follow-up Questions
- In your example, what expected Hamming loss and expected subset 0-1 loss does each candidate prediction get?
- Which multi-label methods fit each loss, and how does their cost grow with the number of labels?
- How would you find the joint mode with a probabilistic classifier chain when searching all ${2^K}$ label vectors is too expensive?
Overview: Asks why the best possible multi-label prediction can change depending on whether a model is judged by Hamming loss or by subset 0-1 loss. Tests Bayes decision theory for multi-label classification, label dependence, and matching the model and decoding to the evaluation metric.
In multi-label classification each input x has a binary label vector y=(y1,…,yK). Hamming loss counts the fraction of individual labels predicted wrongly, while subset 0-1 loss is 1 unless the whole predicted vector matches exactly.
Why can the Bayes-optimal multi-label prediction differ depending on whether you are minimizing Hamming loss or subset 0-1 loss?
What a Strong Answer Covers Guidance
The Bayes-optimal decision rule for Hamming loss and why it only needs per-label probabilities
The Bayes-optimal decision rule for subset 0-1 loss and why it needs the joint distribution
A concrete distribution where the two optimal predictions disagree
The conditions under which the two optima coincide
What the difference means for model choice and decoding
Follow-up Questions Guidance
In your example, what expected Hamming loss and expected subset 0-1 loss does each candidate prediction get?
Which multi-label methods fit each loss, and how does their cost grow with the number of labels?
How would you find the joint mode with a probabilistic classifier chain when searching all
2K
label vectors is too expensive?