Efficient Preconditioned Optimization Methods
with Frequent Directions
Abstract
Adaptive optimization methods have received considerable attention in recent years due to their strong empirical performance. However, they generally require maintaining a preconditioning matrix, which incurs prohibitive computational overhead in large-scale applications. To address these limitations, we investigate the acceleration of preconditioned optimization methods through frequent directions (FD), a widely used matrix sketching technique. We first propose FTSL by integrating FD with adaptive subgradient methods under the primal-dual framework and adding back the cumulative information discarded by FD. FTSL obtains a tighter regret bound than existing state-of-the-art results. We then apply a doubling trick that further reduces the time complexity of FTSL, while maintaining the same regret guarantee. We also consider optimization over matrix-valued decision variables and exploit their structural properties to construct sketched preconditioners. We develop FTSL-Shampoo by adapting FD to Shampoo and give a novel analysis under the primal-dual framework. To further mitigate its computational complexity, we design one-sided variants of FTSL-Shampoo under both mirror descent and primal-dual frameworks. Our algorithms not only reduce the computational cost of FTSL-Shampoo, but also achieve tighter regret bounds. We extend our methods to offline stochastic convex optimization and exploit smoothness to achieve faster convergence rates. Finally, we introduce practical variants of our algorithms and empirically demonstrate their efficiency and effectiveness across a broad range of tasks.
keywords
Adaptive optimization methods, adaptive subgradient methods, Shampoo, matrix sketching, frequent directions, efficient algorithms.1 Introduction
Adaptive optimization methods have been extensively studied over the past decade, owing to their ability to reduce the need for laborious learning-rate tuning while retaining theoretical guarantees comparable to those of carefully tuned algorithms (McMahan and Streeter, 2010; Duchi et al., 2010b; Gupta et al., 2017; Kingma and Ba, 2015; Agarwal et al., 2019). The pioneering work of Duchi et al. (2011) introduces adaptive subgradient methods with full matrices (ADA-FULL) within both the mirror descent framework (Duchi et al., 2010a) and the primal-dual framework (Xiao, 2009). However, ADA-FULL requires maintaining a preconditioning matrix of shape , resulting in space complexity and time complexity per round, where is the dimensionality. Consequently, ADA-FULL is impractical for large-scale machine learning tasks involving high-dimensional data.
Meanwhile, in many modern machine learning applications, especially in deep learning tasks, the optimization variables are naturally matrix-valued (LeCun et al., 2015), i.e., . Directly applying ADA-FULL requires vectorizing the parameter matrix, which overlooks the matrix structure and still incurs excessive space and time complexities. This limitation has motivated a growing body of work on structured preconditioners that exploit the geometry of matrix-valued variables (Gupta et al., 2018; Anil et al., 2020; Vyas et al., 2025; Xie et al., 2025; An et al., 2025). As a representative example, Shampoo (Gupta et al., 2018) constructs a Kronecker-factored preconditioner along each axis of the gradient matrix, which lowers the memory and computational cost of ADA-FULL. Nevertheless, its regret guarantee depends on the rank of the gradients. In addition, maintaining a separate preconditioner for each axis can still incur considerable overhead. Thus, a natural question arises: can we develop efficient preconditioned optimization methods while retaining the performance of full-matrix methods?
In this paper, we provide an affirmative answer to this question by systematically investigating computationally efficient preconditioned optimization methods via frequent directions (FD) (Ghashami et al., 2016a). Let denote the sum of gradient outer products over rounds, denote the sketching size, and denote the eigenvalue discarded by FD in round . Although several studies have developed efficient variants of ADA-FULL with FD (Wan et al., 2018; Wan and Zhang, 2022; Feinberg et al., 2023), the state-of-the-art algorithm, S-ADA (Feinberg et al., 2023), still suffers from two drawbacks: (i) its regret bound of grows linearly with ; (ii) its time complexity depends quadratically on the sketching size . To overcome these drawbacks, we first develop an algorithm termed Follow-the-Sketchy-Leader (FTSL). The key idea is to integrate FD with ADA-FULL under the primal-dual framework and add the cumulative discarded eigenvalues back into the preconditioner. FTSL attains a dimension-free regret bound of . We further propose an accelerated variant named FTFSL, which doubles the sketching size to lower the frequency of expensive SVD computations. FTFSL retains the same regret bound and the space complexity of FTSL, while reducing the per-round time complexity to when . This acceleration technique can also be applied to S-ADA, though its regret bound remains inferior to that of FTFSL. We summarize our results in Table 1 and Table 2.
| Algorithms | Regret Bounds | Space | Time |
| ADA-FULL (Duchi et al., 2011) | |||
| ADA-FD (P) (Wan et al., 2018) | |||
| ADA-FD (M) (Wan et al., 2018) | |||
| S-ADA (M) (Feinberg et al., 2023) | |||
| FTSL (P) (this work) |
| Algorithms | Regret Bounds | Space | Time |
| ADA-FFD (P) (Wan and Zhang, 2022) | |||
| ADA-FFD (M) (Wan and Zhang, 2022) | |||
| Fast S-ADA (M) (this work) | |||
| FTFSL (P) (this work) |
| Algorithms | Regret Bounds | Space | Time |
| Shampoo (Gupta et al., 2018) | |||
| S-Shampoo (M) (Feinberg et al., 2023) | |||
| FTSL-Shampoo (P) (this work) | |||
| ASGO (An et al., 2025) | |||
| S-ASGO (M) (this work) | |||
| S-ASGO (P) (this work) |
Second, we consider optimization over matrix-valued decision variables, a scenario commonly encountered in deep learning tasks. Let be the gradient at round , be the upper bound on the rank of , and be its left and right covariance matrices. Feinberg et al. (2023) applies FD to Shampoo and reduces its space complexity to . Nevertheless, its regret bound of again depends on the dimensions and , where and denote the cumulative eigenvalues discarded by FD when sketching and , respectively. To eliminate this dimension dependence, we develop FTSL-Shampoo by combining FD with a primal-dual variant of Shampoo and provide a novel analysis. FTSL-Shampoo attains a dimension-free regret bound of , while preserving the same space complexity. Despite this improvement, FTSL-Shampoo still maintains a separate preconditioner for each axis. Consequently, when extended to higher order parameters, its memory and computational overhead grows with the number of axes.
To handle the aforementioned limitations, we incorporate FD into ASGO (Xie et al., 2025; An et al., 2025) and propose Sketchy ASGO (S-ASGO). Instead of keeping the preconditioner for each axis, S-ASGO maintains a low-rank approximation of the preconditioner only along the smaller dimension, which reduces the space complexity of FTSL-Shampoo from to . We provide a novel analysis of S-ASGO under both the mirror descent and the primal-dual frameworks and establish the regret bounds and , respectively. Both bounds are independent of the rank , and their leading term is no larger than that of FTSL-Shampoo, which indicates that a single preconditioner already suffices to capture the dominant curvature information. Furthermore, we extend all of the above methods to the offline stochastic convex optimization setting. We provide convergence rates for both non-smooth and smooth objectives, and exploit the smoothness of the objective to attain a faster rate. A detailed comparison with prior methods (Gupta et al., 2018; Feinberg et al., 2023; An et al., 2025) is given in Table 3. To reduce the runtime overhead of SVD in practice, we adopt a more efficient singular-value computation procedure (Gong et al., 2026) and develop a practical variant of S-ASGO for large-scale model training. Extensive experiments demonstrate that our methods attain performance comparable to that of existing approaches while consistently reducing computational cost.
A preliminary version of this paper was presented at the 42nd International Conference on Machine Learning (ICML 2025) (Yang et al., 2025). The conference version focused on the online setting and primarily built on ADA-FULL, developing FTSL, FTFSL and Fast S-ADA for vector-valued decisions, together with FTSL-Shampoo for matrix-valued decisions. In this paper, we significantly expand the conference version in terms of algorithm design, theoretical analysis, and empirical studies. The main extensions are summarized as follows.
- 1.
- 2.
We extend all of our methods to the offline stochastic convex optimization setting and establish convergence rates for both non-smooth and smooth objectives (Theorems 4, 5, 9, and 10). The dimension-free advantage of our online analysis carries over to the offline setting, and our methods attain faster rates on smooth objectives.
- 3.
We develop a practical variant of S-ASGO tailored to large-scale model pretraining (Algorithm 8). This variant substantially improves the efficiency of S-ASGO while preserving its empirical effectiveness.
- 4.
We conduct extensive experiments to validate the effectiveness and efficiency of our methods, in particular on large language model pretraining tasks.
Organization.
The remainder of the paper is structured as follows. Section 2 briefly reviews related work. Section 3 presents the preliminaries, including the notation, assumptions, as well as the technical tools that underpin our analysis. Section 4 illustrates our main results, together with their extension to offline stochastic optimization. Section 5 establishes our results for optimization with matrix structure. Section 6 provides the analysis of all theorems. Section 7 empirically validates the efficiency of our algorithms through experiments on a variety of tasks. Section 8 concludes the paper and discusses future work.
2 Related Work
In this section, we briefly review the related work on adaptive subgradient methods, their efficient variants based on matrix sketching, and optimization with matrix structure.
2.1 Online Convex Optimization and Adaptive Subgradient Methods
Online convex optimization (OCO) is a powerful paradigm for solving sequential decision-making problems (Hazan, 2016; Orabona, 2019; Zhang et al., 2018; Zhang et al., 2022). Specifically, it is typically formulated as an iterative game between a player and an adversary. In each round , the player begins by selecting a decision . After that, the adversary chooses a convex loss function , and the player incurs a loss . The goal of the player is to minimize the cumulative loss over rounds, which is equivalent to minimizing the regret (Zinkevich, 2003)
| (1) |
defined as the excess loss suffered by the player compared to the loss of the fixed optimal choice . Although Zinkevich (2003) establishes the optimal regret bound of for convex loss functions, it is data-independent. In the following, we will introduce ADAGRAD (Duchi et al., 2010b; Duchi et al., 2011), a widely-used adaptive subgradient method, in both the primal-dual subgradient framework (Xiao, 2009) and the mirror descent framework (Duchi et al., 2010a), which achieves a data-dependent regret bound.
ADAGRAD can be categorized into two forms based on how the preconditioner is computed: ADAGRAD with full matrices (ADA-FULL) and ADAGRAD with diagonal matrices (ADA-DIAG). Let be a particular vector in the subdifferential set . Since we do not require the loss function to be smooth, we will not explicitly distinguish subgradients and gradients in the subsequent discussion. ADA-FULL first calculates the outer product matrix of the past gradients , and further defines a symmetric matrix , where is a hyper-parameter introduced to ensure the invertibility of . According to the primal-dual framework, the update rule is given by
where is the learning rate, is the sum of the received gradients and is the proximal term. The mirror descent version updates the decision as follows
where is the Bregman divergence associated with . ADA-FULL achieves an regret bound within both frameworks. However, ADA-FULL stores the past gradient outer products, i.e., , and computes , resulting in and space and time complexities, respectively. The high computational cost of ADA-FULL prohibits its out-of-the-box use in typical machine learning problems, such as training neural networks (Sagun et al., 2017; Ghorbani et al., 2019; Sankar et al., 2021).
Different from ADA-FULL, ADA-DIAG only utilizes the diagonal elements of the gradient outer product matrix, i.e., redefining , which thus is computationally more efficient. However, since the preconditioning matrix of ADA-DIAG only contains limited information, the regret bound of ADA-DIAG is worse than that of ADA-FULL when high-dimensional data is dense and has a low-rank structure.
2.2 Adaptive Subgradient Methods with Matrix Sketching
To alleviate the computational burden of ADA-FULL, several works have employed the sketching techniques to reduce its space and time complexities (Krummenacher et al., 2016; Wan and Zhang, 2018; Wan et al., 2018; Wan and Zhang, 2022; Feinberg et al., 2023). Krummenacher et al. (2016) propose ADA-LR to enhance the computational efficiency of ADA-FULL by using random projection (Indyk and Motwani, 1998; Achlioptas, 2003). While ADA-LR reduces the time complexity to , its space complexity remains at , where is the sketching size. To further improve the efficiency, they develop RADAGRAD, which incorporates a more randomized approximation, achieving space and time complexities of and , respectively. However, RADAGRAD is not supported by rigorous theoretical analysis. Later, Wan and Zhang (2018) develop ADA-DP based on random projection, which achieves space and time complexities of and , while providing theoretical guarantees.
Another class of sketching-based adaptive subgradient methods adopts frequent directions (FD) (Ghashami et al., 2016a), a stable matrix sketching technique. Wan et al. (2018) first apply FD with ADA-FULL under both the primal-dual subgradient framework and the mirror descent framework by maintaining a matrix , such that . Their approach, ADA-FD, obtains space and time complexities of and , respectively. ADA-FD achieves regret bounds of and under the primal-dual subgradient framework and the mirror descent framework, where is the removed eigenvalue of FD in round . Furthermore, Wan and Zhang (2022) introduce a fast variant of ADA-FD, named ADA-FFD, by doubling the sketching size. ADA-FFD improves the time complexity to while keeping the same regret bounds. Although ADA-FD and ADA-FFD enjoy better space and time complexities, as mentioned by Feinberg et al. (2023), their regret bounds are in some cases. For this reason, Feinberg et al. (2023) propose S-ADA by adding back the discarded information of FD to the FD-based preconditioner instead of utilizing a fixed diagonal regularization. While S-ADA enjoys an regret bound, it suffers from a linear dependence on the dimensionality . Moreover, it only achieves an unsatisfactory time complexity of .
Additionally, FD has been utilized to accelerate the online Newton step (ONS) algorithm (Hazan et al., 2007) for exponentially concave functions, and the LinUCB algorithm (Chu et al., 2011) in the linear contextual bandit setting, both of which also need to maintain a covariance matrix. Luo et al. (2016) first apply FD in ONS to construct a low-rank approximation of the matrix. To reduce the approximation error of FD, Luo et al. (2019) develop a new sketching scheme called robust frequent directions (RFD), which is the first method that compensates the discarded singular values back into the second-order matrix. They utilize RFD to propose a hyperparameter-free variant of ONS, which is more robust than FD-SON. In the linear contextual bandit setting, Chen et al. (2020) design spectral compensation frequent directions (SCFD) to approximate the covariance matrices, which adds up the total mass of subtracted values during the FD procedure. SCFD can approximate a sequence of incremental covariance matrices while keeping the positive definite monotonicity.
2.3 Adaptive Preconditioned Optimization with Matrix Structure
Optimization over matrix-valued decision variables has emerged as a central topic in modern machine learning, owing to the ubiquity of matrix-structured parameters in deep neural networks (LeCun et al., 2015). Shampoo (Gupta et al., 2018) is an adaptive optimization method that first takes the structure of the parameter space into consideration and thus is more efficient than ADA-FULL in scenarios where the decision is a matrix. Shampoo has attracted significant attention due to its Kronecker-factored preconditioning strategy. Specifically, Shampoo maintains a set of preconditioning matrices, each of which operates on one dimension, while aggregating information across the remaining dimensions. For example, for a parameter matrix and its gradient , ADA-FULL treats the matrix-shaped gradient as a vector of size and its preconditioner has size , which leads to and space and time complexities, respectively. In contrast, Shampoo constructs two smaller matrices, and , to precondition the rows and columns of , respectively, which only requires an memory cost and an computational complexity. Since the parameters in deep learning tasks often have matrix structures, Shampoo has strong empirical performance and has received much attention (Anil et al., 2020; Liu et al., 2024; Eschenhagen et al., 2024).
In recent years, a growing body of work has sought to improve Shampoo from complementary perspectives. CASPR (Duvvuri et al., 2024) designs a new preconditioning matrix to improve the regret bound of Shampoo. Vyas et al. (2025) introduce SOAP, which performs Adam (Kingma and Ba, 2015) in the eigenspace of the gradient, achieving better performance than Adam and Shampoo. Another line of research focuses on reducing optimizer-state memory through low-rank gradient projection. GaLore (Zhao et al., 2024) projects gradients onto a low-rank subspace and maintains the preconditioner only within this reduced space to reduce the memory cost. However, as highlighted by He et al. (2025), GaLore provably fails to converge in the regime of large stochastic noise. To address this limitation, they propose GoLore, which replaces the SVD-based projection in GaLore with a random projection, thereby restoring convergence guarantees. From a different perspective, Muon (Jordan et al., 2024) formulates the update as steepest descent under the spectral norm and has been successfully applied to training large foundation models at scale. Building on low-rank gradient projection, Pan et al. (2025) reduce the memory requirements of Muon by applying layerwise low-rank projections (Pan et al., 2024). Nguyen et al. (2025) propose AdaDiag, which can be viewed as a simplified variant of SOAP that performs singular value decomposition without accumulating gradient covariance statistics.
However, the memory demands of Shampoo may still be prohibitive for large-scale neural networks. Anil et al. (2020) address the memory cost of Shampoo by introducing two variants. The first variant partitions the variable into several blocks but it depends on the specific ordering of neurons in the hidden layers. The second variant relies on one-sided covariance upper bounds, which cannot effectively handle vector parameters. Feinberg et al. (2023) first incorporate FD into Shampoo and reduce its memory to . Their method, named S-Shampoo, uses two low-rank matrices and to approximate the preconditioning matrices and , respectively. While S-Shampoo improves the space complexity of Shampoo, its regret bound relies on the dimensions , leading to the unsatisfactory performance when the dimensions are high. More recently, two concurrent works (Xie et al., 2025; An et al., 2025) independently developed ASGO (also referred to as One-Sided Shampoo), which maintains a preconditioner for only one axis of the gradient matrix. Despite this simpler structure, ASGO achieves improved regret bounds compared to Shampoo at a lower computational cost.
3 Preliminaries
We begin by introducing the notation, followed by the assumptions underlying our analysis and the sketching technique that serves as the algorithmic foundation of our methods.
Notation. We use to denote a vector and to represent a matrix. Without loss of generality, we assume . For simplicity, we use for the norm by default. For any vector and a positive semi-definite matrix , . We use to represent the -th element of a vector . For a matrix , is the inverse of if is full rank; otherwise, is taken to be the Moore-Penrose pseudoinverse. We denote by the spectral norm of a matrix , by the Frobenius norm of , and by the trace norm of . For two symmetric matrices , if and only if is positive semi-definite. For two matrices of the same size, we denote their Frobenius inner product by . We use to denote Kronecker product (Petersen and Pedersen, 2008) and to denote row-major order vectorization of matrix . We define the space complexity and time complexity as the memory and time usage in each round, respectively. is a sequence containing elements, and represents a new sequence, where each element is the maximum of and , and is a diagonal matrix where the -th diagonal element is , .
We adopt a standard assumption of online convex optimization (Hazan, 2016).
Assumption 1 (Convexity).
All loss functions are convex.
We then briefly introduce the key technique behind our methods.
Frequent Directions.
Frequent directions (FD) (Ghashami et al., 2016a) is a deterministic matrix sketching technique that extends the well-known algorithm for approximating item frequencies in online data streams (Misra and Gries, 1982). For a given matrix , FD aims to generate a matrix such that , where is the sketching size. The procedure is summarized in Algorithm 1. In each round , we denote the low-rank matrix , where the last column is . Upon receiving the new gradient , it is inserted into the last column. Next, we perform singular value decomposition (SVD) on , and the matrix is computed as with its last column set to . The time complexity of FD is for each iteration, which is dominated by computing the SVD of , causing a quadratic dependence on the sketching size .
To further reduce the time complexity of FD, Ghashami et al. (2016a) propose fast frequent directions (FFD) by expanding the space of . Specifically, FFD maintains a matrix . In each round , we insert the received gradient into the first all-zero column of . Once no longer contains any all-zero columns, we perform SVD and obtain . is then updated as , ensuring that the last columns are set to . As we only need to update every rounds, the time complexity of FFD is .
Since FD removes a singular value per round, the matrix does not preserve monotonicity. To resolve this limitation, Chen et al. (2020) propose spectral compensation frequent directions (SCFD), which adds up the total mass of subtracted values during the FD procedure. SCFD is able to approximate a sequence of high-dimensional matrices while preserving positive definite monotonicity.
4 Efficient Preconditioned Methods for Vector-Valued Decisions
In this section, we first present FTSL, which enjoys a better dimension-free regret bound. Furthermore, we accelerate FTSL by employing a doubling trick for FD, achieving enhanced computational efficiency. We demonstrate that this technique can be applied to expedite S-ADA. Finally, we apply our methods to offline stochastic optimization.
4.1 Our Improved Results
Before introducing our algorithms, we first briefly discuss why the regret bound of S-ADA (Feinberg et al., 2023) relies on the dimensionality , offering motivation for the methods we design. Since S-ADA is under the mirror descent framework, its regret bound contains the Bregman divergence term, that is,
where is the proximal term, is the preconditioning matrix and . To facilitate summation, they upper bound this term by and then exploit the additivity of the trace, which yields a bound of . Feinberg et al. (2023) add the cumulative removed eigenvalues of FD into . Consequently, the Bregman divergence term is , which is further bounded by , where is the sketching matrix and . As a result, the regret bound of S-ADA exhibits a linear dependence on , resulting in an unsatisfactory performance in high-dimensional problems.
To overcome this issue, we integrate FD with ADA-FULL under the primal-dual framework. Our method, which we call FTSL, is outlined in Algorithm 2. Specifically, we employ FD to construct a low-rank approximation of the outer product matrix of gradients, aiming to reduce the computational complexity. To ensure the monotonicity of the preconditioning matrix , we also add back the cumulative escaped masses into . Under the primal-dual framework, we update the decision as follows
| (2) | ||||
where is the sum of the past gradients. According to the analysis under the primal-dual framework, the regret of FTSL is upper bounded by the term , thereby avoiding the dependence on .
Formally, we present the theoretical guarantee of FTSL.
Theorem 1.
Under Assumption 1, by setting the learning rate , where is the upper bound on the norm of the optimal decision , FTSL ensures
where .
Remark 1.
In contrast to the previous regret bound of (Feinberg et al., 2023), the regret bound of FTSL is dimension-free, a benefit realized from the primal-dual framework.
Remark 2.
Since we only maintain a sketching matrix , the space complexity of FTSL is . Its time complexity is per round, which arises from the SVD of and the calculation of the matrix . While the time complexity of FTSL is linear with respect to the dimensionality , it still suffers from the quadratic dependence on the sketching size . To further alleviate its computational burden, we develop a fast variant of FTSL in the next section.
4.2 Our Accelerated Variant
The time complexity of FTSL exhibits a quadratic dependence on the sketching size , which arises from the SVD of performed in every round of FD. To reduce this cost, drawing inspiration from previous work (Chen et al., 2020; Wan and Zhang, 2022), we adopt a more efficient strategy for computing the SVD of . The resulting method, termed FTFSL, is summarized in Algorithm 3.
In the matrix-approximation literature, Ghashami et al. (2016a) develop fast FD to reduce the number of SVD computations in FD from one per round to one every rounds, while maintaining the same order of space complexity. FFD expands the sketching matrix from to . FTFSL adopts this approach but, instead of maintaining explicitly, represents it through two matrices and . Specifically, consists of orthonormal vectors () and the remaining columns are zero vectors, and is a symmetric matrix. We require that and satisfy the condition . In each round , after receiving the gradient , we first check whether this vector lies within the subspace spanned by . If the vector is not contained within the subspace, we normalize it and subsequently add it to , thereby enlarging the span of the subspace and ensuring (Steps 6-8). Then we have the following identity:
This implies that we only need to perform an SVD decomposition on the matrix , which only takes a time complexity of . Next, we incorporate the escaped masses to keep the monotonicity of the preconditioning matrix . When , we need to set and set the last columns of the sketching matrix to be zero (Steps 14-17). Given the decomposition and the relationship , this can be efficiently achieved by updating as , calculating , and setting the last columns of to zero.
In the following, we provide the theoretical guarantee of FTFSL.
Theorem 2.
Under Assumption 1, by setting the learning rate , where is the upper bound on the norm of the optimal decision , FTFSL ensures
Remark 3.
In each round, FTFSL computes , , , the SVD of and updates , with respective time complexities of , , , and . Additionally, we only compute every rounds, incurring a time complexity of . When , the time complexity of FTFSL is per round.
Notably, we can also reduce the time complexity of S-ADA (Feinberg et al., 2023) by adopting this technique. We replace the update rule for the decision variable of FTFSL (Step 13) with the following
and analyze it under the mirror descent framework.
Then we provide the theoretical guarantee of Fast S-ADA.
Theorem 3.
Under Assumption 1, by setting the learning rate , where , Fast S-ADA ensures
Remark 4.
Compared to S-ADA (Feinberg et al., 2023), Fast S-ADA obtains a better time complexity when , while preserving the same regret bound.
4.3 Application to Offline Optimization
In this section, we extend our methods to the offline stochastic convex optimization setting. Formally, we consider the problem
| (3) |
where is convex and only noisy gradient estimates are accessible. The random sample is drawn from a stochastic oracle satisfying .
We adopt the standard online-to-batch conversion (Cesa-Bianchi et al., 2004), as summarized in Algorithm 4. At each round , the learner receives the decision produced by the online algorithm , samples a mini-batch of size , and computes the stochastic gradient , which is fed back to as the gradient of round .
Non-smooth theory.
We first establish the convergence rates for non-smooth loss functions.
Theorem 4.
Under Assumption 1, by setting the learning rate and , where is the upper bound on the norm of the optimal decision , FTFSL ensures
Under Assumption 1, by setting the learning rate and , where , Fast S-ADA ensures
| (4) |
Remark 5.
Under the standard bounded-gradient assumption for all , both FTFSL and Fast S-ADA obtain the optimal convergence rate for convex non-smooth loss functions (Agarwal et al., 2012).
Smooth theory.
Many objectives in modern machine learning are smooth, in the sense that their gradients are Lipschitz continuous, as exemplified by logistic regression and networks with smooth activations. Previous work has shown that smoothness can be exploited to obtain faster convergence rates (Moulines and Bach, 2011; Cutkosky, 2019; Zhang et al., 2020; Faw et al., 2023; Wang et al., 2023; Liu et al., 2025b; Yu et al., 2025). Despite this progress, the analysis of memory-efficient full-matrix adaptive methods on smooth objectives remains absent. To fill this gap, we extend our analysis to the smooth setting. Following prior work on adaptive optimization methods (Liu et al., 2025b), we impose two standard assumptions.
Assumption 2 (Anisotropic smoothness).
There exists a positive diagonal matrix such that
when is twice differentiable, it is equivalent to , .
Remark 6.
Assumption 2 refines the standard smoothness condition by capturing the coordinate-wise curvature of . Specifically, it reduces to the classical -smoothness with (Nesterov, 2018), while allowing a much tighter characterization when the Hessian spectrum is imbalanced across coordinates. In such regimes, the diagonal bound can be substantially smaller than the uniform bound (Sagun et al., 2016; Pan et al., 2021).
Assumption 3 (Bounded noise variance).
Let denote the stochastic gradient noise at round . There exists a vector such that and
Remark 7.
Assumption 3 implies the standard bounded noise assumption by . Intuitively, it bounds each coordinate of rather than only its norm, thereby providing finer-grained information about the noise scale.
In the following, we present our analysis for smooth loss functions.
Theorem 5.
Remark 8.
Both bounds can be decomposed into three terms: a deterministic term of order , a stochastic noise term of order , and a sketching error term involving . The first two terms match the convergence rate of their non-sketched counterparts, while the third term quantifies the additional error introduced by FD. Notably, FTFSL achieves a dimension-free sketching error term, whereas that of Fast S-ADA scales linearly with .
5 Efficient Preconditioned Methods for Matrix-Valued Decisions
In this section, we consider a practical scenario where the decision variable is a matrix , which is common for parameters in deep learning tasks (LeCun et al., 2015).
5.1 Our Proposed Methods
A direct application of the optimization methods developed in the vector setting requires vectorizing the gradient as . However, such a reduction incurs prohibitive memory costs. In particular, ADA-FULL maintains an preconditioner with memory, while even the FD-sketched variants developed in Section 4 reduce this to , which remains impractical for large and . Additionally, if we consider the matrix structure of gradients in deep neural networks, it has been widely observed that these structured gradients are usually low-rank (Zhao et al., 2021; Yang et al., 2023; Cosson et al., 2023).
To exploit the structure information, Gupta et al. (2018) propose Shampoo, which retains the matrix structure of the gradient and maintains two matrices as preconditioners of the rows and columns of , yielding a space complexity of . While S-Shampoo (Feinberg et al., 2023) improves the space complexity of Shampoo to , its regret bound again relies on the dimensionality . To further reduce its regret bound, we propose FTSL-Shampoo by integrating FD with Shampoo under the primal-dual framework. Our method achieves a superior dimension-free guarantee while obtaining an space complexity, which is presented in Algorithm 6.
Specifically, we utilize FD to approximate the left and right preconditioning matrices for Shampoo. We maintain two matrices to ensure that . We track the cumulative escaped masses and of the left and right preconditioning matrices separately, and then add them back into and to uphold the monotonicity. To achieve a dimension-free regret bound with FD, we update the parameters as follows:
| (5) |
where is the sum of the past gradients, and we conduct the analysis under the primal-dual framework. Before we present the regret bound for FTSL-Shampoo, we introduce a standard assumption that is specific to Shampoo-based methods, which has also been used in prior works (Gupta et al., 2018; Feinberg et al., 2023).
Assumption 4 (Bounded rank).
The rank of gradient matrix is bounded by , i.e., .
Then we establish the guarantee for FTSL-Shampoo.
Theorem 6.
Remark 9.
In comparison to the previous regret bound of S-Shampoo (Feinberg et al., 2023), we achieve a dimension-free regret bound while enjoying the same space complexity.
Although FTSL-Shampoo achieves an space complexity, it requires maintaining a separate preconditioner for each axis of the gradient matrix. For convolutional neural networks, where a single layer may involve parameters with multiple dimensions, this necessitates storing and updating multiple preconditioners per layer. Beyond this overhead, the benefit obtained from such axis-wise preconditioning is itself limited. When the dimension is large, the theoretical guarantee of Shampoo can be worse than those of ADA-FULL or even SGD. Recently, ASGO (Xie et al., 2025; An et al., 2025) demonstrates that maintaining a preconditioner along only a single axis suffices to achieve better theoretical guarantees.
Therefore, to address the above limitations, we integrate FD with ASGO to propose Sketchy ASGO (S-ASGO) under both the mirror descent and primal-dual frameworks, which is summarized in Algorithm 7. Without loss of generality, we assume . S-ASGO maintains only a single sketching matrix to approximate the matrix along the smaller axis, reducing the space complexity from to . In each round , the learner first plays the decision and receives the gradient . Then we send and the previous sketching matrix to Algorithm 5 to obtain the updated sketching matrix and the discarded eigenvalue . Similar to FTSL-Shampoo, we add back the cumulative escaped mass to preserve the positive definite monotonicity, and construct the preconditioner as
Under the primal-dual framework, the learner updates the decision as
| (6) |
We now present the regret bound of S-ASGO under the primal-dual framework.
Theorem 7.
Under Assumption 1, by setting the learning rate , where is the Frobenius norm of the optimal decision , S-ASGO under the primal-dual framework ensures
We next study S-ASGO under the mirror descent framework, where the learner updates the decision as
| (7) |
We present its theoretical guarantee in the following theorem.
Theorem 8.
Under Assumption 1, by setting the learning rate , where , S-ASGO under the mirror descent framework ensures
Remark 10.
Compared with FTSL-Shampoo, S-ASGO not only reduces the space complexity from to , but also achieves a tighter regret bound. Specifically, for any positive semi-definite matrix , it holds that . Applying this inequality yields
Therefore, the leading term of S-ASGO is no larger than of FTSL-Shampoo. Moreover, the regret bound of S-ASGO does not depend on the rank of the gradient.
Remark 11.
The two versions of S-ASGO offer a trade-off between the regret bound and the problem-dependent constant. The mirror descent variant achieves a regret bound with the smaller constant , but incurs a dimension-dependent term arising from the Bregman divergence analysis. In contrast, the primal-dual variant eliminates this dimension dependence and achieves a fully dimension-free regret bound, at the cost of a larger constant that bounds the norm of the optimal decision.
5.2 Application to Offline Optimization
In parallel with Section 4.3, we extend S-ASGO to the offline stochastic setting. Formally, we consider the following stochastic optimization problem
| (8) |
where is a convex loss function. We assume that only noisy estimates of its gradient can be accessed, where is the random sample drawn from a stochastic oracle such that .
In each round , the learner receives the decision from the online algorithm . It samples a mini-batch of samples and queries the gradient . Then it sends the stochastic gradient to as the gradient in round .
We first establish the convergence rate for convex non-smooth loss functions.
Theorem 9.
We next turn to smooth losses. In line with An et al. (2025), we impose two standard assumptions.
Assumption 5 (Smoothness).
The loss function is -smooth with respect to , where is a symmetric positive definite matrix and .
Assumption 6 (Bounded noise variance).
Let be the stochastic gradient noise. We assume and there exists a symmetric positive definite matrix such that
Then, we establish the convergence rate for smooth loss functions.
Theorem 10.
Under Assumptions 1, 5 and 6, by setting the learning rate and the batch size , where is the Frobenius norm of the optimal decision , S-ASGO under the primal-dual framework ensures
Under Assumptions 1, 5 and 6, by setting the learning rate and the batch size , where , S-ASGO under the mirror descent framework ensures
Remark 12.
Both bounds contain three terms: a smooth term of order , a stochastic noise term of order , and a sketching error term of order . The first two terms match the convergence rate of their non-sketched counterparts, while the third quantifies the additional error introduced by FD. When the gradient covariance is approximately low-rank, both methods recover the optimal rate dictated by the stochastic noise. Moreover, a faster convergence rate can be obtained by choosing a large batch size .
6 Analysis
In this section, we present the proofs of the main theorems.
6.1 Proof of Theorem 1
Before giving the proof of Theorem 1, we first introduce some supporting lemmas.
Lemma 11 (Duchi et al., 2011, Proposition 2).
Lemma 12 (Duchi et al., 2011, Lemma 10).
Define . Then we have
Then, we illustrate how FD approximates the original matrix.
Lemma 13 (Feinberg et al., 2023, Remark 11).
By defining , for the FD sketch maintained in FTSL, we have
Then we bound the terms and , respectively. As for , we have
where the first inequality is due to and we assume .
Therefore, we have
| (10) |
To give the bound for , we first give the lower bound of , which connects with . We denote , and we have
which means .
Therefore, we have
| (11) |
6.2 Proof of Theorem 2
We first introduce some guarantees of the fast frequent directions technique.
In Algorithm 3, we do not perform SVD on the sketching matrix every round. Instead, we maintain two matrices and , which approximate the sketching matrix in Algorithm 2, that is
In each round , after receiving a new gradient , we first check whether this vector lies within the subspace spanned by . If the vector is not contained within the subspace, we normalize it and subsequently add it to , thereby enlarging the span of the subspace and ensuring . In our algorithm design, we require the matrix only contain orthonormal vectors, therefore we add to the first all zero column. In round , we have
According to Lemma 13, we can derive
In the following, we will prove .
Assume that we delete the eigenvalues of in round . Note that in our method, we calculate before we delete the eigenvalues of . In round , before we update , we have , and we let represent the matrix before we delete its columns.
As we perform SVD on , we delete the eigenvalues of , update and set the last columns to zero. In round , we have , and we can derive
where the second inequality is due to the fact that only the first columns of are non-zero and the first columns of and are the same, and that and are orthogonal matrices.
If we do not delete the eigenvalues of in round , we have and
Assume there are at most eigenvalues in , , at most non-zero columns in , and at most non-zero columns in , and the first columns of and are the same. We have the following
| (12) | ||||
where the second equality is due to the fact that only the first elements in are non-zero and the first columns of and are the same.
Therefore, we have
By summing up, we have
Next, we need to ensure that after FFD, the preconditioning matrix is monotone. It is easy to verify that remains monotone in the rounds where we do not delete any eigenvalue of .
Then, we prove that remains monotone even if we delete the eigenvalues of . Assume in round , we delete the eigenvalues of . In round , the matrix . Moreover, . In round , since we do not delete the eigenvalues of , the first columns of of round and of round are the same (notably, is different in rounds and ). We have . As we set , we can ensure
where the second inequality is due to the fact that the -th to -th columns of the matrix are zero and the first columns of of round and of round are the same, so we can replace with , and are orthogonal matrices.
Therefore, we can ensure is monotone in FTFSL. Using Eq. (9), we have the following
As for the term , we can derive
| (13) | ||||
where the second inequality is due to and we assume .
For the term , we denote , we have
Therefore, we have
| (14) |
6.3 Proof of Theorem 3
According to the proof of Theorem 2, we have the following properties in FFD:
Similar to the proof of Theorem 3 in Feinberg et al. (2023), we have the following lemma:
Lemma 14.
Let be the decisions of Fast S-ADA and . Then the regret bound of Fast S-ADA is
According to Lemma 14, we have
We first bound the term , which is easier to bound than that in FTFSL, as we can directly apply a lemma to it.
where the first inequality is due to and the last inequality is due to Lemma 12.
Next, we bound the term , which introduces the dependence on dimensionality . We have
where this inequality is due to monotonicity of and .
Then we need to bound the term .
Assume that we delete the eigenvalues of at round . In round , before we update , and we use to represent the matrix before we delete its columns.
As we perform SVD on , we denote by the first columns of before we set the last columns to , and by the complementary subspace of . Note that the first columns of and are the same, , and .
In round , we have
and we can derive
where the second equality is due to the fact that only the first columns of the matrix are non-zero and the first columns of and are the same, and the first inequality is due to the fact that contains at most orthonormal vectors.
If we do not delete the eigenvalues of in round , we have and can derive
Assume there are at most eigenvalues in , . Therefore, there are at most non-zero columns in and at most non-zero columns in , and the first columns of and are the same. We have the following
| (15) | ||||
where the second equality is due to the fact that there are at most non-zero elements in and the first columns of and are the same, and the third equality is due to .
Therefore, we have
By induction, we have
Then we can rewrite the bound of as .
We just need to bound . According to Corollary 4 in Feinberg et al. (2023), the upper bound of this term is
Then we can derive the bound of .
By setting , we have
6.4 Proof of Theorem 5
Before deriving Theorem 5, we introduce two useful lemmas.
Lemma 15 (An et al., 2025, Lemma 4).
For a symmetric positive semidefinite matrix , it holds that
Lemma 16 (Liu et al., 2025b, Lemma G.5).
For a non-negative sequence and a positive sequence with , it holds that
Primal-dual framework.
We first present the proof under the primal-dual framework. Based on Theorem 4, we have
| (16) | ||||
Then we bound each term one by one. As for the first term, we use the smooth assumption and obtain
| (17) | ||||
where the first inequality is due to Lemma 15, the second inequality is due to Lemma 16 and the last inequality is based on the properties of smoothness (Nesterov, 2018).
As for the stochastic noise term, we introduce a lemma.
Lemma 17.
Under Assumption 3, it holds that
Based on Lemma 17, we have
| (18) | ||||
Therefore, we can derive the convergence rate for smooth loss functions. By plugging (17) and (18) into (16), we have
| (19) | ||||
If we denote , we can rewrite (19) as
| (20) |
where . When , we have , which means
| (21) |
which concludes the proof.
Mirror descent framework.
6.5 Proof of Theorem 6
In the following, we give the proof of Theorem 6.
Since the update in Algorithm 6 is performed in the matrix space, it poses challenges for the analysis. Therefore, we first introduce an equivalent update in vector form.
Recall the update in Algorithm 6, . We define , and , where denotes the row-major vectorization of a given matrix. The Kronecker product obeys the following properties.
Lemma 18 (Gupta et al., 2018, Lemma 3,4).
For matrices of appropriate dimensions and vectors , , , , the following properties hold:
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
By defining , we can rewrite the update in Algorithm 6 as
which is equal to
As and are monotonically increasing with , it is not hard to find that is also monotonically increasing with . Thus, by using Lemma 11, we have a similar inequality:
| (23) |
where .
We first give the bound of .
Then we introduce a lemma to give a guarantee about the norm of Kronecker product.
Lemma 19 (Lancaster and Farahat, 1972, Theorem 8).
For two matrices and , the following equality holds
We have According to Lemma 19, , then we need to give the bound of and , respectively. We first define and . Using Lemma 13, it is not hard to verify that .
Therefore, we have
| (24) | ||||
where the fourth inequality is due to the fact that for positive semidefinite matrices, and the last inequality is due to the monotonicity of .
We also have
Therefore, we can get
| (25) |
To give the bound of , we first introduce a lemma.
Lemma 20 (Gupta et al., 2018, Lemma 8).
If has rank at most , and , then ,
Then we utilize a lemma from Feinberg et al. (2023).
Lemma 21 (Feinberg et al., 2023, Lemma 14).
Let be the eigendecomposition of the un-deflated sketch. We assume . Write , where contains the first columns of . Similarly, for the right preconditioner, let . Write , where contains the first columns of . Define and , then we have
Therefore, we have
Then we define , and have
We want to give the lower bound of . By defining , we have
Define . We have , which means .
We can derive
Based on the proof of Theorem 5 in Feinberg et al. (2023), we obtain the following inequality.
Therefore, we have
Then, we need to bound the term .
which means .
By defining , we can derive the bound of .
By setting , the final regret bound is
| (27) | ||||
6.6 Proof of Theorem 7
The proof of Theorem 7 follows the same structure as that of Theorem 6, with a refined analysis of the preconditioning matrix.
We next turn to . Using the identity , we have
We now establish a lower bound on in terms of . Define . Since and , we obtain
Define . Combining the above inequality with (26) yields
| (29) | ||||
where the first inequality follows from and the fact that if . The right-hand side is bounded by the following lemma.
Lemma 22 (An et al., 2025, Proof of Theorem 1).
With the notation of Algorithm 7,
6.7 Proof of Theorem 8
We now turn to the mirror descent framework. Applying the standard mirror descent analysis yields
| (30) |
We first derive the bound of .
| (31) | ||||
where the first inequality is due to and , and the second inequality is due to for positive semi-definite matrices.
6.8 Proof of Theorem 10
In this section, we present the proof for smooth loss functions. We introduce a lemma from the proof in An et al. (2025).
Primal-dual framework.
We first present the proof for the primal-dual framework. We have
If we denote , we can rewrite it as
where . By using , we can derive
Mirror-descent framework.
It is not hard to verify that, for S-ASGO under the mirror descent framework, by using Theorem 9, we can obtain
If we denote , we can rewrite it as
where . By using , we can derive
7 Experiments
In this section, we assess the performance of the proposed methods via numerical experiments, ranging from online classification and image classification to the pretraining of language models. All experiments are conducted on a server equipped with NVIDIA RTX 4090 GPUs and an Intel Xeon Platinum 8358P CPU (2.60 GHz).
7.1 Online Classification
First, we perform online classification to evaluate the performance of our methods with two real-world datasets from the LIBSVM (Chang and Lin, 2011) repository: Gisette and Epsilon, which are high-dimensional and dense. In particular, the Gisette dataset contains training samples and testing samples, each with features. The Epsilon dataset consists of training samples and testing samples, each with features.
Experiment Setup.
In each round , a batch of data arrives, where . The online learner aims to predict a linear model and suffers the hinge loss . For the Gisette dataset, we set the batch size , the sketching size to be of the original dimensionality, and . For the Epsilon dataset, we set the batch size , and . We compare our methods with ADA-DIAG (Duchi et al., 2011), RADAGRAD (Krummenacher et al., 2016), FD-SON (Luo et al., 2016), ADA-FFD under two frameworks (Wan and Zhang, 2022) and S-ADA (Feinberg et al., 2023).
Experiment Results.
Following Duchi et al. (2011), we adopt the test accuracy to compare different methods. To better demonstrate the improvements of our methods, we additionally plot the training loss and runtime of various methods. From Figure 1 and Figure 2, we observe that FTFSL outperforms all other methods in both loss and testing accuracy, aligning with its superior regret bound. Moreover, FTFSL and Fast S-ADA exhibit significantly lower runtimes compared to S-ADA, owing to their superior time complexities.
7.2 Image Classification
In this section, we conduct numerical experiments on multi-class image classification tasks to evaluate the performance of our proposed methods. We compare FTFSL, FTSL-Shampoo, S-ASGO under the mirror descent framework (S-ASGO (M)) and S-ASGO under the primal-dual framework (S-ASGO (P)) with several baseline methods, including ADA-DIAG (Duchi et al., 2011), ADA-FFD under primal-dual framework (Wan and Zhang, 2022), S-ADA (Feinberg et al., 2023), Shampoo (Gupta et al., 2018), S-Shampoo (Feinberg et al., 2023) and ASGO (An et al., 2025). The experiments involve training ResNet18 and ResNet34 models (He et al., 2016) on the CIFAR-10 and CIFAR-100 datasets (Krizhevsky, 2009), respectively, for epochs with a batch size of .
A direct implementation of FD requires a full SVD of the sketching matrix at every round, which becomes the dominant computational bottleneck in high-dimensional regimes. SVD remains notoriously difficult to parallelize on modern accelerators, and its wall-clock cost in practice is often orders of magnitude higher than its theoretical complexity would suggest. To address this, ASGO (An et al., 2025) circumvents the SVD by computing the preconditioner directly through Newton–Schulz iterations or the Polar Express (Amsel et al., 2026), albeit at the cost of additional memory for the intermediate iterates. However, this trick cannot be extended to our method, since our algorithm requires both the eigenvalues and the eigenvectors of the matrix at every round. To render our methods practical at scale, we instead adopt the ARO scheme (Gong et al., 2026), which computes the eigenvectors of the matrix and then recovers the eigenvalues from them. This substantially reduces the per-iteration cost while preserving the empirical performance of our methods.
Consider the problem of computing the leading left singular vectors of a matrix with , given a previous approximation from a closely related iterate. Following Gong et al. (2026), we approximate the leading left singular subspace by
| (32) |
where denotes the orthonormal factor of the thin QR decomposition, and is the row-normalization function defined as
| (33) |
After obtaining , we rotate into this approximate left singular subspace and compute
| (34) |
Following the same row-norm interpretation as in ARO, the singular values are estimated by
| (35) |
Two ingredients are central to the efficiency of this scheme. First, the warm start allows a single power-iteration step to suffice whenever varies smoothly across consecutive invocations of the procedure. Second, the QR factorization is realized through the Shifted Cholesky-QR (SCQR) (Fukaya et al., 2020) variant: for an input matrix , one forms the regularized Gram matrix , computes its Cholesky factorization , and obtains the orthonormal basis as .
Application to FD.
We instantiate the above procedure with and , where denotes the approximate left singular subspace maintained from the previous round. The output serves as an approximation of the leading left singular vectors of and the FD truncation step proceeds on the recovered singular values . Since has the same shape as , the additional storage incurred by the procedure is of the same order as that of the sketching matrix itself, and thus does not affect the overall space complexity of FD.
Experimental Setup.
For sketching-based methods, we set the sketching size according to the dimensionality of the gradient,
where denotes the total number of parameters in the layer and is the sketching ratio. For methods that exploit the matrix structure, which are more memory-efficient, we set along each dimension, where is the size of the -th dimension of the gradient. We use a sketching ratio of in all experiments. For a fair comparison, we disable momentum and apply only learning rate decay. We use the original version of ASGO for this task.
Experimental Results.
We first examine the wall-clock benefit of the approximate SVD technique. Figure 3 reports the training time during ResNet18 training on CIFAR-10, where the SVD of S-Shampoo is computed via the original PyTorch implementation. Across all training iterations, our approximation delivers a substantial reduction in the per-iteration cost.
Figures 4 and 5 display the training loss and test accuracy against the number of iterations on CIFAR-10 and CIFAR-100, respectively. In both metrics, FTSL-Shampoo attains performance comparable to that of the full Shampoo, while substantially reducing memory consumption and running time, in line with our theoretical guarantees. Meanwhile, FTFSL converges faster than competing sketching-based methods, corroborating the effectiveness of the primal-dual formulation. We further report the per-iteration running time of each method: FTFSL exhibits a clear reduction over S-ADA, consistent with the improved time complexity. Finally, although S-ASGO maintains only a single preconditioner along one axis of the gradient, it remains competitive in both training loss and test accuracy with its two-preconditioner counterpart FTSL-Shampoo, and achieves a further reduction in wall-clock time. This observation is consistent with our theoretical analysis, which predicts that one-sided preconditioning suffices to capture the dominant curvature information while lowering the per-iteration cost.
7.3 Language Model Pretraining
In this section, we empirically evaluate the efficiency of S-ASGO on a large language model (LLM) pretraining task. We compare our method with Muon (Jordan et al., 2024), Shampoo (Gupta et al., 2018), ASGO (An et al., 2025), and AdamW (Kingma and Ba, 2015; Loshchilov and Hutter, 2019). All experiments are implemented based on the official implementation of ASGO.11 1 https://github.com/infinity-stars/ASGO
Following prior work (An et al., 2025; Xie et al., 2026), we develop a practical variant of S-ASGO that adopts several modifications commonly used in modern optimizers, presented in Algorithm 8. Specifically, we maintain the preconditioner with an exponential moving average and incorporate momentum. We use an approximate SVD to decompose the sketching matrix, which reduces the per-step computation. Moreover, we normalize the update of S-ASGO by its root mean square (RMS) norm and then multiply it by , so that its RMS norm matches that of the Adam update (Liu et al., 2025a).
Experimental Setup.
We adopt the configuration of the GPT-2 model from Karpathy (2022), which consists of Transformer layers, attention heads, and an embedding dimension of . We train on the OpenWebText dataset for a total of steps, using Distributed Data Parallel (DDP) across NVIDIA RTX 4090 GPUs. The learning rate follows a linear warmup over the first steps and is then decayed by cosine annealing to a final value of . We consider two settings, one with a sequence length of tokens, a batch size of and gradient accumulation over steps, and the other with a sequence length of tokens, a batch size of and gradient accumulation over steps. Following common practice (Jordan et al., 2024; An et al., 2025), we train the 1D and embedding-layer parameters with AdamW (Loshchilov and Hutter, 2019). For S-ASGO, we set
where is the sketching ratio and in our experiments. For the other methods, we follow the implementation from An et al. (2025). For the hyperparameters, For hyperparameters, we adopt the recommended settings from An et al. (2025) and perform a grid search for S-ASGO (M). Specifically, we set the learning rate for AdamW and for S-ASGO (M), with and .
Experimental Results.
We evaluate S-ASGO (M) against several baselines on the GPT-2 pretraining task. As shown in Figures 7 and 8, S-ASGO (M) attains performance comparable to that of Muon and ASGO. More importantly, S-ASGO (M) maintains a much smaller preconditioner than ASGO, because it keeps only a low-rank preconditioning matrix rather than the full one. Consequently, its optimizer memory is governed by the sketching size rather than by the full preconditioner dimension, which reduces the memory footprint while leaving the pretraining loss essentially unchanged. These results show that the sketched preconditioner retains the benefit of axis-wise preconditioning at a substantially lower memory cost.
7.4 Ablation Study on the Sketching Size
In this section, we study the sensitivity of our methods to the sketching size . As controls the rank of the FD matrix, it governs a trade-off between approximation quality and cost. On one hand, a larger yields a smaller discarded mass and hence a tighter sketching-error term in our regret bounds. On the other hand, a smaller lowers the per-round memory and running time. To examine this trade-off empirically, we adopt the same experimental setup as the GPT-2 pretraining in Section 7.3.
As shown in Figure 9, a larger sketching ratio improves the performance on the GPT-2 pretraining task, with the gain becoming marginal once the ratio exceeds . This indicates that a sketching ratio of can capture the principal components of the gradients. Although a smaller ratio of performs slightly worse on this task, it is already sufficient on the CIFAR-10 and CIFAR-100 tasks. We conjecture that this difference stems from the rank of the gradients in the two domains. In image classification, only a small portion of each image is relevant to the label, so the gradients tend to be low-rank, and a small already captures them. In contrast, the gradients in language modeling exhibit a higher effective rank, which calls for a larger .
8 Conclusion and Future Work
In this paper, we investigate adaptive preconditioned optimization methods via frequent directions (FD) and develop several efficient adaptive optimization algorithms. We first introduce FTSL, which achieves a tighter dimension-free regret bound of by integrating FD with ADA-FULL under the primal-dual framework. We then propose an accelerated variant of FTSL that reduces the time complexity to while preserving the same order regret bound. We next consider a more general setting of optimization over matrix-valued decision variables, where the matrix structure can be exploited to design more efficient adaptive preconditioners. In this setting, we first adapt FD to Shampoo under the primal-dual framework, leading to an improved dimension-free regret bound. We further propose S-ASGO and analyze it under both the mirror descent and primal-dual frameworks, establishing improved regret guarantees with lower computational complexity. Furthermore, we extend our analysis to offline stochastic optimization for convex non-smooth losses and convex smooth losses. Finally, we design practical variants of our methods and verify the effectiveness and efficiency of all methods empirically.
Two directions are particularly worth pursuing in future work. First, for sparse gradient matrices, the sparse frequent directions technique (Ghashami et al., 2016b) attains a better time complexity than standard FD. This suggests a natural way to further accelerate our algorithms when the observed gradients are sparse. Second, our theoretical analysis is developed for convex loss functions in the offline stochastic optimization setting, whereas the loss functions of many practical machine learning applications are inherently non-convex. Developing an analysis for non-convex smooth objectives remains an important question.
Appendix A Proof of Theorem 4
According to Assumption 1, we have
| (36) |
which means that we can derive the convergence rate by using the regret bound of the online methods. Therefore, by incorporating Theorems 2 and 3 into (36), we can obtain Theorem 4.
A.1 Proof of Theorem 9
Appendix B Calculation of
In FTSL, we need to calculate , which cannot be directly derived from the Woodbury formula (Hager, 1989). We provide the following process.
Assume that is the complementary subspace of , then we have . We denote and have
Then we can get
where .
Therefore, we have
By applying the Woodbury formula, we can derive
References
- Database-friendly random projections: johnson-lindenstrauss with binary coins. Journal of computer and System Sciences 66 (4), pp. 671–687. Cited by: §2.2.
- Information-theoretic lower bounds on the oracle complexity of stochastic convex optimization. IEEE Transactions on Information Theory 58 (5), pp. 3235–3249. Cited by: Remark 5.
- Efficient full-matrix adaptive regularization. In Proceedings of the 36th International Conference on Machine Learning, pp. 102–110. Cited by: §1.
- The polar express: optimal matrix sign methods and their application to the muon algorithm. In The Fourteenth International Conference on Learning Representations, Cited by: §7.2.
- ASGO: adaptive structured gradient optimization. In Advances in Neural Information Processing Systems 38, Cited by: Table 3, §1, §1, §2.3, §5.1, §5.2, §6.8, §7.2, §7.2, §7.3, §7.3, §7.3, §7.3, Lemma 15, Lemma 22.
- Scalable second order optimization for deep learning. arXiv preprint arXiv:2002.09018. Cited by: §1, §2.3, §2.3.
- On the generalization ability of on-line learning algorithms. IEEE Transactions on Information Theory 50 (9), pp. 2050–2057. Cited by: §4.3.
- LIBSVM: a library for support vector machines. ACM transactions on intelligent systems and technology 2 (3), pp. 1–27. Cited by: §7.1.
- Efficient and robust high-dimensional linear contextual bandits. In Proceedings of the 29th International Joint Conference on Artificial Intelligence, pp. 4259–4265. Cited by: §2.2, §3, §4.2.
- Contextual bandits with linear payoff functions. In Proceedings of the 14th International Conference on Artificial Intelligence and Statistics, pp. 208–214. Cited by: §2.2.
- Low-rank gradient descent. IEEE Open Journal of Control Systems 2, pp. 380–395. External Links: Document Cited by: §5.1.
- Anytime online-to-batch, optimism and acceleration. In Proceedings of the 36th International Conference on Machine Learning, pp. 1446–1454. Cited by: §4.3.
- Composite objective mirror descent.. In Proceedings of the 23rd Annual Conference on Learning Theory, pp. 14–26. Cited by: §1, §2.1.
- Adaptive subgradient methods for online learning and stochastic optimization.. In Proceedings of the 23rd Annual Conference on Learning Theory, Cited by: §1, §2.1.
- Adaptive subgradient methods for online learning and stochastic optimization.. Journal of machine learning research 12 (7). Cited by: Table 1, §1, §2.1, §7.1, §7.1, §7.2, Lemma 11, Lemma 12.
- Combining axes preconditioners through kronecker approximation for deep learning. In The Twelfth International Conference on Learning Representations, Cited by: §2.3.
- Kronecker-factored approximate curvature for modern neural network architectures. In Advances in Neural Information Processing Systems 37, Cited by: §2.3.
- Beyond uniform smoothness: a stopped analysis of adaptive sgd. In Proceedings of Thirty Sixth Conference on Learning Theory, pp. 89–160. Cited by: §4.3.
- Sketchy: memory-efficient adaptive regularization with frequent directions. In Advances in Neural Information Processing Systems 36, Cited by: Table 1, Table 3, §1, §1, §1, §2.2, §2.2, §2.3, §4.1, §4.1, §4.2, §5.1, §5.1, §6.3, §6.3, §6.5, §6.5, §7.1, §7.2, Remark 1, Remark 4, Remark 9, Lemma 13, Lemma 21.
- Shifted Cholesky QR for computing the QR factorization of ill-conditioned matrices. SIAM Journal on Scientific Computing 42 (1), pp. A477–A503. Cited by: §7.2.
- Frequent directions: simple and deterministic matrix sketching. SIAM Journal on Computing 45 (5), pp. 1762–1792. Cited by: §1, §2.2, §3, §3, §4.2.
- Efficient frequent directions algorithm for sparse matrices. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 845–854. Cited by: §8.
- An investigation into neural net optimization via hessian eigenvalue density. In Proceedings of the 36th International Conference on Machine Learning, pp. 2232–2241. Cited by: §2.1.
- ARO: a new lens on matrix optimization for large models. arXiv preprint arXiv:2602.09006. Cited by: §1, §7.2, §7.2.
- A unified approach to adaptive regularization in online and stochastic optimization. arXiv preprint arXiv:1706.06569. Cited by: §1.
- Shampoo: preconditioned stochastic tensor optimization. In Proceedings of the 35th International Conference on Machine Learning, pp. 1842–1850. Cited by: Table 3, §1, §1, §2.3, §5.1, §5.1, §7.2, §7.3, Lemma 18, Lemma 20.
- Updating the inverse of a matrix. SIAM review 31 (2), pp. 221–239. Cited by: Appendix B.
- Logarithmic regret algorithms for online convex optimization. Machine Learning 69 (2-3), pp. 169–192. Cited by: §2.2.
- Introduction to online convex optimization. Foundations and Trends in Optimization 2 (3-4), pp. 157–325. Cited by: §2.1, §3.
- Deep residual learning for image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 770–778. Cited by: §7.2.
- Subspace optimization for large language models with convergence guarantees. In Proceedings of the 42nd International Conference on Machine Learning, pp. 22468–22522. Cited by: §2.3.
- Approximate nearest neighbors: towards removing the curse of dimensionality. In Proceedings of the thirtieth annual ACM symposium on Theory of computing, pp. 604–613. Cited by: §2.2.
- Muon: an optimizer for hidden layers in neural networks. External Links: Link Cited by: §2.3, §7.3, §7.3.
- NanoGPT. External Links: Link Cited by: §7.3.
- Adam: a method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations, Cited by: §1, §2.3, §7.3.
- Learning multiple layers of features from tiny images. Masters Thesis, Deptartment of Computer Science, University of Toronto. Cited by: §7.2.
- Scalable adaptive stochastic optimization using random projections. In Advances in Neural Information Processing Systems 29, Cited by: §2.2, §7.1.
- Norms on direct sums and tensor products. Mathematics of Computation 26 (118), pp. 403–410. Cited by: Lemma 19.
- Deep learning. Nature 521 (7553), pp. 436–444. Cited by: §1, §2.3, §5.
- Sophia: a scalable stochastic second-order optimizer for language model pre-training. In Proceedings of the 12th International Conference on Learning Representations, Cited by: §2.3.
- Muon is scalable for LLM training. arXiv preprint arXiv:2502.16982. Cited by: §7.3.
- AdaGrad under anisotropic smoothness. In The Thirteenth International Conference on Learning Representations, Cited by: §4.3, Lemma 16.
- Decoupled weight decay regularization. In International Conference on Learning Representations, Cited by: §7.3, §7.3.
- Efficient second order online learning by sketching. In Advances in Neural Information Processing Systems 29, Cited by: §2.2, §7.1.
- Robust frequent directions with application in online learning. Journal of Machine Learning Research 20 (45), pp. 1–41. Cited by: §2.2.
- Adaptive bound optimization for online convex optimization. arXiv preprint arXiv:1002.4908. Cited by: §1.
- Finding repeated elements. Science of computer programming 2 (2), pp. 143–152. Cited by: §3.
- Non-asymptotic analysis of stochastic approximation algorithms for machine learning. In Advances in Neural Information Processing Systems 24, Cited by: §4.3.
- Lectures on convex optimization. Vol. 137, Springer. Cited by: §6.4, Remark 6.
- Improving adaptive moment optimization via preconditioner diagonalization. arXiv preprint arXiv:2502.07488. Cited by: §2.3.
- A modern introduction to online learning. arXiv preprint arXiv:1912.13213. Cited by: §2.1.
- LISA: layerwise importance sampling for memory-efficient large language model fine-tuning. In Annual Conference on Neural Information Processing Systems 37, Cited by: §2.3.
- Unbiased gradient low-rank projection. arXiv preprint arXiv:2510.17802. Cited by: §2.3.
- Eigencurve: optimal learning rate schedule for sgd on quadratic objectives with skewed hessian spectrums. arXiv preprint arXiv:2110.14109. Cited by: Remark 6.
- The matrix cookbook. Technical University of Denmark. Note: Version November 15, 2008 Cited by: §3.
- Eigenvalues of the hessian in deep learning: singularity and beyond. arXiv preprint arXiv:1611.07476. Cited by: Remark 6.
- Empirical analysis of the hessian of over-parametrized neural networks. arXiv preprint arXiv:1706.04454. Cited by: §2.1.
- A deeper look at the hessian eigenspectrum of deep neural networks and its applications to regularization. In Proceedings of the 35th AAAI Conference on Artificial Intelligence, pp. 9481–9488. Cited by: §2.1.
- SOAP: improving and stabilizing shampoo using adam for language modeling. In The Thirteenth International Conference on Learning Representations, Cited by: §1, §2.3.
- Efficient adaptive online learning via frequent directions. In Proceedings of the 27th International Joint Conference on Artificial Intelligence, pp. 2748–2754. Cited by: Table 1, Table 1, §1, §2.2, §2.2.
- Accelerating adaptive online learning by matrix approximation. In Advances in Knowledge Discovery and Data Mining, pp. 405–417. Cited by: §2.2.
- Efficient adaptive online learning via frequent directions. IEEE Transactions on Pattern Analysis and Machine Intelligence 44 (10), pp. 6910–6923. Cited by: Table 2, Table 2, §1, §2.2, §2.2, §4.2, §7.1, §7.2.
- Convergence of adagrad for non-convex objectives: simple proofs and relaxed assumptions. In Proceedings of Thirty Sixth Conference on Learning Theory, pp. 161–190. Cited by: §4.3.
- Dual averaging method for regularized stochastic learning and online optimization. In Advances in Neural Information Processing Systems 22, Cited by: §1, §2.1.
- Structured preconditioners in adaptive optimization: a unified analysis. In Proceedings of the 42nd International Conference on Machine Learning, pp. 68746–68776. Cited by: §1, §1, §2.3, §5.1.
- A tale of two geometries: adaptive optimizers and non-euclidean descent. In Proceedings of the 14th International Conference on Learning Representations, Cited by: §7.3.
- A spectral condition for feature learning. arXiv preprint arXiv:2310.17813. Cited by: §5.1.
- Dimension-free adaptive subgradient methods with frequent directions. In Proceedings of the 42nd International Conference on Machine Learning, pp. 71249–71274. Cited by: §1.
- Mirror descent under generalized smoothness. arXiv preprint arXiv:2502.00753. Cited by: §4.3.
- Why gradient clipping accelerates training: a theoretical justification for adaptivity. In 8th International Conference on Learning Representations, Cited by: §4.3.
- Adaptive online learning in dynamic environments. In Advances in Neural Information Processing Systems 31 (NeurIPS), pp. 1323–1333. Cited by: §2.1.
- A simple yet universal strategy for online convex optimization. In Proceedings of the 39th International Conference on Machine Learning (ICML), pp. 26605–26623. Cited by: §2.1.
- ZerO initialization: initializing neural networks with only zeros and ones. arXiv preprint arXiv:2110.12661. Cited by: §5.1.
- GaLore: memory-efficient llm training by gradient low-rank projection. In Proceedings of the 41st International Conference on Machine Learning, pp. 61121–61143. Cited by: §2.3.
- Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of the 20th International Conference on Machine Learning, pp. 928–936. Cited by: §2.1, §2.1.