Multilabel
Classification where examples can belong to multiple classes simultaneously
Intent & Description
π― Intent
Handle classification problems where examples can legitimately belong to multiple categories at once, rather than the mutually exclusive assumption of standard multi-class classification.
π Context
Many real problems don’t fit the single-class assumption: a photo can be tagged both beach and sunset, a support ticket can be both billing and urgent at once. Standard softmax over mutually exclusive classes fails here.
π‘ Solution
Replace a single softmax over mutually exclusive classes with independent sigmoid outputs, one per possible label. Each sigmoid is interpreted as its own probability and trained with its own binary cross-entropy loss, allowing any combination of labels to be correct simultaneously.
Real-world Use Case
- Image tagging with multiple possible labels
- Document classification with multiple topics
- Support ticket categorization with multiple issue types
- Content classification with overlapping categories
Source
π TL;DR
Use independent sigmoid outputs per label instead of softmax to handle cases where examples can legitimately have multiple correct labels simultaneously
Advantages
- Handles naturally co-occurring labels correctly
- More realistic for many real-world classification tasks
- Independent probabilities per label enable flexible thresholding
- Supports zero or multiple labels per example
Disadvantages
- Independent sigmoids ignore correlations between labels
- Per-label threshold tuning adds ongoing work
- Evaluation requires multilabel-specific metrics
- More complex than standard multi-class classification