1
$\begingroup$

Afaik, the problem with many machine learning algorithms is that they will often label nonsense into some categories.

What measures can one take to discard nonsense results?

Eg. if you have a bot that is supposed to label stuff as either orange or an apple, how can you gurantee that it won't label a random image of noise as either of the two?

Or label a car as either of the two?

Do you have to train your neural network to have 3 categories, "apple", "orange" and "neither"?

$\endgroup$

2 Answers 2

4
$\begingroup$

The problem you're describing can perhaps be treated as "anomaly detection". Google the term in quotes, you'll get a ton of references. So the idea would be to first train an anomaly detector to separate the "apples, oranges, and other fruits" from non-fruits (or "nonsense" in OP terminology). Then train a classifier on the fruits.

Update. In light of additional answers -- and too long for a comment. The problem with declaring a "non-fruit" category highlights the distinction between classification and anomaly detection. In classification, we assume 2 or more coherent classes. Apples, oranges, bananas -- these all have well-defined common characteristics. On the other hand, "non-fruit" is not a coherent category. It can only be meaningfully defined as something like "not fulfilling enough of the fruit characteristics". Anomalous objects are not a coherent class; they are by definition anything that is not sufficiently close to a "normal" object. We do not expect examples of anomalous objects to be informative for training. After all, you can just generate random pixel-images and get tons of anomalous examples for free!

This is why anomaly detection requires techniques distinct from classification.

$\endgroup$
1
$\begingroup$

Do you have to train your neural network to have 3 categories, "apple", "orange" and "neither"?

Yes, you would have to.

Eg. if you have a bot that is supposed to label stuff as either orange or an apple, how can you gurantee that it won't label a random image of noise as either of the two?

You would need to include images of the third category "neither-apple-orange" so that you train your classifier to learn three categories.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.