Alexandra Carpentier
email: alexandra.carpentier@inria.fr

Rémi Munos
email: remi.munos@inria.fr

Minimax Number of Strata for Online Stratified Sampling given Noisy Samples

Keywords: Online learning, stratified sampling, Monte Carlo integration, regret bounds

We consider the problem of online stratified sampling for Monte Carlo integration of a function given a finite budget of n noisy evaluations to the function. More precisely we focus on the problem of choosing the number of strata K as a function of the budget n. We provide asymptotic and finite-time results on how an oracle that has access to the function would choose the partition optimally. In addition we prove a lower bound on the learning rate for the problem of stratified Monte-Carlo. As a result, we are able to state, by improving the bound on its performance, that algorithm MC-UCB, defined in (Carpentier and Munos, 2011a), is minimax optimal both in terms of the number of samples n and the number of strata K, up to a log(nK). This enables to deduce a minimax optimal bound on the difference between the performance of the estimate outputted by MC-UCB, and the performance of the estimate outputted by the best oracle static strategy, on the class of Hölder continuous functions, and upt to a log(n).

Introduction

The objective of this paper is to provide an efficient strategy for Monte-Carlo integration of a function f over a domain [0, 1] d . We assume that we can query the function n times. Querying the function at a time t and at a point x t ∈ [0, 1] d provides a noisy sample

f (x t ) + s(x t ) t , (1)
where t is an independent sample drawn from ν xt . Here ν x is a distribution with mean 0, variance 1 and whose shape may depend on x 1 . This model is actually very general (see Section 2). Stratified sampling is a well-known strategy to reduce the variance of the estimate of the integral of f , when compared to the variance of the estimate provided by crude Monte-Carlo. The principle is to partition the domain in K subsets called strata and then to sample in each stratum (see [START_REF] Rubinstein | Simulation and the Monte Carlo method[END_REF] [Subsection 5.5] or [START_REF] Glasserman | Monte Carlo methods in financial engineering[END_REF]). If the variances of the strata are known, there exists an optimal static allocation strategy which allocates the samples proportionally to the measure of the stratum times their standard deviation (see Equation 3 in this paper for a reminder). We refer to this allocation as optimal oracle strategy for a given partition. In the case that the variations of f and the standard deviation of the noise s are unknown, it is not possible to adopt this strategy.

Consider first that the partition of the space is fixed. A way around this problem is to estimate the variations of the function and the amount of noise on the function in the strata online (exploration) while allocating the samples according to the estimated optimal oracle proportions (exploitation). This setting is considered in [START_REF] Etoré | Adaptive optimal allocation in stratified sampling methods[END_REF][START_REF] Grover | Active learning and its application to heteroscedastic problems[END_REF]Carpentier and Munos, 2011a). In the long version (Carpentier and Munos, 2011b) of the last paper, the authors propose the so-called MC-UCB algorithm which is based on Upper-Confidence-Bounds (UCB) on the standard deviation. They provide upper bounds for the difference between the mean-squared error2 of the estimate provided by MC-UCB and the mean-squared error of the estimate provided by the optimal oracle strategy (optimal oracle variance). The algorithm performs almost as well as the optimal oracle strategy. However, the authors of (Carpentier and Munos, 2011b) do not infirm nor assess the optimality of their algorithm with a lower bound as benchmark. As a matter of fact, no lower bound on the rate of convergence (to the oracle optimal strategy) for the problem of stratified Monte-Carlo exists, to the best of our knowledge. Still in the same paper (Carpentier and Munos, 2011b), the authors do not at all discuss on how to stratify the space. In particular, they do not pose the problem of what an optimal oracle partition of the space is, and do not try to answer on whether it is possible or not to attain it.

The next step is thus to efficiently design the partition. There are some interesting papers on that topic such that [START_REF] Glasserman | Asymptotically optimal importance sampling and stratification for pricing path-dependent options[END_REF][START_REF] Kawai | Asymptotically optimal allocation of stratified sampling with adaptive variance reduction by strata[END_REF][START_REF] Etoré | On adaptive stratification[END_REF]. The recent, state of the art, work of [START_REF] Etoré | On adaptive stratification[END_REF] describes a strategy that samples asymptotically almost as efficiently as the optimal oracle strategy, and at the same time adapts the direction and number of the strata online. This is a very difficult problem. The authors do not provide proofs of convergence of their algorithm. However for static allocation of the samples, they present some properties of the stratified estimate when the number of strata goes to infinity and provide convergence results under the optimal oracle strategy. As a corollary, they prove that the more strata there are, the smallest the optimal oracle variance.

Contributions:

The more strata there are, the smaller the variance of the estimate computed when following the optimal oracle strategy. However, the more strata there are, the more difficult it is to estimate the variance within each of these strata, and thus the more difficult it is to perform almost as well as the optimal oracle strategy. Choosing the number of strata is thus crucial and this is the problem we address in this paper. This defines a trade-off similar to the one in model selection (and in all its variants, e.g. density estimation, regression...): The wider the class of models considered, i.e. the larger the number of strata, the smaller the distance between the true model and the best model of the class, i.e. the approximation error. But the larger the estimation error. Paper [START_REF] Etoré | On adaptive stratification[END_REF], although proposing no finite time bounds, develops very interesting ideas for bounding the first term, i.e. the approximation error. As pointed out in paper e.g. (Carpentier and Munos, 2011a), it is possible to build algorithms that have a small estimation error. By constructing tight and finite-time bounds for the approximation error, it is thus possible to propose a number of strata that minimizes an upper bound on the performance. It is however not clear how consistent this choice is, i.e. how much it can be improved. The essential ingredients for choosing efficiently a partition are thus lower bounds on the estimation error, and on the approximation error.

The objective of this paper is to propose a method for choosing the minimax-optimal number of strata. Our contributions are the following.

• We first present results on what we call the quality Q n,N of a given partition in K strata N (i.e., using the previous analogy to model selection, this would represent the approximation error). Using very mild assumptions we compute a lower bound on the variance of the estimate given by the optimal oracle strategy on the optimal oracle partition. Then if the function and the standard deviation of the noise are α-Hölder, and also if the strata satsfy some assumptions, we prove that

Q n,N = O( K α/d n )
. This bound is also minimax optimal on the class of α-Hölder functions.

• We then present results on the estimation error for the estimate outputted by algorithm MC-UCB of (Carpentier and Munos, 2011a) (pseudo-regret in the terminology of (Carpentier and Munos, 2011a)). In this paper, we improve the analysis of the MC-UCB algorithm when compared to paper (Carpentier and Munos, 2011a) in terms of the dependence on K. The problem independent bound on the pseudo-regret in (Carpentier and Munos, 2011a) is of order3 Õ(Kn -4/3 ), and we tighten this bound in this paper so that it is of order Õ(K 1/3 n -4/3 ).

• We provide the first lower bound (on the pseudo-regret) for the problem of online Stratified Sampling. The bound Ω(K 1/3 n -4/3 ) is tight and matches the upper-bound of MC-UCB both in terms of the number of strata and the number of samples. This is the main contribution of the paper, and we believe that the proof technique for this bound is original.

• Finally, we combine the results on the quality and on the pseudo-regret of MC-UCB to provide a value on the number of strata leading to a minimax-optimal trade-off (up to a log(n)) on the class of α-Hölder functions.

The rest of the paper is organized as follows. In Section 2 we formalize the problem and introduce the notations used throughout the paper. Section 3 states the results on the quality of a partition. Section 4 improves the analysis of the MC-UCB algorithm, and establishes the lower bound on the pseudo-regret. Section 5 reports the best trade-off to choose the number of strata. And in Section 6, we illustrate how important it is to choose carefully the number of strata. We finally conclude the paper and suggest future works.

Setting

We consider the problem of numerical integration of a function f : [0, 1] d → R with respect to the uniform (Lebesgue) measure. We dispose of a budget of n queries (samples) to the function, and we can allocate this budget sequentially. When querying the function at a time t and at a point x t , we receive a noisy sample X(t) of the form described in Equation 1.

