<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Adaptive Optimization on Nam Le</title><link>https://blog.namln.org/en/categories/adaptive-optimization/</link><description>Recent content in Adaptive Optimization on Nam Le</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 15 Jul 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.namln.org/en/categories/adaptive-optimization/index.xml" rel="self" type="application/rss+xml"/><item><title>Pre-print articles on Adagrad-variant methods</title><link>https://blog.namln.org/en/mathematics/analysis/optimization/adagrad-variant/</link><pubDate>Mon, 15 Jul 2024 00:00:00 +0000</pubDate><guid>https://blog.namln.org/en/mathematics/analysis/optimization/adagrad-variant/</guid><description>&lt;h2 class="heading" id="1-heavy-tailed-class-imbalance-and-why-adam-outperforms-gradient-descent-on-language-models"&gt;
 1. Heavy-Tailed Class Imbalance and Why Adam Outperforms Gradient Descent on Language Models&lt;span class="heading__anchor"&gt; &lt;a href="#1-heavy-tailed-class-imbalance-and-why-adam-outperforms-gradient-descent-on-language-models"&gt;#&lt;/a&gt;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Frederik Kunstner, Robin Yadav, Alan Milligan, Mark Schmidt, Alberto Bietti&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abstract:&lt;/strong&gt; Adam has been shown to outperform gradient descent on large language models by a larger margin than on other tasks, but it is unclear why. We show that a key factor in this performance gap is the heavy-tailed class imbalance found in language tasks. When trained with gradient descent, the loss of infrequent words decreases more slowly than the loss of frequent ones. This leads to a slow decrease on the average loss as most samples come from infrequent words. On the other hand, Adam and sign-based methods are less sensitive to this problem. To establish that this behavior is caused by class imbalance, we show empirically that it can be reproduced across architectures and data types, on language transformers, vision CNNs, and linear models. On a linear model with cross-entropy loss, we show that class imbalance leads to imbalanced, correlated gradients and Hessians that have been hypothesized to benefit Adam. We also prove that, in continuous time, gradient descent converges slowly on low-frequency classes while sign descent does not.&lt;/p&gt;
&lt;h2 class="heading" id="2-accelerated-parameter-free-stochastic-optimization"&gt;
 2. Accelerated Parameter-Free Stochastic Optimization&lt;span class="heading__anchor"&gt; &lt;a href="#2-accelerated-parameter-free-stochastic-optimization"&gt;#&lt;/a&gt;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Itai Kreisler, Maor Ivgi, Oliver Hinder, Yair Carmon&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abstract:&lt;/strong&gt; We propose a method that achieves near-optimal rates for smooth stochastic convex optimization and requires essentially no prior knowledge of problem parameters. This improves on prior work which requires knowing at least the initial distance to optimality d0. Our method, U-DoG, combines UniXGrad (Kavis et al., 2019) and DoG (Ivgi et al., 2023) with novel iterate stabilization techniques. It requires only loose bounds on d0 and the noise magnitude, provides high probability guarantees under sub-Gaussian noise, and is also near-optimal in the non-smooth case. Our experiments show consistent, strong performance on convex problems and mixed results on neural network training.&lt;/p&gt;
