# What is the difference between Multiclass and Multilabel Problem

What is the difference between a multiclass problem and a multilabel problem?

• I learned this concept and build my understanding with this post, they explained multi-label classification in a very elegant way. Jan 23, 2019 at 14:47

I suspect the difference is that in multi-class problems the classes are mutually exclusive, whereas for multi-label problems each label represents a different classification task, but the tasks are somehow related (so there is a benefit in tackling them together rather than separately). For example, in the famous leptograspus crabs dataset there are examples of males and females of two colour forms of crab. You could approach this as a multi-class problem with four classes (male-blue, female-blue, male-orange, female-orange) or as a multi-label problem, where one label would be male/female and the other blue/orange. Essentially in multi-label problems a pattern can belong to more than one class.

• @Dirkran Thanks for your explanation. Do you know any other source where i can get multilabel dataset other than csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multilabel.html and mulan.sourceforge.net/datasets.html Jun 13, 2011 at 10:42
• @Learner sorry it isn't something I have worked on much. You might want to have a look at multi-task learning, which has some similarities to multi-label learning. Perhaps some of the datasets used for that might also be useful as benchmarks for mult-label learning. Jun 13, 2011 at 11:10
• @DikranMarsupial Can you provide a reference for the definitions you provide? Jan 22, 2021 at 16:49
• @Mareoraft there is the wikipedia page en.wikipedia.org/wiki/Multi-label_classification althought I don't completely agree that it is a model that maps inputs x onto binary outputs y (as it may be that some of the labels are categorical rather than binary) Jan 22, 2021 at 17:36

Multiclass classification means a classification task with more than two classes; e.g., classify a set of images of fruits which may be oranges, apples, or pears. Multiclass classification makes the assumption that each sample is assigned to one and only one label: a fruit can be either an apple or a pear but not both at the same time.

Multilabel classification assigns to each sample a set of target labels. This can be thought of as predicting properties of a data-point that are not mutually exclusive, such as topics that are relevant for a document. A text might be about any of religion, politics, finance or education at the same time or none of these.

Edit1 (Sept 2020): For those who prefer contrasts of terms for a better understanding, look at these contrasts:

• Multi-class vs Binary-class is the question of the number of classes your classifier is modeling. In theory, a binary classifier is much simpler than multi-class problem, so it's useful to make this distinction. For example, Support Vector Machines (SVMs) can trivially learn a hyperplane to separate two classes, but 3 or more classes make the classification problem much more complicated. In the neural networks, we commonly use Sigmoid for binary, but Softmax for multi-class as the last layer of the model.

• Multi-label vs Single-Label is the question of how many classes any object or example can belong to. In the neural networks, if we need single label, we use a single Softmax layer as the last layer, thus learning a single probability distribution that spans across all classes. If we need multi-label classification, we use multiple Sigmoids on the last layer, thus learning separate distribution for each class.

Remarks: we combine multilabel with multiclass, in fact, it is safe to assume that all multi-label are multi-class classifiers. When we have a binary classifier (say positive v/s negative classes), we wouldn't usually assign both labels or no-label at the same time! We usually convert such scenarios to a multi-class classifier where classes are one of {positive, negative, both, none}. Hence multi-label AND binary classifier is not practical, and it is safe to assume all multilabel are multiclass.

On the other side, not all Multi-class classifiers are multi-label classifiers and we shouldn't assume it unless explicitly stated.

EDIT 2: Venn diagram for my remarks

• It's very very rare that you'd have two classes and want to assign both labels at the same time. What do you mean by that? Do you mean for instance a class is white dog, both white and dog in a single class, and the other is green cat? Oct 6, 2020 at 12:33
• Updated my answer to improving the clarity. If you have a binary classifier, you have 2 classes. Say, DOG and CAT. You will assign one of those two classes, i.e. either DOG or CAT, but not both, or none to the same example. The implicit assumption of a binary classifier is that you are choosing one and only one class out of the available two classes. When you have multi-label classifier, the implicit assumption is that you have more than 2 classes. Oct 7, 2020 at 5:12
• Thank you for that. Oct 8, 2020 at 9:10
• Very Good answer for me. Oct 17, 2020 at 21:30

To complement the other answers, here are some figures. One row = the expected output for one sample.

## Multiclass

One column = one class (one-hot encoding)

## Multilabel

One column = one class

You see that:

• in the multilabel case, one sample might be assigned more than one class.
• in the multiclass case, there are more than 2 classes in total.

As a side note, nothing prevents you from having a multioutput-multiclass classification problem, e.g.:

A multi-class problem has the assignment of instances to one of a finite, mutually-exclusive collection of classes. As in the example already given of crabs (from @Dikran): male-blue, female-blue, male-orange, female-orange. Each of these is exclusive of the others and taken together they are comprehensive.

One form of a multi-label problem is to divide these into two labels, sex and color; where sex can be male or female, and color can be blue or orange. But note that this is a special case of the multi-label problem as every instance will get every label (that is every crab has both a sex and a color).

Multi-label problems also include other cases that allow for a variable number of labels to be assigned to each instance. For instance, an article in a newspaper or wire service may be assigned to the categories NEWS, POLITICS, SPORTS, MEDICINE, etc. One story about an important sporting event would get an assignment of the label SPORTS; while another, involving political tensions that are revealed by a particular sporting event, might get both the labels SPORTS and POLITICS. Where I am, in the US, the results of the Superbowl are labeled both SPORTS and NEWS given the societal impact of the event.

Note that this form of labeling, with variable numbers of labels, can be recast into a form similar to the example with the crabs; except that every label is treated as LABEL-X or not-LABEL-X. But not all methods require this recasting.

And one more difference lies in that the multi-label problem requires the model to learn the correlation between the different classes, but in multiclass problems different classes are independent of each other.

Multi Class classification Problem One right answer and Mutually exclusive outputs(eg iris, numbers) Multi Label Classification more than one right answer and appropriate output or Non exclusive eg(sugar test, eye test)

In multi class we user softmax In multi label we use sigmoid

• The last sentence isn't generally the case, e.g. one of the labels could also be multiclass or continuous for regression. Oct 7, 2020 at 7:20