We now assume that the space is stratified in K Lebesgue measurable strata that form a partition N . We index these strata, called Ω k , with indexes k ∈ {1, . . . , K}, and write w k their measure, according to the Lebesgue measure. We write

µ k = 1 w k Ω k E ∼νx [f (x) + s(x) ]dx = 1 w k Ω k f (x)dx their mean and σ 2 k = 1 w k Ω k E ∼νx [(f (x) + s(x) -µ k ) 2
]dx their variance. These mean and variance correspond to the mean and variance of the random variable X(t) when the coordinate x at which the noisy evaluation of f is observed is chosen uniformly at random on the stratum Ω k .

We denote by A an algorithm that allocates online the budget by selecting at each time step 1 ≤ t ≤ n the index k t ∈ {1, . . . , K} of a stratum and then sampling uniformly the corresponding stratum Ω kt . The objective is to return the best possible estimate μn of the integral of the function f . We write T k,n = t≤n I {k t = k} the number of samples in stratum Ω k up to time n. We denote by X k,t 1≤k≤K,1≤t≤T k,n the samples in stratum Ω k , and we define μk,n = 1

T k,n T k,n
t=1 X k,t the empirical means. We estimate the integral of f by μn = K k=1 w k μk,n . If we allocate a deterministic number of samples T k to each stratum Ω k and if the samples are independent and chosen uniformly on each stratum Ω k , we have

E(μ n ) = k≤K w k µ k = k≤K Ω k f (u)du = [0,1] d f (u)du = µ,
and also

V(μ n ) = k≤K w 2 k σ 2 k T k ,
where the expectation and the variance are computed according to all the samples that the algorithm collected. For a given algorithm A allocating T k,n samples drawn uniformly within stratum Ω k , we denote by pseudo-risk the quantity

L n,N (A) = k≤K w 2 k σ 2 k T k,n . (2)
Note that if an algorithm A * has access the variances σ 2 k of the strata, it can choose to allocate the budget in order to minimize the pseudo-risk, i.e., sample each stratum T * k = w k σ k i≤K w i σ i n times (this is the so-called oracle allocation). These optimal numbers of samples can be non-integer values, in which case the proposed optimal allocation is not realizable. But we still use it as a benchmark. The pseudo-risk for this algorithm (which is also the variance of the estimate here since the sampling strategy is deterministic) is then

L n,N (A * ) = k≤K w k σ k 2 n = Σ 2 N n , (3)
where Σ N = k≤K w k σ k . We also refer in the sequel as optimal proportion to λ k = w k σ k i≤K w i σ i , and to optimal oracle strategy to this allocation strategy. Although, as already mentioned, the optimal allocations (and thus the optimal pseudo-risk) might not be realizable, it is still very useful in providing a lower-bound. No static (even oracle) algorithm has a pseudo-regret lower than L n,N (A * ) on partition N . It is straightforward to see that the more refined the partition N the smaller L n,N (A * ). We thus define the quality of a partition Q n,N as the difference between the variance L n,N (A * ) of the estimate provided by the optimal oracle strategy on partition N , and the infimum of the variance of the optimal oracle strategy on any partition (optimal oracle partition) (with an arbitrary number of strata):

Q n,N = L n,N (A * ) - inf N measurable L n,N (A * ). ( 4
)
We also define the pseudo-regret of an algorithm A on a given partition N , the difference between its pseudo-risk and the variance of the optimal oracle strategy:

R n,N (A) = L n,N (A) -L n,N (A * ).
(5)

We will assess the performance of an algorithm A by comparing its pseudo risk to the minimum possible variance of an optimal oracle strategy on the optimal oracle partition:

L n,N (A) - inf N measurable L n,N (A * ) = R n,N (A) + Q n,N . (6)
Using the analogy of model selection mentioned in the Introduction, the quality Q n,N is similar to the approximation error and the pseudo-risk R n,N (A) to the estimation error.

Motivation for the model f (x) + s(x) t . Assume that a learner can, at each time t, choose a point x and collect an observation F (x, W t ), where W t is an independent noise, that can however depend on x. It is the general model for representing evaluations of a noisy function. There are many settings where one needs to integrate accurately a noisy function without wasting too much budget, like for instance pollution survey. Set f (x) = E Wt [F (x, W t )], and s(x) t = F (x, W t )-f (x). Since by definition t is of mean 0 and variance 1, we have in fact s

(x) = E νx [(F (x, W t ) -f (x)) 2 ] and t = F (x,Wt)-f (x) s(x)
. Observing F (x, W t ) is equivalent to observing f (x) + s(x) t , and this implies that the model that we choose is also very general. There is also a important setting where this model is relevant, and this is for the integration of a function F in high dimension d * . Stratifying in dimension d * seems hopeless, since the budget n has to be exponential with d * if one wants to stratify in every direction of the domain: this is the curse of dimensionality. It is necessary to reduce the dimension by choosing a small amount of directions (1, . . . , d) that are particularly relevant, and control/stratify only in these d directions4 . Then the control/stratification is only on the first d coordinates, so when sampling at at a time t, one chooses x = (x 1 , . . . , x d ), and the other d * -d coordinates U (t) = (U d+1 (t), . . . , U d * (t)) are uniform random variables on [0, 1] d * -d (without any control). When sampling in x at a time t, we observe F (x, U (t)). By writing f

(x) = E U (t)∼U ([0,1] d * -d ) [F (x, U (t))], and s(x) t = F (x, U (t)) -f (x)
, we obtain that the model we propose is also valid in this case.

3. The quality of a partition: Analysis of the term Q n,N .

In this Section, we focus on the quality of a partition defined in Section 2.

Convergence under very mild assumptions As mentioned out in Section 2, the more refined the partition N of the space, the smaller L n,N (A * ), and thus Σ N . Through this monotony property, we know that inf N Σ N is also the limit of the (Σ Np ) p of a sequence of partitions (N p ) p such that the diameter of each stratum goes to 0. We state in the following Proposition that for any such sequence,

lim p→+∞ Σ Np = [0,1] d s(x)dx. Consequently inf N Σ N = [0,1] d s(x)dx.
Proposition 1 Let (N p ) p = (Ω k,p ) k∈{1,...,Kp},p∈{1,...,+∞} be a sequence of measurable partitions (where K p is the number of strata of partition N p ) such that • AS1: 0 < w k,p ≤ υ p , for some sequence (υ p ) p , where υ p → 0 for p → +∞.

• AS2: The diameters according to the ||.|| 2 norm on R d of the strata are such that

max k Diam(Ω k,p ) ≤ D(w k,p ), for some real valued function D(•), such that D(w) → 0 for w → 0.
If the functions m and s are in

L 2 ([0, 1] d ), then lim p→+∞ Σ Np = inf N measurable Σ N = [0,1] d s(x)dx, which implies that n × Q n,Np → 0 for p → +∞.
Proof [Sketch of Proof. The full proof is in the Supplementary material (Appendix B)]

The form of the model and the definition of σ k imply that

σ 2 k = 1 w k Ω k f (x) - 1 w k Ω k f (u)du 2 dx + 1 w k Ω k s(x) 2 dx. (7)
We first prove that the result hold for uniformly continuous functions, and then generalize to L 2 functions based on a density argument.

Step 1: Convergence when m and s are uniformly continuous: Assume that m and s are uniformly continuous with respect to the ||.|| 2 norm. For any υ > 0, there exists

η s.t. ∀x, |s(x + u) -s(x)| ≤ υ and |f (x + u) -f (x)| ≤ υ where u ∈ B 2,d (
η). We choose K large enough so that the size of the strata is smaller than υ, and their diameter is smaller than η (it is possible to do so since the diameter of the strata shrinks to 0 as K → ∞). From Equation 7we deduce that

σ 2 k -( 1 w k Ω k s) 2 ≤ 2υ 2 ,
and using the concavity of the square-root function, we have

k w k σ k -[0,1] d s ≤ √ 2υ
, which concludes the proof for uniformly continuous functions.

