News for hackers. Stuff that matters.
Re:Making a neural network say “I Don’t Know”: Bayesian NNs ... by warent on Wednesday November 28, 2018 @08:54AM (#18551422)
This question was answered in the comments section of the article.

Basically Softmax will only give you values close to 1 or close to 0, so there's no room for your own interpretation or threshold.

https://medium.com/@paraschopra/softmax-amplifies-small-diff...

Re:Making a neural network say “I Don’t Know”: Bayesian NNs ... by jeremysalwen on Wednesday November 28, 2018 @11:15AM (#18552675)
I think that post is quite misleading. 90 and 100 are extreme values representing extreme confidence. Your model could just as easily learn [0.09, 0.10, 0.05] on the final layer, and the probabilities would then be [0.337, 0.340, 0.323]. And look, now softmax has the opposite problem! The final activation layers differed by a factor of 2, but softmax output almost identical probabilities!

Except this should not be surprising, because softmax is not scale invariant. Values on the unit scale is what you would normally expect, so if you feed it values 100x larger, it's going to be way more confident. If you feed it values 100x smaller, it's going to be way less confident.

Re:Making a neural network say “I Don’t Know”: Bayesian NNs ... by paraschopra on Wednesday November 28, 2018 @11:40AM (#18552968)
This is interesting. In theory, what you are suggesting can be true but in practice you do think the last layer can output 0.1, 0.09, etc especially when last layer is typically not pushed through sigmoid.
Re:Making a neural network say “I Don’t Know”: Bayesian NNs ... by rjtavares on Wednesday November 28, 2018 @12:27PM (#18553441)
Isn't that mostly true with highly curated datasets with clearly defined categories?
Re:Making a neural network say “I Don’t Know”: Bayesian NNs ... by anonymousDan on Wednesday November 28, 2018 @09:00AM (#18551464)
Do you need to do softmax? Why not just look at the underlying amplitudes of the output before applying softmax? Or is it that they won't be normalized?
Re:Making a neural network say “I Don’t Know”: Bayesian NNs ... by paraschopra on Wednesday November 28, 2018 @09:22AM (#18551621)
Interesting suggestion, honestly I'm not sure. Although this should be easy to test empirically. I feel if this were to work, it may depend on architecture of the network and what intermediate functions are used (ReLu, sigmoid and tanh). But your suggestion is easy to test empirically and I'll try it.

There was another method proposed recently for approximating uncertainties: using dropout during evaluation (which effectively makes different runs on the same image as samples). But I came across a discussion on the efficacy of the technique and I wasn't sure. https://www.reddit.com/r/MachineLearning/comments/7bm4b2/d_w...

My next project is to implement dropout and see how it compares with the current approach. I'll also try your suggestion.

Re:Making a neural network say “I Don’t Know”: Bayesian NNs ... by cultus on Wednesday November 28, 2018 @10:10AM (#18552095)
Yes, they wouldn't be normalized so you can't interpret it as a probability. Softmax is the function that normalizes it. However, even that you can't interpret as a probability of some outcome, because you do not take into account the prior.

For that, you need actual Bayesian techniques.

Re:Making a neural network say “I Don’t Know”: Bayesian NNs ... by anonymousDan on Wednesday November 28, 2018 @12:51PM (#18553754)
Can you elaborate on what you mean by not taking into account the prior? What is the output of aoftmax if not a probability?
Re:Making a neural network say “I Don’t Know”: Bayesian NNs ... by cultus on Wednesday November 28, 2018 @01:37PM (#18554255)
Well, it's a probability of the output given the fixed, fitted model parameters. This is the likelihood. This is not the probability of getting that output, since we don't know what the parameters should really be. See the inverse probability fallacy [0]. This confusion is literally the main reason behind the replication crisis of scientific research.

In ML, you typically have a model f(w;u), and you are trying to fit the parameters w to some data, given some hyperparameters u that represent some kind of prior information. In frequentist techniques, these could be regularization parameters.

In frequentist techniques, the hyperparameters the fitted parameters are assumed fixed, and not random. In contrast, Bayesian methods assume it is random as well. This extra uncertainty is neglected by the predictions of frequentist techniques.

Nonetheless, the uncertainty is real.

[0] https://en.wikipedia.org/wiki/Confusion_of_the_inverse

Re:Making a neural network say “I Don’t Know”: Bayesian NNs ... by anonymousDan on Monday December 03, 2018 @05:48AM (#18587805)
Thanks!