{'fraction_non_alphanumeric': 0.040524144625091, 'fraction_numerical': 0.00869162383357967, 'mean_word_length': 4.314419695193435, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Adaptive Stochastic Optimization

Optimization lies at the heart of machine learning and signal processing. Contemporary approaches based on the stochastic gradient method are non-adaptive in the sense that their implementation employs prescribed parameter values that need to be tuned for each application. This article summarizes recent research and motivates future work on adaptive stochastic optimization methods, which have the potential to offer significant computational savings when training large-scale systems.


Introduction
The successes of stochastic optimization algorithms for solving problems arising machine learning (ML) and signal processing (SP) are now widely recognized. Scores of articles have appeared in recent years as researchers aim to build upon fundamental methodologies such as the stochastic gradient method (SG) [25]. The motivation and scope of much of these efforts have been captured in various books and review articles; see, e.g., [4,12,16,19,27].
Despite these advances and accumulation of knowledge, there remain significant challenges in the use of stochastic optimization algorithms in practice. The dirty secret in the use of these algorithms is the tremendous computational costs required to tune an algorithm for each application. For large-scale, real-world systems, tuning an algorithm to solve a single problem might require weeks or months of effort on a supercomputer before the algorithm performs well. To appreciate the consumption of energy to accomplish this, the authors of [1] list multiple recent articles in which training a model for a single task requires thousands of CPU-days, and remark how each 10 4 CPU-days is comparable to driving from Los Angeles to San Francisco with 50 Toyota Camrys.
One avenue for avoiding expensive tuning efforts is to employ adaptive optimization algorithms. Long the focus in the deterministic optimization community with widespread success in practice, such algorithms become significantly more difficult to design for the stochastic regime in which many modern problems reside, including those arising in large-scale ML and SP.
The purpose of this article is to summarize recent work and motivate continued research on the design and analysis of adaptive stochastic optimization methods. In particular, we present an analytical framework-new for the context of adaptive deterministic optimization-that sets the stage for establishing convergence rate guarantees for adaptive stochastic optimization techniques. With this framework in hand, we remark on important open questions related to how it can be extended further for the design of new methods. We also discuss challenges and opportunities for their use in real-world systems.

Background
Many problems in ML and SP are formulated as optimization problems. For example, given a data vector y ∈ R m from an unknown distribution, one often desires to have a vector of model parameters x ∈ R n such that a composite objective function f : R n → R is minimized, as in Here, the function φ : R d+m → R defines the data fitting term E y [φ(x, y)]. For example, in supervised machine learning, the vector y may represent the input and output from an unknown mapping and one aims to find x to minimize the discrepancy between the output vector and the predicted value captured by φ. Alternatively, the vector y may represent a noisy signal measurement and one may aim to find x that filters out the noise to reveal the true signal. The function ρ : R n → R with weight λ ∈ [0, ∞) is included as a regularizer. This can be used to induce desirable properties of the vector x, such as sparsity, and/or to help avoid over-fitting a particular set of data vectors that are used when (approximately) minimizing f . Supposing that instances of y can be generated-one-by-one or in minibatches, essentially ad infinitum-the problem to minimize f becomes a stochastic problem over x.
Traditional algorithms for minimizing f are often very simple to understand and implement. For example, given a solution estimate x k , the well-known and celebrated stochastic gradient method (SG) [25] computes the next estimate as x k+1 ← x k − α k g k , where g k estimates the gradient of f at x k by taking a random sample y i k and setting g k ← ∇ x φ(x k , y i k )+λ∇ x ρ(x k ) (or by taking a mini-batch of samples and setting g k as the average sampled gradient). This value estimates the gradient since E k [g k ] = ∇f (x k ), where E k [·] conditions on the history of the behavior of the algorithm up to iteration k ∈ N. Under reasonable assumptions about the stochastic gradient estimates and with a prescribed sequence of stepsize parameters {α k }, such an algorithm enjoys good convergence properties, which ensure that {x k } converges in probability to a minimizer, or at least a stationary point, of f .
A practical issue in the use of SG is that the variance of the stochastic gradient estimates, i.e., , can be large, which inhibits the algorithm from attaining convergence rate guarantees on par with those for first-order algorithms in deterministic settings. To address this, variance reduction techniques have been proposed and analyzed, such as those used in the algorithms SVRG, SAGA, and other methods [13,14,17,21,26]. That said, SG and these variants of it are inherently nonadaptive in the sense that each iteration involves a prescribed number of data samples to compute g k in addition to a prescribed sequence of stepsizes {α k }. Determining which parameter values-defining the minibatch sizes, stepsizes, and other factors-work well for a particular problem is a nontrivial task. Tuning these parameters means that problems cannot be solved once; they need to be solved numerous times until reasonable parameter values are determined for future use on new data.

Illustrative Example
To illustrate the use of adaptivity in stochastic optimization, consider a problem of binary classification by logistic regression using the wellknown MNIST dataset. In particular, consider the minimization of a logistic loss plus an 2 -norm squared regularizer (with λ = 10 −4 ) in order to classify images as either of the digit 5 or not.
Employing SG with a mini-batch size of 64 and different fixed stepsizes, one obtains the plot of testing accuracy over 10 epochs given on the left in Figure 1. One finds that for a stepsize of α k = 1 for all k ∈ N, the model achieves testing accuracy around 98%. However, for a stepsize of α k = 0.01 for all k ∈ N, the algorithm stagnates and never achieves accuracy much above 90%.
By comparison, we also ran an adaptive method. This method, like SG, begins with a mini-batch size of 64 and the stepsize parameter indicated in the plot on the right in Figure 1. However, in each iteration, it checks the value of the objective (only over the current mini-batch) at the current iterate x k and trial iterate x k − α k g k . If the mini-batch objective would not reduce sufficiently as a result of the trial step, then the step is not taken, the stepsize parameter is reduced by a factor, and the mini-batch size is increased by a factor. This results in a more conservative stepsize with a more accurate gradient estimate in the subsequent iteration. Otherwise, if the mini-batch objective would reduce sufficiently with the trial step, then the step is taken, the stepsize parameter is increased by a factor, and the mini-batch size is reduced by a factor. Despite the data accesses required by this adaptive algorithm to evaluate mini-batch objective values in each iteration, the attained testing accuracy with all initializations competes with that attained by the best SG run.
This experiment demonstrates the potentially significant savings in computational costs offered by adaptive stochastic optimization methods. While one might be able to achieve good practical performance with a nonadaptive method, it might only come after expensive tuning efforts. By contrast, an adaptive algorithm can perform well without such expensive tuning.

Framework for Analyzing Adaptive Deterministic Methods
Rigorous development of adaptive stochastic optimization methods requires a solid foundation in terms of convergence rate guarantees. The types of adaptive methods that have enjoyed great success in the realm of deterministic optimization are (a) trust region, (b) line search, and (c) regularized Newton methods. Extending these techniques to the stochastic regime is a highly nontrivial task. After all, these methods traditionally require accurate function information at each iterate, which is what they use to adapt their behavior. When an oracle can only return stochastic function estimates, comparing function values to make adaptive algorithmic decisions can be problematic. In particular, when objective values are merely estimated, poor decisions can be made, and the combined effects of these poor decisions can be difficult to estimate and control. As a first step toward showing how these challenges can be overcome, let us establish a general framework for convergence analysis for adaptive deterministic optimization. This will lay a foundation for the framework that we present for adaptive stochastic optimization in §5.
The analytical framework presented here is new for the deterministic optimization literature. A typical convergence analysis for adaptive deterministic optimization partitions the set of iterations into successful and unsuccessful ones. Nonzero progress in reducing the objective function is made on successful iterations, whereas unsuccessful iterations merely result in an update of a model or algorithmic parameter to promote success in the subsequent iteration. As such, a convergence rate guarantee results from a lower bound on the progress made in each successful iteration and a limit on the number of unsuccessful iterations that can occur between successful ones. By contrast, in the framework presented here, the analysis is structured around a measure in which progress is made in all iterations.
In the remainder of this section, we consider all three aforementioned types of adaptive algorithms under the assumption that f is continuously differentiable with ∇f being Lipschitz continuous with constant L ∈ (0, ∞). Each of these methods follows the general algorithmic framework that we state as Algorithm 1. The role of the sequence {α k } ≥ 0 in the algorithm is to control the length of the trial steps {s k (α k )}. In particular, as seen in our discussion of each type of adaptive algorithm, one presumes that for a given model m k the norm of s k (α) is directly proportional to the magnitude of α. Another assumption-and the reason that we refer to it as a deterministic optimization framework-is that the models agree with the objective at least up to first-order derivatives, i.e., m k (x k ) = f (x k ) and ∇m k (x k ) = ∇f (x k ) for all k ∈ N.
Our analysis involves three central ingredients. We define them here in such a way that they are easily generalized when we consider our adaptive stochastic framework later on.
• {Φ k } ≥ 0 is a sequence whose role is to measure progress of the algorithm. The choice of this sequence may vary by type of algorithm and assumptions on f .
• {W k } is a sequence of indicators; specifically, for all k ∈ N, if iteration k is successful, then W k = 1, and W k = −1 otherwise.
• T ε , the stopping time, is the index of the first iterate that satisfies a desired convergence criterion parameterized by ε.
These quantities are not part of the algorithm itself, and therefore do not influence the iterates. They are merely tools of the analysis. At the heart of the analysis is the goal to show that the following condition holds.

Condition 4.1
The following statements hold with respect to {(Φ k , α k , W k )} and T ε .
2. There exists a nondecreasing function h ε : The goal to satisfy Condition 4.1 is motivated by the fact that, if it holds, it is trivial to derive (since Φ k ≥ 0 for all k ∈ N) that For generality, we have written α ε and h ε as parameterized by ε. However, in the context of different algorithms, one or the other of these quantities may be independent of ε. Throughout our analysis, we denote f * := inf x∈R n f (x) > −∞.

Determine model and compute step
Choose a local model m k of f around x k . Compute a step s k (α k ) such that the model reduction m k (x k ) − m k (x k + s k (α k )) ≥ 0 is sufficiently large.

Check for sufficient reduction in f
Check if the reduction f (x k )−f (x k +s k (α k )) is sufficiently large relative to the model re- ) using a condition parameterized by η.

