Multi-Label Classification
Some prediction problems don’t fit into “pick exactly one category.” An email can be both “work” and “urgent,” and a photo can contain “dog,” “car,” and “outdoors” at the same time. Multi-Label Classification is the supervised-learning setup built for that reality.
What it is (and how it differs from multiclass)
In multi-label classification, each example can have zero, one, or many labels from a fixed label set. The target is typically a binary vector like [1, 0, 1, 0] indicating which labels apply. This differs from multiclass classification, where exactly one label is correct and probabilities must sum to 1 (via softmax). Multi-label models usually produce an independent score per label (often through sigmoid outputs), and you choose labels by applying a threshold (e.g., predict a label if its probability > 0.5).
How models are built in practice
A common approach is “one classifier per label” (also called binary relevance): train K binary classifiers for K labels. Libraries make this straightforward; in scikit-learn you’ll see wrappers like OneVsRestClassifier paired with a base model such as LogisticRegression:
from sklearn.multiclass import OneVsRestClassifier
from sklearn.linear_model import LogisticRegression
model = OneVsRestClassifier(LogisticRegression())
Why it matters (examples and evaluation)
- Spam/abuse moderation: a message can be “spam” and “phishing.”
- Medical coding: one visit can map to multiple diagnosis codes.
- Customer support: a ticket can be “billing” and “technical.”
Because multiple labels can be right, metrics change: you’ll encounter Hamming loss, micro/macro F1, and subset accuracy (exact match). Ignoring the multi-label nature forces wrong assumptions (like “only one label”), leading to systematically bad predictions and misleading evaluation.
Multi-Label Classification is a supervised learning task where each input can be assigned multiple target labels simultaneously, rather than exactly one class. Targets are typically represented as a binary vector over a fixed label set (e.g., an image tagged as dog and outdoor). It matters because many real problems are non-exclusive; treating them as single-label breaks evaluation, loss design, and decision thresholds, reducing predictive usefulness.
Think of tagging a photo on your phone. One picture might deserve several tags at once: “beach,” “family,” and “sunset.” Multi-Label Classification is the AI version of that idea. Instead of forcing a choice of just one category, the model can assign multiple labels to the same item.
This matters in real life because many things don’t fit into a single box. An email can be both “work” and “urgent,” a medical scan can show more than one condition, and a song can be “jazz” and “instrumental.” The goal is to predict all the labels that apply, not just the best one.