Rémi Jézéquel

Pierre Gaillard

Alessandro Rudi

EFFICIENT IMPROPER LEARNING FOR ONLINE LOGISTIC REGRESSION

 showed that the lower bound does not apply to improper algorithms and proposed a strategy based on exponential weights with prohibitive computational complexity. Our new algorithm based on regularized empirical risk minimization with surrogate losses satisfies a regret scaling as O(B log(Bn)) with a per-round time-complexity of order O(d 2 + log(n)).

Introduction

In online learning, a learner sequentially interacts with an environment and tries to learn based on data observed on the fly [Cesa-Bianchi andLugosi, 2006, Hazan et al., 2016]. More formally, at each iteration t 1, the learner receives some input x t in some input space X ; makes a prediction y t in a decision domain Y and the environment reveals the output y t ∈ Y. The inputs x t and the outputs y t are sequentially chosen by the environment and can be arbitrary. No stochastic assumption (except boundedness) on the data sequence (x t , y t ) 1 t n is made. The accuracy of a prediction y t ∈ Y at instant t 1 for the outcome y t ∈ Y is measured through a loss function : Y × Y → R. The learner aims at minimizing his cumulative regret

R n (f ) = n t=1 y t , y t - n t=1 f (x t ), y t , (1)
uniformly over all functions f in a reference class of functions F. All along this paper, we will consider the more specific setting of online logistic regression for binary classification. The latter corresponds to binary outputs y t ∈ Y = {-1, 1}, real decisions y t ∈ Y = R, the logistic loss function : ( y t , y t ) → log(1 + e -yt yt ) and the reference class F = {x → θ x; θ ∈ B(R d , B)} of linear functions in the 2 -ball of radius B > 0.

Logistic regression, which dates back to [Berkson, 1944], has been widely studied in the past decades both in the statistical and online setting. It allows to estimate conditional probabilities and is heavily used in practice for multi-class and binary classification. Since the statistical literature is abundant, we highlight here only the key existing approaches for online logistic regression that are relevant for the present work. Using basic properties of the logistic loss, classical algorithms from Online Convex Optimization can be used to minimize the regret (1). On the one hand, remarking that the logistic loss is convex and Lipschitz, one may use Online Gradient Descent (OGD) of [Zinkevich, 2003], which guarantees a regret of order O(B √ n). On the other hand, using that the logistic loss is e -B -exp concave, one can use Online Newton Step (ONS) from [START_REF] Hazan | Logarithmic regret algorithms for online convex optimization[END_REF] which achieves a logarithmic regret of order O(de B log(n)).

In view of this results, one could wonder if obtaining a better dependence on the number of samples comes with an exponential deterioration on the multiplicative constant in B. [START_REF] Hazan | Logistic regression: Tight bounds for stochastic and online optimization[END_REF] considered this exact question and showed that indeed any proper algorithm in the regime n = O(e B ) has at least a worst-case regret of order Ω(B 2/3 n 1/3 ) for one dimensional inputs. Therefore any bound of the form O(B log(n)) is impossible for proper algorithms. We recall that an algorithm is called proper if its prediction function f t : X → Y is in the reference class F. In other words, it means that for all t 1, the prediction is of the form y t = f t (x t ) with f t ∈ F independent of x t (i.e., the prediction function is linear in x t in our case).

However, it was recently shown that this lower-bound does not apply to improper algorithms [START_REF] Foster | Logistic regression: The importance of being improper[END_REF]. Indeed, based on the simple observation that the logistic loss is 1-mixable (see [Vovk, 1998] for the definition), they could apply Vovk's Aggregating Algorithm [Vovk, 1998] which leverages mixability to achieve a regret of order O(d log(Bn)). In particular, they showed that for online logistic regression improper algorithms can significantly outperform proper algorithms by proving a doubly-exponential improvement on the constant B. Yet, the complexity of their algorithm, while being polynomial in d and n is highly prohibitive making the algorithm infeasible in practice. Vovk's Aggregating Algorithm is indeed based on a continuous version of the exponentially weighted average forecaster. To output a prediction one needs to approximate an integral over the d-dimensional ball which requires the use of MCMC approximations. Using the projected Langevin Monte Carlo sampler from [START_REF] Bubeck | Sampling from a log-concave distribution with projected langevin monte carlo[END_REF], they record a computation time of O(B 6 n 12 (Bn + d) 12 ). This is the starting point of this work. Can we achieve similar performance in online logistic regression with practical computational complexity? Recently, some works attacked this question for logistic regression in the batch statistical setting with i.i.d. data only. [START_REF] Marteau-Ferey | Beyond least-squares: Fast rates for regularized empirical risk minimization through self-concordance[END_REF] considered the classical regularized empirical risk minimizer (ERM). Though the latter is proper, using generalized self-concordance properties they could avoid the exponential constant in B under additional assumptions including a well-specified problem, capacity and source conditions. In parallel and independently of this work, [START_REF] Mourtada | An improper estimator with optimal excess risk in misspecified density estimation and logistic regression[END_REF] have also designed a practical improper algorithm in the statistical setting based on ERM with an improper regularization using virtual data. They could provide an upper-bound on the excess risk in expectation of order O((d + B 2 )/n). However, they left open the question of achieving it in an online setting.

Contributions

In this paper, we introduce a new practical improper algorithm, that we call AIOLI (Algorithmic efficient Improper Online LogIstic regression), for online logistic regression. The latter is based on Follow The Regularized Leader (FTRL) [McMahan, 2011] with surrogate losses. AIOLI takes inspiration from the Azoury-Warmuth-Vovk forecaster (also named non-linear Ridge regression or AWV) from [Vovk, 2001] and [START_REF] Azoury | Relative loss bounds for on-line density estimation with the exponential family of distributions[END_REF] which adds a non-proper penalty based on the next input x t and from Online Newton Step [START_REF] Hazan | Logarithmic regret algorithms for online convex optimization[END_REF] which leverages the exp-concavity of logistic regression to achieve logarithmic regret. The per-round space and time complexity of AIOLI is of order (O(nd 2 + n log(n)) which is close to the one of ONS and greatly improves the ones of [START_REF] Foster | Logistic regression: The importance of being improper[END_REF].

We provide in Theorem 1 an upper-bound on the regret of AIOLI of the order O(dB log(Bn)). This makes AIOLI provably better than any proper algorithm in the regime where n = O(e B ). To illustrate our results, we provide simulations on synthetic data generated by the adversarial distribution of [START_REF] Hazan | Logistic regression: Tight bounds for stochastic and online optimization[END_REF] that show that, contrary to classical FTRL, the regret of AIOLI is indeed logarithmic. We summarize in Table 1 the rates and per-round computational complexities of the key-algorithms for logistic regression.

In addition to introducing AIOLI , we make two technical contributions that we believe to be of their own interests. Our first technical contribution is based on the simple observation that the logistic function x → log(1 + e -x ) is only e -B -exp concave on [-B, B] when x is close to -B. For the rest of the range (typically x ∈ [0, B]), far better exp-concavity parameters (that we also refer to as curvature) may be achieved. Therefore, contrary to ONS which uses the worst-case value for the curvature, we consider quadratic approximations of the logistic loss with data-dependent curvature parameters. These approximations are used as surrogate losses minimized by AIOLI .

Our second technical contribution is to use an improper regularization that allows us to not pay the worst curvature but only the one for x close to 0. This regularization is inspired from the non-linear Ridge forecaster of [START_REF] Azoury | Relative loss bounds for on-line density estimation with the exponential family of distributions[END_REF]] and [Vovk, 2001]. Typically, when a new input x t is observed by the learner, the latter can use it to regularize more in the direction of x t . If the learner knew the next output y t a good regularization would be to add the loss (f (x t ), y t ) when computing FTRL. Yet y t is unknown and the learner must use a regularization independent of y t . The non-linear Ridge forecaster consists in replacing y t by 0. Instead, AIOLI regularizes by adding both (f (x t ), 1) and (f (x t ), -1) to the empirical loss to be minimized. The important phenomena is that the dominant regularization is (f (x t ), y t ) if y t θ t x t 0, that is when the algorithm makes a large error. It is worth emphasizing that this regularization depends on the next input x t and thus makes our algorithm improper. We believe this type of regularization to be new for online logistic regression and have significant interest to inspire future work.

