Second Order Bounds for Contextual Bandits with Function Approximation

## Abstract

Abstract Many works have developed algorithms no-regret algorithms for contextual bandits with function approximation, where the mean rewards over context-action pairs belongs to a function class ℱ ℱ \mathcal{F} caligraphic_F . Although there are many approaches to this problem, one that has gained in importance is the use of algorithms based on the optimism principle such as optimistic least squares. It can be shown the regret of this algorithm scales as 𝒪 ~ ⁢ ( d eluder ⁢ ( ℱ ) ⁢ log ⁡ ( ℱ ) ⁢ T ) ~ 𝒪 subscript 𝑑 eluder ℱ ℱ 𝑇 \widetilde{\mathcal{O}}\left(\sqrt{d_{\mathrm{eluder}}(\mathcal{F})\log(%
\mathcal{F})T}\right) over~ start_ARG caligraphic_O end_ARG ( square-root start_ARG italic_d start_POSTSUBSCRIPT roman_eluder end_POSTSUBSCRIPT ( caligraphic_F ) roman_log ( caligraphic_F ) italic_T end_ARG ) where d eluder ⁢ ( ℱ ) subscript 𝑑 eluder ℱ d_{\mathrm{eluder}}(\mathcal{F}) italic_d start_POSTSUBSCRIPT roman_eluder end_POSTSUBSCRIPT ( caligraphic_F ) is a statistical measure of the complexity of the function class ℱ ℱ \mathcal{F} caligraphic_F known as eluder dimension. Unfortunately, even if the variance of the measurement noise of the rewards at time t 𝑡 t italic_t equals σ t 2 superscript subscript 𝜎 𝑡 2 \sigma_{t}^{2} italic_σ start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT and these are close to zero, the optimistic least squares algorithm’s regret scales with T 𝑇 \sqrt{T} square-root start_ARG italic_T end_ARG . In this work we are the first to develop algorithms that satisfy regret bounds of the form 𝒪 ~ ⁢ ( d eluder ⁢ ( ℱ ) ⁢ log ⁡ ( ℱ ) ⁢ ∑ t = 1 T σ t 2 + d eluder ⁢ ( ℱ ) ⋅ log ⁡ ( | ℱ | ) ) ~ 𝒪 subscript 𝑑 eluder ℱ ℱ superscript subscript 𝑡 1 𝑇 superscript subscript 𝜎 𝑡 2 ⋅ subscript 𝑑 eluder ℱ ℱ \widetilde{\mathcal{O}}\left(d_{\mathrm{eluder}}(\mathcal{F})\sqrt{\log(%
\mathcal{F})\sum_{t=1}^{T}\sigma_{t}^{2}}+d_{\mathrm{eluder}}(\mathcal{F})%
\cdot\log(|\mathcal{F}|)\right) over~ start_ARG caligraphic_O end_ARG ( italic_d start_POSTSUBSCRIPT roman_eluder end_POSTSUBSCRIPT ( caligraphic_F ) square-root start_ARG roman_log ( caligraphic_F ) ∑ start_POSTSUBSCRIPT italic_t = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT italic_σ start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG + italic_d start_POSTSUBSCRIPT roman_eluder end_POSTSUBSCRIPT ( caligraphic_F ) ⋅ roman_log ( | caligraphic_F | ) ) for contextual bandits with function approximation and unknown variances. These bounds generalize existing techniques for deriving second order bounds in contextual linear problems.

## 1 Introduction

Modern decision-making algorithms have achieved impressive success in many important problem domains, including robotics  [, ], games [, ], dialogue systems [], and online personalization [, ]. Problems in these domains are characterized by the interactive nature of the data collection process. For example, to train a robotic agent to perform a desired behavior in an unseen environment, the agent is required to interact with the environment in a way that empowers it to learn about the world, while at the same time learning how to best achieve its objectives. Many models of sequential interaction have been proposed in the literature to capture scenarios such as this. Perhaps the most basic one is the multi-armed bandit model [, , , ], where it is assumed a learner has access to $K\in\mathbb{N}$ arms (actions), such that when playing any of these results in a random reward. Typically, the learner’s objective is to select actions, and observe rewards in order to learn which arm produces the highest mean reward value. Algorithms for the multi-armed bandit model can be used to solve problems such as selecting a treatment that in expectation over the population achieves the best expected success.

Deploying an algorithm designed for the multi-armed bandit setting may be suboptimal for applications where personalized policies are desirable, for example, when we would like to design a treatment regime that maximizes the expected success rate conditioned on an individual’s characteristics. This situation arises in many different scenarios, from medical trials [, ], to education [], and recommendation systems [] . In many of these decision-making scenarios, it is often advantageous to consider contextual information when making decisions. This recognition has sparked a growing interest in studying adaptive learning algorithms in the setting of contextual bandits [, , ] and reinforcement learning (RL) [].

In the contextual bandit model, a learner interacts with the world in a sequential manner. At the start of round $t\in\mathbb{N}$ the learner receives a context $x_{t}\in\mathcal{X}$, for example in the form of user or patient features. The learner then selects an action to play $a_{t}\in\mathcal{A}$, representing for example a medical treatment, and then observes a reward $r_{t}\in\mathbb{R}$ that depends on the context $x_{t}$, the action $a_{t}$ and may be random. For example $r_{t}$ may be the random binary outcome of a medical treatment $a_{t}$ on a specific patient $x_{t}$. The study of contextual bandit scenarios has produced a rich literature. Many aspects of the contextual bandit model have been explored, such as regret bounds under adversarial rewards [, , ], learning with offline data [], the development of statistical complexity measures that characterize learnability in this model [, ] and others.

The focus of many works, including this one is to flesh out the consequences of different modeling assumptions governing the relationship between the context, the action and the reward; one of the most salient features of this model. For example by developing algorithms for scenarios where the reward is a linear function of a linear function of an embedding of the context and action pair [, , , ]. This has lead to algorithms such as OFUL that can be used to derive bounds for contextual bandit problems with linear rewards []. Other works have considered scenarios that go beyond the linear case, where it is assumed the reward function over context action pair $x_{t},a_{t}$ is realized by an unknown function $f_{\star}$ belonging to a known function class $\mathcal{F}$ (which can be more complex than linear). Various adaptive learning procedures compatible with generic function approximation have been proposed for contextual bandit problems. Among these, we highlight two significant methods relevant to our discussion; the Optimistic Least Squares algorithm introduced by [] and the SquareCB algorithm introduced by []. Both of these methods offer guarantees for cumulative regret. Specifically, the cumulative regret of Optimistic Least Squares scales with factors $\mathcal{O}(\sqrt{d_{\mathrm{eluder}}(\mathcal{F})\log(|\mathcal{F}|)})$, while the cumulative regret of Square CB scales as $\mathcal{O}\left(\sqrt{|\mathcal{A}|\log(|\mathcal{F}|)}\right)$, where $\mathcal{A}$ is the set of actions. The eluder dimension(^1^11We formally introduce this quantity in Section 2. Here we use a simpler notation to avoid confusion.) ($d_{\mathrm{eluder}}$) is a statistical complexity measure introduced by [], that enables deriving guarantees for adaptive learning algorithms based on the principle of optimism in contextual bandits and reinforcement learning [, , , ].

The design of algorithms that can handle rich function approximation scenarios represents a great leap towards making the assumptions governing contextual bandit models more realistic and the algorithms more practical. The concerns addressed by this line of research are focused on the nature of the mean reward function. Nonetheless, they have left open the study of the dependence on the noise $\xi_{t}=r_{t}-f_{\star}(x_{t},a_{t})$. Intuitively, as the conditional variance of $\xi_{t}$ decreases, the value of $r_{t}$ contains more information about the reward function $f_{\star}$. Algorithms that leverage the scale of the variance to achieve sharp regret bounds are said to satisfy a variance aware or second order bound.

Different works have considered this research direction and developed variance-dependent bounds for linear and contextual linear bandits  [, , , , ]. In summary, the sharpest bounds for contextual linear bandits are achieved by the $\mathrm{SAVE}$ Algorithm in [] and scale (up to logarithmic factors) as $\mathcal{O}\left(d\sqrt{\sum_{t=1}^{T}\sigma_{t}^{2}}\right)$ where $\sigma_{t}^{2}$ is the conditional variance of $\xi_{t}$, the time $t$ measurement noise.

In the context of function approximation, second order bounds for contextual bandits have been developed in [] under the assumption that the value of the conditional variances $\sigma_{t}$ is observed. This restrictive assumption has been lifted in more recent work [, ] under a stronger distributional realizability assumption. In [, ], the authors assume realizability of the noise distribution, that is, the existence of a function class that fits not only the mean rewards as a function of context-action pairs, but also the measurement noise. This is a somewhat restrictive assumption since it effectively reduces the set of problems that can be solved to parametric scenarios where the distributional class of the noise is known; something that in practical settings typically means simple scenarios such as gaussian or bernoulli noise.

#### Contributions.

In this work we present second order bounds for contextual bandit problems under a mean reward realizability assumption. The techniques we develop are inspired by previous works on variance aware linear bandits such as [], and rely on an uncertainty filtered multi-scale least squares procedure. We are able to make the connection to general function approximation by refining existing techniques to prove eluder dimension regret bounds such as those presented in [, , ]. These techniques should be easily extended to the setting of reinforcement learning and beyond, thus unlocking an important area of research. The sharpest bounds we develop in this work (satisfied by the same algorithm) have the form $\mathcal{O}\left(d_{\mathrm{eluder}}\sqrt{\log(|\mathcal{F}|)\sum_{t=1}^{T}
\sigma_{t}^{2}}+d_{\mathrm{eluder}}\cdot\log(|\mathcal{F}|)\right)$ when we allow the conditional variances are different during all time-steps, and $\mathcal{O}\left(\sigma\sqrt{d_{\mathrm{eluder}}\log(|\mathcal{F}|)T}+d_{
\mathrm{eluder}}\cdot\log(|\mathcal{F}|)\right)$ when $\sigma_{t}=\sigma$ for all $t$. Although it is likely our bounds are not the sharpest in the case where the variances may be different through time, since eluder dimension bounds as in [] suggest the dominating term in the optimal bound should scale as $\mathcal{O}\left(\sqrt{d_{\mathrm{eluder}}\log(|\mathcal{F}|)\sum_{t=1}^{T}
\sigma_{t}^{2}}\right)$, we believe a sharper analysis of our main algorithm (Algorithm 3) might be sufficient to prove such a result.

## 2 Problem Definition

In this section we consider the scenario of contextual bandits, where at time $t$ the learner receives a context $x_{t}\in\mathcal{X}$ belonging to a context set $\mathcal{X}$, decides to take an action $a_{t}\in\mathcal{A}$ and observes a reward of the form $r_{t}$ such that $\mathbb{E}_{t}[r_{t}]=f_{\star}(x_{t},a_{t})$ where it is assumed that $f_{\star}\in\mathcal{F}$ for $\mathcal{F}$ a known class of functions with domain $\mathcal{X}\times\mathcal{A}$ (see Assumption 2.1). Throughout this section we use the notation $r_{t}=f_{\star}(x_{t},a_{t})+\xi_{t}$ so that the conditional expectation of $\xi_{t}$ satisfies $\mathbb{E}_{t}[\xi_{t}]=0$. Throughout this work we will use the notation $\sigma_{t}^{2}=\mathrm{Var}_{t}(\xi_{t})$ to denote the time $t$ conditional variance of the noise. We’ll assume the random variables $r_{t}$ are bounded by a known parameter $B>0$ with probability one.

The objetive of this work is to design algorithms with sublinear regret. Regret is a measure of performance defined in the realizable contextual scenario studied in this work as the cumulative difference between the best expected reward the learner may have achieved at each of the contexts it interacted with and the expected reward of the actions played.

$$ $\displaystyle\mathrm{Regret}(T)$ $\displaystyle=\sum_{t=1}^{T}\max_{a\in\mathcal{A}}f_{\star}(x_{t},a)-f_{\star} (x_{t},a_{t})$ $$

The objective is to design algorithms with regret scaling sublinearly with the time horizon $T$.

###### Assumption 2.1 (Realizability) .

There exists a (known) function class $\mathcal{F}:\mathcal{X}\times\mathcal{A}\rightarrow\mathbb{R}$ such that $\mathbb{E}_{t}[r_{t}]=f_{\star}(x_{t},a_{t})$ for all $t\in\mathbb{N}$.

###### Assumption 2.2 (Boundedness) .

There exists a (known) constant $B>0$ such that $|r_{\ell}|,|\xi_{\ell}|\leq B$ and $\max_{x\in\mathcal{X},a\in\mathcal{A}}|f(x,a)|\leq B$ and $\max_{x\in\mathcal{X},a\in\mathcal{A}}|f(x,a)-f^{\prime}(x,a)|\leq B$ for all $f,f^{\prime}\in\mathcal{F}$ and all $\ell\in\mathbb{N}$.

The sample complexity analysis of our algorithms will rely on a combinatorial notion of statistical complexity of a scalar function class known as Eluder Dimension []. We reproduce the necessary definitions here for completeness.

###### Definition 2.1 .

($\epsilon-$dependence) Let $\mathcal{G}$ be a scalar function class with domain $\mathcal{Z}$ and $\epsilon>0$. An element $z\in\mathcal{Z}$ is $\epsilon-$dependent on $\{z_{1},\cdots,z_{n}\}\subseteq\mathcal{Z}$ w.r.t. $\mathcal{G}$ if any pair of functions $g,g^{\prime}\in\mathcal{G}$ satisfying $\sqrt{\sum_{i=1}^{n}(g(z_{i})-g^{\prime}(z_{i}))^{2}}\leq\epsilon$ also satisfies $g(z)-g^{\prime}(z)\leq\epsilon$. Furthermore, $z\in\mathcal{Z}$ is $\epsilon-$independent of $\{z_{1},\cdots,z_{n}\}$ w.r.t. $\mathcal{G}$ if it is not $\epsilon-$dependent on $\{z_{1},\cdots,z_{n}\}$.

###### Definition 2.2 .

($\epsilon$-eluder)
The $\epsilon-$non monotone eluder dimension $\widebar{d_{\mathrm{eluder}}}(\mathcal{G},\epsilon)$ of $\mathcal{G}$ is the length of the longest sequence of elements in $\mathcal{Z}$ such that every element is $\epsilon-$independent of its predecessors. Moreover, we define the $\epsilon-$eluder dimension $d_{\mathrm{eluder}}(\mathcal{G},\epsilon)$ as $d_{\mathrm{eluder}}(\mathcal{G},\epsilon)=\max_{\epsilon^{\prime}\geq\epsilon}
\widebar{d_{\mathrm{eluder}}}(\mathcal{G},\epsilon)$.

In order to introduce our methods we require some notation. The uncertainty radius function is a mapping $\omega:\mathcal{X}\times\mathcal{X}\times\mathcal{P}(\mathcal{F})\rightarrow
\mathbb{R}$ is defined as,

$$ $\omega(x,a,\mathcal{G})=\max_{f,f^{\prime}\in\mathcal{G}}f(x,a)-f^{\prime}(x,a)$ $$

for $x\in\mathcal{X},a\in\mathcal{A},\mathcal{G}\subseteq\mathcal{F}$. The quantity $\omega(x,a,\mathcal{G})$ equals the maximum fluctuations in value for the function class $\mathcal{G}$ when evaluated in context $x\in\mathcal{X}$ and action $a\in\mathcal{A}$. Throughout this work we will use the notation $\Sigma(A,B,\cdots,C)$ to denote the sigma algebra generated by the random variables $A,B,\cdots,C$.

In this work we design the first algorithm for contextual bandits with function approximation that satisfies a variance dependent regret bound. In this work we extend the optimistic least squares algorithm for contextual bandits with function approximation []. Our main result (simplified) states that,

###### Theorem 2.1 (Simplified) .

Let $\delta\in(0,1)$. There exists an algorithm that achieves a regret rate of,

$$ $\mathrm{Regret}(T)\leq\widetilde{\mathcal{O}}\left(d_{\mathrm{eluder}}\left( \mathcal{F},\frac{B}{T}\right)\sqrt{\left(\sum_{t=1}^{T}\sigma_{t}^{2}\right) \log\left(|\mathcal{F}|/\delta\right)}+Bd_{\mathrm{eluder}}\left(\mathcal{F}, \frac{B}{T}\right)\log(|\mathcal{F}|/\delta)\right)$ $$

for all $T\in\mathbb{N}$ with probability at least $1-\delta$. Where $\widetilde{\mathcal{O}}(\cdot)$ hides logarithmic dependencies.

###### Assumption 2.1 (Realizability) .

###### Assumption 2.2 (Boundedness) .

###### Definition 2.1 .

###### Definition 2.2 .

###### Theorem 2.1 (Simplified) .

## 3 Optimistic Least Squares

The algorithms we propose in this work are based on the optimism principle. This simple yet powerful algorithmic idea is the basis of a celebrated algorithm for contextual bandits with function approximation known as Optimistic Least Squares. Algorithm 1 presents the pseudo-code of the Optimistic Least Squares algorithm. In what follows,

Figure: Algorithm 1 Optimistic Least Squares

To derive a bound for the optimistic least squares algorithm, we require guarantees for the confidence sets. This is captured by the following Lemma.

###### Lemma 3.1 .

[LS guarantee]
Let $\delta\in(0,1)$, $\{x_{t},a_{t}\}_{t=1}^{\infty}$ be a sequence of context-action pairs and and $\{r_{t}\}_{t=1}^{\infty}$ be a sequence of reward values satisfying $r_{t}=f_{\star}(x_{t},a_{t})+\xi_{t}$ where $f_{\star}\in\mathcal{F}$ and $\xi_{t}$ is conditionally zero mean. Let $f_{t}=\arg\min_{f\in\mathcal{F}}\sum_{\ell=1}^{t-1}\left(f(x_{\ell},a_{\ell})-
r_{\ell}\right)^{2}$ be the least squares fit. If Assumption 2.2 holds then there is a constant $C>0$ such that,

$$ $\sum_{\ell=1}^{t-1}\left(f_{t}(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell}) \right)^{2}\leq\beta_{t}(\delta)$ $$

with probability at least $1-\delta$ for all $t\in\mathbb{N}$ where $\beta_{t}(\delta)=4CB^{2}\log(t\cdot|\mathcal{F}|/\delta)$.

The proof of Lemma 3.1 can be found in Section B. This result allows provides us with the tools to justify the choice of confidence sets in Algorithm 1. A simple corollary is,

###### Corollary 3.2 .

Let $\delta\in(0,1)$ and $\beta_{t}(\delta)=4CB^{2}\log(t\cdot|\mathcal{F}|/\delta)$ as defined in Lemma 3.1. The confidence sets $\mathcal{G}_{t}$ satisfy $f_{\star}\in\mathcal{G}_{t}$ for all $t\in\mathbb{N}$ simultaneously with probability at least $1-\delta$. Moreover, this property holds, $U_{t}(x,a_{t})\geq\max_{a\in\mathcal{A}}f_{\star}(x_{t},a)$ for all $t\in\mathbb{N}$.

###### Proof.

Lemma 3.1 implies that $f_{\star}\in\mathcal{G}_{t}$ for all $t\in\mathbb{N}$ simultaneously with probability at least $1-\delta$. When this occurs, the following sequence of inequalities is satisfied,

$$ $f_{\star}(x_{t},a)\leq\max_{f\in\mathcal{G}_{t}}f(x_{t},a)=U_{t}(x_{t},a)\leq U _{t}(x_{t},a_{t}).$ $$

for all $a\in\mathcal{A}$. Thus it holds that $\max_{a\in\mathcal{A}}f_{\star}(x_{t},a)\leq U_{t}(x_{t},a_{t})$.
∎

In order to relate the scale of these confidence sets with the algorithm’s regret we need to tie these values to the statistical capacity of the function class $\mathcal{F}$. This can be captured by its eluder dimension (see Definition 2.2). This is done via Lemma 3.3, a standard result that is crucial in showing an upper bound for the optimistic least squares algorithm regret. This result is a version of Lemma 3 from [] presented as Lemma 4.3 in [] which we reproduce here for readability.

###### Lemma 3.3 .

Let $\mathcal{F}$ be a function class satisfying Assumption 2.2 and with $\epsilon$-eluder dimension $\widebar{d_{\mathrm{eluder}}}(\mathcal{F},\epsilon)$ . For all $T\in\mathbb{N}$ and any dataset sequence $\{\bar{D}_{t}\}_{t=1}^{\infty}$ for $\bar{D}_{1}=\emptyset$ and $\bar{D}_{t}=\{(\bar{x}_{\ell},\bar{a}_{\ell})\}_{\ell=1}^{t-1}$ of context-action pairs, the following inequality on the sum of the uncertainty radii holds,

$$ $\sum_{t=1}^{T}\omega(\bar{x}_{t},\bar{a}_{t},\bar{D}_{t})\leq\mathcal{O}\left( \min\left(BT,\sqrt{\beta_{t}(\delta)\cdot\widebar{d}_{\mathrm{eluder}}( \mathcal{F},B/T)\cdot T}+B\widebar{d_{\mathrm{eluder}}}(\mathcal{F},B/T)\right )\right)$ $$

Lemmas 3.1 and 3.3 can be used to prove Algorithm 1 satisfies the following regret guarantee,

###### Theorem 3.4 .

The regret of the Optimistic Least Squares (Algorithm 1) with input values $\delta\in(0,1)$ and $\beta_{t}(\delta)=4CB^{2}\log(t|\mathcal{F}|/\delta)$ satisfies,

$$ $\mathrm{Regret}(T)\leq\mathcal{O}\left(B\sqrt{d_{\mathrm{eluder}}(\mathcal{F}, B/T)\cdot T\cdot\log(T|\mathcal{F}|/\delta)}+Bd_{\mathrm{eluder}}(\mathcal{F}, B/T)\right)$ $$

with probability at least $1-\delta$ for all $T\in\mathbb{N}$ simultaneously.

###### Proof.

