<?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'>DoG is SGD’s Best Friend: A Parameter-Free Dynamic Step Size Schedule</title></titleStmt>
			<publicationStmt>
				<publisher>Proceedings of machine learning research</publisher>
				<date>07/23/2023</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10490603</idno>
					<idno type="doi"></idno>
					<title level='j'>Proceedings of the 40th International Conference on Machine Learning</title>
<idno>2640-3498</idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Maor Ivgi</author><author>Oliver Hinder</author><author>Yair Carmon</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[We propose a tuning-free dynamic SGD step size formula, which we call Distance over Gradients (DoG). The DoG step sizes depend on simple empirical quantities (distance from the initial point and norms of gradients) and have no “learning rate” parameter. Theoretically, we show that, for stochastic convex optimization, a slight variation of the DoG formula enjoys strong, high-probability parameter-free convergence guarantees and iterate movement bounds. Empirically, we consider a broad range of vision and language transfer learning tasks, and show that DoG’s performance is close to that of SGD with tuned learning rate. We also propose a per-layer variant of DoG that generally outperforms tuned SGD, approaching the performance of tuned Adam. A PyTorch implementation of our algorithms is available at https://github.com/formll/dog.]]></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>While stochastic optimization methods drive continual improvements in machine learning, choosing the optimization parameters-and particularly the learning rate-remains a difficulty. Standard methodologies include searching over a set of learning rates, or simply picking the learning rate from prior work. The former incurs a substantial computational overhead, while the latter risks training a suboptimal model.</p><p>The rich literature on adaptive gradient methods (AdaGrad, Adam, and their many variants) offers optimization algorithms that better exploit problem structure (e.g., <ref type="bibr">Duchi et al., 2011;</ref><ref type="bibr">Kingma &amp; Ba, 2015;</ref><ref type="bibr">Gupta et al., 2018;</ref><ref type="bibr">Shazeer &amp; Stern, 2018;</ref><ref type="bibr">Loshchilov &amp; Hutter, 2019)</ref>. However, these methods still have a learning rate parameter that requires tuning. The theoretically-optimal value of this parameter depends on unknown problem properties. For ex-Figure <ref type="figure">1</ref>. Illustration of DOG for CIFAR-100 classification using logistic regression on last-layer features of a pre-trained ViT-B/32 (left) or end-to-end fine-tuning of the model (right). The top row shows the DOG step size sequence &#8984;t for different values of the initial movement r&#9999;, and the bottom row shows that DOG attains test error on par with carefully tuned SGD (with cosine annealing), even when varying r&#9999; by several orders of magnitude. See details in Appendix E.6. ample, on convex problems the optimal learning rate of AdaGrad is related to the distance between the initial point and the optimal solution, while in non-convex settings it is related to the function's smoothness and initial optimality gap <ref type="bibr">(Gupta et al., 2017;</ref><ref type="bibr">Ward et al., 2019;</ref><ref type="bibr">Faw et al., 2022)</ref>.</p><p>Parameter-free optimization aims to remove the need for such tuning by designing algorithms that achieve a nearoptimal rate of convergence with almost no knowledge of the problem properties <ref type="bibr">(Streeter &amp; McMahan, 2012)</ref>. Most works in this field (e.g., <ref type="bibr">Luo &amp; Schapire, 2015;</ref><ref type="bibr">Orabona &amp; P&#225;l, 2016;</ref><ref type="bibr">Cutkosky &amp; Orabona, 2018;</ref><ref type="bibr">Mhammedi &amp; Koolen, 2020;</ref><ref type="bibr">Bhaskara et al., 2020;</ref><ref type="bibr">Jacobsen &amp; Cutkosky, 2022;</ref><ref type="bibr">Zhang et al., 2022)</ref> use advanced online learning techniques to construct algorithms that, for the fundamental setting of stochastic convex optimization (SCO) with bounded stochastic gradients, achieve optimal rates of convergence up to logarithmic factors. While practical parameter-free algorithms exist (e.g. <ref type="bibr">Orabona, 2014;</ref><ref type="bibr">Orabona &amp; Tommasi, 2017;</ref><ref type="bibr">Kempka et al., 2019;</ref><ref type="bibr">Chen et al., 2022)</ref>, there is little research into practical parameterfree step size selection methods for SGD. Recently, <ref type="bibr">Carmon &amp; Hinder (2022)</ref> have shown that performing a careful bisection over the SGD step size yields a parameterfree optimization method that is optimal for SCO up to a double-logarithmic factor. While theoretically novel, on a practical level the result leaves much to be desired, as it essentially prescribes the standard recipe of running SGD multiple times with different learning rates.</p><p>Proposed algorithm. In this work, we use key insights from <ref type="bibr">Carmon &amp; Hinder (2022)</ref> to go a step further and develop a parameter-free step size schedule. For SGD iterations of the form x t+1 = x t &#8984; t g t , where x t denotes the model parameters at the t'th iteration and g t denotes the stochastic gradient of the loss function, our proposed dynamic steps size is (for all t 1)</p><p>In words, the step size at iteration t is the maximum distance to between the initial point and observed iterates, divided by the sum of squared stochastic gradient norms, i.e., Distance over Gradients <ref type="bibr">(DOG)</ref>. At the first step, we set &#8984; 0 to be r &#9999; /kg 0 k, i.e., we take a normalized gradient step of size r &#9999; ; we show that, as long as r &#9999; is small, its precise setting has only mild effect.</p><p>Crucially, DOG has no multiplicative "learning rate" parameter: if one considers step sizes of the form</p><p>pP i&#63743;t kgik 2 then c = 1 is a universally good setting (see Section 2 for a heuristic justification and Section 4.3 for empirical evidence for this claim).</p><p>Figure <ref type="figure">1</ref> highlights key aspects of DOG. The top row shows the DOG step size sequence for different values of r &#9999; in convex (left) and non-convex (right) stochastic optimization problems. The DOG step size increases rapidly (note the logarithmic x scale) and stabilizes around values close to the optimal SGD step size with little dependence on r &#9999; . The bottom row of the figure compares the test errors of DOG and SGD with various step sizes, showing that (for all choices of r &#9999; ) DOG is on par with well-tuned SGD.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1.">Summary of results</head><p>Theoretical guarantees. In Section 3 we analyze DOG for stochastic convex optimization with bounded stochastic gradients and a (potentially unbounded) closed convex domain. To present our results, let B denote a ball around the initial point x 0 with radius 3d 0 , where d 0 is the distance between x 0 and an optimum.</p><p>First, we show that if the iterates of DOG remain in B, then with high probability DOG achieves a convergence rate that is optimal up to a factor of O(log(1 + d0 r&#9999; )). In practice, DOG appears to indeed be stable as long as r &#9999; is sufficiently small. However, DOG is not always stable: on pathological functions its iterates can move far from the optimum.</p><p>To address this, we consider a theoretical, tamed variant of DOG, which we call T-DOG, whose step sizes are smaller by a logarithmic factor. We prove that, with high probability, the T-DOG iterates never leave B. Thus, we obtain a high probability parameter-free convergence guarantee is optimal up logarithmic factors.</p><p>To our knowledge, T-DOG is the first parameter-free stochastic optimization method to attain such theoretical guarantee,<ref type="foot">foot_2</ref> and only the third high probability parameterfree guarantee in the literature (following <ref type="bibr">Carmon &amp; Hinder, 2022;</ref><ref type="bibr">Zhang &amp; Cutkosky, 2022)</ref>.</p><p>Empirical study. Our experiments in Section 4 focus on fine-tuning neural networks, because this is a practically important setting that still allows for thorough experiments at a reasonable computational budget. We also perform a small-scale experiment with training a neural network from scratch. Our experiments span 23 natural language understanding and image classification tasks and 8 popular model architectures.</p><p>Our results indicate that, compared to DOG, SGD with a cosine step size schedule and tuned base learning rarely attains a relative error improvement of more than 5% (e.g., the difference between accuracy 95% and 95.25%). For convex problems (linear probes), the relative difference in errors is below 1%. In our testbed, well-tuned Adam tends to outperform both SGD and DOG, but a layer-wise version of DOG (which we call L-DOG) closes some of this performance gap.</p><p>We also test the sensitivity of DOG to the value of r &#9999; . We find that for most model/task combinations, DOG performs consistently well across a wide range of r &#9999; values as our theory predicts. However, in certain cases, choosing r &#9999; to be too low results in poor performance. We provide some preliminary findings showing that this is due in part to batch normalization.</p><p>Put together, our theory and experiments suggest DOG has the potential to save significant computation currently spent on learning rate tuning at little or no cost in performanceespecially if we reinvest some of the saved computation in training a larger model on more data.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Algorithm Derivation</head><p>Before providing rigorous theoretical guarantees for DOG, in this section we explain the origin of the algorithm. Our starting point is the following result by <ref type="bibr">Carmon &amp; Hinder (2022)</ref>. Suppose we run T iterations of SGD with fixed step size &#8984;, i.e., the recursion x t+1 = x t &#8984;g t , where x t is the SGD iterate and g t is the stochastic gradient at step t. If, for some c 2 (0, 1), it happens to hold that</p><p>then the averaged iterates satisfies an excess loss bound that is at most a factor 1 c(1 c<ref type="foot">foot_4</ref> ) larger than the worst-case optimal bound achieved by perfectly tuned SGD. 2   The condition (1) is an implicit equation: it allows us to check whether the choice of step size &#8984; is good only after running T steps of SGD using that &#8984;. Solving this implicit equation therefore requires multiple calls to SGD. We derive the DOG step size sequence by making the equation explicit: we choose &#8984; t so that equation (1) holds at each step. For c = 1, this yields the step size formula (DOG). Our reason for choosing c = 1 is that it is the threshold under which a solution to the implicit equation yields an optimal rate of convergence. Therefore, in practice we expect 1 to be close to the highest stable value of c, and thus obtain the best performance; we verify this empirically in Section 4.3.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Theoretical Analysis</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">Preliminaries</head><p>Problem setting. Our goal is to minimize a loss function f : X ! R where X &#10003; R m (including the unconstrained setting X = R m as an important special case). We perform our analysis under the following standard convexity assumption. Assumption 3.1 (Convexity). The function f is convex, its domain X is closed and convex, and its minimum is attained at some x ? 2 X , i.e., f ? := inf x2X f (x) = f (x ? ).</p><p>In Appendix A we discuss a possible relaxation of convexity under which our results continue to hold.</p><p>To minimize f we assume access to a stochastic gradient oracle G. When queried at a point x 2 X the oracle returns a stochastic (sub)gradient estimator</p><p>We make the following assumption, where k&#8226;k denotes the Euclidean norm. Assumption 3.2 (Bounded stochastic gradients). There exists some L &gt; 0 such that kG(x)k &#63743; L almost surely.</p><p>We can relax Assumption 3.2 to a local stochastic gradient norm; see Appendix B.</p><p>Algorithm statement. We study (projected) SGD with dynamic learning rate schedule {&#8984; t }, i.e.,</p><p>where x 0 is a given initialization, g k := G(x k ), and Proj X (&#8226;) is the Euclidean projection onto X . To succinctly state and analyze DOG, we define the following quantities:</p><p>where a _ b := max{a, b} and r &#9999; is a small user-specified initial movement size parameter. With this notation, we define a family of DOG-like learning rate schedules.</p><p>Definition 3.3. A step size schedule is DOG-like if</p><p>for a positive nondecreasing sequence G 0 t that depends only on x 0 , g 0 , . . . , g t and satisfies G 0</p><p>DOG corresponds to simply setting G 0 t = G t ; in Section 3.3 we consider a theoretical (or tamed) DOG-like algorithm for which we guarantee bounded iterates by making G 0 t larger than G t by polylogarithmic factors. Throughout, we bound the error of the weighted average sequence</p><p>Finally, to streamline the analysis we define: </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">Optimality gap bounds assuming bounded iterates</head><p>In this section, we bound the optimality gap attained by any DOG-like algorithm. Our bounds depend on the quantities rT and G T , and are nearly optimal when rT = O(d 0 ) (i.e., the DOG iterates don't move too far away from x 0 ) and G 0 T is not much larger than G T . In the next section we describe a specific DOG-like algorithm that is guaranteed to satisfy both requirements.</p><p>Convexity and Jensen's inequality imply that xt satisfies</p><p>The sum in the RHS decomposes to two components:</p><p>where k := g k rf (x k ). We give probability 1 bounds for the weighted regret (Lemma 3.4) and high probability bounds for the noise term (Lemma 3.5). In each case, the key challenge is replacing a-priori bounds on d 0 (or the domain size) with the empirically observed rT . We present and discuss each lemma in turn.</p><p>Lemma 3.4 (Weighted regret bound). If X is a closed convex set then any DOG-like scheme (Definition 3.3) satisfies</p><p>The proof of Lemma 3.4 appears in Appendix D.1. While it is similar to the analysis of adaptive SGD (where &#8984; t = &#8674; p Gt <ref type="bibr">(Gupta et al., 2017)</ref>), there are a couple of key differences. First, the DOG step sizes can increase, which typically makes adaptive gradient methods difficult to analyze <ref type="bibr">(Reddi et al., 2018)</ref>. We bypass this difficulty by considering regret weighted by rk , which factors out the increasing portion of the step size. Second, the standard adaptive SGD analysis yields a bound proportional to d2 t (typically further bounded using the domain diameter) rather than rt dt as in our bound. This is a crucial difference, since-as we soon argue-r t "cancels" when dividing through by P k&lt;t rk , while dt does not. We obtain the improved result by keeping around the last term in a telescoping sum, a trick similar to <ref type="bibr">Carmon &amp; Hinder (2022, Lemma 1)</ref>.</p><p>Next, we handle the noise term in (4), recalling the notation t := g t rf (x t ) and &#10003; t, := log 60 log(6t) . Lemma 3.5 (Noise bound). Under Assumption 3.2, for all 2 (0, 1), T 2 N and L &gt; 0 we have</p><p>The proof of Lemma 3.5 appears in Appendix D.2 and is based on a new concentration bound, Lemma D.2, which allows us to bound the noise term despite having no deterministic bound on the magnitude of the martingale difference sequence rk h k , x k x ? i. The proof of Lemma D.2 involves combining time-uniform Bernstein bounds <ref type="bibr">(Howard et al., 2021)</ref> and a general bound on the cumulative sums of sequence products (Lemma C.2), which may be of independent interest.</p><p>Combining the above results, we obtain the following.</p><p>Proposition 3.6. For all 2 (0, 1) and L &gt; 0, if Assumption 3.1, Assumption 3.2, and Definition 3.3 hold then with probability at least 1 , for every t &#63743; T the optimality gap</p><p>Proof. Follows from Equations ( <ref type="formula">3</ref>) and (4), Lemma 3.4, Lemma 3.5 and the fact that dt &#63743; d 0 + rt .</p><p>The following algebraic fact shows that there is always an iteration &#8999; &#63743; T where the denominator </p><p>Corollary 3.8 is immediately useful when X is bounded but its exact diameter is unknown, for example when X is a polytope as is common in two-stage stochastic programming <ref type="bibr">(Nemirovski et al., 2009)</ref>.</p><p>Simplifying the bound for typical DOG trajectories.</p><p>Suppose that rT = O(d 0 ) and note that Assumption 3.2 DOG satisfies</p><p>, which is minimax optimal up to a term double-logarithmic in T and logarithmic in 1 r&#9999; <ref type="bibr">(Agarwal et al., 2012)</ref>. Furthermore, in realistic DOG trajectories, even the multiplicative term log rT r&#9999; is likely too pessimistic. This is because rt typically increases rapidly for t 0 &lt; 1000 steps and then plateaus (see Figure <ref type="figure">12</ref> in the appendix  <ref type="bibr">(Nemirovski &amp; Yudin, 1983;</ref><ref type="bibr">Nemirovski, 1994)</ref> for which rt = r &#9999; p t and therefore rt /d 0 diverges as t grows. Next, we show that by slightly decreasing the DOG step sizes we can guarantee that rT /d 0 &#63743; 3 with high probability.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3.">Iterate stability bound</head><p>This section introduces a new DOG-like step size scheme whose iterates are guaranteed to remain bounded with high probability. We call this scheme T-DOG, where the T stands for "theoretical" or "tamed." The step sizes depend on the iteration budget T , the failure probability , and an upper bound L on the stochastic gradient norms (defined in Assumption 3.2), and are given by &#8984; t = rt / p G 0 t , where</p><p>using G 1 := 0. The dependencies on T, and L are weak, since &#10003; t, := log</p><p>&#8984; and the L-dependent term (that barely grows with t) will typically be smaller than the term proportional to G t 1 .</p><p>With the definition of T-DOG in hand, we are ready to state its key property: guaranteed iterate stability. Proposition 3.9. Suppose that Assumptions 3.1 and 3.2 hold and r &#9999; &#63743; 3d 0 . For any 2 (0, 1), and T 2 N, the iterations of T-DOG satisfy P(r T &gt; 3d 0 ) &#63743; .</p><p>We defer the full proof to Appendix D.5 and proceed to highlight the key argument by proving the result in the noiseless case.</p><p>Proof of Proposition 3.9 in the noiseless case. In this case we have g k = rf (x k ) and therefore hg k , x k x ? i f (x k ) f ? 0. Substituting into (5) and rearranging gives</p><p>Assuming by induction that rt &#63743; 3d 0 and telescoping yields</p><p>where (i) uses that kg k k 2 = G k G k 1 (with the shorthand G 1 := 0) and</p><p>, and (iii) uses rt &#63743; 3d 0 again. Therefore, r t+1 &#63743; d t+1 + d 0 &#63743; 3d 0 by the triangle inequality, completing the induction step.</p><p>Finally, we state the main guarantee for T-DOG.</p><p>Theorem 3.10. Suppose that Assumptions 3.1 and 3.2 hold. For any 2 (0, 1 2 ), T 2 N, consider T iterations of T-DOG with r &#9999; &#63743; 3d 0 . Then for &#8999; 2 arg max t&#63743;T P i&lt;&#8999; ri /r t we have, with probability at least</p><p>&#8984; .</p><p>Proof. Follows by Corollary 3.8, Proposition 3.9 and (T-DOG).</p><p>Theorem 3.10 yields the optimal convergence bound <ref type="bibr">(Agarwal et al., 2012)</ref> up to logarithmic factors. Moreover, to the best of our knowledge our method is the first to produce an iterate bound of the form rT = O(d 0 ). In Appendix D.6 we discuss how this iterate bound can lead to better convergence rates in least squares problems.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Experiments</head><p>To test DOG in practical scenarios, we perform extensive experiments over a diverse set of tasks and model architectures in both the vision and language domains. We construct a testbed that consists of over 20 tasks and 7 model architecture, covering natural language understanding and computer vision (Section 4.1). In this testbed we compare DOG to SGD and Adam (Section 4.2), showing that DOG performs on par with tuned SGD, but not as well as tuned Adam. Nevertheless, a per-layer version of DOG (defined below) closes much of this gap with Adam without requiring tuning. We also use our testbed to analyze the sensitivity of DOG to its fixed parameters (Section 4.3), demonstrate its effectiveness in convex logistic regression settings (Section 4.4). Finally, we apply DOG and L-DOG to fine-tuning a CLIP model on ImageNet (Section 4.5) and training a CIFAR10 model from scratch (Section 4.6), and provide preliminary comparison to previously-proposed tuning free methods (Section 4.7). A PyTorch implementation of DOG is available at <ref type="url">https://github.com/formll/dog</ref>.</p><p>Layer-wise DOG. Neural models in general and transformer-based models in particular often benefit from using a per-parameter or per-layer step sizes <ref type="bibr">(Kingma &amp; Ba, 2015;</ref><ref type="bibr">You et al., 2020)</ref>. With this in mind, we consider a per-layer version of DOG, which we call L-DOG, where we apply the (DOG) formula separately for every layer.</p><p>Namely, if we consider x l t to be the weights in layer<ref type="foot">foot_6</ref> l at step t, then we set the learning rate for that layer to be &#8984;</p><p>, where &#9999; = 10 8 is added to the denominator for numerical stability. While we do not provide theoretical guarantees for L-DOG, we show below that it performs well in practice.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1.">Fine-tuning testbed</head><p>Our main experiments focus on fine-tuning pre-trained models, which allows us to experiment with advanced models while also thoroughly tuning the learning rate for the baseline optimizers, using an academic computational budget.</p><p>Common hyperparameters. For each baseline algorithm, we use best-practice learning rate schedule (cosine annealing for all experiments, with a warm-up stage for language experiments) and sweep over the peak learning rate for each model/task pair. We give each pair a fixed step budget designed to suffice for convergence, performing evaluation throughout the training. In all cases, we use polynomial decay averaging<ref type="foot">foot_7</ref> as proposed by <ref type="bibr">Shamir &amp; Zhang (2013)</ref>, and select the best checkpoint (either averaged or not) based on evaluation performance. We repeat relevant learning setups with 5 different seeds, and report the mean performance across the seeds. For simplicity, we do not use weight decay throughout. The complete set of hyper-parameters appears in Appendix E.</p><p>Natural language understanding (NLU). To test DOG's efficacy in modern NLU, we use it to fine-tune transformer language models <ref type="bibr">(Vaswani et al., 2017)</ref> on the well-studied GLUE benchmark <ref type="bibr">(Wang et al., 2019b)</ref> which measures models' performance on diverse text classification tasks (listed in Appendix E.3).</p><p>Additionally, we fine-tune models on SQuAD 1.1, a question answering dataset <ref type="bibr">(Rajpurkar et al., 2016)</ref>. We finetune a RoBERTa-base <ref type="bibr">(Liu et al., 2019)</ref> checkpoint and T5base <ref type="bibr">(Raffel et al., 2020)</ref>. <ref type="foot">5</ref> For each task, we use the official evaluation metrics defined in by <ref type="bibr">Wang et al. (2019b)</ref> and <ref type="bibr">Rajpurkar et al. (2016)</ref> as well as their original proposed splits, and report the results over the evaluation set.</p><p>Computer vision. We also fine-tune 5 models architectures on 12 different computer vision tasks from the VTAB benchmark <ref type="bibr">(Zhai et al., 2019)</ref> (see Appendix E.3); of the other 7 tasks in VTAB, 5 are trivial (accuracy greater than 99%) and 2 have small validation splits leading to unreliable model selection. We follow the training, validation and test splits defined in VTAB, and report performance on the test split (using the validation split for model selection). We fine-tune 5 models: VGG11 (Simonyan &amp; Zisserman, 2014), ResNet50 <ref type="bibr">(He et al., 2016)</ref>, Densenet121 <ref type="bibr">(Huang et al., 2017)</ref>, ViT-B/32 <ref type="bibr">(Dosovitskiy et al., 2021)</ref>, and ConvNeXt-T <ref type="bibr">(Liu et al., 2022)</ref>, where the ViT model is pre-trained on ImageNet 21K and the others are trained on ImageNet 1K <ref type="bibr">(Deng et al., 2009)</ref>.</p><p>Normalized performance metric. Since the performance metrics in our testbed vary substantially across tasks and models, they are challenging to compare in aggregate.</p><p>To address this, we consider the following notion of relative error difference (RED), that provides a normalized measure of a difference between two model's performance.</p><p>In particular, given a task and a model architecture, let err x be the error<ref type="foot">foot_9</ref> of the model when trained with optimizer x (Adam or SGD with a certain learning rate, or L-DOG) and let err DOG be the error when trained with DOG. Then RED(err x , err DOG ) := err DOG err x err DOG .</p><p>A positive RED value indicates that optimizer x is better than DOG, and a negative value indicates the opposite.</p><p>When the absolute value of RED is beneath a few percentage points, the compared methods are nearly equivalent.</p><p>Setting r &#9999; . Our theoretical analysis suggest that the particular choice of r &#9999; does not matter as long as it is sufficiently small relative to the distance between the weight initialization x 0 to the optimum. Consequently, for vision experiments we set r &#9999; = &#8629; &#8226; (1 + kx 0 k) for &#8629; = 10 4 , assuming that the distance to the optimum is more than 0.01% of the initialization norm. For language experiments, this assumption turned out to be wrong (causing DOG to diverge in some cases), and we decreased &#8629; to 10 6 for DOG and to 10 8 for L-DOG, where the additive 10 6 term was too large in some layers. We believe that 10 6 and 10 8 should be good defaults for DOG and L-DOG, respectively, though networks with batch normalization or different initialization schemes could require a larger value; see Section 4.3 for additional discussion.  Adam with different peak learning rates. The figure shows that, when comparing across models, there is no good default learning rate for neither SGD nor Adam. Moreover, even for a single model only very specific SGD learning rate performs well, while most are considerably inferior to using DOG. Even when tuned to the best fixed learningrate value per model (which we refer to as model tuned LR), some tasks may still fail (compared to DOG) as indicated by the large IQR and the gap between the mean (triangles) and the median RED (circles) in models such as ViT-B/32 ad Densenet121. While Adam also requires tuning, it is somewhat less sensitive than SGD to the choice of peak learning rate. For a full breakdown of performance per task, see Figure <ref type="figure">5</ref> and Tables <ref type="table">4</ref> and<ref type="table">5</ref> in Appendix F.1.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.">Comparison of fine-tuning performance</head><p>DOG performs similarly to well-tuned SGD in 79 out of the 80 model/task combinations in our testbed. The one exception is tuning T5-b on CoLA, where DOG behaves erratically while SGD succeeds only with a few learning rates. In contrast, both Adam and L-DOG achieved reasonable performance consistently. DOG's poor performance on CoLA results in high RED measures for this case, which draw the mean RED (triangles) above the median one in Figure <ref type="figure">2</ref> for T5-b. We further analyze this exception in Appendix F.3 and show that choosing significantly smaller r &#9999; for DOG alleviates the problem.</p><p>Figure <ref type="figure">3</ref> (top) compares DOG to SGD with model tuned LR as defined above, as well as instance tuned LR, where for each model/task pair we select the best learning rate, at a computational expense 6-7 times larger than running DOG. The performance of DOG remains close to that of SGD with instance-tuned LR, with the largest median RED observed for ResNet50 and ViT-B/32.</p><p>Figure <ref type="figure">3</ref> (bottom) compares DOG to model-tuned and instance-tuned Adam, as well as to L-DOG. In a few cases (namely ResNet50 and ConvNeXt-T) the gaps between DOG and Adam are significant, and favor Adam. We hypothesize this is due to Adam's per-parameter step-sizes and momentum mechanisms, which DOG does not exploit. L-DOG, which has per-layer steps, has positive median RED for all models, and narrows the gap between DOG and Adam, particularly for ResNet50.</p><p>The instance-tuned baselines consume significantly more compute than DOG and L-DOG. In Appendix F.2 we equalize the compute budget by reducing the number of steps for SGD and Adam. This makes DOG outperform instance-tune SGD in most cases, and brings L-DOG substantially closer to Adam.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3.">Sensitivity of DOG's fixed parameters</head><p>Initial movement size r &#9999; . Our theory suggests that all sufficiently small choices of r &#9999; should perform similarly, but choosing r &#9999; too large (compared to the initial distance to the optimum) can hurt the performance of the algorithm.</p><p>In Figure <ref type="figure">4</ref> (left) we plot the test performance as a function of r &#9999; for 8 model/task combinations. For 7 out of the 8, DOG is highly robust to the value of r &#9999; as long as it small enough, as predicted. However, ResNet50 on CIFAR-100 (bottom left) is an exception, where smaller values of r &#9999; result in an accuracy drop. We hypothesize this is due to scale invariance introduced by batch normalization (BN), and provide supporting evidence for that in Appendix F.4 (Figure <ref type="figure">8</ref>), where we show that DOG is insensitive to r &#9999; when we turn off BN. In the appendix we also provide a complementary diagnostic for r &#9999; sensitivity by plotting &#8984; t vs. &#8984; 0 for different values of t (see Figure <ref type="figure">6</ref>).</p><p>Base learning rate. For this experiment only, we consider variants of DOG with different values of base learning, i.e., step sizes of the form</p><p>pP i&#63743;t kgik 2 with different values of c. We expect optimal performance when c is close to 1. More specifically, we expect the algorithm to be unstable when c &gt; 1 and to be slower to converge (and less likely to generalize well) when c &lt; 1. As can be observed in Figure <ref type="figure">4</ref> (right), values around c = 1 perform well for all models. For smaller values, there is indeed inferior performance in some models (mainly ResNet50 and RoBERTa-b)-indicating T-DOG would not work well in practice-while larger values result in divergence (in 6 out of 8 cases). Hence, the useful range for c is very narrow (about [0.5, 1.5]) and tuning it is not likely to produce significant improvements. This is in contrast to Adam and SGD which generally require searching over a space spanning a few orders of magnitude to properly train a model.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.4.">Convex optimization</head><p>We also evaluate DOG on convex optimization tasks, matching the assumptions of our theoretical analysis. To do so, we perform multi-class logistic regression on features obtained from the computer vision models in our testbed, i.e., linear probes. We find that model-tuned SGD performs on par or worse than DOG, while instance-tuned SGD barely gains any advantage (Figure <ref type="figure">9</ref>), with RED values well under 1% (corresponding to the difference between accuracies 90% and 90.1%). Moreover, even in this simple setting, SGD is sensitive to the choice of learning rate, which differ significantly between models (Figure <ref type="figure">10</ref>). </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.5.">Fine-tuning on ImageNet</head><p>To complement our main fine-tuning testbed, we perform a more limited experiment involving ImageNet as a downstream task, which is more expensive to tune due its larger scale. We fine-tune a ViT-B/32 CLIP model <ref type="bibr">(Radford et al., 2021)</ref> and compare DOG and L-DOG to training with SGD as well as to an AdamW <ref type="bibr">(Loshchilov &amp; Hutter, 2019)</ref> training prescription similar to <ref type="bibr">Wortsman et al. (2022)</ref>; see Appendix E.7 for additional details. Table <ref type="table">1</ref> shows the Ima-geNet top-1 validation accuracies of the final model checkpoints, with and without the polynomial decay averaging used throughout our experiments. DOG performs similarly to SGD, but both algorithm perform significantly worse than AdamW, perhaps due to an insufficient iteration budget. L-DOG performs well in this setting, improving on AdamW by a little over 1 point.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.6.">Training from scratch</head><p>We conduct a preliminary experiment with training a model from scratch, specifically a Wide ResNet 28-10 (Zagoruyko &amp; Komodakis, 2016) on CIFAR-10 (Krizhevsky, 2009); see Appendix E.8 for details. Table <ref type="table">3</ref> shows the test accuracy of the final checkpoint, with and without the polynomial averaging used throughout our experiments. Here DOG performs on par with the setting's canonical training prescription of SGD with momentum 0.9 and learning rate 0.1 <ref type="bibr">(Cubuk et al., 2019)</ref>. In this setting Adam produces poorer results, and L-DOG is 0.5 point worse than tuned Adam with the best learning rate, perhaps due to not reaching convergence.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.7.">Comparison to other tuning-free methods</head><p>We perform preliminary comparisons between DOG and L-DOG and other methods for removing the learning rate parameter: the Stochastic Polyak Step <ref type="bibr">(Loizou et al., 2021)</ref>, and D-Adaptation <ref type="bibr">(Defazio &amp; Mishchenko, 2022)</ref>. In both cases, we find that DOG and L-DOG provide better performance on most tasks and on average (see Tables <ref type="table">6</ref> and<ref type="table">7</ref>). We provide detailed results in Appendix G, where we also discuss the practical prospects of the bisection procedure of <ref type="bibr">Carmon &amp; Hinder (2022)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Related Work</head><p>Previous attempts to design theoretically principled and practical optimization algorithms that do not require learning rate tuning approach the problem from a variety of perspectives, resulting in a large variety of proposed algorithms.  <ref type="formula">2022</ref>) nest hypergradient descent to make a method that is insensitive to initial hyper-parameter choices. However, none of these results are parameter-free in the same sense as DOG: they either do not have converges guarantees, or have suboptimality bounds that blow up polynomially when the method's parameters do not match a problem-dependent value. In contrast, parameterfree methods have converges rates that depend at most logarithmically on algorithmic parameters.</p><p>While the parameter-free optimization literature has focused mainly on theoretical schemes, a number of works also include empirical studies <ref type="bibr">(Orabona, 2014;</ref><ref type="bibr">Orabona &amp; Tommasi, 2017;</ref><ref type="bibr">Kempka et al., 2019;</ref><ref type="bibr">Chen et al., 2022)</ref>.</p><p>In particular, <ref type="bibr">Orabona &amp; Tommasi (2017)</ref>  Finally, a number neural network optimization methods-LARS <ref type="bibr">(You et al., 2017a)</ref>, LAMB <ref type="bibr">(You et al., 2017b)</ref>, Adafactor <ref type="bibr">(Shazeer &amp; Stern, 2018)</ref>, and Fromage (Bernstein et al., 2020)-use the norm of neural network weights to scale the step size. DOG and L-DOG are similar in also using a norm to scale their step size, but they differ from prior work by considering the distance from initialization rather than the norm of the weights. We believe that this difference is crucial in making DOG parameter-free, while the above-mentioned method have a learning-rate parameter to tune (though <ref type="bibr">Bernstein et al. (2020)</ref> report that a single default value works well for across different tasks).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.">Limitations and Outlook</head><p>Our theoretical and empirical results place DOG as a promising step toward a new generation of principled and efficient tuning-free optimization algorithms. However, much additional work is necessary for these algorithms to become ubiquitous. First, it is important to understand how to correctly combine DOG with proven technique such as momentum, per-parameter learning rates, and learning rate annealing-this is a challenge both from a theoretical and a practical perspective. Second, it is important to gain a better understanding of situations where DOG is more sensitive to the choice of r &#9999; than theory would have us expect. Our preliminary investigations suggest a connection to batch normalization, and following that lead could lead to even more robust training methods. Finally, while our experiments aim to cover a broad range of tasks and architectures, future work needs to explore DOG in additional settings, particularly those involving training from scratch.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Relaxing the Convexity Assumption</head><p>This section describes relaxations of convexity under which our main theoretical results still hold. In particular, our results naturally extend to star-convex functions <ref type="bibr">(Nesterov &amp; Polyak, 2006</ref>) which satisfy f (x) f ? &#63743; hrf (x), x x ? i for all x 2 X .</p><p>Our results also extend (with changed constants) to quasarconvex functions <ref type="bibr">(Hinder et al., 2020)</ref>, which require that f (x)</p><p>f ? &#63743; c hrf (x), x x ? i holds for some c &lt; 1 and all x 2 X . A further relaxation of star convexity requires it to hold only along the optimization trajectory: Assumption A.1 <ref type="bibr">(Zhou et al. (2019, Definition 2)</ref>). There exists x ? 2 arg min x f (x) and constant c &lt; 1 such that the iterates of SGD satisfy</p><p>x k x ? i for all k almost surely. <ref type="bibr">Zhou et al. (2019)</ref> introduce this notion of a "star-convex path" and provide some empirical evidence that it may hold when training deep neural networks with SGD (see also <ref type="bibr">Kleinberg et al. (2018)</ref> for a related assumption). <ref type="bibr">Zhou et al. (2019)</ref> also prove that the assumption suffices to prove that SGD converges to the global minimizer; it suffices for DOG for similar reasons.</p><p>When substituting Assumption 3.1 with Assumption A.1 our analysis goes through unchanged, except we can no longer use Jensen's inequality to argue directly about the suboptimality of the point x&#8999; . Instead, Theorem 3.10 with Assumption A.1 says that, with probability at least 1 ,</p><p>and &#8999; and c ,r&#9999;,T as defined in Theorem 3.10. (Note that Assumption A.1 implies</p><p>). We can turn the above bound into a constnat-probability guarantee for a specific T-DOG iterate x K by sampling K &#8672; ! and using Markov's inequality:</p><p>To obtain a high probability guarantee, we can make l = dlog 1 e independent draws from !, denoted K 1 , . . . , K l and use the fact that</p><p>Finding the i that minimizes f (x Ki ) requires a logarithmic number of evaluations of the exact objective. When this is not feasible, we can instead consider a statistical learning setup where we have sample access to stochastic functions F (x) such that EF (x) = f (x) for all x and, almost surely, F is L ? Lipschitz in a ball of radius 3d 0 around x 0 . (The stochastic subgradient oracle G(x) is then implemented by sampling F and returning its subgradient at x). We can then sample T new stochastic functions F 1 , . . . , F T and select K ? 2 arg min k2{K1,...,K l } P T i=1 F i (x k ). Straightforward application of Hoeffding's inequality shows that (when rT &#63743; 3d 0 )</p><p>! with probability at least 1 .</p><p>We remark that the literature contains a plethora of other convexity relaxations such as quasiconvexity <ref type="bibr">(Arrow &amp; Enthoven, 1961)</ref>, pseudoconvexity <ref type="bibr">(Mangasarian, 1975)</ref>, Polyak-&#321;ojasiewicz conditons <ref type="bibr">(Karimi et al., 2016)</ref> and weak convexity <ref type="bibr">(Davis &amp; Drusvyatskiy, 2019)</ref>. Exploring the convergence of DOG under these additional convexity relaxations is left to future work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Relaxing the Global Stochastic Gradient Bound Assumption</head><p>Our results continue to hold essentially unchanged if we replace Assumption 3.2 (globally bounded stochastic gradient norm) with the following. Assumption B.1 (Pointwise bounded stochastic gradients). There exists some continuous function `: X ! R such that kG(x)k &#63743; `(x) almost surely.</p><p>In particular, if we set</p><p>then Theorem 3.10 holds under Assumption B.1 for any L L ? . For full details and proof, refer to the arXiv version of our paper, available at <ref type="url">https://arxiv.org/abs/2302.12022</ref>, where we use Assumption B.1 throughout.</p><p>Assumption B.1 meaningfully relaxes Assumption 3.2 when `can grow very large in X . For example, consider unconstrained least squares problems (with X = R m ) with stochastic gradient oracle G(x) = (ha, xi b)a for random a 2 R m and b 2 R, such that kak &#63743; 1 and |b| &#63743; 1 hold with probability 1. In this case, there is no global upper bound on kG(x)k, but Assumption B.1 holds with `(x) = kxk + 1 and L ? = 3kx ? k + 1 (assuming x 0 = 0).</p><p>However, to apply the (T-DOG) formula, one still requires an a-priori upper bound on L ? . In the above least-squares example, it is possible to bound L ? given an upper bound D on d 0 = kx ? k. However, if such a bound is available, then it is also possible to constrain the domain to a ball of radius D, where a global norm bound holds. Indeed, for all examples that we are aware of that have an a-priori bound on L ? , this bound on L ? arises from a bound on d 0 .<ref type="foot">foot_11</ref> In the arXiv version of our paper we solve this issue by changing the T-DOG formula to</p><p>where &#175;t := max i&#63743;t `(x i ). This variant of T-DOG attains essentially the same guarantees as the one presented here, but requires no prior knowledge of L ? .</p><p>We note that Assumption B.1 and techniques similar to the T-DOG variant described above have previously appeared in the parameter-free online learning literature <ref type="bibr">(Cutkosky, 2019;</ref><ref type="bibr">Mhammedi &amp; Koolen, 2020)</ref>. However, these works do not also guarantee that the iterates remain close to the optimal solution and therefore do not obtain our dependence on the local Lipshitz constant L ? .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Useful Algebraic Facts</head><p>C.1. Lemma C.1</p><p>Lemma C.1. Let a 0 , . . . , a t be a nondecreasing sequence of nonnegative numbers. Then</p><p>Lemma C.2. Let a 1 , . . . , a T and b 1 , . . . , b T be sequences in R such that {a i } is nonnegative and nondecreasing. Then,</p><p>DOG is SGD's Best Friend Proof. Let a 0 i = a i a i 1 and B i = P j&#63743;i b i . Then (by discrete integration by parts)</p><p>where we used (i) the triangle and H&#246;lder's inequality, and (ii) that a t is nonnegative and nondecreasing and therefore</p><p>C.3. Proof of Lemma 3.7</p><p>Proof. Define K := dlog(s T /s 0 )e, and n := b T K c. Then, we have</p><p>Rearranging and using the definition of K gives</p><p>where the implication follows from monotonicity of the exponential function. Therefore,</p><p>where the first inequality uses that s is positive nondecreasing sequence and the second inequality uses min k&lt;K s n(k+1) s nk &#63743; e as shown above.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C.4. Lemma C.3</head><p>Recall that log + (z) := 1 + log(t).</p><p>Lemma C.3. Let a 1 , a 0 , a 1 , . . . , a t be a nondecreasing sequence of nonnegative numbers, then</p><p>Rearranging this gives:</p><p>Therefore, P t 1 k=0 rk hg k , x k x ? i is at most</p><p>.</p><p>We will bound the terms (A) and (B) in turn, beginning with the former:</p><p>Inequality (i) uses d k &#63743; dt and that G 0 k is nondecreasing as per Definition 3.3. Inequality (ii) holds since, for s 2 arg max k&#63743;t d k , we have d2</p><p>Bounding the second term (B), we have:</p><p>where the final inequality uses the standard Lemma C.1 with a k = G k = P i&#63743;k kg i k 2 .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.2. Proof of Lemma 3.5</head><p>We begin by citing the following corollary of a general bound due to <ref type="bibr">Howard et al. (2021)</ref>. (Recall that &#10003; t, := log 60 log(6t) ).</p><p>Proof. Follows from Lemma C.2 (with y i and X i taking the roles of a i and b i , respectively), and Corollary D.1 that bounds max i&#63743;t P i&#63743;t X i for all t &#63743; T .</p><p>Proof of Lemma 3.5. For k 2 [T ] define the random variables:</p><p>From these definitions we get</p><p>Therefore,</p><p>where the last inequality uses Lemma D.2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.3. Proof of Corollary 3.8</head><p>Proof. If T &gt; 2 log + (r T /r &#9999; ) then the corollary follows by Proposition 3.6 and Lemma 3.7 with s t = rt . For the corner case when</p><p>where the first inequality uses (3), Cauchy-Schwarz and that krf (x t )k &#63743; L; the second inequality uses the triangle inequality.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.4. DOG can Diverge on a Pathological Instance</head><p>Consider the following variant of Nemirovski's function <ref type="bibr">(Nemirovski &amp; Yudin, 1983;</ref><ref type="bibr">Nemirovski, 1994)</ref> defined on R m :</p><p>where [x] i denotes the i'th coordinate of x and [x 0 ] i = 10r &#9999; / p m for all i, so that d 0 = 10r &#9999; &gt; r &#9999; . We show that applying DOG on this function gives rT /d 0 = p T /10 for all T &#63743; m, meaning that the ratio rT /d 0 can be made arbitrarily large by increasing T and m.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Define</head><p>is the smallest coordinate which is candidate for providing a subgradient. Using this notation, a valid subgradient for f is:</p><p>otherwise where e j is a vector with one in the jth entry and zero elsewhere. With this subgradient choice for k &#63743; m the iterates become:</p><p>and therefore rk = p kr &#9999; = p kd 0 /10 as claimed. We confirm (6) by induction. Since [x 0 ] i = 10r &#9999; / p m for all i, the expression (6) holds for k = 0. If (6) holds for all k &#63743; n &lt; m then</p><p>which completes the induction.</p><p>D.5. Proof of Proposition 3.9</p><p>To show iterate boundedness in the stochastic setting we define the stopping time &#8999; = min{t : rt &gt; 3d 0 }, so that the event {r T &#63743; 3d 0 } is the same as {&#8999; &gt; T}. Let &#8984; k denote the sequence of T-DOG step sizes (for given L, T and ). To facilitate our analysis we also define the following truncated step size sequence:</p><p>Truncating the step size allows us to rigorously handle the possibility that rT exceeds 3d 0 . In particular, the following holds for {&#8984; k } but not for {&#8984; k }. (Recall that t := g t rf (x k )).</p><p>Lemma D.3. Under Assumption 3.2 the truncated T-DOG step sizes (7) satisfy, for all t &#63743; T , &#8984;t 2 (g 0 , . . . , g t 1 ) ,</p><p>, and</p><p>Proof. The bound (8) holds directly from the definition of (T-DOG) and (7).</p><p>To see the bound (9), first note that that</p><p>T, for all t, the Cauchy-Schwartz inequality gives</p><p>where the last inequality uses again rt &#63743; 3d 0 and d t &#63743; d 0 + rt by the triangle inequality. Bounds for |&#8984; t h , x t x ? i| for 2 {g t , rf (x t )} follow by the same argument.</p><p>To establish (10), first note that</p><p>where (i) uses that kg k k 2 = G k G k 1 (with the shorthand G 1 := 0) and</p><p>The final bound (11) follows immediately from (10) by noting that</p><p>where the first inequality follows from Cauchy-Schwartz and the second inequality from the fact that only terms with k &lt; &#8999; contribute to the sum.</p><p>The above properties allow us to establish the following concentration bound.</p><p>Lemma D.4. In the setting of Lemma D.3,</p><p>Proof. Consider the filtration F t = (g 0 , . . . , g t ) and define X t = &#8984;t h t , x ? x t i and Xt = &#8984;t hrf (x t ), x ? x t i. Then, by (8) we have that X t is martingale difference sequence adapted to F t and Xt 2 F t 1 . Moreover, by ( <ref type="formula">9</ref> </p><p>Noting that X t Xt = &#8984;t hg t , x ? x t i and substituting the definition of c and the bound (11) gives, for every t &lt; T ,</p><p>concluding the proof of lemma.</p><p>Finally, we show that the event defined in Lemma D.4 implies the desired distance bound.</p><p>Lemma D.5. In the setting of Proposition 3.9, if P t 1 k=0 &#8984;k h k , x ? x k i &#63743; d 2 0 for all t &#63743; T then &#8999; &gt; T, i.e., rT &#63743; 3d 0 .</p><p>Proof. To condense notation, let B t := max t 0 &#63743;t P t 0 1 k=0 &#8984;k h k , x ? x k i, so that the claim becomes B t &#63743; d 2 0 implies &#8999; &gt; t for all t &#63743; T . We prove the claim by induction on t. The basis of the induction is that &#8999; &gt; 0 always holds since r0 = r &#9999; &#63743; 3d 0 by assumption. For the induction step, we assume that B t 1 implies &#8999; t and show that B t &#63743; d 2 0 implies &#8999; &gt; t. To that end, we use hrf (x t ), x t x ? i f (x t ) f ? 0 to rearrange (5) and obtain</p><p>for all k. Summing this inequality from k = 0 to k = t 1, we get</p><p>where the equality holds since &#8999; &gt; t 1 and therefore &#8984; k = &#8984;k for all k &#63743; t 1. Now, by the bound (10) we have</p><p>0 by definition and assumption, from which we conclude that d 2 t &#63743; 4d 2 0 and hence r t &#63743; d 0 + d t &#63743; 3d 0 . Since rt = max{r t 1 , r t } and rt 1 &#63743; 3d 0 by the induction assumption, we have that rt &#63743; 3d 0 as well, concluding the proof. Proposition 3.9 follows immediately from Lemmas D.4 and D.5.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D.6. Illustrating DOG's guarantees for least squares problems</head><p>In order to illustrate the advantage of T-DOG's iterate boundedness guarantee, we now instantiate Theorem 3.10 and Proposition 3.9 for the following stochastic least squares problem. Let P be a distribution over pairs (a, b) 2 R m &#8677; R, and for (a, b) &#8672; P consider the gradient oracle</p><p>corresponding to the objective function</p><p>For simplicity, we set x 0 = 0. T ), and therefore Theorem 3.10 implies that (with high probability) T-DOG's optimality gap is</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Using</head><p>, the L-dependent term is of lower order as long as = !(A 2 /T ). For previously-proposed general purpose<ref type="foot">foot_12</ref> parameter-free methods (e.g. <ref type="bibr">Orabona &amp; P&#225;l, 2016;</ref><ref type="bibr">Cutkosky &amp; Orabona, 2018;</ref><ref type="bibr">Carmon &amp; Hinder, 2022)</ref> the iterates x t may be anywhere inside X = {x | kxk &#63743; D}.<ref type="foot">foot_13</ref> Therefore, the best bounds for G T would still involve the crude bound D, and be of the form G T &#63743; O(((A 2 + )D + AB) 2 T ), leading to a worse overall error bound when kx ? k &#8999; D. Furthermore, as we explain in Appendix B, for T-DOG with L as given above, there is no need to explicitly constrain the domain to X = {x | kxk &#63743; D}.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E. Experiment Details</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.1. Environment settings</head><p>All experiments were based on PyTorch <ref type="bibr">(Paszke et al., 2019)</ref> (version 1.12.0).</p><p>Language experiments were done with the transformers <ref type="bibr">(Wolf et al., 2020)</ref> library (version 4.21.0) and tracked using the Comet. <ref type="bibr">ML (Comet.ML, 2021)</ref>. All datasets were provided by the Datasets library <ref type="bibr">(Lhoest et al., 2021)</ref> (version 2.4.0) and were left as is, including train-eval-test splits.</p><p>Vision experiments were based on the pytorch-image-models (timm, version0.7.0dev0) repository <ref type="bibr">(Wightman, 2019)</ref>, with TensorFlow datasets (version 4.6.0) as a dataset backend <ref type="bibr">(Abadi et al., 2015)</ref>. To support the training and analysis of the results, we used numpy <ref type="bibr">(Harris et al., 2020)</ref>, scipy <ref type="bibr">(Virtanen et al., 2020)</ref>, pandas (Wes McKinney, 2010) and scikit-learn <ref type="bibr">(Pedregosa et al., 2011)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.2. Implementation details</head><p>Whenever possible, we used existing scripts and recipes provided by timm and transformers to fine-tune the models. We implemented DOG, L-DOG and the polynomial model averaging as a subclass of PyTorch Optimizer interface. We provide implementation of both in <ref type="url">https://github.com/formll/dog</ref>.</p><p>Table <ref type="table">2</ref>. Configuration used for each dataset in our testbed (Section 4.1). For all language tasks, we used the batch size as in <ref type="bibr">Liu et al. (2019)</ref>, and at least 150% the number of steps used there, in order to ensure convergence. Learning rate (LR) warmup and annealing refers to tuning with SGD and Adam. In all cases, both DOG and L-DOG used neither warmup nor annealing. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Task</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.3. Datasets</head><p>The datasets used in the language experiments are: CoLA <ref type="bibr">(Warstadt et al., 2019)</ref>, SST-2 <ref type="bibr">(Socher et al., 2013)</ref>, MRPC <ref type="bibr">(Dolan &amp; Brockett, 2005)</ref>, QQP <ref type="bibr">(Iyer et al., 2017)</ref>, STS-B <ref type="bibr">(Cer et al., 2017)</ref>, MNLI <ref type="bibr">(Williams et al., 2018)</ref>, QNLI <ref type="bibr">(Rajpurkar et al., 2016)</ref>, and RTE <ref type="bibr">(Dagan et al., 2006;</ref><ref type="bibr">Bar Haim et al., 2006;</ref><ref type="bibr">Giampiccolo et al., 2007;</ref><ref type="bibr">Bentivogli et al., 2009)</ref>. Following <ref type="bibr">Liu et al. (2019)</ref>, we discard WNLI <ref type="bibr">(Levesque et al., 2011)</ref> as it was found to be ill-defined and was reformulated differently in SuperGLUE <ref type="bibr">(Wang et al., 2019a)</ref>.</p><p>The datasets used in the vision experiments are: The tasks are Caltech101 <ref type="bibr">(Fei-Fei et al., 2004)</ref>, CIFAR-100 <ref type="bibr">(Krizhevsky, 2009)</ref>, CLEVR-Dist <ref type="bibr">(Johnson et al., 2017)</ref>, DMLab <ref type="bibr">(Beattie et al., 2016)</ref>, dSprites-Ori <ref type="bibr">(Matthey et al., 2017)</ref>, DTD <ref type="bibr">(Cimpoi et al., 2014)</ref>, Flowers102 <ref type="bibr">(Nilsback &amp; Zisserman, 2008)</ref>, Pets <ref type="bibr">(Parkhi et al., 2012)</ref>, Resisc45 <ref type="bibr">(Cheng et al., 2017)</ref>, Retinopathy <ref type="bibr">(Kaggle &amp; EyePacs, 2015)</ref>, Sun397 <ref type="bibr">(Xiao et al., 2010;</ref><ref type="bibr">2016)</ref>, and SVHN <ref type="bibr">(Netzer et al., 2011)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.4. Models</head><p>When fine-tuning RoBERTa (from the 'roberta-base' checkpoint) on classification tasks, we follow the common technique of prepending an CLS token to the input, and feeding its final representation to a one hidden-layer, randomly initialized MLP that is used as a classification head. For SQuAD, the classification head is tasked with multi-label classification, predicting the probability that each word (token) in the input is the beginning/end of the answer span, and we then used the span that has the maximum likelihood as the model's output. When fine-tuning T5 (from the 't5-base' checkpoint), we treated all tasks as sequence-to-sequence tasks, translating classification labels to appropriate words (e.g. 0/1 to positive/negative) and then evaluated accuracy with exact match. The computer vision pre-trained models were accessed via timm, and had randomly initialized classification heads. The strings used to load the models were: 'convnext tiny', 'resnet50', 'densenet121', 'vit base patch32 224 in21k' and 'vgg11'.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.5. Hyper-parameters</head><p>We trained each model/tasks combination a fixed number of steps (see Table <ref type="table">2</ref>), performing evaluation every 500 update steps (except for the smaller datasets Caltech101, DTD, Flowers102 and Pets where we evaluated every 200) with both the latest checkpoint, and the polynomial averaged one (see below). We did not use any weight decay. For language models, we left dropout at its default value in the transformers library. We used batch sizes as is common practice for each task, as detailed in Table <ref type="table">2</ref>.</p><p>Data augmentation in vision experiments. The VTAB suite <ref type="bibr">(Zhai et al., 2019)</ref> divides its datasets into three categories: natural, specialized and structured, and we uses a suitable data augmentation strategy for each of the categories. In particular, for structured datasets we simply resizes the images to a (224, 224) resolution, while for the natural and specialized datasets we uses the standard "inception crop" <ref type="bibr">(Szegedy et al., 2015)</ref> at training time and a 0.875 center crop at test time.</p><p>For natural datasets we additionally applied a color jitter operation with parameter 0.4 (as implemented in timm). Finally, we applied a random horizontal flip for all datasets except SVHN and dSprites-Ori, where such augmentation clearly interferes with the task.</p><p>Model selection in vision experiments. For computer vision experiments, we used the VTAB evaluation splits to select the best checkpoint, and then reported performance on the training split. Unlike the experiments accompanying the VTAB suite <ref type="bibr">(Zhai et al., 2019)</ref>, we did not retrain selected models on the combination of training and validation data.</p><p>Repeated runs. To account for randomness, we repeated our fine-tuning experiments using multiple seeds. In most cases (with exceptions listed below) we repeated each DOG and L-DOG training 5 times. For SGD and Adam repeating the learning with all learning rates was computationally prohibitive, so instead for each task / model pair we repeated 5 times only the best-performing LR (i.e., instance-tuned LR) and the best-performing LR across all tasks for that model (i.e., model-tuned LR) according the validation split. A few experiments were too computationally expensive to repeat: for QQP and MNLI (which require a large step budget) we have only 1-3 repetitions per training configuration, and for ConvNeXt-T (which takes a long time per step) we did repeat the training runs.</p><p>Each relative error difference (RED) score combines the error of two optimization methods (one being DOG) on a particular model task combination. Given multiple seeds for each optimization method, we computed the RED scores for each possible seed combination. In Figures <ref type="figure">2,</ref><ref type="figure">3</ref>, 9 and 10 (which aggregate multiple tasks) we average over those multiple RED values and compute the statistics of the average RED. In per-task breakdowns such as Figure <ref type="figure">5</ref> and tables 4 and 5 we report the statistics over the multiple RED values.</p><p>Baseline optimizers. For both SGD and Adam, we used cosine learning rate decay, and searched over appropriate values for peak learning rate The base learning rate search space used when performing fine-tuning for each model/task combination can be found in Tables <ref type="table">4</ref> and<ref type="table">5</ref>. We did not use momentum for SGD. For Adam we used 1 = 0.9 for all experiments, and 2 = 0.999 for language experiments and 2 = 0.99 for vision experiments. For language models only, we used warmup of 10% of the maximum steps count, and gradient clipping at global norm 1. We did not perform learning warmup or gradient clipping for the vision experiment since we did not encounter any training stability issues there.</p><p>Setting r &#9999; . As explained in Section 4.1, setting r &#9999; := &#8629;(1 + kx 0 k) generally works well for &#8629; = 10 4 . However, in some cases such as with T5, kx 0 k can be very large, causing destructively large first updates, with &#8984; t increasing exponentially and the model diverging. This is easily detectable early during training, as usually &#8984; t exceeds 1000 within the first 100 steps. Since the theory requires r &#9999; to be small, we simply decreased &#8629; by a factor of 100. While preliminary experimetns with RoBERTa indicated that DOG also performed well with &#8629; = 10 4 , for the sake of consistency we use the same values in all models of the same domain. Thus, models fine-tuned on vision tasks used &#8629; = 10 4 , while language models used 10 6 for DOG and 10 8 for L-DOG.</p><p>Model averaging. As mentioned in Section 4.1, we used the polynomial decay averaging as proposed by <ref type="bibr">Shamir &amp; Zhang (2013)</ref>. Namely, we kept an additional copy of the model weights, and in every update step we updated our running average of the model parameters as follows:</p><p>The vector x t roughly corresponds to an average of the last t/ iterates preceding iteration t. For all models, we set = 8. We did not perform any tuning of the parameter ; we chose the value 8 because 1/8 seemed like a good fraction of iterates to average, and because it worked well in the experiments of <ref type="bibr">(Levy et al., 2020)</ref>.</p><p>To ensure that iterate averaging is never harmful, for each optimization method we selected the best-performing checkpoint across both x t and x t (i.e., with or without averaging).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.6. Figure 1 details</head><p>We generated Figure <ref type="figure">1</ref> as part of our fine-tuning testbed. In particular, SGD used a cosine learning rate annealing (without warmup), both algorithms use polynomial decay averaging, and we report test performance on the best checkpoint selected on a validation set.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.7. Fine-tuning ImageNet</head><p>Our training setup mostly followed the default configuration in <ref type="bibr">Wortsman et al. (2022)</ref>. In particular, we used batch size 512 and the default timm augmentation (as in our main computer vision experiments) which <ref type="bibr">Wortsman et al. (2022)</ref> refer to as 'medium aug.' We trained for 25K steps, corresponding to roughly 10 passes over the data. However (keeping with our computer vision testbed setting) we did not perform learning rate warmup or gradient clipping, and we initialized the classification head to be random.</p><p>For AdamW <ref type="bibr">(Loshchilov &amp; Hutter, 2019)</ref> we used weight decay 0.1 and cosine learning rate annealing as in <ref type="bibr">Wortsman et al. (2022)</ref>. We obtained accuracies within 0.5% of the numbers reported in Appendix L of <ref type="bibr">Wortsman et al. (2022)</ref>.</p><p>DOG and L-DOG we used weight decay 0 since the value 0.1 is meant for decoupled weight decay and we did not wish to re-tune a weight decay parameter. We set r &#9999; to be 10 6 &#8226; (1 + kx 0 k) without trying different values of this parameter.</p><p>For SGD we used cosine learning rate annealing and set weight decay to 0 for a more direct comparison to DOG.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E.8. Training from scratch</head><p>Our training setup followed the basic training configuration of <ref type="bibr">Cubuk et al. (2019)</ref>, which is typical for training ResNets on CIFAR-10: data augmentations comprising a random crop after 4 pixel padding and random horizontal flip, batch size of 128, weight decay of 0.0005 and 200 epochs of training. SGD used cosine learning weight annealing and (when applicable) Nesterov momentum. We did not use dropout or any other additional form of regularization. For DOG and L-DOG, we set r &#9999; = 10 4 &#8226; (1 + kx 0 k) without trying different values of this parameter. The accuracies we obtained using SGD and DOG are consistent (and slightly better) than the baseline number reported in Table <ref type="table">2</ref> of <ref type="bibr">Cubuk et al. (2019)</ref> and within 0.1% of the one reported in Table <ref type="table">1</ref> of <ref type="bibr">Carmon et al. (2019)</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F. Additional experiment results</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F.1. Full breakdown of main experiment results</head><p>Figure <ref type="figure">5</ref> as well as Tables <ref type="table">4</ref> and<ref type="table">5</ref> provide the full breakdown of our main fine-tuning results, comparing DOG and L-DOG to SGD and Adam with different learning rates for each model/task combination.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F.2. Comparison with equalized compute budget</head><p>Throughout the paper, our experiments focus on comparing different methods by the final test performance they are able to reach given sufficient compute budget to essentially fully converge. As a consequence, SGD and Adam-which require learning rate tuning-use up significantly more computation than DOG and L-DOG. More specifically, for each model/task Table <ref type="table">4</ref>. Average (std) performance of RoBERTa-b and T5-b on language tasks, when fine-tuned with different optimization algorithms and their respective base learning rate (when applicable). DOG uses r&#9999; = 10 6 (1 + kx0k) and L-DOG uses r&#9999; = 10 8 (1 + kx0k).</p><p>Scores are reported as mean across seeds, measured in the corresponding performance metric as detailed in Table <ref type="table">2</ref>. combination we tune the SGD and Adam learning rates over a grid of at least 5 values (and often 6 or more), resulting in computational cost increased by the same factor.</p><p>In this subsection only, we compare different optimizers using roughly the same computational budget, by measuring the performance of Adam and SGD after roughly 20% of their overall step budget.<ref type="foot">foot_14</ref> Figure <ref type="figure">7</ref> shows the result of this comparison, contrasting it to our main experiment. The figure shows that DOG often exceeds the performance of instancetuned SGD with equalized step budget.</p><p>We note a number caveats regarding the equalized compute budget comparison:</p><p>1. Since our experiments are focused on getting the best possible generalization, we substantially over-provisioned the iteration budget, and hence the performance of instance-tuned SGD and Adam declines only mildly when we cut the budget by roughly 5. Our tightest budget was for RoBERTa (150% the iterations in <ref type="bibr">Liu et al. (2019)</ref>), and there we can see that performance degraded more substantially. If we were to instead take the number of iterations DOG actually needs to reach its peak performance, its advantage over equalized-compute SGD would likely be far larger.</p><p>2. Since the results reported here are obtained by re-analysis of our original experiments, the cosine learning rate schedule for SGD and Adam is not properly set for using 20% of the iteration budget; in particular, the learning rate does not decay to zero at the end of the training. Running these methods with a properly set cosine schedule would likely improve their performance. However, we noted that the addition of iterate averaging appears to partially compensate for the lack of sharp learning rate decay.</p><p>3. Given sufficient resources, it is possible to run all the different learning rates of SGD and Adam in parallel. Therefore, the comparison equalizes overall computational cost, but not necessarily wall time.</p><p>4. The comparison also does not take into account more sophisticated learning rate tuning schemes that early-stop unpromising learning rate candidates. However, that such schemes run risk choosing a suboptimal learning rate.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F.3. Fine-tuning CoLA</head><p>As discussed in Section 4.2, DOG with r &#9999; = 10 6 (1 + kx 0 k) failed in fine-tuning T5-b on CoLA. To investigate this issue, we ran DOG and L-DOG with different choices of r &#9999; . Figure <ref type="figure">11</ref> depicts the results of this test as well as the performance of SGD and Adam with different learning rates. The figure shows that using lower values of r &#9999; allows DOG to reach reasonable results, but with some seeds still failing. In contrast, L-DOG shows consistent and superior performance across a large range of r &#9999; values. We leave further investigations on the cause of failure in CoLA to future work.</p><p>F.4. Sensitivity of DOG to r &#9999; and the effect of batch normalization</p><p>In Section 4.3, we discuss DOG's insensitivity to the choice of r &#9999; as long as it is small enough. Here, we expand on this analysis by testing how the DOG step size at iteration t, denoted &#8984; t , depends on its initial step size &#8984; 0 = r &#9999; /kg 0 k. For for each task and in our testbed and 4 models, we perform short training runs with a large numbers of &#8984; 0 values. In Figure <ref type="figure">6</ref> we plot &#8984; t vs. &#8984; 0 for t 2 {2, 10, 100, 1000}. We also show a horizontal line for the best peak step size of SGD, and the y = x diagonal. The figure shows that for most model/task combinations, &#8984; t converges quickly (within the first 1000 steps) to a value near the optimal one for SGD, and mostly independent of &#8984; 0 as long as it is small enough.</p><p>However, we also observe some failure cases where &#8984; t strongly depends on &#8984; 0 , such as fine-tuning ResNet50 on CIFAR-100. This provides a complementary perspective on the fact DOG is sensitive to r &#9999; in this setting, as already shown in Figure <ref type="figure">3</ref>: when &#8984; 0 is to low, DOG fails to reach a suitable value of &#8984; t in a reasonable time. We hypothesize that this is due to the batch normalization (BN) layers in the model causing many different step size to "look" like solutions to the implicit equation motivating DOG. To test this hypothesis, we repeat the CIFAR-100 training experiment but without BN (we disable BN by fine-tuning the model in evaluation mode). Figure <ref type="figure">8</ref>(a) shows that removing BN allows DOG to recover its stabilizing behavior. Moreover, Figure <ref type="figure">8</ref>(b) further shows that without batch normalization, the performance of DOG again becomes insensitive to the choice of r &#9999; provided it is sufficiently small. Unsurprisingly, we also observe that removing BN slightly hurts generalization performance in this task. As mentioned in Section 6, improving DOG to be more robust in the presence of normalization layers in general and batch normalization in particular is an important direction for future research.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>F.5. Additional convex optimization results</head><p>Figures 9 and 10 show results for learning lines probes on out computer vision fine-tuning testbed (see Section 4.4). The figures show that DOG attains results on par with instance-tuned SGD and Adam.</p><p>F.6. The growth rate of rt </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>G. Comparison to Other Tuning-Free Methods</head><p>Section 4.7 discusses a comparison between DOG and other parameter-free optimizers. In this section, we provide further details on the experiments.</p><p>G.1. Parameter-free SGD <ref type="bibr">Carmon &amp; Hinder (2022)</ref> propose a bisection procedure for tuning the SGD learning rate. A direct implementation of this method would need to perform at least 4 or 5 bisection steps and therefore, in the best case, perform similarly to our instance-tuned SGD baseline. Since our learning rate tuning employs a tight grid of values selected using some prior knowledge of the problem, and since we select learning rates based on validation set performance and not a step size certificate, instance-tuned SGD is likely a conservative upper bound on the performance of bisection approach.</p><p>Similar to instance tuned SGD, the bisection procedure has increased computational cost relative to DOG that is due to the need for multiple SGD runs. That is, performing 5 steps of bisection where each SGD call has the same step budget as DOG consumes 5 times more compute than DOG. We may also consider a situation where each bisection step uses only 20% of the DOG compute budget, leading to equal overall cost. In this setting, the "equalized compute budget" comparison we perform in Appendix F.2 and Figure <ref type="figure">7</ref> provides a conservative upper bound on the bisection performance, indicating it is likely to under-perform DOG.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>G.2. Stochastic Polyak step-size</head><p>We apply the Stochastic Polyak Step (SPS) proposed by <ref type="bibr">Loizou et al. (2021)</ref> using their open-source implementation<ref type="foot">foot_15</ref> to a subset of our fine-tuning testbed, and present the results in Tables <ref type="table">6</ref> and<ref type="table">7</ref>. For the vision experiments, the SPS with the hyper-parameters proposed in the paper (c = 0.2, &#8999; = 2) and initial step size of 1.0 (the default in the code) worked reasonably well, but not as well as DoG. For the language experiments the same algorithm diverges; we find initial learning rate of 0.01 worked reasonably well, but again not as well as DoG (we also attempted an initial learning rate of 0.0001, which produced worse results). For vision tasks, similarly tuning the initial step size did not significantly improve performance. We run 5 random seeds per experiment, and average the results across seeds. DOG outperforms SPS in 22 out of 34 task/model combinations, and by 2.3 percentage points on average. L-DOG further increases this gap by outperforming SPS in 24 out of 34 pairs, with an average of 5.3 percentage points.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>G.3. D-adaptation</head><p>Empirical comparison to D-adapt SGD and Adam. We perform a preliminary empirical evaluation of the practical algorithms proposed in <ref type="bibr">Defazio &amp; Mishchenko (2023)</ref> using the code they release<ref type="foot">foot_16</ref> and a subset of our fine-tuning testbed. As Tables <ref type="table">6</ref> and<ref type="table">7</ref> show, D-adapt SGD and and D-adapt Adam perform reasonably well but slightly worse than DOG, and noticeably worse than L-DOG and Adam. DOG outperforms D-adapt SGD in 24 out of 34 task/model combinations, and by 1.9 percentage points on average. L-DOG further increases this gap by outperforming D-adapt SGD in 30 out of 34 pairs, with an average of 4.9 percentage points. D-adapt Adam is less stable on many of the tasks in our testbed, being outperformed by DOG in 26 out of 34 task/model combinations, and by L-DOG in 27, with an average of 10.8 and 13.8 percentage points respectively.</p><p>Theoretical comparison to Algorithm 1 of <ref type="bibr">Defazio &amp; Mishchenko (2023)</ref>. <ref type="bibr">Defazio &amp; Mishchenko (2023)</ref> carry out their main theoretical analysis on a "Parameter Free Dual Averaging" (PFDA) method. We now provide some additional remarks comparing PFDA and DOG. The iterate x t in PFDA is</p><p>where G t = P i&#63743;t kg i k 2 and q i is a lower bound on the distance to optimality (denoted d i in <ref type="bibr">(Defazio &amp; Mishchenko, 2023)</ref>). In contrast, the DOG iterates are</p><p>where rt = max i&#63743;t kx i x 0 k. While both d t in PFDA and rt are lower bounds for (a constant factor times) the distance to optimality, only DoG aims to approximate &#8984; ? = kx0 x?k p Gt ; PFDA instead approximates the optimal step size for dual averaging.</p><p>The dual averaging prescription of putting the factor 1/ p G t outside the summation defining x t likely hurts performance in practice. The practical practical D-adapt SGD and D-adapt Adam methods that <ref type="bibr">Defazio &amp; Mishchenko (2023)</ref> propose do not follow this prescription. Consequently, these algorithms are very different from PFDA and have no theoretical guarantees.  Figure <ref type="figure">6</ref>. Stabilizing behavior of DOG on &#8984;t as a function of &#8984;0 (x-axis) and t (color). In most cases &#8984;t quickly stabilizes around a value close to the optimal SGD base learning rate (dashed horizontal line) for all sufficiently small &#8984;0 = r&#9999;/kg0k. The main exceptions (where &#8984;t depends strongly on &#8984;0) are dSprites-Ori, CIFAR-100 and SVHN when trained with ResNet50; see F.4 for further discussion.</p><p>DOG is SGD's Best Friend     Table <ref type="table">6</ref>. Average (std) performance of RoBERTa-b and T5-b on language tasks, when fine-tuned with different optimization algorithms. DOG uses r&#9999; = 10 6 (1 + kx0k) and L-DOG uses r&#9999; = 10 8 (1 + kx0k). SPS uses c = 0.2, &#8999; = 2 as recommended by <ref type="bibr">Loizou et al. (2021)</ref>, but initial step size of 0.01 as the recommended value 1.0 diverged for some tasks. Still, When tunning RoBERTa-b on RTE, 3 out of 5 diverged; for this case we report the mean of the two successful and omit the standard deviation. We measure performance as detailed in </p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>Tel Aviv University</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1"><p>University of Pittsburgh. Correspondence to: Maor Ivgi &lt;maor.ivgi@cs.tau.ac.il&gt;.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_2"><p><ref type="bibr">Carmon &amp; Hinder (2022)</ref> guarantee boundedness of the point they output, but do not have guarantees on intermediate query points.Orabona &amp; P&#225;l (2021, Lemma  </p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_3"><p>25)  show that the algorithm iterates are bounded but not to within a constant factor of the initial distance to optimality.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_4"><p>This results holds in the non-stochastic case<ref type="bibr">(Carmon &amp; Hinder, 2022</ref>, Proposition 1), but a qualitatively similar results holds with high probability in the stochastic case as well(Carmon &amp;  Hinder, 2022, Proposition  </p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_5"><p>3).</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_6"><p>More precisely, our implementation treats each element in the PyTorch .parameters() list as a separate layer.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_7"><p>We apply the weight averaging with a fixed parameter ( = 8, following<ref type="bibr">(Levy et al., 2020</ref>)); we did not try any other parameter in our experiments.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="5" xml:id="foot_8"><p>Throughout the paper we often use the shorthand names RoBERTa-b and T5-b, respectively.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="6" xml:id="foot_9"><p>We consider the error to be 1 minus the respective performance metric, as detailed in Table2.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="7" xml:id="foot_10"><p>When aggregating results over tasks, we always report the RED statistics across tasks, where for each task we average the RED values over seeds. See Appendix E.5 for details.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="8" xml:id="foot_11"><p>We thank an anonymous reviewer for pointing this out.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="9" xml:id="foot_12"><p>There exist parameter-free methods specialized to least-squares problems that obtain better without requiring an a-priori bound on the solution norm<ref type="bibr">(Vovk, 2006)</ref>.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="10" xml:id="foot_13"><p><ref type="bibr">Carmon &amp; Hinder (2022)</ref> guarantee boundedness of the point they output, but do not have guarantees on the magnitude of intermediate query points.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="11" xml:id="foot_14"><p>Since these results are just a re-analysis of our original experiments, for language experiments we take all the warmup iterates plus the first 20% of the remaining iterates, overall using 28% of the budget.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="12" xml:id="foot_15"><p>https://github.com/IssamLaradji/sps</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="13" xml:id="foot_16"><p>https://github.com/facebookresearch/dadaptation</p></note>
		</body>
		</text>
</TEI>