Step 2: Generalization to the case where f and s are in L 2 ([0, 1) d ): From the density property of the uniformly continuous functions in L 2 ([0, 1] d ) (with respect to the ||.|| 2 norm), we deduce that for any K and υ, there exists two uniformly continuous function f υ and s υ such that:

K k=1 w k σ k - K k=1 √ w k Ω k f υ (x) + Ω k f υ (u)du 2 dx - 1 w k Ω k s 2 υ (x)dx ≤ υ,
and also that Ω |s(x) -s υ (x)|dx ≤ υ 2 . One concludes by combining those two inequalities with Step 1.

In Proposition 1, even though the optimal oracle allocation might not be realizable (in particular if the number of strata is larger than the budget), we can still compute the quality of a partition, as defined in 4. It does not correspond to any reachable pseudo-risk, but rather to a lower bound on any (even oracle) static allocation.

When f and s are in L 2 ([0, 1] d ), for any appropriate sequence of partitions (N p ) p , Σ Np (which is the principal ingredient of the variance of the optimal oracle allocation) converges to the smallest possible Σ N for given f and s. Note however that this condition is not sufficient to obtain a rate.

Finite-Time analysis under Hölder assumption:

We make the following assumption on the functions f and s.

Assumption 1 The functions f and s are (M, α)-Hölder continuous, i.e., for g ∈ {m, s}, for any x and y ∈

[0, 1] d , |g(x) -g(y)| ≤ M ||x -y|| α 2 .
The Hölder assumption enables to consider arbitrarily non-smooth functions (for small α, the function can vary arbitrarily fast), and is thus a fairly general assumption.

We also consider the following partitions in K squared strata.

Definition 2 We write N K the partition of [0, 1] d in K hyper-cubic strata of measure w k = w = 1 K and side length ( 1 K ) 1/d : we assume for simplicity that there exists an integer l such that K = l d .

The following Proposition holds.

Proposition 3 Under Assumption 1 we have for any partition N K as defined in Definition 2 that

Σ N K - [0,1] d s(x)dx ≤ √ 2dM ( 1 K ) α/d , (8)
which implies

Q n,N K ≤ 2 √ 2dM Σ N 1 n ( 1 K ) α/d ,
where N 1 stands for the "partition" with one stratum.

Proof [Sketch of Proof for Proposition 3] We deduce from Assumption 1 that

1 w k Ω k f (x) - 1 w k Ω k f (u)du 2 dx + 1 w k Ω k s 2 (x)dx - 1 w k Ω k s(u)du 2 ≤ 2M 2 d( 1 K ) 2α/d .
Then, by using Equation 7and by summing over all strata, we deduce Equation 8. Now the result on the quality follows from the fact that Σ

2 N K -[0,1] d s(x)dx 2 = (Σ 2 N K - [0,1] d s(x)dx 2 )(Σ 2 N K + [0,1] d s(x)dx 2 ) ≤ 2Σ N 1 (Σ N K -[0,1] d s(x)dx).
The full proof for this Proposition is in the Supplementary Material (Appendix C).

General comments

The impact of α and d: The quantity Q n,N K increases with the dimension d, because the Hölder assumption becomes less constraining when d increases. This can easily be seen since a squared strata of measure w has a diameter of order w 1/d . Q n,N K decreases with the smoothness α of the function, which is a logic effect of the Hölder assumption. Note also that when defining the partitions N K in Definition 2, we made the crucial assumption that K 1/d is an integer. This fact is of little importance in small dimension, but will matter in high dimension, as we will enlighten in the last remark of Section 5.

Minimax optimality of this rate:

The rate n -1 K -α/d is minimax optimal on the class of α-Hölder functions since for any n and K one can easily build a function with Hölder exponent α such that the corresponding

Σ N K is at least [0,1] d s(x)dx + cK -α/d for some constant c.
Discussion on the shape of the strata: Whatever the shape of the strata, as long as their diameter goes to 05 , Σ N K converges to [0,1] d s(x)dx. The shape of the strata have an influence only on the negligible term, i.e. the speed of convergence to this quantity. This result was already made explicit, in a different setting and under different assumptions, in [START_REF] Etoré | On adaptive stratification[END_REF]. Choosing small strata of same shape and size is also minimax optimal on the class of Hölder functions. Working on the shape of the strata could, however, improve the speed of convergence in some specific cases, e.g. when the noise is very localized. It could also be interesting to consider strata of varying size, and make this size depend on the specific problem.

The decomposition of the variance: Note that the variance σ 2 k within each stratum Ω k comes from two sources. First, σ 2 k comes from the noise, that contributes to it by 1 w k Ω k s(x) 2 dx. Second, the mean f is not a constant function, thus its contribution to

σ 2 k is 1 w k Ω k f (x) -1 w k Ω k f (u)du 2 dx.
Note that when the size of Ω k goes to 0, this later contribution vanishes, and the optimal allocation is thus proportional to

w k Ω k s(x) 2 dx + o(1) = Ω k s(x)dx + o(1)
. This means that for small strata, the variation in the mean are negligible when compared to the variation due to the noise.

Algorithm MC-UCB and a matching lower bound

Algorithm M C -U CB

In this Subsection, we describe a slight modification of the algorithm M C -U CB introduced in (Carpentier and Munos, 2011a). The only difference is that we change the form of the high-probability upper confidence bound on the standard deviations, in order to improve the elegance of the proofs, and we refine their analysis. The algorithm takes as input two parameters b and f max which are linked to the distribution of the arms, δ which is a (small) probability, and the partition N K . We remind in Figure 1 the algorithm M C -U CB.

Input: b, f max , δ, N K , set A = 2 (1 + 3b + 4f 2 max ) log(2nK/δ) Initialize: Sample 2 states in each strata. for t = 2K + 1, . . . , n do Compute B k,t = w k T k,t-1 σk,t-1 + A 1 T k,t-1 for each stratum k ≤ K Sample a point in stratum k t ∈ arg max 1≤k≤K B k,t end for Output: μn = K k=1 w k μk,n
Figure 1: The pseudo-code of the MC-UCB algorithm. The empirical standard deviations and means σ2 k,t and μk,t are computed using Equations 9 and 10.

The estimates of σ2 k,t-1 and μk,t-1 are computed according to

σ2 k,t-1 = 1 T k,t-1 T k,t-1 i=1 (X k,i -μk,t-1 ) 2 , (9)
and

μk,t-1 = 1 T k,t-1 T k,t-1 i=1 X k,i .
(10) 4.2. Upper bound on the pseudo-regret of algorithm MC-UCB.

We first state the following Assumption on the noise t :

Assumption 2 There exist b > 0 such that ∀x ∈ [0, 1] d , ∀t, and ∀λ < 1 b ,

E νx exp(λ t ) ≤ exp λ 2 2(1 -λb)
, and

E νx exp(λ 2 t -λ) ≤ exp λ 2 2(1 -λb) .
This is a kind of sub-Gaussian assumption, satisfied for e.g., Gaussian as well as bounded distributions. We also state an assumption on f and s.

Assumption 3 The functions f and s are bounded by f max .

Note that since the functions f and s are defined on [0, 1] d , if Assumption 1 is satisfied, then Assumption 3 holds with f max = max(f (0), s(0))+M d α/2 . We now prove the following bound on the pseudo-regret. Note that we state it on partitions N K , but that it in fact holds for any partition in K strata.

Proposition 4 Under Assumptions 2 and 3, on partition N K , when n ≥ 4K, we have

E[R n,N K (A M C-U CB )] ≤ 24 √ 2Σ N K (1 + 3b + 4f 2 max ) f max + 4 4 1/3 K 1/3 n 4/3 log(nK)+ 14KΣ 2 N K n 2 .
The proof, given in the Supplementary Material (Appendix A), is close to the one of MC-UCB in (Carpentier and Munos, 2011a). But an improved analysis leads to a better dependency in terms of number of strata K. We remind that in paper (Carpentier and Munos, 2011a), the bound is of order Õ(Kn -4/3 ). This improvement is crucial here since the larger K is, the closer Σ N K is from [0,1] d s(x)dx. The next Subsection states that the rate K 1/3 Õ(n -4/3 ) of MC-UCB is optimal both in terms of K and n.