Lemma 1 implies the event $\mathcal{E}$ where $f_{\star}\in\mathcal{G}_{t}$ for all $t\in\mathbb{N}$ occurs with probability at least $1-\delta$. The analysis of the regret of Algorithm 1 follows the typical analysis for optimistic algorithms,

$$ $\displaystyle\mathrm{Regret}(T)$ $\displaystyle=\sum_{t=1}^{T}\max_{a\in\mathcal{A}}f_{\star}(x_{t},a)-f_{\star} (x_{t},a_{t})$ $\displaystyle\leq\sum_{t=1}^{T}U_{t}(x_{t},a_{t})-f_{\star}(x_{t},a_{t})$ $\displaystyle=\sum_{t=1}^{T}f_{t}(x_{t},a_{t})-f_{\star}(x_{t},a_{t})$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}\sum_{t=1}^{T}\max_{f,f^{ \prime}\in\mathcal{G}_{t}}f(x_{t},a_{t})-f^{\prime}(x_{t},a_{t})$ $\displaystyle=\sum_{t=1}^{T}\omega(x_{t},a_{t},\mathcal{G}_{t})$ $\displaystyle\stackrel{{\scriptstyle(ii)}}{{\leq}}\mathcal{O}\left(Bd_{\mathrm {eluder}}(\mathcal{F},B/T)+\sqrt{\beta_{T}(\delta)\cdot d_{\mathrm{eluder}}( \mathcal{F},B/T)\cdot T}\right)$ $$

where $f_{t}$ is the function that achieves the $\mathop{\mathrm{argmax}}$ in the definition of $U_{t}$ over input context $x_{t}$. Inequality $(i)$ holds because when $\mathcal{E}$ holds, $f_{\star}\in\mathcal{G}_{t}$ and $f_{t}\in\mathcal{G}_{t}$ for all $t\in\mathbb{N}$. Inequality $(ii)$ is a variation of Lemma 3 in [] (see a simplified version in Lemma 3.3 from Appendix E). Substituting $\beta_{T}(\delta)=4CB^{2}\log(T|\mathcal{F}|/\delta)$ finalizes the result.

∎

Thus the dominating term of the regret bound (the term growing at a $\sqrt{T}$ rate) for optimistic least squares scales with the square root of the uncertainty radius, in this case given by the function $\beta_{T}(\delta)=4CB^{2}\log(T|\mathcal{F}|/\delta)$ defined in Lemma 3.1. Unfortunately, this introduces an unavoidable dependence on $B$. Thus, the dominating term of our regret bound has a scale controlled by $B$ instead of the variances $\{\sigma^{2}_{\ell}\}_{\ell=1}^{T}$. This dependence comes up because the proof of Lemma 3.1 relies on Freedman’s inequality (Lemma A.1 in Appendix A) that exhibits an unavoidable dependence on the scale of the random variables in the low order terms. In the following section we show a way to bypass this issue by introducing a multi-bucket regression approach that has a vanishing dependence on the low order terms.

###### Lemma 3.1 .

###### Corollary 3.2 .

###### Proof.

###### Lemma 3.3 .

###### Theorem 3.4 .

###### Proof.

## 4 Second Order Optimistic Least Squares with Known Variance

In this section we introduce an algorithm that satisfies second order regret bounds. Algorithm 2 takes as input a variance upper bound $\sigma^{2}$ such that $\sigma_{t}^{2}\leq\sigma^{2}$, and achieves a regret bound of order

$$ $\mathrm{Regret}(T)\leq\mathcal{O}\left(\sigma\sqrt{d_{\mathrm{eluder}}( \mathcal{F},B/T)T\log(T|\mathcal{F}|/\delta)}+d_{\mathrm{eluder}}\cdot\log(T| \mathcal{F}|/\delta)\right).$ $$

This algorithm is based on an uncertainty filtered least squares procedure that satisfies sharper bounds than the unfiltered ordinary least squares guarantees from Lemma 3.1. Since $\sigma^{2}\leq B$ this bound could be much smaller than the regret bound for Algorithm 1 described in Theorem 3.4. In this section we work under the following assumption,

###### Assumption 4.1 (Known Variance Upper Bound) .

There exists a (known) constant $\sigma>0$ such that $\sigma_{t}\leq\sigma^{2}$ for all $t\in\mathbb{N}$.

Given a data stream $\{(x_{\ell},a_{\ell},r_{\ell})\}_{\ell\in\mathbb{N}}$ where $r_{\ell}=f_{\star}(x_{\ell},a_{\ell})+\xi_{\ell}$ for $f_{\star}\in\mathcal{F}$ such that $\xi_{\ell}$ is conditionally zero mean, a sequence of subsets of $\mathcal{G}_{t}\subseteq\cdots\mathcal{G}_{2}\subseteq\mathcal{G}_{1}=\mathcal
{F}$ such that $\mathcal{G}_{t}$ is a function of $\{(x_{\ell},a_{\ell},r_{\ell})\}_{\ell=1}^{t-1}$), and $f_{\star}\in\mathcal{G}_{t}$ for all $t\in\mathbb{N}$. Given $\tau>0$ we define an uncertainty filtered least squares objective that takes a filtering parameter $\tau>0$ and defines a least squares regression function computed only over datapoints whose uncertainty radius is smaller than $\tau$,

$$ $f_{t}^{\tau}=\mathop{\mathrm{argmin}}_{f\in\mathcal{G}_{t-1}}\sum_{\ell=1}^{t- 1}(f(x_{\ell},a_{\ell})-r_{\ell})^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell}, \mathcal{G}_{\ell})\leq\tau)$ (2) $$

The uncertainty filtering procedure will allow us to prove a least squares guarantee with dependence on the variance and also on a vanishing low order term that scales with $\tau B$. We’ll use the notation

$$ $\beta_{t}(\tau,\tilde{\delta},\widetilde{\sigma}^{2})=(4\min(\tau B,B^{2})+16 \widetilde{\sigma}^{2})\log(t|\mathcal{F}|/\tilde{\delta})$ $$

to denote the confidence radius function, in this case a function of $\tau,\widetilde{\delta}$ and $\widetilde{\sigma}^{2}$. Algorithm 2 shows the pseudo-code for our Second Order Optimistic Algorithm.

Figure: Algorithm 2 Second Order Optimistic Least Squares

Notice that by definition in Algorithm 2 the confidence sets satisfy $\mathcal{G}_{\ell}\subseteq\mathcal{G}_{\ell^{\prime}}$ for all $\ell\geq\ell^{\prime}$. In order to state our results we’ll define a sequence of events $\{\mathcal{E}_{\ell}\}_{\ell=1}^{\infty}$ such that $\mathcal{E}_{\ell}$ corresponds to the event that $f_{\star}\in\mathcal{G}_{\ell-1}$ and therefore $f_{\star}\in\mathcal{G}_{\ell^{\prime}}$ for all $\ell^{\prime}\leq\ell-1$. The following proposition characterizes the error of the filtered least squares estimator $f_{t}^{\tau}$ when $\mathcal{E}_{t}$ holds.

###### Proposition 4.1 .

[Variance Dependent Least Squares]
Let $t\in\mathbb{N},\tau\geq 0$ and $\tilde{\delta}>0$. If $\sigma_{\ell}^{2}\leq\widetilde{\sigma}^{2}$ for all $\ell\leq t-1$ and $\mathcal{E}_{t}$ holds then

$$ $\mathbb{P}\left(\sum_{\ell=1}^{t-1}\left(f_{t}^{\tau}(x_{\ell},a_{\ell})-f_{ \star}(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell}, \mathcal{G}_{\ell})\leq\tau)\leq\beta_{t}(\tau,\widetilde{\delta},\widetilde{ \sigma}^{2}),~{}\mathcal{E}_{t}\right)\geq\mathbb{P}(\mathcal{E}_{t})-\tilde{ \delta}.$ (4) $$

The proof of Proposition 4.1 can be found in Appendix B. It follows the structure of the least squares result from Proposition 4.1. For a given $\tau>0$, estimator $f_{t}^{\tau}$ achieves a sharper bound than the ordinary least squares estimator because the low order term in the portion of the analysis that requires the use of Freedman’s inequality (see Lemma A.1) that has a magnitude scaling with the error of $f_{t}^{\tau}$ on historial points can be upper bounded by $\tau$ instead of scaling with $B$. This results in a second order term scaling with $\min(\tau B,B^{2})$ instead of $B^{2}$ as is reflected by the definition of $\beta_{t}(\tau,\widetilde{\delta},\widetilde{\sigma}^{2})$.

In contrast with the results of Lemma 3.1 the confidence radius of the $\tau$-uncertainty filtered least squares estimator depends on a variance upper bound whereas the uncertainty radius in Lemma 3.1 doesn’t. Proposition 4.1 provides us with a variance aware least squares guarantee. If the uncertainty threshold $\tau$ is small, the historical least squares error captured by equation 4 scales with $\sigma^{2}\log(t|\mathcal{F}|/\tilde{\delta})$ and does not depend on the scale of $B$. Algorithm 2 leverages these confidence sets to design a variance aware second order optimistic least squares algorithm. The basis of the regret analysis for Algorithm 2 is the validity of the confidence sets $\mathcal{G}_{t}$ and therefore the estimators $U_{t}(x_{t},a_{t})$ being optimistic.

###### Lemma 4.2 .

The confidence intervals are valid so that $f_{\star}\in\mathcal{G}_{t}$ for all $t\in\mathbb{N}$ and optimism holds, $\max_{a\in\mathcal{A}}f_{\star}(x_{t},a)\leq U_{t}(x_{t},a_{t})$
with probability at least $1-\delta$ for all $t\in\mathbb{N}$.

The proof of Proposition 4.2 can be found in Appendix B. From now on we denote by $\mathcal{E}$ the event described in Lemma 4.2 where all the confidence intervals are valid. In order to relate the regret to the eluder dimension of $\mathcal{F}$, we develop a sharpened version of Lemma 3.3 to bound the sum of the uncertainty widths over the context-action pairs played by Algorithm 2. Lemma 3.3’s guarantees are insufficient to yield the desired result because this result is unable to leverage any dependence on the scale of the widths in the definition of the confidence sets. This is sufficient to show a regret bound as it is evident by following the same logic as in the analysis of Theorem 3.4. In order to prove this result, we need to first bound the number of context-action pairs with large uncertainty radius.

###### Lemma 4.3 .

If Algorithm 2 is run with input variance upper bound $\sigma>0$, $\mathcal{E}$ is satisfied and $\{\mathcal{G}_{t}\}_{t=1}^{\infty}$ is the sequence of confidence sets produced by Algorithm 2 then for all $T\in\mathbb{N}$ and $\tau\geq\tau_{q_{T}}$ ,

$$ $\sum_{t=1}^{T}\mathbf{1}(\omega(x_{t},a_{t},\mathcal{G}_{t})>\tau)\leq 3\cdot d _{\mathrm{eluder}}(\mathcal{F},\tau)\left(\frac{64B\log(T|\mathcal{F}|/\delta) }{\tau}+\frac{64\sigma^{2}\log(T|\mathcal{F}|/\delta)}{\tau^{2}}+1\right)$ $$

Lemma 4.3 can be used to show the following sharpened version of Lemma 3.3.

###### Lemma 4.4 .

If $\mathcal{E}$ holds, then for all $T\in\mathbb{N}$ the uncertainty widths of context-action pairs from Algorithm 2 satisfy,

$$ $\displaystyle\sum_{t=1}^{T}\omega(x_{t},a_{t},\mathcal{G}_{t})\leq\mathcal{O} \left(\sigma\sqrt{d_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T|\mathcal{F}|/ \delta)T}+Bd_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T)\log(T|\mathcal{F}|/ \delta)\right).$ $$

The proof of this result is based on an integration argument that leverages the inequality in Lemma 4.3.

Algorithm 2 satisfies the following regret bound,

###### Theorem 4.5 .

If $\delta\in(0,1)$ is the input to Algorithm 2 satisfies,

$$ $\mathrm{Regret}(T)\leq\mathcal{O}\left(\sigma\sqrt{d_{\mathrm{eluder}}( \mathcal{F},B/T)\log(T|\mathcal{F}|/\delta)T}+B\cdot d_{\mathrm{eluder}}( \mathcal{F},B/T)\log(T)\log(T|\mathcal{F}|/\delta)\right).$ $$

for all $T\in\mathbb{N}$ with probability at least $1-\delta$.

###### Proof.

The analysis of the regret of Algorithm 2 follows the typical analysis for optimistic algorithms. When $\mathcal{E}$ holds,

$$ $\displaystyle\mathrm{Regret}(T)$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}\sum_{t=1}^{T}\omega(x_{t},a_ {t},\mathcal{G}_{t})$ $\displaystyle\stackrel{{\scriptstyle(ii)}}{{\leq}}\mathcal{O}\left(\sigma\sqrt {d_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T|\mathcal{F}|/\delta)T}+B\cdot d_{ \mathrm{eluder}}(\mathcal{F},B/T)\log(T)\log(T|\mathcal{F}|/\delta)\right)$ $$

Where inequality $(i)$ is a consequence of conditioning on $\mathcal{E}$ and Lemma 4.2 where optimism holds and follows the same logic as in the proof of Theorem 3.4. The last inequality $(ii)$ follows from Lemma 4.4. We finish the proof by noting that $\mathbb{P}(\mathcal{E})\geq 1-\delta$.
∎

###### Assumption 4.1 (Known Variance Upper Bound) .

###### Proposition 4.1 .

###### Lemma 4.2 .

###### Lemma 4.3 .

###### Lemma 4.4 .

###### Theorem 4.5 .

###### Proof.

## 5 Contextual Bandits with Unknown Variance

In the case where the variance is not known our contextual bandit algorithms work by estimating the cumulative variance up to constant multiplicative accuracy and use this estimator to build confidence sets as in Algorithms 1 and 2. In section 5.1 we describe how to successfully estimate the cumulative variance in contextual bandit problems and finally in section 5.3 we introduce Algorithm 3 that satisfy a regret guarantee whose dominating term scales with $\sqrt{\sum_{t=1}^{T}\sigma_{t}^{2}}$, and the low order term with $d_{\mathrm{eluder}}\cdot\log(|\mathcal{F}|)$.

### 5.1 Variance Estimation in Contextual Bandit Problems

In this section we discuss methods for estimating the variance in contextual bandit problems. Our estimator is the cumulative least squares error of a sequence of (biased) estimators. The motivation behind this choice is the following observation,

$$ $\mathrm{Var}(X)=\min_{u}\mathbb{E}\left[(X-u)^{2}\right]$ $$

where the minimizer $\mathop{\mathrm{argmin}}_{u}\mathbb{E}\left[(X-u)^{2}\right]=\mathbb{E}[X]$. Inspired by this we propose the following estimation procedure. Given context-action pairs and reward information $\{(x_{\ell},a_{\ell},r_{\ell})\}_{\ell=1}^{t-1}$ and a filtering process $\mathbf{b}_{t}=\{b_{\ell}\}_{\ell=1}^{t-1}$ of bernoulli random variables $b_{\ell}\in\{0,1\}$ such that $b_{\ell}$ is $\Sigma(x_{1},a_{1},b_{1},r_{1},\cdots,x_{\ell-1},a_{\ell-1},b_{\ell-1},r_{\ell
-1},x_{\ell},a_{\ell})$-measurable. Let $f_{t}^{\mathbf{b}_{t}}$ be the “filtered” least squares estimator:

$$ $f_{t}^{\mathbf{b}_{t}}=\mathop{\mathrm{argmin}}_{f\in\mathcal{F}}\sum_{\ell=1} ^{t-1}b_{\ell}\cdot\left(f(x_{\ell},a_{\ell})-r_{\ell}\right)^{2}.$ $$

A filtered least squares estimator satisfies a least squares bound similar to Lemma 3.1,

###### Lemma 5.1 .

Let $\tilde{\delta}\in(0,1)$, $t\in\mathbb{N}$, $\{x_{\ell},a_{\ell}\}_{\ell=1}^{t-1}$ be a sequence of context-action pairs and and $\{r_{t}\}_{t=1}^{t-1}$ be a sequence of values satisfying $r_{\ell}=f_{\star}(x_{\ell},a_{\ell})+\xi_{\ell}$ where $f_{\star}\in\mathcal{F}$ and the $\xi_{\ell}$ are conditionally zero mean.
Let $\{b_{\ell}\}_{\ell=1}^{t-1}$be a filtering process of Bernoulli random variables $b_{\ell}\in\{0,1\}$ such that $b_{\ell}$ is $\Sigma(x_{1},a_{1},b_{1},r_{1},\cdots,$ $x_{\ell-1},a_{\ell-1},b_{\ell-1},r_{\ell-1},x_{\ell},a_{\ell})$-measurable. Let $f_{t}^{\mathbf{b}_{t}}=\mathop{\mathrm{argmin}}_{f\in\mathcal{F}}\sum_{\ell=1}
^{t-1}b_{\ell}\cdot\left(f(x_{\ell},a_{\ell})-r_{\ell}\right)^{2}$ be the “filtered” least squares estimator. If Assumption 2.2 holds then,

$$ $\left|\sum_{\ell=1}^{t-1}\xi_{\ell}\cdot b_{\ell}\cdot\left(f_{\star}(x_{\ell} ,a_{\ell})-f_{t}^{\mathbf{b}_{t}}(x_{\ell},a_{\ell})\right)\right|\leq 6B^{2} \log(2|\mathcal{F}|/\tilde{\delta}).$ $$

and

$$ $\sum_{\ell=1}^{t-1}b_{\ell}\cdot\left(f^{\mathbf{b}_{t}}_{t}(x_{\ell},a_{\ell} )-f_{\star}(x_{\ell},a_{\ell})\right)^{2}\leq 8B^{2}\log(2|\mathcal{F}|/\tilde {\delta})$ $$

with probability at least $1-\tilde{\delta}$.

Based on the definitions above we will consider the following cumulative variance estimator for a filtered context, action, reward process:

$$ $W_{t}^{\mathbf{b}_{t}}=\sum_{\ell=1}^{t-1}b_{\ell}\cdot(r_{\ell}-f^{\mathbf{b} _{t}}_{t}(x_{\ell},a_{\ell}))^{2}.$ (5) $$

We now prove this estimator achieves a small error.

###### Lemma 5.2 .

Let $\tilde{\delta}\in(0,1)$ be a probability parameter. If Assumption 2.2 holds,

$$ $\frac{2}{3}\cdot W_{t}^{\mathbf{b}_{t}}-11B^{2}\log(4|\mathcal{F}|/\tilde{ \delta})\leq\widebar{W}_{t}^{\mathbf{b}_{t}}\leq 2W_{t}^{\mathbf{b}_{t}}+48B^{ 2}\log(4|\mathcal{F}|/\tilde{\delta})$ $$

with probability at least $1-\tilde{\delta}$ where $\widebar{W}_{t}^{\mathbf{b}_{t}}=\sum_{\ell=1}^{t-1}b_{\ell}\cdot\sigma_{\ell}
^{2}$.

Using the union bound (by setting $\tilde{\delta}=\frac{\delta^{\prime}}{2\cdot t^{2}}$ in Lemma 5.1) we can write an anytime guarantee for the variance estimators $W_{t}^{\mathbf{b}_{t}}$).

###### Corollary 5.3 .

Let $\delta^{\prime}\in(0,1)$, $\{x_{\ell},a_{\ell},r_{\ell}\}_{\ell=1}^{\infty}$ be a sequence of context-action and rewards triplets such that $r_{\ell}=f_{\star}(x_{\ell},a_{\ell})+\xi_{\ell}$ where $f_{\star}\in\mathcal{F}$ and the $\xi_{\ell}$ are conditionally zero mean. Let $\{b_{\ell}\}_{\ell=1}^{t-1}$be a filtering process of Bernoulli random variables $b_{\ell}\in\{0,1\}$ such that $b_{\ell}$ is $\Sigma(x_{1},a_{1},b_{1},r_{1},\cdots,$ $x_{\ell-1},a_{\ell-1},b_{\ell-1},r_{\ell-1},x_{\ell},a_{\ell})$-measurable and $f_{t}^{\mathbf{b}_{t}}=\mathop{\mathrm{argmin}}_{f\in\mathcal{F}}\sum_{\ell=1}
^{t-1}b_{\ell}\cdot\left(f(x_{\ell},a_{\ell})-r_{\ell}\right)^{2}$ be the “filtered” least squares estimator. If Assumption 2.2 holds there exists a universal constant $C>0$ such that the cumulative variance estimator $W_{t}^{\mathbf{b}_{t}}=\sum_{\ell=1}^{t-1}b_{\ell}\cdot(r_{\ell}-f^{\mathbf{b}
_{t}}_{t}(x_{\ell},a_{\ell}))^{2}$ satisfies,

$$ $\frac{2}{3}\cdot W_{t}^{\mathbf{b}_{t}}-C\cdot B^{2}\log(t|\mathcal{F}|/\delta ^{\prime})\leq\widebar{W}_{t}^{\mathbf{b}_{t}}\leq 2W_{t}^{\mathbf{b}_{t}}+C \cdot B^{2}\log(t|\mathcal{F}|/\delta^{\prime})$ $$

with probability at least $1-\delta^{\prime}$ for all $t\in\mathbb{N}$.

###### Proof.

Applying Lemma 5.1 with $\tilde{\delta}=\frac{\delta^{\prime}}{2t^{2}}$ and applying a union bound over all $t\in\mathbb{N}$ yields the inequality,

$$ $\frac{2}{3}\cdot W_{t}^{\mathbf{b}_{t}}-11B^{2}\log(8t^{2}|\mathcal{F}|/\delta ^{\prime})\leq\widebar{W}_{t}^{\mathbf{b}_{t}}\leq 2W_{t}^{\mathbf{b}_{t}}+48B ^{2}\log(8t^{2}|\mathcal{F}|/\tilde{\delta})$ $$

finally, $48\log(8t^{2}|\mathcal{F}|/\delta^{\prime})=\Theta\left(t|\mathcal{F}|/\delta^
{\prime}\right)$ yields the desired result.
∎

