Akram Erraqabi

Alessandro Lazaric

Michal Valko

Emma Brunskill

Yun-En Liu

Rewards and errors in multi-arm bandits for interactive education

teaching and research institutions in France or abroad, or from public or private research centers.

Introduction

We consider sequential, interactive systems for educational platforms aiming at optimizing an objective function with initially unknown parameters. Specifically, we want to estimate the outcome of different learning options, while at the same time provide an educational benefit for users.

This setting fits the bandit framework, where the algorithm has access to a set of arms (options) with unknown expected rewards. The most common objective in bandits is to minimize the regret, i.e., the difference between the highest reward and the reward of the arms pulled by the algorithm. Since the arms are unknown in advance, this requires balancing exploration of the arms and exploitation of the mean estimates. An alternative setting is active exploration [START_REF] Antos | Active learning in heteroscedastic noise[END_REF][START_REF] Carpentier | Upperconfidence-bound algorithms for active learning in multi-armed bandits[END_REF], where the algorithm's performance is only evaluated upon the termination in terms of accuracy in estimating the value of all arms.

The two objectives have been studied separately. However, consider the increasingly-prevalent situation where users participate in research studies (e.g., for education) that are designed to collect reliable data for an accurate assessment of the options (arms). In such situations, the users themselves rarely care about the underlying research questions, but may reasonably wish to gain their own benefit, such as students seeking to learn new material. In order to serve them and gather generalizable knowledge at the same time, we formalize this situation as a multi-objective bandit problem, where a designer seeks to trade off cumulative regret minimization (providing good direct reward for participants), with informing scientific knowledge about the strengths and limitations of the various conditions (active exploration to estimate all arm means). This trade-off is especially needed in education when running online experiments, where poor experience makes users leave the platform permanently. While in general, it may not be possible to be simultaneously optimal for both active exploration and reward maximization [START_REF] Bubeck | Pure exploration in multi-armed bandits problems[END_REF], we study trade-offs between these two objectives, as [START_REF] Liu | Trading off scientific knowledge and user learning with multi-armed bandits[END_REF] did in the context of education.

Learning problem

Objective function. We consider K arms with distributions {ν i } K i=1 characterized by mean µ i and variance σ 2 i . Given a sequence of n arms I n = (I 1 , I 2 , .., I n ), where I t ∈ [K] is the arm pulled at time t, average reward and estimation errors are defined as

ρ(I n ) = E 1 n n t=1 X It,T I t ,t = 1 n K i=1 T i,n µ i , (1)
ε(I n ) = n K K i=1 E µ i,n -µ i 2 = n K K i=1 σ 2 i T i,n , (2)
where T i,t = t-1 s=1 I{I s = i} is the number of times arm i is selected up to step t-1 and µ i,n is the empirical average of the T i,n samples. Notice that we normalize ε by multiplying the estimation errors by n to make their magnitude (as a function of n) comparable to ρ(I n ).

We define a trade-off objective function obtained by a continuous relaxation of the two functions above as:

f w (λ;{ν i } i ) = w K i=1 λ i µ i - (1 -w) K K i=1 σ 2 i λ i , (3)
where w ∈ [0, 1] and λ ∈ D K belongs to the simplex to define an allocation of arms. Notice that for w = 1 we recover the reward maximization problem, while for w = 0 the problem reduces to minimizing the average estimation error. The function f w can be also obtained as a Lagrangian relaxation of a constrained optimization problem where we intend, e.g., to maximize the reward subject to a desired level of estimation accuracy. We define the optimal allocation and its performance as

λ * = arg max λ∈D K f w (λ; {ν i } i ) and f * = f w (λ * ; {ν i } i )
respectively. Intuitively, λ * favors arms with large means and large variance since allocating a large portion of the resources to them contribute to minimizing f w by increasing the reward ρ and reducing the error ε. Finally, we define the performance measure of a learning algorithm. Let λ n be the empirical frequency of pulls ( λ i,n = T i,n /n), we define the regret to the optimal allocation as R n ( λ n ) = f * -f w ( λ n ; {ν i } i ). Learning algorithm. We introduce the ForcingBalance algorithm (Fig. 1), inspired by the GAFS-MAX algorithm [START_REF] Antos | Active learning in heteroscedastic noise[END_REF]. At each step t, the algorithm first checks the number of pulls of each arm and selects any arm with less than η √ t samples. If all arms have been sufficiently pulled, the allocation λ t is computed using the empirical estimates of the arms' means and variances µ i,t =1 Ti,t Ti,t s=1 X i,s and

σ 2 i,n = 1 Ti,t-1 Ti,t s=1 X i,s -µ i,t
2 . Once the allocation λ t is computed, an arm is selected. ForcingBalance explicitly tracks the allocation λ n by selecting arm I t that is under-pulled the most so far. This tracking step allows us to force λ n to stay close to λ n (and its performance) at each step. The parameter η defines the amount of exploration forced by the algorithm. A large η forces all arms to be pulled many times. While this guarantees accurate estimates µ i,t and σ 2 i,n and an optimal estimated allocation λ t that rapidly converges to λ * , the algorithm would perform the tracking step rarely and thus λ t would not track λ t fast enough.

Evaluation on educational data

Treefrog Treasure is an educational math game in which players navigate through a world of number lines. The players must find and jump through the appropriate fraction on each number line. To analyze the effectiveness of our algorithm when parameters are drawn from a real-world setting, we use data from an experiment in Treefrog Treasure to estimate the means and variances of a 64-arm experiment. Each arm corresponds to a experimental condition: after a tutorial, 34,197 players each received a pair of number lines with different properties, followed by the same (randomized) distribution of number lines thereafter. We measured how many lines students solved conditioned on the type of this initial pair; the hope is to learn which type of number line encourages player persistence on a wide variety of lines afterwards. There were a total of K = 64 condi- tions, formed from choosing between 2 representations of the target fraction, 2 representations of the label fractions on the lines themselves, adding or withholding tick marks at regular intervals on the number line, adding or removing hinting animations if the problem was answered incorrectly, and 1-4 different rates of backoff hints that would progressively offer more and more detailed hints as the player made mistakes. The details of both the experiments and the experimental conditions are taken from [START_REF] Liu | Trading off scientific knowledge and user learning with multi-armed bandits[END_REF], though we emphasize that we measure a different outcome, i.e., the player persistence as opposed to the chance of a correct answer.

We run ForcingBalance, UCB [START_REF] Auer | Finite-time analysis of the multiarmed bandit problem[END_REF], GAFS-MAX over n = 25, 000. Both ForcingBalance and GAFS-MAX use η = 1 and w is set to 0.95 to give priority to the player's experience and entertainment.

We study the performance in terms of average reward ρ(λ), estimation error ε(λ), regret R n , and RankErr that measures how well arms are ranked on the basis of their mean. 1 Small values of RankErr mean that arms are estimated well enough to correctly rank them and can allow the experiment designer to later reliably remove the worst performing arms. The results are reported in Fig. 2. UCB achieves the highest reward but performs poorly in estimating the arms' mean and in ranking them. GAFS-MAX does not collect much reward but is accurate in estimating the means. On the other hand, ForcingBalance balances the two objectives and it achieves the smallest regret, thus preserving a very good estimation accuracy without compromising much the average reward. Here, effectively balancing between the objectives allows to rank the different settings in the right order while providing players with a good experience. Had we used UCB, the outcome for players would have been better, but we would have less insight into how the different ways of providing lines affect player behavior for when they need to design the next game (high RankErr ). Using GAFS-MAX would give insight into how different lines affect players; however, if some conditions are difficult, we might have caused many players to quit. Forcing-Balance provides a useful feedback to the designer without compromising the experience (the RankErr is close to GAFS-MAX but the reward is higher).

Figure 1 :

 1 Figure 1: The ForcingBalance algorithm.

  It, observe XI t ,t, update νI t . 10: end for

	1: Input: forcing parameter η, weight w
	2: for t = 1, . . . , n do 3: if min Ti,t < η √ t then
	4:	Select arm It = arg min Ti,t (forcing)
	5:	else
	6:	Compute optimal estimated allocation
		λt = arg max λ∈D K	fw(λ; { νi,t}i)
	7:	Select arm (tracking)
		It = arg max i=1,...,K	λi,t -λi,t
	8:	end if
	9:	Pull arm

  Results on the educational data.

		ρ(λ) µmax	ε(λ) max σ 2	Rn	RankErr
	UCB	0.930	6.220	0.070	5.424
	GAFS	0.919	5.891	0.027	5.151
	Force	0.922	5.912	0.005	5.291
	Unif	0.916	5.880	0.055	-
	λ *	0.922	5.904	-	-
	Figure 2:

Let π * be the true ranking and π the estimated ranking, then RankErr = 1/K K i=1 |π * (i) -π(i)|.


Akram Erraqabi

Alessandro Lazaric

Michal Valko

Emma Brunskill

Yun-En Liu

Trading off Rewards and Errors in Multi-Armed Bandits