Successful iteration
If sufficient reduction has been attained (along with other potential requirements), then set x k+1 ← x k + s k (α k ) and α k+1 ← min{γα k , α}.

Classical trust region
In a classical trust region (TR) method, the model m k is chosen as at least a first-order accurate Taylor series approximation of f at x k , and the step s k (α k ) is computed as a minimizer of m k in a ball of radius α k centered at x k . In Step 2, the sufficient reduction condition is chosen as (2) Figure 2 shows the need to distinguish between successful and unsuccessful iterations in a TR method. Even though the model is (at least) first-order accurate, a large trust region radius may allow a large enough step such that the reduction predicted by the model does not wellrepresent the reduction in the function itself. We contrast these illustrations later with situations in the stochastic setting, which are complicated by the fact that the model might be inaccurate regardless the size of the step.
For simplicity in our discussions, for iteration k ∈ N to be successful, we impose the additional condition that α k ≤ τ ∇f (x k ) for some suitably large constant τ ∈ (0, ∞). 1 This condition is actually not necessary for the deterministic setting, but is needed in the stochastic setting to ensure that the trial step is not too large compared to the size of the gradient estimate. We impose it now in the deterministic setting for consistency.
For this TR instance of Algorithm 1, consider the first-order ε-stationarity stopping time corresponding to which we define for some ν ∈ (0, 1) (to be determined below). Standard TR analysis involves two key results; see, e.g., [22]. First, while ∇f (x k ) > ε, if α k is sufficiently small, then iteration k is successful, i.e., W k = 1; in particular, α k ≥ α ε := c 1 ε for all k ∈ N for some sufficiently small c 1 ∈ (0, ∞) dependent on L, η, and γ. In addition, if iteration k is successful, then the ratio condition (2) and our imposed condition We aim to show in either case that Φ k − Φ k+1 ≥ Θα 2 k , for some Θ > 0. This can be done by choosing ν sufficiently close to 1 such that In this manner, it follows from the observations above that Condition 4.1 holds with h ε (α k ) := α 2 k and Θ := (1 − ν)(1 − γ −2 ). Thus, by (1), the number of iterations required until a first-order ε-stationary point is reached satisfies This shows that T ε = O(ε −2 ). 1 Throughout the paper, consider all norms to be 2 .
x k x k +s k x k x k +s k Figure 2: Illustration of successful (left) and unsuccessful (right) steps in a trust region method.