&lt;h2 class="heading" id="3-universal-gradient-methods-for-stochastic-convex-optimization"&gt;
 3. Universal Gradient Methods for Stochastic Convex Optimization&lt;span class="heading__anchor"&gt; &lt;a href="#3-universal-gradient-methods-for-stochastic-convex-optimization"&gt;#&lt;/a&gt;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Anton Rodomanov, Ali Kavis, Yongtao Wu, Kimon Antonakopoulos, Volkan Cevher&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abstract:&lt;/strong&gt; We develop universal gradient methods for Stochastic Convex Optimization (SCO). Our algorithms automatically adapt not only to the oracle&amp;rsquo;s noise but also to the Hölder smoothness of the objective function without a priori knowledge of the particular setting. The key ingredient is a novel strategy for adjusting step-size coefficients in the Stochastic Gradient Method (SGD). Unlike AdaGrad, which accumulates gradient norms, our Universal Gradient Method accumulates appropriate combinations of gradient- and iterate differences. The resulting algorithm has state-of-the-art worst-case convergence rate guarantees for the entire Hölder class including, in particular, both nonsmooth functions and those with Lipschitz continuous gradient. We also present the Universal Fast Gradient Method for SCO enjoying optimal efficiency estimates.&lt;/p&gt;</description></item><item><title>Pre-print articles on Adaptive Optimization</title><link>https://blog.namln.org/en/mathematics/analysis/optimization/adaptive-optimization/</link><pubDate>Mon, 15 Jul 2024 00:00:00 +0000</pubDate><guid>https://blog.namln.org/en/mathematics/analysis/optimization/adaptive-optimization/</guid><description>&lt;h2 class="heading" id="1-a-simple-uniformly-optimal-method-without-line-search-for-convex-optimization"&gt;
 1. &lt;a href="https://arxiv.org/pdf/2310.10082"&gt;A simple uniformly optimal method without line search for convex optimization&lt;/a&gt;&lt;span class="heading__anchor"&gt; &lt;a href="#1-a-simple-uniformly-optimal-method-without-line-search-for-convex-optimization"&gt;#&lt;/a&gt;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Tianjiao Li, Guanghui Lan&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abstract:&lt;/strong&gt; Line search (or backtracking) procedures have been widely employed into first-order methods for solving convex optimization problems, especially those with unknown problem parameters (e.g., Lipschitz constant). In this paper, we show that line search is superfluous in attaining the optimal rate of convergence for solving a convex optimization problem whose parameters are not given a priori. In particular, we present a novel accelerated gradient descent type algorithm called auto-conditioned fast gradient method (AC-FGM) that can achieve an optimal $\mathcal{O}(1/k^2)$ rate of convergence for smooth convex optimization without requiring the estimate of a global Lipschitz constant or the employment of line search procedures. We then extend AC-FGM to solve convex optimization problems with Hölder continuous gradients and show that it automatically achieves the optimal rates of convergence uniformly for all problem classes with the desired accuracy of the solution as the only input. Finally, we report some encouraging numerical results that demonstrate the advantages of AC-FGM over the previously developed parameter-free methods for convex optimization.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Source code&lt;/strong&gt;: &lt;a href="https://github.com/tli432/AC-FGM-Implementation"&gt;https://github.com/tli432/AC-FGM-Implementation&lt;/a&gt;&lt;/p&gt;
&lt;h2 class="heading" id="2-adaptive-proximal-gradient-method-for-convex-optimization"&gt;
 2. &lt;a href="https://arxiv.org/pdf/2308.02261"&gt;Adaptive Proximal Gradient Method for Convex Optimization&lt;/a&gt;&lt;span class="heading__anchor"&gt; &lt;a href="#2-adaptive-proximal-gradient-method-for-convex-optimization"&gt;#&lt;/a&gt;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Yura Malitsky, Konstantin Mishchenko&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abstract:&lt;/strong&gt; In this paper, we explore two fundamental first-order algorithms in convex optimization, namely, gradient descent (GD) and proximal gradient method (ProxGD). Our focus is on making these algorithms entirely adaptive by leveraging local curvature information of smooth functions. We propose adaptive versions of GD and ProxGD that are based on observed gradient differences and, thus, have no added computational costs. Moreover, we prove convergence of our methods assuming only local Lipschitzness of the gradient. In addition, the proposed versions allow for even larger stepsizes than those initially suggested in [MM20].&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Source code&lt;/strong&gt;: &lt;a href="https://github.com/ymalitsky/AdProxGD"&gt;https://github.com/ymalitsky/AdProxGD&lt;/a&gt;&lt;/p&gt;