Algorithm

OGD

ONS [START_REF] Foster | Logistic regression: The importance of being improper[END_REF] Setting and notation We recall the setting and introduce the main notations that will be used all along the paper. Our framework is formalized as a sequential game between a learner and an environment. At each forecasting instance t 1, the learner is given an input x t ∈ X ⊆ B(R d , R) for some radius R > 0 and dimension d 1; chooses a vector θ t ∈ R d (possibly based on the current input x t and on the past information x 1 , y 1 , . . . , x t-1 , y t-1 ); and makes the prediction y t = θ t x t ∈ R. Then, the environment chooses y t ∈ {-1, 1}; reveals it to the learner which incurs the loss t ( θ t ) = ( θ t x t , y t ) where for all θ ∈ R d , θ x t , y t = log 1 + e -ytθ xt .

Moreover, the gradients of the loss functions at the estimator will be denoted as g t = ∇ t ( θ t ) ∈ R d . We recall that the goal of the learner is to minimize the cumulative regret

R n (θ) = n t=1 θ t x t , y t - n t=1 θ x t , y t ,
uniformly over all θ ∈ B(R d , B) and all possible sequences (x 1 , y 1 ), ..., (x n , y n ) ∈ X × Y.

Main contributions

This section gathers the main contributions of the present paper. Essentially, we introduce in Section 2.1 our new algorithm for online logistic regression. In Section 2.2, we prove the corresponding upper-bounds on the regret and we provide an efficient implementation in Section 2.3.

AIOLI : a new algorithm for online logistic regression

We introduce here and briefly describe a new algorithm AIOLI for online logistic regression. More details on the underlying ideas are provided in Section 3. AIOLI is based on FTRL which is applied on surrogate quadratic losses and with an additional improper regularization. It requires the knowledge of three hyper-parameters: a regularization parameter λ > 0, the diameter of the input space R > 0 and the diameter of the reference class B > 0. At each forecasting instance t 1, we first define the following quadratic approximations of the past losses for 1 s < t that are defined by: for all θ

∈ R d s (θ) = s ( θ s ) + g s (θ -θ s ) + η s 2 (θ -θ s ) g s g s (θ -θ s ) , with η s = e ys ys 1 + BR . ( 2
)
This approximation is discussed more in details in Section 3.1. The main point to be noticed is that the curvature parameters η s are adapted to the predictions of the algorithms y s in contrast to ONS which uses the worst-case values e -B for all s 1.

Then, AIOLI computes the following estimator

θ t = argmin θ∈R d t-1 s=1 s (θ) + (θ x t , 1) + (θ x t , -1) + λ θ 2 (3)
and predicts y t = θ t x t .

We point out that both regularization terms use the original logistic loss and not its approximation t . Still, t ( θ t ) equals ( θ t x t , y t ). Remark that this algorithm is indeed improper since θ t depends on the next input x t which implies a non-linear prediction y t = θ t x t (see Figure 1). We propose in Section 2.3 an efficient scheme to sequentially compute θ t with low computational and storage complexities.

Figure 1: Example of prediction functions obtained by FTRL, AIOLI and the algorithm of [START_REF] Foster | Logistic regression: The importance of being improper[END_REF].

Logarithmic upper-bound on the regret without exponential constants

We state now our main theoretical result which is an upper bound on the regret suffered by AIOLI .

Theorem 1. Let λ, R, B > 0 and d, n 1. Let (x 1 , y 1 ), ..., (x n , y n ) ∈ X × Y be an arbitrary sequence of observations. AIOLI (as defined in Equation (3)) run with regularization parameter λ > 0 satisfies the following upper-bound on the regret

R n (θ) λ θ 2 + d(1 + BR) log 1 + nR 2 8d(1 + BR)λ , for all θ ∈ B(R d , B). In particular, by choosing λ = 1 B 2 , it yields for all θ ∈ B(R d , B) R n (θ) d(1 + BR) log 1 + nB 2 R 2 8d(1 + BR) + 1 . ( 4
)
This theorem is a consequence of the more general theorem 7 which is deferred to Appendix B. We only highlight below the key ingredients of the proof. Theorem 1 states that the regret of AIOLI is logarithmic in n with a multiplicative constant of order dB which is an exponential improvement in B over the one achieved by proper algorithms such as ONS [START_REF] Hazan | Logarithmic regret algorithms for online convex optimization[END_REF]]. Yet, our regret upper-bound is weaker than the one of [START_REF] Foster | Logistic regression: The importance of being improper[END_REF] which is of order O(d log(Bn)). Their algorithm however requires a prohibitive time complexity of order O(B 6 n 12 (Bn + d) 12 ) through complex MCMC procedures. We leave for future work the question weather their regret is achievable by our algorithm or not.

Sketch of proof

The proof of the theorem is based on two main steps: 1) we upper-bound the cumulative regret using the true losses by the cumulative regret using the quadratic surrogate losses; 2) we can then follow (with some adjustments) the analysis for online linear regression with squared loss of [START_REF] Azoury | Relative loss bounds for on-line density estimation with the exponential family of distributions[END_REF]] and [Vovk, 2001] (see also the proof of [START_REF] Gaillard | Uniform regret bounds over R d for the sequential linear regression problem with the square loss[END_REF]). Fix θ ∈ B(R d , B).

Step 1. The first step (i.e., the upper-bound of the regret with the surrogate regret) uses the key Lemma 5, which implies that the quadratic surrogate loss are lower-bounds on the logistic losses. That is,

∀t 1, t (θ) t (θ). Using that by definition (see Equation (2)) we also have t ( θ t ) = t ( θ t ) for all t 1, this entails t ( θ t ) -t (θ) t ( θ t ) -t (θ), which implies R n (θ) = n t=1 t ( θ t ) - n t=1 t (θ) n t=1 t ( θ t ) - n t=1 t (θ) = R n (θ) .
Step 2. Using that the surrogates losses t are quadratic, the second part of the proof follows the one of [START_REF] Gaillard | Uniform regret bounds over R d for the sequential linear regression problem with the square loss[END_REF] for online least square regression. After technical linear algebra computation, this leads to