Classical line search
In a classical line search (LS) method, the model is again chosen as at least a first-order accurate Taylor series approximation of f at x k , with care taken to ensure it is convex so a minimizer of it exists. The trial step s k (α k ) is defined as α k d k for some direction of sufficient descent d k . In Step 2, the sufficient reduction condition often includes the Armijo condition As is common, suppose m k is chosen and d k is computed such that, for a successful iteration, one finds for some c 3 ∈ (0, ∞), dependent on L and the angle between d k and −∇f (x k ), that Using common techniques, this can be ensured with α k ≥ α for all k ∈ N for some α ∈ (0, ∞) dependent on L, η, and γ. Similarly as in §4.1, let us also impose that d k ≤ β ∇f (x k ) for some suitably large β ∈ (0, ∞).
For this LS instance of Algorithm 1, for the stopping time T ε defined in (3), consider By Lipschitz continuity of ∇f , it follows that Squaring both sides and applying α k ≤ᾱ yields On unsuccessful iterations, one simply finds By selecting ν sufficiently close to 1 such that (1), the number of iterations required until a first-order ε-stationary point is reached satisfies which again shows that T ε = O(ε −2 ).

Regularized Newton
Regularized Newton methods have been popular in recent years due to their ability to offer optimal worst-case complexity guarantees for nonconvex smooth optimization over the class of practical second-order methods. For example, in cubicly regularized Newton, the model is chosen