In multi-armed bandits, the most common objective is the maximization of the cumulative reward. Alternative settings include active exploration, where a learner tries to gain accurate estimates of the rewards of all arms. While these objectives are contrasting, in many scenarios it is desirable to trade off rewards and errors. For instance, in educational games the designer wants to gather generalizable knowledge about the behavior of the students and teaching strategies (small estimation errors) but, at the same time, the system needs to avoid giving a bad experience to the players, who may leave the system permanently (large reward ). In this paper, we formalize this tradeoff and introduce the Forc-ingBalance algorithm whose performance is provably close to the best possible tradeoff strategy. Finally, we demonstrate on realworld educational data that ForcingBalance returns useful information about the arms without compromising the overall reward.

Introduction

We consider sequential, interactive systems when a learner aims at optimizing an objective function whose parameters are initially unknown and need to be estimated over time. We take the multi-armed bandit (MAB) framework where the learner has access to a finite set of distributions (arms), each one characterized by an expected value (reward ). The learner does not know the distributions beforehand and it can only obtain a random sample by selecting an arm. The most common objective in MAB is to minimize the regret, i.e., the difference between the reward of the arm with the highest mean and the reward of the arms pulled by the learner. Since the arm means are unknown, this requires balancing exploration of the arms and exploitation of the mean estimates. An alternative setting is pure exploration, where the learner's performance is only evaluated upon the termination of the process, and its learning performance is allowed to be arbitrarily bad in terms of rewards accumulated over time. In best-arm identification [START_REF] Even-Dar | Action elimination and stopping conditions for the multi-armed bandit and reinforcement learning problems[END_REF][START_REF] Audibert | Best arm identification in multi-armed bandits[END_REF], the learner selects arms to find the optimal arm either with very high probability or in a short number of steps. In active exploration [START_REF] Antos | Active learning in heteroscedastic noise[END_REF][START_REF] Carpentier | Upper-confidence-bound algorithms for active learning in multi-armed bandits[END_REF], the objective is to estimate the value of all arms as accurately as possible. This setting, which is related to active learning and experimental optimal design, is particularly relevant whenever accurate predictions of the arms' value is needed to support decisions at a later time.

The previous objectives have been studied separately. However, they do not address the increasingly-prevalent situation where users participate in research studies (e.g., for education or health) that are designed to collect reliable data and compute accurate estimates of the performance of the available options. Here, the subjects/users themselves rarely care about the underlying research questions but wish to gain their own benefit, such as students seeking to learn new material, or patients seeking to find improvement for their condition. In order to serve these individuals and gather generalizable knowledge at the same time, we formalize this situation as a multi-objective bandit problem, where a designer seeks to trade off cumulative regret minimization (providing good direct reward for participants), with informing scientific knowledge about the strengths and limitations of the various conditions (active exploration to estimate all arm means). This tradeoff is especially needed in high-stakes domains, such as medicine or education, or when running experiments online, where poor experience may lead to users leaving the system permanently. A similar tradeoff happens in A/B testing. Here, the designer may want to retain the ability to set a desired level of accuracy in estimating the value of different alternatives (e.g., to justify decisions that are to be taken posterior to the experiment) while still maximizing the reward.

A natural initial question is whether these two different objectives, reward maximization and accurate arm estimation, or other alternative objectives, like best arm identification, are mutually compatible: Can one always recover the best of all objectives? Unfortunately, in general, the answer is negative. [START_REF] Bubeck | Pure exploration in multi-armed bandits problems[END_REF] have already shown that any algorithm with sub-linear regret cannot be optimal for identifying the best arm. Though it may not be possible to be simultaneously optimal for both active exploration and reward maximization, we wish to carefully trade off between these two objectives. How to properly balance multiple objectives in MAB is a mostly unexplored question. [START_REF] Loc | Committing bandits[END_REF] introduce the committing bandits, where a given horizon is divided into an experimentation phase when the learner is free to explore all the arms but still pays a cost, and a commit phase when the learner must choose one single arm that will be pulled until the end of the horizon. [START_REF] Lattimore | The pareto regret frontier for bandits[END_REF] analyzes the problem where the learner wants to minimize the regret simultaneously w.r.t. two special arms. He shows that if the regret w.r.t. one arm is bounded by a small quantity B, then the regret w.r.t. the other arm scales at least as 1/B, which reveals the difficulty of balancing two objectives at the same time. [START_REF] Madalina | Designing multiobjective multi-armed bandits algorithms: A study[END_REF] formalize the multi-objective bandit problem where each arm is characterized by multiple values and the learner should maximize a multi-objective function constructed over the values of each arm. They derive variations of UCB to minimize the regret w.r.t. the full Pareto frontier obtained for different multi-objective functions. Finally, [START_REF] Sani | Risk averse multi-arm bandits[END_REF] study strategies having a small regret versus the arm with the best mean-variance tradeoff. In this case, they show that it is not always possible to achieve a small regret w.r.t. the arm with the best mean-variance.

In this paper, we study the tradeoff between cumulative reward and accuracy of estimation of the arms' values (i.e., reward maximization and active exploration), which was first introduced by [START_REF] Liu | Trading off scientific knowledge and user learning with multi-armed bandits[END_REF]. Their work presented a heuristic algorithm for balancing this tradeoff and promising empirical results on an education simulation. In the present paper, we take a more rigorous approach and make several new contributions. 1) We propose and justify a new objective function for the integration of rewards and estimation errors (Sect. 2), that provides a simple way for a designer to weigh directly between them. 2) We introduce the ForcingBalance algorithm that optimizes the objective function when the arm distributions are unknown (Sect. 3). Despite its simplicity, we prove that Forcing-Balance incurs a regret that asymptotically matches the minimax rate for cumulative regret minimization and the performance of active exploration algorithms (Sect. 4). This is very encouraging, as it shows that bal-ancing a tradeoff between rewards and errors is not fundamentally more difficult than either of these separate objectives. Interestingly, we also show that a simple extension of UCB is not sufficient to achieve good performance. 3) Our analysis requires only requires strong convexity and smoothness of the objective function and therefore our algorithm and the proof technique can be easily extended. 4) We provide empirical simulations on both synthetic and educational data from [START_REF] Liu | Trading off scientific knowledge and user learning with multi-armed bandits[END_REF] that support our analysis (Sect. 5).

Balancing Rewards and Errors

We consider a MAB of K arms with distributions {ν i } K i=1 , each characterized by mean µ i and variance σ 2 i . For technical convenience, we consider distributions with bounded support in [0, 1]. All the following results extend to the general case of sub-Gaussian distributions (used in the experiments). We denote the s-th i.i.d. sample drawn from ν i by X i,s and we define [K] = {1, . . . , K}. As discussed in the introduction, we study the combination of two objectives: reward maximization and estimation error minimization. Given a fixed sequence of n arms I n = (I 1 , I 2 , .., I n ), where I t ∈ [K] is the arm pulled at time t, the average reward is defined as

ρ(I n ) = E 1 n n t=1 X It,T I t ,t = 1 n K i=1 T i,n µ i , (1)
where T i,t = t-1 s=1 I{I s = i} is the number of times arm i is selected up to step t -1. The sequence maximizing ρ simply selects the arm with largest mean for all n steps. On the other hand, the estimation error is measured as

ε(I n ) = 1 K K i=1 nE µ i,n -µ i 2 = 1 K K i=1 nσ 2 i T i,n , (2)
where µ i,n is the empirical average of the T i,n samples. Similar functions were used by [START_REF] Carpentier | Upper-confidence-bound algorithms for active learning in multi-armed bandits[END_REF][START_REF] Carpentier | Adaptive strategy for stratified monte carlo sampling[END_REF]. Notice that (2) is multiplying the root mean-square error by √ n. This is to allow the user to specify a direct tradeoff between (1) and (2) regardless on how their average magnitude varies as a function of n.1 Optimizing ε requires selecting all the arms with a frequency proportional to their standard deviations. More precisely, each arm should be pulled proportionally to σ 2/3 i . We define the tradeoff objective function balancing the two functions above as a convex combination,

= 2, µ1 = 1, µ2 = 2, σ 2 1 = σ 2 2 = 1.
For small w, the problem reduces to optimizing the average estimation error. Since the arms have the same variance, λ * is an even allocation over the two arms. As w increases, the ρ component in fw becomes more relevant and the optimal allocation selects arm 2 more often, until w = 1 when all the resources are allocated to arm 2.

f w (I n ;{ν i } i ) = wρ(I n ) -(1 -w)ε(I n ) = w K i=1 T i,n n µ i - (1 -w) K K i=1 σ i T i,n /n , (3)
where w ∈ [0, 1] is a weight parameter and the objective is to find the sequence of pulls I n which maximizes f w .

For w = 1, we recover the reward maximization problem, while for w = 0, the problem reduces to minimizing the average estimation error. In the rest of the paper, we are interested in the case w ∈ (0, 1) since the extreme cases have already been studied. Using root mean square error for ε(I n ) gives f w the scale-invariant property: Rescaling the distributions equally impacts ρ and ε. Furthermore, f w can be equivalently obtained as a Lagrangian relaxation of a constrained optimization problem where we intend to maximize the reward subject to a desired level of estimation accuracy. In this case, the parameter w is directly related to the value of the Lagrange multiplier. [START_REF] Liu | Trading off scientific knowledge and user learning with multi-armed bandits[END_REF] proposed a similar tradeoff function where the estimation error is measured by Hoeffding confidence intervals, which disregard the variance of the arms and only depend on the number of pulls. In addition, in their objective, the optimal allocation radically changes with the horizon n, where a short horizon forces the learner to be more explorative, while longer horizons allow the learner to be more greedy in accumulating rewards. Overall, their tradeoff reduces to a mixture between a completely uniform allocation (that minimizes the confidence intervals) and a UCB strategy that maximizes the cumulative reward. While their algorithm demonstrated encouraging empirical performance, no formal analysis was provided. In contrast, f w is stable over time and it allows us to compare the performance of a learning algorithm to a static optimal allocation. We later show that f w also enjoys properties such as smoothness and strong concavity that are particularly convenient for the analysis. Besides the mathematical advantages, we notice that without normalizing ε by n, as w tends to 0, we would never be able to recover the optimal strategy for error minimization, since ρ(I n ) would always dominate f w , thus making the impact of tuning w difficult to interpret.