###### Lemma 5.1 .

###### Lemma 5.2 .

###### Corollary 5.3 .

###### Proof.

### 5.2 Unknown-Variance Guarantees for Algorithm 2

Although Algorithm 2
was formulated under the assumption of a known variance upper bound $\sigma$, in this section we show it is possible to combine the variance estimation procedure we propose here with Algorithm 2. A simple and immediate consequence of Corollary 5.3 is,

###### Corollary 5.4 .

Let $\delta^{\prime}\in(0,1)$. Under the assumptions of Corollary 5.3. If $\sigma_{t}=\sigma$ for all $t\in\mathbb{N}$ and we define $N_{t}^{\mathbf{b}_{t}}=\sum_{\ell=1}^{t-1}b_{\ell}$ then,

$$ $\frac{2W_{t}^{\mathbf{b}_{t}}}{3N_{t}^{\mathbf{b}_{t}}}-\frac{C\cdot B^{2}\log (t|\mathcal{F}|/\delta^{\prime})}{N_{t}^{\mathbf{b}_{t}}}\leq\sigma^{2}\leq \frac{2W_{t}^{\mathbf{b}_{t}}}{N_{t}^{\mathbf{b}_{t}}}+\frac{C\cdot B^{2}\log( t|\mathcal{F}|/\delta^{\prime})}{N_{t}^{\mathbf{b}_{t}}}$ $$

with probability at least $1-\delta^{\prime}$ for all $t\in\mathbb{N}$. Where $C>0$ is the same universal constant as in Corollary 5.3.

Let $\{\mathbf{b}_{t}\}_{t\in\mathbb{N}}$ be the trivial filtering process defined by setting $b_{\ell}=1$ for $\ell\leq t-1$ so that $N_{t}^{\mathbf{b}_{t}}=t-1$ and define the variance upper-bound estimator sequence $\widehat{\sigma}_{1}^{2}=B^{2}$ and $\widehat{\sigma}^{2}_{t}=\min\left(\widehat{\sigma}_{t-1}^{2},\frac{2W_{t}^{
\mathbf{b}_{t}}}{t-1}+\frac{C\cdot B^{2}\log(t|\mathcal{F}|/\delta^{\prime})}{
t-1}\right)$ for all $t\geq 2$. Corollary 5.4 implies that

$$ $\sigma^{2}\leq\widehat{\sigma}_{t}\leq\frac{2W_{t}^{\mathbf{b}_{t}}}{t-1}+ \frac{C\cdot B^{2}\log(t|\mathcal{F}|/\delta^{\prime})}{t-1}\leq 3\sigma^{2}+ \frac{3C\cdot B^{2}\log(t|\mathcal{F}|/\delta^{\prime})}{t-1}$ (6) $$

for all $t\in\mathbb{N}$ with probability at least $1-\delta^{\prime}$.

We’ll analyze a version of Algorithm 2 where the confidence sets $\mathcal{G}_{t}(\tau_{i})$ are computed using confidence radii equal to $\beta_{t}\left(\tau_{i},\frac{\delta}{2(i+1)^{2}},\widehat{\sigma}_{t}^{2}\right)$ in equation 3. With these parameter choices, we can show a result equivalent to Lemma 4.2,

###### Corollary 5.5 .

Let $\delta\in(0,1)$. If $\delta/2$ is the input to Algorithm 2 and $\widehat{\sigma}_{t}^{2}$ estimators are computed by setting $\delta^{\prime}=\delta/2$, then
the confidence intervals are valid so that $f_{\star}\in\mathcal{G}_{t}$ for all $t\in\mathbb{N}$ and optimism holds, $\max_{a\in\mathcal{A}}f_{\star}(x_{t},a)\leq U_{t}(x_{t},a_{t})$
with probability at least $1-\delta$ for all $t\in\mathbb{N}$.

The proof of this result follows by a simple union bound between the result of Lemma 4.2 and the inequality $\sigma^{2}\leq\widehat{\sigma}_{t}^{2}$. Let $\bar{\mathcal{E}}$ denote the event described in Corollary 5.5. This version of Algorithm 2 satisfies the following guarantees,

###### Theorem 5.6 .

Let $\delta\in(0,1)$. If $\delta/2$ is the input to Algorithm 2 and $\widehat{\sigma}_{t}^{2}$ estimators are computed by setting $\delta^{\prime}=\delta/2$, the regret of Algorithm 2 with modified confidence set sizes satisfies,

$$ $\mathrm{Regret}(T)\leq\mathcal{O}\left(Bd_{\mathrm{eluder}}(\mathcal{F},B/T) \log^{2}(T)\log(T|\mathcal{F}|/\delta)+\sigma\sqrt{d_{\mathrm{eluder}}( \mathcal{F},B/T)\log(T|\mathcal{F}|/\delta)T}\right).$ $$

for all $T\in\mathbb{N}$ with probability at least $1-\delta$.

The proof of Theorem 5.6 can be found in Appendix D.2.

###### Corollary 5.4 .

###### Corollary 5.5 .

###### Theorem 5.6 .

### 5.3 Unknown-Variance Dependent Least Squares Regression

We borrow the setting of Section 4 with a few modifications. Given a data stream $\{(x_{\ell},a_{\ell},r_{\ell})\}_{\ell\in\mathbb{N}}$ where $r_{\ell}=f_{\star}(x_{\ell},a_{\ell})+\xi_{\ell}$ for $f_{\star}\in\mathcal{F}$ such that $\xi_{\ell}$ is conditionally zero mean, a sequence of subsets of $\mathcal{G}_{t}^{\prime}\subseteq\cdots\mathcal{G}^{\prime}_{2}\subseteq
\mathcal{G}^{\prime}_{1}=\mathcal{F}$ such that $\mathcal{G}^{\prime}_{t}$ is a function of $\{(x_{\ell},a_{\ell},r_{\ell})\}_{\ell=1}^{t-1}$), and $f_{\star}\in\mathcal{G}^{\prime}_{t}$ for all $t\in\mathbb{N}$. Given $\tau>0$ we define an uncertainty-filtered least squares objective,

$$ $f_{t}^{(\tau,2\tau]}=\mathop{\mathrm{argmin}}_{f\in\mathcal{G}_{t-1}}\sum_{ \ell=1}^{t-1}(f(x_{\ell},a_{\ell})-r_{\ell})^{2}\mathbf{1}\left(\omega(x_{\ell },a_{\ell},\mathcal{G}^{\prime}_{\ell})\in(\tau,2\tau]\right).$ (7) $$

in the following, for any $\tau$ we’ll use the notation $b_{\ell}^{\tau}$ to denote the filtering random variables $b_{\ell}^{\tau}=\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell}^{\prime
})\in(\tau,2\tau])$. Similarly, we denote by $\mathbf{b}_{t}^{\tau}=(b_{1}^{\tau},\cdots,b_{t-1}^{\tau})$.

Figure: Algorithm 3 Unknown-Variance Second Order Optimistic Least Squares

We develop a result equivalent to Lemma 3.1 and Proposition 4.1 to characterize the confidence sets. Just like in Section 4 we write our result in terms of a sequence of events $\{\mathcal{E}_{\ell}^{\prime}\}_{\ell=1}^{\infty}$ such that $\mathcal{E}_{\ell}^{\prime}$ corresponds to the event that $f_{\star}\in\mathcal{G}^{\prime}_{\ell-1}$ and therefore $f_{\star}\in\mathcal{G}^{\prime}_{\ell^{\prime}}$ for all $\ell^{\prime}\leq\ell-1$ so that $\mathcal{E}_{\ell}\subseteq\mathcal{E}_{\ell}^{\prime}$ for all $\ell\geq\ell^{\prime}$.

###### Proposition 5.7 .

Let $\tilde{\delta}\in(0,1)$ and $\tau>0$. Let $\{\widetilde{\mathcal{E}}_{\ell}^{\prime}\}_{\ell=1}^{\infty}$ be a sequence of events such that $\widetilde{\mathcal{E}}_{1}^{\prime}\supseteq\widetilde{\mathcal{E}}_{2}^{
\prime}\cdots$ and $\widetilde{\mathcal{E}}^{\prime}_{t}\subseteq\mathcal{E}^{\prime}_{t}$. Let $f_{t}^{(\tau,2\tau]}$ be result of solving the uncertainty-filtered least-squares objective from equation 7. Additionally let $W_{t}^{\mathbf{b}^{\tau}_{t}}$ be the filtered estimator of the cumulative variances defined by equation 5 when setting $b^{\tau}_{\ell}=\mathbf{1}\left(\omega(x_{\ell},a_{\ell},\mathcal{G}^{\prime}_
{\ell})\in(\tau,2\tau]\right)$ and $\widebar{W}_{t}^{\mathbf{b}^{\tau}_{t}}:=\sum_{\ell=1}^{t-1}\sigma_{\ell}^{2}
\cdot\mathbf{1}\left(\omega(x_{\ell},a_{\ell},\mathcal{G}^{\prime}_{\ell})\in(
\tau,2\tau]\right)$. There exist universal constants $C,C^{\prime}>0$ such that the events $\mathcal{W}_{t}(\tau)$ defined for any $t$ as

$$ $\displaystyle\sum_{\ell=1}^{t-1}\left(f_{t}^{(\tau,2\tau]}(x_{\ell},a_{\ell})- f_{\star}(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell}, \mathcal{G}_{\ell})\in(\tau,2\tau])\leq C^{\prime}\tau\sqrt{W_{t}^{\mathbf{b}^ {\tau}_{t}}\log\left(t|\mathcal{F}|/\tilde{\delta}\right)}+C^{\prime}\tau B \log\left(t|\mathcal{F}|/\tilde{\delta}\right)$ $$

and

$$ $C^{\prime}\tau\sqrt{W_{t}^{\mathbf{b}^{\tau}_{t}}\log\left(t|\mathcal{F}|/ \tilde{\delta}\right)}+C^{\prime}\tau B\log\left(t|\mathcal{F}|/\tilde{\delta} \right)\leq C^{{}^{\prime\prime}}\tau\sqrt{\widebar{W}_{t}^{\mathbf{b}^{\tau}_ {t}}\log\left(t|\mathcal{F}|/\tilde{\delta}\right)}+C^{{}^{\prime\prime}}\tau B \log\left(t|\mathcal{F}|/\tilde{\delta}\right)$ $$

satisfy the bound $\mathbb{P}(\widetilde{\mathcal{E}}_{t}^{\prime}\cap\left(\mathcal{W}_{t}(\tau)
\right)^{c})\leq\frac{\tilde{\delta}}{2t^{2}}$.

The proof of Proposition 5.7 can be found in Appendix D.3. Similar to Corollary 3.2 and Proposition 5.7 we derive the following anytime guarantee for the confidence sets, and show that optimism holds

###### Lemma 5.8 .

Let $\delta\in(0,1)$. When the confidence sets $\mathcal{G}^{\prime}_{t}\subseteq\mathcal{F}$ are defined as in Algorithm 3, then $f_{\star}\in\mathcal{G}^{\prime}_{t}$ so that $\max_{a\in\mathcal{A}}f_{\star}(x_{t},a)\leq U_{t}(x_{t},a_{t})$ (optimism holds), and for all $i\in[q_{t}]$,

$$ $\displaystyle\mathcal{G}_{t}^{\prime}(\tau_{i})\subseteq\Big{\{}f\in\mathcal{F }\text{ s.t. }\sum_{\ell=1}^{t-1}\left(f_{t}^{(\tau_{i},2\tau_{i}]}(x_{\ell},a _{\ell})-f(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell}, \mathcal{G}_{\ell})\in(\tau_{i},2\tau_{i}])\leq\qquad\qquad\qquad\qquad\qquad \qquad\qquad\qquad$ $\displaystyle C^{{}^{\prime\prime}}\tau_{i}\sqrt{\widebar{W}_{t}^{\mathbf{b}^{ \tau_{i}}_{t}}\log\left(2(i+1)^{2}t|\mathcal{F}|/\delta\right)}+C^{{}^{\prime \prime}}\tau_{i}B\log\left(2i^{2}t|\mathcal{F}|/\delta\right)\Big{\}}.\qquad\qquad\qquad$ (8) $$

with probability at least $1-\delta$ for all $t\in\mathbb{N}$. Where $C^{{}^{\prime\prime}}>0$ is the same universal constant as in Proposition 5.7.

The proof of Lemma 5.8 can be found in Appendix D.3. Define $\mathcal{E}^{\prime}$ as the event outlined in Lemma 5.8 such that $f_{\star}\in\mathcal{G}_{t}^{\prime}$, optimism holds, and inequality 8 holds for all $i\in[q_{t}]$ and all $t\in\mathbb{N}$. This event satisfies $\mathbb{P}\left(\mathcal{E}^{\prime}\right)\geq 1-\delta$. The proof of the regret guarantees of Algorithm 3 will follow a similar template as in the previous sections; establishing optimism and then bounding the sum of the uncertainty widths over the context-action pairs played by the algorithm. In order to execute this proof strategy we need a way to relate the sum of the uncertainty widths to the definition of the confidence sets and by doing so with the true cumulative sum of variances. We do this via the following Lemma.

###### Lemma 5.9 .

If $\{\mathcal{G}_{t}^{\prime}\}_{t=1}^{\infty}$ is the sequence of confidence sets produced by Algorithm 2, there exists a universal constant $\widetilde{C}>0$ such that when $\mathcal{E}^{\prime}$ is satisfied,

$$ $\displaystyle\sum_{t=1}^{T}\mathbf{1}(\omega(x_{t},a_{t},\mathcal{G}_{t}^{ \prime})\in(\tau_{i},2\tau_{i}])\leq\qquad\qquad\qquad\qquad\qquad\qquad\qquad \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad$ $\displaystyle\frac{\widetilde{C}\cdot d_{\mathrm{eluder}}(\mathcal{F},\tau_{i} )}{\tau_{i}}\sqrt{\widebar{W}_{T}^{\mathbf{b}^{\tau_{i}}_{T}}\log\left(iT| \mathcal{F}|/\delta\right)}+\frac{\widetilde{C}\cdot B\cdot d_{\mathrm{eluder} }(\mathcal{F},\tau_{i})}{\tau_{i}}\log\left(iT|\mathcal{F}|/\delta\right)+ \widetilde{C}\cdot d_{\mathrm{eluder}}(\mathcal{F},\tau_{i})$ $$

for all $T\in\mathbb{N}$ and $i\in[q_{T}]$.

The proof of Lemma 5.9 can be found in Appendix E. Finally, we can combine the result above with an optimism argument to prove the following regret bound for Algorithm 3.

###### Theorem 5.10 .

Let $T\in\mathbb{N}$, $\delta\in(0,1)$ and $q=\log(T)$. The regret of Algorithm 3 satisfies,

$$ $\mathrm{Regret}(T)\leq\mathcal{O}\left(d_{\mathrm{eluder}}\left(\mathcal{F}, \frac{B}{T}\right)\sqrt{\left(\sum_{t=1}^{T}\sigma_{t}^{2}\right)\log(T)\log \left(T|\mathcal{F}|/\delta\right)}+Bd_{\mathrm{eluder}}\left(\mathcal{F}, \frac{B}{T}\right)\log(T)\log(T|\mathcal{F}|/\delta)\right)$ $$

simultaneously for all $T\in\mathbb{N}$ with probability at least $1-\delta$.

###### Proof Sketch.

The proof of Theorem 5.10 relies on observation that when $\mathcal{E}^{\prime}$ holds, optimism implies

$$ $\mathrm{Regret}(T)\leq\sum_{t=1}^{T}\omega(x_{t},a_{t},\mathcal{G}_{t}^{\prime }).$ $$

The sum of widths can be upper bounded as,

$$ $\displaystyle\sum_{t=1}^{T}\omega(x_{t},a_{t},\mathcal{G}_{t}^{\prime})$ $\displaystyle\leq\frac{T\cdot B}{2^{q}}+2\sum_{i=1}^{q}\tau_{i}\cdot\left(\sum _{t=1}^{T}\mathbf{1}\left(\omega(x_{t},a_{t},\mathcal{G}_{t}^{\prime})\in(\tau _{i},2\tau_{i}]\right)\right).$ $$

Finally Lemma 5.9 can be used to finish the proof.
∎

###### Proposition 5.7 .

###### Lemma 5.8 .

###### Lemma 5.9 .

###### Theorem 5.10 .

###### Proof Sketch.

## 6 Conclusion

In this work we have introduced second order bounds for contextual bandits with function approximation. These bounds improve on existing results such as [] because they only require a realizability assumption on the mean reward values of each context-action pair. We introduce two types of algorithm, one that achieves what we believe is sharp dependence on the complexity of the underlying reward class measured by the eluder dimension when all the measurement noise variances are the same and unknown, and a second one that in the case of changing noise variances achieves a bound that scales with the square root of the sum of these variances but scales linearly in the eluder dimension. In a future version of this writeup we will strive to update our results to achieve a sharper dependence on the eluder dimension scaling with its square root. We hope the techniques we have developed in this manuscript can be easily used to develop second order algorithms with function approximation in other related learning models such as reinforcement learning. These techniques distill, simplify and present in a didactic manner many of the ideas developed for the variance aware literature in linear contextual bandit problems in works such as  [, , , , ] and transports them to the setting of function approximation. Although we did not cover this in our work, an interesting avenue of future research remains to understand when can we design second order bounds for algorithms based on the inverse gap weighting technique that forms the basis of the $\mathrm{SquareCB}$ algorithm from [].

## Appendix A Supporting Results

Our results relies on the following variant of Bernstein inequality for martingales, or Freedman’s inequality [], as stated in e.g., [, ].

###### Lemma A.1 (Simplified Freedman’s inequality) .

Let $Z_{1},...,Z_{T}$ be a bounded martingale difference sequence with $|Z_{\ell}|\leq R$. For any $\delta^{\prime}\in(0,1)$, and $\eta\in(0,1/R)$, with probability at least $1-\delta^{\prime}$,

$$ $\sum_{\ell=1}^{T}Z_{\ell}\leq\eta\sum_{\ell=1}^{T}\mathbb{E}_{\ell}[Z_{\ell}^{ 2}]+\frac{\log(1/\delta^{\prime})}{\eta}.$ (9) $$

where $\mathbb{E}_{\ell}[\cdot]$ is the conditional expectation(^3^33We will use this notation to denote conditional expectations throughout this work.) induced by conditioning on $Z_{1},\cdots,Z_{\ell-1}$.

###### Lemma A.2 (Anytime Freedman) .

Let $\{Z_{t}\}_{t=1}^{\infty}$ be a bounded martingale difference sequence with $|Z_{t}|\leq R$ for all $t\in\mathbb{N}$. For any $\delta^{\prime}\in(0,1)$, and $\eta\in(0,1/R)$, there exists a universal constant $C>0$ such that for all $t\in\mathbb{N}$ simultaneously with probability at least $1-\delta^{\prime}$,

$$ $\sum_{\ell=1}^{t}Z_{\ell}\leq\eta\sum_{\ell=1}^{t}\mathbb{E}_{\ell}[Z_{\ell}^{ 2}]+\frac{C\log(t/\delta^{\prime})}{\eta}.$ (10) $$

where $\mathbb{E}_{\ell}[\cdot]$ is the conditional expectation induced by conditioning on $Z_{1},\cdots,Z_{\ell-1}$.

###### Proof.

This result follows from Lemma A.1. Fix a time-index $t$ and define $\delta_{t}=\frac{\delta^{\prime}}{12t^{2}}$. Lemma A.1 implies that with probability at least $1-\delta_{t}$,

$$ $\sum_{\ell=1}^{t}Z_{\ell}\leq\eta\sum_{\ell=1}^{t}\mathbb{E}_{\ell}\left[Z_{ \ell}^{2}\right]+\frac{\log(1/\delta_{t})}{\eta}.$ $$

A union bound implies that with probability at least $1-\sum_{\ell=1}^{t}\delta_{t}\geq 1-\delta^{\prime}$,

$$ $\displaystyle\sum_{\ell=1}^{t}Z_{\ell}$ $\displaystyle\leq\eta\sum_{\ell=1}^{t}\mathbb{E}_{\ell}\left[Z_{\ell}^{2} \right]+\frac{\log(12t^{2}/\delta^{\prime})}{\eta}$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}\eta\sum_{\ell=1}^{t}\mathbb{ E}_{\ell}\left[Z_{\ell}^{2}\right]+\frac{C\log(t/\delta^{\prime})}{\eta}.$ $$

holds for all $t\in\mathbb{N}$. Inequality $(i)$ holds because $\log(12t^{2}/\delta^{\prime})=\mathcal{O}\left(\log(t\delta^{\prime})\right)$.

∎

###### Lemma A.3 (Uniform empirical Bernstein bound) .

In the terminology of Howard et al. [], let $S_{t}=\sum_{i=1}^{t}Y_{i}$ be a sub-$\psi_{P}$ process with parameter $c>0$ and variance process $W_{t}$. Then with probability at least $1-\widetilde{\delta}$ for all $t\in\mathbb{N}$

$$ $\displaystyle S_{t}$ $\displaystyle\leq 1.44\sqrt{\max(W_{t},m)\left(1.4\ln\ln\left(2\left(\max\left (\frac{W_{t}}{m},1\right)\right)\right)+\ln\frac{5.2}{\widetilde{\delta}} \right)}$ $\displaystyle\qquad+0.41c\left(1.4\ln\ln\left(2\left(\max\left(\frac{W_{t}}{m} ,1\right)\right)\right)+\ln\frac{5.2}{\widetilde{\delta}}\right)$ $$

where $m>0$ is arbitrary but fixed.

As a corollary of Lemma A.3 we can show the following,

###### Lemma A.4 (Freedman) .

Suppose $\{X_{t}\}_{t=1}^{\infty}$ is an adapted process with $|X_{t}|\leq b$. Let $V_{t}=\sum_{\ell=1}^{t}\mathrm{Var}_{\ell}$ where $\mathrm{Var}_{\ell}=\mathbb{E}_{\ell}[X_{\ell}^{2}]-\mathbb{E}^{2}_{\ell}[X_{
\ell}]$. For any $\widetilde{\delta}\in(0,1)$, with probability at least $1-\widetilde{\delta}$,

