Deep Relaxation: PDEs for optimizing Deep Neural Networks

Similar documents
A picture of the energy landscape of! deep neural networks

Unraveling the mysteries of stochastic gradient descent on deep neural networks

arxiv: v2 [cs.lg] 1 Jun 2017

Advanced computational methods X Selected Topics: SGD

Nonlinear Optimization Methods for Machine Learning

Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima

CSCI 1951-G Optimization Methods in Finance Part 12: Variants of Gradient Descent

Day 3 Lecture 3. Optimizing deep networks

ECS171: Machine Learning

Non-Convex Optimization in Machine Learning. Jan Mrkos AIC

CSC321 Lecture 9: Generalization

CS260: Machine Learning Algorithms

CSC321 Lecture 9: Generalization

The K-FAC method for neural network optimization

Sub-Sampled Newton Methods for Machine Learning. Jorge Nocedal

Apprentissage, réseaux de neurones et modèles graphiques (RCP209) Neural Networks and Deep Learning

Algorithms other than SGD. CS6787 Lecture 10 Fall 2017

COMP 551 Applied Machine Learning Lecture 14: Neural Networks

Normalization Techniques in Training of Deep Neural Networks

STA 4273H: Statistical Machine Learning

Based on the original slides of Hung-yi Lee

Comparison of Modern Stochastic Optimization Algorithms

CSC321 Lecture 7: Optimization

CSC321 Lecture 8: Optimization

Stochastic Optimization Algorithms Beyond SG

Introduction to Neural Networks

Distributed Bayesian Learning with Stochastic Natural-gradient EP and the Posterior Server

Overview of gradient descent optimization algorithms. HYUNG IL KOO Based on

Deep Neural Networks: From Flat Minima to Numerically Nonvacuous Generalization Bounds via PAC-Bayes

TTIC 31230, Fundamentals of Deep Learning David McAllester, Winter Generalization and Regularization

On the fast convergence of random perturbations of the gradient flow.

Machine Learning for Large-Scale Data Analysis and Decision Making A. Neural Networks Week #6

Energy Landscapes of Deep Networks

Stochastic Variance Reduction for Nonconvex Optimization. Barnabás Póczos

Don t Decay the Learning Rate, Increase the Batch Size. Samuel L. Smith, Pieter-Jan Kindermans, Quoc V. Le December 9 th 2017

Deep Learning & Artificial Intelligence WS 2018/2019

Need for Deep Networks Perceptron. Can only model linear functions. Kernel Machines. Non-linearity provided by kernels

A summary of Deep Learning without Poor Local Minima

IPAM Summer School Optimization methods for machine learning. Jorge Nocedal

Simple Techniques for Improving SGD. CS6787 Lecture 2 Fall 2017

CPSC 540: Machine Learning

Optimization for neural networks

Sum-Product Networks. STAT946 Deep Learning Guest Lecture by Pascal Poupart University of Waterloo October 17, 2017

CS 6501: Deep Learning for Computer Graphics. Basics of Neural Networks. Connelly Barnes

Introduction to Convolutional Neural Networks (CNNs)

CPSC 540: Machine Learning

Need for Deep Networks Perceptron. Can only model linear functions. Kernel Machines. Non-linearity provided by kernels

The Deep Ritz method: A deep learning-based numerical algorithm for solving variational problems

Tutorial on: Optimization I. (from a deep learning perspective) Jimmy Ba

Improving L-BFGS Initialization for Trust-Region Methods in Deep Learning

Thermostatic Controls for Noisy Gradient Systems and Applications to Machine Learning

CSC2541 Lecture 5 Natural Gradient

Stochastic Gradient Descent. Ryan Tibshirani Convex Optimization

Probabilistic Graphical Models

Deep Neural Networks (3) Computational Graphs, Learning Algorithms, Initialisation

Deep Feedforward Networks

IFT Lecture 6 Nesterov s Accelerated Gradient, Stochastic Gradient Descent

J. Sadeghi E. Patelli M. de Angelis

Why should you care about the solution strategies?

CS 229 Project Final Report: Reinforcement Learning for Neural Network Architecture Category : Theory & Reinforcement Learning

How to do backpropagation in a brain

Credit Assignment: Beyond Backpropagation

Topics we covered. Machine Learning. Statistics. Optimization. Systems! Basics of probability Tail bounds Density Estimation Exponential Families

STA141C: Big Data & High Performance Statistical Computing

Lecture 6 Optimization for Deep Neural Networks

Machine Learning CS 4900/5900. Lecture 03. Razvan C. Bunescu School of Electrical Engineering and Computer Science

Stochastic Fractional Hamiltonian Monte Carlo

OPTIMIZATION METHODS IN DEEP LEARNING

Least Mean Squares Regression

RegML 2018 Class 8 Deep learning

On stochas*c gradient descent, flatness and generaliza*on Yoshua Bengio

Adaptive Gradient Methods AdaGrad / Adam

Stochastic Optimization Methods for Machine Learning. Jorge Nocedal

STA414/2104 Statistical Methods for Machine Learning II

ECE G: Special Topics in Signal Processing: Sparsity, Structure, and Inference