Given a horizon n, finding the optimal I n requires solving a difficult discrete optimization problem, thus we study its continuous relaxation,2

f w (λ;{ν i } i ) = w K i=1 λ i µ i - (1 -w) K K i=1 σ i √ λ i , (4)
where λ ∈ D K belongs to the K-dimensional simplex such that λ i ≥ 0 and i λ i = 1. As a result, λ defines an allocation of arms and f w (λ; {ν i } i ) is its asymptotic performance if arms are repeatedly chosen according to λ. We define the optimal allocation and its performance as λ * = arg max λ∈D K f w (λ; {ν i } i ) and f * = f w (λ * ; {ν i } i ) respectively. Since f w is concave and D K is convex, λ * always exists and it is unique whenever w < 1 (and there is at least a non-zero variance) or when the largest mean is distinct from the second largest mean. Although a closed-form solution cannot be computed in general, intuitively λ * favors arms with large means and large variance since allocating a large portion of the resources to them contribute to minimizing f w by increasing the reward ρ and reducing the error ε. The parameter w defines the sensitivity of λ * to the arm parameters, such that for large w, λ * tends to concentrate on the arm with largest mean, while for small w, λ * allocates arms proportionally to their standard deviations. Fig. 1, Sect. 5.1, and App. C provide additional examples illustrating the sensitivity of λ * to the parameters in f w . Let I * n be the optimal discrete solution to Eq. 3. Then, we show that the difference between the two solutions rapidly shrinks to 0 with n. In fact,3 for any arm i, |T * i,n /n -λ * i | ≤ 1/n and according to Lem. 4 (stated later), this guarantees that the value of λ * (f * ) differs from the optimum of f w (I n ) by 1/n 2 .

In the following, we consider the restricted simplex D K = {λ i ≥ λ min , i λ i = 1} with λ min > 0 on which f w is always bounded and it can be characterized by the following lemma.

Lemma 1. Let σ max = max i σ i and σ min = min i σ i > 0 be the largest and smallest standard deviations, the function f w (λ; {ν i }) is α-strongly concave everywhere in D K with α = 3(1-w)σmin 4K and it is βsmooth in D K with β = 3(1-w)σmax 4Kλ 5/2 min • Finally, we define the performance of a learning algorithm. Let λ n be the empirical frequency of pulls, i.e., λ i,n = T i,n /n. We define its regret w.r.t. the value of the optimal allocation as R n (

λ n ) = f * -f w ( λ n ; {ν i } i ).
The previous equation defines the pseudo-regret of a strategy λ n , since in Eq. 2 the second equality is true for fixed allocations. This is similar to the definition of [START_REF] Carpentier | Adaptive strategy for stratified monte carlo sampling[END_REF], where the difference between true and pseudo-regret is discussed in detail.

The ForcingBalance Algorithm

Why naïve UCB fails. One of the most successful approaches to bandits is the optimism-in-face-ofuncertainty, where we construct confidence bounds for the parameters and select the arm maximizing an upper-bound on the objective function. This approach was successfully applied in both regret minimization (see e.g., [START_REF] Auer | Finite-time analysis of the multiarmed bandit problem[END_REF]) and active exploration (see e.g., [START_REF] Carpentier | Upper-confidence-bound algorithms for active learning in multi-armed bandits[END_REF]). As such, a first natural approach to our problem is to construct an upper-bound on f w as (see Prop. 1 for the definition of the confidence bounds)

f U B w (λ; { ν i,n }) = w K i=1 λ i µ i,n + log(1/δ n ) 2T i,n (5)
-(1-w) K i=1 1 √ λ i σ i,n - 2 log(2/δ n ) T i,n •
At each step n, we compute the allocation λ

U B i,n max- imizing f U B w
and select arms accordingly (e.g., by pulling an arm at random from λ U B i,n ). Although the confidence bounds guarantee that for any λ, f U B w (λ; { ν i,n }) ≥ f w (λ; {ν i }) w.h.p., this approach is intrinsically flawed and it would perform poorly. While for large values of w, the algorithm reduces to UCB, for small values of w, the algorithm tends to allocate arms to balance the estimation errors on the basis of lowerbounds on the variances and thus arms with small lowerbounds are selected less. Since small lower-bounds may be associated with arms with large confidence intervals, and thus poorly estimated variances, this behavior would prevent the algorithm from correcting its estimates and improving its performance over time (see App. C for additional discussion and empirical simulations). Constructing lower-bounds on f w suffers from the same issue. This suggests that a straightforward (naïve) application of a UCB-like strategy fails in this context. As a result, we take a different approach and propose a forcing algorithm inspired by the GAFS-MAX algorithm introduced by [START_REF] Antos | Active learning in heteroscedastic noise[END_REF] for active exploration. 4Forced sampling. The ForcingBalance algorithm is illustrated in Fig. 2. It receives as input an exploration parameter η > 0 and the restricted simplex D K defined by λ min . At each step t, the algorithm first checks the number of pulls of each arm and selects any arm with less than η √ t samples. If all arms have been sufficiently pulled, the allocation λ t is computed using the empirical estimates of the arms' means and variances µ

i,t = 1 Ti,t Ti,t s=1 X i,s and σ 2 i,n = 1 2Ti,t(Ti,t-1) Ti,t s,s =1 X i,s -X i,s
2 . Notice that the optimization is done over the restricted simplex D K and λ t can be computed efficiently. Once the allocation λ t is computed, an arm is selected. A straightforward option is either to directly implement the optimal estimated allocation by pulling an arm drawn at random from it or allocate the arms proportionally to λ t over a short phase. Both solutions may not be effective since the final performance is evaluated according to the actual allocation realized over all n steps (i.e., λ i,n = T i,n /n) and not λ n . Consequently, even when λ n is an accurate approximation of λ * , the regret may not be small. 5 ForcingBalance explicitly tracks the allocation λ n by selecting the arm I t that is under-pulled the most so far. This tracking step allows us to force λ n to stay close to λ n (and its performance) at each step. The tracking step is slightly different from GAFS-MAX, which selects the arms with largest ratio between λ i,n and λ i,t . We show in the analysis that the proposed tracking rule is more efficient.

The parameter η defines the amount of exploration forced by the algorithm. A large η forces all arms to be pulled many times. While this guarantees accurate estimates µ i,t and σ 2 i,n and an optimal estimated allocation λ t that rapidly converges to λ * , the algorithm would perform the tracking step very rarely and thus λ t would not track λ t fast enough. In the next section, we show that any value of η in a wide range (e.g., η = 1) guarantees a small regret. The other parameter is λ min which defines a restriction on the set of allocations that can be learned. From an algorithmic point of view, λ min = 0 is a viable choice since f w is strongly concave and it always admits at least one solution in D K (the full simplex). Nonetheless, we show next that λ min needs to be strictly positive to guarantee uniform convergence of f w for true and estimated parameters, which is a critical property to ensure regret bounds.

Theoretical Guarantees

In this section, we derive an upper-bound on the regret of ForcingBalance with explicit dependence on its parameters and the characteristics of f w . We start with high-probability confidence intervals for the mean and the standard deviation (see Thm. 10 of [START_REF] Maurer | Empirical bernstein bounds and sample-variance penalization[END_REF]).

Proposition 1. Fix δ ∈ (0, 1). For any n > 0 and

any arm i ∈ [K], µ i,n -µ i ≤ log(1/δn) 2Ti,n , σ i,n -σ i ≤ 2 log(2/δn) Ti,n , w.p. 1 -δ, where δ n = δ/(4Kn(n + 1)).
The accuracy of the estimates translates into the difference in estimated and true function f (we drop the dependence on w for readability).

Lemma 2. Let ν i be an empirical distribution characterized by mean µ i and variance

σ i such that | µ i - µ i | ≤ ε µ i and | σ i -σ i | ≤ ε σ i , then for any fixed λ ∈ D K we have f (λ; {ν i })-f (λ; { ν i }) ≤ w max i ε µ i + 1-w mini √ λi max i ε σ i .
This lemma shows that the accuracy in estimating f is affected by the largest error in estimating the mean or the variance of any arm. This is due to the fact that λ empirical allocation λt is (0.5, 0.1, 0.4) and the estimated allocation λt is (0.5, 0.4, 0.1). In the following steps, the most effective way to reduce the regret is not to use λt, but to pull arm 2 more than 40%, in order to close the gap between λt and λt as fast as possible.

