June 04, 2024
Meta reinforcement learning sets a distribution over a set of tasks on which the agent can train at will, then is asked to learn an optimal policy for any test task efficiently. In this paper, we consider a finite set of tasks modeled through Markov decision processes with various dynamics. We assume to have endured a long training phase, from which the set of tasks is perfectly recovered, and we focus on regret minimization against the optimal policy in the unknown test task. Under a separation condition that states the existence of a state-action pair revealing a task against another, [1] show that \(\mathcal{O}(M^2 \log(H))\) regret can be achieved, where \(M, H\) are the number of tasks in the set and test episodes, respectively. In our first contribution, we demonstrate that the latter rate is nearly optimal by developing a novel lower bound for test-time regret minimization under separation, showing that a linear dependence with \(M\) is unavoidable. Then, we present a family of stronger yet reasonable assumptions beyond separation, which we call strong identifiability, enabling algorithms achieving fast rates \(\log (H)\) and sublinear dependence with \(M\) simultaneously. Our paper provides a new understanding of the statistical barriers of test-time regret minimization and when fast rates can be achieved.
4pt
Structure |
Reachability |
Regret Upper Bound |
Regret Lower Bound |
|---|---|---|---|
| Separation (Ass. [ass:separation95mdp]) | Reachable (Ass. [ass:reachability]) | \(\cO \left( \frac{T M^2 \log (MH)}{\lambda^4} \right)\) (Thr. [thr:mdp95upper95bound95separation]) | \(\Omega \left( \frac{T M \log (H)}{\lambda} \log \left( \frac{1}{\delta} \right) \right)\) (Thr. [thr:mdp95lower95bound])* |
| Clustering (Ass. [ass:mdp95clustering]) | Cluster Reachable (Ass. [ass:mdp95clustering95reachability]) | \(\cO \left( \frac{T (K^2 + N^2) \log (N H) }{\lambda^4} \right)\) (Thr. [thr:mdp95upper95bound95clustering])* | |
| Tree Structure (Ass. [ass:mdp95tree]) | Strongly Reachable (Ass. [ass:strong95reachability]) | \(\cO \left( \frac{T d \log (dH)}{\lambda^4} \right)\) (Thr. [thr:mdp95upper95bound95tree])* | |
| Revealing Policies (Ass. [ass:mdp95revealing95policies]) | Reachable (Ass. [ass:reachability]) | \(\cO \left( \frac{T I \log (MH)}{\lambda^4} \right)\) (Thr. [thr:mdp95upper95bound95revealing95policies])* |
Reinforcement Learning [2] is a popular tool for learning an optimal decision policy through sampled interactions with a Markov Decision Process (MDP), a general framework encompassing countless applications, ranging from robotics [3], [4] to algorithms design [5], conversational agents [6], and others.
Although powerful, the efficiency of RL is a long-standing issue. The theory says that the regret of a RL algorithm, i.e., the difference between the value of the deployed policy and the optimal policy in hindsight, inescapably scales with \(\sqrt{H}\) in the worst case [7], [8], \(H\) being the total number of episodes of interactions with the MDP. Even if the real world is arguably better behaved than the worst-case MDP, the most successful algorithms [9], [10] still take thousands of interaction episodes to learn a competitive policy in simulation, which draws pessimism for RL to be applied for learning in the real world.
A promising direction to improve RL efficiency is meta RL [11], in which a distribution over the set of tasks we can face is considered. In meta RL, we first have a training phase on some tasks sampled from the latter distribution, for which the learning efficiency is less of an issue (e.g., a simulator is available). Then, we exploit the collected knowledge to achieve faster learning in a test task, which is assumed to come from the same distribution.
Much of the previous work in meta RL focuses on algorithms for the training stage [12]–[16], or analyse generalization of the trained model to the test task [17]–[21].
Here we study meta RL from a different perspective. We assume to have spent infinite time in the training phase, such that the task distribution can be recovered (we mean the full specifications of all the MDPs in the set, not just the task distribution itself), and we aim to minimize the regret against the optimal policy in the test task. Especially,
Does perfect meta RL training provably improve the learning efficiency on the test task against standard RL?
We believe that a positive answer is an essential theoretical ground for motivating meta RL, as there is little incentive to undergo a costly training (at least in terms of computation) without guarantees of improved efficiency on the test task.
Even in simple settings, in which the distribution is supported on a finite set of \(M\) tasks, meta RL provides little hope, as the regret still scales with \(\sqrt{H}\) in the worst case, with only marginal gains in the statistical efficiency w.r.t. standard RL [1], [22]. Nonetheless, under a common separation assumption on set of tasks [1], [23], i.e., there exists at least one reachable state-action pair that reveals one task against the others, the prospects of meta RL become brighter. [1] show that \(\mathcal{O}(M^2 \log (MH))\) regret can be achieved by first identifying the test task (with high probability) and then deploying the best policy for the latter. Their approach is somewhat wasteful in the identification, as the algorithm performs a sequence of one-vs-one tests on candidate tasks, which induces the \(M^2\) factor. However, it is unclear if the latter is necessary or better algorithms could be developed.
In this paper, we provide a nuanced study of the statistical barriers of test-time regret minimization in meta RL. First, we provide a lower bound \(\Omega (TM \log(H))\) for test-time regret minimization under separation, where \(T\) is the horizon of an interaction episode with the test MDP. Our lower bound demonstrates that the “wasteful” algorithm by [1] is nearly optimal and one factor \(M\) is unavoidable under separation alone. The way the lower bound is derived philosophically confirms that probing the MDP to first identify the test task and then exploit the collected information is not just reasonable but also optimal. Nevertheless, we note that a linear dependence with \(M\) is not desirable if we aim to scale meta RL to large task distributions.
Thus, we formulate stronger yet reasonable requirements under which the latter limitation may be overcome. To formalize our desiderata, we call strong identifiability a family of assumptions that allow for fast rates in \(H\) and \(M\) simultaneously, for which we provide three instances.
The first assumes the tasks can be partitioned in coherent clusters, such that the algorithm can efficiently identify the cluster to which the test task belongs, and then identify the latter within that cluster down the hierarchy. Clusters are fairly natural in practice, e.g., in a meta RL problem applied to movie recommendation systems, in which the set of tasks consists of different users with specific tastes. We could first provide recommendations to probe whether the test user especially likes a movie genre, and then provide fine-grained recommendations within the genre catalogue.
The second assumes that the test task can be identified following a tree structure. This means that the algorithm can split a subset from the current set of candidate tasks by collecting information on a single state-action pair, which allows to eliminate a large chunk of candidates at every iteration. This may happen in practice whenever the test task can be identified testing a sequence of revealing characteristics.
The third strong identifiability assumption we analyse is admitting the presence of a small number of revealing policies, which allow for collecting highly informative data irrespective of the test task, then to perform the identification without further interactions. To provide intuition on such policies, let us think of a meta RL problem in which the set of tasks consists of morphologies of terrains we aim to explore without daylight. A revealing policy would light a torch to probe the surroundings before taking the right direction for the test morphology.
Contributions. Our main contributions are:
We revise an analysis of domain randomization [1] through the lenses of meta RL, adapting their result on sim-to-real gap into a regret upper bound \(\mathcal{O}(M^2 \log(M H))\) for our setting (Section 3);
We derive a lower bound \(\Omega (TM \log(H))\) to test-time regret minimization under separation (Section 4) through original techniques that formally link our problem to Best Policy Identification [24]. The proof requires a tailored lower bound to the sample complexity of BPI, which can be of independent interest (Appendix 9);
We present structural assumptions beyond separation, called strong identifiability (Section 5). Those include: A clustering assumption that leads to a regret upper bound of order \(\mathcal{O}(T (K^2 + N^2) \log(N H))\), where \(K\) is the number of clusters and \(N\) is the size of the largest cluster; A tree structure assumption that leads to a regret of order \(\mathcal{O}(T d \log (d H) )\), where \(d = \log_{1 / \beta} M\) is the depth of the tree and \(\beta\) is the splitting factor; A revealing policies assumption that leads to a regret of order \(\mathcal{O}(T I \log (M H))\), where \(I\) is the number of revealing policies;
We provide additional sharp rates to the test-time regret for meta learning in bandits (Appendix 10).
Complete proofs of the theorems are in Appendix 8.
We first present the necessary background on MDPs and meta RL (Sections 2.1, 2.2) before formulating the learning problem we will address in the paper (Section 2.3).
Notation. Let \(\mathcal{A}\) a space of size \(|\mathcal{A}|\) with elements \(a \in \mathcal{A}\). Then, \(\mathcal{P}(\mathcal{A}) := (p \in [0, 1]^{|\mathcal{A}|} | \sum_{a \in \mathcal{A}} p(a) = 1)\) is the simplex for a finite \(\mathcal{A}\). Let \(p, q \in \mathcal{P}(\mathcal{A})\), their \(\ell 1\)-distance is \(\| p - q \|_1 = \sum_{a \in \mathcal{A}} |p (a) - q(a)|\), their total variation is \(\mathop{\mathrm{TV}}(p, q) = \sup_{a \in \mathcal{A}} |p(a) - q(a)|\), their Kullback-Leibler divergence is \(\mathop{\mathrm{KL}}(p, q) = \sum_{a \in \mathcal{A}} p(a) \log (p (a) / q(a))\) and \(\mathop{\mathrm{KL}}_{p | q} := \mathop{\mathrm{KL}}(p, q) + \mathop{\mathrm{KL}}(q, p)\). We will denote sets and sequences as \((a_i)_{i \in [I]} := (a_1, \ldots, a_I)\), where \([I] := (1, \ldots, I)\) for some constant \(I \in \mathbb{N}\).
A finite-horizon time-homogeneous Markov Decision Process [25] is defined by a tuple1 \(\mathcal{M}_i := (\mathcal{S}, \mathcal{A}, p_i, r_i, s_1, T)\) where \(\mathcal{S}\) is a finite set of states (\(S = |\mathcal{S}|\)), \(\mathcal{A}\) is a finite set of actions (\(A = |\mathcal{A}|\)), \(p_i: \mathcal{S}\times \mathcal{A}\to \mathcal{P}(\mathcal{S})\) is a transition model such that \(p_i (s' | s, a)\) denotes the conditional probability of transitioning to \(s'\) taking action \(a\) in state \(s\), \(r_i: \mathcal{S}\times \mathcal{A}\to [0, 1]\) is a reward function such that \(r_i (s, a)\) is the reward collected by taking action \(a\) in \(s\), \(s_1\) is the initial state,2 and \(T < \infty\) is the horizon of an episode.
An episode of interaction between an agent and the MDP \(\mathcal{M}_i\) goes as follows. At each step \(t \in [T]\), the agent observes \(s_t \in \mathcal{S}\) and takes \(a_t \in \mathcal{A}\). The environment transitions to \(s_{t + 1} \sim p_i (\cdot | s_t, a_t)\) and the agent collects \(r_i (s_t, a_t)\). Hence, an episode can be summarized through a sequence \(\tau = (s_t, a_t)_{t \in [T]}\) called a trajectory.
The agent selects its actions by means of a non-stationary Markovian policy \(\pi := (\pi_t: \mathcal{S}\to \mathcal{P}(\mathcal{A}))_{t \in [T]} \in \Pi\) where \(\pi_t (a | s)\) denotes the conditional probability of action \(a\) in state \(s\) at time step \(t\), and \(\Pi\) is the set of policies. We define the value at step \(t\) of playing policy \(\pi\) in state \(s\) of \(\mathcal{M}_i\) as \[V_{it}^\pi (s) := \mathop{\mathrm{\mathbb{E}}}_{\pi, \mathcal{M}_i} \left[ \sum_{ t' = t}^T r_i (s_{t'}, a_{t'}) \;\Big| \;s_t = s \right],\] where the expectation is on all the sources of randomness, i.e., the action selection induced by \(\pi\) and the state transitions induced by \(p_i\), which may be stochastic. We further denote \(V_i (\pi) := V_{i1} (s_1)\) the value of the policy in the initial state. The objective function of the agent in \(\mathcal{M}_i\) can then be written as \(\max_{\pi \in \Pi} V_i (\pi)\), where we denote as \(\pi^*\) the policy attaining the maximum and \(V^*_i := V_i (\pi^*)\). RL [2] is a paradigm for learning an (approximately) optimal policy \(\pi\), such that \(V_i^* - V_i (\pi) \leq \epsilon\) for some \(\epsilon > 0\), from sampled interactions with an unknown MDP \(\mathcal{M}_i\).
Meta RL [12], initially introduced by [26], extends the RL paradigm to a set of \(M\) MDPs \(\mathcal{M}:= (\mathcal{M}_i)_{i \in [M]} = (\mathcal{S}, \mathcal{A}, p_i, r_i, s_1, T)_{i \in [M]}\) having the same \(\mathcal{S}, \mathcal{A}, s_1, T\), but possibly different transition model \(p_i\) and reward \(r_i\). Just like in RL, the latter MDPs are typically unknown to the agent. In a process called training, the agent can collect interactions with a number of tasks3 drawn from \(\mathcal{M}\) according to a task distribution \(P \in \mathcal{P}(\mathcal{M})\) such that the probability of drawing \(\mathcal{M}_i\) is \(P(\mathcal{M}_i)\). In training, the agent collects information into a prior model, e.g., a policy, a model of transitions, or an algorithm, that is then used to address a RL problem on a test task \(\mathcal{M}_i\) assumed to be drawn from the same task distribution \(P\).
Bayesian RL [11] formulates the target of the training as learning a Bayes-optimal policy4 \(\pi_{\text{BO}}\in \mathop{\mathrm{arg\,max}}_{\pi \in \Pi} \mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i \sim P} [V_{i} (\pi)]\) under the distribution \(P\). As we describe below, here we study meta RL from a frequentist perspective rather than a Bayesian formulation.
In this paper, instead of focusing on the training phase of meta RL, we assume perfect knowledge of the set of tasks \(\mathcal{M}\), such that every transition model \(p_i\) and reward \(r_i\) are fully known to the agent. With this prior knowledge, we aim to minimize the test-time regret over \(H\) episodes \[\label{eq:test-time-regret} R_H (\mathcal{M}_i, \mathbb{A}) := \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = 1}^H V^*_i - V_i (\pi_h) \right]\tag{1}\] where \(\mathcal{M}_i \in \mathcal{M}\) is any test task, \(\pi_h\) is the policy deployed in episode \(h\) by algorithm \(\mathbb{A}\), and the expectation is over realizations of the episodes \(1, \ldots, H\) taken from \(\mathcal{M}_i\). The motivation for this objective is that comparing against the optimal policy for the test task, instead of an optimal policy on average over the task distribution [22], gives a regret measure that is robust to the worst-case task, arguably a minimal requirement given the perfect training assumption. We see the latter as a necessary first step towards a more realistic setting with approximate knowledge of \(\mathcal{M}\) only. If we cannot succeed with the former, the latter is hopeless.
Two other important observations are in order. First, in this paper we study the regret of adaptive algorithms \(\mathbb{A}\), that is, the deployed policy is Markovian within an episode, but can change from episode to episode. This is only slightly restrictive as the policy \(\pi_h\) is computed having the full history of realizations in previous episodes \(\mathcal{H}_h = ((s_{t,h},a_{t,h},r_{t,h})_{t \in [T]})_{h' \in [h]}\), which means an algorithm \(\mathbb{A}\) corresponds to a non-Markovian policy with low switching cost [27]. Second, the expression in 1 is different from the notion of Bayesian regret that is common Bayesian RL [11], in which the regret is taken in expectation over the task distribution \(P\) instead of taking the worst-case task. As a result, the optimal algorithm \(\mathbb{A}\) for the test-time regret does not correspond to the Bayes-optimal policy in general, although it holds \(R_H (\mathcal{M}_i, \pi_{\text{BO}}) = \mathcal{O}( M \cdot R_H(\mathcal{M}_i, \mathbb{A}))\) for any algorithm \(\mathbb{A}\) from [1].
In this section, we discuss the known results for the test-time regret minimization objective we described above. In this paper we especially care for fast rates, i.e., those settings in which the knowledge of the set of tasks and its structure allow to overcome the statistical barrier for regret minimization in finite-horizon RL, which we know is of order \(\Theta(\mathsf{poly}(T, S, A)\sqrt{H})\) from lower bounds and minimax algorithms [8], [28].
[1] address a regret minimization problem that is very close to our test-time regret formulation, although their narrative is centered around domain randomization rather than meta RL. When the set of tasks is finite, they provide a lower bound of order \(\Omega (\sqrt{D M H})\), in which \(D\) is the diameter of a communicating infinite-horizon MDP [1].5 The latter result demonstrates that additional assumptions are needed to break the \(\sqrt{H}\) barrier of RL.
To this end, [1] introduce a separation condition within the set of tasks \(\mathcal{M}\). Formally,
Assumption 1 (\(\lambda\)-separation [1]). For any \(\mathcal{M}_i, \mathcal{M}_j \in \mathcal{M}\), there exists \((s, a) \in \mathcal{S}\times \mathcal{A}\) such that \(\| (p_i - p_j)(\cdot | s, a) \|_1 \geq \lambda.\)
The latter assumption guarantees the existence of a revealing state-action pair to tell apart a task from another. This allows to design an algorithm which repeatedly tests that revealing state-action pair to identify the test task efficiently. First, we need to further make sure that the revealing state-action can be reached with meaningful probability.6
Definition 1. Let \(X (s | \mathcal{M}_i, \pi)\) denote the random variable of the first time step in which the state \(s \in \mathcal{S}\) is reached by playing policy \(\pi\) in the MDP \(\mathcal{M}_i\). Let \(X(s,a | \mathcal{M}_i, \pi)\) be the analogous for state-action pairs \((s, a) \in \mathcal{S}\times \mathcal{A}\).
Assumption 2 (Reachable MDPs). An MDP \(\mathcal{M}_i\) is reachable* if it holds \(\min_{\pi \in \Pi} \mathop{\mathrm{\mathbb{E}}}[X (s | \mathcal{M}_i, \pi)] \leq T / 2, \forall s \in \mathcal{S}\).*
With the combination of the latter assumptions, we can directly adapt the algorithmic solution in [1] to the finite-horizon setting.7 We report the pseudocode of the resulting procedure in Algorithm 1.
The procedure consists of two stages: An “Identify” stage aiming at identifying the test task with high probability (lines 2-11) and a “Commit” stage in which the collected information is exploited (line 12). The “Identify” stage works as follows. At each iteration, a pair of MDPs are drawn from the set of potential test tasks (line 3). A sampling routine (Algorithm 2) is invoked (line 5) to collect samples from the state-action pair where the transition models of the two tasks differ the most (see line 4). The collected information is used to eliminate the task that is less likely to be the test task within the drawn pair (lines 6-10). The “Identify” stage ends when the set of potential tasks \(\mathcal{D}\) is reduced to a single candidate. The “Commit” stage then runs the optimal policy of the candidate task for the remaining episodes.
We can provide the following regret upper bound for Algorithm 1 by adapting [1].
theoremmdpSeparationUpperBound Let \(\mathcal{M}\) be a set of MDPs for which Assumption 1, 2 hold. For any \(\mathcal{M}_i \in \mathcal{M}\), we have \[R_H (\mathcal{M}_i, \mathbb{A}) = \mathcal{O}\left( \frac{T M^2 \log (MH) \log^2 (SMH / \lambda)}{\lambda^4} \right)\] where \(\mathbb{A}\) is Algorithm 1 with inputs \(\mathcal{D}= \mathcal{M}\) and \(n = \frac{c \log^2 (S M H / \lambda) \log (MH)}{\lambda^4}\) for a sufficiently large constant \(c\).
The latter result is promising as it provides a fast rate with only logarithmic dependencies on \(H\), but it also scales super-linearly with the size of the set \(\mathcal{M}\), which is less than ideal for larger task sets. A natural question that arises is whether this is the best we can achieve under the considered separation condition. The latter is arguably a very important question as the separation condition is the minimal structural assumption that makes test-time regret minimization “interesting”, statistically separating the problem from RL. In the next section, we provide an answer through a lower bound specifically designed for this setting.
In this section, we analyze the statistical barrier for test-time regret minimization under separation (Assumption 1) by providing a novel lower bound. Formally,
theoremmdpSeparationLowerBound Let \(\mathcal{M}\) be a set of MDPs for which Assumptions 1, 2 hold. Let \(T > M\) and \(M - 1 \leq H \leq C\) for some constant \(C < \infty\). For any \(\mathcal{M}_i \in \mathcal{M}\), algorithm \(\mathbb{A}\), and confidence \(\delta \in (0, 1)\), we have \[R_H (\mathcal{M}_i, \mathbb{A}) = \Omega \left( \frac{T M \log (H)}{\lambda} \log \left( \frac{1}{\delta} \right) \right)\] with probability at least \(1 - \delta\).
Interesting observations come through the lenses of the result above. The lower bound shows that the regret rate of Algorithm 1 [1] matches the optimal dependencies in \(H, T\) factors, while it nearly matches the dependencies with \(\lambda\) and the size of the set of tasks \(M\). The factor of \(1 / \lambda\) is not surprising, tying the complexity of the problem to how hard it is to distinguish one task from another. The result has a fairly negative flavor on the dependency with \(M\) instead. It demonstrates that the regret of any algorithm achieving fast rate \(\log (H)\) has to scale at least linearly with \(M\) under separation, essentially implying that those algorithms are unfit for large sets of tasks.
Unfortunately, the latter settings in which the size of \(\mathcal{M}\) may grow exponentially with the size of the tasks, or even be infinite (e.g., when tasks are continuous), are extremely relevant in practice, and it is arguably where the promises of meta RL for improved efficiency are the most enticing.
An open question remains on whether there exist relevant meta RL settings in which the structure of the problem can be further exploited to achieve fast rates \(\log(H)\) while avoiding the dependence with \(M\). In the next section, we discuss structural assumptions that go beyond the separation condition and allow to obtain the most efficient algorithms for test-time regret minimization.
Before that, we briefly sketch the main components of the proof of Theorem [thr:mdp95lower95bound], which make use of original techniques and constructions that may be of independent interest. We defer thorough derivations to Appendix 8.2. Note that a gentler introduction to the lower bound in the meta bandit setting is reported in Appendix 10.
The key to our proof is to design a hard instance that links test-time regret minimization to the problem of best policy identification [24], and then invokes a lower bound to the sample complexity of the latter to derive the result. While instance-dependent lower bounds of this kind exist in the literature [29]–[31], as a preliminary step we derive a result that is specifically tailored to our setting. Here we do not report derivations, which are non-trivial adaptations from a lower bound for BPI in infinite-horizon MDPs [29]. We leave a detailed description to Appendix 9.
In Figure 3, we report a visualization of the instance constructed to derive the lower bound, which consists of \(M\) MDPs having \(2M + 3\) states and \(2\) actions each, a high-rewarding state \(s_H\), and an absorbing state \(s_L\) with zero reward. It is easy to see that the optimal policy for \(\mathcal{M}_i\) goes to the state \(s_i\) and then takes action \(a_1\), which gives the highest probability to visit \(s_H\). However, taking action \(a_1\) in every other state \(s_j \in (s_1, \ldots, s_M) \setminus s_i\) is only slightly sub-optimal, meaning that regret minimization is hard. Instead, it is easier to identify the test task \(\mathcal{M}_i\) first, by playing action \(a_1\) in the states \(s_j \in (s_{M + 1}, \ldots, s_{2M})\), for which at least one \((s_j, a_1)\) pair is guaranteed to reveal the test task against any other, and then to play the optimal policy thereafter. To formalize the latter intuition, we note that identifying the test task is equivalent to a BPI problem for this instance and we center the proof around the event \[\mathcal{E} := \big\{\text{``best policy is identified within H episodes''}\big\}.\] Then, we show that the regret is lower bounded by \(\Omega (\sqrt{H})\) when \(\mathcal{E}\) does not hold, which implies that solving the BPI problem is necessary to obtain the best rate.8 At this point, we invoke the BPI lower bound in Lemma 3, which simultaneously guarantees that \(\mathcal{E}\) holds with probability at least \(1 - \delta\) and that the regret is lower bounded by \[R_H (\mathcal{M}_i, \mathbb{A}) \geq \mathop{\mathrm{\mathbb{E}}}[\tau] \Delta_2\] where \(\mathop{\mathrm{\mathbb{E}}}[\tau] \geq TM / \lambda^2 \log (1 / 2.4 \delta)\) is the sample complexity of the BPI problem on the constructed instance and \(\Delta_2 := V^*_i - V (\pi) = \log (H) / \sqrt{H}\) is the value gap of playing a sub-optimal policy to identify the task. Theorem [thr:mdp95lower95bound] is obtained through additional algebraic manipulations.
In the previous section, we have settled the statistical complexity of test-time regret minimization in meta RL with a finite set of tasks under a common separation condition (Assumption 1 has been previously considered in [1] as is, while a stronger version of the condition has been used in [23]).
Especially, we provided a lower bound to the test-time regret of order \(\Omega (T M \log (H) / \lambda)\) and we showed that an “Identify-then-Commit” strategy [1] leads to a nearly matching upper bound \(\mathcal{O}(T M^2 \log(M H) / \lambda^4)\). Most importantly, our analysis shows that a linear dependence with the size \(M\) of the set of tasks cannot be avoided under the considered separation condition, at least if we aim for a fast rate in \(H\). In this section, we present stronger yet reasonable assumptions that allow for faster rates of the test-time regret. These assumptions implicitly discriminate the problem instances, which we call strongly identifiable, that are truly worth framing into a meta RL paradigm, as the latter provides undeniable statistical benefits over RL.
Definition 2 (Strong identifiability). Let \(\mathcal{M}\) be a set of MDPs for which Assumption 1 hold. \(\mathcal{M}\) is strongly identifiable* if, for all \(\mathcal{M}_i \in \mathcal{M}\), we can identify \(\mathcal{M}_i\) with high probability by only playing policies from a restricted policy class \(\Pi^{id}\) where \(|\Pi^{id}| \leq \gamma M\) for some factor \(\gamma \in (0, 1)\).*
Next, we provide three instances of strong identifiability, with specialized algorithms and corresponding analyses, while investigating a broader range of strongly identifiable problems is an interesting directions for future works.
Let us assume that the tasks in \(\mathcal{M}\) can be grouped in coherent clusters admitting a peculiar and testable property that allows to efficiently discriminate one cluster from the others. Formally,
Assumption 3 (\(KN\lambda\)-clustering). Let \(\mathcal{C}= (\mathcal{C}_k)_{k \in [K]}\) be a partition of \(\mathcal{M}\) such that \(|\mathcal{C}_k| \leq N\) for all \(k \in [K]\) and \(N > K\). For all \(\mathcal{C}_k \in \mathcal{C}\), there exists \((s,a) \in \mathcal{S}\times \mathcal{A}\) such that \(\min_{\mathcal{M}_i \in \mathcal{C}_k} \min_{\mathcal{M}_j \in \mathcal{M}\setminus \mathcal{C}_k} \| (p_i - p_j)(\cdot | s, a) \|_1 \geq \lambda.\)
Further, we consider a slightly stronger reachability condition within a cluster, which essentially assures that a state can be reached throughout the cluster with the same policy.
Assumption 4 (Cluster reachability). Let \(C_k \in \mathcal{C}\) be a cluster of reachable MDPs. For all \(\mathcal{M}_i, \mathcal{M}_j \in \mathcal{C}_k\) and \(s \in \mathcal{S}\), it holds \(\mathop{\mathrm{\mathbb{E}}}[X (s | \mathcal{M}_j, \pi_i)] \leq T / 2\) for \(\pi_i \in \mathop{\mathrm{arg\,min}}_{\pi \in \Pi} \mathop{\mathrm{\mathbb{E}}}[X (s | \mathcal{M}_i, \pi)]\).
The combination of latter assumptions allows to take a different algorithmic approach w.r.t. the standard separation condition (Assumption 1). Essentially, we can split the “Identify” stage of Algorithm 1 into two separate phases: First, we identify the cluster to which the test task belongs with high probability, then, we call Algorithm 1 to identify the test task within the cluster selected in the previous step. We call this procedure “Double-Identify-then-Commit” to underline the two-phase structure of the “Identify” stage. We report the pseudocode of the procedure in Algorithm 4.
Since both the number of clusters \(K\) and the size of each cluster are smaller than the size \(M\) of the set of MDPs \(\mathcal{M}\) under Assumption 3, the set of MDPs is strongly identifiable. Thus, we can expect the “Identify” stage of Algorithm 4 to be more efficient than the same stage of Algorithm 1 taking \(\mathcal{M}\) as input, which is confirmed by the result below.
theoremmdpClusteringUpperBound Let \(\mathcal{M}\) be a set of MDPs for which Assumption 2, 3, 4 hold. For any \(\mathcal{M}_i \in \mathcal{M}\), we have \[R_H (\mathcal{M}_i, \mathbb{A}) = \mathcal{O}\left( \frac{T (K^2 + N^2) \log (N H) \log^2 (\frac{S N H}{\lambda})}{\lambda^4} \right)\] where \(\mathbb{A}\) is Algorithm 4 with inputs \(\mathcal{M}, \mathcal{C}\), and \(n_\mathcal{C}= \frac{c \log^2 (S K H / \lambda) \log (KH)}{\lambda^4}\) for a sufficiently large constant \(c\).
While the latter proves a significant speed-up of the “Identify” stage, which can be relevant in practical settings, the regret does not essentially escape the quadratic dependency on the number of tasks \(M\). Indeed, if we look into the rate we get \(K^2 + N^2 \approx K^2 + M^2 / K^2\) as opposed to \(M^2\) with the separation condition (Assumption 1) alone. At this point, it is interesting to ask which kind of structure can lead to a regret rate that is truly sublinear in the number of tasks \(M\). In the next section, we achieve that by considering a tree structure on the set of MDPs \(\mathcal{M}\).
Let us suppose that for any set of candidate test MDPs we extract from the original set there always exist a state-action pair from which we can collect information to split the candidates in two subsets. For instance, we can think of a set of indoor physical domains with peculiar configurations, e.g., some with a window on the right-hand side and some without. If those states not only exist, but they are also easy to reach, we can then sequentially split the original set of MDPs to increasingly smaller subsets, until a single candidate remains. To formalize this intuition, we first define what we mean for a state-action to be easy-to-reach.
Assumption 5 (Strong reachability). Let \(\mathcal{D}\subseteq \mathcal{M}\) a set of MDPs. We say that \((s, a) \in \mathcal{S}\times \mathcal{A}\) is strongly reachable* in \(\mathcal{D}\) if, for all \(\mathcal{M}_i, \mathcal{M}_j \in \mathcal{D}\), it holds \(\mathop{\mathrm{\mathbb{E}}}[ X(s, a | \mathcal{M}_j, \pi_i)] \leq T / 2\) where \(\pi_i \in \mathop{\mathrm{arg\,min}}_{\pi \in \Pi} \mathop{\mathrm{\mathbb{E}}}[X(s, a | \mathcal{M}_i, \pi)]\).*
Then, we can formally define our structural assumption.
Assumption 6 (\(\beta\)-tree). Let \(\mathcal{M}\) be a set of MDPs and let \(\beta \in (\frac{1}{2},1)\). For all \(\mathcal{D}\subseteq \mathcal{M}\), there exist a strongly reachable \((s,a) \in \mathcal{S}\times \mathcal{A}\) and a partition \((\mathcal{D}^+, \mathcal{D}^-)\) of \(\mathcal{D}\) such that \(\min_{\mathcal{M}_i \in \mathcal{D}^+} \min_{\mathcal{M}_j \in \mathcal{D}^-} \| (p_i - p_j) (\cdot |s,a) \|_1 \geq \lambda\) where \(\max (|\mathcal{D}^+|, |\mathcal{D}^-|) / |\mathcal{D}| \leq \beta\).
The latter induces a tree structure on the set of MDPs, such that we can render the identification problem as traversing a (binary) decision tree. The routine works as follows, we start with the initial set of MDPs \(\mathcal{M}\), then we look for a state-action pair inducing a large enough split, which we visit several times to understand whether the test task belongs to \(\mathcal{D}^+\) or \(\mathcal{D}^-\). We can iterate these steps again on the resulting set, i.e., \(\mathcal{D}^+\) or \(\mathcal{D}^-\), so that the set of candidate MDPs iteratively shrinks towards one single MDP, which is our candidate test task for the remaining episodes. The pseudocode for the procedure is reported in Algorithm 5.
Clearly, the cost of the “Identify” stage of Algorithm 5, i.e., the number of times the while loop between lines 2-12 has to be executed, is tied to the depth of the tree structure, which is \(\log_{1 / \beta} (M)\) in the worst case. With this consideration, we can derive the following regret upper bound.
theoremmdpTreeUpperBound Let \(\mathcal{M}\) be a set of MDPs for which Assumption 5, 6 hold and let \(d = \log_{1 / \beta} (M)\). For any \(\mathcal{M}_i \in \mathcal{M}\), we have \[R_H (\mathcal{M}_i, \mathbb{A}) = \mathcal{O}\left( \frac{T d \log (d H) \log^2 (S d H / \lambda) }{\lambda^4} \right)\] where \(\mathbb{A}\) is Algorithm 5 with inputs \(\mathcal{M}\) and \(n = \frac{c \log^2 (S d H / \lambda) \log (d H)}{\lambda^4}\) for a sufficiently large constant \(c\).
What happens if we assume that we can extract from \(\mathcal{M}\) a small set of revealing policies that allow to traverse all of the revealing state-action pairs in expectation? We formalize this intuition in the following assumption. Then, we provide an algorithm and corresponding regret analysis that shows the quadratic dependence with \(M\) can be escaped.
Before stating the assumption, we define the set of revealing state-action pairs \(\overline{\mathcal{S}\mathcal{A}} \subseteq{\mathcal{S}\times \mathcal{A}}\) such that \(\forall \mathcal{M}_i, \mathcal{M}_j \in \mathcal{M}, \exists (s,a) \in \overline{\mathcal{S}\mathcal{A}} : \| (p_i - p_j) (\cdot | s, a) \|_1 \geq \lambda\). Then,
Assumption 7 (Revealing policy set). Let \(\mathcal{M}\) be a set of MDPs for which Assumption 1, 2 hold. There exists a set of policies \(\Pi_I\) of size \(|\Pi_I| \leq I\) such that \(\forall \mathcal{M}_i \in \mathcal{M}\) it holds \(\max_{\pi \in \Pi_I} \min_{(s, a) \in \overline{\mathcal{S}\mathcal{A}}} P (X (s, a | \mathcal{M}_i, \pi) \leq T) \geq 1 / 2.\)
In Algorithm 6, we report the pseudocode of a procedure that exploits Assumption 7 to increase the efficiency of the data collection for the “Identify” stage. First, the policies in \(\Pi_I\) are repeatedly deployed with the goal of collecting \(n\) samples for each revealing state-action pair in \(\overline{\mathcal{S}\mathcal{A}}\) within an “Explore” stage (lines 3-11). Then, differently from previous approaches, the “Identify” stage (lines 13-21) is carried out offline with the previously collected data, until the set of tasks \(\mathcal{D}\) is reduced to one candidate. Finally, in the “Commit” stage (line 22), the optimal policy \(\hat{\pi}\) in the identified test task \(\hat{\mathcal{M}}\) is deployed for the remaining episodes.
Now, we provide an upper bound to its test-time regret.
theoremmdpRevealingUpperBound Let \(\mathcal{M}\) be a set of MDPs for which Assumption 7 holds. For any \(\mathcal{M}_i \in \mathcal{M}\), we have \[R_H (\mathcal{M}_i, \mathbb{A}) = \mathcal{O}\left( \frac{T I \log (M H) \log^2 (S M H / \lambda)}{\lambda^4} \right)\] where \(\mathbb{A}\) is Algorithm 6 with inputs \(\mathcal{M}, \Pi_I, \overline{\mathcal{S}\mathcal{A}}\), \(n = \frac{c \log^2 (S M H / \lambda) \log (MH)}{\lambda^4}\) for a sufficiently large constant \(c\).
The latter result provides a fast rate for the test-time regret when \(I < M^2\), i.e., the problem is strongly identifiable. However, Algorithm 6 takes a set of revealing policies as input, leaving to the training phase the burden of providing it. Here we discuss briefly how this requirement can be avoided, while we leave as future work a thorough investigation.
Sampling from revealing policies. Instead of pre-computing a set of revealing policies, one may try to replicate the sampling of the “Explore” stage (lines 3-11) while interacting with the test task. In Algorithm 7 we describe an adaptive sampling procedure for this purpose. The idea is to iteratively compute a policy that maximizes the (expected) visitation of the revealing state-action pairs left uncovered. The latter objective can be encoded into a trajectory reward defined as in line 4. Once such a policy is computed (line 5), it can be deployed in the test task to collect a trajectory (line 6) and to update the set of the remaining state-action pairs to be covered (line 7). The process repeats until of the revealing state-action pairs have been visited (lines 3-9).
To implement Algorithm 7, two technical hurdles have to be overcome. First, the trajectory reward in line 4 is non-standard. A naive solution is to encode in the state space the necessary information to define the reward on a state level or, alternatively, to adapt algorithms to deal with trajectory rewards [32], [33]. Secondly, the problem in line 5 is akin to a robust MDP, which is known to be intractable in general [34]. To address the latter, a policy gradient method [35] can be used to get an approximate solution efficiently, although this may slow down convergence of the while loop (lines 3-9) as opposed to deploying (in line 6) the exact solution of the problem.
While we are not aware of any previous work explicitly addressing test-time regret minimization under perfect training within the meta RL paradigm, slight variations of our problem setting have been considered in different domains.
As we extensively reported in the previous sections, [1] provides theoretical results on the sim-to-real gap in domain randomization that can be transferred to our setting almost verbatim. Their sim stage coarsely correspond to our training, while their real stage is our test task, for which they study a notion of regret against the optimal policy specific to the task. Differently from our setting, they consider infinite-horizon MDPs and they analyse the regret rate of a Bayes-optimal policy instead of our adaptive algorithms. Notably, they assume to have recovered an exact Bayes-optimal policy from simulations, which is similar in nature to our perfect training assumption. In their setting of interest, they provide regret guarantees of order \(\mathcal{O}(M^2 \log (MH))\) for finite set of tasks under separation, \(\mathcal{O}(M^2 \sqrt{H})\) for finite set of tasks without separation, and \(\mathcal{O}(\sqrt{d_E H})\) for infinite set of tasks with function approximation, where \(d_E\) is the eluder dimension of the function class. Finally, they provide a lower bound \(\Omega (H)\) for finite sets without separation. We fill the gaps in their analysis providing a lower bound specialized for the separation condition and assumptions beyond separation for faster rates.
The work by [22] studies generalization guarantees of pre-training in RL, in terms of Bayesian and frequentist regret, zero-shot generalization or with additional test-time interaction. The latter setting in the frequentist regret formulation is the analogous to our test-time regret minimization, for which they provide a policy-collection elimination algorithm with regret of order \(\mathcal{O}(\sqrt{\mathbb{C} (P) H})\), where \(\mathbb{C} (P)\) is a measure of complexity of the task distribution. Although the complexity \(\mathbb{C} (P)\) can capture structured finite or infinite set of tasks, it does not allow for escaping the \(\sqrt{H}\) regret of standard RL.
[23] address regret minimization in Latent MDPs (LMDPs). In their setting, at every episode a task is drawn from a set of finite but unknown tasks, for which the agent tries to minimize the regret against an optimal policy for the specific task. Essentially, LMDPs formalism can be seen as a variation of our setting in which the test task is not persistent but changes at every episode, and the agent does not have full knowledge of the transition dynamics of the tasks, which have to be estimated from samples. In its full generality, LMDPs are statistically intractable. Analogously to our work, they consider a (stronger) version of the separation condition to achieve a regret rate of order \(\mathcal{O}(\sqrt{MH})\) for their inherently harder setting. Further variations of LMDPs have been studied, including reward-mixing MDPs [36], [37], analogous of LMDPs with fixed dynamics but changing rewards, LMDPs with side information partially revealing the current task [38], and mixture of MDPs [39].
In this paper, we provided a formal study on the statistical barriers of test-time regret minimization under strong structural assumptions, shedding light on when meta RL can be expected to provide significant benefits over standard RL.
First, we settled the complexity of test-time regret minimization under separation deriving a lower bound specialized for the assumption, for which only upper bounds were known in the literature. Then, to overcome the (super)linear dependency with the size of the set of tasks, we studied a family of structural assumptions beyond separation, i.e., the set of tasks can be grouped in coherent clusters, the test task can be identified following a tree structure, or a small set of revealing policies can be deployed to identify the test task.
Future works may extend our results in various directions. Additional structural assumptions fitting in the broad family of strong identifiability may be investigated, as well as separation conditions at the level of trajectory generation processes rather than single state-action pairs. Understanding the impact of approximate training, i.e., only imperfect estimates of the tasks’ transition dynamics are available, on our test-time regret minimization results is important to bring our analysis in a more realistic setting. Whether there exists minimal assumptions that allow for fast rates of order \(\log (H)\) for infinite set of tasks is also a question worth investigating.
Finally, we hope that our theoretical study can bring inspiration to design practical algorithms for improved efficiency of test-time learning in meta RL.
This research was Funded by the European Union (ERC, Bayes-RL, 101041250). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency (ERCEA). Neither the European Union nor the granting authority can be held responsible for them.
The authors thank Shie Mannor for insightful discussions on an early draft of this work.
This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here.
In this section, we provide complete derivations to prove the theoretical results presented in the paper.
Here we prove the upper bound to the test-time regret under separation of Algorithm 1, which is a straightforward adaptation of the derivations in [1] to the finite-horizon setting.
Proof. Analogously as in [1], the proof is based on showing that the true MDP \(\mathcal{M}_i\) will not be eliminated from \(\mathcal{D}\) (lines 6-10 in Algorithm 1) with probability at least \(1 - 1 / H\) [1]. Especially, we can write \[\begin{align} P \Big( &\text{``\mathcal{M}_i is eliminated from \mathcal{D}''} \Big) \\ &= P \left( \bigcup_{m = 1}^{M - 1} \text{``\mathcal{M}_i is eliminated from \mathcal{D} at iteration m''} \right) \\ &\leq \sum_{m = 1}^{M - 1} P \Big( \text{``\mathcal{M}_i is eliminated from \mathcal{D} at iteration m''} \Big) \end{align}\] by noting that the loop in lines 2-11 of Algorithm 1 is executed for \(M - 1\) iterations and then applying a union bound. Next, we call Lemma 1 to prove that the event “\(\mathcal{M}_i\) is eliminated from \(\mathcal{D}\) at iteration \(m\)” holds with probability less than \(1 / MH\).9
Then, we just need to prove that those \(n\) samples rquired by Lemma 1 can be collected efficiently through the sampling routine in Algorithm 2, which is where our approach differs from [1]. In Lemma 2, we provide a quick adaptation of their infinite-horizon communicating MDP setting to our finite-horizon reachable MDP setting.
Now let \(H_0\) the number of episodes needed to collect \(n\) samples through Algorithm 2 for every time is called from Algorithm 1 (line 5), which is \(M - 1\) times in total. We have \[\mathop{\mathrm{\mathbb{E}}}[H_0] = h_0 \leq 2 (M - 1) M n \leq \frac{c M^2 \log^2 (SMH / \lambda) \log (MH)}{\lambda^4}.\] Finally, we can write \[\begin{align} R_H (\mathcal{M}_i, \pi) &= \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = 1}^{h_0} V_i^* - V_i (\pi_h) \right] + \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = h_0}^H V_i^* - V_i (\hat{\pi}) \right] \leq \frac{c T M^2 \log^2 \left(\frac{SMH}{\lambda}\right) \log (MH)}{\lambda^4} \end{align}\] by noting that \(\mathop{\mathrm{\mathbb{E}}}[ \sum_{h = 1}^{h_0} V_i^* - V_i (\pi_h) ] \leq \mathop{\mathrm{\mathbb{E}}}[H_0] T\) through \(r_i (s, a) \in [0, 1], \forall \mathcal{M}_i \in \mathcal{M}\), and that \(\mathop{\mathrm{\mathbb{E}}}[ \sum_{h = h_0}^H V_i^* - V_i (\hat{\pi}) ] \leq T\), as it is \(V_i^* - V_i (\hat{\pi}) = 0\) with probability at least \(1 - 1 / H\) and \(V_i^* - V_i (\hat{\pi}) \leq T H\) with probability at most \(1 / H\). ◻
Lemma 1 ([1]). Let \(\mathcal{X}= (s'_1, \ldots, s'_n)\) be a set of \(n = \frac{c \log^2 (S M H / \lambda) \log (MH)}{\lambda^4}\) independent samples from \(p_i (\cdot | \bar s, \bar a)\) for a large enough constant \(c\) and let \(\mathcal{M}_1\) be an MDP such that \(\| (p_i - p_1) (\cdot|\bar s, \bar a) \|_1 \geq \lambda\). Then, it holds \[\prod_{s' \in \mathcal{X}} \frac{p_i (s'| \bar s, \bar a)}{p_1 (s'| \bar s, \bar a)} > 1\] with probability at least \(1 - 1 / MH\).
Lemma 2. Let \(\mathcal{M}_i \in \mathcal{D}\) an MDP and let \(H_0\) a random variable denoting the number of episodes needed by Algorithm 2 to collect \(n\) samples from \(p_i (\cdot | \bar s, \bar a)\) in \(\mathcal{M}_i\). We can upper bound the expected number of episodes as \(h_0 := \mathop{\mathrm{\mathbb{E}}}[H_0] \leq 2 M n\).
Proof. We can follow similar steps as in [1]. From Assumption 2 we have that \(\mathop{\mathrm{\mathbb{E}}}(X (\bar s|\mathcal{M}_i, \pi_i)) \leq T / 2\) for \(\pi_i \in \mathop{\mathrm{arg\,min}}_{\pi \in \Pi} \mathop{\mathrm{\mathbb{E}}}[X (\bar s | \mathcal{M}_i, \pi)]\). Then, by applying the Markov’s inequality \(P(X(\bar s | \mathcal{M}_i, \pi_i) \geq T) \leq \mathop{\mathrm{\mathbb{E}}}[X(\bar s | \mathcal{M}_i, \pi_i)] / T\) we get \[X (\bar s | \mathcal{M}_i, \pi_i) \leq T \label{eq:Markov95inequality}\tag{2}\] with probability at least \(1 / 2\). Let \(Y\) be the random variable denoting the number of episodes needed to reach state \(\bar s\). From 2 , we have that \(P(Y = k) \leq 1 / 2^k\), which gives \(\mathop{\mathrm{\mathbb{E}}}[Y] \leq \sum_{k = 1}^{\infty} k / 2^k = 2\). Since Algorithm 2 deploys \(\pi_j \in \mathop{\mathrm{arg\,min}}_{\pi \in \Pi} \mathop{\mathrm{\mathbb{E}}}[X (\bar s | \mathcal{M}_j, \pi)]\) for all \(\mathcal{M}_j \in \mathcal{D}\) (lines 4-9), then also \(\pi_i\) is deployed. ◻
Here we provide complete derivations for the proof of the lower bound to the test-time regret under separation, which we briefly sketched in Section 4. In the proof, we will refer to the hard instance depicted in Figure 3 of the main paper.
Proof. The key idea behind this proof is to construct an instance of the problem in which it is hard to minimize the regret without knowing the MDP, whereas it is easy to identify the MDP playing sub-optimal policies.
The instance consists of \(M\) MDPs having \(2M + 3\) states and \(2\) actions each. Figure 3 depicts the sample MDP \(\mathcal{M}_i \in \mathcal{M}\), but all of the MDPs in the instance are similarly constructed. For any \(\mathcal{M}_i \in \mathcal{M}\), the state \(s_{in}\) is the initial state such that \(p (s_1 | s_{in}, a_1) = p (s_{M + 1} | s_{in}, a_2) = 1\), \(s_L\) is an absorbing state with \(p(s_L | s_L, a_1) = p(s_L | s_L, a_2) = 1\), \(s_H\) is an high-reward state such that \(p (s_L | s_H, a_1) = p (s_L | s_H, a_2) = 1\) and \(r (s_H, a_1) = r(s_H, a_2) = 1\). For all the other states \(s \in \mathcal{S}\setminus (s_H)\) we have \(r (s, a_1) = r (s, a_2) = 0\). The states \(s \in \mathcal{S}\setminus (s_H, s_L, s_{in})\) are arranged in two different chains: \((s_1, \ldots, s_i, \ldots, s_M)\) on the left and \((s_{M + 1}, \ldots, s_{M + i}, \ldots, s_{2M})\) on the right, respectively. In every state of those chains, the action \(a_2\) gives a deterministic transition to the next state in their respective chain, i.e., \(p(s_{j + 1} | s_j, a_2) = 1, \forall s_j \in (s_1, \ldots, s_{M - 1}) \cup (s_{M + 1}, \ldots, s_{2M - 1})\) and self-loops \(p (s_M | s_M, a_2) = p(s_{2M} | s_{2M}, a_2) = 1\) for the closing end of the chains. For any \(\mathcal{M}_i \in \mathcal{M}\), the state \(s_i\) is the one leading to the state \(s_H\) with higher probability than all of the other states \(p_i (s_H | s_i, a_1) = 1\). For all of the other states in the left chain, i.e., \(s \in (s_1, \ldots, s_M) \setminus (s_i)\), the transition to \(s_H\) has probability \(p_i (s_H | s, a_1) = 1 - \Delta_1 = 1 - 1 / \sqrt{H}\). In the right chain, the states are divided in two groups of \(M/2\) states, which are \(\mathcal{G}_1 := (s_{M + i}, \ldots, s_{\frac{3M}{2} + i})\) and \(\mathcal{G}_2 := (s_{M + 1}, \ldots, s_{M + i - 1}) \cup (s_{\frac{3M}{2} + i}, \ldots, s_{2M})\).10 The transition model is equivalent within the two groups, which is \(p_i (s_H | s \in \mathcal{G}_1, a_1) = 1 - \Delta_2 = 1 - \log (H) / \sqrt{H}\) and \(p_i (s_H | s \in \mathcal{G}_{2}, a_1) = 1 - \Delta_2 - \lambda / 2 = 1 - \log(H) / \sqrt{H} - \lambda / 2\). Thanks to the construction of \(\mathcal{G}_1\) and \(\mathcal{G}_2\), for every pair \(\mathcal{M}_i, \mathcal{M}_j \in \mathcal{M}\) there is at least one state-action pair for which the \(\lambda\)-separation holds (Assumption 1). To ease the visual inspection of the sample MDP \(\mathcal{M}_i\) in Figure 3, the state \(s_i\) and related transitions are blue colored, the states in \(\mathcal{G}_1\) and related transitions are red colored.
Together with the described instance, we use terminology from best policy identification (see Appendix 9 for details) to define a convenient event around which the analysis is centered. We consider a class of stopping rules \(\tau\) such that \(\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [\tau] \leq H\), and we define: \[\mathcal{E} = \Big\{ \hat{\pi}_\tau \in \mathop{\mathrm{arg\,max}}\nolimits_{\pi \in \Pi} V_i(\pi) \;: \;\text{``best policy is identified within H steps''} \Big\}.\] To derive the lower bound, we consider the two cases in which \(\mathcal{E}\) hold or does not hold with high probability, respectively.
If the event \(\mathcal{E}\) does not hold with high probability, i.e., \(\mathbb{P} (\mathcal{E}) < 1 - \delta\), then we can show that the regret scales with \(\Omega (\sqrt{H})\).
Let us consider any triplet \((\pi, \tau, \hat{\pi}_\tau)\). Without loss of generality, we take \(\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i}[\tau] = h\), from which we have \[\label{eq:regret95bad95event95mdp} \mathcal{R}_{H} (\mathcal{M}_i, \pi) = \mathcal{R}_{h} (\mathcal{M}_i, \pi) + \sum_{\bar h = h}^H V_{i}^* - V_{i} (\hat{\pi}_\tau) \geq \mathcal{R}_{h} (\mathcal{M}_i, \pi) + (H - h) \Delta_1\tag{3}\] with probability at least \(\delta\). The latter inequality is obtained by noting that the set of policies going to the left in the initial state \(\pi_1 (a_1 | s_{in}) = 1\), then taking action \(a_1\) at some state \(s_j \in (s_1, \ldots, s_M)\), and then taking the same action until the episode ends (formally, \(\pi_t (a_2 | s_t) = 1\) for all \(t < j\), \(\pi_j (a_1 | s_j) = 1\), and \(\pi_t (a_1 | s_H) = \pi_t (a_1 | s_L) = 1\) for all \(t > j\)) include an optimal policy for every \(\mathcal{M}_i \in \mathcal{M}\). We denote this sufficient set of policies as \(\widetilde{\Pi}\). For any MDP \(\mathcal{M}_i \in \mathcal{M}\), it holds \(V_{i} (\pi) = \Delta_1\) for all \(\pi \in \widetilde{\Pi} \setminus (\pi^*_i)\) and \(V^*_i = 1\), which gives the above.
Then, we lower bound the term \(\mathcal{R}_{h} (\mathcal{M}_i, \pi)\) in 3 through regret minimization. Due to how the instance is constructed, there is no incentive to take action \(a_2\) in \(s_{in}\) since the best policy identification fails in the bad event. Thus, we restrict the set of policies to \(\widetilde{\Pi}\) again. Notably, this set of policies is finite, having size \(|\widetilde{\Pi}| = M\). We can cast the regret minimization problem over this set of policies as a bandit with \(M\) actions with parameters \((\mu_j = V_{i} (\pi_j))_{j \in [M]}\) for some arbitrary ordering of the policies in \(\widetilde{\Pi}\). It is easy to see that the regret of the original MDP problem cannot be smaller than the regret of the latter bandit reformulation, which we can lower bound through the techniques in the proof of Theorem 1. We have \[\label{eq:regret95reduced95to95bandit} \mathcal{R}_{h} (\mathcal{M}_i, \pi) \geq \frac{h \Delta_1}{8} \exp \left( - \frac{ h (\Delta_1)^2 }{2} \right).\tag{4}\] Finally, substituting 4 into 3 we get \[\mathcal{R}_{H} (\mathcal{M}_i, \pi) \geq \frac{h \Delta_1}{8} \exp \left( - \frac{ h (\Delta_1)^2 }{2} \right) + (H - h) \Delta_1 \geq \frac{\sqrt{H}}{8} \exp \left( - \frac{1}{2} \right)\] with probability at least \(\delta\), where the last inequality is obtained by taking \(\Delta_1 = 1 / \sqrt{H}\) and noting that the left-hand side is minimized for \(\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [\tau] = h = H\).
The previous result states that the regret is at least \(\Omega (\sqrt{H})\) when the event \(\mathcal{E}\) does not hold with high probability. This hints that solving the best policy identification problem is necessary to minimize the regret. To derive the lower bound, we instantiate a proper best policy identification problem on the considered instance \(\mathcal{M}\) and we derive the corresponding sample complexity through Lemma 3. We have \(\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [\tau] \geq T^* (\mathcal{M}_i)^{-1} \log (1 / 2.4 \delta)\) where \[T^* (\mathcal{M}_i) = \sup_{\omega \in \Sigma (\mathcal{M}_i)} \inf_{\mathcal{M}_j \in \mathcal{M}_{-i}} \sum_{s, a} \omega (s, a) \mathop{\mathrm{KL}}_{\mathcal{M}_i | \mathcal{M}_j} (s,a).\] From Assumption 1 and the Pinsker’s inequality we have \[\mathop{\mathrm{KL}}_{\mathcal{M}_i | \mathcal{M}_j} (s,a) \geq 4 \text{TV}^2 (p_i(\cdot | s, a), p_j (\cdot | s, a)) \geq \| (p_i - p_j)(\cdot | s, a) \|_1^2 \geq \lambda^2.\] By staring at the instance, it can be seen that the allocation vector attaining the supremum is the one assigning even probabilities to all the pairs \((s_{M + x},a_1)_{x \in [M]}\), as it guarantees \(\omega(s,a) = 1 / TM\) for at least two revealing state-action pairs against any MDP \(\mathcal{M}_j \in \mathcal{M}_{- i}\), such that \(\sum_{s, a} \omega (s, a) \mathop{\mathrm{KL}}_{\mathcal{M}_i | \mathcal{M}_j} (s, a) \geq \frac{2\lambda^2}{TM}\), while any other allocation can be hacked by the infimum over \(\mathcal{M}_j \in \mathcal{M}_{-i}\) to a lesser value.11
We just need to show that the desired allocation can be obtained and does not violate the flow constraints of the MDP (see the statement of Lemma 3). We set \(\omega (s_1, a_2, 1) = 1\), which implies \(\sum_a \omega (s_{M + x}, a) \leq 1 / T, \forall x \in [M]\), since the states of the right chain cannot be visited more than once in an episode. Then, we set \(\omega (s_{M + x}, a_1) = 1 / TM, \forall x \in [M]\) from the desired allocation, which gives \(\omega (s_{M + x}, a_1, x + 1) = 1 / M, \forall x \in [M]\). We have \[\begin{align} \omega(s_{M + 1}, a_1, 2) = \frac{1}{M} \;\text{ and } \;&\omega(s_{M + 1}, a_2, 2) = \frac{M - 1}{M} \\ &\text{from } \;\sum_a \omega (s_{M + 1}, a, 2) = \sum_{s', a'} p_i (s_{M + 1} | s', a') \omega (s', a', 1) = \omega (s_1, a_2, 1) = 1, \\ \omega(s_{M + 2}, a_1, 3) = \frac{1}{M} \;\text{ and } \;&\omega(s_{M + 2}, a_2, 3) = \frac{M - 2}{M} \\ &\text{from } \;\sum_a \omega (s_{M + 2}, a, 3) = \sum_{s', a'} p_i (s_{M + 2} | s', a') \omega (s', a', 2) = \omega (s_{M + 1}, a_2, 2) = \frac{M - 1}{M}, \\ \omega(s_{M + 3}, a_1, 4) = \frac{1}{M} \;\text{ and } \;&\omega(s_{M + 3}, a_2, 4) = \frac{M - 3}{M} \\ &\text{from } \;\sum_a \omega (s_{M + 3}, a, 4) = \sum_{s', a'} p_i (s_{M + 3} | s', a') \omega (s', a', 3) = \omega (s_{M + 2}, a_2, 3) = \frac{M - 2}{M}, \\ \ldots \\ \omega(s_{2M}, a_1, M + 1) = \frac{1}{M} \;\text{ and } \;&\omega(s_{2M}, a_2, M + 1) = 0 \\ &\text{from } \;\sum_a \omega (s_{2M}, a, M + 1) = \sum_{s', a'} p_i (s_{2M} | s', a') \omega (s', a', M) = \omega (s_{2M - 1}, a_2, M) = \frac{1}{M}, \end{align}\] which gives \(\omega (s_{M + x}, a_2, x) = \frac{M - x}{M}, \forall x \in [M]\), while all of the additional probability to have \(\omega (s, a, t) \in \mathcal{P}(\mathcal{S}\times \mathcal{A}), \forall t \in [T]\) is absorbed by \(s_L\) and \(s_H\).
Having proved that the desired allocation complies to the flow constraints, we proceed as \[\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [\tau] \geq \frac{TM}{2\lambda^2} \log \left( \frac{1}{2.4 \delta} \right).\] Finally, we can derive the lower bound through \[\begin{align} \mathcal{R}_H (\mathcal{M}_i, \pi) \geq \mathop{\mathrm{\mathbb{E}}}\nolimits_{\mathcal{M}_i} [\tau] \Delta_2 &= \frac{TM}{2\lambda^2} \frac{\log(H)}{ \sqrt{H}} \log \left( \frac{1}{2.4\delta} \right) \\ &\geq \frac{1}{4 (\sqrt{C} - \log (C)) } \frac{TM \log (H)}{\lambda} \log \left( \frac{1}{2.4\delta} \right) \end{align}\] where the last inequality is obtained by exploiting \(H \leq C\) and that transition probabilities are in \([0, 1]\) to write \(\frac{\lambda}{2} + \frac{\log (H)}{\sqrt{H}} \leq 1\), which gives \(\lambda \leq \frac{ 2( \sqrt{C} - \log(C))}{\sqrt{H}}\). ◻
Here we report the proofs for the test-time regret upper bounds provided in Theorem [thr:mdp95upper95bound95clustering], [thr:mdp95upper95bound95tree], [thr:mdp95upper95bound95revealing95policies], respectively.
Proof. The derivations are straightforward following the steps in the proof of Theorem [thr:mdp95upper95bound95separation] and being careful to count the expected number of episodes for both the “Identify” stages.
For the first “Identify” stage (lines 3-12 in Algorithm 4), we want to make sure that the cluster \(\mathcal{C}^i_k\) to which the test task belongs, i.e., \(\mathcal{M}_i \in \mathcal{C}_k^i\), is not eliminated from the set \(\mathcal{C}\) with probability at least \(1 - 1 / 2H\). We write \[\begin{align} P \Big( &\text{``\mathcal{C}_k^i is eliminated from \mathcal{C}''} \Big) \leq \sum_{u = 1}^{K - 1} P \Big( \text{``\mathcal{C}_k^i is eliminated from \mathcal{C} at iteration u''} \Big) \end{align}\] by noting that the loop is executed \(K - 1\) times and through a union bound on the iterations. Next, we call Lemma 1 on the MDPs \(\mathcal{M}_1, \mathcal{M}_2\) selected at line 4 (Algorithm 4) on the set \(\mathcal{X}\) of samples collected at line 5 (Algorithm 4) to prove that the event “\(\mathcal{C}_k^i\) is eliminated from \(\mathcal{C}\) at iteration \(u\)” holds with probability less than \(1 / 2KH\), and we further invoke Lemma 2 to prove that \(\mathcal{X}\) can be collected efficiently from the sampling routine (Algorithm 2). Let us denote \(H_0\) the random variable associated to the number of episodes spent in the first “Identify” stage. We have \[\label{eq:mdp95clustering95proof951} \mathop{\mathrm{\mathbb{E}}}[H_0] = h_0 \leq 2 (K - 1) K n_{\mathcal{C}} \leq \frac{c_0 K^2 \log^2 (SKH / \lambda) \log (KH)}{\lambda^4}.\tag{5}\]
Then, we look at the second “Identify” stage (lines 3-11 in Algorithm 1), which is called at line 12 of Algorithm 4 on the cluster \(\hat{\mathcal{C}}\) resulting from the previous stage. Just like before, we want to make sure that the MDP \(\mathcal{M}_i\) is not eliminated from the set \(\hat{\mathcal{C}}\) with probability at least \(1 - 1 / 2H\). We write \[\begin{align} P \Big( &\text{``\mathcal{M}_i is eliminated from \hat{\mathcal{C}}''} \Big) \leq \sum_{u = 1}^{N - 1} P \Big( \text{``\mathcal{M}_i is eliminated from \hat{\mathcal{C}} at iteration u''} \Big) \end{align}\] by noting that the loop is executed at most \(N - 1\) times and through a union bound on the iterations. This follows verbatim the proof of Theorem [thr:mdp95upper95bound95separation] on the cluster \(\hat{\mathcal{C}}\) insetad of \(\mathcal{M}\), for which we can call Lemma 1 and Lemma 2 to get similar results. We denote as \(H_1\) the random variable associated to the number of episodes spent in the second “Identify” stage. We have \[\label{eq:mdp95clustering95proof952} \mathop{\mathrm{\mathbb{E}}}[H_1] = h_1 \leq 2 (N - 1) N n \leq \frac{c_1 N^2 \log^2 (SNH / \lambda) \log (NH)}{\lambda^4}.\tag{6}\]
Then, we can call yet another union bound on the events defined for the two “Identify” stages and, with similar considerations as in Theorem [thr:mdp95upper95bound95separation], we write \[\begin{align} R_H (\mathcal{M}_i, \pi) &= \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = 1}^{h_0 + h_1} V_i^* - V_i (\pi_h) \right] + \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = h_0 + h_1}^H V_i^* - V_i (\hat{\pi}) \right] \\ &\leq \frac{c_0 T K^2 \log^2 (SKH / \lambda) \log (KH)}{\lambda^4} + \frac{c_1 T N^2 \log^2 (SNH / \lambda) \log (NH)}{\lambda^4} \\ &\leq \frac{c T (K^2 + N^2) \log^2 (SNH / \lambda) \log (NH)}{\lambda^4} \end{align}\] where we plugged 5 and 6 together with \(\mathop{\mathrm{\mathbb{E}}}[ \sum_{h = 1}^{h_0 + h_1} V_i^* - V_i (\pi_h) ] \leq \mathop{\mathrm{\mathbb{E}}}[H_0 + H_1] T\) to get the first inequality, \(c = \max (c_0, c_1)\) and \(N > K\) to obtain the second inequality. ◻
Proof. The proof follows derivations of Theorem [thr:mdp95upper95bound95separation] with some slight yet crucial modifications. Just as in Theorem [thr:mdp95upper95bound95separation], we want to show that the true MDP \(\mathcal{M}_i\) will not be eliminated from \(\mathcal{D}\) (lines 2-18 in Algorithm 5) with probability at least \(1 - 1/H\). However, the number of times the loop in lines 3-18 of Algorithm 5 is executed is not \(M\), as in Theorem [thr:mdp95upper95bound95separation], but depends on the depth of the tree structure given by Assumption 6. Since the size of \(\mathcal{D}\) is reduced at every iteration by a factor \(\beta\) at least, we have \[M \beta^\text{depth} \leq 1 \quad \implies \quad \text{depth} \leq \frac{\log (1 / M)}{\log (\beta)} = \log_{1 / \beta} (M) =: d.\] With the latter, we can write \[P \Big( \text{``\mathcal{M}_i is eliminated from \mathcal{D}''} \Big) \leq \sum_{m = 1}^{d} P \Big( \text{``\mathcal{M}_i is eliminated from \mathcal{D} at iteration m''} \Big)\] through a union bound on the iterations. Then, we call Lemma 1 (with care of substituting \(M\) with \(d\) the result holds verbatim) to prove that each event “\(\mathcal{M}_i\) is eliminated from \(\mathcal{D}\) at iteration \(m\)” in the summation holds with probability less than \(1 / d H\).
For each iteration of the outer loop (lines 3-18), we want to prove that the \(n\) samples from \((\bar s, \bar a)\) can be collected efficiently through the inner loop (lines 6-12). We follow similar steps as in Lemma 2. Through Assumption 5, we have that \(\mathop{\mathrm{\mathbb{E}}}[X (\bar s, \bar a | \mathcal{M}_i, \pi)] \leq T / 2\). By applying the Markov’s inequality we get \(X (\bar s, \bar a | \mathcal{M}_i, \pi) \leq T\) with probability at least \(1 / 2\). Let \(Y\) the random variable denoting the number of episodes needed to reach state \((\bar s, \bar a)\) in the test MDP \(\mathcal{M}_i\). We have that \(P(Y = k) \leq 1 / 2^k\), which gives \(\mathop{\mathrm{\mathbb{E}}}[Y] \leq \sum_{k = 1}^{\infty} k / 2^k = 2\). Thus, the expected number of episodes to collect the \(n\) samples is upper bounded by \(2n\).
Let \(H_0\) denote the random variable associated to the number of episodes spent in the “Identify” stage as a whole (lines 2-18). From the considerations above, we have \[\label{eq:mdp95tree95proof951} \mathop{\mathrm{\mathbb{E}}}[H_0] = h_0 \leq 2 d n \leq \frac{c d \log^2 (S d H / \lambda) \log (d H)}{\lambda^4}.\tag{7}\] Then, we can write \[\begin{align} R_H (\mathcal{M}_i, \pi) &= \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = 1}^{h_0} V_i^* - V_i (\pi_h) \right] + \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = h_0}^H V_i^* - V_i (\hat{\pi}) \right] \leq \frac{c T d \log^2 \left(\frac{S d H}{\lambda}\right) \log (d H)}{\lambda^4} \end{align}\] where we plugged 7 together with \(\mathop{\mathrm{\mathbb{E}}}[ \sum_{h = 1}^{h_0} V_i^* - V_i (\pi_h) ] \leq \mathop{\mathrm{\mathbb{E}}}[H_0] T\) to get the inequality. ◻
Proof. The proof follows the derivation of Theorem [thr:mdp95upper95bound95separation] verbatim, with the only difference that the samples \(\mathcal{X}\) for each iteration of the loop in the “Identify” stage (lines 13-21 of Algorithm 6) are entirely collected during the “Explore” stage (lines 3-11). Analogously as before, we show that the true MDP \(\mathcal{M}_i\) will not be eliminated from \(\mathcal{D}\) (lines 6-10 in Algorithm 1) with probability at least \(1 - 1 / H\). Especially, we can write \[\begin{align} P \Big( &\text{``\mathcal{M}_i is eliminated from \mathcal{D}''} \Big) \leq \sum_{m = 1}^{M - 1} P \Big( \text{``\mathcal{M}_i is eliminated from \mathcal{D} at iteration m''} \Big) \end{align}\] by noting that the loop in the “Identify” stage is executed for \(M - 1\) iterations and then applying a union bound. Just like before, we call Lemma 1 to prove that the event “\(\mathcal{M}_i\) is eliminated from \(\mathcal{D}\) at iteration \(m\)” holds with probability less than \(1 / MH\), and then we invoke Lemma 2 to prove that the “Explore” stage can collect the desired number of samples efficiently. Let \(H_0\) denote the random variable associated to the number of episodes spent in the “Explore” stage. Following similar considerations as in the proof of Theorem [thr:mdp95upper95bound95separation], we have \[\label{eq:mdp95revealing95proof951} \mathop{\mathrm{\mathbb{E}}}[H_0] = h_0 \leq 2 I n \leq \frac{c I \log^2 (SMH / \lambda) \log (MH)}{\lambda^4}.\tag{8}\] Then, we can write \[\begin{align} R_H (\mathcal{M}_i, \pi) &= \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = 1}^{h_0} V_i^* - V_i (\pi_h) \right] + \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = h_0}^H V_i^* - V_i (\hat{\pi}) \right] \leq \frac{c T I \log^2 \left(\frac{SMH}{\lambda}\right) \log (MH)}{\lambda^4} \end{align}\] where we plugged 8 together with \(\mathop{\mathrm{\mathbb{E}}}[ \sum_{h = 1}^{h_0} V_i^* - V_i (\pi_h) ] \leq \mathop{\mathrm{\mathbb{E}}}[H_0] T\) to get the inequality. ◻
In Best Policy Identification [24], the learner interacts with an unknown MDP \(\mathcal{M}_i\) with the goal of minimizing the expected number of samples to be taken in order to tell an optimal policy \(\pi^* \in \mathop{\mathrm{arg\,max}}_{\pi \in \Pi} V_{i} (\pi)\) for \(\mathcal{M}_i\) with probability at least \(1 - \delta\), where \(\delta \in (0, 1)\) is a fixed confidence.
The literature provides theoretical guarantees on the latter expected number of samples, called sample complexity, in a variety of settings ranging from worst-case results for discounted [40], [41] and finite-horizon MDPs [42]–[45] to instance-dependent analyses [29]–[31], [46]–[48].
For the purpose of deriving a lower bound for test-time regret minimization (Theorem [thr:mdp95lower95bound]), we use, as a building block, an instance-dependent, non-asymptotic lower bound to the sample complexity of any \(\delta\)-PC (Probably Correct) BPI algorithm in finite-horizon MDPs.12 To the best of our knowledge, the only result of this kind is given in [31]. Here we derive an alternative result that is tailored to our setting, i.e., in which the set of possible MDPs is restricted to a finite set \(\mathcal{M}\) fulfilling the \(\lambda\)-separation (Assumption 1).
Let \(\mathcal{H}_h := (s_t, a_t, r_t)_{t \in [T]}\) be a trajectory collected by executing a policy \(\pi_h\) at the episode \(h\). We denote \(\mathcal{F}_h := \sigma((\mathcal{H}_{h'})_{h' \in [h]})\) the sigma algebra of the trajectories up to episode \(h\), such that \((\mathcal{F}_{h'})_{h' \in [h]}\) is the corresponding filtration. We define
\((\pi_{h'} : \mathcal{F}_{h' - 1} \to \mathcal{P}(\mathcal{A}))_{h' \in [h]}\) a sampling rule that determines the policy to be run at each episode given the past observations;
\(\tau\) a stopping rule that gives the time at which the sampling process is stopped given past observations;
\(\hat{\pi}_\tau \in \Pi\) a decision rule, which is the policy selected when \(\tau\) is triggered, i.e., the best guess on the optimal policy given past observations.
We denote as \(\mathop{\mathrm{\mathbb{E}}}[\tau]\) the sample complexity of the BPI problem. Notably, the identification can span several episodes of our finite-horizon MDP setting, which means that at any step \(h'\) such that \(mod (k', T) = 0\) the process will be reset to state \(s_1\). To simplify the analysis, we assume that whenever the stopping rule \(\tau\) is triggered, the process proceeds until the end of the episode, which means the sample complexity is a multiple of \(T\).
Now, we have all of the elements to derive our tailored lower bound. Specifically, we adapt to our BPI problem of interest the result [29], which was originally derived for the infinite-horizon and \(\delta\)-asymptotic setting. We obtain the following.
Lemma 3 (Best policy identification). Let assume all the \(\mathcal{M}_j \in \mathcal{M}\) admit unique optimal policies. For \(\mathcal{M}_i \in \mathcal{M}\), let us define the set of allocation vectors \[\begin{align} \Sigma (\mathcal{M}_i) = \Big\{ \omega \in \mathcal{P}(\mathcal{S}\times \mathcal{A}) :\quad &\omega (s, a) = \frac{1}{T} \sum_{t \in [T]} \omega (s, a, t), \\ &\omega (\cdot, \cdot, 1) \in \mathcal{P}(\mathcal{S}\times \mathcal{A}), \quad \sum_{a \in \mathcal{A}} \omega (s_1, a, 1) = 1, \\ &\forall (s, t) \in \mathcal{S}\times (2, \ldots, T), \quad \sum_{a \in \mathcal{A}} \omega (s, a, t) = \sum_{s', a'} p_{i} (s | s', a') \omega (s', a', t - 1) \Big\}. \end{align}\] Let \(\mathcal{M}_{-i} := \mathcal{M}\subseteq \mathcal{M}_i\). For \(\delta \in (0, 1)\), any \(\delta\)-PC BPI algorithm has sample complexity \[\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [\tau] \geq T^* (\mathcal{M}_i)^{-1} \log (1 / 2.4 \delta) \quad \text{ where } \quad T^* (\mathcal{M}_i) = \sup_{\omega \in \Sigma (\mathcal{M}_i)} \inf_{\mathcal{M}_j \in \mathcal{M}_{-i}} \sum_{s, a} \omega (s, a) \mathop{\mathrm{KL}}_{\mathcal{M}_i | \mathcal{M}_j} (s,a).\]
Proof. The derivations are adapted from the proof of Proposition 2 in [29]. First, we report a sample complexity result on best policy identification with a generative model [46], which, for any \(\mathcal{M}_j \in \mathcal{M}_{-i}\), states that \[\sum_{s, a} \mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [N_{\tau} (s, a)] \mathop{\mathrm{KL}}_{\mathcal{M}_i | \mathcal{M}_j} (s,a) \geq \text{kl} (\delta, 1 - \delta) \label{eq:generative95model95sample95complexity}\tag{9}\] where \(N_{\tau} (s, a)\) is the number of samples of the \((s, a)\) pair collected within \(\tau \in \mathbb{N}\) steps and \(\text{kl} (x, y)\) denotes the Kullback Leibler divergence between Bernoulli distributions with parameters \(x, y\) respectively. Differently from the generative model setting, we have to enforce MDP constraints on \(\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [N_{\tau} (s, a)]\), which gives the recursive expression \[\begin{align} &\text{if } mod(\tau, T) \neq 0 & \sum_{a} \mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [ N_\tau (s, a)] = \sum_{s', a'} p_{\mathcal{M}_i} (s | s', a') \left(\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [N_{\tau - 1} (s', a')] + 1 \right), \quad \forall (s, a) \in \mathcal{S}\times \mathcal{A}\\ &\text{else} &\sum_{a} \mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [ N_\tau (s_1, a) ] = \sum_{a}\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [ N_{\tau - 1} (s_1, a) ] + 1 \quad \text{and} \quad \mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [ N_\tau (s, a) ] = \mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [ N_{\tau - 1} (s, a)], \quad \forall s \neq s_1. \end{align}\] Then, we can combine the latter constraints with 9 to write the following optimization problem \[\begin{align} &\inf_{n \geq 0} \sum_{s, a, t} n_{sat} \tag{10} \\ &\text{subject to } \sum_{s,a,t} n_{sat} \mathop{\mathrm{KL}}_{\mathcal{M}_i | \mathcal{M}_j} (s, a) \geq \text{kl} (\delta, 1 - \delta) & \forall \mathcal{M}_j \in \mathcal{M}_{-i} \tag{11} \\ & \sum_{a} n_{sat} = \sum_{s',a'} p_{\mathcal{M}_i} (s | s', a') (n_{s'a't-1} + 1) & \forall s, \forall t : mod(t, T) \neq 0 \tag{12} \\ & \sum_a n_{s_1 at} = \sum_a n_{s_1 at-1} + 1 & \forall t : mod(t, T) = 0 \tag{13} \\ & n_{sat} = n_{sat-1} & \forall s \neq s_1, \forall t : mod(t, T) = 0 \tag{14} \end{align}\] To prove the result, let us take the constraint 11 . Since it has to hold for every \(\mathcal{M}_j \in \mathcal{M}_{-i}\), we can write \[\inf_{\mathcal{M}_j \in \mathcal{M}_{-i}} \sum_{s,a,t} n_{sat} \mathop{\mathrm{KL}}_{\mathcal{M}_i | \mathcal{M}_j} (s, a) \geq \text{kl} (\delta, 1 - \delta).\] Let us denote \(N^*\) the value of 10 , we write \[\inf_{\mathcal{M}_j \in \mathcal{M}_{-i}} \sum_{s,a,t} \frac{n_{sat}}{N^*} \mathop{\mathrm{KL}}_{\mathcal{M}_i | \mathcal{M}_j} (s, a) \geq \frac{\text{kl} (\delta, 1 - \delta)}{N^*}.\] Through constraints (12 14 ) and the definition of \(N^*\), we have that \((n_{sat} / N^*) \in \Sigma(\mathcal{M}_i)\), where the latter is the set of allocation vectors. Hence, we can write \[\sup_{\omega \in \Sigma(\mathcal{M}_i)} \inf_{\mathcal{M}_j \in \mathcal{M}_{-i}} \sum_{s,a} \omega (s,a) \mathop{\mathrm{KL}}_{\mathcal{M}_i | \mathcal{M}_j} (s, a) \geq \frac{\text{kl} (\delta, 1 - \delta)}{N^*}.\] Finally, we know from [29] that \(\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [\tau] \geq N^*\), which together with \(\text{kl} (\delta, 1 - \delta) \geq \log(1 / 2.4 \delta)\) [49] gives the result. ◻
In this section, we analyze a simplified bandit version of the test-time regret minimization problem described in the paper. The aim of this study is to serve both as a gentle introduction to the more advanced results and techniques presented in the paper, which come more naturally in the bandit setting, as well as a standalone analysis that may be of independent interest.
We consider a class \(\mathcal{M}= (\mathcal{M}_i)_{i \in [M]}\) of bandits [50], each of them having a set of actions \(\mathcal{A}= (a_j)_{j \in [A]}\) with corresponding reward distributions \(R_i (a_j)\) for all \(i \in [M], j \in [A]\) with bounded mean \(\mu_{ij} \in [0, 1]\). First, we rephrase the separation condition presented in the paper (Assumption 1) as follows,
Assumption 8 (\(\lambda\)-separation (bandit)). For any \(\mathcal{M}_i, \mathcal{M}_j \in \mathcal{M}\), there exists \(a \in \mathcal{A}\) such that \(\| R_i (a) - R_j (a) \|_1 \geq \lambda.\)
Just like in the MDP setting, we assume the reward distribution of all bandits \(\mathcal{M}_i \in \mathcal{M}\), as well as the set \(\mathcal{M}\) itself, to be fully known to the agent, who faces a test task (i.e., bandit) that is instead unknown but belonging to \(\mathcal{M}\). To evaluate the agent’s performance, we redefine the \(H\)-steps test-time regret for the task \(\mathcal{M}_i \in \mathcal{M}\) as \[\mathcal{R}_H (\mathcal{M}_i, \pi) = \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = 1}^H R_i(a^*) - R_i(a_h) \right] = \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = 1}^H \mu^* - \mu_h \right]\] where \(a^* \in \mathop{\mathrm{arg\,max}}_{a \in \mathcal{A}} \mu (a)\) is the optimal action in the bandit \(\mathcal{M}_i\), \(a_h \in \mathcal{A}\) is the action played by policy \(\pi\) at step \(h\), and \(\mu^*, \mu_h\) are the mean of their reward distribution, respectively. Just as we did in the paper for the more general MDP setting, we provide both a lower bound and a nearly minimax optimal algorithm for the test-time regret minimization in bandits.
We now prove a lower bound to the test-time regret suffered by any algorithm in the introduced meta learning in bandits setting under the above separation condition (Assumption 8). Formally,
Theorem 1 (Lower bound). Let \(\mathcal{M}\) be a set of bandits for which Assumption 8 holds. Let \(C < \infty\) a constant, and let \(\delta \in (0, 1)\). For any horizon \(M - 1 \leq H \leq C\), it holds \[R_H (\mathcal{M}_i, \pi) = \Omega \left( \frac{M \log (H)}{\lambda} \log \left( \frac{1}{\delta} \right) \right)\] with probability at least \(1 - \delta\).
Proof. To prove the lower bound, we first construct a convenient instance in which it is hard to minimize the regret without knowing the task, while it is easy to identify the task playing sub-optimal actions. Then, we derive the lower bound on the regret suffered by any algorithm leveraging minimax lower bounds for standard bandits [50] and best arm identification results [51].
Let \(\mathcal{M}= (\mathcal{M}_i)_{i \in [M]}\) a problem instance in which every \(\mathcal{M}_i\) has \(|\mathcal{A}| = 2M\) actions and Gaussian reward distributions \(R_i (a_j) = \mathcal{N} (\mu_{ij}, 1)\). For each \(\mathcal{M}_i\), we specify the first set of \(M\) actions \((a_j)_{j = 1}^{M}\) as follows: The action \(a_i\) is the optimal action with mean \(\mu_i = \mu^*\), while all of the other actions are slightly sub-optimal \(\mu^* - \mu_j = \Delta_1 = 1 / \sqrt{H}\). The second set of actions \((a_j)_{j = M + 1}^{2M}\) is specified as follows: The actions \(\mathcal{A}_1 := (a_{M + i}, \ldots, a_{\frac{3M}{2} + i})\) have mean reward such that \(\mu^* - \mu_a = \Delta_2 = \log(H) / \sqrt{H}, \forall a \in \mathcal{A}_1\), and all of the other actions \(\mathcal{A}_2 := (a_{M + 1}, \ldots, a_{M + i - 1}) \cup (a_{\frac{3M}{2} + i + 1}, \ldots, 2M)\) have mean reward \(\mu_a < \mu_{M + i}\) such that \(\| R(a_{M + i}) - R (a) \|_1 \geq \lambda, \forall a \in \mathcal{A}_2\), fulfilling \(\lambda\)-separation. The instance is depicted in Figure 8.13
In general, there are two ways to approach the described instance. Since it is known that the second set of \(M\) actions is sub-optimal in every \(\mathcal{M}_i\), we can minimize the regret playing only the first set of actions. Otherwise, we can exploit the separation condition on the second set of arms to identify the task and then playing the optimal arm. To formalize this intuition, we borrow notation from best arm identification literature [51] similarly as we did in Appendix 9.
Let \(\mathcal{H}_h := (a_{h'}, r_{h'})_{h' \in [h]}\) be a trajectory collected by executing a policy \(\pi\). We denote \(\mathcal{F}_{h \geq 1}\) the corresponding filtration on \(\mathcal{H}_h\). We define
\((\pi_{h'})_{h' = 1}^h\) a sampling rule over \(\mathcal{A}\) that determines the next action to play given past observations;
\(\tau\) a stopping rule that gives the stopping time w.r.t. \(\mathcal{H}_h\);
\(\hat{a}_\tau \in \mathcal{A}\) a decision rule, which is the action selected when \(\tau\) is triggered, i.e., the best guess on the optimal arm given past observations.
We denote as \(\mathop{\mathrm{\mathbb{E}}}[\tau]\) the sample complexity of the best arm identification problem. Further, we restrict \(\tau\) to the class of stopping rules such that \(\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [\tau] \leq H\), and we define the following event: \[\mathcal{E} = \Big\{ \hat{a}_\tau \in \mathop{\mathrm{arg\,max}}\nolimits_{a \in \mathcal{A}} \mu(a) \;: \;\text{``best arm is identified within H steps''} \Big\}.\] To derive the lower bound, we consider the two cases in which \(\mathcal{E}\) hold or does not hold with high probability, respectively.
If the event \(\mathcal{E}\) does not hold with high probability, i.e., \(\mathbb{P} (\mathcal{E}) < 1 - \delta\), we can show that the regret scales with \(\Omega (\sqrt{H})\).
Let us consider any triplet \((\pi, \tau, \hat{a}_\tau)\). Without loss of generality, we take \(\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i}[\tau] = h\), from which we have \[\label{eq:regret95bad95event} \mathcal{R}_{H} (\mathcal{M}_i, \pi) = \mathcal{R}_{h} (\mathcal{M}_i, \pi) + (H - h) \Delta_1\tag{15}\] with probability at least \(\delta\).
First, we lower bound the term \(\mathcal{R}_{h} (\mathcal{M}_i, \pi)\) through regret minimization. We can restrict the action set to \(\tilde{\mathcal{A}}= (a_j)_{j = 1}^M\) as there is no incentive to play surely sub-optimal actions \(a_j\) for \(j > M\) when minimizing the regret. We take a policy \(\pi\) inducing pulls \((a_{h'})_{h' = 1}^h\) and corresponding counts \(T_j (h) := \sum_{h' = 1}^h \mathbf{1} (a_j = a_{h'})\) over the actions \(\tilde{\mathcal{A}}\) of \(\mathcal{M}_1\). Then, we select \(\mathcal{M}_i \in \mathcal{M}\) such that \(i = \mathop{\mathrm{arg\,min}}_{j \in [M]} \mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_1} [T_j (h)]\). We have that \[\max_{\mathcal{M}^* \in \mathcal{M}} \mathcal{R}_h (\mathcal{M}^*, \pi) \geq \max \left\{ \mathcal{R}_h (\mathcal{M}_1, \pi), \mathcal{R}_h (\mathcal{M}_i, \pi) \right\} \geq \frac{\mathcal{R}_h (\mathcal{M}_1, \pi) + \mathcal{R}_h (\mathcal{M}_i, \pi)}{2}.\] We can further expand the terms on the right hand-side by noting that \[\mathcal{R}_h (\mathcal{M}_1, \pi) \geq P_{\mathcal{M}_1} (T_1 (h) \leq h / 2) \frac{h \Delta_1}{2} \;\;\text{and} \;\;\mathcal{R}_h (\mathcal{M}_i, \pi) \geq P_{\mathcal{M}_i} (T_1 (h) > h / 2) \frac{h \Delta_1}{2}\] from which we can write \[\begin{align} \mathcal{R}_h (\mathcal{M}_1, \pi) + \mathcal{R}_h (\mathcal{M}_i, \pi) &> \frac{h \Delta_1}{2} \left( P_{\mathcal{M}_1} (T_1 (h) \leq h / 2) + P_{\mathcal{M}_i} (T_1 (h) > h / 2) \right) \\ &\geq \frac{h \Delta_1}{4} \exp \left( - \text{KL} (\mathbb{P}_{\mathcal{M}_1}, \mathbb{P}_{\mathcal{M}_i}) \right) \end{align}\] where the latter is obtained through the Bretagnolle-Huber inequality. Then, we can upper bound the KL divergence as \[\begin{align} \text{KL} & (\mathbb{P}_{\mathcal{M}_1}, \mathbb{P}_{\mathcal{M}_i}) \\ &= \mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_1} [T_1 (h)] \text{KL} (\mathcal{N} (\mu^*, 1), \mathcal{N} (\mu - \Delta_1, 1)) + \mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_1} [T_i (h)] \text{KL} (\mathcal{N} (\mu - \Delta_1, 1), \mathcal{N} (\mu^*, 1)) \\ &\leq \frac{(\Delta_1)^2}{2} \left( \mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_1} [T_1 (h)] + \mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_1} [T_i (h)] \right) \leq \frac{ h (\Delta_1)^2}{2} \end{align}\] from which we derive \[\max_{\mathcal{M}^* \in \mathcal{M}} \mathcal{R}_h (\mathcal{M}^*, \pi) \geq \frac{h \Delta_1}{8} \exp \left( - \frac{ h (\Delta_1)^2 }{2} \right).\] Finally, we substitute the latter in 15 to get \[\mathcal{R}_{H} (\mathcal{M}_i, \pi) \geq \frac{h \Delta_1}{8} \exp \left( - \frac{ h (\Delta_1)^2 }{2} \right) + (H - h) \Delta_1 \geq \frac{\sqrt{H}}{8} \exp \left( - \frac{1}{2} \right)\] with probability at least \(\delta\), where the last inequality is obtained by taking \(\Delta_1 = 1 / \sqrt{H}\) and noting that the left-hand side is minimized for \(\mathop{\mathrm{\mathbb{E}}}_{\mathcal{M}_i} [\tau] = h = H\).
The previous result states that the regret is at least \(\Omega (\sqrt{H})\) when the event \(\mathcal{E}\) does not hold with high probability. This hints that solving the best arm identification problem is necessary to minimize the regret. To derive the lower bound, we instantiate a proper best arm identification problem on the considered instance \(\mathcal{M}\).
Since the separation condition is fulfilled in the second set of actions, we can restrict our best arm identification problem to the action set \(\hat{\mathcal{A}}= (a_j)_{j = M + 1}^{2M}\). From Theorem 1 in [51], for any confidence \(\delta \in (0, 1)\), we have that \[\mathop{\mathrm{\mathbb{E}}}\nolimits_{\mathcal{M}_i} [\tau] \geq T^* (\mathcal{M}_i)^{-1} \log (1 / 2.4 \delta)\] where \[\label{eq:t95star} T^* (\mathcal{M}_i)^{-1} := \sup_{\omega \in \mathcal{P}(\hat{\mathcal{A}}) } \inf_{\mathcal{M}_j \in \mathcal{M}\setminus (\mathcal{M}_i) } \left( \sum_{k = M + 1}^{2M} \omega_k \text{KL} (R_i(a_k), R_j (a_k)) \right)\tag{16}\] holds with probability \(1 - \delta\). From the separation condition (Assumption 8) and the Pinsker’s inequality we have \[\text{KL} (R_i(a), R_j (a)) \geq 2 \text{TV}^2 (R_i(a), R_j (a)) \geq \frac{1}{2} \| R_i(a) - R_j (a) \|_1^2 \geq \frac{\lambda^2}{2}\] for every \(i \neq j\). By noting that the supremum in 16 is attained by \(\omega = (1 / M, \ldots, 1 / M)\) we get \[\mathop{\mathrm{\mathbb{E}}}\nolimits_{\mathcal{M}_i} [\tau] \geq \frac{2M}{\lambda^2} \log \left( \frac{1}{2.4\delta} \right).\]
Finally, we can derive the lower bound through \[\mathcal{R}_H (\mathcal{M}_i, \pi) \geq \mathop{\mathrm{\mathbb{E}}}\nolimits_{\mathcal{M}_i} [\tau] \Delta_2 = \frac{2M}{\lambda^2} \frac{\log(H)}{ \sqrt{H}} \log \left( \frac{1}{2.4\delta} \right) \geq \frac{2}{\sqrt{C} - \log (C) } \frac{M \log (H)}{\lambda} \log \left( \frac{1}{2.4\delta} \right)\] where the last inequality is obtained by exploiting \(H \leq C\) and that the mean of the reward distribution is bounded in \([0, 1]\) to write \(\lambda + \frac{\log (H)}{\sqrt{H}} \leq 1\), which gives \(\lambda \leq \frac{\sqrt{C} - \log(C)}{\sqrt{H}}\). ◻
In this section, we provide a simple algorithm, which is practically a direct adaptation to the bandit setting of Algorithm 1, in turn inspired by [1], that nearly matches the lower bound presented in the previous section.
The idea of the algorithm is to exploit the knowledge of the class \(\mathcal{M}\) to quickly identify the test task \(\mathcal{M}^*\) and then commit to the optimal action \(a^*\) for \(\mathcal{M}^*\). The pseudocode of this simple procedure is provided in Algorithm 9.
The upper bound to the test-time regret suffered by Algorithm 9 is provided by the following result.
Theorem 2 (Upper bound). Let \(\mathcal{M}\) be a set of bandits for which Assumption 8 holds. For any \(H \geq M - 1\), we have \[R_H (\mathcal{M}_i, \hat{\pi}) = \mathcal{O}\left( \frac{M \log (MH)}{\lambda^4} \right)\] where \(\hat{\pi}\) is the sampling rule induced by Algorithm 9.
Proof. The scheme of the proof follows closely the one of [1], which is simplified and adapted to the bandit setting we care about here.
First, we note that the Algorithm 9 is made of two stages: An “Identify” stage (lines 2-11) in which we seek to find out the test task \(\mathcal{M}_i\) irrespective of the regret, a “Commit” stage (line 12) in which we exploit the gathered information to minimize the regret in the remaining steps. Notably, at every iteration of the while loop (lines 2-11) a potential task is eliminated from the set \(|\mathcal{D}|\), which means the “Identify” stage consists of exactly \(h_0 := (M - 1) n\) steps, and the “Commit” stage takes the remaining \(H - h_0\) steps. Thus, we can decompose the regret as \[R_H (\mathcal{M}_i, \hat{\pi}) = \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = 1}^{h_0} R_i(a^*) - R_i (\tilde{a}) \right] + \mathop{\mathrm{\mathbb{E}}}\left[ \sum_{h = h_0}^H R_i(a^*) - R_i (\hat{a}) \right]. \label{eq:bandit95upper95bound95decomposition}\tag{17}\] Now, we just need to upper bound the term on the left with \(h_0\) through \(R_i(a^*) - R_i (\tilde{a}) \leq 1\) and to show that the second term is zero with high probability to prove the result.
Since \(\hat{a}\) is the optimal action of the remaining task in the set \(\mathcal{D}\), to prove that it holds \(\mathop{\mathrm{\mathbb{E}}}[\sum_{h = h_0}^H R_i(a^*) - R_i (\hat{a}) ] = 0\) with high probability, we have to show that the test task \(\mathcal{M}_i\) is not eliminated from \(\mathcal{D}\) with high probability. Especially, for some confidence \(\delta \in (0, 1)\) we need \[\mathbb{P} \Big( \text{``M_i is eliminated from \mathcal{D}''} \Big) = \mathbb{P} \left( \prod_{x_h \in \mathcal{X}} \frac{R_i (x_h | \tilde{a})}{R_j (x_h | \tilde{a})} < 1 \right) \leq \frac{\delta}{M}\] where the right-hand side is obtained from a union bound over the event that the test task \(\mathcal{M}_i\) is eliminated in each iteration of the while loop (lines 2-11). Equivalently, we need \[\log \left( \prod_{x_h \in \mathcal{X}} \frac{R_i (x_h | \tilde{a})}{R_j (x_h | \tilde{a})} \right) = \sum_{x_h \in \mathcal{X}} \log \left( \frac{R_i (x_h | \tilde{a})}{R_j (x_h | \tilde{a})} \right) > 0\] to hold with probability at least \(1 - \frac{\delta}{M}\). First, we note that \[\begin{align} \mathop{\mathrm{\mathbb{E}}}_{x \sim R_i (\tilde{a})} \left[ \sum_{x_h \in \mathcal{X}} \log \left( \frac{R_i (x | \tilde{a})}{R_j (x | \tilde{a})} \right) \right] = \sum_{x_h \in \mathcal{X}} \mathop{\mathrm{\mathbb{E}}}_{x \sim R_i (\tilde{a})} \left[ \log \left( \frac{R_i (x | \tilde{a})}{R_j (x | \tilde{a})} \right) \right] = n \text{KL} (R_i (\tilde{a}), R_j (\tilde{a})) \leq \frac{n \lambda^2}{2} \end{align}\] where the last inequality is obtained from the separation condition (Assumption 8) and the Pinsker’s inequality. Then, we have \[\begin{align} \sum_{x_h \in \mathcal{X}} \log \left( \frac{R_i (x_h | \tilde{a})}{R_j (x_h | \tilde{a})} \right) \geq \mathop{\mathrm{\mathbb{E}}}_{x \sim R_i (\tilde{a})} \left[ \sum_{x_h \in \mathcal{X}} \log \left( \frac{R_i (x | \tilde{a})}{R_j (x | \tilde{a})} \right) \right] - \sqrt{\frac{n}{2} \log \left( \frac{2M}{\delta} \right)} \geq \frac{n \lambda^2}{2} - \sqrt{\frac{n}{2} \log \left( \frac{2M}{\delta} \right)} \end{align}\] with probability \(1 - \frac{\delta}{M}\) through the Hoeffding’s inequality. Now, we need to set \(n\) such that the right-hand side is greater than zero, which gives \(n = \frac{2 \log (\frac{2M}{\delta})}{\lambda^4}\) and \(h_0 = \frac{2 (M - 1) \log (\frac{2M}{\delta})}{\lambda^4}\).
Finally, we set \(\delta = \frac{1}{H}\) and we plug the expression into 17 . Noting that, in the bad event occurring with probability less than \(1 / H\) the right-hand side of 17 is still less than \(H\), we have \(\mathop{\mathrm{\mathbb{E}}}[ \sum_{h = h_0}^H R_i(a^*) - R_i (\hat{a}) ] \leq 1\) from which we get \[R_H (\mathcal{M}_i, \hat{\pi}) = \mathcal{O}\left( \frac{M \log (MH)}{\lambda^4} \right).\] ◻
The meaning of the subscripts will become clear later.↩︎
Note that unique initial state is without loss of generality, as we can accommodate an initial state distribution \(\mu \in \mathcal{P}(\mathcal{S})\) through a fictitious state \(s_0\) such that \(p(s|s_0, a) = \mu (s), \forall a \in \mathcal{A}\).↩︎
We are going to use the term task and MDP interchangeably.↩︎
Note that the Bayes-optimal policy is history-dependent in general [11].↩︎
Note that the results in [1] are given for a slightly different setting (detailed comparisons are in Section 6). We will explicitly adapt to our setting the most relevant results.↩︎
This is the technical adaptation of the communicating MDP assumption in [1] for the finite-horizon setting.↩︎
We refer to Algorithm 1 in [1], which we name here the “Identify-then-Commit” algorithm.↩︎
Note that this does not prescribe how the algorithm collect samples. It tells that, whatever the sampling strategy, the BPI problem has to be solved within \(H\) episodes.↩︎
Note that the derivations in the corresponding [1] apply verbatim as there is no assumption on how samples in \(\mathcal{X}\) are collected, and whether they are coming from a finite-horizon or an infinite-horizon MDP.↩︎
Here we consider \(i \leq M / 2\) for the sake of clarity. If \(i > M /2\) some of the indices of \(\mathcal{G}_1\) will exceed \(2M\), so that the exceeding states are to be taken from the start of the right chain \((s_{M + i}, s_{M + u})\), where \(u\) is the number of exceeding indices.↩︎
There are actually other allocation vectors that have equivalent value of \(T^* (\mathcal{M}_i)\), which is the one assigning even probabilities to all the pairs \((s, a_1)_{s \in \mathcal{G}_1}\) or \((s, a_1)_{s \in \mathcal{G}_2}\). For the sake of the proof, we use the most convenient to algebraic manipulations.↩︎
A \(\delta\)-PC algorithm [29] is an algorithm that is guaranteed to output an optimal policy \(\pi^*\) with probability at least \(1 - \delta\) with a finite sample complexity.↩︎
Note that, for describing the instance, we conveniently consider \(i \leq M / 2\), but it is straightforward to understand how it works for \(i > M/2\) by substituting the exceeding indices in \(\mathcal{A}_1\) back with the first arms of the sequence \(a_{M + 1}, a_{M + 2}, \ldots\) until \(\mathcal{A}_1\) consists of \(M / 2\) arms.↩︎