Probabilistic Line Searchesfor Stochastic Optimization

Probabilistic Line Searches
for Stochastic Optimization

Maren Mahsereci and Philipp Hennig
Max Planck Institute for Intelligent Systems
Spemannstraße 38, 72076 Tübingen, Germany
[mmahsereci|phennig]@tue.mpg.de
Abstract

In deterministic optimization, line searches are a standard tool ensuring stability and efficiency. Where only stochastic gradients are available, no direct equivalent has so far been formulated, because uncertain gradients do not allow for a strict sequence of decisions collapsing the search space. We construct a probabilistic line search by combining the structure of existing deterministic methods with notions from Bayesian optimization. Our method retains a Gaussian process surrogate of the univariate optimization objective, and uses a probabilistic belief over the Wolfe conditions to monitor the descent. The algorithm has very low computational cost, and no user-controlled parameters. Experiments show that it effectively removes the need to define a learning rate for stochastic gradient descent.

1 Introduction

Stochastic gradient descent (sgd[1] is currently the standard in machine learning for the optimization of highly multivariate functions if their gradient is corrupted by noise. This includes the online or batch training of neural networks, logistic regression [2, 3] and variational models [e.g. 4, 5, 6]. In all these cases, noisy gradients arise because an exchangeable loss-function of the optimization parameters , across a large dataset , is evaluated only on a subset :

(1)

If the indices are i.i.d. draws from , by the Central Limit Theorem, the error is unbiased and approximately normal distributed. Despite its popularity and its low cost per step, sgd has well-known deficiencies that can make it inefficient, or at least tedious to use in practice. Two main issues are that, first, the gradient itself, even without noise, is not the optimal search direction; and second, sgd requires a step size (learning rate) that has drastic effect on the algorithm’s efficiency, is often difficult to choose well, and virtually never optimal for each individual descent step. The former issue, adapting the search direction, has been addressed by many authors [see 7, for an overview]. Existing approaches range from lightweight ‘diagonal preconditioning’ approaches like adagrad [8] and ‘stochastic meta-descent’[9], to empirical estimates for the natural gradient [10] or the Newton direction [11], to problem-specific algorithms [12], and more elaborate estimates of the Newton direction [13]. Most of these algorithms also include an auxiliary adaptive effect on the learning rate. And Schaul et al. [14] recently provided an estimation method to explicitly adapt the learning rate from one gradient descent step to another. None of these algorithms change the size of the current descent step. Accumulating statistics across steps in this fashion requires some conservatism: If the step size is initially too large, or grows too fast, sgd can become unstable and ‘explode’, because individual steps are not checked for robustness at the time they are taken.

Figure 1: Sketch: The task of a classic line search is to tune the step taken by a optimization algorithm along a univariate search direction. The search starts at the endpoint ➀ of the previous line search, at . A sequence of exponentially growing extrapolation steps ➁,➂,➃ finds a point of positive gradient at ➃. It is followed by interpolation steps ➄,➏ until an acceptable point ➏ is found. Points of insufficient decrease, above the line (gray area) are excluded by the Armijo condition W-I, while points of steep gradient (orange areas) are excluded by the curvature condition W-II (weak Wolfe conditions in solid orange, strong extension in lighter tone). Point ➏ is the first to fulfil both conditions, and is thus accepted.

The principally same problem exists in deterministic (noise-free) optimization problems. There, providing stability is one of several tasks of the line search subroutine. It is a standard constituent of algorithms like the classic nonlinear conjugate gradient [15] and BFGS [16, 17, 18, 19] methods [20, §3].111In these algorithms, another task of the line search is to guarantee certain properties of surrounding estimation rule. In BFGS, e.g., it ensures positive definiteness of the estimate. This aspect will not feature here. In the noise-free case, line searches are considered a solved problem [20, §3]. But the methods used in deterministic optimization are not stable to noise. They are easily fooled by even small disturbances, either becoming overly conservative or failing altogether. The reason for this brittleness is that existing line searches take a sequence of hard decisions to shrink or shift the search space. This yields efficiency, but breaks hard in the presence of noise. Section 3 constructs a probabilistic line search for noisy objectives, stabilizing optimization methods like the works cited above. As line searches only change the length, not the direction of a step, they could be used in combination with the algorithms adapting sgd’s direction, cited above. The algorithm presented below is thus a complement, not a competitor, to these methods.

2 Connections

2.1 Deterministic Line Searches

There is a host of existing line search variants [20, §3]. In essence, though, these methods explore a univariate domain ‘to the right’ of a starting point, until an ‘acceptable’ point is reached (Figure 1). More precisely, consider the problem of minimizing , with access to . At iteration , some ‘outer loop’ chooses, at location , a search direction (e.g. by the BFGS rule, or simply for gradient descent). It will not be assumed that has unit norm. The line search operates along the univariate domain for . Along this direction it collects scalar function values and projected gradients that will be denoted and . Most line searches involve an initial extrapolation phase to find a point with . This is followed by a search in , by interval nesting or by interpolation of the collected function and gradient values, e.g. with cubic splines.222This is the strategy in minimize.m by C. Rasmussen, which provided a model for our implementation. At the time of writing, it can be found at http://learning.eng.cam.ac.uk/carl/code/minimize/minimize.m

2.1.1 The Wolfe Conditions for Termination

Figure 2: Sketch of a probabilistic line search. As in Fig. 1, the algorithm performs extrapolation (➁,➂,➃) and interpolation (➄,➏), but receives unreliable, noisy function and gradient values. These are used to construct a gp posterior (top. solid posterior mean, thin lines at 2 standard deviations, local pdf marginal as shading, three dashed sample paths). This implies a bivariate Gaussian belief (§3.3) over the validity of the weak Wolfe conditions (middle three plots. is the marginal for W-I, for W-II, their correlation). Points are considered acceptable if their joint probability (bottom) is above a threshold (gray). An approximation (§3.3.1) to the strong Wolfe conditions is shown dashed.

As the line search is only an auxiliary step within a larger iteration, it need not find an exact root of ; it suffices to find a point ‘sufficiently’ close to a minimum. The Wolfe [21] conditions are a widely accepted formalization of this notion; they consider acceptable if it fulfills

(2)

using two constants chosen by the designer of the line search, not the user. W-I is the Armijo [22], or sufficient decrease condition. It encodes that acceptable functions values should lie below a linear extrapolation line of slope . W-II is the curvature condition, demanding a decrease in slope. The choice accepts any value below , while rejects all points for convex functions. For the curvature condition, only accepts points with ; while accepts any point of greater slope than . W-I and W-II are known as the weak form of the Wolfe conditions. The strong form replaces W-II with (W-IIa). This guards against accepting points of low function value but large positive gradient. Figure 1 shows a conceptual sketch illustrating the typical process of a line search, and the weak and strong Wolfe conditions. The exposition in §3.3 will initially focus on the weak conditions, which can be precisely modeled probabilistically. Section 3.3.1 then adds an approximate treatment of the strong form.

2.2 Bayesian Optimization

A recently blossoming sample-efficient approach to global optimization revolves around modeling the objective with a probability measure ; usually a Gaussian process (gp). Searching for extrema, evaluation points are then chosen by a utility functional . Our line search borrows the idea of a Gaussian process surrogate, and a popular utility, expected improvement [23]. Bayesian optimization methods are often computationally expensive, thus ill-suited for a cost-sensitive task like a line search. But since line searches are governors more than information extractors, the kind of sample-efficiency expected of a Bayesian optimizer is not needed. The following sections develop a lightweight algorithm which adds only minor computational overhead to stochastic optimization.

3 A Probabilistic Line Search

We now consider minimizing from Eq. (1). That is, the algorithm can access only noisy function values and gradients at location , with Gaussian likelihood

(3)

The Gaussian form is supported by the Central Limit argument at Eq. (1), see §3.4 regarding estimation of the variances . Our algorithm has three main ingredients: A robust yet lightweight Gaussian process surrogate on facilitating analytic optimization; a simple Bayesian optimization objective for exploration; and a probabilistic formulation of the Wolfe conditions as a termination criterion.

3.1 Lightweight Gaussian Process Surrogate

We model information about the objective in a probability measure . There are two requirements on such a measure: First, it must be robust to irregularity of the objective. And second, it must allow analytic computation of discrete candidate points for evaluation, because a line search should not call yet another optimization subroutine itself. Both requirements are fulfilled by a once-integrated Wiener process, i.e. a zero-mean Gaussian process prior with covariance function

(4)

Here and denote a shift by a constant . This ensures this kernel is positive semi-definite, the precise value is irrelevant as the algorithm only considers positive values of (our implementation uses ). See §3.4 regarding the scale . With the likelihood of Eq. (3), this prior gives rise to a gp posterior whose mean function is a cubic spline333Eq. (4) can be generalized to the ‘natural spline’, removing the need for the constant [24, §6.3.1]. However, this notion is ill-defined in the case of a single observation, which is crucial for the line search. [25]. We note in passing that regression on and from observations of pairs can be formulated as a filter [26] and thus performed in time. However, since a line search typically collects data points, generic gp inference, using a Gram matrix, has virtually the same, low cost.

Because Gaussian measures are closed under linear maps [27, §10], Eq. (4) implies a Wiener process (linear spline) model on :

(5)

with (using the indicator function if , else 0)

(6)

Given a set of evaluations (vectors, with elements ) with independent likelihood (3), the posterior is a gp with posterior mean and covariance and as follows:

(7)

The posterior marginal variance will be denoted by . To see that is indeed piecewise cubic (i.e. a cubic spline), we note that it has at most three non-vanishing derivatives444There is no well-defined probabilistic belief over and higher derivatives—sample paths of the Wiener process are almost surely non-differentiable almost everywhere [28, §2.2]. But is always a member of the reproducing kernel Hilbert space induced by , thus piecewise cubic [24, §6.1]., because

(8)

This piecewise cubic form of is crucial for our purposes: having collected values of and , respectively, all local minima of can be found analytically in time in a single sweep through the ‘cells’ , (here denotes the start location, where are ‘inherited’ from the preceding line search. For typical line searches , c.f. §4). In each cell, is a cubic polynomial with at most one minimum in the cell, found by a trivial quadratic computation from the three scalars . This is in contrast to other gp regression models—for example the one arising from a Gaussian kernel—which give more involved posterior means whose local minima can be found only approximately. Another advantage of the cubic spline interpolant is that it does not assume the existence of higher derivatives (in contrast to the Gaussian kernel, for example), and thus reacts robustly to irregularities in the objective.

In our algorithm, after each evaluation of , we use this property to compute a short list of candidates for the next evaluation, consisting of the local minimizers of and one additional extrapolation node at , where is the currently largest evaluated , and is an extrapolation step size starting at and doubled after each extrapolation step.

3.2 Choosing Among Candidates

The previous section described the construction of discrete candidate points for the next evaluation. To decide at which of the candidate points to actually call and , we make use of a popular utility from Bayesian optimization. Expected improvement [23] is the expected amount, under the gp surrogate, by which the function might be smaller than a ‘current best’ value (we set , where are observed locations),

(9)

The next evaluation point is chosen as the candidate maximizing this utility, multiplied by the probability for the Wolfe conditions to be fulfilled, which is derived in the following section.

Figure 3: Curated snapshots of line searches (from MNIST experiment, §4), showing variability of the objective’s shape and the decision process. Top row: gp posterior and evaluations, bottom row: approximate over strong Wolfe conditions. Accepted point marked red.

3.3 Probabilistic Wolfe Conditions for Termination

The key observation for a probabilistic extension of W-I and W-II is that they are positivity constraints on two variables that are both linear projections of the (jointly Gaussian) variables and :

(10)

The gp of Eq. (5) on thus implies, at each value of , a bivariate Gaussian distribution

(11)
(12)
(13)

The quadrant probability for the Wolfe conditions to hold is an integral over a bivariate normal probability,

(14)

with correlation coefficient . It can be computed efficiently [29], using readily available code555e.g. http://www.math.wsu.edu/faculty/genz/software/matlab/bvn.m (on a laptop, one evaluation of cost about 100 microseconds, each line search requires such calls). The line search computes this probability for all evaluation nodes, after each evaluation. If any of the nodes fulfills the Wolfe conditions with , greater than some threshold , it is accepted and returned. If several nodes simultaneously fulfill this requirement, the of the lowest is returned. Section 3.4 below motivates fixing .

3.3.1 Approximation for strong conditions:

As noted in Section 2.1.1, deterministic optimizers tend to use the strong Wolfe conditions, which use and . A precise extension of these conditions to the probabilistic setting is numerically taxing, because the distribution over is a non-central -distribution, requiring customized computations. However, a straightforward variation to (14) captures the spirit of the strong Wolfe conditions, that large positive derivatives should not be accepted: Assuming (i.e. that the search direction is a descent direction), the strong second Wolfe condition can be written exactly as

(15)

The value is bounded to confidence by

(16)

Hence, an approximation to the strong Wolfe conditions can be reached by replacing the infinite upper integration limit on in Eq. (14) with . The effect of this adaptation, which adds no overhead to the computation, is shown in Figure 2 as a dashed line.

3.4 Eliminating Hyper-parameters

As a black-box inner loop, the line search should not require any tuning by the user. The preceding section introduced six so-far undefined parameters: . We will now show that , can be fixed by hard design decisions. can be eliminated by standardizing the optimization objective within the line search; and the noise levels can be estimated at runtime with low overhead for batch objectives of the form in Eq. (1). The result is a parameter-free algorithm that effectively removes the one most problematic parameter from sgd—the learning rate.

Design Parameters

Our algorithm inherits the Wolfe thresholds and from its deterministic ancestors. We set and . This is a standard setting that yields a ‘lenient’ line search, i.e. one that accepts most descent points. The rationale is that the stochastic aspect of sgd is not always problematic, but can also be helpful through a kind of ‘annealing’ effect.

The acceptance threshold is a new design parameter arising only in the probabilistic setting. We fix it to . To motivate this value, first note that in the noise-free limit, all values are equivalent, because then switches discretely between 0 and 1 upon observation of the function. A back-of-the-envelope computation (left out for space), assuming only two evaluations at and and the same fixed noise level on and (which then cancels out), shows that function values barely fulfilling the conditions, i.e. , can have while function values at for with ‘unlucky’ evaluations (both function and gradient values one standard-deviation from true value) can achieve . The choice balances the two competing desiderata for precision and recall. Empirically (Fig. 3), we rarely observed values of close to this threshold. Even at high evaluation noise, a function evaluation typically either clearly rules out the Wolfe conditions, or lifts well above the threshold.

Scale

The parameter of Eq. (4) simply scales the prior variance. It can be eliminated by scaling the optimization objective: We set and scale within the code of the line search. This gives and , and typically ensures the objective ranges in the single digits across , where most line searches take place. The division by causes a non-Gaussian disturbance, but this does not seem to have notable empirical effect.

Noise Scales

The likelihood (3) requires standard deviations for the noise on both function values () and gradients (). One could attempt to learn these across several line searches. However, in exchangeable models, as captured by Eq. (1), the variance of the loss and its gradient can be estimated directly within the batch, at low computational overhead—an approach already advocated by Schaul et al. [14]. We collect the empirical statistics

(17)

(where denotes the element-wise square) and estimate, at the beginning of a line search from ,

(18)

This amounts to the cautious assumption that noise on the gradient is independent. We finally scale the two empirical estimates as described in §3.4: , and ditto for . The overhead of this estimation is small if the computation of itself is more expensive than the summation over (in the neural network examples of §4, with their comparably simple , the additional steps added only cost overhead to the evaluation of the loss). Of course, this approach requires a batch size . For single-sample batches, a running averaging could be used instead (single-sample batches are not necessarily a good choice. In our experiments, for example, vanilla sgd with batch size 10 converged faster in wall-clock time than unit-batch sgd). Estimating noise separately for each input dimension captures the often inhomogeneous structure among gradient elements, and its effect on the noise along the projected direction. For example, in deep models, gradient noise is typically higher on weights between the input and first hidden layer, hence line searches along the corresponding directions are noisier than those along directions affecting higher-level weights.

3.4.1 Propagating Step Sizes Between Line Searches

As will be demonstrated in §4, the line search can find good step sizes even if the length of the direction (which is proportional to the learning rate in sgd) is mis-scaled. Since such scale issues typically persist over time, it would be wasteful to have the algorithm re-fit a good scale in each line search. Instead, we propagate step lengths from one iteration of the search to another: We set the initial search direction to with some initial learning rate . Then, after each line search ending at , the next search direction is set to . Thus, the next line search starts its extrapolation at times the step size of its predecessor.

Remark on convergence of sgd with line searches:

We note in passing that it is straightforward to ensure that sgd instances using the line search inherit the convergence guarantees of sgd: Putting even an extremely loose bound on the step sizes taken by the -th line search, such that and , ensures the line search-controlled sgd converges in probability [1].

4 Experiments

Our experiments were performed on the well-worn problems of training a 2-layer neural net with logistic nonlinearity on the MNIST and CIFAR-10 datasets.666http://yann.lecun.com/exdb/mnist/ and http://www.cs.toronto.edu/~kriz/cifar.html. Like other authors, we only used the “batch 1” sub-set of CIFAR-10. In both cases, the network had 800 hidden units, giving optimization problems with and parameters, respectively. While this may be ‘low-dimensional’ by contemporary standards, it exhibits the stereotypical challenges of stochastic optimization for machine learning. Since the line search deals with only univariate subproblems, the extrinsic dimensionality of the optimization task is not particularly relevant for an empirical evaluation. Leaving aside the cost of the function evaluations themselves, computation cost associated with the line search is independent of the extrinsic dimensionality.

Figure 4: Top row: test error after epochs as function of initial learning rate (note logarithmic ordinate for MNIST). Bottom row: Test error as function of training epoch (same color and symbol scheme as in top row). No matter the initial learning rate, the line search-controlled sgd perform close to the (in practice unknown) optimal sgd instance, effectively removing the need for exploratory experiments and learning-rate tuning. All plots show means and 2 std.-deviations over 20 repetitions.

The central nuisance of sgd is having to choose the learning rate , and potentially also a schedule for its decrease. Theoretically, a decaying learning rate is necessary to guarantee convergence of sgd [1], but empirically, keeping the rate constant, or only decaying it cautiously, often work better (Fig. 4). In a practical setting, a user would perform exploratory experiments (say, for steps), to determine a good learning rate and decay schedule, then run a longer experiment in the best found setting. In our networks, constant learning rates of and for MNIST and CIFAR-10, respectively, achieved the lowest test error after the first steps of sgd. We then trained networks with vanilla sgd with and without -decay (using the schedule ), and sgd using the probabilistic line search, with ranging across five orders of magnitude, on batches of size .

Fig. 4, top, shows test errors after 10 epochs as a function of the initial learning rate (error bars based on 20 random re-starts). Across the broad range of values, the line search quickly identified good step sizes , stabilized the training, and progressed efficiently, reaching test errors similar to those reported in the literature for tuned versions of this kind of architecture on these datasets. While in both datasets, the best sgd instance without rate-decay just barely outperformed the line searches, the optimal value was not the one that performed best after steps. So this kind of exploratory experiment (which comes with its own cost of human designer time) would have led to worse performance than simply starting a single instance of sgd with the linesearch and , letting the algorithm do the rest.

Average time overhead (i.e. excluding evaluation-time for the objective) was about 48ms per line search. This is independent of the problem dimensionality, and expected to drop significantly with optimized code. Analysing one of the MNIST instances more closely, we found that the average length of a line search was function evaluations, of line searches terminated after the first evaluation. This suggests good scale adaptation and thus efficient search (note that an ‘optimally tuned’ algorithm would always lead to accepts).

The supplements provide additional plots, of raw objective values, chosen step-sizes, encountered gradient norms and gradient noises during the optimization, as well as test-vs-train error plots, for each of the two datasets, respectively. These provide a richer picture of the step-size control performed by the line search. In particular, they show that the line search chooses step sizes that follow a nontrivial dynamic over time. This is in line with the empirical truism that sgd requires tuning of the step size during its progress, a nuisance taken care of by the line search. Using this structured information for more elaborate analytical purposes, in particular for convergence estimation, is an enticing prospect, but beyond the scope of this paper.

5 Conclusion

The line search paradigm widely accepted in deterministic optimization can be extended to noisy settings. Our design combines existing principles from the noise-free case with ideas from Bayesian optimization, adapted for efficiency. We arrived at a lightweight “black-box” algorithm that exposes no parameters to the user. Our method is complementary to, and can in principle be combined with, virtually all existing methods for stochastic optimization that adapt a step direction of fixed length. Empirical evaluations suggest the line search effectively frees users from worries about the choice of a learning rate: Any reasonable initial choice will be quickly adapted and lead to close to optimal performance. Our matlab implementation can be found at http://tinyurl.com/probLineSearch.

References

  • [1] H. Robbins and S. Monro. A stochastic approximation method. The Annals of Mathematical Statistics, 22(3):400–407, Sep. 1951.
  • [2] T. Zhang. Solving large scale linear prediction problems using stochastic gradient descent algorithms. In Twenty-first International Conference on Machine Learning (ICML 2004), 2004.
  • [3] L. Bottou. Large-scale machine learning with stochastic gradient descent. In Proceedings of the 19th Int. Conf. on Computational Statistic (COMPSTAT), pages 177–186. Springer, 2010.
  • [4] M.D. Hoffman, D.M. Blei, C. Wang, and J. Paisley. Stochastic variational inference. Journal of Machine Learning Research, 14(1):1303–1347, 2013.
  • [5] J. Hensman, M. Rattray, and N.D. Lawrence. Fast variational inference in the conjugate exponential family. In Advances in Neural Information Processing Systems (NIPS 25), pages 2888–2896, 2012.
  • [6] T. Broderick, N. Boyd, A. Wibisono, A.C. Wilson, and M.I. Jordan. Streaming variational Bayes. In Advances in Neural Information Processing Systems (NIPS 26), pages 1727–1735, 2013.
  • [7] A.P. George and W.B. Powell. Adaptive stepsizes for recursive estimation with applications in approximate dynamic programming. Machine Learning, 65(1):167–198, 2006.
  • [8] J. Duchi, E. Hazan, and Y. Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12:2121–2159, 2011.
  • [9] N.N. Schraudolph. Local gain adaptation in stochastic gradient descent. In Ninth International Conference on Artificial Neural Networks (ICANN) 99, volume 2, pages 569–574, 1999.
  • [10] S.-I. Amari, H. Park, and K. Fukumizu. Adaptive method of realizing natural gradient learning for multilayer perceptrons. Neural Computation, 12(6):1399–1409, 2000.
  • [11] N.L. Roux and A.W. Fitzgibbon. A fast natural Newton method. In 27th International Conference on Machine Learning (ICML), pages 623–630, 2010.
  • [12] R. Rajesh, W. Chong, D. Blei, and E. Xing. An adaptive learning rate for stochastic variational inference. In 30th International Conference on Machine Learning (ICML), pages 298–306, 2013.
  • [13] P. Hennig. Fast Probabilistic Optimization from Noisy Gradients. In 30th International Conference on Machine Learning (ICML), 2013.
  • [14] T. Schaul, S. Zhang, and Y. LeCun. No more pesky learning rates. In 30th International Conference on Machine Learning (ICML-13), pages 343–351, 2013.
  • [15] R. Fletcher and C.M. Reeves. Function minimization by conjugate gradients. The Computer Journal, 7(2):149–154, 1964.
  • [16] C.G. Broyden. A new double-rank minimization algorithm. Notices of the AMS, 16:670, 1969.
  • [17] R. Fletcher. A new approach to variable metric algorithms. The Computer Journal, 13(3):317, 1970.
  • [18] D. Goldfarb. A family of variable metric updates derived by variational means. Math. Comp., 24(109):23–26, 1970.
  • [19] D.F. Shanno. Conditioning of quasi-Newton methods for function minimization. Math. Comp., 24(111):647–656, 1970.
  • [20] J. Nocedal and S.J. Wright. Numerical Optimization. Springer Verlag, 1999.
  • [21] P. Wolfe. Convergence conditions for ascent methods. SIAM Review, pages 226–235, 1969.
  • [22] L. Armijo. Minimization of functions having Lipschitz continuous first partial derivatives. Pacific Journal of Mathematics, 16(1):1–3, 1966.
  • [23] D.R. Jones, M. Schonlau, and W.J. Welch. Efficient global optimization of expensive black-box functions. Journal of Global Optimization, 13(4):455–492, 1998.
  • [24] C.E. Rasmussen and C.K.I. Williams. Gaussian Processes for Machine Learning. MIT, 2006.
  • [25] G. Wahba. Spline models for observational data. Number 59 in CBMS-NSF Regional Conferences series in applied mathematics. SIAM, 1990.
  • [26] S. Särkkä. Bayesian filtering and smoothing. Cambridge University Press, 2013.
  • [27] A. Papoulis. Probability, Random Variables, and Stochastic Processes. McGraw-Hill, New York, 3rd ed. edition, 1991.
  • [28] R.J. Adler. The Geometry of Random Fields. Wiley, 1981.
  • [29] Z. Drezner and G.O. Wesolowsky. On the computation of the bivariate normal integral. Journal of Statistical Computation and Simulation, 35(1-2):101–107, 1990.

Supplements

This supplementary document contains additional results of the experiments described in the main paper, using the probabilistic line search algorithm to control the learning rate in stochastic gradient descent during training of two-layer neural network architectures in the CIFAR-10 and MNIST datasets.

1 Evolution of Function Values

Figure 1 plots the evolution of encountered raw function values against function evaluations. Each function call evaluates the gradient on a batch of size , both for sgd with constant and decaying learning rate, and for the line search-enhanced sgd. To keep the plot readable, the plot lines have been smoothed with a windowed running average, and only plotted at logarithmically spaced points. Among the noteworthy features of these plots is that sgd with large step sizes can be unstable (divergent dashed black lines), while this instability is caught and controlled by the line search. Regardless of initial step size, all line search-controlled instances perform very similarly, and reach close to optimal performance. Over the dynamic development of the optimization process, some specific choices of step size temporarily perform better than the line search-controlled instances, but this advantage slims or vanishes over time, because no fixed step size is optimal over the course of the entire optimization process. As mentioned in the main paper, finding those optimal step sizes would normally involve a tedious, costly search, which the line search effecively removes.

Figure 1: Function values encountered during neural network experiments. Vanilla sgd at different fixed learning rate as dashed lines, sgd at different decaying learning rates as dashed-dotted lines. Solid lines show results using the probabilistic line search initialized at the corresponding -values.

2 Optimal Step Sizes Vary During Training

Figure 2: Same colors as Fig. 4 in the main paper: Accepted step sizes , initial gradients and absolute noise on gradient . The probabilistic line search quickly fixes even wildly varying initial learning rates, within the first few line searches. The accepted step lengths drift over the course of the optimization, in a nontrivial relation to noise levels and gradient norms.

It is a “widely known empirical fact” that sgd instances require a certain amount of run-time “tweaking”, because the optimal step size depends not just on the local structure of the objective, but also on batch-size (and associatd noise level). Figure 2 shows accepted step sizes, initial gradients at each search, and estimated gradient noise levels for the line search instances in the same experimental runs described above (smoothed and thinned as in Fig. 1 above). Starting five orders of magnitude apart, the line searches very quickly converged to similar step sizes; and indeed eventually settle around the empirically optimal value of (MNIST) and (CIFAR-10) (dashed green horizontal line in Fig. 2). But step sizes varied over time: starting out small, they then increased, and began decreasing again after around line searches. This corroborates the empirical truism that learning rates should not immediately start decreasing, and only do so slowly. Interestingly, while there is an association between gradient values, noise and accepted step sizes, there appears to be no simple analytic relationship between the three. Overall, the emerging picture is that there is indeed nontrivial structure in the objective that is picked up by the line search.

3 Line Searches Do Not Affect Overfitting

Figure 3: Test set error rates plotted against training set error rates. Same symbols and colors as in Figure 4 of the main paper. While there is significant over-fitting in CIFAR-10, and virtually no over-fitting in the MNIST case, the line search-controlled instances of sgd perform similarly to the best sgd instances.
Figure 4: Top row: train error after epochs as function of initial learning rate (note logarithmic ordinate for MNIST). Bottom row: Train error as function of training epoch (same color and symbol scheme as in top row). Same symbols and colors as in Figure 4 of the main paper. No matter the initial learning rate, the line search-controlled sgd perform close to the (in practice unknown) optimal sgd instance, effectively removing the need for exploratory experiments and learning-rate tuning. All plots show means and 2 std.-deviations over 20 repetitions.

A final worry one might have is that the control interventions of the line search might curtail an “accidental” benefical property of sgd—for example that the somewhat erratic, stochastic steps caused by stochasticity in the gradients allow sgd to “jump over” local minima of the objective. Such local minima can be a cause of over-fitting, or generally of low empirical performance. The plots in the main paper already confirm that the line search does not cause a stagnation in optimization performance, and can indeed improve this performance drastically. For completeness, Figure 3 also shows the relation between encountered train- and test-set error rates over the course of the optimization and Figure 4 shows the evolution of the train-set error per epoch as well as its dependence on the initial learning rate (same symbols and colors as in Figure 4 of main paper). There is generally little over-fitting in MNIST, and fairly strong over-fitting in CIFAR-10. But the instances controlled by the line search (circles) do not show a noticeably different behaviour, in this regard, to the uncontrolled, diffusive sgd instances. This suggests that, when the line search intervenes to curtail steps of sgd, it does so typically to prevent a truly sub-optimal step, rather than a beneficial “hop” over the walls surrounding a local minimum.

Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
""
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
   
Add comment
Cancel
Loading ...
49414
This is a comment super asjknd jkasnjk adsnkj
Upvote
Downvote
""
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters
Submit
Cancel

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test
Test description