R n (θ) n t=1 (θ t+1 -θ t ) A t (θ t+1 -θ t ) -(θ t -θ t ) A t-1 (θ t -θ t ) ,
where A t = λI + t s=1 ηs 2 g s g s and we recall that g s = ∇ s ( θ s ) and η t = e yt yt /(1 + BR). Using the definition of θ t , after some computations, we can upper-bound

(θ t+1 -θ t ) A t (θ t+1 -θ t ) -(θ t -θ t ) A t-1 (θ t -θ t ) - 1 2 g t A -1 t g -yt t .
Note that either g t or g -yt t is small. More precisely, if η t is exponentially small then this is also the case for g -yt t which is key to avoid the exponential constant. It should be put in comparison with the bound g t A -1 t g t that one would have obtained with the FTRL algorithm. More precisely, we have the following relation g

-yt t = -(1 + BR)η t g t which leads to R n (θ) (1 + BR) n t=1 η t 2 g t A -1 t g t .
This leaves us with a telescoping sum that finally provides the final regret upper-bound of the theorem.

Efficient Implementation

In this section, we show how to compute incrementally the proposed forecaster θ t , defined in (3). First, we defined the sufficient statistics used by AIOLI as

A t = λI + 1 2 t s=1 η s g s g s , b t = 1 2 t s=1
(η s g s θ s -1)g s .

(5)

In the next lemma we characterize also

θ t in terms A t-1 , b t-1 , x t . Lemma 2 (Characterizing θ t given A t-1 , b t-1 , θ t , x t ).
Using the notation above define

W t = L -1 t-1 (b t-1 , x t ) ∈ R d×2
, where L t-1 is the Cholesky decomposition of A t-1 , i.e. the lower triangular matrix satisfying A t-1 = L t-1 L t-1 and ω t ∈ R 2 is the solution of the following problem

ω t = argmin ω∈R p t Ω t (ω), Ω t (ω) = ω 2 -2u t ω + log(1 + e -v t ω ) + log(1 + e v t ω ), (6)
where p t ∈ {1, 2} is the rank of the matrix W t ,

u t = Σ 1/2 t U e 1 , v t = Σ 1/2
t U e 2 with {U t , Σ t } corresponding to the economic eigenvalue decomposition 1 of W t W t and e 1 = (1, 0), e 2 = (0, 1). Then

θ t = L - t-1 W t U t Σ -1/2 t ω t . (7)
Computing θ t given A t-1 , b t-1 , x t therefore boils down to solving the two dimensional optimization problem in ( 6), for which we can use gradient descent, since Ω t is smooth strongly convex with a small condition number depending only on R 2 /λ, as proven in the next lemma. Lemma 3. Let ε, γ > 0, T ∈ N, let ω t be the solution of (6) and let ω T t be defined recursively as

ω i t = ω i-1 t -γ∇Ω t (ω i-1 t ), ∀i ∈ {1, . . . , T }.
Then ω T t -ω t ε, when ω 0 t = 0 and γ, T are chosen as follows

γ = λ 4λ + R 2 , T 4 + R 2 λ log Rt ε √ λ .
The efficient sequential implementation of θ t reported in (1) is obtained by combining the different steps given by: the characterization θ t (Lemma 2); the efficient solution of (6) (Lemma 3); and the fact that L t can efficiently be updated online by doing a Cholesky rank 1 update. More details on the algorithm are provided in Algorithm 2 in Appendix D. The total computational cost is of order O(nd 2 + n log n) as proven in the next theorem. The proof relies on the facts that rank 1 Cholesky updates cost O(d 2 ) and that the cost of w = L -1 v with L ∈ R d×d triangular invertible and v, w ∈ R d (i.e. the solution of a triangular linear system Lw = v) is O(d 2 ) [Golub and Van Loan, 2012].

Parameters λ, T, n, constants B, R initialize L 0 = λ 1/2 I, b 0 = 0, θ 0 = 0 for t = 1, ..., n do receive x t compute W t , U t , Σ t , u t , v t using L t-1 , b t-1 , x t , θ t ,
Rn (θ) λ θ 2 + d(1 + BR) log 1 + nR 2 8d(1 + BR)λ + 1.
Moreover, Algorithm 2 has a total computational complexity

O nd 2 + n R 2 λ log Rn λ + B .
To conclude, note that, when λ = 1 B 2 , the total computational complexity of Algorithm 2 is O(nd 2 + n log n).

Key ideas of the analysis

In this section, we present more in details the two main ideas of our analysis. We believe that they might be of independent technical interest for future work.

Quadratic approximations with adaptive curvature

The main historical approach to prove logarithmic regret for online logistic regression is based on the observation that the logistic losses t : θ → (θ x t , y t ) are α-exp-concave for some fixed exp-concavity parameter α > 0. In other words, for all t 1, the functions θ → exp -α t (θ) are convex. From [Hazan et al., 2016, Lemma 4.2], α-exp-concavity implies in particular that for all θ, θ t ∈ B(R d , B)

t (θ) t ( θ t ) + ∇ t ( θ t ) (θ -θ t ) + η 2 (θ -θ t ) ∇ t ( θ t )∇ t ( θ t ) (θ -θ t ) (8)
where η 1 2 min{ 1 4GB , α}, where G is an upper-bound of the 2 -norm of the gradients. We refer to η as the curvature constant. The above inequality provides a quadratic lower approximation of the logistic loss. It plays a crucial role in the analysis of ONS [START_REF] Hazan | Logarithmic regret algorithms for online convex optimization[END_REF] to provide a logarithmic regret upper-bound of order O( 1 η d log(n)). We can note that in this inequality, η is fixed for all t 1 and independent of θ and θ t . However, for the logistic loss, the best exp-concavity constant α > 0 is of order e -BR which leads to an undesirable exponential multiplicative constant.

Our idea is to replace the worst-case fixed η > 0 with a data adaptive constant η t . To do so, we first remark that at time t 1, the curvature constant is bad (i.e., of order e -BR ) when the prediction y t = θ t x t of the algorithm was significantly wrong. That is, when y t y t ≈ -BR. In contrast, if the algorithm predicted well the sign of the next outcome, i.e., if y t y t 0 then Inequality (8) holds with a much larger curvature constant greater than (1 + BR) -1 . Based on this high-level idea, we could prove Inequality (8) by replacing the fixed curvature η > 0 with

η t = e yt yt 1 + BR . ( 9
)
The latter inequality yielded to our choice of surrogate quadratic approximations t defined in Equation ( 2). This adaptive quadratic lower-approximation of the logistic loss is a direct consequence of the following technical lemma applied with a = y t θ x t , b = y t y t , and C = BR. Lemma 5. Let C > 0 and f : x ∈ R → log(1 + e -x ). Then, for all a ∈ [-C, C] and b ∈ R,

f (a) f (b) + f (b)(a -b) + e b 2(1 + C) f (b) 2 (a -b) 2 .
The proof is postponed to the supplementary material (see Appendix C).

