Live data from Hacker News

Machine Learning Confronts the Elephant in the Room

quantamagazine.org

101–110 of 116 posts

Re: Machine Learning Confronts the Elephant in the Room

#101
post #57

I know very little about machine vision, so forgive the naïvete of this question: > an ability humans have that AI lacks: the ability to understand when a scene is confusing and thus go back for a second glance. Wouldn't the machine return a low confidence score when a scene is confusing? If not, why is this difficult to get around? If so, why can't we just call this a computation difficulty problem, simply requiring…

> simply requiring a way to go back and spend more effort later when required Present neural nets have no "more effort" or "less effort" knob. For the same input they always produce the same output. The article says a different thing: humans rerun the "algorithm" again, but this time with the knowledge that something was wrong in the previous run (lets say color), and this knowledge will tweak the way it runs again,…

You can easily add a "knob" like this to any model. For example, you can first run an input through a fast, but less accurate object detector (e.g. YOLO), and if not satisfied with results (or automatically triggered by low confidence scores), run the same input through a slower, but more accurate model (RCNN).

Re: Machine Learning Confronts the Elephant in the Room

#102
post #52

Earlier quoted context omitted.

Note that you can get a form of confidence by just not applying softmax to the output during inference. Softmax is primarily to aid in training.

How well do neural networks train with no normalization at all, compared with softmax?

It's not about normalization, it's about loss function. Softmax is required by cross entropy minimization (negative log-likelihood to be precise), which works somewhat better in practice than mean squared error (MSE) minimization (which needs no normalization of outputs).

Re: Machine Learning Confronts the Elephant in the Room

#103

Earlier quoted context omitted.

Is this what softmax is? Simply dividing a vector by sum of its components? If so, then how does it deserve a name , not to mention a long Wikipedia page full of formulas?

Coming from pure math, I often feel this way now learning statistics and ML. In pure math, it feels like the threshold for how a novel a concept should be before it gets its own word is much higher. E.g, we have "regression" and "classification" instead of "supervised continuous prediction" and "supervised discrete prediction".

If you don't undestand where the name "softmax" came from, you don't really understand what it is. Softmax is a differentiable approximation of the max function.

Plot max(0, x) and softmax(0, x) functions, and it should become clear.

Re: Machine Learning Confronts the Elephant in the Room

#104
post #101
post #57

Earlier quoted context omitted.

> simply requiring a way to go back and spend more effort later when required Present neural nets have no "more effort" or "less effort" knob. For the same input they always produce the same output. The article says a different thing: humans rerun the "algorithm" again, but this time with the knowledge that something was wrong in the previous run (lets say color), and this knowledge will tweak the way it runs again,…

You can easily add a "knob" like this to any model. For example, you can first run an input through a fast, but less accurate object detector (e.g. YOLO), and if not satisfied with results (or automatically triggered by low confidence scores), run the same input through a slower, but more accurate model (RCNN).

You can also have a "generalist" model, trained to differentiate major object classes (e.g. furniture from animals), and multiple "specialist" models, each trained to differentiate between variants of the same object category (e.g. breeds of dogs). That approach was described in Hinton's knowledge distillation paper.

Re: Machine Learning Confronts the Elephant in the Room

#105

I know very little about machine vision, so forgive the naïvete of this question: > an ability humans have that AI lacks: the ability to understand when a scene is confusing and thus go back for a second glance. Wouldn't the machine return a low confidence score when a scene is confusing? If not, why is this difficult to get around? If so, why can't we just call this a computation difficulty problem, simply requiring…

> a low confidence score Neural nets should return a low confidence score. But, the popular approach (described below) ignores that. Neural nets ignore confidence because of a technique called softmax [1]. This happens as the final operation of a neural net, and is required for training. Softmax is a tool to make an array of positive numbers look like a probability distribution: out = x / x.sum() x[i] is a class pred…

No. Regardless if the outputs for cat/dog are [0.03, 0.01] or [0.75, 0.25], the network is still three times more confident it's a cat. The uncertainty (entropy) of the outputs is exactly the same in both cases.

In other words, if you only have two object classes, the magnitude of the outputs does not matter, the uncertainty is measured by the relative difference of the outputs.