Lower Bound

We now study the minimax rate for the pseudo-regret of any algorithm on a given partition N K . Note that we state it for partitions N K , but that it holds for any partition in K strata of equal measure.

Theorem 5 Let K ∈ N. Let inf be the infimum taken over all online stratified sampling algorithms on N K and sup represent the supremum taken over all environments, then:

inf sup E[R n,N K ] ≥ C K 1/3 n 4/3 ,
where C is a numerical constant.

Proof [Sketch of proof (The full proof is reported in Appendix D)] We consider a partition with 2K strata. On the K first strata, the samples are drawn from Bernoulli distributions of parameter µ k where µ k ∈ { µ 2 , µ, 3 µ 2 }, and on the K last strata, the samples are drawn from a Bernoulli of parameter 1/2. We write σ = µ(1 -µ) the standard deviation of a Bernoulli of parameter µ. We index by υ a set of 2 K possible environments, where υ = (υ 1 , . . . , υ K ) ∈ {-1, +1} K , and the K first strata are defined by µ k = µ + υ k µ 2 . Write P σ the probability under such an environment, also consider P σ the probability under which all the K first strata are Bernoulli with mean µ.

We define Ω υ the event on which there are less than K 3 arms not pulled correctly for environment υ (i.e. for which T k,n is larger than the optimal allocation corresponding to µ when actually µ k = µ 2 , or smaller than the optimal allocation corresponding to µ when µ k = 3 µ 2 ). See the Appendix D for a precise definition of these events. Then, the idea is that there are so many such environments that any algorithm will be such that for at least one of them we have P σ (Ω υ ) ≤ exp(-K/72). Then we derive by a variant of Pinsker's inequality applied to an event of small probability that P υ (Ω υ ) ≤ KL(Pσ,Pυ) K = O( σ 3/2 n K ). Finally, by choosing σ of order ( K n ) 1/3 , we have that P υ (Ω c υ ) is bigger than a constant, and on Ω c υ we know that there are more than K 3 arms not pulled correctly. This leads to an expected pseudo-regret in environment υ of order Ω( K 1/3 n 4/3 ). This is the first lower-bound for the problem of online stratified sampling for Monte-Carlo. Note that this bound is of same order as the upper bound for the pseudo-regret of algorithm MC-UCB. It means that this algorithm is, up to a constant, minimax optimal, both in terms of the number of samples and in terms of the number of strata. It however holds only on the partitions N K (we conjecture that a similar result holds for any measurable partition N , but with a bound of order Ω x∈N w 2/3 x n 4/3 ).

Best trade-off between

Q n,N K and R n,N K (A M C-U CB ) 5.1. Best trade-off
We consider in this Section the hyper-cubic partitions N K as defined in Definition 2, and we want to find the best number of strata K n as a function of n. Using the results in Section 3 and Subsection 4.1, it is possible to deduce an optimal number of strata K to give as parameter to algorithm M C -U CB. Note that since the performance of the algorithm is defined as the sum of the quality of partition N K , i.e. Q n,N K and of the pseudo-regret of the algorithm MC-UCB, namely R n,N K (A M C-U CB ), one wants to (i) on the one hand take many strata so that Q n,N K is small but (ii) on the other hand, pay attention to the impact this number of strata has on the pseudo-regret R n,N K (A M C-U CB ). A good way to do that is to choose K n in function of n such that Q n,N Kn and R n,N Kn (A M C-U CB ) are of the same order.

Theorem 6 Under Assumptions 1 and 2 (since on [0, 1] d , Assumption 1 implies Assumption 3, by setting

f max = X(1) + M d α/2 ), choosing K n = (n d d+3α ) 1/d d (≤ n d d+3α ≤ n), we have E[L n (A M C-U CB )] - 1 n [0,1] d s(x)dx 2 ≤ Cd 2α 3d + 1 2 log(n)n -d+4α d+3α (1 + d α n -α d+3α )
,

where c = 70(1 + M )Σ N K (1 + 3b + 4(f (0) + s(0) + M ) 2 ) (f (0)+s(0)+M )+4 4 1/3
. This leads to, if d n, the simplified bound is

E[L n (A M C-U CB )] - 1 n [0,1] d s(x)dx 2 = Õ(n -d+4α d+3α ). Proof [Proof of Theorem 6] The definition of K n implies that K n ≥ (n d d+3α -1) 1/d d ≥ n d d+3α 1 - d n 1 d ( d d+3α
) . Also, trivially,

K n ≤ n d d+3α
. By plugging these lower and upper bounds, in respectively Q n,N Kn and R n,N Kn , we obtain the the final bound.

We can also prove a matching minimax lower bound using the results in Theorem 5.

Theorem 7 Let sup represent the supremum taken over all α-Hölder functions and inf be the infimum taken over all algorithms that partition the space in convex strata of same shape, then the following holds true:

inf sup EL n (A) - 1 n [0,1] d s(x)dx 2 = Ω(n -d+4α d+3α ).
Proof [Proof of Theorem 7] This is a direct consequence of Theorem 5 and the second comment of Subsection 3.1.

Discussion

Optimal pseudo-risk. The dominant term in the pseudo-risk of MC-UCB with proper number of strata is

(inf N Σ N ) 2 n = 1 n [0,1] d s(x)dx 2
(the other term is negligible). This means that algorithm MC-UCB is almost as efficient as the optimal oracle strategy on the optimal oracle partition. In comparison, the variance of the estimate given by crude Monte-Carlo is

[0,1] d f (x) -[0,1] d f (u)du 2 dx + [0,1] d s(x) 2 dx.
Thus MC-UCB enables to have the term coming from the variations in the mean vanish, and the noise term decreases (since by Cauchy-Schwarz,

[0,1] d s(x)dx 2 ≤ [0,1] d s(x) 2 dx).
minimax-optimal trade-off for algorithm MC-UCB. The optimal trade-off on the number of strata K n of order n d d+3α depends on the dimension and the smoothness of the function. The higher the dimension, the more strata are needed in order to have a decent speed of convergence for Σ N K . The smoother the function, the less strata are needed.

It is yet important to remark that this trade-off is not exact. We provide an almost minimaxoptimal order of magnitude for K n , in terms of n, so that the rate of convergence of the algorithm is minimax-optimal up to a log(n).

Link between risk and pseudo-risk. It is important to compare the pseudo-risk

L n (A) = K k=1 w 2 k σ 2 k
T k,n and the true risk E[(μ n -µ) 2 ]. Note that those quantities are in general not equal for an algorithm A that allocates the samples in a dynamic way: indeed, the quantities T k,n are in that case stopping times and the variance of estimate μn is not equal to the pseudo-risk. However, in the paper (Carpentier and Munos, 2011b), the authors highlighted for M C -U CB some links between the risk and the pseudo-risk. More precisely, they established links between L n (A) and

K k=1 w 2 k E[(μ k,n -µ k ) 2 ]. This step is possible since E[(μ k,n -µ k ) 2 ] ≤ w 2 k σ 2 k T 2 k,n E[T k,n ],
where T k,n is a lower-bound on the number of pulls T k,n on a high probability event. Then they bounded the cross products E[(µ k,n -µ k )(μ p,n -µ p )] and provided some upper bounds on those terms. A tight analysis of these terms as a function of the number of strata K remains to be investigated.

Knowledge of the Hölder exponent. In order to be able to choose properly the number of strata to achieve the rate in Theorem 6, it is needed to possess a proper lower bound on the Hölder exponent of the function: indeed, the rougher the function is, the more strata are required. On the other hand, such a knowledge on the function is not always available and an interesting question is whether it is possible to estimate this exponent fast enough. There are interesting papers on that subject like [START_REF] Hoffmann | Random rates in anisotropic regression[END_REF] where the authors tackle the problem of regression and prove that it is possible, up to a certain extent, to adapt to the unknown smoothness of the function. The authors in [START_REF] Giné | Confidence bands in density estimation[END_REF] add to that (in the case of density estimation) and prove that it is even possible under the assumption that the function attain its Hölder exponent to have a proper estimation of this exponent and thus adaptive confidence bands. An idea would be to try to adapt those results in the case of finite sample.

