1
$\begingroup$

I have created a classifier for some simple gestures using an input layer, a hidden layer with tanh activation and an output softmax layer, I'm also using the Adam optimiser. The network classifies perfectly with validation data, however I'd like it to be able to take in random noise that looks nothing like the shapes and not be able to classify it confidently. For example:

One gesture input looks like this and is correctly classified as gesture 'A': enter image description here

However, when I pass this 'noise', which is clearly differentiable to the human eye, as input it still classifies it with 100% confidence that it is the same gesture 'A'.

enter image description here

I assume it's because the inputs are still very close to 0? My instinct is to scale up the inputs perhaps to increase the differentiation between the noise and the input. However, in real operation the noise will all be on a similar scale to the inputs and I won't know what is noise and what isn't so I will still have to apply the same scaling to that noise. Will I run into the same problem?

On a more general note is there a teaching approach to prevent misclassifications, particularly if we know what they might look like? For example, in this case I thought I could perhaps generate some noise and use it at training time to create an extra noise class, or is it just best to come up with such a well-trained network that you can use some sort of confidence threshold? For example, if the network only produces 50% confidence on an input then I can discard it as noise. Any suggestions much appreciated!

$\endgroup$
1
$\begingroup$

The network classifies perfectly with validation data, however I'd like it to be able to take in random noise that looks nothing like the shapes and not be able to classify it confidently.

You need to train the network on noise well if you want it to be able to recognize it.

or is it just best to come up with such a well-trained network that you can use some sort of confidence threshold?

You can use spot to get a confidence score for clarification. But training the network on a noise class will work way better

See:

Gal: Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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