Adaptive Subgradient Methods for Online Learning and Stochastic Optimization 2: Full-Matrix AdaGrad's Regret Is Bounded by tr(G_T^{1/2})Research Paper
Motivation
Online convex optimization is the standard model for learning from a stream of data: in round a learner commits to a point in a convex set , a convex loss is revealed, and the learner pays , where is a fixed regularizer. Subgradient methods for this model use one fixed geometry (usually the Euclidean one) for every coordinate and every direction, regardless of the data. Duchi, Hazan and Singer (JMLR 12 (2011) 2121–2159) introduced ADAGRAD, which adapts the geometry to the observed subgradients. The diagonal version is one of the most widely used optimizers in machine learning and the ancestor of RMSProp and Adam. This mission formalizes the paper's full-matrix version: the proximal term is built from the matrix square root of the accumulated outer products of the subgradients, so the method adapts to correlated directions, not only to individual coordinates.
The analysis extends the regret bounds of primal-dual subgradient methods and regularized dual averaging (Nesterov 2009; Xiao 2010) and of composite mirror descent to proximal functions that change over time, and combines them with trace inequalities for the matrix square root. Concurrent work by McMahan and Streeter (COLT 2010) studied closely related adaptive proximal methods.
Setting
Vectors live in with the Euclidean inner product and norm . In round the learner plays and observes a subgradient , that is, for all . The regret against a comparator is
The outer product matrix is , a symmetric positive semidefinite matrix, and is its positive semidefinite square root. With parameters and , ADAGRAD with full matrices (Figure 2 of the paper) sets
starts at , and computes by one of two updates:
- the primal-dual subgradient update (3): ;
- the composite mirror descent update (4): .
The dual (semi)norm of is , where is the pseudo-inverse.
Formalization targets
Goal: Theorem 7
Assume closed and convex, and convex, and minimized over at . For the primal-dual update with , every satisfies
and for the composite mirror descent update with any ,
Milestones
In the order the proof uses them:
- Lemma 16 and Propositions 3 and 2: regret bounds for mirror descent and dual averaging with time-varying quadratic proximal functions ((11) and (10)).
- Lemma 13: implies .
- The first display of the proof of Theorem 7 and inequality (16): the growth of the Bregman terms is controlled by .
- Lemma 14 (), Lemma 8 (a first-order concavity inequality for at singular ), Lemma 9, and Lemma 10, the doubling lemma
- (17): the dual-norm sums of both updates are at most .
Significance
The quantity can be much smaller than the factor in the regret of non-adaptive online gradient descent with a tuned step size: it is small when the subgradients concentrate in a few directions, possibly not aligned with the coordinate axes. The paper's Corollary 11 rewrites it as times the square root of , the gradient term of the best fixed full-matrix proximal function chosen in hindsight. The supporting results have their own uses. Propositions 2 and 3 are the generic regret bounds for adaptive proximal methods. Lemmas 8–10 are trace inequalities for the matrix square root that appear throughout the analysis of second-order online methods.
The results are proved in the paper. To our knowledge none of them has a machine-checked proof. Formalizing them requires the matrix functional calculus (square roots, pseudo-inverses, real powers) in a form usable for inequalities, which Mathlib has only partly: for instance, monotonicity of the square root is in Mathlib for C*-algebras, which covers complex but not real matrices. A complete development gives a verified regret bound for an adaptive full-matrix method together with these matrix inequalities.
Difficulty
The online-learning half (Lemma 16, Propositions 2 and 3) is a convex-analysis argument once the proximal functions are quadratic. The obstacle is the matrix half. The natural approach to Lemma 10 is induction with a scalar inequality applied eigenvalue by eigenvalue. This fails because and do not commute, so their eigenvectors differ. One needs the concavity of on positive semidefinite matrices and its gradient, at points where may be singular. That is where Lemma 8 and the pseudo-inverse enter: the inverse root does not exist, and a limit is needed. The same issue arises in Lemma 9 and in the dual norm when .
Formalization scope
Vectors are EuclideanSpace ℝ (Fin d), so ‖·‖ is the Euclidean norm. Matrices are Matrix (Fin d) (Fin d) ℝ, acting on vectors through Matrix.toEuclideanLin. The square root is Mathlib's CFC.sqrt under the Loewner order (MatrixOrder). The pseudo-inverse is the functional calculus of with , and is written as . Mathlib's matrix inverse is used only where the matrix is invertible or the vector is zero. Rounds are 1-based and . The losses and are real-valued convex functions, and the constraint is carried by . Each update's argmin is a predicate (the next iterate lies in and minimizes the objective there), which does not assert existence or uniqueness. A run consists of the rounds of Figure 2, with the subgradient relation imposed in every round. The subgradient relation is the platform's published ShorNonsmooth.AlmostDiff.IsSubgradient.
Restrictions and conventions, each stated in the item that needs it:
- is minimized over at . This is the paper's . Without it both parts of Theorem 7 are false.
- Lemma 8 assumes . The page says "for any ", but the inequality fails for (for , it reads ). The paper only applies the lemma with .
- Lemma 16 and Propositions 2, 3 are specialised to quadratic proximal functions. In Lemma 16 and Proposition 3, is positive semidefinite and lies in its range, so the dual norm is finite. In Proposition 2, is positive definite, the increase, and . Lemma 16 asks for . Proposition 3 is stated for rounds.
- in the dual norm of (17) and Theorem 7. Figure 2's is never used by the updates.
- Lemma 14's gradient is stated as a directional derivative along every symmetric direction.
A formalization in which the next iterate need not lie in , the comparator ranges outside , is itself or its entrywise square root, or is Mathlib's matrix inverse (which vanishes on singular matrices), states a different theorem and is excluded.
Proofs need the convex-analysis optimality conditions for the two updates, the Loewner-order calculus of CFC.sqrt on real matrices (Lemma 13), concavity and differentiability of , and limits in the functional calculus. The matrix lemmas (13, 14, 8, 9, 10) are reusable outside this paper. Alternative proofs, for instance of Lemma 10 through operator concavity, are welcome.
Selected references
- J. Duchi, E. Hazan, Y. Singer, Adaptive Subgradient Methods for Online Learning and Stochastic Optimization, Journal of Machine Learning Research 12 (2011) 2121–2159. https://jmlr.org/papers/v12/duchi11a.html
- H. B. McMahan, M. Streeter, Adaptive Bound Optimization for Online Convex Optimization, COLT 2010. https://arxiv.org/abs/1002.4908
- L. Xiao, Dual Averaging Methods for Regularized Stochastic Learning and Online Optimization, Journal of Machine Learning Research 11 (2010) 2543–2596. https://jmlr.org/papers/v11/xiao10a.html
- Y. Nesterov, Primal-dual subgradient methods for convex problems, Mathematical Programming 120 (2009) 221–259. https://doi.org/10.1007/s10107-007-0149-x
- T. Ando, Concavity of certain maps on positive definite matrices and applications to Hadamard products, Linear Algebra and its Applications 26 (1979) 203–241. https://doi.org/10.1016/0024-3795(79)90179-4