$$ $\sum_{\ell=1}^{t}X_{\ell}-\mathbb{E}_{\ell}[X_{\ell}]\leq 4\sqrt{V_{t}\ln\frac {12\ln 2t}{\widetilde{\delta}}}+6b\ln\frac{12\ln 2t}{\widetilde{\delta}}.$ $$

for all $t\in\mathbb{N}$ simultaneously.

###### Proof.

We are ready to use Lemma A.3 (with $c=b$). Let $S_{t}=\sum_{\ell=1}^{t}X_{t}$ and $W_{t}=\sum_{\ell=1}^{t}\mathrm{Var}_{\ell}(X_{\ell})$. Let’s set $m=b^{2}$. It follows that with probability $1-\widetilde{\delta}$ for all $t\in\mathbb{N}$

$$ $\displaystyle S_{t}$ $\displaystyle\leq 1.44\sqrt{\max(W_{t},b^{2})\left(1.4\ln\ln\left(2\left(\max \left(\frac{W_{t}}{b^{2}},1\right)\right)\right)+\ln\frac{5.2}{\widetilde{ \delta}}\right)}$ $\displaystyle\qquad+0.41b\left(1.4\ln\ln\left(2\left(\max\left(\frac{W_{t}}{b} ,1\right)\right)\right)+\ln\frac{5.2}{\widetilde{\delta}}\right)$ $\displaystyle\leq 2\sqrt{\max(W_{t},b^{2})\left(2\ln\ln\left(2\left(\max\left( \frac{W_{t}}{b^{2}},1\right)\right)\right)+\ln\frac{6}{\widetilde{\delta}} \right)}$ $\displaystyle\qquad+b\left(2\ln\ln\left(2\left(\max\left(\frac{W_{t}}{b^{2}},1 \right)\right)\right)+\ln\frac{6}{\widetilde{\delta}}\right)$ $\displaystyle=2\max(\sqrt{W_{t}},b)A_{t}+bA_{t}^{2}$ $\displaystyle\leq 2\sqrt{W_{t}}A_{t}+2bA_{t}+bA_{t}^{2}$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}2\sqrt{W_{t}}A_{t}+3bA_{t}^{2 }~{},$ $$

where $A_{t}=\sqrt{2\ln\ln\left(2\left(\max\left(\frac{W_{t}}{b^{2}},1\right)\right)
\right)+\ln\frac{6}{\widetilde{\delta}}}$. Inequality $(i)$ follows because $A_{t}\geq 1$. By identifying $V_{t}=W_{t}$ we conclude that for any $\widetilde{\delta}\in(0,1)$ and $t\in\mathbb{N}$

$$ $\mathbb{P}\left(\sum_{\ell=1}^{t}X_{\ell}>2\sqrt{V_{t}}A_{t}+3bA_{t}^{2}\right )\leq\widetilde{\delta}$ $$

Where $A_{t}=\sqrt{2\ln\ln\left(2\left(\max\left(\frac{V_{t}}{b^{2}},1\right)\right)
\right)+\ln\frac{6}{\widetilde{\delta}}}$. Since $V_{t}\leq tb^{2}$ with probability $1$,

$$ $\frac{V_{t}}{b^{2}}\leq t,$ $$

And therefore $2\ln\ln\left(2\max(\frac{V_{t}}{b^{2}},1)\right)\leq 2\ln\ln 2t$ implying,

$$ $A_{t}\leq\sqrt{2\ln\frac{12\ln t}{\widetilde{\delta}}}$ $$

Thus

$$ $\mathbb{P}\left(\sum_{\ell=1}^{t}X_{\ell}>4\sqrt{V_{t}\ln\frac{12\ln 2t}{ \widetilde{\delta}}}A+6b\ln\frac{12\ln 2t}{\widetilde{\delta}}\right)\leq \widetilde{\delta}$ $$

Since $V_{t}\leq S_{t}$ the result follows.
∎

###### Proposition A.5 .

Let $\delta^{\prime}\in(0,1)$, $\beta\in(0,1]$ and $\{Z_{\ell}\}_{\ell=1}^{\infty}$ be an adapted sequence satisfying $0\leq Z_{\ell}\leq\tilde{B}$ for all $\ell\in\mathbb{N}$. It follows that,

$$ $(1-\beta)\sum_{\ell=1}^{t}\mathbb{E}_{\ell}[Z_{\ell}]-\frac{2\tilde{B}\log(1/ \delta^{\prime})}{\beta}\leq\sum_{\ell=1}^{t}Z_{\ell}\leq(1+\beta)\sum_{\ell=1 }^{t}\mathbb{E}_{\ell}[Z_{\ell}]+\frac{2\tilde{B}\log(1/\delta^{\prime})}{\beta}$ $$

with probability at least $1-2\delta^{\prime}$.

###### Proof.

Consider the martingale difference sequence $X_{t}=Z_{t}-\mathbb{E}_{t}[Z_{t}]$. Notice that $|X_{t}|\leq\tilde{B}$. Using the inequality of Lemma A.1 we obtain for all $\eta\in(0,1/B^{2})$.

$$ $\displaystyle\sum_{\ell=1}^{t}X_{\ell}$ $\displaystyle\leq\eta\sum_{\ell=1}^{t}\mathbb{E}_{\ell}[X_{\ell}^{2}]+\frac{ \log(1/\delta^{\prime})}{\eta}$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}2\eta B^{2}\sum_{\ell=1}^{t} \mathbb{E}_{\ell}[Z_{\ell}]+\frac{\log(1/\delta^{\prime})}{\eta}$ $$

with probability at least $1-\delta^{\prime}$. Inequality $(i)$ holds because $\mathbb{E}_{t}[X_{t}^{2}]\leq B^{2}\mathbb{E}[|X_{t}|]\leq 2B^{2}\mathbb{E}_{t
}[Z_{t}]$ for all $t\in\mathbb{N}$. Setting $\eta=\frac{\beta}{2B^{2}}$ and substituting $\sum_{\ell=1}^{t}X_{\ell}=\sum_{\ell=1}^{t}Z_{\ell}-\mathbb{E}_{\ell}[Z_{\ell}]$,

$$ $\sum_{\ell=1}^{t}Z_{\ell}\leq(1+\beta)\sum_{\ell=1}^{t}\mathbb{E}_{\ell}[Z_{ \ell}]+\frac{2B^{2}\log(1/\delta^{\prime})}{\beta}$ (11) $$

with probability at least $1-\delta^{\prime}$. Now consider the martingale difference sequence $X_{t}^{\prime}=\mathbb{E}[Z_{t}]-Z_{t}$ and notice that $|X_{t}^{\prime}|\leq B^{2}$. Using the inequality of Lemma A.1 we obtain for all $\eta\in(0,1/B^{2})$,

$$ $\displaystyle\sum_{\ell=1}^{t}X^{\prime}_{\ell}$ $\displaystyle\leq\eta\sum_{\ell=1}^{t}\mathbb{E}_{\ell}[(X^{\prime}_{\ell})^{2 }]+\frac{\log(1/\delta^{\prime})}{\eta}$ $\displaystyle\leq 2\eta B^{2}\sum_{\ell=1}^{t}\mathbb{E}_{\ell}[Z_{\ell}]+ \frac{\log(1/\delta^{\prime})}{\eta}$ $$

Setting$\eta=\frac{\beta}{2B^{2}}$ and substituting $\sum_{\ell=1}^{t}X_{\ell}^{\prime}=\sum_{\ell=1}^{t}\mathbb{E}[Z_{\ell}]-Z_{\ell}$ we have,

$$ $(1-\beta)\sum_{\ell=1}^{t}\mathbb{E}[Z_{\ell}]\leq\sum_{\ell=1}^{t}Z_{\ell}+ \frac{2B^{2}\log(1/\delta^{\prime})}{\beta}$ (12) $$

with probability at least $1-\delta^{\prime}$. Combining Equations 11 and 12 and using a union bound yields the desired result.

∎

###### Lemma A.1 (Simplified Freedman’s inequality) .

###### Lemma A.2 (Anytime Freedman) .

###### Proof.

###### Lemma A.3 (Uniform empirical Bernstein bound) .

###### Lemma A.4 (Freedman) .

###### Proof.

###### Proposition A.5 .

###### Proof.

## Appendix B Proofs of Section 3

See 3.1

###### Proof.

Substituting $r_{\ell}=f_{\star}(x_{\ell},a_{\ell})+\xi_{\ell}$ into the definition of $f_{t}$ we obtain the following inequalities,

$$ $\displaystyle\sum_{\ell=1}^{t-1}(f_{t}(x_{\ell},a_{\ell})-r_{\ell})^{2}$ $\displaystyle\leq\sum_{\ell=1}^{t-1}(f_{\star}(x_{\ell},a_{\ell})-r_{\ell})^{2 }=\sum_{\ell=1}^{t-1}\xi_{\ell}^{2}$ $$

substituting again the definition of $r_{\ell}$ on the left hand side of the inequality above and rearranging terms yields,

$$ $\sum_{\ell=1}^{t-1}(f_{t}(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell}))^{2} \leq 2\sum_{\ell=1}^{t-1}\xi_{\ell}\cdot\left(f_{\star}(x_{\ell},a_{\ell})-f_{ t}(x_{\ell},a_{\ell})\right)$ (13) $$

We now focus on bounding the RHS of equation 13.
For any $f\in\mathcal{F}$ let $Z^{f}_{\ell}=\xi_{\ell}\cdot\left(f_{\star}(x_{\ell},a_{\ell})-f(x_{\ell},a_{
\ell})\right)$. The sequence $Z_{t}$ forms a martingale difference sequence such that $\mathbb{E}_{\ell}\left[\left(Z^{f}_{\ell}\right)^{2}\right]=\sigma_{\ell}^{2}
\cdot(f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell}))^{2}$ and Assumption 2.2 implies $|Z_{\ell}^{f}|\leq B^{2}$ for all $\ell\in\mathbb{N}$.

We can use Freedman inequality (see for example Lemma A.2 in Appendix A) to bound this term and show that with probability at least $1-\delta^{\prime}$ for all $t\in\mathbb{N}$,

$$ $\displaystyle\sum_{\ell=1}^{t-1}\xi_{\ell}\cdot\left(f(x_{\ell},a_{\ell})-f_{ \star}(x_{\ell},a_{\ell})\right)$ $\displaystyle\leq\eta\cdot\left(\sum_{\ell=1}^{t-1}\sigma_{\ell}^{2}\cdot\left (f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell})\right)^{2}\right)+\frac{C \log(t/\delta^{\prime})}{\eta}$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}\frac{1}{4}\sum_{\ell=1}^{t-1 }\left(f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell})\right)^{2}+4CB^{2} \log(t/\delta^{\prime}).$ $$

Where inequality $(i)$ follows from setting $\eta=\frac{1}{4B^{2}}$ and noting that $\sigma_{\ell}\leq B^{2}$ for all $\ell$. Finally, setting $\delta^{\prime}=\frac{\delta}{|\mathcal{F}|}$ and considering a union bound over all $f\in\mathcal{F}$ we conclude that,

$$ $\sum_{\ell=1}^{t-1}\xi_{\ell}\cdot\left(f_{\star}(x_{\ell},a_{\ell})-f_{t}(x_{ \ell},a_{\ell})\right)\leq\frac{1}{4}\sum_{\ell=1}^{t-1}\left(f_{t}(x_{\ell},a _{\ell})-f_{\star}(x_{\ell},a_{\ell})\right)^{2}+4CB^{2}\log(t\cdot|\mathcal{F }|/\delta).$ $$

Plugging this inequality into equation 13 and rearranging terms yields,

$$ $\sum_{\ell=1}^{t-1}(f_{t}(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell}))^{2} \leq 4CB^{2}\log(t\cdot|\mathcal{F}|/\delta).$ $$

∎

###### Proof.

## Appendix C Proofs of Section 4

See 4.1

###### Proof.

Given $f\in\mathcal{F}$ we consider a martingale difference sequence $Z_{\ell}^{f}$ for $\ell\in\mathbb{N}$ defined as,

$$ $Z_{\ell}^{f}=\left(f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell})\right) \cdot\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell})\leq\tau)\cdot \mathbf{1}(f\in\mathcal{G}_{\ell})\cdot\xi_{\ell}$ $$

First let’s see that

$$ $|Z_{\ell}^{f}|\leq\min(\tau B,B^{2})\quad\forall\ell\in\mathbb{N}.$ $$

To see this we recognize two cases, first when $f\not\in\mathcal{G}_{\ell}$ in which case $Z_{\ell}^{\tau}=0$. When $f\in\mathcal{G}_{\ell}$, we also recognize two cases. When $\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell})\leq\tau)=0$ the random variable $Z_{\ell}^{f}=0$ . When $f\in\mathcal{G}_{\ell}$, and $\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell})\leq\tau$ , it follows that $|f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell})|\leq\tau$. Finally since $|\xi_{\ell}|\leq B$ we conclude $|Z_{\ell}^{f}|\leq\min(\tau B,B^{2})$.

The conditional variance of the martingale difference sequence$\{Z_{\ell}^{f}\}_{\ell}$ can be upper bounded as

$$ $\displaystyle\mathrm{Var}_{\ell}(Z_{\ell}^{f})$ $\displaystyle=\mathbb{E}_{\ell}[(Z_{\ell}^{f})^{2}]$ $\displaystyle=\sigma_{\ell}^{2}(f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{ \ell}))^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell})\leq\tau) \cdot\mathbf{1}(f\in\mathcal{G}_{\ell})$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}\widetilde{\sigma}^{2}(f(x_{ \ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell}))^{2}\mathbf{1}(\omega(x_{\ell},a_ {\ell},\mathcal{G}_{\ell})\leq\tau)\cdot\mathbf{1}(f\in\mathcal{G}_{\ell})$ $$

where inequality $(i)$ follows because of $\sigma_{\ell}^{2}\leq\widetilde{\sigma}^{2}$.

We now invoke Lemma A.1 applied to the martingale difference sequence $\{Z_{\ell}^{f}\}_{\ell=1}^{t-1}$. In this case $R=\tau B$ and we’ll set $\eta=\frac{1}{\min(\tau B,B^{2})+4\widetilde{\sigma}^{2}}\leq\frac{1}{R}$. Thus,

$$ $\displaystyle\sum_{\ell=1}^{t-1}Z_{\ell}^{f}$ $\displaystyle\leq\frac{1}{\min(\tau B,B^{2})+4\sigma^{2}}\sum_{\ell=1}^{t-1} \widetilde{\sigma}^{2}(f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell}))^{2} \mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell})\leq\tau)\cdot\mathbf{1 }(f\in\mathcal{G}_{\ell})+$ $\displaystyle\quad(\min(\tau B,B^{2})+4\widetilde{\sigma}^{2})\log(|\mathcal{F }|/\widetilde{\delta})$ $\displaystyle\leq\frac{1}{4}\sum_{\ell=1}^{t-1}(f(x_{\ell},a_{\ell})-f_{\star} (x_{\ell},a_{\ell}))^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell} )\leq\tau)\cdot\mathbf{1}(f\in\mathcal{G}_{\ell})+(\min(\tau B,B^{2})+4 \widetilde{\sigma}^{2})\log(|\mathcal{F}|/\widetilde{\delta})$ (14) $$

with probability at least $1-\frac{\widetilde{\delta}}{|\mathcal{F}|}$. A union bound implies the same inequality holds for all $f\in\mathcal{F}$ simultaneously with probability at least $1-\widetilde{\delta}$. Let’s call this event $\mathcal{B}$. We have just shown that $\mathbb{P}(\mathcal{B})\geq 1-\tilde{\delta}$. In particular when $\mathcal{B}$ holds, inequality 14 is also satisfied for $f=f_{t}^{\tau}$. When $\mathcal{E}_{t}$ holds $f_{t}^{\tau}\in\mathcal{G}_{t-1}$ then $\mathbf{1}(f_{t}^{\tau}\in\mathcal{G}_{\ell})=1~{}$ for all(^4^44This is where the definition of $G_{t-1}$ as an intersection of all previous confidence sets is important. The intersection ensures that for any $\tau$ the minimizer of the filtered least squares is achieved at an $f_{t}^{\tau}$ for which the inidicator $\mathbf{1}(f\in\mathcal{G}_{\ell})=1$ is true for all $\ell\leq t-1$.) $\ell\leq t-1$ and therefore,

$$ $\sum_{\ell=1}^{t-1}Z_{\ell}^{f_{t}^{\tau}}=\sum_{\ell=1}^{t-1}\left(f_{t}^{ \tau}(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell})\right)\cdot\xi_{\ell} \cdot\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell})\leq\tau).$ (15) $$

We proceed by subtituting the definition of $r_{\ell}=f_{\star}(x_{\ell},a_{\ell})+\xi_{\ell}$ in equation 2 and noting that when $\mathcal{E}_{t}$ holds $f_{\star}\in\mathcal{G}_{t-1}$, so that $f_{t}^{\tau}$, the minimizer of the uncertainty filtered least squares loss satisfies,

$$ $\displaystyle\sum_{\ell=1}^{t-1}\left(f_{t}^{\tau}(x_{\ell},a_{\ell})-f_{\star }(x_{\ell},a_{\ell})-\xi_{\ell}\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell}, \mathcal{G}_{\ell})\leq\tau)$ $\displaystyle\leq\sum_{\ell=1}^{t-1}\xi_{\ell}^{2}\mathbf{1}(\omega(x_{\ell},a _{\ell},\mathcal{G}_{\ell})\leq\tau)$ $$

expanding the left hand side of the inequality above and rearranging terms yields,

$$ $\displaystyle\sum_{\ell=1}^{t-1}\left(f_{t}^{\tau}(x_{\ell},a_{\ell})-f_{\star }(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G} _{\ell})\leq\tau)\leq 2\sum_{\ell=1}^{t-1}\left(f_{t}^{\tau}(x_{\ell},a_{\ell} )-f_{\star}(x_{\ell},a_{\ell})\right)\cdot\xi_{\ell}\cdot\mathbf{1}(\omega(x_{ \ell},a_{\ell},\mathcal{G}_{\ell})\leq\tau)$ (16) $$

To bound the right hand side of the inequality above we plug inequality 14 and equality 15 into equation 16 we conclude that when $\mathcal{B}\cap\mathcal{E}_{t}$ holds,

$$ $\displaystyle\sum_{\ell=1}^{t-1}\left(f_{t}^{\tau}(x_{\ell},a_{\ell})-f_{\star }(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G} _{\ell})\leq\tau)\leq 2\sum_{\ell=1}^{t-1}\left(f_{t}^{\tau}(x_{\ell},a_{\ell} )-f_{\star}(x_{\ell},a_{\ell})\right)\cdot\xi_{\ell}\cdot\mathbf{1}(\omega(x_{ \ell},a_{\ell},\mathcal{G}_{\ell})\leq\tau)\leq~{}\qquad\qquad\qquad\qquad\qquad$ $\displaystyle\frac{1}{2}\sum_{\ell=1}^{t-1}\left(f_{t}^{\tau}(x_{\ell},a_{\ell })-f_{\star}(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell}, \mathcal{G}_{\ell})\leq\tau)+(2\min(\tau B,B^{2})+8\widetilde{\sigma}^{2})\log (|\mathcal{F}|/\widetilde{\delta})\qquad\qquad\qquad\qquad\qquad\qquad$ $$

rearranging terms we conclude that when $\mathcal{B}\cap\mathcal{E}_{t}$ is satisfied,

$$ $\sum_{\ell=1}^{t-1}\left(f_{t}^{\tau}(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_ {\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell})\leq \tau)\leq(4\min(\tau B,B^{2})+16\widetilde{\sigma}^{2})\log(|\mathcal{F}|/ \widetilde{\delta})$ $$

with probability at least $\mathbb{P}(\mathcal{B}\cap\mathcal{E}_{t})\geq\mathbb{P}(\mathcal{E}_{t})-
\widetilde{\delta}$. This finalizes the result.

∎

###### Proposition C.1 (Intersection Result) .

Let $A,B,C$ be three sets such that,

$$ $\mathbb{P}(A\cap B)\geq\mathbb{P}(A)-\delta_{1},\quad\mathbb{P}(A\cap C)\geq \mathbb{P}(A)-\delta_{2}$ $$

then $\mathbb{P}(A\cap B\cap C)\geq\mathbb{P}(A)-\delta_{1}-\delta_{2}$.

###### Proof.

Notice that $\mathbb{P}(A\cap B)\geq\mathbb{P}(A)-\delta_{1}$ is equivalent to $\mathbb{P}(A\backslash B)\leq\delta_{1}$. Similarly $\mathbb{P}(A\cap C)\geq\mathbb{P}(A)-\delta_{2}$ is equivalent to $\mathbb{P}(A\backslash C)\leq\delta_{2}$. Therefore,

$$ $\mathbb{P}(A\backslash[B\cap C])\leq\mathbb{P}(A\backslash B)+\mathbb{P}(A \backslash C)\leq\delta_{1}+\delta_{2}.$ $$

Finally, this is equivalent to the statement $\mathbb{P}(A\cap B\cap C)\geq\mathbb{P}(A)-\delta_{1}-\delta_{2}$.

∎

See 4.2

###### Proof.

Applying the results of Proposition 4.1 setting $\widetilde{\delta}=\frac{\delta}{4(i+1)^{2}t^{2}}$, $\tau=\tau_{i}$ for $i\in\{1,\cdots,\lceil\log(t)\rceil\}$ and $\widetilde{\sigma}=\sigma$ we conclude that when $\mathcal{E}_{t}$ holds,