Lecture 1: March 7, 2018

Optimization in the Big Data Regime 2: SVRG & Tradeoffs in Large Scale Learning. Sham M. Kakade

Classification goals: Make 1 guess about the label (Top-1 error) Make 5 guesses about the label (Top-5 error) No Bounding Box

15-889e Policy Search: Gradient Methods Emma Brunskill. All slides from David Silver (with EB adding minor modificafons), unless otherwise noted

Gaussian Process Approximations of Stochastic Differential Equations

Non-Convex Optimization. CS6787 Lecture 7 Fall 2017

Learning Tetris. 1 Tetris. February 3, 2009

A random perturbation approach to some stochastic approximation algorithms in optimization.

Stein Variational Gradient Descent: A General Purpose Bayesian Inference Algorithm

Topics in AI (CPSC 532L): Multimodal Learning with Vision, Language and Sound. Lecture 3: Introduction to Deep Learning (continued)

Adaptive Gradient Methods AdaGrad / Adam. Machine Learning for Big Data CSE547/STAT548, University of Washington Sham Kakade

Parallel and Distributed Stochastic Learning -Towards Scalable Learning for Big Data Intelligence

Distributed Machine Learning: A Brief Overview. Dan Alistarh IST Austria

Hopfield Networks and Boltzmann Machines. Christian Borgelt Artificial Neural Networks and Deep Learning 296

Optimization for Training I. First-Order Methods Training algorithm

Simulated Annealing for Constrained Global Optimization

Bridging the Gap between Stochastic Gradient MCMC and Stochastic Optimization

Stochastic Gradient Descent. CS 584: Big Data Analytics

SGD and Deep Learning

Bayesian Methods for Machine Learning

The connection of dropout and Bayesian statistics

Pattern Recognition and Machine Learning. Bishop Chapter 11: Sampling Methods

Learning From Data Lecture 15 Reflecting on Our Path - Epilogue to Part I

Lecture 3: Deep Learning Optimizations

Value Function Methods. CS : Deep Reinforcement Learning Sergey Levine

Transcription:

Deep Relaxation: PDEs for optimizing Deep Neural Networks IPAM Mean Field Games August 30, 2017 Adam Oberman (McGill) Thanks to the Simons Foundation (grant 395980) and the hospitality of the UCLA math department

Coauthors Pratik Chaudhari, UCLA Comp Sci. Stanley Osher, UCLA Math Stefano Soatto UCLA Comp Sci. Guillaume Carlier, CEREMADE, U. Parix IX Dauphine Thanks to the Simons Foundation (grant 395980) and the hospitality of the UCLA math department

Introduction Deep Learning

Machine Learning vs. Deep Learning Typical Machine Learning models better understood mathematically, don t scale as well to very large problems. Deep Learning Very effective for large scale problems (e.g. identifying images). Major open problem: understand generalization (why training on a large data set works so well on real problems).

Deep Network Nested hierarchy of concepts, each defined in relation to simpler concepts [Goodfellow Deep Learning]

Deep Learning Background Deep Learning: recognize face in picture, translate voice recording into text. Training: optimizing the parameters of the model, the weights, to best fit the data.

Derivation of Stochastic Gradient from mini-batch Motivating Example: k-means clustering, ( take k = 1) Cost is N mini-batch: randomly choose a smaller set I of points from the data. Cost is I If the points are IID, then by the Central Limit Theorem

Training a DNN Tuning hyperparameters is labor intensive. Training is performed, simply and effectively, by Stochastic Gradient Descent (SDG). SGD is so effective, some popular programming languages [TensorFlow] do not allow modification. Tuning hyperparameters

Local Entropy: from Spin Glasses to Deep Networks to Hamilton-Jacobi PDEs

Local Entropy (statistical physics) Motivation: Local Entropy in Spin Glasses seeking to improve generalization [Local Entropy in Constraint Satisfaction Problems, Baldassi 2016] [Unreasonable Effectiveness of Deep Learning, B.,,Zecchina PNAS 2016]

Jan 2017 Similar formula to Local Entropy in Spin Glasses, but now in continuous variables. Algorithmic: can evaluate grad f efficiently by an auxiliary SGD dynamics. No PDEs in this paper!

Entropy-SGD improves training and generalization Entropy-SGD: a modification of SGD, which results in shorter training time, and weights with better generalization. Training time is important: large networks may take weeks Generalization is very important. Gains from training are free compared gains from model/data

HJB-PDEs and Local-Entropy [Deep Relaxation C. O. O. S. C. 2017/05] started by identifying the Local Entropy function as the solution of a Hamilton-Jacobi PDE. This observation led to: Proof that the method trains faster Proof of wider minima (believed to be related to generalization). and eventually, improvements to the algorithm.

Parallel SGD EASGD [LeCun Elastic Averaging SGD] effective parallel training Very recently new algorithm, PARLE [Chaudry 2017/07], giving best results to date on CIFAR-10, CIFAR-100, SVHN ESGD on each processor Elastic forcing term between each particle. JKO gradient flow interpretation for PARLE:

PDE interpretation of local entropy and equation for the gradient