and in
Step 2 the imposed sufficient reduction condition has the same form as that in a trust region method, namely, the ratio condition (2).
As for the aforementioned line search method, one can show that if the Hessian of f is Lipschitz continuous on a set containing the iterates, an iteration of cubicly regularized Newton will be successful if the stepsize parameter is sufficiently small; consequently, α k ≥ α for all k ∈ N for some α ∈ (0, ∞) dependent on L, the Lipschitz constant for ∇ 2 f , η, and γ. However, to prove the optimal complexity guarantee in this setting, one must account for the progress in a successful iteration as being dependent on the magnitude of the gradient at the next iterate, not the current one. (As we shall see, this leads to complications for the analysis in the stochastic regime.) For this reason, and ignoring the trivial case when ∇f (x 0 ) ≤ ε, let us define Choosing ν sufficiently close to 1 such that (1), the number of iterations required until a first-order ε-stationary point will be reached (in the next iteration) has One can obtain the same result with a secondorder TR method; see [11]. It should be said, however, that this method requires a more complicated mechanism for adjusting the stepsize parameter than that stated in Algorithm 1.

Additional examples
Our analysis so far has focused on the setting of having a stopping time based on a first-order stationarity criterion and no assumptions on f besides first-and/or second-order Lipschitz continuous differentiability. However, the framework can be extended for other situations as well.
For example, if one is interested in approximate second-order stationarity, then one can let with λ min (·) denoting the minimum eigenvalue of its symmetric matrix argument. One can show that if the model m k is chosen as a (regularized) second-order Taylor series approximation of f at x k , then for all of the aforementioned methods one obtains that T ε = O(ε −3 ). For TR, for example, one can derive this using On the other hand, if one is interested in analyzing specially the case of f being convex, or even strongly convex, then one might consider In this case, improved complexity bounds can be obtained through other careful choices of {Φ k }.
For example, when f is convex and the LS method from §4.2 is employed, one can let Under the assumption that level sets of f are bounded, one can show that (f (x k+1 ) − f * ) −1 − (f (x k ) − f * ) −1 is uniformly bounded below by a positive constant over all successful iterations, while for all k ∈ N one has α k ≥ α. Hence, for a suitable constant ν, one can determine h ε (α k ) and Θ to satisfy Condition 4.1. In this case, the function h ε does not depend on ε, but Similarly, when f is strongly convex and the LS method from §4.2 is employed, consider is uniformly bounded below by a positive constant over all successful iterations, and similar to the convex case one can determine ν, h ε , and Θ independent of ε in order to show that Φ 0 = O(log(ε −1 )) implies T ε = O(log(ε −1 )).

Framework for Analyzing Adaptive Stochastic Methods
We now present a generalization of the framework introduced in the previous section that allows for the analysis of adaptive stochastic optimization methods. This framework is based on the techniques proposed in [8], which served to analyze the behavior of algorithms when derivative estimates are stochastic, but function values could be computed exactly. It is also based on the subsequent work in [2], which allows for function values to be stochastic as well. For our purposes of providing intuition, we discuss a simplification of the framework, avoiding some technical details. See [8,2] for complete details. As in the deterministic setting, let us define a generic algorithmic framework, which we state as Algorithm 2, that encapsulates multiple types of adaptive algorithms. This algorithm has the same structure as Algorithm 1, except it makes use of a stochastic model of f to compute the trial step, and makes use of stochastic objective value estimates when determining whether sufficient reduction has been achieved.
Corresponding to Algorithm 2, let {(Φ k , W k )} be a stochastic process such that {Φ k } ≥ 0 for all k ∈ N. The sequences {Φ k } and {W k } play similar roles as for our analysis of Algorithm 1, but it should be noted that now each W k is a random indicator influenced by the iterate sequence {x k } and stepsize parameter sequence {α k }, which are themselves stochastic processes.
Let F k denote the σ-algebra generated by all stochastic processes within Algorithm 1 at the beginning of iteration k. Roughly, F k it is generated by {(Φ j , α j , x j )} k j=0 . Note that this includes {(Φ j , α j , x j )} k−1 j=0 , but does not include W k as this random variable depends on what happens during iteration k. We then let T ε denote a family of stopping times for {(Φ k , W k )} with respect to {F k } parameterized by ε ∈ (0, ∞).
The goal of our analytical framework is to derive an upper bound for the expected stopping time E[T ε ] under various assumptions on the behavior of {(Φ k , W k )} and on the objective f . At the heart of the analysis is the goal to show that the following condition holds, which can be seen as a generalization of Condition 4.1.

Condition 5.1
The following statements hold with respect to {(Φ k , α k , W k )} and T ε .

Determine model and compute step
Choose a stochastic model m k of f around x k , which satisfies some sufficient accuracy requirement with probability at least 1 − δ 1 . Compute a step s k (α k ) such that the model reduction m k (x k ) − m k (x k + s k (α k )) ≥ 0 is sufficiently large.

Check for sufficient reduction
Compute estimatesf 0 k andf s k of f (x k ) and f (x k + s k (α k )), respectively, which satisfy some sufficient accuracy requirement with probability at least 1 − δ 2 . Check iff 0 k −f s k is sufficiently large relative to the model reduction m k (x k ) − m k (x k + s k (α k )) using a condition parameterized by η.

