Researchers at SAIL (Stanford Artificial Intelligence Laboratory), have done it again. They have successfully used Jacket to speed up the training part of Deep Learning algorithms. In their paper titled “<a href="http://ai.stanford.edu/~quocle/LeNgiCoaLahProNg11.pdf">On Optimization Methods for Deep Learning</a>”, they experiment with some of the well known training algorithms and demostrate their scalability across parallel architectures (GPUs as well as multi-machine networks). The algorithms include SGDs (Stochastic Gradient Descent) L-BFGS (Limited BFGS used for solving non-linear problems), CG (Conjugate Gradient).

While SGDs are easy to implement, they require manual tuning. Add to that their sequential nature, they are hard to tune, scale and parallelize making them difficult to use with Deep Learning algorithms.  L-BFGS and CG algorithms can be harder to implement and are more computationally intensive. For speed benefits, they use approximated second order information for L-BFGS, and use the conjugacy information during the optimization step for CG. To overcome the scalability problems of L-BFGS and CG, which require gradient of the entire data set, they utilized mini-batch training which results in a faster algorithm for larger data sizes.

Following are few of the results they achieved using these algorithms for various problems. Each machine is equipped with 4 Intel CPU cores (at 2.67GHz) and a GeForce GTX 285 GPU.

[caption id="attachment_1532" align="aligncenter" width="545"]<a href="http://blog.accelereyes.com/blog/wp-content/uploads/2011/07/Autoencoder_Training.png"><img class="size-full wp-image-1532" title="Autoencoder_Training" src="http://blog.accelereyes.com/blog/wp-content/uploads/2011/07/Autoencoder_Training.png" alt="" width="545" height="421" /></a> Autoencoder training on the CPU[/caption]

&nbsp;

[caption id="attachment_1533" align="aligncenter" width="527"]<a href="http://blog.accelereyes.com/blog/wp-content/uploads/2011/07/Autoencoder_Training_GPU.png"><img class="size-full wp-image-1533" title="Autoencoder_Training_GPU" src="http://blog.accelereyes.com/blog/wp-content/uploads/2011/07/Autoencoder_Training_GPU.png" alt="" width="527" height="396" /></a> Autoencoder training on the GPU vs CPU[/caption]

It can be seen that LBFGS and CG algorithms converge nearly twice as fast on the GPU compared to the CPU. SGD methods though neither improve nor degrade the performance. This behavior can be explained by the large number mini batch sizes preferred by LBFGS / CG compared to SGDs, making them more parallelized for the GPUs.
<p align="LEFT"> For the next experiment, they used the algorithms for training supervised Convoluted neural networks. They then split the workload of calculating the gradient across multiple machines with GPUs.</p>


[caption id="attachment_1534" align="aligncenter" width="452"]<a href="http://blog.accelereyes.com/blog/wp-content/uploads/2011/07/CNN_Multimachine_Training.png"><img class="size-full wp-image-1534" title="CNN_Multimachine_Training" src="http://blog.accelereyes.com/blog/wp-content/uploads/2011/07/CNN_Multimachine_Training.png" alt="" width="452" height="345" /></a> Training Supervised CNNs on a cluster of computers (with GPUs)[/caption]
<p align="LEFT">As it can be seen, the rate of convergence for LBFGS scales well all the way up to 8 machines!</p>
<p align="LEFT">They also talks about other optimization techniques, usage of these algorithms for sparse auto encoding and locally connected networks, and uitility / accuracy of the the LBFGS algorithm for Deep learning.</p>
<p align="LEFT">We would like to thank <a href="http://ai.stanford.edu/~quocle/">Quoc V. Le</a>, <a href="http://cs.stanford.edu/~jngiam/">Jiquan Ngiam</a>, <a href="http://www.stanford.edu/~acoates/">Adam Coates</a>, Abhik Lahiri, Bobby Prochnow,<a href="http://www.cs.stanford.edu/people/ang/"> Andrew Y. Ng</a> and everyone at their group for letting us use and share their work.</p>