may give a high weight to a poorly estimated arm, i.e., λ i may be large for large ε i . As a result, if ε µ i and ε σ i are defined as in Prop. 1, the lemma requires that all arms are pulled often enough to guarantee an accurate estimation of f . Furthermore, the upper-bound scales inversely with the minimum proportion min i λ i . This shows the need of restricting the possible λs to allocations with a non-zero lower-bound to min i λ i , which is guaranteed by the use of the restricted simplex D K in the algorithm. Finally, notice that here we consider a fixed allocation λ, while later we need to deal with a (possibly) random choice of λ, which requires a union bound over a cover of D K (see Cor. 1). Next two lemmas show how the difference in performance translates in the difference of allocations and vice versa.

Lemma 3. If an allocation λ ∈ D K is such that f * - f (λ; {ν i }) ≤ ε f , then for any arm i ∈ [K], |λ i -λ * i | ≤ 2K α √ ε f
, where α is the strong-concavity parameter of f w (Lem. 1).

Lemma 4. The performance of an allocation λ ∈ D K compared to the optimal allocation λ * is such that

f (λ * ; {ν i }) -f (λ; {ν i }) ≤ 3β 2 λ -λ * 2 .
In both cases, the bounds depend on the shape of f through the parameters of strong concavity α and smoothness β, which in turn depends on the constrained simplex D K and the choice of λ min . Before stating the regret bound, we need to introduce an assumption on λ * .

Assumption 1. Let λ * min = min i λ * i be the smallest proportion over the arms in the optimal allocation and let D K the restricted simplex used in the algorithm. We assume that the weight parameter w and the distribu-

tions {ν i } i are such that λ * min ≥ λ min , that is λ * ∈ D K .
Notice that whenever all arms have non-zero variance and w < 1, λ * min > 0 and there always exists a non-zero λ min (and thus a set D K ) for which the assumption can be verified. In general, the larger and more similar the variances and the smaller w, the bigger λ * min and less restrictive the assumption. The choice of λ min also affects the final regret bound.

Theorem 1. We consider a MAB with K ≥ 2 arms with mean {µ i } and variance {σ 2 i }. Under Asm. 1, ForcingBalance with a parameter η ≤ 21 and a simplex D K restricted to λ min suffers a regret

R n ( λ) ≤                1 if n ≤ n 0 43K 5/2 β α log(2/δ n ) ηλ min n -1/4 if n 0 < n ≤ n 2 153K 5/2 β α log(2/δ n ) λ min λ * min n -1/2 if n > n 2 ,
with probability 1 -δ (where δ n = δ/(4Kn(n + 1))) and

n 0 = K(Kη 2 + η √ K + 1), n 2 = C (λ * min ) 8 K 10 α 4 log 2 (1/δ n ) λ 2 min ,
where C is a numerical constant.

Remark 1 (dependence on n). The previous bound reveals the existence of three phases. For n ≤ n 0 , we are in a fully explorative phase where the pulls are always triggered by the forcing condition, the allocation λ n is uniform over arms; and it can be arbitrarily bad w.r.t. λ * . In the second phase, the algorithm interleaves forcing and tracking but the estimates { ν i,n } are not accurate enough to guarantee that λ n performs well. In particular, we can only guarantee that all arms are selected η √ n, which implies the regret decreases very slowly as O(n -1/4 ). Fortunately, as the estimates become more accurate, λ n approaches λ * , and after n 2 steps the algorithm successfully tracks λ * and achieves the asymptotic regret of O(n -1/2 ). This regret matches the minimax rate for regret minimization and active exploration (e.g., GAFS-MAX). This shows that operating a trade-off between rewards and errors is not fundamentally more difficult than optimizing either of the objectives individually. While in this analysis, the second and third phases are sharply separated (and n 2 may be large), in practice the performance gradually improves as λ approaches λ * .

Remark 2 (dependence on parameters). λ min has a major impact on the bound. The smaller its value, the higher the regret, both explicitly and through the smoothness β. At the same time, the larger λ min the stricter Asm. 1, which limits the validity of Thm. 1. A possible compromise is to set λ min to an appropriate decreasing function of n, thus making Asm. 1 always verified (for a large enough n), at the cost of worsening the rate of the regret. In the experiments, we run ForcingBalance with λ min = 0 without the regret being negatively affected. We conjecture that we can always set λ min = 0 (for which Asm. 1 is always verified), while the bound could be refined by replacing λ min (the ForcingBalance parameter) with λ * min (the minimum optimal allocation). Nonetheless, we point out that this would require to significantly change the structure of the proof as Lem. 2 does not hold anymore when λ min = 0.

Remark 3 (dependence on the problem). The remaining terms in the bound depend on the number of arms K, w, σ 2 min (through α), and λ * min . By definition of α, we notice that as w tends to 1 (pure reward maximization), the bound gets worse. This is expected since the proof relies on the strong convexity of f w to relate the accuracy in estimating f w and the accuracy of the allocations (see Lem. 3). Finally, the regret has an inverse dependence on λ * min , which shows that if the optimal allocation requires an arm to be selected only a very limited fraction of the time, the problem is more challenging and the regret increases. This may happen in a range of different configurations such as the large value of w or when one arm has very high mean and variance, which leads to a λ * highly concentrated on one single arm and λ * min very small. A very similar dependence is already present in previous results for active exploration (see e.g., [START_REF] Carpentier | Upper-confidence-bound algorithms for active learning in multi-armed bandits[END_REF]).

Remark 4 (proof ). A sketch and the complete proof are in App. B. While the proof shares a similar structure as GAFS-MAX's, in GAFS-MAX we have access to an explicit form of the optimal allocation λ * and the proof directly measures the difference between allocations. Here, we have to rely on Lemmas 3 and 4 to relate allocations to objective functions and vice versa. In this sense, our analysis is a generalization of the proof in GAFS-MAX and it can be applied to any strongly convex and smooth objective function.

Experiments

We evaluate ForcingBalance on synthetic data and a problem directly derived from an educational application. Additional experiments are in the appendix.

Synthetic Data

We consider a MAB with K = 5 arms with mean and variance given in Fig. 4. While ρ(λ) is optimized by always pulling arm 5, ε(λ) is minimized by an allocation selecting more often arm 4 that has the larger variance (for w = 0, the optimal allocation λ * 4 is over 0.41). For w = 0.9 (i.e., more weight to cumulative reward than estimation error) the optimal allocation λ * is clearly biased towards arm 5 and only partially to arm 4, while all other arms are pulled only a limited fraction of time (well below 2%). We run ForcingBalance with η = 1 and λ min = 0 and we average over 200 runs.

Dependence on n. In Fig. 3-(left) we report the average and the 0.95-quantile of the rescaled regret R n = √ nR n . From Thm. 1 we expect the rescaled regret to increase as √ n in the first exploration phase, then to increase as n 1/4 in the second phase, and finally converge to a constant (i.e., when the actual regret enters into the asymptotic regime of O(n -1/2 )). From the plot we see that this is mostly verified by the empirical regret, although there is a transient phase during which the rescaled regret decreases over n, which suggests that the actual regret may decrease with a faster rate, at least in a first moment. This behavior may be captured in the theoretical analysis by replacing the use of Hoeffding bounds with Bernstein concentration in- equalities, which may reveal faster rate (up to O(1/n)) whenever n and the standard deviations are small.

Tracking. In Fig. 3-(center), we study the behavior of the estimated allocation λ and the actual allocation λ (we show λ 4 and λ 4 ) w.r.t. the optimal allocation (λ * 4 = 0.0794). In the initial phase, λ is basically uniform (1/K) since the algorithm is always in forcing mode. After the exploration phase, λ is computed on the estimates that are already quite accurate, and it rapidly converges to λ * . At the same time, λ keeps tracking the estimated optimal allocation and it also tends to converge to λ * but with a slightly longer delay. We further study the tracking rule in the appendix.

Pareto frontier. In Fig. 3-(right) we study the performance of the optimal allocation λ * for varying weights w. We report the Pareto frontier in terms of average reward ρ(λ) and average estimation error ε(λ). The optimal allocation smoothly changes from focusing on arm 4 to being almost completely concentrated on arm 5 (λ * 4 = 0.41 and λ * 5 = 0.20 for w = 0.0 and λ * 4 = 0.0484 and λ * 4 = 0.9326 for w = 0.95). As a result, we move from an allocation with very low estimation error but poor reward to a strategy with large reward but poor estimation. We report the Pareto frontier of ForcingBalance for different values of n. In this setting, ForcingBalance is more effective in approaching the performance of λ * for small values of w. This is consistent with the fact that for w = 0, λ * min = 0.097, while it decreases to 0.004 for w = 0.95, which increases the regret as illustrated by Thm. 1.

Educational Data