Successful iteration
If sufficient reduction has been attained (along with other potential requirements), then set x k+1 ← x k + s k (α k ) and α k+1 ← min{γα k , α}.
has W k = 1 with probability 1 − δ > 1 2 , conditioned on F k . (This means that, if it becomes sufficiently small, one is more likely to see an increase in the stepsize parameter than a decrease in it.)

There exists a nondecreasing function h ε :
[0, ∞) → (0, ∞) and scalar Θ ∈ (0, ∞) such that, for all k < T ε , the conditional expectation of Φ k − Φ k+1 with respect to F k is at least Θh ε (α k ); specifically, Whereas Condition 4.1 requires that the stepsize parameter α k remains above a lower bound and the reduction Φ k − Φ k+1 is nonnegative with certainty, Condition 5.1 allows more flexibility. In particular, it says that until the stopping time is reached, one tends to find Φ k −Φ k+1 sufficiently large, namely, at least Θh ε (α k ) for each k < T ε . In addition, the stepsize parameter is allowed to fall below the threshold α ε ; in fact, it can become arbitrarily small. That said, if α k ≤ α ε , then one tends to find α k+1 > α k .
With this added flexibility, one can still prove complexity guarantees. Intuitively, the reduction Φ k − Φ k+1 is at least the deterministic amount Θh ε (α ε ) often enough that one is able to bound the total number of such occurrences (since {Φ k } ≥ 0). The following theorem (see Theorem 2.2 in [2]) bounds the expected stopping time in terms of a deterministic value.

Theorem 5.2 If Condition 5.1 holds, then
In §5.2-5.3, we summarize how this framework has been applied to analyze the behavior of stochastic TR and LS methods. In each case, the keys to applying the framework are determining how to design the process {Φ k } as well as specify details of Algorithm 2 to ensure that Condition 5.1 holds. For these aspects, we first need to describe different adaptive accuracy requirements for stochastic function and derivative estimates that might be imposed in Steps 1 and 2, as well the techniques that have been developed to ensure these requirements.

Error Bounds for Stochastic Function and Derivative Estimates
In this section, we describe various types of conditions that one may require in an adaptive stochastic optimization algorithm when computing objective function, gradient, and Hessian estimates. These conditions have been used in some previously proposed adaptive stochastic optimization algorithms [2,5,8,23]. Let us remark in passing that one does not necessarily need to employ sophisticated error bound conditions in stochastic optimization to achieve improved convergence rates. For example, in the case of minimizing strongly convex f , the linear rate of convergence of gradient descent can be emulated by an SG-like method if the mini-batch size grows exponentially [15,24]. However, attaining similar improvements in the (not strongly) convex and nonconvex settings has proved elusive. Moreover, while the stochastic estimates improve with the progress of such an algorithm, this improvement is based on prescribed parameters, and hence the algorithm is not adaptive in our desirable sense. Hence, one still needs to tune such algorithms for each application.
Returning to our setting, in the types of error bounds presented below, for a given f : R n → R and x ∈ R n , letf (x), g(x), and H(x) denote stochastic approximations of f (x), ∇f (x), and ∇ 2 f (x), respectively.
• Taylor-like Conditions. Corresponding to a norm · , let B(x k , ∆ k ) denote a ball of radius ∆ k centered at x k . If the function, gradient, and Hessian estimates satisfy gives an approximation of f within B(x k , ∆ k ) that is comparable to that given by an accurate first-order Taylor series approximation (with error dependent on ∆ k ). Similarly, if (5) holds with the right-hand side values replaced by κ f ∆ 3 k , κ g ∆ 2 k , and κ H ∆ k , respectively, then m k gives an approximation of f that is comparable to that given by an accurate second-order Taylor series approximation. In a stochastic setting when unbiased estimates of f (x k ), ∇f (x k ), and ∇ 2 f (x k ) can be computed, such conditions can be ensured, with some sufficiently high probability 1 − δ, by sample average approximations using a sufficiently large number of samples. For example, to satisfy (5b) with probability 1 − δ, the sample size for computing g(x k ) can be Ω , where V g is the variance of the stochastic gradient estimators corresponding to a mini-batch size of 1. Here, Ω-notation hides dependence on δ, which is weak if g(x k ) − ∇f (x k ) is bounded.
• Gradient Norm Condition. If, for some θ ∈ [0, 1), one has that then we say that g(x k ) satisfies the gradient norm condition at x k . Unfortunately, verifying the gradient norm condition at x k requires knowledge of ∇f (x k ) , which makes it an impractical condition. In [5], a heuristic is proposed that attempts to approximate the sample size for which the gradient norm condition holds. More recently, in [3], the authors improve upon the gradient norm condition by introducing an angle condition, which in principle allows smaller sample set sizes to be employed. However, again, the angle condition requires a bound in terms of ∇f (x k ) , for which a heuristic estimate needs to be employed.
Instead of employing the unknown quantity ∇f (x k ) on the right hand side of the norm and angle conditions, one can substitute ε ∈ (0, ∞), the desired stationarity tolerance. In this manner, while ∇f (x k ) > ε and g k − ∇f (x k ) ≤ θε, the norm condition is satisfied. This general idea has been exploited recently in several articles (e.g., [28,30]), where gradient and Hessian estimates are computed based on large-enough numbers of samples, then assumed to be accurate in every iteration (with high probability) until an -stationary solution is reached. While strong iteration complexity guarantees can be proved for such algorithms, these approaches are too conservative to be competitive with truly stochastic algorithms.
• Stochastic Gradient Norm Conditions. Consider again the conditions in (5), although now consider the specific setting of defining ∆ k := α k g(x k ) for all k ∈ N. This condition, which involves a bound comparable to (6) when g(x k ) = ∇f (x k ), is particularly useful in the context of LS methods. It is possible to impose it in probability since, unlike (6), it does not require knowledge of ∇f (x k ) . In this case, to satisfy (5) for ∆ k := α k g(x k ) with probability 1 − δ, the sample size for computing g(x k ) need only be Ω is not known when the sample size for computing it is chosen, one can use a simple loop that guesses the value of g(x k ) , then iteratively increases the number of samples as needed; see [8,23].
Note that all of the above conditions can be adaptive in terms of the progress of an algorithm, assuming that {∆ k } and/or { g(x k ) } vanish as k → ∞. However, this behavior does not have to be monotonic, which is a benefit of adaptive stepsizes and accuracy requirements.