Improper regularization

The other key ingredient of our analysis is to ensure that only the rounds where the curvature η t (9) are large matter in the analysis. This is the role of our new improper regularization added in the definition (3) of θ t . The underlying idea is to add the possible next losses (θ x t , 1) and (θ x t , -1) to the minimization problem solved by AIOLI (see ( 3)).

We explain now the high-level idea why this regularization helps when η t is small. We need to distinguish two cases.

On the one hand, if the prediction is good, i.e., y t and y t have same signs. Then, η t ∝ exp(y t y t ) is large and since the prediction is already good. Thus, the regularization does not hurt much. On the other hand, when y t and y t have opposite signs, the curvature parameter may be exponentially small. But, then the addition of t (θ x t , y t ) greatly improves the predictions of the algorithm in these cases, because the data point (x t , y t ) was already included in the history when optimizing θ t in (1). Moreover, the addition of the the wrong output -y t does not impact much the prediction since in y t we have

( y t , -y t ) = log 1 + e yt yt = log 1 + (1 + BR)η t
which is small whenever η t is small.

Extensions

Non-parametric setting

For the sake of simplicity, the analysis of the present paper was only carried out for finite dimensional logistic regression in R d . Yet, most of the results remain valid for Reproducing Kernel Hilbert Spaces (RKHS) H (see [Aronszajn, 1950] for details on RKHS). Then, Theorem 1 holds by replacing the finite dimension d 1 with the effective dimension

d eff (λ) = Tr(K nn (K nn + λI) -1 ) ,
where the input matrix K nn is defined as (K nn ) i,j = x i x j . The regret is then of order O(Bd eff (Bλ) + λB 2 ). Note that the effective dimension is always upper-bounded by d eff (λ) n/λ, providing in the worst case, the regret upperbound of order O(B √ n) for well-chosen λ. Under the capacity condition, which is a classical assumption for kernels (see [START_REF] Marteau-Ferey | Beyond least-squares: Fast rates for regularized empirical risk minimization through self-concordance[END_REF] for instance), better bounds on the effective dimension are provided which yield to faster regret rates.

In the case of RKHS, using standard kernel trick, the total computational complexity of the algorithm is then O(n 3 ). The latter might be however prohibitive in large dimension. An interesting research direction is to investigate whether we can apply standard approximation techniques such as random features or Nyström projection similarly to what [START_REF] Calandriello | Efficient second-order online kernel learning with adaptive embedding[END_REF] and [START_REF] Jézéquel | Efficient online learning with kernels for adversarial large scale problems[END_REF] did for exp-concave and square loss respectively. In particular, what is the trade-off between computational complexity and regret and what is the lowest complexity that still allows optimal regret?

Online-to-batch conversion

Even in the batch statistical setting, the lower-bound of [START_REF] Hazan | Logistic regression: Tight bounds for stochastic and online optimization[END_REF] holds for proper algorithms and few improper algorithms where introduced to avoid the statistical constant O(e B ). Using the standard online-to-batch conversion [START_REF] Helmbold | On weak learning[END_REF], similarly to the algorithm of [START_REF] Foster | Logistic regression: The importance of being improper[END_REF], our algorithm also provides an estimator with bounded excess risk in expectation. To do so, one can sample an index τ uniformly in {1, . . . , n} and define the estimator fn defined for all x ∈ X by

fn (x) = f τ (x) with f t (x) = θ t (x) x, 1 t T , (10)
where θ t (x) is the solution of the minimization problem (3) by substituting x t with the new input x ∈ X . It is worth pointing out that fn (x) = θ t x is a non-linear function in x and is thus improper. The following corollary controls the excess-risk of ft in expectation. Its proof is standard but short and we recall it for the sake of completeness.

Corollary 6 (Online-to-batch conversion). Let n, d 1 and B, R > 0. Let ν be an unknown distribution over B(R d , R) × {-1, 1} and D n = (x i , y i ) 1 i n be i.i.d. sampled from ν. Then, the estimator fn defined in Equation (10) with λ = 1/B 2 satisfies

E ( fn (X), Y ) - inf θ∈B(R d ,B) E (f (X), Y ) 1 n d(1 + BR) log 1 + nB 2 R 2 8d(1 + BR) + 1 ,
where (X, Y ) ∼ ν and the expectations are taken over (X, Y ), D n and τ .

Proof Let us denote by R b n the upper-bound on the regret in the right-hand side of Equation ( 4). Then,

E ( fn (X), Y ) = E ( f τ (X), Y ) = E 1 n n t=1 ( f t (X), Y ) ( * ) = E 1 n n t=1 f t (x t ), y t E 1 n n t=1 (θ x t , y t ) + R b n n ( * ) = E 1 n n t=1 (θ X, Y ) + R b n n ,
where the equalities ( * ) are because (X, Y ) and (x t , y t ) follow the same distribution and because f t and θ are independent of (x t , y t ) by definition.

Apart from [START_REF] Foster | Logistic regression: The importance of being improper[END_REF], which is non-practical and also based on an online-to-batch conversion, we are only aware of the works of [START_REF] Mourtada | An improper estimator with optimal excess risk in misspecified density estimation and logistic regression[END_REF] and [START_REF] Marteau-Ferey | Beyond least-squares: Fast rates for regularized empirical risk minimization through self-concordance[END_REF]] that improve the exponential constant O(e B ) in the statistical setting. [START_REF] Marteau-Ferey | Beyond least-squares: Fast rates for regularized empirical risk minimization through self-concordance[END_REF] make additional assumptions on the data distribution (self-concordance, well-specified model, capacity and source conditions). Their framework is hardly comparable to ours with constants that may be arbitrarily large in our setting. In contrast, the recent work of [START_REF] Mourtada | An improper estimator with optimal excess risk in misspecified density estimation and logistic regression[END_REF] do provide an improper estimator that satisfies a result very similar to Corollary 6 with an expected bound on the excess risk of order O(d + B 2 R 2 ). Our upper-bound is slightly worse with an additional multiplicative factor BR log(BRn). The log n is due to the online setting in which it is optimal, see for instance the lower-bound of [Vovk, 2001]. Their estimator is based on an empirical regularized risk minimization (with the original losses) with an additional improper regularization using virtual data. They do not analyze the computational complexity but we believe it to be similar to ours. To conclude the comparison, note that in contrast to ours, their analysis relies on the self-concordance property of the logistic loss in contrast to ours.

Simulations

This section illustrates our theoretical results with synthetic experiments and compare the performance of three algorithms: FTRL with 2 -regularization and λ = 1, AIOLI , and the one of [START_REF] Foster | Logistic regression: The importance of being improper[END_REF]. We sample the data points (x t , y t ) ∈ R × {-1, 1} according to the adversarial distributions designed by [START_REF] Hazan | Logistic regression: Tight bounds for stochastic and online optimization[END_REF] to prove the exponential lower bound for proper algorithms. We consider only the case d = 1 because the lower bound for proper algorithms already applies and the algorithm of [START_REF] Foster | Logistic regression: The importance of being improper[END_REF] is practical in this case. Let n 1, B = log(n), χ ∈ {-1, 1} and ε = 0.01, the data (x t , y t ) 1 t n are i.i.d. generated according to