The only way to measure the confidence of the model that the output is "cat OR dog", is to have another class (e.g. "chair"), only then, looking at all three outputs you can estimate the confidence of the model regarding "cat OR dog" predictions (vs 'NOT (cat OR dog)"). For example, if [cat, dog, chair] outputs are [0.03, 0.01, 0.05] then we know the model is not confident that it's either a cat or a dog, but if the outputs are [0.75, 0.25, 0.05], then it's clear it is.

Re: Machine Learning Confronts the Elephant in the Room

#106
post #103

Earlier quoted context omitted.

Coming from pure math, I often feel this way now learning statistics and ML. In pure math, it feels like the threshold for how a novel a concept should be before it gets its own word is much higher. E.g, we have "regression" and "classification" instead of "supervised continuous prediction" and "supervised discrete prediction".

If you don't undestand where the name "softmax" came from, you don't really understand what it is. Softmax is a differentiable approximation of the max function. Plot max(0, x) and softmax(0, x) functions, and it should become clear.

Nit: it seems it's more like a smooth approximation to maxarg than max.

Yeah it makes sense that this is a super important function, but I still feel like one could just remember the principle that "exponentiation followed by normalization is a smooth approximation to maxarg."

Re: Machine Learning Confronts the Elephant in the Room

#107
post #103

Earlier quoted context omitted.

If you don't undestand where the name "softmax" came from, you don't really understand what it is. Softmax is a differentiable approximation of the max function. Plot max(0, x) and softmax(0, x) functions, and it should become clear.

Nit: it seems it's more like a smooth approximation to maxarg than max. Yeah it makes sense that this is a super important function, but I still feel like one could just remember the principle that "exponentiation followed by normalization is a smooth approximation to maxarg."

Basic building blocks of most deep learning models are convolutional layer, pooling layer, fully connected layer, and softmax layer. How do you propose we call "softmax layer" instead?

Re: Machine Learning Confronts the Elephant in the Room

#108
post #107

Earlier quoted context omitted.

Nit: it seems it's more like a smooth approximation to maxarg than max. Yeah it makes sense that this is a super important function, but I still feel like one could just remember the principle that "exponentiation followed by normalization is a smooth approximation to maxarg."

Basic building blocks of most deep learning models are convolutional layer, pooling layer, fully connected layer, and softmax layer. How do you propose we call "softmax layer" instead?

Normalization layer?

This opens up possibility of using something else than softmax in there.

Re: Machine Learning Confronts the Elephant in the Room

#109

Earlier quoted context omitted.

Is this what softmax is? Simply dividing a vector by sum of its components? If so, then how does it deserve a name , not to mention a long Wikipedia page full of formulas?

Softmax has two components: 1. Transform the components to e^x. This allows the neural network to work with logarithmic probabilities, instead of ordinary probabilities. This turns the common operation of multiplying probabilities into addition, which is far more natural for the linear algebra based structure of neural networks. 2. Normalize their sum to 1, since that's the total probability we need. One important co…

Thanks for the detailed explanation!

Re: Machine Learning Confronts the Elephant in the Room

#110
post #21

Earlier quoted context omitted.

Because there's always another type of 'elephant' to be thrown in. The networks are just not inherently robust against unexpected features (I'll call them outliers for want of a better term), and this is what needs to be fixed, and not increasing the variety and frequency of outliers.

>Because there's always another type of 'elephant' to be thrown in. Well, you could randomly generate and render 3D objects, and paste them into photos. This will give you a huge space of 'elephants'.

If what you propose was possible to do, if it was possible to overcome the problem described in the above article by using 3d models of real-world objects, then it would also be possible to train on those models in the first place, i.e. we wouldn't need to train machine vision algorithms like CNNs on large datasets of digital stills or photographs- we'd just generate millions of 3d models of objects and scenes of interest, already fully annotated for supervised learning, and train on those. But, as you can probably tell, this is not what happens and instead we have to make do with "real" images, painstakingly collected and annotated with the classes of objets within them "by hand".

What you propose is, essentially, training on a simulation. That doesn't work very well because statistical machine learning algorithms generalise very poorly from training data to unseen data and when your training data is a simulation (such as a 3d model of an object) and the unseen data is the real world (such as a video still, or a digitial photograph of that object) the resulting model will be very bad at predicting the unseen data, so identifying objects in images of the real world.

It might seem to you (and to me!) that modern 3d simulations (as in high-end CGI and video games) is a very faithful simulation of the real world, but that's primarily because we look at modern 3d through human eyes and perceive it with our (presumably) human brains. We don't know how that works exactly, so we can't reproduce the process in computers, yet, therefore machine vision systems essentially "see" and "perceive" something completely different than what we do. In the end, what looks like a very close approximation to you, is pretty much useless for them- or in any case, they are not able to learn to generalise from that to real objects.

Post reply on HN