<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Better Parameter-free Stochastic Optimization with ODE Updates for Coin-Betting</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2022</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10310893</idno>
					<idno type="doi"></idno>
					<title level='j'>Proceedings of the  AAAI Conference on Artificial Intelligence</title>
<idno>2374-3468</idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Keyi Chen</author><author>John Langford</author><author>Francesco Orabona</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Parameter-free stochastic gradient descent (PFSGD) algorithms do not require setting learning rates while achieving optimal theoretical performance. In practical applications, however, there remains an empirical gap between tuned stochastic gradient descent (SGD) and PFSGD. In this paper, we close the empirical gap with a new parameter-free algorithm based on continuous-time Coin-Betting on truncated models. The new update is derived through the solution of an Ordinary Differential Equation (ODE) and solved in a closed form. We show empirically that this new parameter-free algorithm outperforms algorithms with the "best default" learning rates and almost matches the performance of finely tuned baselines without anything to tune.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Most machine learning algorithms require solving an optimization problem, min x&#8712;R d F (x). To solve this problem, first-order stochastic optimization algorithms are the de-facto choice for machine learning due to their speed across large datasets and simplicity. These Stochastic (sub)Gradient Descent (SGD) algorithms start from an initial solution x 1 , iteratively update a vector x t moving in the negative direction of a stochastic (sub)gradient g t such that E[g t ] &#8712; &#8706;F (x t ): x t+1 = x t -&#951; t g t , where &#951; t &gt; 0 is the learning rate or step size. Learning rates are the big caveat of SGD.</p><p>How do we set the learning rate? Intuitively, the learning rates must become arbitrarily small to converge to the minimum of the function. This is clear considering minimizing the function F (x) = |x -10| with SGD. In addition, the step size must be large enough that not too many updates are required to move from the initial to the optimal solution.</p><p>We can formalize the above intuitions with the standard convergence rate of SGD with constant step size &#951; after T iterations with stochastic subgradients g t bounded by 1 in L 2 norm <ref type="bibr">(Zinkevich 2003</ref>):</p><p>From the above, we have that the optimal worst-case step size is &#951; = x1-x &#8902; proportional to the square root of the number of iterations and proportional to the distance between the initial point and the optimal one x &#8902; . Unfortunately, we do not know in advance the distance from the initial point to the optimal solution nor we can expect to reliably estimate it-again, consider the function F (x) = |x -10|. This lack of information about x 1x &#8902; 2 is the primary difficulty of choosing the learning rate in the stochastic setting.</p><p>From a practical point of view, this failure of the theory to provide a way to automatically set the learning rates means that most of the time the best way to achieve the best convergence rate is to treat the learning rate as a hyperparameter and exhaustively search for the best one. However, the computational cost of this search can be huge, basically multiplying the entire learning process by the number of different learning rates we have to try.</p><p>However, a new class of parameter-free algorithms has been recently proposed (e.g. <ref type="bibr">McMahan and Orabona 2014;</ref><ref type="bibr">Orabona 2014;</ref><ref type="bibr">Cutkosky and Boahen 2016;</ref><ref type="bibr">Orabona and Pal 2016;</ref><ref type="bibr">Cutkosky and Boahen 2017;</ref><ref type="bibr">Foster, Rakhlin, and Sridharan 2018;</ref><ref type="bibr">Cutkosky and Orabona 2018;</ref><ref type="bibr">Kot&#322;owski 2019;</ref><ref type="bibr">Kempka, Kot&#322;owski, and Warmuth 2019;</ref><ref type="bibr">Cutkosky and Sarlos 2019)</ref>. These algorithms do not have a learning rate parameter at all, while achieving essentially the same theoretical convergence rate you would have obtained tuning the learning rate in (1). The simplest parameter-free algorithm <ref type="bibr">(Orabona and Pal 2016)</ref> has an update rule of</p><p>where L is the Lipschitz constant of F . These algorithms basically promise to trade-off a bit of accuracy for the removal of tuning the learning rate. However, empirically they still have a big gap with tuned optimization algorithms. Contributions. In this paper, we greatly reduce this gap with a new class of parameter-free stochastic optimization algorithms that performs better than SGD, AdaGrad, and Adam with the "best default" parameter, see Figure <ref type="figure">1</ref>. We achieve it by designing a parameter-free algorithm that is more aware of the geometry of the loss functions by avoiding overshooting their minima. In particular, we modify the optimization algorithm based on coin-betting in (2) to make an infinite number of infinitesimally small updates on a truncated linear model for optimization <ref type="bibr">(Asi and Duchi 2019)</ref>. Related Work. Parameter-free learning algorithms are discussed in Section 2. The main inspiration here is the Importance Weight Aware updates (Karampatziakis and Langford 2011) which make infinitely many infinitesimal SGD updates for each sampled loss. We provide two improvements: making the approach work for a parameter-free update rule and generalizing the set of losses. In particular, we consider any convex Lipschitz function instead of an expectation of losses of the form satisfying &#8467; t (x t ) = &#8467;( z t , x t , y t ). Achieving closed-form solutions requires using a truncated linear model <ref type="bibr">(Asi and Duchi 2019)</ref>. The Importance Weight Aware updates <ref type="bibr">(Karampatziakis and Langford 2011)</ref> are also close to the ones in the truncated model from <ref type="bibr">Asi and Duchi (2019)</ref>, perfectly coinciding in some cases. Both these approaches are also similar to Passive-Aggressive online learning algorithms <ref type="bibr">(Crammer et al. 2006), implicit updates (Kivinen and</ref><ref type="bibr">Warmuth 1997;</ref><ref type="bibr">Kulis and Bartlett 2010)</ref>, and the proximal point method <ref type="bibr">(Rockafellar 1976)</ref>.</p><p>There is a long history relating ODE to optimization. The corresponding ODEs of a numerical optimization algorithm are established by taking infinitesimal step sizes so that the trajectory converges to a curve modeled by the ODE. The continuous trajectory provides new insights into numerical optimization such as the continuous-time interpretation of Nesterov's method <ref type="bibr">(Su, Boyd, and Candes 2015)</ref> and the accelerated Mirror Descent inspired by continuous-time analysis <ref type="bibr">(Krichene, Bayen, and Bartlett 2015)</ref>. This paper is the first attempt to combine a parameter-free algorithm with an ODE approach. The technique is general and we believe it points out an interesting new direction for research.</p><p>Organization of the paper. In Section 2, after introducing some definitions, we briefly review the theory behind parameter-free optimization algorithms through the simplified lens of coin-betting algorithms. Then, in Section 3 we introduce our algorithm CODE. Finally, in Section 4 we present empirical results and we conclude with a discussion and future work in Section 5.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Preliminaries</head><p>In this section, we introduce the needed mathematical background and the basic idea of parameter-free coin-betting optimization algorithms and truncated linear models.</p><p>Notation. We denote vectors by bold letters and matrices by capital letters, e.g. x &#8712; R d and A &#8712; R d&#215;m . We denote by subscript t a variable that changes in a discrete way, while using a function of t for a variable that changes over time in a continuous way, e.g., x t and x(t). 1[E] denotes the indicator function of an event E, i.e., 1[E] is equal to 1 if E is true and 0 otherwise.</p><p>Convex Analysis. We denote by</p><p>Betting on a coin. We describe here how to reduce subgradient descent to betting on the outcome of a binary event (i.e. a coin flip). This is not an exhaustive review of the topic-interested readers are referred to, e.g., <ref type="bibr">Orabona and Pal (2016)</ref> and <ref type="bibr">Orabona (2019, Chapter 9)</ref>.</p><p>We consider a gambler making repeated bets on the outcomes of adversarial coin flips. The gambler starts with $1. In each round t, he bets on the outcome of a coin flip c t &#8712; {-1, 1}, where +1 denotes heads and -1 denotes tails. We do not make any assumption on how c t is generated.</p><p>The gambler can bet any amount, although no additional money may be borrowed. We encode the gambler's bet in round t by x t &#8712; R, where sign(x t ) encodes whether the bet is on heads or tails and |x t | encodes the betted amount. When the bet succeeds, the gambler wins x t c t , otherwise, x t c t is lost. We define Wealth t as the gambler's wealth at the end of round t, that is</p><p>(3)</p><p>We enforce x t = &#946; t Wealth t-1 for some betting fraction &#946; t &#8712; [-1, 1] implying that the gambler cannot borrow money. We also slightly generalize the problem by allowing the outcome of the coin flip c t to be a vector in R d with L 2 norm bounded by 1, with the definition of the wealth in (3) generalized through inner products.</p><p>Now, we give a proof sketch of how it is possible to reduce optimization to a coin-betting algorithm. Consider the function F (x) := |x -10| and the optimization problem min x F (x). We set the outcome of the coin flip c t to be equal to the negative subgradient g t of F in x t , that is</p><p>, where x t is the bet. Let's advantage of 10 subgradients with 10 small steps. See Figure <ref type="figure">2</ref> for a graphic representation of this idea. The exact same phenomenon occurs in coin-betting optimization algorithms. In CODE, by using truncated linear models, we get additional gradient information at the corner of the hinge.</p><p>However, in the above example, it is clear that considering 10 updates with weights 1/10 is arbitrary. Indeed, we could push this reasoning to the limit and have 1/&#948; updates over the losses &#948;&#8467; t when &#948; goes to zero. In this case, the algorithm follows a continuous trajectory rather than a discrete one. While this reasoning is compelling, calculating the trajectory along the gradient flow is computationally difficult. For example, with 10 updates of 1/10th size, the algorithm will request 10 gradients.</p><p>A first idea to solve this problem was proposed by Karampatziakis and Langford (2011), considering only objective functions of the form</p><p>, where &#8467; t (x) = &#8467;( z t , x , y t ). In this special case, only the derivative of &#8467; changes under updates, not the direction of the gradient. Taking advantage of this, it is possible to calculate the final x t+1 without computing the entire trajectory with additional information at the truncated linear models' corners. In other words, we do not need additional gradients to derive x t+1 .</p><p>So, the last key component is to use the truncated linear models described in Section 2. In particular, if we use the updates in (5) on the function Ft in (4), the subgradient of Ft always has the same direction and it is zero when we are in the flat part of the function. Hence, using (5) with infinitesimally small weights of the function Ft the update could never go beyond the point where Ft (x) = F -. Moreover, a closed-form solution along the continuous trajectory becomes possible. Now that we have all the pieces, we state the closed-form solution that gives the final update rule.</p><p>Theorem 1. Set Wealth 1 = 1 and let F (x) be a 1-Lipschitz convex function. Define &#952; 1 = 0 &#8712; R d , H 1 = 1, and g t &#8712; &#8706;F (x t ) for t = 1, . . . , T . Then, the limit as &#948; approaches 0 of running (5) over 1/&#948; updates with the surrogate functions &#948; Ft gives the update rule x t+1 = &#968;(t, h t ), where</p><p>the following quantities are defined recursively as</p><p>Wealth t e -g t ,&#952;t ln(1+ h t H t )+ g t 2 (ht+Ht ln H t H t +h t ) , and ht is the zero of the function</p><p>(7) Hence, to find the closed formula of the update, we only need to find the value of h t in each round. This depends on the zero of a one-dimensional function, hence it can be found with any standard algorithm, like bisection or the Newton algorithm. Given the closed-form update, we can now state Algorithm 1: Coin-betting ODE (CODE) Algorithm 1: Initialize:</p><p>Calculate h t = min(1, ht ), where ht is the zero of the function &#966; in (7) 6:</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Update</head><p>Wealth t+1 =</p><p>Wealth t e -g t ,&#952;t ln(1+ Update &#952; t+1 = &#952; t -h t g t 9: end for our CODE algorithm, Algorithm 1. Note that, given the value of h t , the computational complexity of each update is O(d), like in SGD.</p><p>Proof of the update rule. To obtain the closed form solution in Theorem 1, we break each update of the coin-betting optimization algorithm into 1/&#948; "mini-updates" over the truncated surrogate functions &#948; Fi , then we take the limit for &#948; that goes to 0 and derive the final update rule in Theorem 1. This means that we have 1/&#948; mini-updates between x t and x t+1 , that give us the points x t+&#948; , x t+2&#948; , . . . , x t+1-&#948; , x t+1 . The following lemma fully characterizes these mini-updates.</p><p>Lemma 2. Assume that at time t the Wealth of the coinbetting optimization algorithm is Wealth t , the number of non-zero subgradients received is H t , and the sum of the previous weighted subgradients is &#952; t . Receive the subgradient g t , where g t &#8804; 1. Then, breaking the update in (5) in 1/&#948; mini-updates with weights &#948; over the truncated linear model Ft (x t ) is equivalent to the updates</p><p>where for any j = 0, &#948;, 2&#948;, . . . , 1 -&#948;, we define w t := 0, s j := 1[ Ft (x t+j ) = F -], and w t+j+&#948; := w t+j&#948;s j g t , x t+j .</p><p>Proof. We use the fact that Ft is differentiable everywhere but in x t where we choose as subgradient the zero vector. So, overall the subgradient can only assume the value g t and 0. In particular, the subgradient is the null vector iff s j = 0. This proves the updates of w t and &#952; t , while &#952; t and H t are updated accordingly to the update rules in (5).</p><p>We now consider the case when &#948; goes to 0 and prove the Theorem 1.</p><p>Proof of Theorem 1. We now consider the limit of the previous mini-updates in Lemma 2 when &#948; goes to zero. We immediately obtain that</p><p>where &#968; is some function that represents the continuous trajectory of the iterates. In particular, x t = &#968;(t, 0). Later, we will prove that &#968; coincides with the one we defined in (6). Also, defining h t as</p><p>we have</p><p>Hence, using the above results in (5), we obtain the trajectory of x t to x t+1 is described by</p><p>Together with ( <ref type="formula">8</ref>), this implies that w &#8242; t (j) = 0 for j &#8805; h t , while for j &#8804; h t we have</p><p>To simplify the notation, denote by</p><p>Note that Q(j) = -Wealth j P (j). Hence, we can rewrite (9) as w &#8242; t (j) + w t (j)P (j) = Q(j). Solving this first-order, linear, inhomogeneous ODE, we get</p><p>where C is a constant. Next, we need to solve for C. Consider that</p><p>Hence, we have</p><p>+ Ce -g t ,&#952;t ln(Ht+ht)+ g t 2 (ht-Ht ln(Ht+ht)) .</p><p>Since w t (0) = 0, we have C = Wealth t e g t ,&#952;t ln(Ht)+ g t 2 Ht ln(Ht)) .</p><p>Finally, we have</p><p>Using the fact that Wealtht+1 Wealtht = 1 + wt(ht) Wealtht , we have the closed form expression of the wealth. This also provides an expression of the evolution of x t to x t+1 , that coincides with &#968;(t, j) in ( <ref type="formula">6</ref>).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Empirical Evaluation</head><p>Here, we compare CODE with SGD, SGD with truncated models (aProx) <ref type="bibr">(Asi and Duchi 2019)</ref>, SGD with Importance Weight Aware updates (IWA) <ref type="bibr">(Karampatziakis and Langford 2011)</ref>, AdaGrad <ref type="bibr">(Duchi, Hazan, and Singer 2011)</ref>, Adam <ref type="bibr">(Kingma and Ba 2015)</ref>, the coin-betting algorithm in (2) (Coin) <ref type="bibr">(Orabona and Pal 2016)</ref> and the recursive coinbetting algorithm (Recursive) <ref type="bibr">(Cutkosky and Sarlos 2019)</ref>. For SGD, aProx and IWA, we use the optimal worst-case step size for stochastic convex optimization: &#951; k = &#951; 0 / &#8730; k, and tune the initial step size &#951; 0 . In the adaptive learning rate methods, AdaGrad and Adam, we tune the initial step size &#951; 0 . CODE, Coin and Recursive do not have learning rates.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Train/Test on Real Datasets</head><p>We test the ability of CODE to get a good generalization error. Hence, we perform experiments with 21 different machine learning binary classification datasets and 17 regression datasets from the LIBSVM website <ref type="bibr">(Chang and Lin 2011)</ref> and OpenML <ref type="bibr">(Vanschoren et al. 2013)</ref>. We implement extensive experiments on a large number of datasets to verify the significance of our results. We pre-process the samples normalizing them to unit norm vectors. We shuffle the data and use 70% for training, 15% for validation, and hold out 15% for testing. Given the lack of a regularizer, all the algorithms pass on the training set once to avoid overfitting (see, e.g., Section 14.5.1 Shalev-Shwartz and Ben-David 2014). We evaluate algorithms with 0-1 loss for classification tasks and absolute loss for regression tasks, normalizing the scores by the performance of the best constant predictor. In this way, each dataset is weighted equally independently by how hard it is. Otherwise, a single hard dataset would dominate the average loss. All the experiments are repeated 3 times and we take the mean of the 3 repetitions. See Appendix for more details on datasets, experiments, and numerical values.</p><p>Best Fixed Learning Rates. Clearly, the process of tuning hyperparameters is computationally expensive. For example, if we want to try 2 different learning rates, we have to run SGD twice per dataset. Hence, to have a fair comparison in terms of computational cost, here we consider this setting:  we test the common belief that many optimization algorithms have a "default" learning rate that works on every dataset. If this were true, tuning would not be an extra cost. To test this scenario, we tune the learning rate of the baselines to achieve the best average of normalized performance over all datasets directly on the test sets. In other words, we choose the "best default" parameter of each algorithm to minimize the numbers in Table <ref type="table">1</ref>. This is strictly better for the baselines than just choosing some fixed default parameters for each of them.</p><p>First, we compare all the algorithms on linear regression problems with the absolute loss. We summarize the results in Figure <ref type="figure">1</ref>  We also test the performance of all algorithms on classification problems. In Figure <ref type="figure">3</ref> and in Table <ref type="table">1</ref>, we can see that all algorithms except Recursive attained similar performance. CODE is worse than AdaGrad on average &#8764; 0.0113 and is better than Coin and Recursive. We performed two-sample paired t-test between CODE and competitors and failed to reject the null hypothesis that the performance of CODE on average is as good as the AdaGrad at the significant level &#945; = 0.05.</p><p>Tuned Learning Rates. We now turn to the case in which we ignore the computational complexity and we tune all the learning rates for SGD, IWA, aProx, AdaGrad, and Adam. For each repetition and dataset, we use the validation set to select the best learning rate, train using that learning rate, test on the test set and report the average of normalized loss. Results are summarized in Figure <ref type="figure">4</ref> and Table <ref type="table">2</ref>.</p><p>As just said, this is a very expensive procedure and not a fair comparison for parameter-free algorithms in terms of computational cost. Yet, in both regression and classification tasks, the performance of CODE and other algorithms except Recursive are close to each other. Remember the fact that CODE achieves this performance without any tuning. As a parameter-free algorithm, CODE only loses over the best algorithm on average &#8764; 0.0668 on regression problems and &#8764; 0.0326 on classification problems. The difference on average is not significant in statistics at the significance level 0.05. We believe that there are many settings where such loss of accuracy would be negligible compared to what we gain from removing the need to tune the learning rate. It is also instructive to notice how much the performance of the baselines improves when we move from a "default" learning rate to a tuned one. In other words, to achieve the best opti- mal performance with, for example, AdaGrad the parameter tuning cannot be avoided, at least on regression problems.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Sub-Optimality Gap on Synthetic Datasets</head><p>We also generate synthetic data and test the algorithms following the protocol in <ref type="bibr">Asi and Duchi (2019)</ref>, to observe the sensitivity of the algorithms to the setting of the step sizes. Of course, the parameter-free ones do not have any step size to set. For A &#8712; R m&#215;d and y &#8712; R m&#215;1 the objective function we want to minimize is F (x) = 1 m Axy 1 , which corresponds to a regression problem with the absolute loss. In each experiment, we generate x &#8902; &#8764; N (0, I d ) &#8712; R d , and set y = Ax &#8902; + &#963;v for v &#8764; N (0, I d ), where &#963; controls the amount of noise. We generate A with uniformly random orthogonal columns, with m = 1000 and d = 40. Then, we normalize the 2 norm of each sample. We repeat the above data generation process 10 times and show the average results in the plots. We also consider the classification setting, see similar experiments and plots in the Appendix.</p><p>As in <ref type="bibr">Asi and Duchi (2019)</ref>, we study how many iterations are needed to reach a suboptimality gap of 0.05, that is we plot the smallest k such that F (x k ) -F (x &#8902; ) &#8804; 0.05. In Figure <ref type="figure">5</ref>, we show the results. As expected, the perfor- mance of SGD, Adam, and AdaGrad is extremely sensitive to the setting of the step size. We really need to find the right one, otherwise the convergence slows down catastrophically. Instead, IWA and aProx have a much better range of acceptable step sizes for the noise-free case. However, their advantage almost disappears in the noisy case. On the other hand, we can see that the parameter-free algorithms, CODE, perform very well, with CODE achieving essentially optimal performance in both regimes. Moreover, CODE inherits the better performance of aProx in the noise-free case, gaining a big advantage over Coin, but still maintaining a closed-form solution.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Discussion</head><p>We have presented a new parameter-free method called CODE, which is the first work combining the truncated linear approximation and continuous updates for Coin-Betting optimization algorithms. The empirical results show that CODE can outperform algorithms with a "default" learning rate and be very competitive with finely-tuned ones. In future work, we plan to investigate theoretical guarantees for CODE.</p></div></body>
		</text>
</TEI>