Treefrog Treasure is an educational math game in which players navigate through a world of number lines. Players must find and jump through the appropriate fraction on each number line. To analyze the effectiveness of our algorithm when parameters are drawn from a real-world setting, we use data from an experiment in Treefrog Treasure to estimate the means and variances of a 64-arm experiment. Each arm corresponds to a different experimental condition: After a tutorial, 34,197 players each received a pair of number lines with different properties, followed by the same (randomized) distribution of number lines thereafter. We measured how many number lines students solved conditioned on the type of this initial pair; the hope is to learn which type of number line encourages player persistence on a wide variety of number lines afterwards. There were a total of K = 64 conditions, formed from choosing between 2 representations of the target fraction, 2 representations of the label fractions on the lines themselves, adding or withholding tick marks at regular intervals on the number line, adding or removing hinting animations if the problem was answered incorrectly, and 1-4 different rates of backoff hints that would progressively offer more and more detailed hints as the player made mistakes. The details of both the experiments and the experimental conditions are taken from [START_REF] Liu | Trading off scientific knowledge and user learning with multi-armed bandits[END_REF], though we emphasize that we measure a different outcome in this paper (player persistence as opposed to chance of correct answer).

We run ForcingBalance, standard UCB, GAFS-MAX (adapted to minimize the average estimation error) over n = 25, 000 and 100 runs. Both ForcingBalance and GAFS-MAX use η = 1 and w is set to 0.6 to give priority to preference to the accuracy of the estimates and to 0.95 to favor the player's experience and entertainment. We study the performance according to the average reward ρ(λ) (normalized by the largest mean), the estimation error ε(λ) (normalized by the largest standard deviation), the rescaled regret √ nR n , the relative discounted cumulative gain (DCG) and the RankErr that measure how well arms are ranked on the basis of their mean. 6 Small values of RelDCG and RankErr mean that arms are estimated well enough to correctly rank them and can allow the experiment designer to later reliably remove the worst performing arms. The results are reported in Fig. 6. Since UCB, GAFS-MAX, and Unif do not depend on w, their performance is constant except for the regret, which is computed w.r.t. to different λ * s. As expected, UCB achieves the highest reward but it performs very poorly in estimating the arms' mean and in ranking them. GAFS-MAX does not collect much reward but is very accurate in the estimate of the means. On the other hand, Forcing-Balance balances the two objectives and it achieves the smallest regret. We notice that ForcingBalance preserves a very good estimation accuracy without compromising too much the average reward (for w = 0.95).

In this situation, effectively balancing between the two objectives allows us to rank the different game settings in the right order while providing players with a good experience. Had we used UCB, the outcome for players would have been better, but the designers would have less insight into how the different ways of providing number lines affect player behavior for when they need to design the next game (high RankErr ). Alternatively, using GAFS-MAX would give the designer excellent insight into how different number lines affect players; however, if some conditions are too difficult, we could have caused many players to quit. ForcingBalance provides a useful feedback to the designer without compromising the players' experience (the RankErr is close to GAFS-MAX but the reward is higher). This is more evident when moving to w = 0.95, where Forc-ingBalance significantly improves the reward w.r.t. GAFS-MAX without losing much accuracy in ranking the arms.

6 Let π * be the true ranking and π the estimated ranking (i.e., π(k) returns the identity of the arm ranked at position k), the DCG is computed as DCGπ = K k=1 µ π(k) log(k+1) and then we compute (DCGπ * -DCG π )/DCGπ * , while

RankErr = 1/K K i=1 |π * (i) -π(i)|.

Conclusions

We studied the tradeoff between rewards and estimation errors. We proposed a new formulation of the problem, introduced a variant of a forced-sampling algorithm, derived bounds on its regret, and we validated our results on synthetic and educational data.

There are a number of possible directions for future work. 1) An active exploration strategy tends to pull all arms a linear fraction of time while minimizing regret requires selecting sub-optimal arms a sublinear number of times. It would be interesting to prove an explicit incompatibility result between maximizing ρ(λ) and minimizing ε(λ) similar to the result of [START_REF] Bubeck | Pure exploration in multi-armed bandits problems[END_REF] for simple and cumulative regret. 2) While a straightforward application of the UCB fails, alternative formulations, such as using upper-bounds on both means and variances, could overcome the limitations of (µ, σ)-Naive-UCB. Nonetheless, the resulting function f w (•; { ν i,n }) is neither an upper nor a lower bound on the true function f w (•; {ν i }) and the regret analysis could be considerably more difficult than for ForcingBalance. Furthermore, it would be interesting to study how a Thompson sampling approach could be adapted. 3) Finally, alternative tradeoffs can be formulated (e.g., simple vs. cumulative regret). Notice that the current model, algorithm, and analysis could be easily extended to any strongly-convex and smooth function defined over some parameters of the arms' distributions.

A Technical Lemmas

Proof of Lemma 1. We study the function g(•) = -f w (•). For any i = 1, . . . , K we have

∂g(λ) ∂λ i = -wµ i - 1 -w 2K σ i λ 3/2 i ,
and thus the Hessian of g in λ is

[H g ] i,j = ∂ 2 g(λ) ∂λ i ∂λ j = 0 if i = j 3(1-w) 4K σi λ 5/2 i otherwise ,
which means that we have a diagonal matrix. Thus it is easy to show that for any λ ∈ D K , the Hessian is bounded as αI K H g βI K , which implies that the function g is α-strongly convex and β-smooth with parameters

α = 3(1 -w)σ min 4K , β = 3(1 -w)σ max 4Kλ 5/2 min • Proof of Lemma 2.
The statement is obtained by the series of inequalities

f (λ; {ν i }) -f (λ; { ν i }) = w K i=1 λ i (µ i -µ i ) + (1 -w) K K i=1 1 √ λ i ( σ i -σ i ) ≤ w K i=1 λ i µ i -µ i + (1 -w) K K i=1 1 √ λ i σ i -σ i ≤ w max i ε µ i + (1 -w) min i √ λ i max i ε σ i ,
where in the last step we used that i λ i = 1.

We also derive a simple corollary of Lemma 2, which extends the previous result to any (random) choice of allocation λ ∈ D K .

Corollary 1. After n steps, let { ν i,n } i be the empirical distributions obtained after pulling each arm T i,n times.

If we define δ n = δ/(4Kn 2 (n + 1)), then

P ∀n > 0, ∀λ ∈ D K , f (λ; {ν i }) -f (λ; { ν i }) ≤ max i 2K log(2/δ n ) λ min T i,n ≥ 1 -δ,
Proof. The proof is identical to the one of Lemma 2 together with a union bound over a covering of the simplex D K and Prop. 1 for the concentration of µ and σ. We first notice than any covering of the unrestricted simplex also covers D K . We sketch how to construct an ε-cover of a K-dimensional simplex. For any integer n = 1/ε , we can design a discretization D

(n)

K of the simplex defined by any possible (fractional) distribution λ = (λ 1 , . . . , λ K ) such that for any λ i there exists an integer j such that λ i = j/n. D

(n)

K is then an ε cover in ∞ -norm since for any distribution λ ∈ D K there exists a distribution λ ∈ D

(n) K such that ||λ -λ|| ∞ ≤ 1/n ≤ ε. The cardinality of D (n)
K is (loosely) upper-bounded by n K (n possible integers for each component λ i ). Upper-bounding the result of Lemma 2 by max{max i ε µ i ; max i ε σ i }/ √ λ min (since we focus on λ in the restricted simplex D K ) and following standard techniques in statistical learning theory (see e.g., Thm. 4 by [START_REF] Bousquet | Introduction to statistical learning theory[END_REF]), we obtain the final statement.

Proof of Lemma 3. Let g(•) = -f w (•). For any pair of allocations λ, λ ∈ D K , from Taylor's theorem there exists an allocation λ such that

g(λ) = g(λ ) + ∇g(λ ) (λ -λ ) + 1 2 (λ -λ ) H g (λ )(λ -λ ).
Given the bound from Lemma 1 (strong convexity) and taking λ = λ * (by Asm. 1, λ * ∈ D K ) we have

g(λ) ≥ g(λ * ) + ∇g(λ * ) (λ -λ * ) + α 2 ||λ -λ * || 2 2 .
Since λ * is the optimal allocation over D K , the gradient ∇g(λ * ) in λ * in direction towards λ is nonnegative and thus

α 2 ||λ -λ * || 2 2 ≤ f (λ * ) -f (λ). Given that ||λ -λ * || ∞ ≤ ||λ -λ * || 2 , we finally obtain max i=1,...,K |λ i -λ * i | ≤ 2 α f (λ * ) -f (λ) . Proof of Lemma 4. Let g(•) = -f w (•).
For any pair of allocations λ, λ ∈ D K , from Taylor's theorem there exists an allocation λ such that

g(λ) = g(λ ) + ∇g(λ ) (λ -λ ) + 1 2 (λ -λ ) H g (λ )(λ -λ ).
Given the bound from Lemma 1 (smoothness) and taking λ = λ * (by Asm. 1, λ * ∈ D K ) we have

g(λ) ≤ g(λ * ) + ∇g(λ * ) (λ -λ * ) + β 2 ||λ -λ * || 2 2 .
Consider the term ∇g(λ) (λ -λ * ). By convexity of g, the gradient of g in λ towards the optimum λ * is negative.

As a result we get

g(λ) ≤ g(λ * ) + ∇g(λ * ) -∇g(λ) (λ -λ * ) + β 2 ||λ -λ * || 2 2 .
Using Cauchy-Schwarz inequality and the fact that for twice differentiable functions, the boundedness of the Hessian (i.e., the smoothness of function) implies that the gradient of g is Lipschitz with coefficient β, we obtain

g(λ) ≤ g(λ * ) + β||λ -λ * || 2 2 + β 2 ||λ -λ * || 2 2 .
Substituting g with f we obtain the desired statement