(x t , y t ) = (1 - √ ε 2B , 1) w.p. √ ε 2B + χ ε B ( √ ε B , -1) otherwise .
The experiment is averaged over 10 simulations for χ = -1 and 10 others for χ = 1. We plot in Figure 2 the worst of these two average regrets obtained by each algorithm according to the value of n. The lower-bound of [START_REF] Hazan | Logistic regression: Tight bounds for stochastic and online optimization[END_REF] ensures that any proper algorithm has at least a regret of order Ω(n 1/3 ) for these data. As expected, the regret of FTRL is polynomial in n (linear slope in log-log scale) while the ones of AIOLI and the algorithm of [START_REF] Foster | Logistic regression: The importance of being improper[END_REF] are poly-logarithmic.

Conclusion and future work

To sum up, we designed a new efficient improper algorithm for online logistic regression. The latter only suffers logarithmic regret with much improved complexity compared to other existing methods. Some interesting questions are still remaining and left for future work. Our online-to-batch procedure only provides upper-bounds in expectation. Obtaining high-probability bounds is more challenging and universal conversion methods such as the one of [Mehta, 2016] may not work for improper procedures.

Another interesting direction for future research is the extension to multi-class classification. Our analysis strongly relies on binary outputs to produce the improper regularization and the extension to multi-class is not straightforward. The next step would then be to extend the results to other settings considered by [START_REF] Foster | Logistic regression: The importance of being improper[END_REF] such as bandit multi-class learning or online multi-class boosting. More generally, it would be interesting to study what are the class of functions where adaptive curvature parameters and improper learning yield to improved guarantees.

Finally, as shown in Section 4.1, AIOLI may be applied to nonparametric logistic regression in RKHS. However, without any approximation schemes, the computational complexity may become prohibitive of order O(n 3 ). Therefore, a possible line of research would be to study how much the performance of our algorithm would be affected by standard approximations techniques as Nyström projections or random features.

A Notation

In this section, we recall and define useful notations that will be used all along the proofs. At each round t 1, we recall that the forecaster is given an input x t ∈ X ⊂ B(R d , R); chooses a prediction θ t ∈ R d ; forms the prediction y t = θ t x t ; and observes the outcome y t ∈ {-1, 1}. The loss of a parameter θ ∈ R d at time t 1 is measured by

t (θ) = (θ x t , y t ) = log(1 + e -ytθ xt ).
We also define for all t 1, all θ ∈ R d and y ∈ {-1, 1}:

-the loss suffered by θ if the outcome was y: y t (θ) = log(1 + e -yθ xt ) -the gradient of the loss in θ t if the outcome was y:

g y t = ∇ y t ( θ t )
-the curvature if the outcome was y: η y t = e y θ t x t

1+BR

-the quadratic surrogate losses if the outcome was y:

y t (θ) = y t ( θ t ) + g y t (θ -θ t ) + η y t 2 (θ -θ t ) g y t g y t (θ -θ t )
-the corresponding loss, surrogate loss, gradient, and curvature for the true outcome y t :

t = yt t , t = yt t , g t = g yt t , η t = η yt t
-the regularized cumulative loss and cumulative surrogate loss respectively:

L t (θ) = t s=1 s (θ) + λ θ 2 , L t (θ) = t s=1 s (θ) + λ θ 2
With these notations, we defined θ t and θt as:

θ t = argmin θ∈R d L t-1 (θ)
, and θt = argmin

θ∈R d L t-1 (θ) + 1 t (θ) + -1 t (θ) . (11)
B Proof of the main theorem Theorem 7. Let ε, λ, R > 0 and d, n 1. Let (x 1 , y 1 ), ..., (x n , y n ) ∈ X ×Y be an arbitrary sequence of observations. Define θt for t 1 as in Equation (11) with regularization parameter λ > 0. Then, any estimator θ t which verifies for all t 1, θ t -θt ε satisfies the following upper-bound on the regret

R n (θ) λ θ 2 + d(1 + BR) log 1 + nR 2 8d(1 + BR)λ + 3nR nR 2 8λ + B ε . Proof Let θ ∈ B(R d , B
). Let us first upper-bound the regret R n (θ) by the regret using the surrogate losses. Applying Lemma 5 with a = y t θ x t ∈ [-BR, BR] and b ∈ y t θ t x t ∈ R, we have for all t 1: t (θ) t (θ). Together with t ( θ t ) = t ( θ t ), it yields that the regret on the true loss is upper-bounded by the regret on the quadratic approximations

R n (θ) = n t=1 t ( θ t ) - n t=1 t (θ) n t=1 t ( θ t ) - n t=1 t (θ) = R n (θ) . (12)
Now, we are left with analyzing a quadratic problem. We can thus follow in the main lines the proof of [START_REF] Gaillard | Uniform regret bounds over R d for the sequential linear regression problem with the square loss[END_REF] for online least squares. By definition of

θ n+1 = argmin θ∈R d L n (θ), L n (θ n+1 )
L n (θ), which can be written as

n t=1 t (θ n+1 ) - n t=1 t (θ) λ θ 2 -λ θ n+1 2 .
Now, the regret can be upper-bounded as

R n (θ) λ θ 2 + n t=1 t ( θ t ) - n t=1 t (θ n+1 ) -λ θ n+1 2 = λ θ 2 + n t=1 t ( θ t ) + L t-1 (θ t ) -L t (θ t+1 ) . (13)
With a little bit of abuse, we call the terms inside the sum on the right the instant regrets. Grouping the terms of same degrees in the quadratic approximation,

t (θ) = t ( θ t ) + g t (θ -θ t ) + η t 2 (θ -θ t )g t g t (θ -θ t ) = t ( θ t ) -g t θ t + η t 2 θ t g t g t θ t + g t θ -η t θ g t g t θ t + η t 2 θ g t g t θ = c * t -2b * t θ + η t 2 θ g t g t θ with c * t = t ( θ t ) -g t θ t + ηt 2 θ t g t g t θ t and b * t = 1 2 -g t + η t ( θ t g t )g t .
Similarly, we can write the cumulative loss as

L t (θ) = t s=1 c * s ct -2 t s=1 b * s bt θ + θ λI + t s=1 η s 2 g s g s At θ . (14)
The minimum of this quadratic, reached in

θ t+1 = A -1 t b t , is L t (θ t+1 ) = c t -2 b t A -1 t θt+1 A t θ t+1 + θ t+1 A t θ t+1 = c t -θ t+1 A t θ t+1 .
We can write now the instant regret at t as

t ( θ t ) + L t-1 (θ t ) -L t (θ t+1 ) = t ( θ t ) -c * t + θ t+1 A t θ t+1 -θ t A t-1 θ t = g t θ t - η t 2 θ t g t g t θ t + θ t+1 A t θ t+1 -θ t A t-1 θ t = g t θ t -θ t (A t -A t-1 ) θ t + θ t+1 A t θ t+1 -θ t A t-1 θ t . (15)
The oracle θ t+1 minimizes the quadratic function L t with Hessian 2A t . Thus, performing one newton step from θ t gives