&lt;h2 class="heading" id="3-an-adaptive-stochastic-gradient-method-with-non-negative-gauss-newton-stepsizes"&gt;
 3. &lt;a href="https://arxiv.org/pdf/2407.04358"&gt;An Adaptive Stochastic Gradient Method with Non-negative Gauss-Newton Stepsizes&lt;/a&gt;&lt;span class="heading__anchor"&gt; &lt;a href="#3-an-adaptive-stochastic-gradient-method-with-non-negative-gauss-newton-stepsizes"&gt;#&lt;/a&gt;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Antonio Orvieto, Lin Xiao&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abstract:&lt;/strong&gt; We consider the problem of minimizing the average of a large number of smooth but possibly non-convex functions. In the context of most machine learning applications, each loss function is non-negative and thus can be expressed as the composition of a square and its real-valued square root. This reformulation allows us to apply the Gauss-Newton method, or the Levenberg-Marquardt method when adding a quadratic regularization. The resulting algorithm, while being computationally as efficient as the vanilla stochastic gradient method, is highly adaptive and can automatically warmup and decay the effective stepsize while tracking the non-negative loss landscape. We provide a tight convergence analysis, leveraging new techniques, in the stochastic convex and non-convex settings. In particular, in the convex case, the method does not require access to the gradient Lipshitz constant for convergence, and is guaranteed to never diverge. The convergence rates and empirical evaluations compare favorably to the classical (stochastic) gradient method as well as to several other adaptive methods.&lt;/p&gt;
&lt;h2 class="heading" id="4-stochastic-polyak-step-sizes-and-momentum-convergence-guarantees-and-practical-performance"&gt;
 4. Stochastic Polyak Step-sizes and Momentum: Convergence Guarantees and Practical Performance&lt;span class="heading__anchor"&gt; &lt;a href="#4-stochastic-polyak-step-sizes-and-momentum-convergence-guarantees-and-practical-performance"&gt;#&lt;/a&gt;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Antonio Orvieto, Lin Xiao&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abstract:&lt;/strong&gt; Stochastic gradient descent with momentum, also known as Stochastic Heavy Ball method (SHB), is one of the most popular algorithms for solving large-scale stochastic optimization problems in various machine learning tasks. In practical scenarios, tuning the step-size and momentum parameters of the method is a prohibitively expensive and time-consuming process. In this work, inspired by the recent advantages of stochastic Polyak step-size in the performance of stochastic gradient descent (SGD), we propose and explore new Polyak-type variants suitable for the update rule of the SHB method. In particular, using the Iterate Moving Average (IMA) viewpoint of SHB, we propose and analyze three novel step-size selections: $\text{MomSPS} _{\max}$, $\text{MomDecSPS}$, and $\text{MomAdaSPS}$. For $\text{MomSPS} _{\max}$, we provide convergence guarantees for SHB to a neighborhood of the solution for convex and smooth problems (without assuming interpolation). If interpolation is also satisfied, then using $\text{MomSPS} _{\max}$, SHB converges to the true solution at a fast rate matching the deterministic HB. The other two variants, MomDecSPS and MomAdaSPS, are the first adaptive step-size for SHB that guarantee convergence to the exact minimizer - without a priori knowledge of the problem parameters and without assuming interpolation. Our convergence analysis of SHB is tight and obtains the convergence guarantees of stochastic Polyak step-size for SGD as a special case. We supplement our analysis with experiments validating our theory and demonstrating the effectiveness and robustness of our algorithms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where&lt;/strong&gt;: 13th International Conference on Learning Representations (ICLR 2025)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Source code&lt;/strong&gt;: &lt;a href="https://openreview.net/forum?id=nuX2yPejiL"&gt;https://openreview.net/forum?id=nuX2yPejiL&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Pre-print articles on gradient-clipping methods</title><link>https://blog.namln.org/en/mathematics/analysis/optimization/gradient-clipping/</link><pubDate>Mon, 15 Jul 2024 00:00:00 +0000</pubDate><guid>https://blog.namln.org/en/mathematics/analysis/optimization/gradient-clipping/</guid><description>&lt;h2 class="heading" id="1-why-gradient-clipping-accelerates-training-a-theoretical-justification-for-adaptivity"&gt;
 1. &lt;a href="https://arxiv.org/pdf/1905.11881"&gt;Why gradient clipping accelerates training: A theoretical justification for adaptivity&lt;/a&gt;&lt;span class="heading__anchor"&gt; &lt;a href="#1-why-gradient-clipping-accelerates-training-a-theoretical-justification-for-adaptivity"&gt;#&lt;/a&gt;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Jingzhao Zhang, Tianxing He, Suvrit Sra, Ali Jadbabaie&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abstract:&lt;/strong&gt; We provide a theoretical explanation for the effectiveness of gradient clipping in training deep neural networks. The key ingredient is a new smoothness condition derived from practical neural network training examples. We observe that gradient smoothness, a concept central to the analysis of first-order optimization algorithms that is often assumed to be a constant, demonstrates significant variability along the training trajectory of deep neural networks. Further, this smoothness positively correlates with the gradient norm, and contrary to standard assumptions in the literature, it can grow with the norm of the gradient. These empirical observations limit the applicability of existing theoretical analyses of algorithms that rely on a fixed bound on smoothness. These observations motivate us to introduce a novel relaxation of gradient smoothness that is weaker than the commonly used Lipschitz smoothness assumption. Under the new condition, we prove that two popular methods, namely, \emph{gradient clipping} and \emph{normalized gradient}, converge arbitrarily faster than gradient descent with fixed stepsize. We further explain why such adaptively scaled gradient methods can accelerate empirical convergence and verify our results empirically in popular neural network training settings.&lt;/p&gt;