Stochastic trust region
The idea of designing stochastic TR methods has been attractive for years, even before the recent explosion of efforts on algorithms for stochastic optimization; see, e.g., [9]. This is due to the impressive practical performance that TR methods offer, especially when (approximate) secondorder information is available. Since TR methods typically compute trial steps by minimizing a quadratic model of the objective in a neighborhood around the current iterate, they are inherently equipped to avoid certain spurious stationary points that are not local minimizers. In addition, by normalizing the step length by a trust region radius, the behavior of the algorithm is kept relatively stable. Indeed, this feature allows TR methods to offer stability even in the nonadaptive stochastic regime; see [13].
However, it has not been until the last couple years that researchers have been able to design stochastic TR methods that can offer strong expected complexity bounds, which are essential for ensuring that the practical performance of such methods can be competitive over broad classes of problems. The recently proposed algorithm known as STORM, introduced in [10], achieves such complexity guarantees by requiring the Taylor-like conditions (5) to hold with probability at least 1−δ, conditioned on F k . 2 In particular, in Step 1 of Algorithm 2 a model m k (x) : is computed with components satisfying (5) with probability 1−δ 1 (where ∆ k := α k for all k ∈ N), then the step s k (α k ) is computed by minimizing m k (approximately) within a ball of radius α k . In Step 2, the estimatesf 0 k andf s k are computed to satisfy (5a) with probability 1 − δ 2 . The imposed sufficient reduction condition is An iteration is successful if the above holds and g k ≥ τ α k for some user-defined τ ∈ (0, ∞). For brevity, we omit some details of the algorithm. For example, the constant κ f in (5) cannot be too large, whereas κ g and κ H can be arbitrarily large. Naturally, the magnitudes of these constants affects the constants in the convergence rate; see [2] for further details.
Based on the stochastic process generated by Algorithm 2, let us define, as in the deterministic x k x k +s k x k x k +s k x k x k +s k x k x k +s k setting, T ε and {Φ k } by (3) and (4), respectively. It is shown in [2] that for sufficiently small constants δ 1 , δ 2 , and Θ (independent of ε), Condition 5.1 holds with α ε := ζε and h(α k ) := α 2 k for some positive constants ζ and Θ that depend on the algorithm parameters and properties of f , but not on ε. The probability 1 − δ that arises in Condition 5.1 is at least (1 − δ 1 )(1 − δ 2 ). Thus, by Theorem 5.2, the expected complexity of reaching a first-order ε-stationary point is at most O(ε −2 ), which matches the complexity of the deterministic version of the algorithm up to the factor dependent on (1 − δ 1 )(1 − δ 2 ).
Let us give some intuition of how Condition 5.1 is ensured. Let us say that the model m k is "good" if its components satisfy (5) and "bad" otherwise. Similarly, the estimates f 0 k and f s k are "good" if they satisfy (5a) and "bad" otherwise. By construction of Steps 1 and 2 of the algorithm, m k is "good" with probability at least 1 − δ 1 and f 0 k and f s k are "good" with probability at least 1 − δ 2 . Figure 3 illustrates the four possible outcomes. When both the model and the estimates are good, the algorithm essentially behaves as its deterministic counterpart; in particular, if α k ≤ α ε and k < T ε , then the k-th iteration is successful and the reduction Φ k − Φ k+1 is sufficiently large. If the model is bad and the estimates are good, or if the model is good and the estimates are bad, then the worst case (depicted in Figure 3) is that the step is deemed unsuccessful, even though α k ≤ α ε . This shows that the stepsize parameter can continue to decrease, even if it is already small. Finally, if both the model and estimates are bad, which happens with probability at most δ 1 δ 2 , then it is possi-ble that the iteration will be deemed successful despite the fact that Φ k+1 > Φ k . (Recall that this cannot occur in the deterministic setting, where {Φ k } decreases monotonically.) The key step in showing that Φ k+1 < Φ k in expectation is to establish that, in each iteration, the possible decrease of this measure is proportional to any possible increase, and thus by ensuring that δ 1 δ 2 is sufficiently small and (1 − δ 1 )(1 − δ 2 ) is sufficiently large, one can ensure a desired reduction in expectation.
The same TR algorithm can be employed with minor modifications to obtain good expected complexity properties with respect to achieving second-order ε-stationarity. In this case, the requirements on the estimates need to be stronger; in particular, (5) has to be imposed with righthand side values κ f α 3 k , κ g α 2 k , and κ H α k , respectively. In this case, Condition 5.1 holds for h(α k ) = α 3 k . Hence, the expected complexity of reaching an second-order ε-stationary point by Algorithm 2 is bounded by O(ε −3 ), which similarly matches the deterministic complexity.