θ t+1 = θ t - 1 2 A -1 t ∇ L t ( θ t ) = θ t - 1 2 A -1 t ∇ L t-1 ( θ t ) + g t = θ t + 1 2 A -1 t g -yt t - 1 2 A -1 t ∇ L t-1 ( θ t ) + g t + g -yt t (16)
Similarly, we have

θ t = θ t - 1 2 A -1 t-1 ∇ L t-1 ( θ t ) = θ t + 1 2 A -1 t-1 (g t + g -yt t ) - 1 2 A -1 t-1 ∇ L t-1 ( θ t ) + g t + g -yt t . (17)
Reorganizing the terms in the two previous equations leads to

g t = 2 A t θ t -A t θ t+1 -A t-1 θ t + A t-1 θ t .
Substituting in the instant regret (15), this entails

t ( θ t ) + L t-1 (θ t ) -L t (θ t+1 ) = 2 θ t A t θ t -2θ t+1 A t θ t -2 θ t A t-1 θ t + 2θ t A t-1 θ t -θ t A t θ t + θ t A t-1 θ t + θ t+1 A t θ t+1 -θ t A t-1 θ t = θ t+1 A t θ t+1 -2θ t+1 A t θ t + θ t A t θ t -θ t A t-1 θ t + 2θ t A t-1 θ t -θ t A t-1 θ t = (θ t+1 -θ t ) A t (θ t+1 -θ t ) -(θ t -θ t ) A t-1 (θ t -θ t ) (18)
Rewriting equations ( 16) and ( 17), we have

2A t (θ t+1 -θ t ) = g -yt t -δ t 2A t-1 (θ t -θ t ) = g -yt t + g t -δ t 12 with δ t = ∇ L t-1 ( θ t ) + g t + g -yt t
. Subtracting the first equation to the second, we can write the instant regret as a variance term and an optimization error term,

t ( θ t ) + L t-1 (θ t ) -L t (θ t+1 ) = Z t + Ω t (19)
where

Z t = 1 4 g -yt t A -1 t g -yt t - 1 4 (g t + g -yt t )A -1 t-1 (g t + g -yt t )
and

Ω t = 1 4 -2g -yt t A -1 t δ t + δ t A -1 t δ t + 2(g t + g -yt t )A -1 t-1 δ t -δ t A -1 t-1 δ t .
B.1 Upper-bound of the variance term Z t

Let us focus on bounding the term Z t . Developing the terms and using the fact that A t-1 A t , we have

Z t = 1 4 (g t + g -yt t -g t ) A -1 t (g t + g -yt t -g t ) - 1 4 (g t + g -yt t ) A -1 t-1 (g t + g -yt t ) = 1 4 g t A -1 t g t - 1 2 g t A -1 t (g t + g -yt t ) + 1 4 (g t + g -yt t ) A -1 t (g t + g -yt t ) - 1 4 (g t + g -yt t ) A -1 t-1 (g t + g -yt t ) 1 4 g t A -1 t g t - 1 2 g t A -1 t (g t + g -yt t ) = - 1 4 g t A -1 t g t - 1 2 g t A -1 t g -yt t - 1 2 g t A -1 t g -yt t .
Using the definition of the logistic function, we can relate g t and g -yt t ,

g -yt t = y t x t 1 + e -yt θ t xt = e yt θ t xt y t x t 1 + e yt θ t xt = -(1 + BR)η t g t , (20)
which implies,

Z t (1 + BR) η t 2 g t A -1 t g t .
Summing over t = 1, . . . , n, the sum telescopes thanks to Lemma 10, we obtain

n t=1 Z t (1 + BR) d k=1 log 1 + λ k (C n ) λ , (21)
where C n = 1 2 n t=1 η t g t g t and λ k (C n ) is the k largest eigenvalue of C n . Now to upper-bound the right-hand side we need to upper-bound the trace of C n , which we do now. Recalling that g t = -y t x t / 1 + exp(y t θ t x t ) , we have

η t 2 g t g t = 1 2(1 + BR) e y θ t xt (1 + e yt θ t xt ) 2 x t x t 1 8(1 + BR) x t x t ,
where for the inequality, we used that x/(1 + x) 2 1/4 for x 0. Therefore, Tr(C n ) = It remains to bound the the approximation term Ω t .

Ω t = 1 4 [2(g t + g -yt t )A -1 t-1 δ t -2g -yt t A -1 t δ t + δ t A -1 t δ t -δ t A -1 t-1 δ t 0 ] 1 2λ 2 g -yt t + g t δ t 3R 2λ δ t .
The last inequality is due to g y t R for all x t R and y ∈ {-1, 1}. By definition of θt ∈

argmin θ∈R d L t-1 (θ) + t (θ) + -yt t (θ) , we have ∇ L t-1 ( θt ) + ∇ t ( θt ) + ∇ -yt t ( θt ) = 0.
Note also that g y t = ∇ y t ( θ t ) for all y ∈ {-1, 1}. So δ t may be rewriten as

δ t = ∇ L t-1 ( θ t ) + ∇ t ( θ t ) + ∇ -yt t ( θ t ) -∇ L t-1 ( θt ) -∇ t ( θt ) -∇ -yt t ( θt )
Using that ∇ t and ∇ t are R 2 /4-Lipschitz (for ∇ t remark that ∇ 2 t (θ) = η t g t g t R 2 /4)), we have

δ t (t + 1)R 2 4 + 2λB θ t -θ t . (23)
Summing over t leads to

n t=1 Ω t 3nR nR 2 8λ + B ε . (24)

B.3 Conculsion of the proof

Using inequalities ( 12), ( 13) and ( 19), we have

R n (θ) R n (θ) λ θ 2 + n t=1 Z t + n t=1 Ω t
Finally, inequalities ( 21) and ( 24) concludes the proof.

C Lemmas

Proof of Lemma 5. Let C > 0. First, note that for all x ∈ R, f (x) = -(1 + exp(x)) -1 . To prove Lemma 5, we need to show that for α = (1 + C) -1 , we have for all a ∈ [-C, C] and b ∈ R

log(1 + e -a ) log(1 + e -b ) - 1 1 + e b (a -b) + α 2 e b (1 + e b ) 2 (a -b) 2 .
To do so, we fix b ∈ R and we define the function ξ as 1 + e a , with the convention (e 0 -1)/0 = 1. The latter is satisfied by Lemma 8, because α

= (1 + C) -1 (1 + |a|) -1 for all a ∈ [-C, C]. Lemma 8. For all a, b ∈ R, 1 1 + |a| e a-b -1 a -b 1 + e b 1 + e a .
Proof Define the function h : R 2 → R that corresponds to the right-hand side of the inequality

h(a, b) = e a-b -1 a -b 1 + e b 1 + e a , (a, b) ∈ R 2 .
It is worth pointing out that even h is normally not defined for a = b, setting h(a, a) = 1 makes it well defined and infinitely differentiable on R 2 .

Let a b. Then (1 + e b )/(1 + e a ) e b-a , which implies