&lt;h2 class="heading" id="2-revisiting-gradient-clipping-stochastic-bias-and-tight-convergence-guarantees"&gt;
 2. &lt;a href="https://arxiv.org/pdf/2305.01588"&gt;Revisiting Gradient Clipping: Stochastic bias and tight convergence guarantees&lt;/a&gt;&lt;span class="heading__anchor"&gt; &lt;a href="#2-revisiting-gradient-clipping-stochastic-bias-and-tight-convergence-guarantees"&gt;#&lt;/a&gt;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Anastasia Koloskova, Hadrien Hendrikx, Sebastian U. Stich&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abstract:&lt;/strong&gt; Gradient clipping is a popular modification to standard (stochastic) gradient descent, at every iteration limiting the gradient norm to a certain value $c &amp;gt;0$. It is widely used for example for stabilizing the training of deep learning models (Goodfellow et al., 2016), or for enforcing differential privacy (Abadi et al., 2016). Despite popularity and simplicity of the clipping mechanism, its convergence guarantees often require specific values of c and strong noise assumptions.&lt;/p&gt;
&lt;p&gt;In this paper, we give convergence guarantees that show precise dependence on arbitrary clipping thresholds c and show that our guarantees are tight with both deterministic and stochastic gradients. In particular, we show that (i) for deterministic gradient descent, the clipping threshold only affects the higher-order terms of convergence, (ii) in the stochastic setting convergence to the true optimum cannot be guaranteed under the standard noise assumption, even under arbitrary small step-sizes. We give matching upper and lower bounds for convergence of the gradient norm when running clipped SGD, and illustrate these results with experiments.&lt;/p&gt;
&lt;h2 class="heading" id="3-clipping-improves-adam-norm-and-adagrad-norm-when-the-noise-is-heavy-tailed"&gt;
 3. &lt;a href="https://arxiv.org/pdf/2406.04443"&gt;Clipping Improves Adam-Norm and AdaGrad-Norm when the Noise Is Heavy-Tailed&lt;/a&gt;&lt;span class="heading__anchor"&gt; &lt;a href="#3-clipping-improves-adam-norm-and-adagrad-norm-when-the-noise-is-heavy-tailed"&gt;#&lt;/a&gt;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Savelii Chezhegov, Yaroslav Klyukin, Andrei Semenov, Aleksandr Beznosikov, Alexander Gasnikov, Samuel Horváth, Martin Takáč, Eduard Gorbunov&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abstract:&lt;/strong&gt; Methods with adaptive stepsizes, such as AdaGrad and Adam, are essential for training modern Deep Learning models, especially Large Language Models. Typically, the noise in the stochastic gradients is heavy-tailed for the later ones. Gradient clipping provably helps to achieve good high-probability convergence for such noises. However, despite the similarity between AdaGrad/Adam and Clip-SGD, the current understanding of the high-probability convergence of AdaGrad/Adam-type methods is limited in this case. In this work, we prove that AdaGrad/Adam (and their delayed version) can have provably bad high-probability convergence if the noise is heavy-tailed. We also show that gradient clipping fixes this issue, i.e., we derive new high-probability convergence bounds with polylogarithmic dependence on the confidence level for AdaGrad-Norm and Adam-Norm with clipping and with/without delay for smooth convex/non-convex stochastic optimization with heavy-tailed noise. Our empirical evaluations highlight the superiority of clipped versions of AdaGrad/Adam-Norm in handling the heavy-tailed noise.&lt;/p&gt;</description></item></channel></rss>