Solved – Negative samples on multiclass neural network training

classificationdeep learningmulti-classneural networks

I want to train a deep neural network to classify images.
In every implementation I have seen, multiclass training uses only the positive examples for each class.

Is there any way to utilize negative samples for the N image classes, without resorting to training N binary – classification networks?

By negative samples, I mean that all the images annotated with label x are negative samples for the class y (in the case when the class x is not a subset of y, and vice versa). We can use these negatives in binary classification, so is there a way to be used in a multiclass NN?

Best Answer

If each sample can only belong to one class, then the usual cross-entropy loss understands that a positive example for class $2$ is a negative example of classes $1, 3, ... k$. That is, for any class $k$, all samples in each other class are "negatives" with respect to $k$.