MC-UCB On a noiseless function. Consider the case where s = 0 almost surely, i.e. the samples collected are noiseless. Proposition 1 ensures that inf N Σ N = 0: it is thus possible in this case to achieve a pseudo-risk that has a faster rate than O( 1n ). If the function m is smooth, e.g. Hölder with a not too low exponent α, it is efficient to use low discrepancy methods to integrate the functions. An idea is to stratify the domain in n hyper-rectangular strata of minimal diameter, and to pick at random one sample per stratum. The variance of the resulting estimate is of order O( 1 n 1+2α/d ). Algorithm MC-UCB is not as efficient as a low discrepancy schemes: it needs a number of strata K < n in order to be able to estimate the variance of each stratum. Its pseudo-risk is then of order O( 1 nK 2α/d ). It is however only true when the observations are noiseless. Otherwise, the order for the variance of the estimate is in 1/n, no matter what strategy the learner chooses.

In high dimension. The first bound in Theorem 6 expresses precisely how the performance of the estimate outputted by MC-UCB depends on d. The first bound states that the quantity

L n (A) -1 n [0,1] d s(x)dx
2 is negligible when compared to 1/n when n is exponential in d. This is not surprising since our technique aims at stratifying equally in every direction. It is not possible to stratify in every directions of the domain if the function lies in a very high dimensional domain. This is however not a reason for not using our algorithm in high dimension. Indeed, stratifying even in a small number of strata already reduces the variance, and in high dimension, any variance reduction techniques are welcome. As mentioned in the end of Section 2, the model that we propose for the function is suitable for modeling d * dimensional functions that we only stratify in d < d * directions (and d n). A reasonable trade-off for d can also be inferred from the bound, but we believe that what a good choice of d is depends a lot of the problem. We then believe that it is a good idea to select the number of strata in the minimax way that we propose. Again, having a very high dimensional function that one stratifies in only a few directions is a very common technique in financial mathematics, for pricing options (practitioners stratify an infinite dimensional process in only 1 to 5 carefully chosen dimensions).

Numerical experiment: influence of the number of strata in the Pricing of an Asian option

We consider the pricing problem of an Asian option introduced in [START_REF] Glasserman | Asymptotically optimal importance sampling and stratification for pricing path-dependent options[END_REF] and later considered in [START_REF] Kawai | Asymptotically optimal allocation of stratified sampling with adaptive variance reduction by strata[END_REF][START_REF] Etoré | Adaptive optimal allocation in stratified sampling methods[END_REF]. This uses a Black-Scholes model with strike C and maturity T . Let (W (t)) 0≤t≤T be a Brownian motion. The discounted payoff of the Asian option is defined as a function of W , by:

F ((W ) 0≤t≤T ) = exp(-rT ) max T 0 S 0 exp (r -1 2 s 2 0 )t + s 0 W t dt -C, 0 , (11)
where S 0 , r, and s 0 are constants, and the price is defined by the expectation p = E W F (W ). We want to estimate the price p by Monte-Carlo simulations (by sampling on W ). In order to reduce the variance of the estimated price, we can stratify the space of W . [START_REF] Glasserman | Asymptotically optimal importance sampling and stratification for pricing path-dependent options[END_REF] suggest to stratify according to a one dimensional projection of W , i.e., by choosing a time t and stratifying according to the quantiles of W t (and simulating the rest of the Brownian according to a Brownian Bridge, see [START_REF] Kawai | Asymptotically optimal allocation of stratified sampling with adaptive variance reduction by strata[END_REF]). They further argue that the best direction for stratification is to choose t = T , i.e., to stratify according to the last time of T . This choice of stratification is also intuitive since W T has the highest variance, the biggest exponent in the payoff (11), and thus the highest volatility. [START_REF] Kawai | Asymptotically optimal allocation of stratified sampling with adaptive variance reduction by strata[END_REF] and [START_REF] Etoré | Adaptive optimal allocation in stratified sampling methods[END_REF] also use the same direction of stratification. We stratify according to the quantiles of W T , that is to say the quantiles of a normal distribution N (0, T ). When stratifying in K strata, we stratify according to the 1/K-th quantiles (so that the strata are hyper-cubes of same measure).

We choose the same numerical values as [START_REF] Kawai | Asymptotically optimal allocation of stratified sampling with adaptive variance reduction by strata[END_REF]: S 0 = 100, r = 0.05, s 0 = 0.30, T = 1 and d = 16. We discretize also, as in [START_REF] Kawai | Asymptotically optimal allocation of stratified sampling with adaptive variance reduction by strata[END_REF], the Brownian motion in 16 equidistant times, so that we are able to simulate it. We choose C = 120.

In this paper, we only do experiments for MC-UCB, and exhibit the influence of the number of strata. For a comparison between MC-UCB and other algorithms, see (Carpentier and Munos, 2011a). By studying the range of the F (W ), we set the parameter of the algorithm MC-UCB to A = 150 log(n).

For n = 200 and n = 2000, we observe the influence of the number of strata in Figure 2. We observe the trade-off that we mentioned between pseudo-regret and quality, in the sense that the mean squared error of the estimate outputted by MC-UCB (when compared to the true integral of f ) first decreases with K and then increases. Note that, without surprise, for a large n the minimum of mean squared error is reached with more strata. Finally, note that our technique is never outperformed by uniform stratified Monte-Carlo: it is a good idea to try to adapt.

Conclusion

In this paper we studied the problem of online stratified sampling for the numerical integration of a function given noisy evaluations, and more precisely we discussed the problem of choosing the minimax-optimal number of strata.

We explained why, to our minds, this is a crucial problem when one wants to design an efficient algorithm. We enlightened the fact that there is a trade-off between having many strata (and a good approximation error, called the quality of a partition), and not too many, in order to perform almost as well as the optimal oracle allocation on a given partition (small estimation error, called pseudo-regret).

When the function is noisy, the noise is the dominant quantity in the optimal oracle variance on the optimal oracle partition. Indeed, decreasing the size of the strata does not diminish the (local) variance of the noise. In this case, the pseudo-risk of algorithm MC-UCB is equal, up to negligible terms, to the mean squared error of the estimate outputted by the optimal oracle strategy on the best (oracle) partition, at a rate of O(n -d+4α d+3α ) where α is the Hölder exponent of s and m. This rate is minimax optimal on the class of α-Hölder functions: it is not possible, up to a constant factor, to do better on simultaneously all α-Hölder functions.

We believe that there are (at least) three very interesting remaining open questions: • The first one is to investigate whether it is possible to estimate online the Hölder exponent fast enough. Indeed, one needs it in order to compute the proper number of strata for MC-UCB, and the lower bound on the Hölder exponent appears in the bound. It is thus a crucial parameter.

• The second direction is to build a more efficient algorithm in the noiseless case. We remarked that MC-UCB is not as efficient in this case as a simple non-adaptive method. The problem comes from the fact that in the case of a noiseless function, it is important to sample the space in a way that ensures that the points are as spread as possible. An interesting problem is thus to build an algorithm that mixes ideas from quasi Monte-Carlo and ideas from online stratified Monte-Carlo.

• Another question is the relevance of fixing the strata in advance. Although it is minimax-optimal on the class of α-Hölder functions to have hyper-cubic strata of same measure, it might in some cases be more interesting to focus and stratify more finely at places where the function is rough. On that perspective, it could be more clever to have an adaptive procedure that also decides where to refine the strata.

Appendix A. Proof of Theorem 10

A.1. The main tool: a high probability bound on the standard deviations Upper bound on the standard deviation:

Lemma 8 Let Assumption 2 hold and n ≥ 2. Define the following event