$$ $f_{\star}\in\left\{f\in\mathcal{F}:\sum_{\ell=1}^{t-1}\left(f_{t}^{\tau}(x_{ \ell},a_{\ell})-f(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{ \ell},\mathcal{G}_{\ell})\leq\tau_{i})\leq\beta_{t}\left(\tau_{i},\frac{\delta }{4(i+1)^{2}t^{2}},\sigma^{2}\right)\right\}$ $$

with probability at least $\mathbb{P}(\mathcal{E}_{t})-\frac{\delta}{2(i+1)^{2}t^{2}}$. Recall that

$$ $\mathcal{G}_{t}(\tau_{i})=\left\{f\in\mathcal{F}:\sum_{\ell=1}^{t-1}\left(f_{t }^{\tau}(x_{\ell},a_{\ell})-f(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x _{\ell},a_{\ell},\mathcal{G}_{\ell})\leq\tau_{i})\leq\beta_{t}\left(\tau_{i}, \frac{\delta}{4(i+1)^{2}t^{2}},\sigma^{2}\right)\right\}\cap\mathcal{G}_{t-1}( \tau_{i})$ $$

Thus, we conclude that $f_{\star}\in\mathcal{G}_{t}(\tau_{i})$ with probability at least $\mathbb{P}(\mathcal{E}_{t})-\frac{\delta}{4(i+1)^{2}t^{2}}$. Proposition C.1 and a union bound over all $i\in\{0\}\cup[q_{t}]$ we conclude that $f_{\star}\in\mathcal{G}_{t}$ for all $t\in\mathbb{N}$ with probability at least $\mathbb{P}(\mathcal{E}_{t})-\frac{\delta}{2t^{2}}$. And therefore $\mathbb{P}(\mathcal{E}_{t+1})\geq\mathbb{P}(\mathcal{E}_{t})-\frac{\delta}{2t2}$. Finally, since $\mathbb{P}(\mathcal{E}_{1})=1$ we conclude that $\mathbb{P}(\cap_{t=1}^{\infty}\mathcal{E}_{t})\geq 1-\delta$.

Optimism is an immediate consequence of the previous result. When $f_{\star}\in\mathcal{G}_{t}$, it follows that $f_{\star}(x_{t},a)\leq\max_{f\in\mathcal{G}_{t},a^{\prime}\in\mathcal{A}}f(x_{
t},a^{\prime})=U_{t}(x_{t},a_{t})$ for any $a\in\mathcal{A}$. And therefore $\max_{a\in\mathcal{A}}f_{\star}(x_{t},a)\leq U_{t}(x_{t},a_{t})$.

∎

###### Proof.

###### Proposition C.1 (Intersection Result) .

###### Proof.

###### Proof.

## Appendix D Proofs of Section 5

In this section we list the proofs of Section 5. These are split in two subsections. In Section D.1 we present the proofs of Section 5.1. In Section D.3 we present the proofs of Section 5.3.

### D.1 Proofs of Section 5.1

See 5.1

###### Proof.

Substituting $y_{\ell}=f_{\star}(x_{\ell},a_{\ell})+\xi_{\ell}$ into the definition of $f_{t}$ we obtain the following inequalities,

$$ $\displaystyle\sum_{\ell=1}^{t-1}b_{\ell}\cdot(f^{\mathbf{b}_{t}}_{t}(x_{\ell}, a_{\ell})-y_{\ell})^{2}$ $\displaystyle\leq\sum_{\ell=1}^{t-1}b_{\ell}\cdot(f_{\star}(x_{\ell},a_{\ell}) -y_{\ell})^{2}=\sum_{\ell=1}^{t-1}b_{\ell}\cdot\xi_{\ell}^{2}$ $$

substituting again the definition of $y_{\ell}$ on the left hand side of the inequality above and rearranging terms yields,

$$ $\sum_{\ell=1}^{t-1}b_{\ell}\cdot(f_{t}^{\mathbf{b}_{t}}(x_{\ell},a_{\ell})-f_{ \star}(x_{\ell},a_{\ell}))^{2}\leq 2\sum_{\ell=1}^{t-1}\xi_{\ell}\cdot b_{\ell }\cdot\left(f_{\star}(x_{\ell},a_{\ell})-f^{\mathbf{b}_{t}}_{t}(x_{\ell},a_{ \ell})\right)$ (17) $$

We now focus on bounding the RHS of equation 17.
For any $f\in\mathcal{F}$ let $Z^{f}_{\ell}=\xi_{\ell}\cdot b_{\ell}\cdot\left(f_{\star}(x_{\ell},a_{\ell})-f
(x_{\ell},a_{\ell})\right)$. The sequence $Z_{t}$ forms a martingale difference sequence such that $\mathbb{E}_{\ell}\left[\left(Z^{f}_{\ell}\right)^{2}\right]=\sigma_{\ell}^{2}
\cdot b_{\ell}\cdot(f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell}))^{2}$ and Assumption 2.2 implies $|Z_{\ell}^{f}|\leq B^{2}$ for all $\ell\in\mathbb{N}$.

We can use a two sided version of Freedman inequality (see for example Lemma A.1 in Appendix A) to bound this term and show that with probability at least $1-\delta^{\prime}$ ,

$$ $\displaystyle\left|\sum_{\ell=1}^{t-1}\xi_{\ell}\cdot b_{\ell}\cdot\left(f(x_{ \ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell})\right)\right|$ $\displaystyle\leq\eta\cdot\left(\sum_{\ell=1}^{t-1}\sigma_{\ell}^{2}\cdot b_{ \ell}\cdot\left(f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell})\right)^{2} \right)+\frac{\log(2/\delta^{\prime})}{\eta}$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}\frac{1}{4}\sum_{\ell=1}^{t-1 }b_{\ell}\cdot\left(f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell})\right)^{ 2}+4B^{2}\log(2/\delta^{\prime}).$ $$

Where inequality $(i)$ follows from setting $\eta=\frac{1}{4B^{2}}$ and noting that $\sigma_{\ell}\leq B^{2}$ for all $\ell$. Finally, setting $\delta^{\prime}=\frac{\tilde{\delta}}{|\mathcal{F}|}$ and considering a union bound over all $f\in\mathcal{F}$ we conclude that,

$$ $\left|\sum_{\ell=1}^{t-1}\xi_{\ell}\cdot b_{\ell}\cdot\left(f_{\star}(x_{\ell} ,a_{\ell})-f_{t}^{\mathbf{b}_{t}}(x_{\ell},a_{\ell})\right)\right|\leq\frac{1} {4}\sum_{\ell=1}^{t-1}b_{\ell}\cdot\left(f_{t}^{\mathbf{b}_{t}}(x_{\ell},a_{ \ell})-f_{\star}(x_{\ell},a_{\ell})\right)^{2}+4B^{2}\log(2|\mathcal{F}|/ \tilde{\delta}).$ (18) $$

Plugging this inequality into equation 13 and rearranging terms yields,

$$ $\sum_{\ell=1}^{t-1}b_{\ell}\cdot\left(f_{t}^{\mathbf{b}_{t}}(x_{\ell},a_{\ell} )-f_{\star}(x_{\ell},a_{\ell})\right)^{2}\leq 8B^{2}\log(2|\mathcal{F}|/\tilde {\delta}).$ (19) $$

Moreover, combining equations 18 and 19,

$$ $\left|\sum_{\ell=1}^{t-1}\xi_{\ell}\cdot b_{\ell}\cdot\left(f_{\star}(x_{\ell} ,a_{\ell})-f_{t}^{\mathbf{b}_{t}}(x_{\ell},a_{\ell})\right)\right|\leq 6B^{2} \log(2|\mathcal{F}|/\tilde{\delta}).$ $$

∎

See 5.2

###### Proof.

This result follows the same template of the proof of Lemma 3.1 which we reproduce here.
Substituting $r_{\ell}=f_{\star}(x_{\ell},a_{\ell})+\xi_{\ell}$ in the definition of $W_{t}^{\mathbf{b}_{t}}$,

$$ $\displaystyle W_{t}^{\mathbf{b}_{t}}$ $\displaystyle=\sum_{\ell=1}^{t-1}b_{\ell}\cdot(f_{\star}(x_{\ell},a_{\ell})+ \xi_{t}-f_{t}^{\mathbf{b}_{t}}(x_{\ell},a_{\ell}))^{2}$ $\displaystyle=\sum_{\ell=1}^{t-1}b_{\ell}\cdot(f_{\star}(x_{\ell},a_{\ell})-f_ {t}^{\mathbf{b}_{t}}(x_{\ell},a_{\ell}))^{2}+2\sum_{\ell=1}^{t-1}b_{\ell}\cdot \xi_{\ell}\cdot(f_{\star}(x_{\ell},a_{\ell})-f_{t}^{\mathbf{b}_{t}}(x_{\ell},a _{\ell}))+\sum_{\ell=1}^{t-1}b_{\ell}\cdot\xi_{\ell}^{2}.$ $$

Applying Lemma 5.1 we conclude that,

$$ $W_{t}^{\mathbf{b}_{t}}-12B^{2}\log(4|\mathcal{F}|/\tilde{\delta})\leq\sum_{ \ell=1}^{t-1}b_{\ell}\cdot\xi_{\ell}^{2}\leq W_{t}^{\mathbf{b}_{t}}+20B^{2} \log(4|\mathcal{F}|/\tilde{\delta}).$ (20) $$

with probability at least $1-\tilde{\delta}/2$. Using Proposition A.5 setting $\beta=1/2$ and $\tilde{B}=B^{2}$ and $Z_{\ell}=b_{\ell}\cdot\xi_{\ell}^{2}$,

$$ $\frac{1}{2}\sum_{\ell=1}^{t-1}b_{\ell}\cdot\sigma_{\ell}^{2}-4B^{2}\log(2/ \tilde{\delta})\leq\sum_{\ell=1}^{t-1}b_{\ell}\cdot\xi_{\ell}^{2}\leq\frac{3}{ 2}\sum_{\ell=1}^{t-1}b_{\ell}\cdot\sigma_{\ell}^{2}+4B^{2}\log(2/\tilde{\delta})$ (21) $$

with probability at least $1-\tilde{\delta}/2$. Combining equations 20 and 21 with a union bound we conclude,

$$ $\frac{2}{3}\cdot W_{t}^{\mathbf{b}_{t}}-8B^{2}\log(4|\mathcal{F}|/\tilde{ \delta})-\frac{8}{3}\cdot B^{2}\log(2/\tilde{\delta})\leq\sum_{\ell=1}^{t-1}b_ {\ell}\cdot\sigma_{\ell}^{2}\leq 2W_{t}^{\mathbf{b}_{t}}+40B^{2}\log(4| \mathcal{F}|/\tilde{\delta})+8B^{2}\log(2/\tilde{\delta})$ $$

with probability at least $1-\tilde{\delta}$. Thus,

$$ $\frac{2}{3}\cdot W_{t}^{\mathbf{b}_{t}}-11B^{2}\log(4|\mathcal{F}|/\tilde{ \delta})\leq\sum_{\ell=1}^{t-1}b_{\ell}\cdot\sigma_{\ell}^{2}\leq 2W_{t}^{ \mathbf{b}_{t}}+48B^{2}\log(4|\mathcal{F}|/\tilde{\delta})$ $$

with probability at least $1-\tilde{\delta}$.

∎

###### Proof.

###### Proof.

### D.2 Proofs of Section 5.2

See 5.6

###### Proof.

The analysis of the regret of Algorithm 2 follows the typical analysis for optimistic algorithms. When $\bar{\mathcal{E}}$ holds optimism implies,

$$ $\displaystyle\mathrm{Regret}(T)$ $\displaystyle\leq\sum_{t=1}^{T}\omega(x_{t},a_{t},\mathcal{G}_{t})$ $$

In order to bound the right hand side of the inequality above, we split it in $\lceil\log(T)\rceil$ epochs $\mathcal{T}_{j}$ such that $\mathcal{T}_{j}=[2^{j-1}+1,\cdots,\min(2^{j},T)]$.

$$ $\displaystyle\sum_{t=1}^{T}\omega(x_{t},a_{t},\mathcal{G}_{t})\leq\sum_{j=1}^{ \lceil\log(T)\rceil}\sum_{t\in\mathcal{T}_{j}}\omega(x_{t},a_{t},\mathcal{G}_{ t})$ $$

We proceed to bound the sums $\sum_{t\in\mathcal{T}_{j}}\omega(x_{t},a_{t},\mathcal{G}_{t})$ for all epochs $\mathcal{T}_{i}$. When $\bar{\mathcal{E}}$ holds, and $t\in\mathcal{T}_{j}$ for some $j\in\lceil\log(T)\rceil$, it follows that if $f,f^{\prime}\in G_{t}$ then for each threshold level $i\in\{0\}\cup[q_{t}]$,

$$ $\displaystyle\sum_{\ell\in\mathcal{T}_{j}\cap[t-1]}\left(f(x_{\ell},a_{\ell})- f^{\prime}(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell}, \mathcal{G}_{\ell})\leq\tau_{i})$ $\displaystyle\leq\sum_{\ell=1}^{t-1}\left(f(x_{\ell},a_{\ell})-f^{\prime}(x_{ \ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{ \ell})\leq\tau_{i})$ $\displaystyle\leq\beta_{t}\left(\tau_{i},\frac{\delta}{2(i+1)^{2}},\widehat{ \sigma}_{t}^{2}\right)$ $\displaystyle\leq\beta_{t}\left(\tau_{i},\frac{\delta}{2(i+1)^{2}},\widehat{ \sigma}_{\min(\mathcal{T}_{j})}^{2}\right)$ $\displaystyle=(4\min(\tau_{i}B,B^{2})+16\widehat{\sigma}_{\min(\mathcal{T}_{j} )}^{2})\log(t|\mathcal{F}|/\tilde{\delta})$ $\displaystyle\leq\mathcal{O}\left(\min(\tau_{i}B,B^{2})+\sigma^{2}+\frac{B^{2} \log(t|\mathcal{F}|/\delta)\cdot\log(t|\mathcal{F}|/\tilde{\delta})}{t}\right)$ $$

where the last inequality follows from noting that equation 6 implies $\widehat{\sigma}_{\min(\mathcal{T}_{j})}^{2}=\mathcal{O}\left(\sigma^{2}+\frac
{B^{2}\log(t|\mathcal{F}|/\delta)}{t}\right)$.

Thus the same argument as in the proof of Lemma 4.3 implies that when $\bar{\mathcal{E}}$ holds, for $\tau\geq\tau_{\max(\mathcal{T}_{j})}$,

$$ $\sum_{t\in\mathcal{T}_{j}}\mathbf{1}(\omega(x_{t},a_{t},\mathcal{G}_{t})>\tau) \leq\mathcal{O}\left(d_{\mathrm{eluder}}(\mathcal{F},\tau)\left(\frac{B\log(T| \mathcal{F}|/\delta)}{\tau}+\frac{\sigma^{2}\log(T|\mathcal{F}|/\delta)}{\tau^ {2}}+\frac{B^{2}\log^{2}(T|\mathcal{F}|/\delta)}{\tau^{2}\max(\mathcal{T}_{j}) }+1\right)\right).$ $$

in particular, for each $t\in\mathcal{T}_{j}$,

$$ $\displaystyle\sum_{\ell=\min(\mathcal{T}_{j})}^{t}\mathbf{1}(\omega(x_{\ell},a _{\ell},\mathcal{G}_{\ell})>\tau)$ $\displaystyle\leq\mathcal{O}\left(d_{\mathrm{eluder}}(\mathcal{F},\tau)\left( \frac{B\log(T|\mathcal{F}|/\delta)}{\tau}+\frac{\sigma^{2}\log(T|\mathcal{F}|/ \delta)}{\tau^{2}}+\frac{B^{2}\log^{2}(T|\mathcal{F}|/\delta)}{\tau^{2}(t-\min (\mathcal{T}_{j})+1)}\right)\right)$ (22) $$

For the remainder of the argument we will mimic the proof of Lemma 4.4. We’ll use the notation $d=d_{\mathrm{eluder}}(\mathcal{F},\frac{B}{T})$ and $\omega_{t}=\omega(x_{t},a_{t},\mathcal{G}_{t})$. We will first order the sequence $\{w_{t}\}_{t=1}^{T}$ in descending order, as $w_{i_{1}},\cdots,w_{i_{T}}$. We have,

$$ $\displaystyle\sum_{t=\min(\mathcal{T}_{j})}^{\max(\mathcal{T}_{j})}\omega_{t}$ $\displaystyle=\sum_{t=\min(\mathcal{T}_{j})}^{\max(\mathcal{T}_{j})}\omega_{i_ {t}}=\sum_{t=^{\min(\mathcal{T}_{j})}}^{\max(\mathcal{T}_{j})}w_{i_{t}}\mathbf {1}(w_{i_{t}}>\frac{B}{T})+\sum_{t=\min(\mathcal{T}_{j})}^{\max(\mathcal{T}_{j })}w_{i_{t}}\mathbf{1}(w_{i_{t}}\leq\frac{B}{T})$ $\displaystyle\leq\frac{B|\mathcal{T}_{j}|}{T}+\sum_{t=\min(\mathcal{T}_{j})}^{ \max(\mathcal{T}_{j})}\omega_{i_{t}}\mathbf{1}(w_{i_{t}}>\frac{B}{T})$ $$

Applying inequality 22 setting $\tau=\omega_{i_{t}}>\frac{B}{T}$ we have that,

$$ $\displaystyle t-\min(\mathcal{T}_{j})+1$ $\displaystyle\leq\sum_{\ell=\min(\mathcal{T}_{j})}^{t}\mathbf{1}(\omega(x_{ \ell},a_{\ell},\mathcal{G}_{\ell})>\omega_{i_{t}})$ $\displaystyle\leq\mathcal{O}\left(d_{\mathrm{eluder}}(\mathcal{F},\tau)\left( \frac{B\log(T|\mathcal{F}|/\delta)}{\omega_{i_{t}}}+\frac{\sigma^{2}\log(T| \mathcal{F}|/\delta)}{\omega_{i_{t}}^{2}}+\frac{B^{2}\log^{2}(T|\mathcal{F}|/ \delta)}{\omega_{i_{t}}^{2}t-\min(\mathcal{T}_{j})+1)}\right)\right)$ $$

Therefore,

$$ $\displaystyle t-\min(\mathcal{T}_{j})+1$ $\displaystyle\leq\mathcal{O}\left(d_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T| \mathcal{F}|/\delta)\cdot\max\left(\frac{B}{\omega_{i_{t}}},\frac{\sigma^{2}}{ \omega^{2}_{i_{t}}},\frac{B}{\sqrt{d_{\mathrm{eluder}}(\mathcal{F},B/T)}\omega _{i_{t}}}\right)\right)$ $\displaystyle\leq\mathcal{O}\left(d_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T| \mathcal{F}|/\delta)\cdot\max\left(\frac{B}{\omega_{i_{t}}},\frac{\sigma^{2}}{ \omega^{2}_{i_{t}}}\right)\right).$ $$

Thus, for all $t\in\mathcal{T}_{j}$ it follows that,

$$ $\omega_{i_{t}}\leq\mathcal{O}\left(d_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T| \mathcal{F}|/\delta)\cdot\frac{B}{t-\min(\mathcal{T}_{j})+1}+\sigma\sqrt{\frac {d_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T|\mathcal{F}|/\delta)}{t-\min( \mathcal{T}_{j})+1}}\right)$ $$

Finally, we can use this formula to sum over all $t\in\mathcal{T}_{j}$ for any given $j$,

$$ $\sum_{t\in\mathcal{T}_{j}}\omega_{t}\leq\mathcal{O}\left(Bd_{\mathrm{eluder}}( \mathcal{F},B/T)\log(|\mathcal{T}_{j}|)\log(T|\mathcal{F}|/\delta)+\sigma\sqrt {d_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T|\mathcal{F}|/\delta)|\mathcal{T}_{ j}|}\right)$ $$

finally, summing over all $j\in\lceil\log(T)\rceil$ we conclude,

$$ $\displaystyle\sum_{t=1}^{T}\omega_{t}$ $\displaystyle\leq\mathcal{O}\left(\sum_{j=1}^{\lceil\log(T)\rceil}Bd_{\mathrm{ eluder}}(\mathcal{F},B/T)\log(|\mathcal{T}_{j}|)\log(T|\mathcal{F}|/\delta)+ \sigma\sqrt{d_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T|\mathcal{F}|/\delta)| \mathcal{T}_{j}|}\right)$ $\displaystyle\leq\mathcal{O}\left(Bd_{\mathrm{eluder}}(\mathcal{F},B/T)\log^{2 }(T)\log(T|\mathcal{F}|/\delta)+\sigma\sqrt{d_{\mathrm{eluder}}(\mathcal{F},B/ T)\log(T|\mathcal{F}|/\delta)T}\right)$ $$

∎

###### Proof.

### D.3 Proofs of Section 5.3

See 5.7

###### Proof.

Given $f\in\mathcal{F}$ we consider a martingale difference sequence $Z_{\ell}^{f}$ for $\ell\in\mathbb{N}$ defined as,

$$ $Z_{\ell}^{f}=\left(f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell})\right) \cdot\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}^{\prime}_{\ell})\in(\tau, 2\tau])\cdot\mathbf{1}(f\in\mathcal{G}^{\prime}_{\ell})\cdot\xi_{\ell}$ $$

First let’s see that

$$ $|Z_{\ell}^{f}|\leq\min(2\tau B,B^{2})\quad\forall\ell\in\mathbb{N}.$ $$

To see this we recognize two cases, first when $f\not\in\mathcal{G}_{\ell}^{\prime}$ in which case $Z_{\ell}^{\tau}=0$. When $f\in\mathcal{G}_{\ell}^{\prime}$, we also recognize two cases. When $\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell}^{\prime})\in(\tau,2\tau
])=0$ the random variable $Z_{\ell}^{f}=0$. When $f\in\mathcal{G}_{\ell}^{\prime}$, and $\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell}^{\prime})\leq 2\tau$, it follows that $|f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell})|\leq 2\tau$. Finally since $|\xi_{\ell}|\leq B$ we conclude $|Z_{\ell}^{f}|\leq\min(2\tau B,B^{2})$.

