Unconstrained Online Linear Learning in Hilbert Spaces: Minimax Algorithms and Normal Approximations
H. Brendan McMahan, Francesco Orabona
Introduction
The online learning framework provides a scalable and flexible approach for modeling a wide range of prediction problems, including classification, regression, ranking, and portfolio management. Online algorithms work in rounds, where at each round a new instance is given and the algorithm makes a prediction. Then the environment reveals the label of the instance, and the learning algorithm updates its internal hypothesis. The aim of the learner is to minimize the cumulative loss it suffers due to its prediction error.
Research in this area has mainly focused on designing new prediction strategies and proving theoretical guarantees for them. However, recently, minimax analysis has been proposed as a general tool to design optimal prediction strategies [Rakhlin et al., 2012, 2013, McMahan and Abernethy, 2013]. The problem is cast as a sequential multi-stage zero-sum game between the player (the learner) and an adversary (the environment), providing the optimal strategies for both. In some cases the value of the game can be calculated exactly in an efficient way [Abernethy et al., 2008a], in others upper bounds on the value of the game (often based on the sequential Rademacher complexity) are used to construct efficient algorithms with theoretical guarantees [Rakhlin et al., 2012].
While most of the work in this area has focused on the setting where the player is constrained to a bounded convex set [Abernethy et al., 2008a] (with the notable exception of McMahan and Abernethy ), in this work we are interested in the general setting of unconstrained online learning with linear losses in Hilbert spaces. In Section 4, extending the work of McMahan and Abernethy , we provide novel and general sufficient conditions to be able to compute the exact minimax strategy for both the player and the adversary, as well as the value of the game. In particular, we show that under these conditions the optimal play of the adversary is always orthogonal or always parallel to the sum of his previous plays, while the optimal play of the player is always parallel. On the other hand, for some cases where the exact minimax strategy is hard to characterize, we introduce a new relaxation procedure based on a Normal approximation. In the particular application of interest, we show the relaxation is strong enough to yield an optimal regret bound, up to constant factors.
In Section 5, we use our new tools to recover and extend previous results on minimax strategies for linear online learning, including results for bounded domains. In fact, we show how to obtain a family of minimax strategies that smoothly interpolates between the minimax algorithm for a bounded feasible set and a minimax optimal algorithm in fact equivalent to unconstrained gradient descent. We emphasize that all the algorithms from this family are exactly minimax optimal,In this work, we use the term “minimax” to refer to the exact minimax solution to the zero sum game, as opposed to algorithms that only achieve the minimax optimal rate up to say constant factors. in a sense we will make precise in the next section. Moreover, if you are allowed to play outside of the comparator set, we show that some members of this family have a non-vacuous regret bound for the unconstrained setting, while remaining optimal for the constrained one.
When studying unconstrained problems, a natural question is how small we can make the dependence of the regret bound on , the norm of an arbitrary comparator point, while still maintaining a dependency on the time horizon. The best algorithm from the above family achieves . Streeter and McMahan and Orabona show it is possible to reduce the dependence on to . In order to improve on this, in Section 6 we apply our techniques to analyze a strategy, based on a Normal potential function, that gives a regret bound of \mathcal{O}\Big{(}U\sqrt{T\log(U\sqrt{T}\log^{2}T+1)}\Big{)} where is the norm of a comparator, and both and are unknown. This bound is optimal up to terms. Moreover, when is known, we propose an algorithm based on a similar potential function that is optimal up to constant terms. This solves the open problem posed in those papers, matching the lower bound for this problem. Table 1 summarizes the regret bounds we prove, along with those for related algorithms.
Our analysis tools for both known- and unknown horizon algorithms rest heavily on the relationship between the reward (negative loss) achieved by the algorithm, potential functions that provide a benchmark for the amount of reward the algorithm should have, the regret of the algorithm with respect to a post-hoc comparator , and the conditional value of the game. These are familiar concepts from the literature, but we summarize these relationships and provide some modest generalizations in Section 3.
Notation and Problem Formulation
We consider a version of online linear optimization, a standard game for studying repeated decision making. On each of a sequence of rounds, a player chooses an action , an adversary chooses a linear cost function , and the player suffers loss . For any sequence of plays and , we define the regret against a comparator in the standard way:
We write , where we use the compressed summation notation .
It will be useful to consider a full game-theoretic characterization of the above interaction when the number of rounds is known to both players. This approach that has received significant recent interest [Abernethy et al., 2008a, 2007, Abernethy and Warmuth, 2010, Abernethy et al., 2008b, Streeter and McMahan, 2012].
In the constrained setting, where the comparator vector , we have that the value of the game, that is the regret when both the player and the adversary play optimally, is
We define inductively the conditional value of the game after have been played by
Thus, we can view the notation for the value of the game as shorthand for . Under minimax play by both players, unrolling the previous equality, we have or for ,
We also have that, given the conditional value of the game, a minimax-optimal strategy is
McMahan and Abernethy [2013, Cor. 2] showed that in the unconstrained case, is a smoothed version of , where the smoothing comes from an expectation over future plays of the adversary. In this work, we show that in some cases (Theorem 4) we can find a closed form for in terms of , and in fact the solution to (3) will simply be the gradient of , or equivalently, an FTRL algorithm with regularizer . On the other hand, to derive our main results, we face a case (Theorem 6) where is generally not expressible in closed form, and the resulting algorithm does not look like FTRL. We solve the first problem by using a Normal approximation to the adversary’s future moves, and we solve the second by showing (3) can still be solved in closed form with respect to this approximation to .
Potential Functions and the Duality of Reward and Regret
These views are of course closely connected, but can lead to somewhat different analysis techniques. Following the last view, suppose we interpret as the desired reward at the end of round , given the adversary has played so far. Then, if we can bound our actual final reward in terms of , we also immediately get a regret bound stated in terms of the Fenchel conjugate . Generalizing Streeter and McMahan [2012, Thm. 1], we have the following result (all omitted proofs can be found in the Appendix).
First we consider the minimax setting, where we define the game in terms of a convex benchmark . Then, (2) gives us an immediate lower bound on the reward of the minimax strategy for the player (against any adversary), and so applying Theorem 1 with gives
The fundamental point, of which we will make much use, is this: even if one only cares about the traditional definition of regret, the study of the minimax game defined in terms of a general comparator benchmark may be interesting, as the minimax algorithm for the player may then give novel bounds on regret. Note when is defined as in (1), the theorem implies . More generally, even for non-minimax algorithms, Theorem 1 states that understanding the reward (equivalently, loss) of an algorithm as a function of the sum of gradients chosen by the adversary is both necessary and sufficient for understanding the regret of the algorithm.
Now we consider the potential function view. The following general bound for any sequence of plays against gradients , for an arbitrary sequence of potential functions , has been used numerous times (see Orabona [2013, Lemma 1] and references therein). The claim is that
where we take , and assume . In fact, this statement is essentially equivalent to the argument of (4) and (5). For intuition, we can view as the amount of money we wish to have available at the end of round . Suppose at the end of each round , we borrow an additional sum as needed to ensure we actually have on hand. Then, based on this invariant, the amount of reward we actually have after playing on round is , the money we had at the beginning of the round, plus the reward we get for playing . Thus, the additional amount we need to borrow at the end of round in order to maintain the invariant is exactly
recalling . Thus, if we can find bounds such that for all , , and ,
we can re-state (7) as exactly (5) with and . Further, solving (8) for the per-round reward , summing from to and canceling telescoping terms gives exactly (4). Not surprisingly, both Theorem 1 and (7) can be proved in terms of the Fenchel-Young inequality.
When is known, and the are chosen carefully, it is possible to obtain . On the other hand, when is unknown to the players, typically we will need bounds . For example, in both Streeter and McMahan [2012, Thm. 6] and Orabona , the key is showing the sum of these terms is always bounded by a constant. For completeness, we also state standard results where we interpret as a regularizer.
The updates of many algorithms are based on a time-varying version of the FTRL strategy,
where we view as a time-varying regularizer (see Orabona et al. and references therein). Regret bounds can be easily obtained using (7) when the regularizers are increasing with , and they are strongly convex w.r.t. a norm , using the fact that the potential functions will be strongly smooth. Then strong smoothness and particular choice of implies
where the last inequality follows from the fact that if , then (immediate from the definition of the conjugate).
When the regularizer is fixed, that is, for all for some convex function , we get the approach pioneered by Grove et al. and Kivinen and Warmuth :
where is the Bregman Divergence with respect to , and we predict with .
Admissible relaxations and potentials
We extend the notion of relaxations of the conditional value of the game of Rakhlin et al. to the present setting. We say with corresponding strategy is a relaxation of if
for constants . This definition matches Eq. (4) of Rakhlin et al. if we force all , but if we allow some slack , (13) corresponds exactly to (8) and (9).
Note that (13) is invariant to adding a constant to all . In particular, given an admissible , we can define so and satisfies (9) with the same values for which satisfies (13). Or we could define and for , and take (or any other way of distributing the into the ). Generally, when is known we will find working with admissible relaxations to be most useful, while for unknown horizons , potential functions with will be more natural.
For our admissible relaxations, we have a result that closely mirrors Theorem 1:
Let be an admissible relaxation for a benchmark . Then, for any sequence , for any chosen so (13) and (12) are satisfied, we have
For the first statement, re-arranging and summing (13) shows and so final ; the second result then follows from Theorem 1. ∎
The regret bound corresponds to (6); in particular, if we take to be the conditional value of the game, then (12) and (13) hold with equality with all . Note if we define as in (1), the regret guarantee becomes analogous to [Rakhlin et al., 2012, Prop. 1] when .
Deriving algorithms
Consider an admissible relaxation . Given the form of the regret bounds we have proved, a natural strategy is to choose so as to minimize , that is,
following Rakhlin et al. [2012, Eq. (5)], Rakhlin et al. , and Streeter and McMahan [2012, Eq. (8)]. We see that is standing in for the conditional value of the game in (3). Since additive constants do not impact the argmin, we could also replace with a potential , say .
Minimax Analysis Approaches for Known-Horizon Games
In general, the problem of calculating the conditional value of a game is hard. And even for a known potential, deriving an optimal solution via (14) is also in general a hard problem. When the player is unconstrained, we can simplify the computation of and the derivation of optimal strategies. For example, following ideas from McMahan and Abernethy ,
where is the set of probability distributions on . McMahan and Abernethy shows that in some cases is possible to easily calculate this maximum, in particular when and decomposes on a per-coordinate spaces (that is, when the problem is essentially independent, one-dimensional problems).
In this section we will state two quite general cases where we can obtain the exact value of the game, even though the problem does not decompose on a per coordinate basis. Note that in both cases the optimal strategy for will be in the direction of .
where is a fixed parameter. For results regarding this game, we let , , and . Also, let if , and otherwise.
Note that can be viewed as a smoothed version of , since is a smoothed version of for a constant . Moreover, .
Let the adversary play from and assume all the satisfy
Then the value of the game is , the conditional value is , and the optimal strategy can be found using (14) on .
Further, a sufficient condition for (16) is that , is twice differentiable, and , for all . In this case we also have that the minimax optimal strategy is
In this case, the minimax optimal strategy (20) is equivalent to the FTRL strategy in (10) with the time varying regularizer . The key lemma needed for the proof is the following:
Consider the game of (15). Then, if , is twice differentiable, and for , we have:
Any such that and is a minimax play for the adversary.
We defer the proofs to the Appendix (of the proofs in the appendix, the proof of Lemmas 5 and 8 are perhaps the most important and instructive). Since the best response of the adversary is always to play a orthogonal to , we call this the case of the orthogonal adversary.
2 The case of the parallel adversary, and Normal approximations
We analyze a second case where (15) has closed-form solution, and hence derive a class of games where we can cleanly state the value of the game and the minimax optimal strategy. The results of McMahan and Abernethy can be viewed as a special case of the results in this section.
First, we introduce some notation. We write when and are clear from context. We write to indicate is a Rademacher random variable, and to indicate is the sum of IID Rademacher random variables. Let . We write for a random variable with distribution , and similarly define . Then, define
and note since and are always zero. These functions are exactly smoothed version of the function used to define . With these definitions, we can now state:
then is exactly the conditional value of the game, and (14) gives the minimax optimal strategy:
Similarly, suppose the satisfy the equality (19) (with replacing ). Then is an admissible relaxation of , satisfying (13) with , using based on (14). Further, a sufficient condition for (19) is that , or , the (or , respectively) are twice differentiable, and satisfy and for all .
Contrary to the case of the orthogonal adversary, the strategy in (20) cannot easily be interpreted as an FTRL algorithm. The proof is based on two lemmas. The first provides the key tool in supporting the Normal relaxation:
The latter two terms vanish, giving the stated inequality. ∎
The second lemma is used to prove the sufficient condition by solving the one-round game; again, the proof is deferred to the Appendix. Note that functions of the form , with convex always satisfies the conditions of the following Lemma.
Consider the game of (15). Then, if , or if , is twice differentiable, and for , then
Any that satisfies and G is a minimax play for the adversary.
The adversary can always play when , and so we describe this as the case of the parallel adversary. In fact, inductively this means that all the adversary’s plays can be on the same line, providing intuition for the fact that this lemma also applies in the 1-dimensional case.
A Power Family of Minimax Algorithms
We analyze a family of algorithms based on potentials where for parameters and , when the dimension is at least two. This is reminiscent of -norm algorithms [Gentile, 2003], but the connection is superficial—the norm we use to measure is always the norm of our Hilbert space. Our main result is:
Let and , and let and be defined as above. Define f_{t}(x)=\frac{W}{p}\big{(}x^{2}+(T-t)G\big{)}^{p/2}. Then, is the conditional value of the game, and the optimal strategy is as in Theorem 4. If , letting such that , we have a bound
where the second inequality comes by taking . For all , the bound \big{(}\tfrac{1}{p}+\tfrac{1}{q}\|u\|^{q}\big{)}G\sqrt{T} is minimized by taking . For , we have
Let for , Then, , in fact basic calculations show when . Hence, we can apply Theorem 4, proving the claim on the . The regret bounds can then be derived from Corollary 2, which gives noting when . The fact that is an optimal choice in the first bound follows from the fact that for with . ∎
The case in fact exactly recaptures the result of Abernethy et al. [2008a] for linear functions, extending it also to spaces of dimension equal to two. The optimal update is . In addition to providing a regret bound for the comparator set , the algorithm will in fact only play points from this set.
for any . In this case we see is behaving not like the radius of a comparator set, but rather as a learning rate. In fact, we have and so we see this minimax-optimal algorithm is in fact constant-step-size gradient descent. Taking yields . This result complements McMahan and Abernethy [2013, Thm. 7], which covers the case, or when the adversary plays from .
Comparing the and algorithms reveals an interesting fact. For simplicity, take . Then, the algorithm with is exactly the minimax optimal algorithm for minimizing regret against comparators in the ball (for ): the value of this game is and we can do no better (even by playing outside of the comparator set). However, picking gives us algorithms that will play outside of the comparator set. While they cannot do better than , taking and shows that all algorithms in this family in fact achieve when , matching the exact minimax optimal value. Further, the algorithms with provide much stronger guarantees, since they also give non-vacuous guarantees for , and tighter bounds when . This suggests that the algorithm will be the most useful algorithm in practice, something that indeed has been observed empirically (given the prevalence of gradient descent in real applications). This result also clearly demonstrates the value of studying minimax-optimal algorithms for different choices of the benchmark , as this can produce algorithms that are no worse and in some cases significantly better than minimax algorithms defined in terms of regret minimization directly (i.e., via (1)).
The key difference in these algorithms is not how they play against a minimax optimal adversary for the regret game, but how they play against non-worst-case adversaries. In fact, a simple induction based on Lemma 5 shows that any minimax-optimal adversary will play so that . Against such an adversary, the algorithm is identical to the algorithm with learning rate . In fact, using the choice of from Corollary 9, all of these algorithms play identically against a minimax adversary for the regret game.
Tight Bounds for Unconstrained Learning
In this section we analyze algorithms based on benchmarks and potentials of the form , and show they lead to a minimal dependence on in the corresponding regret bounds for a given upper bound on regret against the origin (equal to the loss of the algorithm).
First, we derive a lower bound for the known game. Using Lemma 14 in the Appendix, we can show that the benchmark approximately corresponds to a regularizer of the form ; there is actually some technical challenge here, as the conjugate cannot be computed in closed form—the given regularizer is an upper bound. This kind of regularizer is particularly interesting because it is related to parameter-free sub-gradient descent algorithms [Orabona, 2013]; a similar potential function was used for a parameter-free algorithm by [Chaudhuri et al., 2009]. The lower bound for this game was proven in Streeter and McMahan for 1-dimensional spaces, and Orabona extended it to Hilbert spaces and improved the leading constant. We report it here for completeness.
Fix a non-trivial Hilbert space and a specific online learning algorithm. If the algorithm guarantees a zero regret against the competitor with zero norm, then there exists a sequence of cost vectors in , such that the regret against any other competitor is . On the other hand, if the algorithm guarantees a regret at most of against the competitor with zero norm, then, for any , there exists a and a sequence of unitary norm vectors , and a vector such that
Consider the game with fixed known , an adversary that plays from , and
for constants and . We will show that we are in the case of the parallel adversary, Section 4.2. Both computing the based on Rademacher expectations and evaluating the sufficient condition for those appear quite difficult, so we turn to the Normal approximation. We then have
where we have computed the expectation in a closed form for the second equality. One can quickly verify that it satisfies the hypothesis of Theorem 6 for , hence will be an admissible relaxation. Thus, by Corollary 2, we immediately have
and so by Lemma 14 in the Appendix, we can state the following Theorem, that matches the lower bound up to a constant multiplicative factor.
Let , and . Denote by if , and otherwise. Fix the number of rounds of the game, and consider the strategy
Then, for any sequence of linear costs , and any , we have
2 AdaptiveNormal: an adaptive algorithm for unknown T𝑇T
Our techniques suggest the following recipe for developing adaptive algorithms: analyze the known case, define a potential , and then analyze the incrementally-optimal algorithm for this potential (14) via Theorem 1. We follow this recipe in the current section. Again consider the game where an adversary that plays from . Define the function as
where , and the is a decreasing sequence that will be specified in the following. From this, we define the potential Suppose we play the incrementally-optimal algorithm of (14). Using Lemma 8 we can write the minimax value for the one-round game,
Using Lemma 17 in the Appendix and our hypothesis on , we have that the RHS of this inequality is maximized for . Hence, using the inequality , we get
Thus, choosing , for example, is sufficient to prove that is bounded by [Baxley, 1992]. Hence, again using Corollary 2 and Lemma 14 in the Appendix, we can state the following Theorem.
Let , and . Denote by if , and otherwise. Consider the strategy
Then, for any sequence of linear costs , and any , we have
References
Appendix A Proofs
Suppose the algorithm provides the reward guarantee (4). First, note that for any comparator , by definition we have
Then, applying the definitions of Reward, Regret, and the Fenchel conjugate, we have
For the other direction, assuming (5), we have for any comparator ,
Alternatively, one can prove this from the Fenchel-Young inequality. ∎
A.2 Proof of Lemma 3
We have . If , the stated equality is correct, in fact
Hence we can assume , and by inspection we can take , with , and so
A.3 Proof of Theorem 4
First we show that if satisfies the condition on the derivatives, the same conditions is satisfied by , for all t. We have that all the have the form , where . Hence we have to prove that . We have that , and , so
where in the inequality we used the hypothesis on the derivatives of .
We show has the stated form by induction from down to 0. The base case for is immediate. For the induction step, we have
The sufficient condition for (16) follow immediately from Lemma 5. ∎
A.4 Proof of Theorem 6
First, we need to show the functions and of (18) are even. Let be a random variable draw from any symmetric distribution. Then, we have
where we have used the fact that is even and the symmetry of .
We show inductively from down to . The base case follows from the definition of . Then, suppose the result holds for . We have
where the last two lines follow from the definition of and . The case for is similar, using the hypothesis of the Theorem we have
where in the inequality we used Lemma 7, and in the second equality the definition of . Hence, satisfy (13) with . Finally, the sufficient conditions come immediately from Lemma 8. ∎
A.5 Analysis of the one-round game: Proofs of Lemmas 5 and 8
In the process of proving these lemmas, we also show the following general lower bound:
Under the same definitions as in Lemma 5, if , we have
We now proceed with the proofs. The case for Lemma 8 was was proved in McMahan and Abernethy .
Before proving the other results, we simplify a bit the formulation of the minimax problem. For the other results, the maximization wrt of a convex function is always attained when . Moreover, in the case of the other results are true, in fact
Hence, without loss of generality, in the following we can write , where . It is easy to see that in all the cases the optimal choice of turns out to be , where . With these settings, the minimax problem is equivalent to
By inspection, the player can always choose so . Hence we have a simplified and equivalent form of our optimization problem
For Lemma 13, it is enough to set in (22).
For Lemma 5, we upper bound the minimum wrt to with the specific choice of . In particular, we set in (22), and get
The derivative of argument of the max wrt is
We have that if the first derivative is 0. Using the hypothesis on the first and second derivative of , we have that the second term in (23) increases in . Hence is the maximum. Comparing the obtained upper bound with the lower bound in Lemma 13, we get the stated equality.
For Lemma 8, the second derivative wrt of the argument of the minimax problem in (22) is
that is non negative, for our hypothesis on the derivatives of . Hence, the argument of the minimax problem is convex wrt , hence the maximum is achieved at the boundary of the domains, that is . So, we have
The argmin of this quantity wrt to is obtained when the the two terms in the max are equal, so we obtained the stated equality.
A.6 Lemma 14
Define , for . Then
From the definition of Fenchel dual, we have
where . We now use the fact that satisfies , that is
in other words we have that and are in the same direction. Hence we can set , so that . We now need to look for , solving
Using the elementary inequality , we have
We set such that , that is . Hence we have and , and obtain
A.7 Lemma 17
Let . If , , and , then the function is decreasing for .
The proof is immediate from the study of the first derivative. ∎
Let , with . Then for any .
The sign of the first derivative of the function has the same sign of
hence from the hypothesis on and the function is strictly increasing. Moreover the asymptote for is 1, hence we have the stated upper bound. ∎
Let , . If , then
The function is even, so we have a maximum in zero iff the function is decreasing for . Observe that, from Lemma 16, for any
Hence, using Lemma 15, we obtain that the stated result. ∎