Hopf-Cole Transformation for HJB This is well-known result, see [Evans PDE]

Hopf-Cole Proof

Local Entropy: Visualization

Stochastic Optimal Control Interpretation

Visualization of Improvement: dimension 1, PDE simulation.

Local Entropy is Regularization using Viscous Hamilton- Jacobi PDE True solution in one dimension. (Cartoon in high dimensions, because algorithm only works for shorter times.)

Proof of Improvement for Modified dynamics

Modified System Using stochastic control theory [Fleming] obtain HJB equation for the value function Note: the zero control corresponds to SGD

Expected Improvement Theorem Note this is the modified (HJB) from the previous slide. Alternately, if we go back to the original HJB, we have the implicit gradient descent interpretation. Or, same theorem, comparing LE-SGD to random walk (no gradient)

Solving PDEs in high dimensions? not quite, just need gradient at one point. Will integration work? no! curse of dimensionality. Require a method which overcomes the curse of dimensionality: Langevin Markov-Chain Monte Carlo (MCMC)

Langevin MCMC Want to compute: Langevin MCMC: sample the measure using a dynamical system, and average expression against the measure by a time average, using ergodicity.

Stochastic Differential Equations and Fokker Planck PDE

Background: Homogenization of SDEs Two scale dynamics Unique invariant measure of the fast dynamics In the limit, obtain homogenized dynamics given by averaging against the invariant measure Equivalent by ergodicity to a time average.

Langevin MCMC for the Gradient

Proof of MCMC for the Gradient

Exponential Convergence in Wasserstein for Fokker-Planck in convex case So the MCMC step is exponentially convergent, for small enough values of time. This explains why the algorithm converges with a relatively small (100) time steps. (Accurate enough with 25 steps).

Algorithm and Results in Deep Networks

Algorithm for Local Entropy Scoping: for the control problem. Gamma decreases linearly with time. (at leads near final time). Outer Loop: Implicit Gradient descent Inner Loop: Estimate gradient by Langevin MCMC

Numerical Results Visualization of Improvement in training loss (left) Improve in Validation Error (right) dimension = 1.67 million

Numerical Results E-SGD: previous algorithm, HJ improved algorithm SGD well tuned, i.e. best results previously obtained. HJ improves both the training time and the Validation error. These fractions of a percent are significant.

PARLE-SGD

Improvements using PDE optimized learning rate MNIST with Chris Finlay PhD student McGill

Optimization: Acceleration methods Deterministic and Stochastic HJB gradient as implicit gradient descent (Most of our analysis is for continuous time in practice, take discrete time steps)

Accelerated Gradient Methods for (non-strictly) convex functions

SGD versus Entropy-SGD 50 steps of SGD 50 outer steps LESGD, (25 steps in each inner loop) figures: PhD student Bilal Abbasi

Implicit/Proximal gradient descent Implicit methods: more stable, allow longer time step. Not practical: requires a (local) minimization/equation solve at each step. Advantages: stable, guaranteed descent, even in nonconvex case Method is equivalent to backward Euler method for gradient descent. Gradient can be evaluated from the solution of Hamilton-Jacobi PDE The corresponding update is exactly So PDE solution gives a formula for implicit GD

Fokker-Planck with nonconvex Potentials Challenges, and insights from Computational Molecular Dynamics

Metastability in one dimension: Exponential time to discover nearby minima Ref: [Bovier, Metastability] for [Kramer s 1940] formula Video

Metastability in higher dimensions Energetic Barrier climb mountain pass between valleys Entropic Barrier lakes connected by narrow rivers ref: [PDEs in Molecular Dynamics, Lelievre and Stolz]

Metastability and widening in DNNs Entropic Barriers are believed to be significant in DNNs. Conjecture: Local Entropy improves the entropic barriers, by widening local minima. PDE proof of second conjecture. using standard semi-concavity estimates. Thm: HJB widens the narrow rivers

Algorithm Test: K-Means work in progress with: S. Osher, Mihn Pham, Penghang Yin, UCLA

Algorithm Applied to k-means clustering Standard algorithm, Lloyd s/em can get stuck in a local minimum. Our algorithm, in comparable test case, finds global minimum Example on Right: 4 means, 3 clusters Optimal solution puts two means in the double cluster.

Algorithm Applied to k-means clustering 1. ESGD vs. EM 100 trials, K = 8 (ground truth), ESGD batch size = 1000 Method Min Max Mean Variance % global min found mb-em 15.6800 27.2828 20.0203 6.0030 10% ESGD 15.6808 15.6808 15.6808 1.49x10-10 100% 2. ESGD vs. mini-batch EM (mb-em) 100 trials, K = 8 (ground truth), both batch size = 500 Method Min Max Mean Variance % global min found mb-em 15.9148 18.1848 16.4009 0.7646 77% ESGD 15.6816 15.6821 15.6820 1.18x10-9 100%

Conclusions Discovered a HJB-PDE connection with Entropy-SGD algorithm, which has very good performance in Deep Networks. Exploited this connection to better understand the algorithm, giving proofs to empirical results about training. Improvements to algorithm using PDE insights and numerical PDE ideas.