h(a, b) (e a-b -1)e b-a (a -b) e b-a -1 b -a 1 1 + a -b ,
where the last inequality is because (e x -1)/x (1 -x) -1 for all x 0.

Now we show that argmin b∈R h(a, b) contains a value between 0 and a, i.e., in [0, a] if a 0 or in [a, 0] otherwise. Rewriting the function h as follows,

h(a, b) = 1 1 + e a e a-b -1 a -b + 1 1 + e -a e b-a -1 b -a , (27)
it is clear that h(a, b) = h(-a, -b). We can therefore suppose without loss of generality that a is non-negative.

Indeed, if b * (a) ∈ argmin b h(a, b) then -b * (a) ∈ argmin b h(-a, b).
A further look at Equation ( 27) shows also that h is convex in its second argument by convexity of the function x → (e x -1)/x and stability of convex functions by composition with affine transformations and non-negative weighted sum.

To finish the proof, we will show that the derivative of ∂h(a, b)/∂b is non-negative for b → a and non-positive for b = 0. Convexity of h in its second argument will then conclude. Using a 0, some computations (omitted here) lead to

∂ ∂b h(a, b) = (b -a + 1)e a-b -1 + (b -a -1)e b + e a (a -b) 2 (1 + e a ) .
Develloping the first terms of the exponential series gives

(b -a + 1)e a-b -1 + (b -a -1)e b + e a = 1 2 (e a -1)(a -b) 2 + o b→a ((a -b) 2 ) .
Therefore,

lim b→a ∂ ∂b h(a, b) = 1 2 e a -1 e a + 1 0 .
We note also that if a = 0 then ∂ ∂b h(0, 0) = 0. Now, if a > 0, using (2 -x)e x 2 + x for all x 0, we have The following Lemma is a standard result of online matrix theory (Lemma 11.11 of [Cesa-Bianchi and Lugosi, 2006]). Lemma 9. Let V ∈ R d×d be an invertible matrix, u ∈ R d and U = V -uu . Then,

u V -1 u = 1 - det(U ) det(V ) . Lemma 10. If C n = n t=1 ηt 2 g t g t and A n = C n + λI then n t=1 η t 2 g t A -1 t g t d k=1 log 1 + λ k (C n ) λ where λ k (C n ) is the k largest eigenvalue of C n .
Proof Remarking that A t = A t-1 + ηt 2 g t g t and applying lemma 9 we have

η t 2 g t A -1 t g t = 1 - det(A t-1 /λ) det(A t /λ)
We use now that 1 -u log(1/u) for u > 0 which yields

η t 2 g t A -1 t g t log det(A t /λ) det(A t-1 /λ)
Summing over t = 1, ..., n, using A 0 = λI and

A n = C n + λI with C n = n t=1 ηt 2 g t g t , we get n t=1 η t 2 g t A -1 t g t log det I + C n λ = d k=1 log 1 + λ k (C n ) λ D Efficient implementation of AIOLI
Proof of Lemma 2 Given the definition of θ t , in (3), using the notation in Appendix A and Eq. ( 14) Since A t-1 is invertible by construction and A t-1 = L t-1 L t-1 , where L t-1 is lower triangular and the unique Cholesky decomposition of A t-1 [Golub and Van Loan, 2012], we can define the following equivalent problem, by the substitution r = L t-1 θ r t = argmin r∈R d r r -2r ũt + log(1 + cosh(r ṽt )), ũt = L -1 t-1 b t-1 , ṽt = L -1 t-1 x t , L 0 = λ -1/2 I, b0 = 0, θ0 = 0 for t = 1, .. Here eigen-dec corresponds to economic-eigendecomposition of a symmetric matrix and chol-update to the rank 1 Cholesky update [Golub and Van Loan, 2012] and in particular r t = L t θ t . Now note that any r ∈ R d can be always written as r = W t q + µ with W t = (ũ t , ṽt ) ∈ R d×2 for some q ∈ R 2 and µ ∈ (span W t ) ⊥ , then r t = W t q t + µ t for q t , µ t defined as (q t , µ t ) = argmin q∈R 2 ,µ∈(span Wt) ⊥ W t q + µ 2 -2ũ t (W t q + µ) + log(1 + cosh(ṽ t (W t q + µ)))

θ t = argmin

= argmin

q∈R 2 ,µ∈(span Wt) ⊥ W t q 2 + µ 2 -2ũ t W t q + log(1 + cosh(ṽ t W t q)),

where in the last inequality we use the fact that ũt = W t e 1 , ṽt = W t e 2 and W t µ = 0, by construction. Now the solution of the problem above is given by µ t = 0 and q t as q t = argmin q∈R 2 W t q 2 -2ũ t W t q + log(1 + cosh(ṽ t W t q)).

Now that in the problem above q is always applied to W t , so in the case that W t is not full rank then all the solutions of the form q t = q 0 t + ζ with ζ ∈ (span W t W t ) ⊥ are admissible and leading to the same r t . Then we can restrict the problem above as q t = argmin q∈span W t Wt W t q 2 -2ũ t W t q + log(1 + cosh(ṽ t W t q)).

To conclude, take the economic eigenvalue decomposition of W t W t , i.e., W t W t = U t Σ t U t with U t ∈ R 2×pt with p t the rank of W t W t , such that U t U t = I and Σ t ∈ R pt×pt is diagonal and positive [Golub and Van Loan, 2012]. Now we consider the substitution ω = Σ 1/2 t U t q, whose inverse is q = U t Σ -1/2 t ω since q ∈ span W t W t and U t U t is the projection matrix whose span is exactly span W t W t , i. e. U t U t q = q for any q ∈ span W t W t , which leads to the equivalent problem ω t = argmin ω∈R p t ω ω -2u t ω + log(1 + cosh(v t ω)),

where

u t = Σ -1/2 t U t W t ũt = Σ -1/2 t U t W t W t e 1 = Σ 1/2 t U t e 1 , v t = Σ -1/2 t U t W t ṽt = Σ -1/2 t U t W t W t e 2 = Σ 1/2 t U t e 2 .
Note that in particular ω t = Σ 1/2 t U t q t and q t = U t Σ -1/2 t ω t . Then

θ t = L - t-1 r t = L - t-1 W t q t = L - t-1 W t U t Σ -1/2 t ω t .
Proof of Lemma 3 Since Ω t is smooth and strongly convex, we can apply standard results on gradient descent (see for example Theorem 3.10 of [Bubeck et al., 2015]), obtaining ω T t -ω t e -T /(2κt) ω 0 t -ω t ,

The upper-bound on the regret is a direct consequence of Theorem 7 and Lemma 3, with T chosen according to the lemma and ε = √ λ 3nR nR 2 8λ +B

, since L -1 t-1

2 = A -1 t-1
λ -1 and W t U t Σ -1/2 t is a partial isometry, we have

θ t -θt L -1 t-1 W t U t Σ -1/2 t ω t -ω T t λ -1/2 ε 1 3nR nR 2 8λ + B , (29)
that plugged in the result of Theorem 7 gives the desired result.

Figure 2 :

 2 Figure 2: Regret of each algorithm according to number of sample n in log-log scale.

