Logarithmic Regret Algorithms for Online Convex Optimization 2: Logarithmic Regret of the Online Newton StepResearch Paper
Motivation
Online convex optimization models repeated decision making against an unknown, possibly adversarial environment: in each round a player picks a point of a convex set , and only then learns a convex cost function and pays . Performance is measured by regret, the excess of the total cost over that of the best fixed point in hindsight. Zinkevich (ICML 2003) showed that online gradient descent has regret for arbitrary convex costs with bounded gradients, and this rate cannot be improved in general.
Many costs met in practice have more curvature than bare convexity. The log-loss of universal portfolio management (Cover, Math. Finance 1991) is not strongly convex, but it is exp-concave. Hazan, Agarwal and Kale (Mach Learn 69, 2007) gave the first efficient algorithms with regret logarithmic in for exp-concave costs. This mission formalizes the second of their algorithms, the Online Newton Step (ONS), and its regret bound (Theorem 2 of the paper). ONS is the basis of later second-order online methods and appears as a standard algorithm in textbooks on online learning.
Timeline:
- 2003 — Zinkevich: regret for general convex costs by online gradient descent.
- 2006–2007 — Hazan, Agarwal, Kale (COLT 2006; Mach Learn 2007): regret for strongly convex costs by gradient descent, and regret for exp-concave costs by ONS, Follow the Approximate Leader, and exponentially weighted online optimization.
- 2016 — Hazan, Introduction to Online Convex Optimization (Found. Trends Optim., arXiv:1909.05207): textbook treatment of ONS with modified parameters.
Setting
The decision set is nonempty, closed, bounded and convex, and bounds its diameter: for all , with the Euclidean norm. The costs are real functions, differentiable at every point of , with gradient bound on . A cost is -exp-concave () if is concave on .
For a matrix , the generalized projection is a point of minimising over .
The Online Newton Step fixes
writes and , plays an arbitrary , and then
The regret after rounds against a comparator is ; the paper's regret is its maximum over .
In Lean the objects are LogRegretOCO.ONS.onsBeta, onsEps, onsMatrix, IsGenProj and IsONSRun, with the regularised Gram matrix regGram and the quadratic form quadForm.
Formalization targets
Goal: Theorem 2 with
For every run of ONS, every horizon with , and every ,
The added condition is what makes the printed constant correct (see Formalization scope).
Milestones
- Lemma 3 (p. 177): for and ,
- Lemma 8 (p. 188): for convex , , and : .
- The display on p. 178: for every run of ONS and ,
- Lemma 12 (p. 191): for , .
- Lemma 11 (p. 190): if , and , then .
Significance
Theorem 2 shows that exp-concavity alone, without strong convexity, suffices for regret logarithmic in , at a per-round cost of one rank-one matrix update and one generalized projection. Its consequences include logarithmic regret for universal portfolio selection with a polynomial-time algorithm, and, by online-to-batch conversion, fast rates for stochastic exp-concave optimization. Lemma 11 (the elliptical potential bound) is used well beyond this paper, in linear bandits and online regression.
The result has been proved on paper since 2007. The remaining work is its machine-checked proof: the potential argument, the log-determinant inequality and the generalized-projection inequality for positive semidefinite matrices. As far as is known, none of these results is formalized in Mathlib. Prove2Me holds a related elliptical potential lemma for linear bandits (BanditAlgorithm.elliptical_potential_lemma, with and a , a different statement) and the Euclidean case of Lemma 8 (UnderstandingML.projection_lemma). The textbook version of ONS (OnlineConvexOpt.SecondOrder.online_newton_step_regret, with and bound ) is an open private draft with different parameters.
Difficulty
The obvious route to logarithmic regret, the gradient-descent argument of Theorem 1 with step sizes , needs a uniform lower bound on the Hessians. Exp-concave costs such as the log-loss have no such bound: their curvature vanishes in directions orthogonal to the gradients seen so far. The analysis therefore has to track curvature only along the observed gradient directions. This requires a matrix-valued potential and a projection in the norm of rather than the Euclidean norm. The Euclidean projection inequality does not transfer to this norm, which changes from round to round. Bounding the potential requires determinant inequalities for positive definite matrices. The analytic facts are elementary, but their Lean statements involve the interaction of EuclideanSpace, Matrix.mulVec, Matrix.inv and Matrix.det.
Formalization scope
Points live in EuclideanSpace ℝ (Fin n), so all norms are Euclidean; matrices are Matrix (Fin n) (Fin n) ℝ acting on coordinate vectors. Rounds are 1-based: sums run over Finset.Icc 1 T and the index is unused. Cost functions are ambient functions , differentiable at the points of , with given by Mathlib's gradient. The paper's standing assumptions of convexity and twice differentiability are not needed and are omitted. enters only as an upper bound on distances in . The generalized projection is a predicate that every minimiser satisfies, and ONS is the predicate IsONSRun on the whole trajectory, so the goal covers every tie-break and every adaptive adversary.
Corrections and added hypotheses:
- Theorem 2 is false as printed at . Take , , , , and : the regret is and the bound is . The paper's proof gives for ; the final sentence drops the additive of the p. 178 display. The goal adds , under which the printed constant follows.
- are assumed wherever or appear: they are the non-degeneracy the formulas presuppose (in Lean, ).
- Lemma 3 adds ; the proof divides by .
- Lemma 11 adds and reads the printed as .
- Lemma 12's product is the entrywise inner product , written out as a double sum.
- The printed "" is read as , and "" on p. 177 as .
Regret is stated against every comparator , never as a real infimum ⨅ over , which is junk-valued in Lean on unbounded or empty sets. The goal is a statement about runs of the paper's algorithm with the paper's , and . A bound for an arbitrary sequence satisfying the p. 178 display would be a milestone, not Theorem 2. The hypotheses are jointly satisfiable: the closed unit ball with , , , is a model.
A complete development needs: first-order conditions for concave functions on convex sets at boundary points; the optimality condition for minimising a convex quadratic over a convex set; spectral facts about symmetric positive definite matrices (square roots, eigenvalues, and ); and the telescoping of log-determinants. Lemmas 8, 11 and 12 are reusable beyond this mission, in the sibling missions of this series (Follow the Approximate Leader) and in linear-bandit analyses. Proofs of any milestone are welcome, as are alternative proofs of Lemma 12 through concavity of .
Selected references
- E. Hazan, A. Agarwal, S. Kale, Logarithmic regret algorithms for online convex optimization, Machine Learning 69 (2007), 169–192. https://doi.org/10.1007/s10994-007-5016-8
- M. Zinkevich, Online convex programming and generalized infinitesimal gradient ascent, ICML 2003. https://dl.acm.org/doi/10.5555/3041838.3041955
- T. M. Cover, Universal portfolios, Mathematical Finance 1 (1991), 1–29. https://doi.org/10.1111/j.1467-9965.1991.tb00002.x
- E. Hazan, Introduction to Online Convex Optimization, Foundations and Trends in Optimization 2 (2016); 2nd ed. arXiv:1909.05207. https://arxiv.org/abs/1909.05207