Blogs / Why a New Label Costs a Classifier So Much

Why a New Label Costs a Classifier So Much

What Hugging Face's post says about how a classifier maps input to fixed labels, what a fourth label needs and how zero-shot classification changes it.

  • Learning
  • 1 min read

For: Learners new to classification models.

How a classifier maps input to labels

A conventional classification model learns a mapping from an input to a predefined set of labels.[1]

A classification head typically produces one logit per class, and softmax turns those logits into a probability distribution.[1]

What a new label costs

If we introduce a fourth department, such as Legal, the existing classifier does not automatically acquire a corresponding output class.[1]

We may need to modify the head, collect training data, and retrain or adapt the model.[1]

Supplying labels at inference time

Instead of requiring the classifier to be trained specifically on every output category, we supply the candidate labels at inference time.[1]

Unlike a conventional fixed-label classifier, the categories can change from one request to another.[1]

Decision models extend this idea beyond simply assigning an input to a category.[1]

Conventionalclassifierlabels fixed by trainingZero-shotclassificationcandidate labels suppliedper request
When are the labels fixed, and when are they supplied?

Sources

  1. Decision Models in Hugging Face (huggingface.co · checked )

More articles