ξ = ξ K,n (δ) = 1≤k≤K, 2≤t≤n    1 t -1 t i=1 X k,i - 1 t t j=1 X k,j 2 -σ k ≤ A 1 t    , (12)
where A = 2 (1 + 3b + 4 V ) log(2nK/δ). Then Pr(ξ) ≥ 1 -δ.

Note that the first term in the absolute value in Equation 12is the empirical standard deviation of arm k computed as in Equation 9for t samples. The event ξ plays an important role in the proofs of this section and a number of statements will be proved on this event.

Proof Under Assumption 2 we have for f 2 max ≥ max k σ 2 k with probability 1 -δ because of the results of Lemma 15

1 t -1 t i=1 X k,i - 1 t t j=1 X k,j 2 -σ k ≤ 2 (1 + 3b + 4f 2 max ) log(2/δ) t . (13)
Then by doing a simple union bound on (k, t), we obtain the result.

We deduce the following corollary when the number of samples T k,t are random.

Corollary 9 For any k = 1, . . . , K and t = 2K, . . . , n, let {X k,i } i be n i.i.d. random variables drawn from ν k , satisfying Assumption 2. Let T k,t be any random variable taking values in {2, . . . , n}. Let σ2 k,t be the empirical variance computed from Equation 9. Then, on the event ξ, we have:

|σ k,t -σ k | ≤ A 1 T k,t , (14)
where A = 2 (1 + 3b + 4 V ) log(2nK/δ).

A.2. Main Demonstration

We first state and prove the following Lemma and then use this result to prove Theorem 10.

Theorem 10 Let Assumption 2 hold. For any 0 < δ ≤ 1 and for n ≥ 4K, the algorithm MC-UCB launched on a partition N K satisfies

EL n ≤ Σ 2 N K n + 24 √ 2Σ N K (1 + 3b + 4f 2 max ) f max + 4 4 1/3 K 1/3 n 4/3 log(nK) + 14KΣ 2 N K n 2 .

Proof

Step 1. Lower bound of order O(n 2/3 ). Let k be the index of an arm such that T k,n ≥ n K (this implies T k,n ≥ 3 as n ≥ 4K, and arm k is thus pulled after the initialization) and let t + 1 ≤ n be the last time at which it was pulled6 , i.e., T k,t = T k,n -1 and T k,t+1 = T k,n .

From Equation 14and the fact that T k,n ≥ n K , we obtain on ξ

B k,t ≤ w k T k,t σ k + 2A 1 T k,t ≤ Kw k σ k + 2A n , (15)
where the second inequality follows from the facts that T k,t ≥ 1, w k σ k ≤ Σ N K , and w k ≤ k w k = 1. Since at time t + 1 the arm k has been pulled, then for any arm q, we have

B q,t ≤ B k,t . (16)
From the definition of B q,t , and also using the fact that T q,t ≤ T q,n , we deduce on ξ that

B q,t ≥ 2Aw q T 3/2 q,t ≥ 2Aw q T 3/2 q,n . (17)
Combining Equations 15-17, we obtain on ξ

2Aw q T 3/2 q,n ≤ Kw k σ k + 2A n .
Finally, this implies on ξ that for any q because w k = w q ,

T q,n ≥ 2A σ k + 2A n K 2/3 . ( 18
)
This implies that ∀q,

T q,n ≥ C n K 2/3 where C = 2A max k σ k +2A 2/3 .
Step 2. Properties of the algorithm. We first remind the definition of B q,t+1 used in the MC-UCB algorithm B q,t+1 = w q T q,t σq,t + A 1 T q,t .

Using Corollary 9 it follows that, on ξ w q σ q T q,t ≤ B q,t+1 ≤ w q T q,t σ q + 2A 1 T q,t .

Let t + 1 ≥ 2K + 1 be the time at which an arm q is pulled for the last time, that is T q,t = T q,n -1. Note that there is at least one arm such that this happens as n ≥ 4K. Since at t + 1 arm q is chosen, then for any other arm p, we have

B p,t+1 ≤ B q,t+1 . (20)
From Equation 19and T q,t = T q,n -1, we obtain on ξ B q,t+1 ≤ w q T q,t σ q + 2A 1 T q,t = w q T q,n -1

σ q + 2A 1 T q,n -1 . (21)
Furthermore, since T p,t ≤ T p,n , then on ξ

B p,t+1 ≥ w p σ p T p,t ≥ w p σ p T p,n . (22)
Combining Equations 20-22, we obtain on ξ w p σ p T p,n (T q,n -1) ≤ w q σ q + 2A 1 T q,n -1 .

Summing over all q such that the previous Equation is verified, i.e. such that T q,n ≥ 3, on both sides, we obtain on ξ w p σ p T p,n q|Tq,n≥3 (T q,n -1) ≤ q|Tq,n≥3

w q σ q + 2A 1 T q,n -1 .

This implies

w p σ p T p,n (n -3K) ≤ K q=1 w q σ q + 2A 1 T q,n -1 . ( 23
)
Step 3. Lower bound. Plugging Equation 18 in Equation 23,

w p σ p T p,n (n -3K) ≤ q w q σ q + 2A 1 T q,n -1 ≤ q w q σ q + 2A 2K 2/3 Cn 2/3 ≤ Σ N K + 2 √ 2A √ C K 1/3 n 1/3 , on ξ, since T q,n -1 ≥ Tq,n
2 (as T q,n ≥ 2). Finally as n ≥ 4K, we obtain on ξ the following bound

w p σ p T p,n ≤ Σ N K n + 4 √ 2A √ C K 1/3 n 4/3 + 12KΣ N K n 2 . ( 24
)
Step 4. Regret. By summing and using Equation 24 which holds for all p, we obtain on ξ (with probability 1 -δ)

L n = p w 2 p σ 2 p T p,n ≤ Σ 2 N K n + 4Σ N K √ 2A √ C K 1/3 n 4/3 + 12KΣ 2 N K n 2 . This implies since EL n = E[L n I {ξ}] + E[L n I {ξ c }] and since δ = n -2 EL n ≤ Σ 2 N K n + 4Σ N K √ 2A √ C K 1/3 n 4/3 + 12KΣ 2 N K n 2 + ( p w 2 p σ 2 p )n -2 ≤ Σ 2 N K n + 4Σ N K √ 2A √ C K 1/3 n 4/3 + 14KΣ 2 N K n 2 . Since δ = n -2 , we have A ≤ 6 (1 + 3b + 4 V ) log(nK) and C ≥ 4 fmax+4 2/3
, this leads to

EL n ≤ Σ 2 N K n + 24 √ 2Σ N K (1 + 3b + 4f 2 max ) f max + 4 4 1/3 K 1/3 n 4/3 log(nK n ) + 14KΣ 2 N K n 2 .

Appendix B. Proof of Proposition 1

Step 1: Expression of the variance of the stratified estimate. Note that the samples f (x) + s(x) t where t ∼ ν x and E νx [ t ] = 0, V νx [ t ] = 1 the t are independent. We have

σ 2 k = 1 w k Ω k E νx [(X x (t) -µ k ) 2 ]dx = 1 w k Ω k E νx (f (x) + s(x) t - 1 w k Ω k f (u)du) 2 dx = 1 w k Ω k E νx (f (x) - 1 w k Ω k f (u)du) 2 dx + 1 w k Ω k E νx s(x) 2 2 t dx = 1 w k Ω k f (x) - 1 w k Ω k f (u)du 2 dx + 1 w k Ω k s(x) 2 dx
Step 2: Proof for the uniformly continuous functions. We first prove the result for a subset of L 2 ([0, 1] d ), namely the set of functions m and s that are uniformly continuous.

Proposition 11 If the functions f and s are uniformly continuous and if the strata satisfy the Assumptions of Proposition 1, we have

k w k,n σ k,n - [0,1] d s(x)dx → 0 Proof Let υ > 0.
As s and f are uniformly continuous, we know that ∀x, ∃η such that |s(x + u) -s(x)| ≤ υ and |f (x + u) -f (x)| ≤ υ where u ∈ B 2,d (η) 7 . By Assumption AS1, we know that w k,n ≤ υ n . Note that the diameter of strata Ω k,n is 7. We denote by B 2,d (η) the ball of center 0 and radius η according to the ||.||2 norm.