Line Search Methods
A major disadvantage of an algorithm such as SG is that one is very limited in the choice of stepsize sequence that can be employed to adhere to the theoretical guidelines. One would like to be able to employ a type of line search, as has been standard practice throughout the history of research on deterministic optimization algorithms. However, devising line search methods for the stochastic regime turns out to be extremely difficult. This is partially due to the fact that, unlike TR methods, LS algorithms employ steps that are highly influenced by the norm of the gradient ∇f (x k ) , or in the stochastic regime influenced by g(x k ) . Since the norm of the gradient estimate can vary dramatically from one iteration to the next, the algorithm needs to have a carefully controlled stepsize selection mechanism to ensure convergence.
In [3] and [15], two backtracking line search methods were proposed that use different heuristic sample size strategies when computing gradient and function estimates. In both cases, the backtracking is based on the Armijo condition applied to function estimates that are computed on the same batch as the gradient estimates. A different type of LS method that uses a probabilistic Wolfe condition for choosing the stepsize was proposed in [18], although this approach possesses no known theoretical guarantees.
In [29], the authors argue that with overparametrization of deep neural networks (DNNs), the variance of the stochastic gradients tends to zero near stationarity points. Under this assumption, the authors analyzed a stochastic LS method, which has good practical performance in some cases. However, not only is such an assumption unreasonably strong, even for DNNs, but it also does not extend to the fully stochastic setting, since in that setting the assumption would imply zero generalization error at the solutionan ideal situation, but hardly realistic in general.
Here we summarize results in [23], where an LS method with an adaptive sample size selection mechanism is proposed and complexity bounds are provided. This method can be described as a particular case of Algorithm 2. As in the deterministic case, a stochastic model m k is chosen in Step 1 and s(α k ) = −α k d k , where d k makes an obtuse angle with the gradient estimate g(x k ). The sufficient reduction in Step 2 is based on the estimated Armijo conditioñ The algorithm requires that the components of the model m k satisfy (5) with probability at least 1 − δ 1 , and that the estimatesf 0 k andf s k satisfy (5a) with probability at least 1 − δ 2 . Here, it is critical that (5a) not be imposed with the right-hand side being α k g k 2 (even though the deterministic case might suggest this as being appropriate) since this quantity can vary uncontrollably from one iteration to the next. To avoid this issue, the approach defines an additional control sequence {∆ k } used for controlling the accuracy off 0 k andf s k . Intuitively, for all k ∈ N, the value ∆ 2 k is meant to approximate α k ∇f (x k ) 2 , which, as seen in the deterministic case, is the desired reduction in f if iteration k is successful. This control sequence needs to be set carefully. The first value in the sequence is set arbitrarily, with subsequent values set as follows. If iteration k is unsuccessful, then ∆ k+1 ← ∆ k . Otherwise, if iteration k is successful, then one checks whether the step is reliable in the sense that the accuracy parameter is sufficiently small, i.e., If (7) holds, then one sets ∆ k+1 ← √ γ∆ k ; otherwise, one sets ∆ k+1 ← γ −1 ∆ k to promote reliability of the step in the subsequent iteration.
Using {∆ k } defined in this manner, an additional bound is imposed on the variance of the objective value estimates. For all k ∈ N, one requires Note that because of the max in the right hand side of this inequality, and because ∆ k is a known value, it is not necessary to know ∇f (x k ) 2 in order to impose this condition. Also note that this condition is stronger than imposing the Taylor-like condition (5a) with some probability less than 1, because the bound on expectation does not allow |f 0 k − f (x k )| to be arbitrarily large with positive probability, while (5a) allows it, and thus is more tolerant to outliers.
For analyzing this LS instance of Algorithm 2, again let T ε be as in (3). However, now let Using a strategy similar to that for STORM combined with the logic of §4.2 it is shown in [23] that Condition 5.1 holds with The expected complexity of this stochastic LS method has been analyzed for minimizing convex and strongly convex f using modified definitions for Φ k and T ε as described in §4.4; see [23].