f w (λ * ; {ν i }) -f w (λ; {ν i }) ≤ 3β 2 λ -λ * 2 .
We introduce another useful intermediate lemma that states the quality of the estimated optimal allocation. Lemma 5. Let ν i,n be the empirical distribution characterized by mean µ i,n and variance σ i,n estimated using

T i,n samples. If λ n = arg max λ∈D K f (λ; { ν i }))
is the estimated optimal allocation, then

f * -f ( λ i,n ; {ν i }) ≤ max i 2 2K log(2/δ n ) λ min T i,n •
with probability 1 -δ, where δ n = δ/(4Kn 2 (n + 1)).

Trading off Rewards and Errors in Multi-Armed Bandits

Proof of Lemma 5. The statement follows from the series of inequalities

f * -f ( λ i,n ; {ν i }) = f (λ * ; {ν i }) -f (λ * ; { ν i }) + f (λ * ; { ν i }) -f ( λ i,n ; { ν i }) + f ( λ i,n ; { ν i }) -f ( λ i,n ; {ν i }) ≤ 2 sup λ∈D K f (λ; {ν i }) -f (λ; { ν i }) ,
where the difference between the third and fourth term is upper-bounded by 0 since λ i,n is the optimizer of f (•; { ν i }). The final statement follows from Corollary 1.

Lemma 6. Let consider a function h(n) = o(n) monotonically increasing with n. If the forcing condition is

T i,n < h(n) + 1, (6)
then for any n ≥ n 0

T i,n ≥ h(n), (7)
with n 0 = min{n : ∃ρ ∈ N, n = ρK + 1, s.t. ρ ≥ h(ρK) + 1} corresponding to the end of the uniform exploration phase.

Proof. The proof of this lemma generalizes Lemma 11 of [START_REF] Antos | Active learning in heteroscedastic noise[END_REF].

Step 1. We consider a step n such that (7) holds. We recall that since T i,n is an integer, then T i,n ≥ h(n) . We define ∆(n) as the largest number of steps after n in which ( 7) still holds, that is

∆ n = max ∆ ∈ N : T i,n+∆n ≥ T i,n ≥ h(n) ≥ h(n + ∆ n ) .
If for n -1 we have h(n -1) = h(n -1), then ∆ n-1 = 0, since h(n -1) < h(n) by definition of h(n) and we say that n is a reset step. We use n l with l ∈ N to denote the sequence of all reset steps. We define the l-th phase as P l = { n l , . . . , n l + ∆ n l } and we notice that if there exists a step n ∈ P l such that T i,n satisfies (7), then for any other step n ∈ P l we have

T i,n ≥ T i,n (a)
≥ h(n

) (b) ≥ h( n l ) (c) ≥ h( n l + ∆ n l ) (d) ≥ h(n )
where (a) follows from ( 7), (b) holds since n ≥ n, (c) by definition of ∆ n , and (d) by the fact that h(n) is monotonically increasing in n and n + ∆ n ≥ n . Finally, we also notice that ∆ n l is an non-decreasing function of l and thus P l becomes longer and longer over time. At this point, we have that ( 7) is consistent within each phase P l and thus we need to show that the forcing exploration guarantees that the condition is also preserved across phases.