d

  k=1 λ k (C n ) nR 2 /(8(1+BR)) for all k 1. Now remark that the right-hand side of equation 21 is maximized under the constraintd k=1 λ k (C n ) nR 2 /(8(1 + BR)) when all the eigenvalues are equals i.e.,λ k (C n ) = nR 2 /(8d(1 + BR)) for all 1 k d which leads to n t=1 Z t d(1 + BR) log 1 + nR 2 8d(1 + BR)λ(22)B.2 Upper-bound on the optimization error Ω t

  ξ(a) = log(1 + e -a ) -log(1 + e -b ) + 1 1 + e b (a -b)e b ) 2 (a -b) 2 , -C a C It remains to show that ξ is non-negative on [-C, C]. Because ξ(b) = 0,it suffices to prove ξ some computation, differentiating ξ leads to ξ (a) = -1 1 + e a + 1 1 + e b -αe b (1 + e b ) 2 (a -b) , which can also be rewritten as ξ (a) = e a -e b (1 + e a )(1 + e b ) -α e b (1 + e b ) 2 (a -b) . Reorganizing the terms gives the following equation (1 + e a )(1 + e b )e -b ξ (a) = e a-b -1 -α 1 + e a 1 + e b (a -b) .

  Otherwise, let a b. Then (1 + e b )/(1 + e a ) 1, Combining the two cases a b and a b together, we get h(a, b) 1 1 + |a -b| .

  0) = (2 -a)e a -(a + 2) 0 By convexity of the function b → h(a, b), we conclude that argmin b∈R h(a, b) ∈ [0, a]. Combined with Inequality (26) concludes the proof of the lemma.

  1 (θ) + log(1 + e -θ t xt ) + log(1 + e θ xt ) = argmin θ∈R d θ A t-1 θ -2θ b t-1 + log(1 + cosh(θ x t )).

Table 1 :

 1 Regret bounds and computational complexities (in O(•)) of relevant algorithms

	]	AIOLI

  as specified in Lemma 2 compute ω T t using T steps of gradient descent using u t , v t as specified in Lemma 3 compute θt = L - t W t U t Σ compute g t using θt , y t , x t compute L t via rank 1 Cholesky update of L t-1 with vector η t /2g t compute b t = b t-1 + (η t g t θt -1)g t end Algorithm 1: AIOLI descriptive version (see Algorithm 2, Appendix D for a detailed version) Theorem 4 (Efficient implementation). Let T, n ∈ N and θt be the solution of Algorithm 2 at step t, with hyperparameter T . Choosing T = (4 + R 2 λ ) log 3n 2 R 2 λ ( nR 2

	-1/2 t	ω T t and predicts y t = θ t x t
	receive y t

8λ + B) leads to a regret Rn (θ) for the forecaster ( θt ) n t=1 bounded by

  ., n do receives x t W t = L -1 t (b t-1 , x t ), {U t , Σ t } = eigen-dec(W t W t ), u t = Σ 1/2 t U t e 1 , v t = Σ t = -(1 + e yt θ t xt ) -1 y t x t , η t = e y t θ t x t 1+BR L t = chol-update(L t-1 , η t /2g t ), b t = b t-1 + (η t g t θt -1)g t end Algorithm 2: AIOLI detailed version.

	ω 0 t = 0					1/2 t U t e 2
	for i = 1, ..., T do
	ω i t = ω i-1 t	-λ 4λ+R 2 2ω i-1 t	-2u t -(1 + e v t ω i-1 t	) -1 v t + (1 + e -v t ω i-1 t	) -1 v t
	end
	θt = L -t (W t (U t Σ -1/2 t predict y t = θ t x t	ω T t ))
	receives y t

g

I.e., W t Wt = UtΣtU t with Ut ∈ R

2×p t with pt the rank of W t Wt, such that U t Ut = I and Σt ∈ R p t ×p t is diagonal and positive.

Acknowledgements

This work was funded in part by the French government under management of Agence Nationale de la Recherche as part of the "Investissements d'avenir" program, reference ANR-19-P3IA-0001 (PRAIRIE 3IA Institute).

when gradient descent is used with step-size γ = 1/β t and where κ t = β t /α t with α t a lower bound of the strong convexity constant of Ω t and β t an upper bound the Lipschitz constant of ∇Ω t . Note indeed that if Ω t is α-strongly convex for some α, it will be also α -strongly convex, for any 0 < α α; moreover if ∇Ω t is β-Lipschitz for some β, it will be also β -Lipschitz, for any β β; for more details see Chapter 3.4 of [Bubeck et al., 2015]. Now, by construction α t = 1, indeed Ω t (ω) -ω 2 is still a convex problem. Moreover, for any ω, ω ∈ R 2 , by the mean value theorem applied to the function g : [0, 1] → R 2 defined as g(r) = ∇Ω(ω + r(ω -ω)), there exists a q ∈ R 2 such that

This implies that ∇Ω t (ω) -∇Ω t (ω ) sup q ∇ 2 Ω t (q) ω -ω so the Lipschitz constant of ∇Ω t is upper bounded by β t = sup q ∇ 2 Ω t (q) . The Hessian of Ω t is defined as

To conclude, note that v t in Thm. 2 is defined as

R 2 /λ, since x t R by assumption and A t-1 λI by construction. Finally

We have

To quantify ω 0 t -ω t we need a bound for ω t . Note that, since Ω t is smooth and convex, ω t is characterized by

Analogously to the case of v t , by definition of u t , we have

b t-1 2 /λ. Now we need a bound for b t-1 . Note that for any s ∈ {1, . . . , t -1}, we have

) -1 y s x s , moreover η s = e ys θ s xs /(1 + BR) and

(η s g s θ s -1)g s = y s x s θ s 2 + 2 cosh(y s x s θ s ) (1 + BR) -1 y s x s + 1

1 + e ysx s θs y s x s .

Since sup z |z/(2 + 2 cosh(z))| 1, y s ∈ {-1, 1} and x s R by assumption, we have (η

To conclude, u t Rλ -1/2 (t -1), ω t u t + v t /2 Rλ -1/2 t. By choosing ω 0 t = 0, then P t = ω t Rλ -1/2 t and so ω T t -ω t ε, when choosing T (4 + R 2 /λ) log(Rλ -1/2 t/ε).

Proof of Theorem 4

We first analyze the cost of one iteration of Algorithm 1 (which is detailed in Algorithm 2 presented above). Note that at each step t, the cost of the gradient descent algorithm performed to compute ω T t is the number of iterations T , since we are solving a p t -dimensional problem, with p t ∈ {1, 2}. The two most expensive operation performed at step t (excluding gradient descent) are the solution of triangular linear systems of dimensions d × d when computing L -1 t-1 v or L - t-1 v for some vector v ∈ R d , which costs O(d 2 ) (this operation is performed 4 times). The other expensive operation is the rank 1 Cholesky update of L t-1 with the vector η t /2g t , which costs O(d 2 ) [Golub and Van Loan, 2012], indeed the eigendecomposition is performed on the matrix W t W t which is 2×2. By repeating such operation for n steps, we obtain a total cost of O(nd 2 + nT ).