Stochastic regularized Newton
As we have seen, stochastic TR and LS algorithms have been developed that fit into the adaptive stochastic framework that we have described, showing that they can achieve expected complexity guarantees on par with their deterministic counterparts. However, neither of these types of algorithms achieves complexity guarantees that are optimal in the deterministic regime.
Cublicly regularized Newton [6,7,20], described and analyzed in §4.3, enjoys optimal convergence rates for second-order methods for minimizing nonconvex functions. We have shown how our adaptive deterministic framework gives a O(ε −3/2 ) complexity bound for this method for achieving first-order ε-stationarity, in particular, to achieve ∇f (x k+1 ) ≤ ε. There has also been some work that proposes stochastic and randomized versions of cubic regularization methods [28,30], but these impose strong conditions on the accuracy of the function, gradient, and Hessian estimates that are equivalent to using ε (i.e., the desired accuracy threshold) in place of ∆ k for all k ∈ N in (5). Thus, these approaches essentially reduce to sample average approximation with very tight accuracy tolerances and are not adaptive enough to be competitive with truly stochastic algorithms in practice. For example, in [28], no adaptive stepsizes or batch sizes are employed, and in [30] only Hessian approximations are assumed to be stochastic. Moreover, the convergence analysis is performed under the assumption that the estimates are sufficiently accurate (for a given ε) in every iteration. Thus, essentially, the analysis is reduced to that in the deterministic setting and applies only as long as no iteration fails to satisfy the accuracy condition. Hence, a critical open question is whether one can extend the framework described here (or another approach) to develop and analyze a stochastic algorithm that achieves optimal deterministic complexity.
The key difficulty in extending the analysis described in §4.3 to the stochastic regime is the definition of the stopping time. For Theorem 5.2 to hold, T ε has to be a stopping time with respect to {F k }. However, with s k (α k ) being random, x k+1 is not measurable in {F k }; hence, T ε , as it is defined in the deterministic setting, is not a valid stopping time in the stochastic regime. A different definition is needed that would be agreeable with the analysis in the stochastic setting.
Another algorithmic framework that enjoys optimal complexity guarantees is the Trust Region Algorithm with Contractions and Expansions (TRACE) [11]. This algorithm borrows much from the traditional TR methodology also followed by STORM, but incorporates a few algorithmic variations that reduces the complexity from O(ε −2 ) to O(ε −3/2 ) for achieving firstorder ε-stationarity. It remains an open question whether one can employ the adaptive stochastic framework to analyze a stochastic variant of TRACE, the main challenge being that TRACE involves a relatively complicated strategy for updating the stepsize parameter. Specifically, deterministic TRACE requires knowledge of the exact Lagrange multiplier of the trust region constraint at a solution of the step computation subproblem. If the model m k is stochastic and the subproblem is solved only approximately, then it remains open how to maintain the optimal (expected) complexity guarantee. In addition, the issue of determining the correct stopping time in the stochastic regime is also open for this method.

Other possible extensions
We have shown that the analytical framework for analyzing adaptive stochastic optimization algorithms presented in §5 has offered a solid foundation upon which stochastic TR and stochastic LS algorithms have been proposed and analyzed. We have also shown the challenges and opportunities for extending the use of this framework for analyzing algorithms whose deterministic counterparts have optimal complexity.
Other interesting questions remain to be answered. For example, great opportunities exist for the design of error bound conditions other than those mentioned in §5.1, especially when it comes to bounds that are tailored for particular problem settings. While improved error bounds might not lead to improvements in iteration complexity, they can have great effects on the work complexity of various algorithms, which translates directly into performance gains in practice.
The proposed analytical framework might also benefit from extensions in terms of the employed algorithmic parameters. For example, rather than using a single constant γ when updating the stepsize parameter, one might consider different values for increases vs. decreases, and when different types of steps are computed. This will allow for improved bounds on the accuracy probability tolerances δ 1 and δ 2 .
Finally, numerous open questions remain in terms of how best to implement adaptive stochastic algorithms in practice. For different algorithm instances, practitioners need to explore how best to adjust mini-batch sizes and stepsizes so that one can truly achieve good performance without wasteful tuning efforts. One hopes that with additional theoretical advances, these practical questions will become easier to answer.
If f is strongly convex, then, as is well known, one has for some c ∈ (0, ∞) that This shows that if iteration k is successful, then (similar to above) which implies that By the definition of f * , it is clear from this inequality that for this successful iteration one must have α k ≤ 1/(ηc 3 c), meaning (1 − ηc 3 cα k ) ∈ [0, 1). Taking logs, this implies that which after rearrangement yields − log(f (x k+1 ) − f * ) ≥ − log(1 − ηc 3 α k ) − log(f (x k ) − f * ).