The conditional variance of the martingale difference sequence $\{Z_{\ell}^{f}\}_{\ell}$ is upper bounded as

$$ $\displaystyle\mathrm{Var}_{\ell}(Z_{\ell}^{f})$ $\displaystyle=\mathbb{E}_{\ell}[(Z_{\ell}^{f})^{2}]$ $\displaystyle=\sigma_{\ell}^{2}(f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{ \ell}))^{2}\cdot\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}^{\prime}_{\ell })\in(\tau,2\tau])\cdot\mathbf{1}(f\in\mathcal{G}^{\prime}_{\ell})$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}4\tau^{2}\sigma_{\ell}^{2} \mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}^{\prime}_{\ell})\in(\tau,2\tau ])\cdot\mathbf{1}(f\in\mathcal{G}^{\prime}_{\ell})$ $$

where inequality $(i)$ holds because $(f(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell}))^{2}\cdot\mathbf{1}(\omega(
x_{\ell},a_{\ell},\mathcal{G}^{\prime}_{\ell})\in(\tau,2\tau])\cdot\mathbf{1}(
f\in\mathcal{G}^{\prime}_{\ell})\leq 4\tau^{2}$. Let $\tilde{\delta}_{t}=\frac{\tilde{\delta}}{4t^{2}}$. We now invoke Lemma A.4 applied to the martingale difference sequence $\{Z_{\ell}^{f}\}$. We conclude that,

$$ $\sum_{\ell=1}^{t^{\prime}-1}Z_{\ell}^{f}\leq 8\tau\sqrt{\sum_{\ell=1}^{t^{ \prime}-1}\sigma_{\ell}^{2}\cdot\mathbf{1}\left(\omega(x_{\ell},a_{\ell}, \mathcal{G}^{\prime}_{\ell})\in[\tau,2\tau)\right)\cdot\mathbf{1}(f\in\mathcal {G}^{\prime}_{\ell})\cdot\ln\frac{12|\mathcal{F}|\ln 2t^{\prime}}{\tilde{ \delta}_{t}}}+12\tau B\ln\frac{12|\mathcal{F}|\ln 2t^{\prime}}{\tilde{\delta}}$ (23) $$

with probability at least $1-\frac{\widetilde{\delta}_{t}}{|\mathcal{F}|}$ for all $t^{\prime}\in\mathbb{N}$.
A union bound implies the same inequality holds for $t^{\prime}=t$ and for all $f\in\mathcal{F}$ simultaneously with probability at least $1-\widetilde{\delta}_{t}$. Let’s call this event $\mathcal{B}_{t}$ so that $\mathbb{P}\left(\mathcal{B}_{t}\right)\geq 1-\tilde{\delta}$. We have just shown that $\mathbb{P}(\mathcal{B}_{t})\geq 1-\tilde{\delta}_{t}$. In particular when $\mathcal{B}_{t}$ holds, inequality 23 is also satisfied for $t^{\prime}=t$ and $f=f_{t}^{(\tau,2\tau]}$. When $\mathcal{E}_{t}^{\prime}$ holds we have $f_{t}^{(\tau,2\tau]}\in\mathcal{G}_{t-1}^{\prime}$ then $\mathbf{1}(f_{t}^{(\tau,2\tau]}\in\mathcal{G}_{\ell}^{\prime})=1~{}$ for all(^5^55This is where the definition of $\mathcal{G}_{t}$ as an intersection of all confidence sets becomes important. The intersection ensures that for any $\tau$ the minimizer of the filtered least squares is achieved at an $f_{t}^{\tau}$ for which the inidicator $\mathbf{1}(f\in\mathcal{G}_{\ell})=1$ is true for all $\ell\leq t-1$.) $\ell\leq t-1$ and therefore,

$$ $\sum_{\ell=1}^{t-1}Z_{\ell}^{f_{t}^{(\tau,2\tau]}}=\sum_{\ell=1}^{t-1}\left(f_ {t}^{(\tau,2\tau]}(x_{\ell},a_{\ell})-f_{\star}(x_{\ell},a_{\ell})\right)\cdot \xi_{\ell}\cdot\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell}^{\prime} )\in(\tau,2\tau]).$ (24) $$

We proceed by subtituting the definition of $r_{\ell}=f_{\star}(x_{\ell},a_{\ell})+\xi_{\ell}$ in equation 2 and noting that when $\widetilde{\mathcal{E}}_{t}^{\prime}$ holds $f_{\star}\in\mathcal{G}_{t-1}^{\prime}$, so that $f_{t}^{(\tau,2\tau]}$, the minimizer of the uncertainty-filtered empirical least squares loss satisfies,

$$ $\displaystyle\sum_{\ell=1}^{t-1}\left(f_{t}^{(\tau,2\tau]}(x_{\ell},a_{\ell})- f_{\star}(x_{\ell},a_{\ell})-\xi_{\ell}\right)^{2}\mathbf{1}(\omega(x_{\ell},a _{\ell},\mathcal{G}_{\ell}^{\prime})\in(\tau,2\tau])$ $\displaystyle\leq\sum_{\ell=1}^{t-1}\xi_{\ell}^{2}\mathbf{1}(\omega(x_{\ell},a _{\ell},\mathcal{G}_{\ell}^{\prime})\in(\tau,2\tau])$ $$

expanding the left hand side of the inequality above and rearranging terms yields,

$$ $\displaystyle\sum_{\ell=1}^{t-1}\left(f_{t}^{(\tau,2\tau]}(x_{\ell},a_{\ell})- f_{\star}(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell}, \mathcal{G}_{\ell}^{\prime})\in(\tau,2\tau])\qquad\qquad\qquad\qquad\qquad\qquad$ $\displaystyle\leq 2\sum_{\ell=1}^{t-1}\left(f_{t}^{(\tau,2\tau]}(x_{\ell},a_{ \ell})-f_{\star}(x_{\ell},a_{\ell})\right)\cdot\xi_{\ell}\cdot\mathbf{1}( \omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell}^{\prime})\in(\tau,2\tau])$ (25) $$

To bound the right hand side of the inequality above we plug inequality 23 (setting $t^{\prime}=t$) into equation 25 to conclude that when $\mathcal{B}_{t}\cap\widetilde{\mathcal{E}}_{t}^{\prime}$ holds,

$$ $\displaystyle\sum_{\ell=1}^{t-1}\left(f_{t}^{(\tau,2\tau]}(x_{\ell},a_{\ell})- f_{\star}(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell}, \mathcal{G}^{\prime}_{\ell})\in(\tau,2\tau])$ $\displaystyle\leq 2\sum_{\ell=1}^{t-1}\left(f_{t}^{(\tau,2\tau]}(x_{\ell},a_{ \ell})-f_{\star}(x_{\ell},a_{\ell})\right)\cdot\xi_{\ell}\cdot\mathbf{1}( \omega(x_{\ell},a_{\ell},\mathcal{G}^{\prime}_{\ell})\in(\tau,2\tau])$ $\displaystyle\leq 16\tau\sqrt{\sum_{\ell=1}^{t-1}\sigma_{\ell}^{2}\cdot\mathbf {1}\left(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell}^{\prime})\in(\tau,2\tau] \right)\cdot\ln\frac{12|\mathcal{F}|\ln 2t}{\tilde{\delta}_{t}}}+$ $\displaystyle\quad 24\tau B\ln\frac{12|\mathcal{F}|\ln 2t}{\tilde{\delta}_{t}}$ $$

We will call Corollary 5.3 setting $\delta^{\prime}=\tilde{\delta}_{t}$ and the filtering indicator variables equal to $b^{\tau}_{\ell}=\mathbf{1}\left(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell}^{
\prime})\in(\tau,2\tau]\right)$.
Let’s call $\mathcal{C}_{t}$ denote the event that

$$ $\frac{2}{3}\cdot W_{t^{\prime}}^{\mathbf{b}^{\tau}_{t^{\prime}}}-C\cdot B^{2} \log(t^{\prime}|\mathcal{F}|/\tilde{\delta}_{t})\leq\widebar{W}_{t^{\prime}}^{ \mathbf{b}^{\tau}_{t^{\prime}}}:=\sum_{\ell=1}^{t^{\prime}-1}\sigma_{\ell}^{2} \cdot\mathbf{1}\left(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell}^{\prime})\in( \tau,2\tau]\right)\leq 2W_{t^{\prime}}^{\mathbf{b}^{\tau}_{t^{\prime}}}+C\cdot B ^{2}\log(t^{\prime}|\mathcal{F}|/\tilde{\delta}_{t})$ (26) $$

for all $t^{\prime}\in\mathbb{N}$ (and in particular true for $t^{\prime}=t$) so that $\mathbb{P}\left(\mathcal{C}_{t}\right)\geq 1-\tilde{\delta}_{t}$. We conclude that for any $t\in\mathbb{N}$ when $\mathcal{B}_{t}\cap\mathcal{C}_{t}\cap\widetilde{\mathcal{E}}_{t}^{\prime}$,

$$ $\displaystyle\sum_{\ell=1}^{t-1}\left(f_{t}^{\tau}(x_{\ell},a_{\ell})-f_{\star }(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G} _{\ell}^{\prime})\in(\tau,2\tau])$ $\displaystyle\leq 16\tau\sqrt{\left(2W_{t}^{\mathbf{b}^{\tau}_{t}}+C\cdot B^{2 }\log(t|\mathcal{F}|/\tilde{\delta})\right)\cdot\ln\frac{12|\mathcal{F}|\ln 2t }{\tilde{\delta}_{t}}}+$ $\displaystyle\quad 24\tau B\ln\frac{12|\mathcal{F}|\ln 2t}{\tilde{\delta}_{t}}$ $\displaystyle=\mathcal{O}\left(\tau\sqrt{W_{t}^{\mathbf{b}^{\tau}_{t}}\log \left(t|\mathcal{F}|/\tilde{\delta}\right)}+\tau B\log\left(t|\mathcal{F}|/ \tilde{\delta}_{t}\right)\right)$ $\displaystyle=C^{\prime}\tau\sqrt{W_{t}^{\mathbf{b}^{\tau}_{t}}\log\left(t| \mathcal{F}|/\tilde{\delta}\right)}+C^{\prime}\tau B\log\left(t|\mathcal{F}|/ \tilde{\delta}_{t}\right)$ $$

for some universal constant $C^{\prime}>0$ (independent of $t$). Similarly, as a consequence of the LHS of equation 26, for all $t$ when $\mathcal{B}_{t}\cap\mathcal{C}_{t}\cap\widetilde{\mathcal{E}}_{t}^{\prime}$ holds,

$$ $C^{\prime}\tau\sqrt{W_{t}^{\mathbf{b}^{\tau}_{t}}\log\left(t|\mathcal{F}|/ \tilde{\delta}\right)}+C^{\prime}\tau B\log\left(t|\mathcal{F}|/\tilde{\delta} \right)\leq C^{{}^{\prime\prime}}\tau\sqrt{\widebar{W}_{t}^{\mathbf{b}^{\tau}_ {t}}\log\left(t|\mathcal{F}|/\tilde{\delta}\right)}+C^{{}^{\prime\prime}}\tau B \log\left(t|\mathcal{F}|/\tilde{\delta}\right)$ $$

for some universal constant $C^{{}^{\prime\prime}}>0$ (independent of $t$). We finalize the result by noting that $\mathcal{B}_{t}\cap\mathcal{C}_{t}\cap\widetilde{\mathcal{E}}_{t}^{\prime}
\subseteq\mathcal{W}_{t}(\tau)\cap\widetilde{\mathcal{E}}_{t}^{\prime}$ and that $\mathbb{P}(\mathcal{B}_{t}\cap\mathcal{C}_{t}\cap\widetilde{\mathcal{E}}_{t}^{
\prime})\geq\mathbb{P}(\widetilde{\mathcal{E}}_{t}^{\prime})-2\widetilde{
\delta}_{t}=\mathbb{P}(\widetilde{\mathcal{E}}_{t}^{\prime})-\frac{\tilde{
\delta}}{2t^{2}}$ and therefore that $\mathcal{P}(\mathcal{W}_{t}(\tau)\cap\widetilde{\mathcal{E}}_{t}^{\prime})\geq
\mathbb{P}(\mathcal{B}_{t}\cap\mathcal{C}_{t}\cap\widetilde{\mathcal{E}}_{t}^{
\prime})\geq\mathbb{P}(\widetilde{\mathcal{E}}_{t}^{\prime})-2\widetilde{
\delta}_{t}=\mathbb{P}(\widetilde{\mathcal{E}}_{t}^{\prime})-\frac{\tilde{
\delta}}{2t^{2}}$. Finally, this implies $\mathbb{P}(\widetilde{\mathcal{E}}_{t}^{\prime}\cap\left(\mathcal{W}_{t}(\tau)
\right)^{c})\leq\frac{\tilde{\delta}}{2t^{2}}$.
∎

See 5.8

###### Proof.

Applying Proposition 5.7 with $\widetilde{\mathcal{E}}_{t}^{\prime}=\mathcal{E}_{t}$, $\tau=\tau_{i}$ and $\tilde{\delta}=\frac{\delta}{2i^{2}}$ we conclude that for any $i\in[q_{t}]$, the event $\mathcal{W}_{t}(\tau_{i})$ satisfies $\mathbb{P}(\left(\mathcal{W}_{t}(\tau_{i})\right)^{c}\cap\mathcal{E}_{t}^{
\prime})\leq\frac{\delta}{4i^{2}t^{2}}$. A union bound over all $i\in[q_{t}]$, we conclude that events $\{\mathcal{W}_{t}(\tau_{i})\}_{i\in[q_{t}]}$ satisfy,

$$ $\mathbb{P}\left(\left(\cap_{i\in[q_{t}]}\mathcal{W}_{t}(\tau_{i})\right)^{c} \cap\mathcal{E}_{t}^{\prime}\right)\leq\sum_{i\in[q_{t}]}\mathbb{P}\left(\left (\mathcal{W}_{t}(\tau_{i})\right)^{c}\cap\mathcal{E}_{t}^{\prime}\right)\leq \frac{\delta}{2t^{2}}$ (27) $$

Notice that when $\mathcal{W}_{t}(\tau_{i})\cap\mathcal{E}_{t}^{\prime}$ holds, $f_{\star}\in\mathcal{G}_{t}^{\prime}(\tau_{i})$ for $i\in[q_{t}]$. And therefore when $\left(\cap_{i\in[q_{t}]}\mathcal{W}_{t}(\tau_{i})\right)\cap\mathcal{E}_{t}^{\prime}$ holds, $f_{\star}\in\mathcal{G}_{t}^{\prime}$. Thus, $\left(\cap_{i\in[q_{t}]}\mathcal{W}_{t}(\tau_{i})\right)\cap\mathcal{E}_{t}^{
\prime}\subseteq\mathcal{E}_{t+1}^{\prime}$.

Define a sequence of events $\mathcal{V}_{t}$ as $\mathcal{V}_{0}=\Omega$ (the whole sample space such that $\mathbb{P}(\mathcal{V}_{0})=1$), $\mathcal{V}_{t}=\cap_{\ell=1}^{t}\left(\cap_{i\in[q_{t}]}\mathcal{W}_{\ell}(
\tau_{i})\right)$. Notice that by definition $\mathcal{V}_{1}\supseteq\mathcal{V}_{2}\supseteq\cdots$.

Notice that $f_{\star}\in\mathcal{G}^{\prime}_{0}=\mathcal{F}$ so that $\mathbb{P}\left(\mathcal{E}_{1}^{\prime}\right)=1$ . This combined with $\left(\cap_{i\in[q_{t}]}\mathcal{W}_{t}(\tau_{i})\right)\cap\mathcal{E}_{t}^{
\prime}\subseteq\mathcal{E}_{t+1}^{\prime}$ implies $\cap_{\ell=1}^{t}\left(\cap_{i\in[q_{t}]}\mathcal{W}_{\ell}(\tau_{i})\right)
\subseteq\mathcal{E}_{t+1}^{\prime}$ so that $\mathcal{V}_{t}\subseteq\mathcal{E}_{t+1}$ for all $t$.

Applying Proposition 5.7 with $\widetilde{\mathcal{E}}_{t}^{\prime}=\mathcal{V}_{t-1}$, $\tau=\tau_{i}$ and $\tilde{\delta}=\frac{\delta}{2i^{2}}$ we conclude that for any $i\in[q_{t}]$, the event $\mathcal{W}_{t}(\tau_{i})$ satisfies $\mathbb{P}(\left(\mathcal{W}_{t}(\tau_{i})\right)^{c}\cap\mathcal{V}_{t-1})
\leq\frac{\delta}{4i^{2}t^{2}}$. A union bound over all $i\in[q_{t}]$, we conclude that events $\{\mathcal{W}_{t}(\tau_{i})\}_{i\in[q_{t}]}$ satisfy,

$$ $\mathbb{P}\left(\left(\cap_{i\in[q_{t}]}\mathcal{W}_{t}(\tau_{i})\right)^{c} \cap\mathcal{V}_{t-1}\right)\leq\sum_{i\in[q_{t}]}\mathbb{P}\left(\left( \mathcal{W}_{t}(\tau_{i})\right)^{c}\cap\mathcal{V}_{t-1}\right)\leq\frac{ \delta}{2t^{2}}$ (28) $$

Since $\mathcal{V}_{t}^{\prime}=\left[\left(\cap_{i\in[q_{t}]}\mathcal{W}_{t}(\tau_{i
})\right)\cap\mathcal{V}_{t-1}\right]\cup\left[\left(\cap_{i\in[q_{t}]}
\mathcal{W}_{t}(\tau_{i})\right)^{c}\cap\mathcal{V}_{t-1}\right]$ we conclude that

$$ $\mathbb{P}\left(\mathcal{V}_{t}\right)\geq\mathbb{P}\left(\left(\cap_{i\in[q_{ t}]}\mathcal{W}_{t}(\tau_{i})\right)\cap\mathcal{V}_{t-1}\right)=\mathbb{P}( \mathcal{V}_{t-1})-\mathbb{P}\left(\left(\cap_{i\in[q_{t}]}\mathcal{W}_{t}( \tau_{i})\right)^{c}\cap\mathcal{V}_{t-1}\right)\geq\mathbb{P}(\mathcal{V}_{t- 1})-\frac{\delta}{2t^{2}}.$ (29) $$

Since $\mathbb{P}(\mathcal{V}_{0})=1$, unrolling inequality 29 implies that for any $m\in\mathbb{N}$,

$$ $\mathbb{P}\left(\mathcal{V}_{m}\right)=\mathbb{P}\left(\cap_{m^{\prime}\leq{m} }\mathcal{V}_{m^{\prime}}\right)\geq 1-\sum_{\ell=1}^{m}\frac{\delta}{2\ell^{2 }}.$ $$

Thus, taking the limit we conclude that $\cap_{t=1}^{\infty}\mathcal{V}_{t}$ holds with probability at least $\lim_{t\rightarrow\infty}\left(1-\sum_{\ell=1}^{t}\frac{\delta}{2\ell^{2}}
\right)\geq 1-\delta$.

Since $\cap_{t=1}^{\infty}\mathcal{E}_{t}^{\prime}\supseteq\cap_{t=1}^{\infty}
\mathcal{V}_{t}$, we also conclude that $\cap_{t=1}^{\infty}\mathcal{E}_{t}^{\prime}$ holds with probability at least $1-\delta$ (when $\cap_{t=1}^{\infty}\mathcal{V}_{t}$ holds).

Thus we conclude that for all $i\in[q_{t}]$,

$$ $\displaystyle C^{\prime}\tau_{i}\sqrt{W_{t}^{\mathbf{b}^{\tau_{i}}_{t}}\log \left(2i^{2}t|\mathcal{F}|/\delta\right)}+C^{\prime}\tau_{i}B\log\left(2i^{2}t |\mathcal{F}|/\delta\right)\qquad\qquad\qquad\qquad\qquad$ $\displaystyle\leq C^{{}^{\prime\prime}}\tau_{i}\sqrt{\widebar{W}_{t}^{\mathbf{ b}^{\tau_{i}}_{t}}\log\left(2i^{2}t|\mathcal{F}|/\delta\right)}+C^{{}^{\prime \prime}}\tau_{i}B\log\left(2i^{2}t|\mathcal{F}|/\delta\right).$ (30) $$

and $f_{\star}\in\mathcal{G}_{t}^{\prime}$ is satisfied for all $t\in\mathbb{N}$ simultaneously with probability at least $1-\delta$. Optimism holds because when $f_{\star}\in\mathcal{G}_{t}^{\prime}$, $f_{\star}(x_{t},a)\leq\max_{f\in\mathcal{G}_{t}^{\prime}}f(x_{t},a)\leq U_{t}(
x_{t},a_{t})$ for all $a\in\mathcal{A}$ and therefore $\max_{a\in\mathcal{A}}f_{\star}(x_{t},a)\leq U_{t}(x_{t},a_{t})$. Moreover when inequality 30 is satisfied,

$$ $\displaystyle\mathcal{G}_{t}^{\prime}(\tau_{i})=\Big{\{}f\in\mathcal{F}\text{ s.t. }\sum_{\ell=1}^{t-1}\left(f_{t}^{[\tau_{i},2\tau_{i})}(x_{\ell},a_{\ell}) -f(x_{\ell},a_{\ell})\right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G }_{\ell})\in(\tau_{i},2\tau_{i}])\leq\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad$ $\displaystyle C^{\prime}\tau_{i}\sqrt{W_{t}^{\mathbf{b}^{\tau_{i}}_{t}}\log \left(2i^{2}t|\mathcal{F}|/\delta\right)}+C^{\prime}\tau_{i}B\log\left(2i^{2}t |\mathcal{F}|/\delta\right)\Big{\}}\qquad\qquad\qquad\qquad\qquad$ $\displaystyle\subseteq\Big{\{}f\in\mathcal{F}\text{ s.t. }\sum_{\ell=1}^{t-1} \left(f_{t}^{(\tau_{i},2\tau_{i}]}(x_{\ell},a_{\ell})-f(x_{\ell},a_{\ell}) \right)^{2}\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell})\in(\tau_{i} ,2\tau_{i}])\leq\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad$ $\displaystyle C^{{}^{\prime\prime}}\tau_{i}\sqrt{\widebar{W}_{t}^{\mathbf{b}^{ \tau_{i}}_{t}}\log\left(2i^{2}t|\mathcal{F}|/\delta\right)}+C^{{}^{\prime \prime}}\tau_{i}B\log\left(2i^{2}t|\mathcal{F}|/\delta\right)\Big{\}}.\qquad\qquad\qquad$ $$

