A STRAIGHTFORWARD LINE SEARCH APPROACH ON THE EXPECTED EMPIRICAL LOSS FOR STOCHASTIC DEEP LEARNING PROBLEMS

Abstract

A fundamental challenge in deep learning is that the optimal step sizes for update steps of stochastic gradient descent are unknown. In traditional optimization, line searches are used to determine good step sizes, however, in deep learning, it is too costly to search for good step sizes on the expected empirical loss due to noisy losses. This empirical work shows that it is possible to approximate the expected empirical loss on vertical cross sections for common deep learning tasks considerably cheaply. This is achieved by applying traditional one-dimensional function fitting to measured noisy losses of such cross sections. The step to a minimum of the resulting approximation is then used as step size for the optimization. This approach leads to a robust and straightforward optimization method which performs well across datasets and architectures without the need of hyperparameter tuning.

1. INTRODUCTION AND BACKGROUND

The automatic determination of an optimal learning rate schedule to train models with stochastic gradient descent or similar optimizers is still not solved satisfactorily for standard and especially new deep learning tasks. Frequently, optimization approaches utilize the information of the loss and gradient of a single batch to perform an update step. However, those approaches focus on the batch loss, whereas the optimal step size should actually be determined for the empirical loss, which is the expected loss over all batches. In classical optimization line searches are commonly used to determine good step sizes. In deep learning, however, the noisy loss functions makes it impractically costly to search for step sizes on the empirical loss. This work empirically revisits that the empirical loss has a simple shape in the direction of noisy gradients. Based on this information, it is shown that the empirical loss can be easily fitted with lower order polynomials in these directions. This is done by performing a straightforward, one-dimensional regression on batch losses sampled in such a direction. It then becomes simple to determine a suitable minimum and thus a good step size from the approximated function. This results in a line search on the empirical loss. Compared to the direct measurement of the empirical loss on several locations, our approach is cost-efficient since it solely requires a sample size of about 500 losses to approximate a cross section of the loss. From a practical point of view this is still too expensive to determine the step size for each step. Fortunately, it turns out to be sufficient to estimate a new step size only a few times during a training process, which, does not require any additional time due to more beneficial update steps. We show that this straightforward optimization approach called ELF (Empirical Loss Fitting optimizer), performs robustly across datasets and models without the need for hyperparameter tuning. This makes ELF a choice to be considered in order to achieve good results for new deep learning tasks out of the box. In the following we will revisit the fundamentals of optimization in deep learning to make our approach easily understandable. Following Goodfellow et al. (2016) , the aim of optimization in deep learning generally means to find a global minimum of the true loss (risk) function L true which is the expected loss over all elements of the data generating distribution p data : L true (θ) = E (x,y)∼p data L(f (x; θ), y) (1) where L is the loss function for each sample (x, y), θ are the parameters to optimize and f the model function. However, p data is usually unknown and we need to use an empirical approximation pdata ,