Step 2. We study the initial phase of the algorithm. The forcing condition determines a first phase in which all arms are explored uniformly in an arbitrary (but fixed) order (for sake of simplicity let us consider the natural ordering {1, . . . , K}. Let n = ρK for some ρ ∈ N during the uniform exploration phase, then at the beginning of step n arm K is pulled and at the end of the step all arms have T i,n+1 = ρ samples. The end of the exploration phase corresponds to the smallest value of ρ so that step n = ρK + 1 is such that T i,n = ρ ≥ h(n) + 1 = h(ρK) + 1, so that the forcing condition is not triggered any more. We also notice T i,n ≥ h(ρK) satisfies ( 7) and that n = ρK + 1 is a reset step (i.e., n -1 = ρK) and thus we denote by n 1 = ρK + 1 the beginning of the first phase P 1 and by step 1, we obtain that for all n ∈ P 1 , T i,n ≥ h(ρK + 1 + ∆ ρK ) (i.e., (7) keeps holding). This is the base for induction.

Step 3. We assume that (7) holds for a step n l at the beginning of phase P l for all arms, then by step 1, (7) also holds for any other step until n + ∆ n independently on whether the arms are pulled or not. We study what happens at the beginning of the successive phase starting at n + ∆ n + 1. We first consider all arms i for which T i,n = h(n) , then we have T i,n < h(n) + 1, which implies that the forcing exploration is triggered on this arm. Since there are potentially K arms in this situation, it may take as long as K steps before updating them all. Thus, if ∆ n > K, then

T i, n l +∆ n l +1 = T i, n l+1 ≥ T i, n l +K (a) ≥ h( n l ) + 1 (b) ≥ h( n l + ∆ n l ) + 1 (c) > h( n l + ∆ n l + 1),
where in (a) we use the fact that i is forced to be pulled, (b) follows from the definition of ∆ n , and (c) is by the sub-linearity of h(n). Then we focus on the arms for which T i,n ≥ h n + 1. Since h n l + 1 < h n l + 1 the forcing condition is not met (at least at the beginning). We have that even if during in phase P l these arms are never pulled, we have

T i, n l +∆ n l +1 = T i, n l+1 ≥ T i, n l ≥ h( n l ) + 1 > h( n l + ∆ n l + 1),
where the arguments are as above. This concludes the inductive step showing that if (7) holds in a phase P l then it holds at P l+1 as well as soon as ∆ n l > K. As a result, step 2, together with the condition on n for the end of the exploration phase, and step 3 prove the statement.

Corollary 2. If h(n) = η √ n, then for any n ≥ n 0 = K(Kη 2 + η √ K + 1) and all arms T i,n ≥ η √ n.
Proof. We just need to derive the length of the exploration phase

n 0 = min{n : ∃ρ ∈ N, n = ρK + 1, s.t. ρ ≥ h(ρK) + 1} ρ ≥ η ρK + 1.
Solving for ρ and upper-bounding the condition gives

ρ ≥ η 2 K +η √ K +1, which gives n 0 = K(Kη 2 +η √ K +1).
Lemma 7. We assume that there exists a value n 1 after which λ n is constantly a good approximation of λ * , i.e., there exists a monotonically decreasing function ω(n) such that for any step n ≥ n 1 max i=1,...,K

λ i,n -λ * i ≤ ω(n).
Furthermore, we assume that for any n ≥ n 1 the following condition holds

2nω(n) ≥ η √ n + 1. (8)
Then for any arm i

-(K -1) max n 1 n , 2ω(n) + 1 ≤ λ i,n -λ * i ≤ max n 1 n (1 -λ i ), 2ω(n) + 1 .
Proof. This lemma follows from similar arguments as Lemma 4 by [START_REF] Antos | Active learning in heteroscedastic noise[END_REF]. Nonetheless, given the use of a slightly different tracking rule, we provide the full proof here.

We study the error

ε i,n = λ i,n -λ * i . Since T i,n+1 = T i,n + I{I n = i}, we have ε i,n+1 = T i,n + I{I n = i} n + 1 - n + 1 n + 1 λ * i = n n + 1 T i,n n -λ * i + I{I n = i} -λ * i n + 1 = n n + 1 ε i,n + I{I n = i} -λ * i n + 1 •
Then we need to study the arm selection rule at step n to understand the evolution of the error and its relationship with the error of λ. We have

I{I n = i} ≤ I{T i,n < η √ n + 1 or i = arg min j ( λ i,n -λ i,n )}.
We study the tracking condition. Let i = arg min j ( λ j,n -λ j,n ) then

λ i,n = λ i,n + min j λ j,n -λ j,n = λ * i + λ i,n -λ * i + min j λ j,n -λ * j + λ * j -λ j,n ≤ λ * i + λ i,n -λ * i + min j λ j,n -λ * j + max j λ * j -λ j,n ≤ λ * i + 2 max j λ * j -λ j,n ≤ λ * i + 2ω(n),
where we use the fact that since j λ j,n -λ * j = 0 and all proportions are bigger than zero, then the minimum over λ j,n -λ * j is nonpositive. We now study the forcing condition

T i,n = n λ i,n < η √ n + 1. For n ≥ n 1 , we have λ i,n -λ * i ≤ η √ n + 1 n ≤ 2ω(n),
where the last step follows from the properties of ω defined in the statement. Then we can simplify the condition under which arm i is selected as

I{I n = i} ≤ I{ε i,n ≤ 2ω(n)}.
We proceed by defining E i,n = nε i,n and the corresponding process

E i,n+1 = E i,n + I{I n = i} -λ * i .
We also introduce

E i,n1 = E i,n1 , E i,n+1 = E i,n + I{ E i,n ≤ 2nω(n)} -λ * i ,
which follows the same dynamics of E i,n except for the fact that the looser arm selection is considered. From Lemma 5 of [START_REF] Antos | Active learning in heteroscedastic noise[END_REF], we have E i,n ≤ E i,n for any n ≥ n 1 . It is easy to see that E i,n satisfies the following inequality

E i,n ≤ max{E k,n1 , 2nω(n) + 1} ≤ max{n 1 , 2nω(n) + 1},
where the last inequality follows from the fact that E k,n1 ≤ n 1 (1 -λ i ). Then, we obtain the upper-bound

ε i,n ≤ max n 1 n (1 -λ i ), 2ω(n) + 1 .
From the upper-bound, we obtain a lower bound on ε i,n as

ε i,n = - j =i ε i,n ≥ -(K -1) max j ε j,n ≥ -(K -1) max n 1 n , 2ω(n) + 1 ,
which concludes the proof.

B Proof of Theorem 1

In this section, we report the full proof of the main regret theorem, whose complete statement is as follows.

Theorem 1 We consider a MAB with K ≥ 2 arms characterized by distributions {ν i } with mean {µ i } and variance {σ 2 i }. Consider ForcingBalance with a parameter η ≤ 21 and a simplex restricted to λ min . Given a tradeoff parameter w and under Asm. 1, ForcingBalance suffers a regret

R n ( λ) ≤                1 if n ≤ n 0 43K 5/2 β α log(2/δ n ) ηλ min n -1/4 if n 0 < n ≤ n 2 153K 5/2 β α log(2/δ n ) λ min λ * min n -1/2 if n > n 2 ,
with probability 1 -δ (where δ n = δ/(4Kn(n + 1))) and

n 0 = K(Kη 2 + η √ K + 1), and n 2 = C (λ * min ) 8 1 α 4 λ 4 min K 10 log(1/δ n ) 2 ,
where C is a suitable numerical constant.

Sketch of the proof. In the active exploration problem, [START_REF] Antos | Active learning in heteroscedastic noise[END_REF] rely on the fact that minimizing ε(λ) has a closed-form solution w.r.t. the parameters of the problem (i.e., the variance of the arms) and errors in estimating the parameters are directly translated into deviations between λ i,n and λ * . In our case, λ * has no closed-form solution and we need to explicitly "translate" errors in estimating f w into the deviations between allocations and vice versa. Furthermore, ForcingBalance uses a slightly different tracking strategy (see Lemma 7) and we prove the effect of the forcing exploration for a more general condition (see Lemma 6). The proof follows the following steps. We first exploit the forcing exploration of the algorithm to guarantee that each arm is pulled at least O( √ n) at each step n. Through Prop. 1, Lemma 2, and Lemma 3 we obtain that the allocation λ n converges to λ * with a rate O(1/n 1/8 ). We show that the tracking step is executed often enough (w.r.t. the forced exploration) and it is efficient enough to propagate the errors of λ n to the actual allocation λ n , which also approaches λ * with a rate O(1/n 1/8 ). Unfortunately, this does not translate in a satisfactory regret bound but it shows that for n big enough, T i,n is only a fraction away from the desired number of pulls nλ * i , which provides a more refined lower-bound on T i,n = Ω(n). In this second phase (n ≥ n 2 ), the estimates ν i,n are much more accurate (Prop. 1) and through Lemma 2 and Lemma 3, the accuracy of λ and λ improves to O(1/n 1/4 ). At this point, we apply Lemma 4 and translate the guarantee on λ to the final regret bound. While in Prop. 1 we use simple Chernoff-Heoffding bounds, Bernstein bounds (which consider the impact of the variance on the concentration inequality) could significantly improve the final result. While the asymptotic rate would remain unaffected, we conjecture that this more refined analysis would show that whenever arms have very small variance the regret R n decreases as O(1/n) before converging to the asymptotic rate.

We now proceed with the formal proof. We start with a technical lemma.

Lemma 8. If η ≤ 21, then 2n 20K αλ min K log(1/δ n ) 2η √ n 1/4 ≥ η √ n + 1,
for any n ≥ 4.

Proof. We study the value of n 1 to satisfy Eq. 8 for ω(n), which is defined later on in step 5 of the final proof. This corresponds to finding the minimal value of n ∈ N such that

2n 20K αλ min K log(1/δ n ) 2η √ n 1/4 ≥ η √ n + 1.
We proceed by successive (often loose) simplifications to the previous expression. Since K ≥ 2 and n ≥ 1, we have that δ n ≤ δ/16. If we choose δ < 1/2, then δ n ≤ 1/32 and log(1/δ n ) > 3. As a result, we obtain that the previous condition can be written as

2n 40 αλ min 3 η √ n 1/4 ≥ η √ n + 1 ⇒ 16n 1 √ αλ min 1 η √ n 1/4 ≥ η √ n + 1 ⇒ 16n 1 √ αλ min -η 5/4 n 5/8 -η 1/4 n 1/8 ≥ 0.
We further study the first multiplicative term and use the fact that

λ min ≤ 1/K ≤ 1/2, α = 2(1-w)σ 2 min /K ≤ 1/4, then 2nω(n) ≥ η √ n + 1 ⇒ 16n 1 1/8 -η 5/4 n 5/8 -η 1/4 n 1/8 ≥ 0 ⇒ 45n -η 5/4 n 5/8 -η 1/4 n 1/8 ≥ 0.
Using the condition that 45 ≥ η 5/4 and the fact that η 5/4 ≤ η 1/4 , we can further simplify the last term as

2nω(n) ≥ η √ n + 1 ⇒ n -n 5/8 -n 1/8 ≥ 0,
which is satisfied for any n ≥ 4.

Proof of Theorem 1.

Step 1 (accuracy of empirical estimates). In Alg. 2 we explicitly force all arms to be pulled a minimum number of times. In particular, from Lemma 6 we have that for any n ≥ n

0 = K(Kη 2 +η √ K +1) then T i,n ≥ η √ n.
From Proposition 1, if δ n = δ/(4Kn 2 (n + 1)), then for any arm i we have 7

µ i,n -µ i ≤ log(1/δ n ) 2η √ n σ 2 i,n -σ 2 i ≤ 2K log(2/δ n ) 2η √ n ,
with probability at least 1 -δ.

Step 2 (accuracy of function estimate). Using Corollary 1 we can bound the error on the function f when using the estimates ν i,n instead of the true parameters ν i . In fact, for any λ ∈ D K we have

f (λ; {ν i }) -f (λ; ν i,n ) ≤ 2K log(2/δ n ) λ min η √ n
Step 3 (performance of estimated optimal allocation). We can derive the performance of the allocation λ n computed on the basis of the estimates obtained after n samples. From Lemma 5 we have

f (λ * ; {ν i }) -f ( λ n ; {ν i }) ≤ 2 2K log(2/δ n ) λ min η √ n .
Step 4 (from performance to allocation). From Lemma 3 we have that a loss in performance in terms of the function f implies the similarity of the estimated allocation to λ * . For any arm i = 1, . . . , K we have

| λ i,n -λ * i | ≤ 4 α 2K log(2/δ n ) λ min η √ n 1/4
.

Step 5 (tracking). The algorithm is designed so that the actual allocation λ n (i.e., the fraction of pulls allocated to each arm until step n) is tracking the optimal estimated allocation λ n . Since the difference between λ n and λ * is bounded as above, we can use Lemma 7 to bound the accuracy of λ. We define

ω(n) := 4 α 2K log(2/δ n ) λ min η √ n 1/4
, then from Lemma 8 we have that for any n ≥ 4 (and η ≤ 21), the condition in Eq. 8 (2nω(n) ≥ η √ n + 1) is satisfied and we can apply Lemma 7. In particular, we have that n 1 = max{5, n 0 } ≤ n 0 guarantees both conditions in the lemma and this implies that for any arm i = 1, . . . , K

| λ i,n -λ * i | ≤ η(n) := (K -1) max n 0 n ; 2ω(n) + 1 . (9)
If we stopped at this point, the regret could be bounded using Lemma 4 as

f (λ * ; {ν i }) -f ( λ n ; {ν i }) ≤ 34K 5/2 β α log(1/δ n ) ηλ min n -1/4 ,
which is decreasing to zero very slowly.

Step 6 (linear pulls). From Eq. 9, we can than easily derive a much stronger guarantee on the number of pulls allocated to any arm i. Let n 2 = min{n ∈ N : η(n) ≤ min i λ * i /2}, then for any n ≥ n 2 we have

| λ i,n -λ * i | ≤ λ * i /2, which implies that T i,n ≥ nλ * i /2.
Step 7 (regret bound). At this point we can reproduce the steps 1, 2, and 3 using T i,n ≥ nλ * i /2 ≥ nλ * min /2 samples and we obtain that for any n

≥ n 2 f (λ * ; {ν i }) -f ( λ n ; {ν i }) ≤ 4 K log(2/δ n ) nλ * min λ min •
Unfortunately this guarantee on the performance of the optimal estimated allocation does not directly translate into a regret bound on λ n (i.e., the actual distribution implemented by the algorithm up to step n). We first apply the same idea as in step 4 and obtain

| λ i,n -λ * i | ≤ ω (n) := 8 α K log(2/δ n ) 2nλ * min λ min 1/4
.

By applying a similar argument as in Lemma 8, we obtain that n 1 = max{4, n 0 } = n 0 and the tracking argument in step 5 gives us

| λ i,n -λ * i | ≤ η (n) := (K -1) max n 0 n ; 2ω (n) + 1 .
At this point we just need to apply Lemma 4 on the difference between λ and λ * and obtain

f (λ * ; {ν i }) -f ( λ n ; {ν i }) ≤ 3β 2 || λ n -λ * i || 2 2 ≤ 3βK 2 2 max n 2 0 n 2 ; 9(ω (n)) 2 ,
where we used

|| λ n -λ * i || 2 ≤ √ K max i | λ i,n -λ * i |.
Using the definition of ω (n) gives the final statement

f (λ * ; {ν i }) -f ( λ n ; {ν i }) ≤ 153K 5/2 β α log(2/δ n ) nλ * min λ min •
Step 8 (condition on n). From the definition of n 2 , we have that n 2 is at most a value n such that η(n) ≤ λ * i /2. We consider the worst case form λ * i , that is λ * min and we bound separately the two possible terms in the max in the definition of η(n). The first term should satisfy

(K -1) n 0 n ≤ λ * i 2 ⇒ n ≥ 2n 0 (K -1) λ * min •
For the second term we have a much slower decreasing function ω(n) and the condition is

K 4 α 2K log(2/δ n ) λ min η √ n 1/4 ≤ λ * i 2 ⇒ n 1/8 ≥ 4 λ * min K 5/4 √ α log(2/δ n ) λ min 1/4
, which is clearly more constraining than the first one. Then we define

n 2 = 4 8 (λ * min ) 8 K 10 α 4 log 2 (1/δ n ) λ 2 min • Exp. λ * µ σ 2 1 0.57 (balanced) (1.5,1) (1,

C Supplementary Results

Optimal allocation. We consider four different MABs with K = 2 arms with means and variances reported in Table 1 and w = 0.4 (i.e., slightly more weight to the estimation errors). In the first two settings, we notice that λ * is an almost balanced allocation over the two arms, with a slight preference for arm 1. In the first case, this is due to the fact that the variance of the arms is exactly the same, which suggests a perfectly even allocation would guarantee equal estimation accuracy of the means. Nonetheless, since arm 1 has a larger mean, this moves λ * towards it. On the other hand, in the second case both means and variances are unbalanced, but while σ 2 2 > σ 2 1 suggests that arm 2 should be pulled more (to compensate for the larger variance), µ 1 µ 2 requires arm 1 to be pulled much more than arm 1. As a result, λ * is still balanced. In the third and fourth setting, λ * recommends selecting one arm much more than the other. While in the third setting this is due to a strong unbalance in the variances, in the fourth setting this is induced by the difference in the mean.

Comparison with Naive-UCB. Before reporting empirical results on the straightforward UCB-like algorithm (called (µ, σ)-Naive-UCB) illustrated in Sect. 3, where an upper-bound on the function f w is constructed at each step, we first provide a preliminary example. Consider the case (very extreme for illustrative purposes) w = 0, σ 1 = 1, σ 2 = 2, for which λ * ≈ [0.38, 0.62]. Assume that after pulling each arm twice, we have σ 1 = 2, σ 2 = 0.1. Using (µ, σ)-Naive-UCB, the estimated optimal allocation would be very close to [10] (i.e., only arm 1 is pulled). Then (µ, σ)-Naive-UCB keeps selecting arm 1, while arm2, whose lower-bound on the variance remains very small (1/ √ T 2 is large), is almost never pulled, thus preventing the estimate from converging and the algorithm to have a small regret. This shows the algorithm has a constant regret with a fixed probability.

In Fig. 7 we report the rescaled regret R n = √ nR n for both ForcingBalance and (µ, σ)-Naive-UCB. More in detail, we define an upper-bound of f w as in Eq. 5, but we threshold the lower bounds on the variance to a constant (0.01 in the experiments). Then we compute λ n as the optimal allocation of f U B w and the same tracking arm selection as in ForcingBalance is used. On the other hand, (µ, σ)-Naive-UCB does not use any forced exploration, while it relies on the optimism-of-uncertainty principle to sufficiently explore all arms. The comparison is reported for settings 2 and 3 of Table 1.

For both settings, ForcingBalance performs as well as expected and its rescaled regret eventually converges to a constant (in this case the constant is very small since we have only two arms). On the other hand, (µ, σ)-Naive-UCB achieves very contrasting results. In setting 2 (Fig. 7-left), in a first phase (µ, σ)-Naive-UCB suffers a regret with a slower rate than O (1/ √ n) since the rescaled regret is increasing. While in ForcingBalance this phase is limited to the initial exploration of all arms, in (µ, σ)-Naive-UCB this is due to the fact that the algorithm is underestimating the variances of the arms and it tends to be more aggressive in selecting arms with larger mean (arm 1 in this case), which corresponds to very limited exploration to the other arm. The only residual sources of exploration are triggered by the fact that lower bound are capped to a small constant (when negative), which encourages partial exploration, and upper-confidence bounds on the means, which induce a UCB-like strategy where the two arms are explored to identify the best. As a result, there is a long phase of poor performance, until enough exploration is achieved to have estimates which allow an accurate estimate of λ * and thus a regret which decreases again as O (1/ √ n). In setting 3 (Fig. 7-right), the optimal allocation is very biased towards the second arm (see Table 1). However, (µ, σ)-Naive-UCB would target more the first arm attracted by its high mean upper bound (i.e., λ 1 λ 2 in contrast with λ * ). As a result, its regret is much higher in this case than in the previous case. Actually, with the horizon of n = 5000 the regret is constant (and thus the rescaled regret increases as O( √ n)) and the algorithm does not seem to be able to recover from bad estimates of the variance.

Tracking performance. Finally, we investigate the effect of the tracking strategy of ForcingBalance by comparing it with an arm selection where I t is drawn at random from λ t . This version of ForcingBalance does not try to compensate for the difference between the current allocation λ t and the desired allocation λ t . We 4. From left to right: ∞ error in approximating λ * , error in approximating λ * 4 and rescaled regret.

report the error in estimating λ * in ∞ -norm for both λ t and λ t in the two configurations of ForcingBalance.

We can see in Fig. 8-(left/center) that while λ is not affected by the tracking rule, λ is significantly slower in converging to λ * when the algorithm does not compensate for the mismatch is estimated optimal and actual allocations. Furthermore, this directly translates in a much higher regret as illustrated in Fig. 8-(right).

Figure 1 :

 1 Figure 1: Function fw and optimal solution λ * for different values of w (red line) for a MAB with K= 2, µ1 = 1, µ2 = 2, σ 2 1 = σ 2 2 = 1.For small w, the problem reduces to optimizing the average estimation error. Since the arms have the same variance, λ * is an even allocation over the two arms. As w increases, the ρ component in fw becomes more relevant and the optimal allocation selects arm 2 more often, until w = 1 when all the resources are allocated to arm 2.

Figure 2 :

 2 Figure 2: The ForcingBalance algorithm.

Figure 3 :Figure 4 :

 34 Figure 3: Rescaled regret (left), allocations errors (center), Pareto frontier (right) for the setting in Fig. 4.

Figure 5 :

 5 Figure 5: Treefrog Treasure, a math game about number lines.

Figure 6 :

 6 Figure 6: Results on the educational dataset.

Figure 7 :

 7 Figure7: Rescaled regret for ForcingBalance and (µ, σ)-Naive-UCB on settings 2 and 3 of Table1. Notice the difference in the scale of the x and y axes.

Figure 8 :

 8 Figure 8: Performance of ForcingBalance with (top) and without (bottom) tracking step for the setting in Table4. From left to right: ∞ error in approximating λ * , error in approximating λ * 4 and rescaled regret.

Table 1 :

 1 Optimal allocation for a MAB with K = 2 arms, different values of mean and variance, and w = 0.4.

	1)

Proceedings of the 20 th International Conference on Artificial Intelligence and Statistics (AISTATS) 2017, Fort Lauderdale, Florida, USA. JMLR: W&CP volume 54. Copyright 2017 by the author(s).

This choice also "equalizes" the standard regret bounds for the two separate objectives, so that the minimax regret in terms of ρ and the known upper-bounds on the regret w.r.t. ε are both O(1/ √ n).

A more accurate definition of fw over the simplex requires completing it with fw(λ) = -∞ whenever there exists a component λi = 0 linked to a non-zero variance σ 2 i .

3 Consider a real number r ∈ [0, 1] and Rn any rounding of rn (e.g., Rn = rn ), then |Rn -rn| ≤ 1. If we use rn = Rn/n as fractional approximation of r with resolution n, then we obtain that | rn -r| ≤ 1/n.

Variations on the forcing or forced sampling approach have been used in many settings including standard bandits[START_REF] Yakowitz | The nonparametric bandit approach to machine learning[END_REF] Lai, 1995, Szepesvári, 2008], linear bandits[START_REF] Goldenshluger | A linear response bandit problem[END_REF], contextual bandits[START_REF] Langford | The epoch-greedy algorithm for multi-armed bandits with side information[END_REF], and experimental optimal design[START_REF] Wiens | V-optimal designs for heteroscedastic regression[END_REF]

].5 Consider the case of 3 arms, where after t steps, the

Acknowledgements The research presented in this paper was supported by French Ministry of Higher Education and Research, Nord-Pas-de-Calais Regional Council, Inria and Carnegie Mellon University associated-team project EduBand, and French National Research Agency projects ExTra-Learn (n.ANR-14-CE24-0010-01) and BoB (n.ANR-16-CE23-0003).