This finalizes the proof.
∎

See 5.10

###### Proof.

Let’s condition on $\mathcal{E}^{\prime}$. When this event holds, optimism ensures the pseudo-regret can be upper bounded by the sum of the widths,

$$ $\displaystyle\mathrm{Regret}(T)$ $\displaystyle\leq\sum_{t=1}^{T}\omega(x_{t},a_{t},\mathcal{G}_{t}^{\prime}).$ $$

This is the same argument as in the proof of Theorem 4.5.

Recall that $\tau_{i}=\frac{B}{2^{i}}$. In order to bound the RHS of this inequality, we use the fact that $\omega(x_{t},a_{t},\mathcal{F})\leq B$ for all $t\in\mathbb{N}$,

$$ $\displaystyle\sum_{t=1}^{T}\omega(x_{t},a_{t},\mathcal{G}_{t}^{\prime})$ $\displaystyle\leq\frac{T\cdot B}{2^{q}}+\sum_{i=1}^{q}\left(\sum_{t=1}^{T} \mathbf{1}\left(\omega(x_{t},a_{t},\mathcal{G}_{t}^{\prime})\in\left(\frac{B}{ 2^{i}},\frac{B}{2^{i-1}}\right]\right)\cdot\frac{B}{2^{i-1}}\right)$ $\displaystyle=\frac{T\cdot B}{2^{q}}+\sum_{i=1}^{q}\left(\sum_{t=1}^{T}\mathbf {1}\left(\omega(x_{t},a_{t},\mathcal{G}_{t}^{\prime})\in(\tau_{i},2\tau_{i}] \right)\cdot 2\tau_{i}\right)$ $\displaystyle=\frac{T\cdot B}{2^{q}}+2\sum_{i=1}^{q}\tau_{i}\cdot\left(\sum_{t =1}^{T}\mathbf{1}\left(\omega(x_{t},a_{t},\mathcal{G}_{t}^{\prime})\in(\tau_{i },2\tau_{i}]\right)\right)$ $$

Lemma 5.9 implies that when $\mathcal{E}^{\prime}$ holds,

$$ $\displaystyle\sum_{t=1}^{T}\omega(x_{t},a_{t},\mathcal{G}_{t}^{\prime})$ $\displaystyle\leq\frac{T\cdot B}{2^{q}}+2\sum_{i=1}^{q}\tau_{i}\cdot\left(\sum _{t=1}^{T}\mathbf{1}\left(\omega(x_{t},a_{t},\mathcal{G}_{t}^{\prime})\in(\tau _{i},2\tau_{i}]\right)\right)$ $\displaystyle\leq\frac{T\cdot B}{2^{q}}+2\sum_{i=1}^{q}\tau_{i}\cdot\Big{(} \frac{\widetilde{C}\cdot d_{\mathrm{eluder}}(\mathcal{F},\tau_{i})}{\tau_{i}} \sqrt{\widebar{W}_{T}^{\mathbf{b}^{\tau_{i}}_{T}}\log\left((i+1)T|\mathcal{F}| /\delta\right)}+$ $\displaystyle\quad\frac{\widetilde{C}\cdot B\cdot d_{\mathrm{eluder}}(\mathcal {F},\tau_{i})}{\tau_{i}}\log\left((i+1)T|\mathcal{F}|/\delta\right)+\widetilde {C}\cdot d_{\mathrm{eluder}}(\mathcal{F},\tau_{i})\Big{)}$ $\displaystyle=\frac{T\cdot B}{2^{q}}+2\widetilde{C}\sum_{i=1}^{q}\Big{(}d_{ \mathrm{eluder}}(\mathcal{F},\tau_{i})\sqrt{\widebar{W}_{T}^{\mathbf{b}^{\tau_ {i}}_{T}}\log\left((i+1)T|\mathcal{F}|/\delta\right)}+$ $\displaystyle\quad B\cdot d_{\mathrm{eluder}}(\mathcal{F},\tau_{i})\log\left(( i+1)T|\mathcal{F}|/\delta\right)+\tau_{i}d_{\mathrm{eluder}}(\mathcal{F},\tau_ {i})\Big{)}$ $\displaystyle\leq\frac{T\cdot B}{2^{q}}+2\widetilde{C}d_{\mathrm{eluder}}\left (\mathcal{F},\frac{B}{2^{q}}\right)\Big{[}\sum_{i=1}^{q}\sqrt{\widebar{W}_{T}^ {\mathbf{b}^{\tau_{i}}_{T}}\log\left((q+1)T|\mathcal{F}|/\delta\right)}+$ $\displaystyle\quad B\log\left((q+1)T|\mathcal{F}|/\delta\right)+\tau_{i}\Big{]}$ (31) $$

Notice that,

$$ $\displaystyle\sum_{i=1}^{q}\sqrt{\widebar{W}_{T}^{\mathbf{b}^{\tau_{i}}_{T}} \log\left((q+1)T|\mathcal{F}|/\delta\right)}$ $\displaystyle=\sqrt{\log\left((q+1)T|\mathcal{F}|/\delta\right)}\left(\sum_{i= 1}^{q}\sqrt{\widebar{W}_{T}^{\mathbf{b}^{\tau_{i}}_{T}}}\right)$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}\sqrt{q\log\left((q+1)T| \mathcal{F}|/\delta\right)}\sqrt{\sum_{i=1}^{q}\widebar{W}_{T}^{\mathbf{b}^{ \tau_{i}}_{T}}}$ $\displaystyle\leq\sqrt{\left(\sum_{t=1}^{T}\sigma_{t}^{2}\right)q\log\left((q+ 1)T|\mathcal{F}|/\delta\right)}$ (32) $$

where inequality $(i)$ holds because $\sum_{i=1}^{q}\sqrt{z_{i}}\leq\sqrt{q\sum_{i=1}^{q}z_{i}}$ for $z_{1},\cdots,z_{q}\geq 0$. Plugging inequality 32 into 31 and using the fact that $q=\log(T)$ we conclude that

$$ $\displaystyle\sum_{t=1}^{T}\omega(x_{t},a_{t},\mathcal{G}_{t}^{\prime})$ $\displaystyle\leq B+2\widetilde{C}d_{\mathrm{eluder}}\left(\mathcal{F},\frac{B }{T}\right)\sqrt{\left(\sum_{t=1}^{T}\sigma_{t}^{2}\right)\log(T)\log\left(( \log(T)+1)T|\mathcal{F}|/\delta\right)}+$ $\displaystyle\quad 2\widetilde{C}Bd_{\mathrm{eluder}}\left(\mathcal{F},\frac{B }{T}\right)\log(T)\log((\log(T)+1)T|\mathcal{F}|/\delta)+2\widetilde{C}Bd_{ \mathrm{eluder}}\left(\mathcal{F},\frac{B}{T}\right)$ $\displaystyle=\mathcal{O}\left(d_{\mathrm{eluder}}\left(\mathcal{F},\frac{B}{T }\right)\sqrt{\left(\sum_{t=1}^{T}\sigma_{t}^{2}\right)\log(T)\log\left(T| \mathcal{F}|/\delta\right)}+Bd_{\mathrm{eluder}}\left(\mathcal{F},\frac{B}{T} \right)\log(T)\log(T|\mathcal{F}|/\delta)\right)$ $$

Using the fact that $\mathbb{P}(\mathcal{E}^{\prime})\geq 1-\delta$ finalizes the proof.

∎

###### Proof.

###### Proof.

###### Proof.

## Appendix E Eluder Lemmas

In this section we have compiled all Lemmas that deal with eluder dimension arguments.

See 5.9

###### Proof.

For simplicity we’ll use the notation $d=d_{\mathrm{eluder}}(\mathcal{F},\tau_{i})$ .

Define $\mathcal{I}_{T}^{(\tau_{i},2\tau_{i}]}=\left\{\ell\leq T\text{ s.t. }\omega(x_
{\ell},a_{\ell},\mathcal{G}_{\ell})\in(\tau_{i},2\tau_{i}]\right\}$. And in order to refer to each of its component indices let’s write $\mathcal{I}_{T}^{(\tau_{i},2\tau_{i}]}=\left\{\ell_{1},\cdots,\ell_{|\mathcal{
I}_{T}^{(\tau_{i},2\tau_{i}]}|}\right\}$ with $\ell_{1}<\ell_{2}\cdots<\ell_{|\mathcal{I}_{T}^{(\tau_{i},2\tau_{i}]}|}$.

Let $N\in\mathbb{N}\cup\{0\}$. We’ll start by showing that if $|\mathcal{I}_{T}^{(\tau_{i},2\tau_{i}]}|>d(N+1)$ then there exists an index $m\in\left[|\mathcal{I}_{T}^{(\tau_{i},2\tau_{i}]}|\right]$ and a pair of functions $f_{\ell_{m}}^{(1)},f_{\ell_{m}}^{(2)}\in\mathcal{G}_{\ell_{m}}$ such that $f_{\ell_{m}}^{(1)}(x_{\ell_{m}},a_{\ell_{m}})-f_{\ell_{m}}^{(2)}(x_{\ell_{m}},
a_{\ell_{m}})\in(\tau_{i},2\tau_{i}]$ and $N+1$ non-empty disjoint subsets $\widetilde{S}_{1},\cdots,\widetilde{S}_{N+1}\subseteq\{\ell_{j}\}_{j\leq m-1}$ such that,

$$ $\|f_{\ell_{m}}^{(1)}-f_{\ell_{m}}^{(2)}\|_{\widetilde{S}_{j}}^{2}:=\sum_{\ell \in\widetilde{S}_{j}}\left(f_{\ell_{m}}^{(1)}(x_{\ell},a_{\ell})-f_{\ell_{m}}^ {(2)}(x_{\ell},a_{\ell})\right)^{2}>\tau_{i}^{2}.$ $$

To prove this result, let’s start building the sequence $\widetilde{S}_{1},\cdots,\widetilde{S}_{N+1}$ by setting $\widetilde{S}_{j}=\ell_{j}$ for all $j=1,\cdots,N+1$. Let’s look at $m=N+2,\cdots,|\mathcal{I}_{T}^{(\tau_{i},2\tau_{i}]}|$.
Consider a pair of functions $f_{\ell_{m}}^{(1)},f_{\ell_{m}}^{(2)}\in\mathcal{G}_{\ell_{m}}$ such that $f_{\ell_{m}}^{(1)}(x_{m},a_{m})-f_{\ell_{m}}^{(2)}(x_{\ell_{m}},a_{\ell_{m}})>
\tau_{i}$. If $\|f_{\ell_{m}}^{(1)}-f_{\ell_{m}}^{(2)}\|^{2}_{\widetilde{S}_{j}}>\tau_{i}^{2}$ for all $j=1,\cdots,N+1$ the result follows. Otherwise there exists at least one $j$ such that $\|f_{\ell_{m}}^{(1)}-f_{\ell_{m}}^{(2)}\|^{2}_{\widetilde{S}_{j}}\leq\tau_{i}^
{2}$. Thus, we can add $\ell_{m}$ to $\widetilde{S}_{j}$.

Finally, by construction, the $\widetilde{S}_{j}$ sets satisfy the definition of eluder $\tau_{i}$-independence and therefore they must satisfy $|\widetilde{S}_{j}|\leq d$ for all $j$.

This means the process of expanding the sets $\{\widetilde{S}_{j}\}_{j=1}^{N+1}$ must ‘fail’ at most after all $\widetilde{S}_{j}$ have $d$ elements. Thus $|\mathcal{I}_{T}^{(\tau_{i},2\tau_{i}]}|>d(N+1)$ guarantees this will occur.

As we have shown, if $|\mathcal{I}_{T}^{(\tau_{i},2\tau_{i}]}|>d(N+1)$, there exists an index $m\in[|\mathcal{I}_{T}^{(\tau_{i},2\tau_{i}]}|]$, disjoint subsets $\widetilde{S}_{1},\cdots,\widetilde{S}_{N+1}\subseteq\{\ell_{j}\}_{j\leq m-1}$ and $f_{\ell_{m}}^{(1)},f_{\ell_{m}}^{(2)}\in\mathcal{G}_{\ell_{m}}$ such that,

$$ $(N+1)\tau_{i}^{2}<\sum_{j\in[N+1]}\|f_{\ell_{m}}^{(1)}-f_{\ell_{m}}^{(2)}\|^{2 }_{\widetilde{S}_{j}}\leq\|f_{\ell_{m}}^{(1)}-f_{\ell_{m}}^{(2)}\|^{2}_{\{\ell _{j}\}_{j=1}^{m-1}}.$ (33) $$

On the other hand, since $f_{\ell_{m}}^{(1)},f_{\ell_{m}}^{(2)}\in\mathcal{G}_{\ell_{m}}^{\prime}
\subseteq\mathcal{G}_{\ell_{m}}^{\prime}(\tau_{i})$, we have that if $\mathcal{E}^{\prime}$ holds Lemma 5.8 implies,

$$ $\displaystyle\|f_{\ell_{m}}^{(j)}-f_{\ell_{m}}^{(\tau_{i},2\tau_{i}]}\|^{2}_{ \{\ell_{j}\}_{j=1}^{m-1}}$ $\displaystyle=\sum_{\ell=1}^{\ell_{m-1}}\left(f_{\ell_{m}}^{[\tau_{i},2\tau_{i })}(x_{\ell},a_{\ell})-f_{\ell_{m}}^{(j)}(x_{\ell},a_{\ell})\right)^{2}\mathbf {1}(\omega(x_{\ell},a_{\ell},\mathcal{G}_{\ell}^{\prime})\in[\tau_{i},2\tau_{i }))$ $\displaystyle\leq C^{{}^{\prime\prime}}\tau_{i}\sqrt{\widebar{W}_{\ell_{m}}^{ \mathbf{b}^{\tau_{i}}_{\ell_{m}}}\log\left(2i^{2}\ell_{m}|\mathcal{F}|/\delta \right)}+C^{{}^{\prime\prime}}\tau_{i}B\log\left(2i^{2}\ell_{m}|\mathcal{F}|/ \delta\right)$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}C^{{}^{\prime\prime}}\tau_{i} \sqrt{\widebar{W}_{T}^{\mathbf{b}^{\tau_{i}}_{T}}\log\left(2i^{2}T|\mathcal{F} |/\delta\right)}+C^{{}^{\prime\prime}}\tau_{i}B\log\left(2i^{2}T|\mathcal{F}|/ \delta\right)$ $$

for $j\in\{1,2\}$. Where inequality $(i)$ holds because $\ell_{m}\leq T$ and because $\widebar{W}_{t}^{b_{t}^{\tau_{i}}}$ is monotonic w.r.t. $t$ for all $i\in\{0\}\cup[q]$ (recall $\widebar{W}_{t}^{\mathbf{b}^{\tau_{i}}_{t}}:=\sum_{\ell=1}^{t-1}\sigma_{\ell}^
{2}\cdot\mathbf{1}\left(\omega(x_{\ell},a_{\ell},\mathcal{G}^{\prime}_{\ell})
\in[\tau_{i},2\tau_{i})\right)$). Therefore when $\mathcal{E}^{\prime}$ holds,

$$ $\displaystyle\|f_{\ell_{m}}^{(1)}-f_{\ell_{m}}^{(2)}\|^{2}_{\{\ell_{j}\}_{j=1} ^{m-1}}$ $\displaystyle\leq 2\|f_{\ell_{i}}^{(1)}-f_{\star}\|^{2}_{\{\ell_{j}\}_{j=1}^{m -1}}+2\|f_{\star}-f_{\ell_{i}}^{(2)}\|^{2}_{\{\ell_{j}\}_{j=1}^{m-1}}$ $\displaystyle\leq 4\cdot\left(C^{{}^{\prime\prime}}\tau_{i}\sqrt{\widebar{W}_{ T}^{\mathbf{b}^{\tau_{i}}_{T}}\log\left(2i^{2}T|\mathcal{F}|/\delta\right)}+C^ {{}^{\prime\prime}}\tau_{i}B\log\left(2i^{2}T|\mathcal{F}|/\delta\right)\right)$ (34) $$

For simplicity within the context of this proof let’s use the notation

$$ $\widetilde{\beta}_{T}(\tau_{i},\delta):=C^{{}^{\prime\prime}}\tau_{i}\sqrt{ \widebar{W}_{T}^{\mathbf{b}^{\tau_{i}}_{T}}\log\left(2i^{2}T|\mathcal{F}|/ \delta\right)}+C^{{}^{\prime\prime}}\tau_{i}B\log\left(2i^{2}T|\mathcal{F}|/ \delta\right).$ $$

Thus combining inequalities 33 and 34 we conclude that if $N\geq\max\left(\frac{4\widetilde{\beta}_{T}(\tau_{i},\delta)}{\tau_{i}^{2}}-1,
0\right)$ then $\tau_{i}^{2}(N+1)\geq 4\widetilde{\beta}_{T}(\tau_{i},\delta)$ and therefore we would incur in a contradiction because

$$ $\displaystyle 4\widetilde{\beta}_{T}(\tau_{i},\delta)\leq(N+1)\tau^{2}<\|f_{ \ell_{i}}^{(1)}-f_{\ell_{i}}^{(2)}\|^{2}_{\{\ell_{j}\}_{j=1}^{m-1}}\leq 4 \widetilde{\beta}_{T}(\tau_{i},\delta).$ $$

This implies

$$ $\displaystyle|\mathcal{I}_{T}^{(\tau_{i},2\tau_{i}]}|$ $\displaystyle\leq d\left(\max\left(\frac{4\widetilde{\beta}_{T}(\tau_{i}, \delta)}{\tau_{i}^{2}},0\right)+1\right)$ $\displaystyle\leq d\left(\frac{4\widetilde{\beta}_{T}(\tau_{i},\delta)}{\tau_{ i}^{2}}+1\right)$ $\displaystyle=\frac{4dC^{{}^{\prime\prime}}}{\tau_{i}}\sqrt{\widebar{W}_{T}^{ \mathbf{b}^{\tau_{i}}_{T}}\log\left(2i^{2}T|\mathcal{F}|/\delta\right)}+\frac{ 4dC^{{}^{\prime\prime}}B}{\tau_{i}}\log\left(2i^{2}T|\mathcal{F}|/\delta\right )+d$ $\displaystyle=\mathcal{O}\left(\frac{d_{\mathrm{eluder}}(\mathcal{F},\tau_{i}) }{\tau_{i}}\sqrt{\widebar{W}_{T}^{\mathbf{b}^{\tau_{i}}_{T}}\log\left(iT| \mathcal{F}|/\delta\right)}+\frac{B\cdot d_{\mathrm{eluder}}(\mathcal{F},\tau_ {i})}{\tau_{i}}\log\left(iT|\mathcal{F}|/\delta\right)+d_{\mathrm{eluder}}( \mathcal{F},\tau_{i})\right)$ $$

Since we have shown this result for an arbitrary $T\in\mathbb{N}$ and to prove the result we have only used that $T\in\mathbb{N}$ the result follows.

∎

See 4.3

###### Proof.

For simplicity we’ll use the notation $d=d_{\mathrm{eluder}}(\mathcal{F},\tau)$.
We’ll start by showing the following bound,

$$ $\sum_{t=1}^{T}\mathbf{1}(\omega(x_{t},a_{t},\mathcal{G}_{t})\in(\tau,2\tau]) \leq d\left(\frac{64CB\log(T|\mathcal{F}|/\delta)}{\tau}+\frac{64C\sigma^{2} \log(T|\mathcal{F}|/\delta)}{\tau^{2}}+1\right)$ $$

Define $\mathcal{I}_{T}^{(\tau,2\tau]}=\left\{\ell\leq T\text{ s.t. }\omega(x_{\ell},a
_{\ell},\mathcal{G}_{\ell})\in(\tau,2\tau]\right\}$. And in order to refer to each of its component indices let’s write $\mathcal{I}_{T}^{(\tau,2\tau]}=\left\{\ell_{1},\cdots,\ell_{|\mathcal{I}_{T}^{
(\tau,2\tau]}|}\right\}$ with $\ell_{1}<\ell_{2}\cdots<\ell_{|\mathcal{I}_{T}^{(\tau,2\tau]}|}$.

Let $N\in\mathbb{N}\cup\{0\}$. We’ll start by showing that if $|\mathcal{I}_{T}^{(\tau,2\tau]}|>d(N+1)$ then there exists an index $i\in\left[|\mathcal{I}_{T}^{(\tau,2\tau]}|\right]$ and a pair of functions $f_{\ell_{i}}^{(1)},f_{\ell_{i}}^{(2)}\in\mathcal{G}_{\ell_{i}}$ such that $f_{\ell_{i}}^{(1)}(x_{\ell_{i}},a_{\ell_{i}})-f_{\ell_{i}}^{(2)}(x_{\ell_{i}},
a_{\ell_{i}})\in(\tau,2\tau]$ and $N+1$ non-empty disjoint subsets $\widetilde{S}_{1},\cdots,\widetilde{S}_{N+1}\subseteq\{\ell_{j}\}_{j\leq i-1}$ such that,

$$ $\|f_{\ell_{i}}^{(1)}-f_{\ell_{i}}^{(2)}\|_{\widetilde{S}_{j}}^{2}:=\sum_{\ell \in\widetilde{S}_{j}}\left(f_{\ell_{i}}^{(1)}(x_{\ell},a_{\ell})-f_{\ell_{i}}^ {(2)}(x_{\ell},a_{\ell})\right)^{2}>\tau^{2}.$ $$

