I saw this paper before, and maybe I’m being an idiot but I didn’t understand this:
Training Deep Neural Networks is complicated by the fact that the distribution of each layer’s inputs changes during training, as the parameters of the previous layers change.
I thought one generally trained the networks layer by layer, so layer n would be completely finished training before layer n+1 starts. Then there is no problem of “the distribution of each layer’s inputs changes” because the inputs are fixed once training starts.
Admittedly, this is a problem if you don’t have all the training data to start of with and want to learn incrementally, but AFAICT that is not generally the case in these benchmarking contests.
Regardless, its amazing how simple DNNs are. People have been working on computer vision and AI for about 60 years, and then a program like this comes along which is only around 500 lines of code, conceptually simple enough to explain to anyone with a reasonable mathematical background, but can nevertheless beat humans at a reasonable range of tasks.
Regardless, its amazing how simple DNNs are. People have been working on computer vision and AI for about 60 years, and then a program like this comes along which is only around 500 lines of code, conceptually simple enough to explain to anyone with a reasonable mathematical background, but can nevertheless beat humans at a reasonable range of tasks.
I get the impression it’s a hardware issue. See for example http://nautil.us/issue/21/information/the-man-who-tried-to-redeem-the-world-with-logic—McCulloch & Pitts invented neural networks almost before digital computers existed* and he was working on “three-dimensional neural networks”. They didn’t invent backpropagation, I don’t think, but even if they had, how would they have run, much less trained, the state of the art many-layer neural networks with millions of nodes and billions of connections like we’re seeing these days? What those 60 years of work gets you is a lot of specialized algorithms which don’t reach human-parity but at least are computable on the hardware of that day.
* depends on what exactly you consider the first digital computer and how long before the key publication you date their breakthrough.
Can confirm that hardware (and data!) are the two main culprits here. The actual learning algorithms haven’t changed much since the mid 1980s, but computers have gotten many times faster, GPUs are 30-100x faster still, and the amount of data has similarly increased by several orders of magnitude.
Training networks layer by layer was the trend from the mid to late 2000s up until early 2012, but that changed in mid 2012 when Alex Krizhevsky and Geoff Hinton finally got neural nets to work for large-scale tasks in computer vision. They simply trained the whole network jointly with stochastic gradient descent, which has remained the case for most neural nets in vision since then.
Really? I was under the impression that training the whole network with gradient decent was impossible, because the propagated error becomes infinitesimally small. In fact, I thought that training layers individually was the insight that made DNNs possible.
Do you have a link about how they managed to train the whole network?
That was indeed one of the hypotheses about why it was difficult to train the networks—the vanishing gradient problem. In retrospect, one of the main reasons why this happened was the use of saturating nonlinearities in the network—nonlinearities like the logistic function or tanh which asymptote at 1. Because they asymptote, their derivatives always end up being really small, and the deeper your network the more this effect compounds. The first large-scale network that fixed this was by Krizhevsky et al., which used a Rectified Linear Unit (ReLU) for their nonlinearity, given by f(x) = max(0, x). The earliest reference I can find to using ReLUs is Jarrett et al., but since Krizhevsky’s result pretty much everyone uses ReLUs (or some variant thereof). In fact, the first result I’ve seen showing that logistic/tanh nonlinearities can work is the batch normalization paper Sean_o_h linked, which gets around the problem by normalizing the input to the nonlinearity, which presumably prevents the units from saturating too much (though this is still an open question).
I was under the impression that training the whole network with gradient decent was impossible, because the propagated error becomes infinitesimally small.
If you do it naively, yes. But researches figured out how to attack that problem from multiple angles: from the choice of the non-linear activation function, to specifics of the optimization algorithm, to the random distribution used to sample the initial weights.
Do you have a link about how they managed to train the whole network?
The batch normalization paper cited above is one example of that.
Regardless, its amazing how simple DNNs are. People have been working on computer vision and AI for about 60 years, and then a program like this comes along which is only around 500 lines of code, conceptually simple enough to explain to anyone with a reasonable mathematical background, but can nevertheless beat humans at a reasonable range of tasks.
Beware, there is a lot of non-obvious complexity in these models: ”Traditional” machine learning models (i.e. logistic regression, SVM, random forests) only have few hyperparameters and they are not terribly sensitive to their values, hence you can usually tune them coarsely and quickly. These fancy deep neural networks can easily have tens, if not hundreds of hyperparameters, and they are often quite sensitive to them. A bad choice can easily make your training procedure quickly stop making progress (insufficient capacity/vanishing gradients) or diverge (exploding gradients) or converge to something which doesn’t generalize well on unseen data (overfitting). Finding a good choice of hyperparameters can be really a non-trivial optimization problem on its own (and a combinatorial one, since many of these hyperparameters are discrete and you can’t really expect the model performances to depend monotonically on their values). Unfortunately, in these DNN papers, especially the “better than humans” ones, hyperparameters values often seem to appear out of nowhere. There is some research and tools to do that systematically, but it is not often discussed in the papers presenting novel architectures and results.
SVMs are pretty bad for hyperparameters too, if you want a simple model use random forests or naive bayes.
I struggle to see how DNNs can have hundreds of hyperparameters—looking at the code for the paper I linked to, they seem to have learning rate, 2 parameters for simulated annealing, weight cost and batch size. That’s 5, not counting a few others which only apply to reinforcement learning DNNs. Admittedly, there is the choice of sigmoid/rectilinear, and of the number of neurons, layers and epocs, but these last few are largely determined by what hardware you have and how much time you are willing to spend training.
Having skimmed the paper you linked to, it seems they have hundreds of parameters because they are using a rather more complex network topology with SVMs fitting the neuron activation to the targets. And that’s interesting in itself.
Unfortunately, in these DNN papers, especially the “better than humans” ones, hyperparameters values often seem to appear out of nowhere.
The general problem of hyperparameter values is one of the things that worries me about academia. So you have an effect (p1, which is an improvement I suppose.
Oh, and this paper was published in Nature.
There is some research and tools to do that systematically, but it is not often discussed in the papers presenting novel architectures and results.
I’d be surprised if this could work with DNNs—AKAIK, monte-carlo optimization, for instance, generally takes thousands of evaluations steps, yet with DNNs each evaluation step would require days of training, so it would require thousands of GPU-days. Indeed, the paper you linked to ran 1200 evaluations, so I’m guessing they had a lot of hardware.
How so? Linear SVM main hyperparameter is the regularization coefficient. There is also the choice of loss and regularization penalty, but these are only a couple of bits. Non-linear SVM has also the choice of the kernel (in practice it’s either RBF or polynomial, unless you are working on special types of data such as strings or trees) and one or two kernel hyperparameters.
I struggle to see how DNNs can have hundreds of hyperparameters—looking at the code for the paper I linked to, they seem to have learning rate, 2 parameters for simulated annealing, weight cost and batch size. That’s 5, not counting a few others which only apply to reinforcement learning DNNs. Admittedly, there is the choice of sigmoid/rectilinear, and of the number of neurons, layers and epocs,
I haven’t read all the paper, but at glance you have:
Number of convolutional layers, number of non-convolutional layers, number of nodes in each non-convolutional layer, for each convolutional layer number of filters, filter size and stride. There are also 16 other hyperparameters described here. You could also count the preprocessing strategy.
Other papers have even more hyperparameters (max-pooling layers each with a window size, dropout layers each with a dropout rate, layer-wise regularization coefficients, and so on).
I saw this paper before, and maybe I’m being an idiot but I didn’t understand this:
I thought one generally trained the networks layer by layer, so layer n would be completely finished training before layer n+1 starts. Then there is no problem of “the distribution of each layer’s inputs changes” because the inputs are fixed once training starts.
Admittedly, this is a problem if you don’t have all the training data to start of with and want to learn incrementally, but AFAICT that is not generally the case in these benchmarking contests.
Regardless, its amazing how simple DNNs are. People have been working on computer vision and AI for about 60 years, and then a program like this comes along which is only around 500 lines of code, conceptually simple enough to explain to anyone with a reasonable mathematical background, but can nevertheless beat humans at a reasonable range of tasks.
I get the impression it’s a hardware issue. See for example http://nautil.us/issue/21/information/the-man-who-tried-to-redeem-the-world-with-logic—McCulloch & Pitts invented neural networks almost before digital computers existed* and he was working on “three-dimensional neural networks”. They didn’t invent backpropagation, I don’t think, but even if they had, how would they have run, much less trained, the state of the art many-layer neural networks with millions of nodes and billions of connections like we’re seeing these days? What those 60 years of work gets you is a lot of specialized algorithms which don’t reach human-parity but at least are computable on the hardware of that day.
* depends on what exactly you consider the first digital computer and how long before the key publication you date their breakthrough.
Can confirm that hardware (and data!) are the two main culprits here. The actual learning algorithms haven’t changed much since the mid 1980s, but computers have gotten many times faster, GPUs are 30-100x faster still, and the amount of data has similarly increased by several orders of magnitude.
Training networks layer by layer was the trend from the mid to late 2000s up until early 2012, but that changed in mid 2012 when Alex Krizhevsky and Geoff Hinton finally got neural nets to work for large-scale tasks in computer vision. They simply trained the whole network jointly with stochastic gradient descent, which has remained the case for most neural nets in vision since then.
Really? I was under the impression that training the whole network with gradient decent was impossible, because the propagated error becomes infinitesimally small. In fact, I thought that training layers individually was the insight that made DNNs possible.
Do you have a link about how they managed to train the whole network?
That was indeed one of the hypotheses about why it was difficult to train the networks—the vanishing gradient problem. In retrospect, one of the main reasons why this happened was the use of saturating nonlinearities in the network—nonlinearities like the logistic function or tanh which asymptote at 1. Because they asymptote, their derivatives always end up being really small, and the deeper your network the more this effect compounds. The first large-scale network that fixed this was by Krizhevsky et al., which used a Rectified Linear Unit (ReLU) for their nonlinearity, given by f(x) = max(0, x). The earliest reference I can find to using ReLUs is Jarrett et al., but since Krizhevsky’s result pretty much everyone uses ReLUs (or some variant thereof). In fact, the first result I’ve seen showing that logistic/tanh nonlinearities can work is the batch normalization paper Sean_o_h linked, which gets around the problem by normalizing the input to the nonlinearity, which presumably prevents the units from saturating too much (though this is still an open question).
If you do it naively, yes. But researches figured out how to attack that problem from multiple angles: from the choice of the non-linear activation function, to specifics of the optimization algorithm, to the random distribution used to sample the initial weights.
The batch normalization paper cited above is one example of that.
Beware, there is a lot of non-obvious complexity in these models:
”Traditional” machine learning models (i.e. logistic regression, SVM, random forests) only have few hyperparameters and they are not terribly sensitive to their values, hence you can usually tune them coarsely and quickly.
These fancy deep neural networks can easily have tens, if not hundreds of hyperparameters, and they are often quite sensitive to them. A bad choice can easily make your training procedure quickly stop making progress (insufficient capacity/vanishing gradients) or diverge (exploding gradients) or converge to something which doesn’t generalize well on unseen data (overfitting).
Finding a good choice of hyperparameters can be really a non-trivial optimization problem on its own (and a combinatorial one, since many of these hyperparameters are discrete and you can’t really expect the model performances to depend monotonically on their values).
Unfortunately, in these DNN papers, especially the “better than humans” ones, hyperparameters values often seem to appear out of nowhere.
There is some research and tools to do that systematically, but it is not often discussed in the papers presenting novel architectures and results.
SVMs are pretty bad for hyperparameters too, if you want a simple model use random forests or naive bayes.
I struggle to see how DNNs can have hundreds of hyperparameters—looking at the code for the paper I linked to, they seem to have learning rate, 2 parameters for simulated annealing, weight cost and batch size. That’s 5, not counting a few others which only apply to reinforcement learning DNNs. Admittedly, there is the choice of sigmoid/rectilinear, and of the number of neurons, layers and epocs, but these last few are largely determined by what hardware you have and how much time you are willing to spend training.
Having skimmed the paper you linked to, it seems they have hundreds of parameters because they are using a rather more complex network topology with SVMs fitting the neuron activation to the targets. And that’s interesting in itself.
The general problem of hyperparameter values is one of the things that worries me about academia. So you have an effect (p1, which is an improvement I suppose.
Oh, and this paper was published in Nature.
I’d be surprised if this could work with DNNs—AKAIK, monte-carlo optimization, for instance, generally takes thousands of evaluations steps, yet with DNNs each evaluation step would require days of training, so it would require thousands of GPU-days. Indeed, the paper you linked to ran 1200 evaluations, so I’m guessing they had a lot of hardware.
How so? Linear SVM main hyperparameter is the regularization coefficient. There is also the choice of loss and regularization penalty, but these are only a couple of bits.
Non-linear SVM has also the choice of the kernel (in practice it’s either RBF or polynomial, unless you are working on special types of data such as strings or trees) and one or two kernel hyperparameters.
I haven’t read all the paper, but at glance you have: Number of convolutional layers, number of non-convolutional layers, number of nodes in each non-convolutional layer, for each convolutional layer number of filters, filter size and stride. There are also 16 other hyperparameters described here.
You could also count the preprocessing strategy.
Other papers have even more hyperparameters (max-pooling layers each with a window size, dropout layers each with a dropout rate, layer-wise regularization coefficients, and so on).