smaller than D(w k,n ) ≤ D(υ n ). Let us choose n big enough, i.e. such that D(υ n ) ≤ η and υ n ≤ υ. We have

σ 2 k,n -( 1 w k,n Ω k,n s) 2 = 1 w k,n Ω k,n s 2 - 1 w k,n Ω k,n s 2 + 1 w k,n Ω k,n f - 1 w k,n Ω k,n f 2 = 1 w k,n Ω k,n s - 1 w k,n Ω k,n s 2 + 1 w k,n Ω k,n f - 1 w k,n Ω k,n f 2 ≤ υ 2 + υ 2 ≤ 2υ 2 .
Because of concavity of the square-root function, we get

σ k,n -( 1 w k,n Ω k,n s) ≤ √ 2υ.
By summing we get

k w k,n σ k,n - [0,1] d s ≤ √ 2υ.
Step 3: Density of uniformly continuous functions in L 2 ([0, 1] d ). We first remind a property of the functions in L 2 ([0, 1] d ).

Proposition 12 The uniformly continuous functions according to the ||.|| 2 norm are dense in L 2 ([0, 1] d ).

Proof The result follows directly from the facts that

• The continuous functions are dense in L 2 (Ω) (Stone-Weierstrass Theorem).

• The uniformly continuous functions on a compact space Ω according to the ||.|| 2 norm are dense in the space of continuous functions.

• [0, 1] d is a compact.
This means that we can approximate with arbitrary precision according to the ||.|| 2 measure on L 2 ([0, 1] d ) any function in L 2 ([0, 1] d ) by an uniformly continuous function.

Using this proposition, we can prove the following Lemma.

Lemma 13 For a given n and a given υ, there exist two uniformly continuous function m υ and s υ such that:

Kn k=1 w k,n σ k,n - Kn k=1 √ w k,n Ω k,n f υ (x) + Ω k,n f υ (u)du 2 dx - 1 w k,n Ω k,n s 2 υ (x)dx ≤ υ.
Proof Let us fix n and υ. Let m υ be an uniformly continuous function such that

Ω (f (x) -f υ (x)) 2 dx ≤ min k (w k,n ) υ 2 ,
and s υ be an uniformly continuous function such that

Ω (s(x) -s υ (x)) 2 dx ≤ min k (w k,n ) υ 2 .
It is possible because of w k,n > 0 and because the uniformly continuous functions are dense in L 2 ([0, 1] d ) by Proposition 12.

Note that we thus have 1

w k,n Ω k,n (f (x) -f υ (x)) 2 dx ≤ υ 2 , and 1 w k,n Ω k,n (s(x) -s υ (x)) 2 dx ≤ υ 2 . Note also that 1 w k,n Ω k,n (s(x) -s υ (x)) 2 dx ≥ 1 w k,n Ω k,n s(x) 2 dx -1 w k,n Ω k,n s υ (x) 2 dx . Simple triangle inequality leads to 1 w k,n Ω k,n (f (x) - 1 w k,n Ω k,n f (u)du) 2 dx - 1 w k,n Ω k,n (f υ (x) - 1 w k,n Ω k,n f υ (u)du) 2 dx ≤ υ 2 . Now note that as σ 2 k,n = 1 w k,n Ω k,n (f (x) -1 w k,n Ω k,n f (u)du) 2 dx + 1 w k,n Ω k,n s(x)
2 dx, we know that the variance of the function on strata Ω k,n is arbitrarily close to the variance of its approximation. By convexity, one gets

σ k,n - 1 w k,n Ω k,n f υ (x) - 1 w k,n Ω k,n f υ (u)du 2 dx + 1 w k,n Ω k,n s 2 υ (x)dx ≤ υ.

And finally, by summing

Ω k,n f υ (x) + Ω k,n f υ (u)du 2 dx - 1 w k,n Ω k,n s 2 υ (x)dx ≤ υ.
Step 4: Combination of all the preliminary results to finish the proof. Finally, we finish the demonstration of Proposition 1. Let υ > 0 and f υ and s υ be as in Lemma 13. We know that When combining all those results, one gets the desired result.

Note finally that if we choose the strata as being small boxes of size 1 K and side ( 1 K ) 1/d , then the assumptions of Proposition 1 is verified.

Appendix C. Proof of Proposition 3

Note first that

σ 2 k = 1 w k Ω k f (x) - 1 w k Ω k f (u)du 2 dx + 1 w k Ω k s 2 (x)dx.
The term in f As the function f is (α, M )-Hölder, we know that ∀(x, y) ∈ Ω, |f (x)f (y)| ≤ M ||x -y|| α 2 . Using that we get

1 w k Ω k f (x) - 1 w k Ω k f (u)du 2 dx ≤ M 2 D(Ω k ) 2α ≤ M 2 d( 1 K ) 2α/d .
The term in s As the function s is (α, M )-Hölder, we know that ∀(x, y) ∈ Ω, |s(x) -

s(y)| ≤ M ||x -y|| α 2 . 1 w k Ω k s 2 (x)dx - 1 w k Ω k s(u)du 2 = 1 w k Ω k s(x) - 1 w k Ω k s(u)du 2 dx ≤ M 2 D(Ω k ) 2α ≤ M 2 d( 1 K ) 2α/d .
Finally... By combining those two results

w k σ k - Ω k s(x)dx ≤ w k σ 2 k - 1 w k Ω k s(x)dx 2 ≤ w k M 2 d( 1 K ) 2α/d + M 2 d( 1 K ) 2α/d .
By summing over all the strata, one obtains

Σ N K - [0,1] d s(x)dx ≤ √ 2dM ( 1 K ) α/d .
where the first inequality comes from the fact that algorithms in A υ possess more information than those in A, which they can use or not. Thus A ⊂ A υ . Now for any υ = (υ 1 , . . . , υ K ), define the events Since there are 2 K environments υ, we have

min υ P σ (Ω υ ) ≤ 1 2 K υ P σ (Ω υ ) ≤ 1 2 K K 3 p=1 K p .
Note that for an algorithm in A opt , we have K k=1 T k ≤ T k ≤ K σ +α Kσ -α + √ 3K/4 n. Since α = µ 2 and 0 < µ ≤ 1 2 we have

KL(P υ , P σ ) ≤ K σ +α Kσ -α + √ 3K/4 α 2 σ 2 n ≤ 4σ +α α 2 σ 2 n ≤ 8 α 2 σ n,
We thus deduce using Equation 25P υ min (Ω υ min ) = p ≤ max( 18 K KL(P υ min , P σ ) , exp(-K/72))

≤ 144 K α 2 σ n.
Now choose σ ≤ 1 7 ( K n ) 1/3 (as α = µ 2 = σ 2 2 ). Note that this implies that P υ min (Ω υ min ) ≤ 1 2 . Let ω ∈ Ω c υ min . We know that for ω, there are at least K 3 arms among the K first which are not pulled correctly: either K 6 arms among the arms with parameter µ -α or among the arms with parameter µ + α are not pulled correctly. Assume that for this fixed ω, there are K 6 arms among the arms with parameter µ -α which are not pulled correctly. Let U(ω) be this subset of arms.

We write ∆T = k∈U T k -K 6 t(σ -α ) the number of times those arms are over pulled. Note that on ω we have ∆T ≥ K 6 t(σ) -t(σ -α ). We have

∆T = K 6 t(σ) - K 6 t(σ -α ) = 1 6 Kσ Kσ + K/2 n - 1 6 Kσ -α K i=1 σ υ i α + K/2 n ≥ 1 6 Kσ Kσ + K/2 n - 1 6 Kσ/ √ 2 √ 3Kσ/ √ 2 + K/2 n ≥ 1 6 1 Kσ + K/2 1 √ 3Kσ/ √ 2 + K/2 K 2 σ/2 -K 2 σ/2 √ 2 n ≥ 1 2 (1 -1/ √ 2)σn ≥ 1 35 K 1/3 n 2/3