To prove this result, let’s start building the sequence $\widetilde{S}_{1},\cdots,\widetilde{S}_{N+1}$ by setting $\widetilde{S}_{j}=\ell_{j}$ for all $j=1,\cdots,N+1$. Let’s look at $m=N+2,\cdots,|\mathcal{I}_{T}^{(\tau,2\tau]}|$.
Consider a pair of functions $f_{\ell_{m}}^{(1)},f_{\ell_{m}}^{(2)}\in\mathcal{G}_{\ell_{m}}$ such that $f_{\ell_{m}}^{(1)}(x_{m},a_{m})-f_{\ell_{m}}^{(2)}(x_{\ell_{m}},a_{\ell_{m}})>\tau$. If $\|f_{\ell_{m}}^{(1)}-f_{\ell_{m}}^{(2)}\|^{2}_{\widetilde{S}_{j}}>\tau^{2}$ for all $j=1,\cdots,N+1$ the result follows. Otherwise there exists at least one $j$ such that $\|f_{\ell_{m}}^{(1)}-f_{\ell_{m}}^{(2)}\|^{2}_{\widetilde{S}_{j}}\leq\tau^{2}$. Thus, we can add $\ell_{m}$ to $\widetilde{S}_{j}$.

Finally, by construction, the $\widetilde{S}_{j}$ sets satisfy the definition of eluder $\tau$-independence and therefore they must satisfy $|\widetilde{S}_{j}|\leq d$ for all $j$.

This means the process of expanding the sets $\{\widetilde{S}_{j}\}_{j=1}^{N+1}$ must ‘fail’ at most after all $\widetilde{S}_{j}$ have $d$ elements. Thus when $|\mathcal{I}_{T}^{(\tau,2\tau]}|>d(N+1)$ guarantees this will occur.
Let $\widehat{i}=\mathop{\mathrm{argmin}}\{j\text{ s.t. }\tau_{j}\geq 2\tau\}$ be the smallest index in the input thresholds for Algorithm 2 such that $\tau_{\widehat{i}}\geq 2\tau$. Notice that $4\tau\geq\tau_{\widehat{i}}$.

As we have shown, if $|\mathcal{I}_{T}^{(\tau,2\tau]}|>d(N+1)$, there exists an index $i\in[|\mathcal{I}_{T}^{(\tau,2\tau]}|]$ and $f_{\ell_{i}}^{(1)},f_{\ell_{i}}^{(2)}\in\mathcal{G}_{\ell_{i}}$ such that,

$$ $(N+1)\tau^{2}<\sum_{j\in[N+1]}\|f_{\ell_{i}}^{(1)}-f_{\ell_{i}}^{(2)}\|^{2}_{ \widetilde{S}_{j}}\leq\|f_{\ell_{i}}^{(1)}-f_{\ell_{i}}^{(2)}\|^{2}_{\mathcal{ I}_{T}^{(\tau,2\tau]}\cap\{\ell_{j}\}_{j=1}^{i-1}}.$ (35) $$

On the other hand, since $f_{\ell_{i}}^{(1)},f_{\ell_{i}}^{(2)}\in\mathcal{G}_{\ell_{i}}\subseteq
\mathcal{G}_{\ell_{i}}(\tau_{\widehat{i}})$, we have that

$$ $\mathcal{I}_{T}^{(\tau_{\widehat{i}})}=\left\{\ell\leq T\text{ s.t. }\omega(x_ {\ell},a_{\ell},\mathcal{G}_{\ell})\leq\tau_{\widehat{i}}\right\}$ $$

satisfies $\mathcal{I}_{T}^{(\tau,2\tau]}\subseteq\mathcal{I}_{T}^{(\tau_{\widehat{i}})}$ and therefore,

$$ $\|f_{\ell_{i}}^{(1)}-f_{\ell_{i}}^{(2)}\|^{2}_{\mathcal{I}_{T}^{(\tau,2\tau]} \cap\{\ell_{j}\}_{j=1}^{i-1}}\leq\|f_{\ell_{i}}^{(1)}-f_{\ell_{i}}^{(2)}\|^{2} _{\mathcal{I}_{T}^{(\tau_{\widehat{i}})}\cap\{\ell_{j}\}_{j=1}^{i-1}}$ (36) $$

Proposition 4.1 implies

$$ $\displaystyle\|f_{\ell_{i}}^{(1)}-f_{\ell_{i}}^{(2)}\|^{2}_{\mathcal{I}_{T}^{( \tau_{\widehat{i}})}\cap\{\ell_{j}\}_{j=1}^{i-1}}$ $\displaystyle\leq 2\|f_{\ell_{i}}^{(1)}-f_{t}^{(\tau_{\hat{i}})}\|^{2}_{ \mathcal{I}_{T}^{(\tau_{\widehat{i}})}\cap\{\ell_{j}\}_{j=1}^{i-1}}+2\|f_{t}^{ (\tau_{\hat{i}})}-f_{\ell_{i}}^{(2)}\|^{2}_{\mathcal{I}_{T}^{(\tau_{\widehat{i }})}\cap\{\ell_{j}\}_{j=1}^{i-1}}$ $\displaystyle\leq 4\beta_{\ell_{i}}(\tau_{\widehat{i}},\delta)$ $\displaystyle\leq 4\beta_{T}(\tau_{\widehat{i}},\delta)$ $\displaystyle=4\cdot(4\min(\tau_{\widehat{i}}B,B^{2})+16\sigma^{2})\log(T| \mathcal{F}|/\delta)$ $\displaystyle\leq 4\cdot(4\tau_{\widehat{i}}B+16\sigma^{2})\log(T|\mathcal{F}| /\delta)$ $\displaystyle\leq 64\cdot(\tau B+\sigma^{2})\log(T|\mathcal{F}|/\delta)$ $$

when $\mathcal{E}$ holds.

Thus combining inequalities 35 and 36 we conclude that if $N\geq\max\left(\frac{4\beta_{T}(\tau_{\widehat{i}},\delta)}{\tau^{2}}-1,0\right)$ then $\tau^{2}(N+1)\geq 4\beta_{T}(\tau_{\widehat{i}},\delta)$ and therefore we would incur in a contradiction because

$$ $4\beta_{T}(\tau_{\widehat{i}},\delta)\leq(N+1)\tau^{2}<\|f_{\ell_{i}}^{(1)}-f_ {\ell_{i}}^{(2)}\|^{2}_{\mathcal{I}_{T}^{(\tau_{\widehat{i}})}\cap\{\ell_{j}\} _{j=1}^{i-1}}\leq 4\beta_{T}(\tau_{\widehat{i}},\delta).$ $$

This implies

$$ $\displaystyle|\mathcal{I}_{T}^{(\tau,2\tau]}|$ $\displaystyle\leq d\left(\max\left(\frac{4\beta_{T}(\tau_{\widehat{i}},\delta) }{\tau^{2}},0\right)+1\right)$ $\displaystyle\leq d\left(\frac{4\beta_{T}(\tau_{\widehat{i}},\delta)}{\tau^{2} }+1\right)$ $\displaystyle\leq d\left(\frac{64B\log(T|\mathcal{F}|/\delta)}{\tau}+\frac{64 \sigma^{2}\log(T|\mathcal{F}|/\delta)}{\tau^{2}}+1\right)$ (37) $$

Recall that $\tau_{j}=\tau_{0}\cdot 2^{-j}$. Observe that $I_{T}^{(\tau,\tau_{0}]}\leq I_{T}^{(\tau,2\tau]}+\sum_{j=1}^{\widehat{i}+1}I_{
T}^{(\tau_{j},\tau_{j-1}]}$. We will apply the result in equation 37 to each of these quantities and focus on bounding $\sum_{j=1}^{\widehat{i}+1}I_{T}^{(\tau_{j},\tau_{j-1}]}$. Equation 37 along with the inequality $d_{\mathrm{eluder}}(\mathcal{F},\tau_{j})\leq d=d_{\mathrm{eluder}}(\mathcal{F
},\tau)$ for all $j\leq\widehat{i}+1$ implies we can focus on controlling $\sum_{j=1}^{\widehat{i}+1}\frac{1}{\tau_{j}}$ and $\sum_{j=1}^{\widehat{i}+1}\frac{1}{\tau^{2}_{j}}$. We proceed to bound these terms.

$$ $\sum_{j=1}^{\widehat{i}+1}\frac{1}{\tau_{j}}=\frac{1}{\tau_{0}}\sum_{j=1}^{ \widehat{i}+1}2^{j}=\frac{2}{\tau_{0}}\sum_{j=0}^{\widehat{i}}2^{j}=\frac{2}{ \tau_{0}}(2^{\widehat{i}+1}-1)\leq\frac{2}{\tau_{\widehat{i}+1}}$ $$

similarly

$$ $\sum_{j=1}^{\widehat{i}+1}\frac{1}{\tau^{2}_{j}}=\frac{1}{\tau^{2}_{0}}\sum_{j =1}^{\widehat{i}+1}2^{2j}=\frac{4}{\tau^{2}_{0}}\sum_{j=0}^{\widehat{i}}2^{2j} =\frac{4}{\tau^{2}_{0}}\cdot\left(\frac{2^{2(\widehat{i}+1)}-1}{3}\right)\leq \frac{4}{3\tau_{0}^{2}}\cdot 2^{2(\widehat{i}+1)}\leq\frac{2}{\tau^{2}_{ \widehat{i}+1}}$ $$

Finally, since $\tau\leq\tau_{\widehat{i}+1}$, we have $\frac{2}{\tau_{\widehat{i}+1}}\leq\frac{2}{\tau}$ and $\frac{2}{\tau^{2}_{\widehat{i}+1}}\leq\frac{2}{\tau^{2}}$.

Combining these results we conclude that,

$$ $\left|\mathcal{I}^{(\tau,\tau_{0}]}_{T}\right|\leq 3\cdot d\left(\frac{64B\log (T|\mathcal{F}|/\delta)}{\tau}+\frac{64\sigma^{2}\log(T|\mathcal{F}|/\delta)}{ \tau^{2}}+1\right)$ $$

the result follows

∎

See 4.4

###### Proof.

For simplicity we’ll use the notation $d=d_{\mathrm{eluder}}(\mathcal{F},\frac{B}{T})$ and $\omega_{t}=\omega(x_{t},a_{t},\mathcal{G}_{t})$. We will first order the sequence $\{w_{t}\}_{t=1}^{T}$ in descending order, as $w_{i_{1}},\cdots,w_{i_{T}}$. We have,

$$ $\displaystyle\sum_{t=1}^{T}\omega_{t}=\sum_{t=1}^{T}\omega_{i_{t}}=\sum_{t=1}^ {T}w_{i_{t}}\mathbf{1}(w_{i_{t}}>\frac{B}{T})+\sum_{t=1}^{T}w_{i_{t}}\mathbf{1 }(w_{i_{t}}\leq\frac{B}{T})\leq B+\sum_{t=1}^{T}\omega_{i_{t}}\mathbf{1}(w_{i_ {t}}>\frac{B}{T})$ $$

Applying Lemma 4.3 by setting $\tau=\omega_{i_{t}}>\frac{B}{T}$ we have that,

$$ $\displaystyle t$ $\displaystyle\leq\sum_{\ell=1}^{T}\mathbf{1}(\omega(x_{\ell},a_{\ell},\mathcal {G}_{\ell})>\omega_{i_{t}})$ $\displaystyle\leq 3\cdot d_{\mathrm{eluder}}(\mathcal{F},\omega_{i_{t}})\left( \frac{64CB\log(T|\mathcal{F}|/\delta)}{\omega_{i_{t}}}+\frac{64C\sigma^{2}\log (T|\mathcal{F}|/\delta)}{\omega^{2}_{i_{t}}}+1\right)$ $\displaystyle\leq 3\cdot d_{\mathrm{eluder}}(\mathcal{F},B/T)\left(\frac{64CB \log(T|\mathcal{F}|/\delta)}{\omega_{i_{t}}}+\frac{64C\sigma^{2}\log(T| \mathcal{F}|/\delta)}{\omega^{2}_{i_{t}}}+1\right)$ $\displaystyle\stackrel{{\scriptstyle(i)}}{{\leq}}6\cdot d_{\mathrm{eluder}}( \mathcal{F},B/T)\left(\frac{64CB\log(T|\mathcal{F}|/\delta)}{\omega_{i_{t}}}+ \frac{64C\sigma^{2}\log(T|\mathcal{F}|/\delta)}{\omega^{2}_{i_{t}}}\right)$ $$

where the removal of the $+1$ term in step $(i)$ follows because $\omega_{i_{t}}>B/T$. Therefore,

$$ $t\leq 768C\cdot d_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T|\mathcal{F}|/\delta )\cdot\max\left(\frac{B}{\omega_{i_{t}}},\frac{\sigma^{2}}{\omega^{2}_{i_{t}}} \right).$ $$

This inequality can be used to produce a bound for $\omega_{i_{t}}$ when $\omega_{i_{t}}>B/T$,

$$ $\omega_{i_{t}}\leq 768C\cdot d_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T| \mathcal{F}|/\delta)\cdot\frac{B}{t}+\sigma\sqrt{\frac{768C\cdot d_{\mathrm{ eluder}}(\mathcal{F},B/T)\log(T|\mathcal{F}|/\delta)}{t}}$ $$

Since $\sum_{t=1}^{T}\frac{1}{t}\leq 2\log(T)+1$ and $\frac{1}{\sqrt{t}}\leq 2\sqrt{T}$ we have that

$$ $\displaystyle\sum_{t=1}^{T}\omega_{i_{t}}\mathbf{1}(w_{i_{t}}>\frac{B}{T})\leq \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad \qquad\qquad\qquad\qquad$ $\displaystyle\qquad\qquad 1536CBd_{\mathrm{eluder}}(\mathcal{F},B/T)\log(T) \log(T|\mathcal{F}|/\delta)+\sigma\sqrt{1536C\cdot d_{\mathrm{eluder}}( \mathcal{F},B/T)\log(T|\mathcal{F}|/\delta)T}$ $$

∎

###### Proof.

###### Proof.

###### Proof.

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 5
presentation: 2
questions: 1. Could the authors give an overview for the main contribution of the paper?
2. How the estimation of $\sigma^2_t$ is possible, especially for the unknown variance?
soundness: 2
strengths: 1. Solving for varying variance over time period is practical and may yield tighter regret bound in some cases.
2. The analysis of the variance and the truncated loss has novelty.
summary: The paper proposes variance-aware algorithms for contextual bandits with function approximation, with only mean reward realizability assumption for known and unknown variances of noise.
weaknesses: 1. The organization of the paper is hard to follow. The theorems and colloraries are hard to follow since there is no intuitive explanation on the terms (e.g., $\mathcal{G}_t^\prime(\tau_i)$, $\tilde{\mathcal{E}_t^\prime}$ ). It is confusing whether the result mentions either $\sigma_t=\sigma$ case or not.  I suggest the authors move the $\sigma_t =\sigma$ case to appendix to clearly see the results.
2. Typos:

In line 163 $\mathcal{X} \times \mathcal{X} .. $ should be $\mathcal{X} \times \mathcal{A} .. $.

In Algorithm 1 line 5, $f_t^{\tau}$ should be $f_t^{\tau_i}

In eq. (5), $\widehat{\sigma}_t$ should be $\widehat{\sigma}_t^2$

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 2
questions: - There is no direct comparison with prior work is provided, making it difficult to clearly assess the improvements or distinctions of these results relative to existing bounds in the literature.
soundness: 3
strengths: - The authors present a study of contextual bandits with function approximation by developing algorithms with variance-dependent regret bounds, marking the first instance of such bounds in this setting. 
- These results improve upon existing bounds by requiring only a realizability assumption on the mean reward function, avoiding stronger, often impractical assumptions on measurement noise.
- The paper proposes two algorithms with distinct performance guarantees. Algorithm 1 is designed for cases with uniform but unknown measurement noise variance across time steps. This algorithm achieves a sharp dependence on the complexity of the reward function class, measured by the eluder dimension. Algorithm 2 is tailored for scenarios with variable noise variances. Its regret bound scales with the square root of the cumulative noise variance but linearly with the eluder dimension, providing an efficient approach for non-uniform noise settings.
summary: This paper introduces new regret bounds for contextual bandit problems with function approximation, assuming the realizability condition. The authors build on the framework of optimistic algorithms for contextual bandits, and they also propose new algorithms with improved regret bounds that adapt to the variance of the measurement noise under the eluder dimension.
weaknesses: However, several aspects of the paper’s presentation and empirical support could be improved:
- The authors did not include empirical experiments or numerical results to validate the theoretical bounds. This leaves the practical effectiveness of the algorithms untested.
- The theoretical content is densely packed, with lemmas presented consecutively without sufficient exposition, making it challenging to follow the logical flow of arguments.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 2
questions: 1. Do you think the current regret bound for changed variance is tight?
soundness: 3
strengths: 1. The paper studied a variance-dependent regret bound for contextual bandits, which I think is an interesting problem to study.

2. The paper is generally well-written, and the proof appears to be correct.

3. Their regret bound for contextual bandits with unchanged unknown variance matches the results for linear bandits. I think this is a valuable addition to the literature and may have further theoretical impacts.
summary: In this paper, the authors studied the variance-dependent regret bound for contextual bandits with function approximation. They focus on scenarios where the reward function has a bounded eluder dimension. The analysis begins by considering the case where the variance is known. The authors introduce an optimistic least squares approach with multiple layers, where each layer maintains a confidence set using only data points with correspondingly small uncertainty. Combined with a routine that estimates the cumulative variance, they demonstrate that the algorithm can be adapted to the case with unknown variance. This algorithm matches the performance of the linear bandit case with unknown variance. Finally, with a modified filtering method that selects data points where the variance falls within a certain range, they show that their algorithm can be generalized to scenarios where the unknown variance changes.
weaknesses: 1. Given the variance-dependent regret bound for linear bandits in the literature, it is not surprising that one can obtain a variance-dependent regret bound under general function approximation. Moreover, there is still a $\sqrt{d}$ factor gap in the general case where variance changes are allowed, compared to the linear setting. I would suggest that the authors highlight the obstacle to removing this gap in the main content.

2. The approach in this paper adapts [Zhao et al., 2023] to the general function approximation case. I would suggest that the authors highlight the technical challenges and the key difference in a specific subsection or paragraph.

3. I am not sure whether the regret bound under changed variance is a significant setting on its own; it appears somewhat artificial. By contrast, the linear bandit case holds practical implications, as demonstrated by [Zhao et al., 2023], where their algorithm is applied to linear mixture MDPs as an example. It would be great to provide motivating examples or potential applications for the changed variance setting.

Zhao, Heyang, et al. "Variance-dependent regret bounds for linear bandits and reinforcement learning: Adaptivity and computational efficiency." The Thirty Sixth Annual Conference on Learning Theory. PMLR, 2023.

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 1
questions: 1. Previous algorithms that achieved second-order regret with homogeneous variance typically relied on a weighted estimator, using either uncertainty weighting [1] or variance weighting [2]. It is interesting to explore how the proposed algorithm can achieve second-order regret without employing any weighting mechanisms, which could be of independent interest.

[1] Variance-dependent regret bounds for linear bandits and reinforcement learning: Adaptivity and computational efficiency.

[2] Nearly minimax optimal reinforcement learning for linear mixture markov decision processes

2. For the variance $\sigma_t$, should it be fixed, or can it be a random variable that depends on the selection of the action?

3. In Line 171, the claim regarding the first algorithm seems incorrect. As mentioned by the author in Line 99, second-order bounds for contextual bandits were already developed in Zhao et al. (2022).

4. For the contextual bandit problem, recently, a new work [3] achieved second-order regret for the dueling bandit case. It would be helpful if the paper provided some discussion on it.

[3] Variance-Aware Regret Bounds for Stochastic Contextual Dueling Bandits
soundness: 3
strengths: 1. This work provides the first algorithm with a variance-aware regret guarantee for general function approximation without requiring knowledge of the conditional variance.

2. The second-order regret for the homogeneous case seems near-optimal when reduced to the linear function class.

3. The author proposes a novel uncertainty-filtered multi-scale least squares method, which could be of independent interest.
summary: This work studies the contextual bandit problem under general function approximation with finite eluder dimension. The author proposes a novel algorithm based on the uncertainty-filtered multi-scale least squares procedure and achieves a variance-aware regret guarantee for general function approximation without requiring knowledge of the conditional variance. The regret for the homogeneous case seems near-optimal when reduced to the linear function class, while the regret for inhomogeneous variance has an additional dependency on $\sqrt{d}$.
weaknesses: 1. Some parts of the presentation are highly confusing, making it difficult to follow.

(1) In Line 264, there is no Propositional 3.2, and Appendix C discusses an existing algorithm with a Hoeffding-type confidence set.

(2) In Line 279, what is the definition of the event E?

(3) In Line 299, what is Algorithm 3?

2. Regarding the regret guarantee, there is a lack of comparison with previous results, making it hard to assess the contribution of the theoretical findings. To my knowledge, the regret for the homogeneous case seems near-optimal when reduced to the linear function class, while the regret for inhomogeneous variance has an additional dependency on $\sqrt{d}$ . However, more commentary on this point is needed. Additionally, it would be beneficial to compare the regret to that of previous algorithms for general function approximation.

3. The algorithm is highly inefficient. While calculating (threshold) confidence sets is a widely used technique in RL with general function approximation, this work further relies on calculating the intersection of the confidence sets and performing optimization over the intersected confidence set. This may be intractable when the confidence sets are not convex.

Meta-review: Summary:
This work addresses contextual bandits with function approximation, making a significant contribution by establishing a second-order regret bound for this setting for the first time.

Strengths:

- The studied setting is important and relevant to the field.
- The authors present a technically sound approach with a rigorous and correct proof.

Weaknesses:

- The derived second-order regret bound includes an additional dimension factor, which prevents it from matching the regret bounds achieved in linear bandit settings.

Decision:
Accept.

Decision: Accept (Poster)