Figure 2 :

 2 Figure 2: Mean squared error for uniform stratified sampling for different number of strata, for (Left:) n=200 and (Right:) n=2000.

  Kn k=1 w k,n σ k,n -Kn k=1 √ w k,n Ω k,n f υ (x) + Ω k,n f υ (u)du 2 dx -1 w k,n Ω k,n s 2 υ (x)dx ≤ υ,and also that Ω (s(x) -s υ (x)) 2 dx ≤ min k

Ω

  υ = {ω : ∀U ⊂ {1, . . . , K} :|U| ≤ K 3 and ∀k ∈ U c , υ k T k ≥ υ k t(σ)}. ,...,K}:|U |=p k∈U {υ k T k < υ k t(σ)} k∈U C {υ k T k ≥ υ k t(σ)} .By the sub-additivity of the probabilities, we haveP σ (Ω υ ) ≤ K 3 p=1 U ⊂{1,...,K}:|U |=p P k∈U {υ k T k < υ k t(σ)} k∈U C {υ k T k ≥ υ k t(σ)} .The eventsk∈U {υ k T k < υ k t(σ)} k∈U C {υ k T k ≥ υt(σ)} are disjoint for dif-ferent υ, and form a partition of the space,thus υ P σ k∈U {υ k T k < υ k t(σ)} k∈U C {υT k ≥ ,...,K}:|U |=p P σ k∈U {υT k < υ k t(σ)} k∈U C {υ k T k ≥ υ k t(σ)} = K 3 p=1 U ⊂{1,...,K}:|U |=p υ k∈U {υ k T k < υ k t(σ)} k∈U C {υT k ≥ υ k t(σ)}

The mean squared error is measured with respect to the quantity of interest, i.e. the integral of f .

Here Õ is a O up to a polynomial log(n).

This is actually a very common technique for computing the price of options, see[START_REF] Glasserman | Monte Carlo methods in financial engineering[END_REF].

And note that in this noisy setting, if the diameter of the strata does not go to 0 on non homogeneous part of m and s, then the standard deviation corresponding to the allocation is larger than [0,1] d s(u)du.

Note that such an arm always exists for any possible allocation strategy given the constraint n = q Tq,n.

Appendix D. Lower bound

Let us write the proof of the lower bound using the terminology of multi-armed bandits. Each arm k represents a stratum and the distribution associated to this arm is defined as the distribution of the noisy samples of the function collected when sampling uniformly on the strata.

Let us choose µ < 1/2 and α = µ 2 . Consider 2K Bernoulli bandits (i.e., 2K strata where the samples follow Bernoulli distributions) where the K first bandits have parameter (µ k ) 1≤k≤K and the K last ones have parameter 1/2. The µ k take values in {µ -α, µ, µ + α}.

Define σ 2 = µ(1 -µ) the variance of a Bernoulli of parameter µ, and is such that

We wite σ -α and σ +α the two other standard deviations, and notice that

We consider the 2 K bandit environments M (υ) (characterized by υ = (υ k ) 1≤k≤K ∈ {-1, +1} K ) defined by (µ k = µ + υ k α) 1≤k≤K . We write P υ the probability with respect to the environment M (υ) at time n. We also write M (σ) the environment defined by all K first arms having a parameter σ, and write P σ the associated probability at time n.

The optimal oracle allocation for environment

n times. The corresponding quadratic error of the resulting estimate is l(υ) =

. For the environment M (σ), the optimal oracle allocation is to play arm

Kσ+K/2 n times). Consider deterministic algorithms first (extension to randomized algorithms will be discussed later). An algorithm is a set (for all t = 1 to n -1) of mappings from any sequence (r 1 , . . . , r t ) ∈ {0, 1} of t observed samples (where r s ∈ {0, 1} is the sample observed at the s-th round) to the choice of an arm I t+1 ∈ {1, . . . , 2K}. Write T k (r 1 , . . . , r n ) the (random variable) corresponding to the number of pulls of arm k up to time n. We thus have n = 2K k=1 T k . Now, consider the set of algorithms that know that the K first arms have parameter µ k ∈ {µ -α, µ, µ + α}, and that also know that the K last arms have their parameters in {1/4, 3/4}. Given this knowledge, an optimal algorithm will not pull any arm k ≤ K more than

3K/4 n times. Indeed, the optimal oracle allocation in all such environments allocates less than

3K/4 n samples to each arm k ≤ K. In addition, since the samples of all arms are independent, a sample collected from arm k does not provide any information about the relative allocations among the other arms. Thus, once an arm has been pulled as many times as recommended by the optimal oracle strategy, there is no need to allocate more samples to that arm. Writing A the class of all algorithms that do not know the set of possible environments, A υ the class of algorithms that know the set of possible environments M (υ) and A opt the subclass of A υ that pull all arms k ≤ K less than

where (X 1 , . . . , X K ) are K independent Bernoulli random variables of parameter 1/2. By Chernoff-Hoeffding's inequality, we have

). Thus there exists υ min such that P σ (Ω υ min ) ≤ exp(-K/72).

Let us write p = P υ min (Ω υ min ) and

) denote the KL for Bernoulli distributions with parameters a and b. Note that because ∀Ω, KL(P υ min (.|Ω), P σ (.|Ω)) ≥ 0, we have kl(p, p σ ) ≤ KL(P υ min , P σ ).

From that we deduce that p(log(p

Let us now consider any environment (υ). Let R t = (r 1 , . . . , r t ) be the sequence of observations, and let P t υ be the law of R t for environment M (υ). Note first that P υ = P n υ . Adapting the chain rule for Kullback-Leibler divergence, we get

We thus have, using the property that kl(a, b)

Thus on ω, the regret is such that

where C is a numerical constant. Note that for events ω where there are K 6 arms among the arms with parameter µ + α which are not pulled correctly, the same result holds.

Note finally that P(Ω c υ min ) ≥ 1/2. We thus have that the regret is bigger than

which proves the lower bound for deterministic algorithms. Now the extension to randomized algorithms is straightforward: any randomized algorithm can be seen as a static (i.e., does not depend on samples) mixture of deterministic algorithms (which can be defined before the game starts). Each deterministic algorithm satisfies the lower bound above in expectation, thus any static mixture does so too.

Appendix E. Large deviation inequalities for independent sub-Gaussian random variables

We first state Bernstein inequality for large deviations of independent random variables around their mean.

Lemma 14 Let (X 1 , . . . , X n ) be n independent random variables of mean (µ 1 , . . . , µ n ) and of variance (σ 2 1 , . . . , σ 2 n ). Assume that there exists b > 0 such that for any λ < 1 b , for any

Proof If the assumptions of Lemma 14 verified, then

By setting λ = nυ n i=1 σ 2 i +bnυ we obtain

).

By an union bound we obtain

).

This means that with probability 1 -δ,

We also state the following Lemma on large deviations for the variance of independent random variables.

Lemma 15 Let (X 1 , . . . , X n ) be n independent random variables of mean (µ 1 , . . . , µ n ) and of variance (σ 2 1 , . . . , σ 2 n ). Assume that there exists b > 0 such that for any λ < 1 b , for any

i be the variance of a sample chosen uniformly at random among the n distributions, and

2 the corresponding empirical variance. Then with probability 1 -δ,

Proof By decomposing the estimate of the empirical variance in bias and variance, we obtain with probability 1 -δ

We then have by the definition of V that with probability 1 -δ

If the assumptions of Lemma 15 are verified, we have with probability 1 -δ

If we take λ = nυ n i=1 σ 2 i +nbυ we obtain with probability 1 -δ

By a union bound we get with probability 1 -δ that P

).

This means that with probability 1 -δ,

Finally, by combining Equations 26 and 28 with Lemma 14, we obtain with probability 1 -δ On the other hand, we have also with probability 1 -δ

Finally, we have with probability 1 -δ