Learning Multiple Markov Chains via Adaptive Allocation
Mohammad Sadegh Talebi, Odalric-Ambrym Maillard

TL;DR
This paper introduces a new algorithm for learning multiple unknown ergodic Markov chains from sequential observations, balancing exploration and exploitation to achieve uniform learning performance without prior knowledge.
Contribution
It proposes a novel adaptive allocation algorithm with finite-sample guarantees that asymptotically attains optimal loss in learning multiple Markov chains.
Findings
Algorithm achieves uniform learning performance.
Finite-sample PAC guarantees provided.
Asymptotically optimal loss attained.
Abstract
We study the problem of learning the transition matrices of a set of Markov chains from a single stream of observations on each chain. We assume that the Markov chains are ergodic but otherwise unknown. The learner can sample Markov chains sequentially to observe their states. The goal of the learner is to sequentially select various chains to learn transition matrices uniformly well with respect to some loss function. We introduce a notion of loss that naturally extends the squared loss for learning distributions to the case of Markov chains, and further characterize the notion of being \emph{uniformly good} in all problem instances. We present a novel learning algorithm that efficiently balances \emph{exploration} and \emph{exploitation} intrinsic to this problem, without any prior knowledge of the chains. We provide finite-sample PAC-type guarantees on the performance of the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMachine Learning and Algorithms · Advanced Bandit Algorithms Research · Reinforcement Learning in Robotics
Learning Multiple Markov Chains
via Adaptive Allocation
Mohammad Sadegh Talebi
SequeL Team, Inria Lille – Nord Europe
&Odalric-Ambrym Maillard
SequeL Team, Inria Lille – Nord Europe
Abstract
We study the problem of learning the transition matrices of a set of Markov chains from a single stream of observations on each chain. We assume that the Markov chains are ergodic but otherwise unknown. The learner can sample Markov chains sequentially to observe their states. The goal of the learner is to sequentially select various chains to learn transition matrices uniformly well with respect to some loss function. We introduce a notion of loss that naturally extends the squared loss for learning distributions to the case of Markov chains, and further characterize the notion of being uniformly good in all problem instances. We present a novel learning algorithm that efficiently balances exploration and exploitation intrinsic to this problem, without any prior knowledge of the chains. We provide finite-sample PAC-type guarantees on the performance of the algorithm. Further, we show that our algorithm asymptotically attains an optimal loss.
1 Introduction
We study a variant of the following sequential adaptive allocation problem: A learner is given a set of arms, where to each arm , an unknown real-valued distributions with mean and variance is associated. At each round , the learner must select an arm , and receives a sample drawn from . Given a total budget of pulls, the objective is to estimate the expected values of all distributions uniformly well. The quality of estimation in this problem is classically measured through expected quadratic estimation error, for the empirical mean estimate built with the many samples received from at time , and the performance of an allocation strategy is the maximal error, . Using ideas from the Multi-Armed Bandit (MAB) literature, previous works (e.g., [1, 2]) have provided optimistic sampling strategies with near-optimal performance guarantees for this setup.
This generic adaptive allocation problem is related to several application problems arising in optimal experiment design [3, 4], active learning [5], or Monte-Carlo methods [6]; we refer to [1, 7, 2, 8] and references therein for further motivation. We extend this line of work to the case where each process is a discrete Markov chain, hence introducing the problem of active bandit learning of Markov chains. More precisely, we no longer assume that are real-valued distributions, but we study the case where each is a discrete Markov process over a state space . The law of the observations on arm (or chain) is given by , where denotes the initial distribution of states, and is the transition function of the Markov chain. The goal of the learner is to learn the transition matrices uniformly well on the chains. Note that the chains are not controlled (we only decide which chain to advance, not the states it transits to).
Before discussing the challenges of the extension to Markov chains, let us give further comments on the performance measure considered in bandit allocation for real-valued distributions: Using the expected quadratic estimation error on each arm makes sense since when are deterministic, it coincides with , thus suggesting to pull the distributions proportionally to . However, for a learning strategy, typically depends on all past observations. The presented analyses in these series of works rely on Wald’s second identity as the technical device, heavily relying on the use of a quadratic loss criterion, which prevents one from extending the approach therein to other distances. Another peculiarity arising in working with expectations is the order of “max” and “expectation” operators. While it makes more sense to control the expected value of the maximum, the works cited above look at maximum of the expected value, which is more in line with a pseudo-loss definition rather than the loss; actually in extensions of these works a pseudo-loss is considered instead of this performance measure. As we show, all of these difficulties can be avoided by resorting to a high probability setup. Hence, in this paper, we deviate from using an expected loss criterion, and rather use a high-probability control. We formally define our performance criterion in Section 2.3.
1.1 Related Work
On the one hand, our setup can be framed into the line of works on active bandit allocation, considered for the estimation of reward distributions in MABs as introduced in [1, 7], and further studied in [2, 9]. This has been extended to stratified sampling for Monte-Carlo methods in [10, 8], or to continuous mean functions in, e.g., [11]. On the other hand, our extension from real-valued distributions to Markov chains can be framed into the rich literature on Markov chain estimation; see, e.g., [12, 13, 14, 15, 16, 17]. This stream of works extends a wide range of results from the i.i.d. case to the Markov case. These include, for instance, the law of large numbers for (functions of) state values [17], the central limit theorem for Markov sequences [13] (see also [17, 18]), and Chernoff-type or Bernstein-type concentration inequalities for Markov sequences [19, 20]. Note that the majority of these results are available for ergodic Markov chains.
Another stream of research on Markov chains, which is more relevant to our work, investigates learning and estimation of the transition matrix (as opposed to its full law); see, e.g., [16, 15, 21, 22]. Among the recent studies falling in this category, [22] investigates learning of the transition matrix with respect to a loss function induced by -divergences in a minimax setup, thus extending [23] to the case of Markov chains. [21] derives a PAC-type bound for learning the transition matrix of an ergodic Markov chain with respect to the total variation loss. It further provides a matching lower bound. Among the existing literature on learning Markov chains, to the best of our knowledge, [21] is the closest to ours. There are however two aspects distinguishing our work: Firstly, the challenge in our problem resides in dealing with multiple Markov chains, which is present neither in [21] nor in the other studies cited above. Secondly, our notion of loss does not coincide with that considered in [21], and hence, the lower bound of [21] does not apply to our case.
Among the results dealing with multiple chains, we may refer to learning in the Markovian bandits setup [24, 25, 26]. Most of these studies address the problem of reward maximization over a finite time horizon. We also mention that in a recent study, [27] introduces the so-called active exploration in Markov decision processes, where the transition kernel is known, and the goal is rather to learn the mean reward associated to various states. To the best of our knowledge, none of these works address the problem of learning the transition matrix. Last, as we target high-probability performance bounds (as opposed to those holding in expectation), our approach is naturally linked to the Probably Approximately Correct (PAC) analysis. [28] provides one of the first PAC bounds for learning discrete distributions. Since then, the problem of learning discrete distributions has been well studied; see, e.g., [29, 30, 23] and references therein. We refer to [23] for a rather complete characterization of learning distribution in a minimax setting under a big class of smooth loss functions. We remark that except for very few studies (e.g., [29]), most of these results are provided for discrete distributions.
1.2 Overview and Contributions
Our contributions are the following: (i) For the problem of learning Markov chains, we consider a notion of loss function, which appropriately extends the loss function for learning distributions to the case of Markov chains. Our notion of loss is similar to that considered in [22] (we refer to Section 2.3 for a comparison between our notion and the one in [22]). In contrast to existing works on similar bandit allocation problems, our loss function avoids technical difficulties faced when extending the squared loss function to this setup. We further characterize the notion of a “uniformly good algorithm” under the considered loss function for ergodic chains; (ii) We present an optimistic algorithm, called BA-MC, for active learning of Markov chains, which is simple to implement and does not require any prior knowledge of the chains. To the best of our knowledge, this constitutes the first algorithm for active bandit allocation for learning Markov chains; (iii) We provide non-asymptotic PAC-type, and asymptotic bounds, on the loss incurred by BA-MC, indicating three regimes. In the first regime, which holds for any budget , we present (in Theorem 1) a high-probability bound on the loss scaling as , where hides factors. Here, and respectively denote the number of chains and the number of states in a given chain. This result holds for homogenous Markov chains. We then characterize a cut-off budget (in Theorem 2) so that when n\geq\text{{n_{\text{cutoff}}}}, the loss behaves as , where denotes the sum of variances of all states and all chains, and where denotes the transition probability of chain . This latter bound constitutes the second regime, in view of the fact that equals the asymptotically optimal loss (see Section 2.4 for more details). Thus, this bound indicates that the pseudo-excess loss incurred by the algorithm vanishes at a rate (we refer to Section 4 for a more precise definition). Furthermore, we carefully characterize the constant . In particular, we discuss that does not deteriorate with mixing times of the chains, which, we believe, is a strong feature of our algorithm. We also discuss how various properties of the chains, e.g., discrepancies between stationary distribution of various states a given chain, may impact the learning performance. Finally, we demonstrate a third regime, the asymptotic one, when the budget grows large, in which we show (in Theorem 3) that the loss of BA-MC matches the asymptotically optimal loss . All proofs are provided in the supplementary material.
Markov chains have been successfully used for modeling a broad range of practical problems, and their success makes the studied problem in this paper relevant in practice. There are practical applications in reinforcement learning (e.g., active exploration in MDPs [27]) and in rested Markov bandits (e.g., channel allocation in wireless communication systems where a given channel’s state follows a Markov chain111For example, in the Gilbert-Elliott channels [31].), for which we believe our contributions could serve as a technical tool.
2 Preliminaries and Problem Statement
2.1 Preliminaries
Before describing our model, we recall some preliminaries on Markov chains; these are standard definitions and results, and can be found in, e.g., [32, 33]. Consider a Markov chain defined on a finite state space with cardinality . Let denote the collection of all row-stochastic matrices over . The Markov chain is specified by its transition matrix and its initial distribution : For all , denotes the probability of transition to if the current state is . In what follows, we may refer to a chain by just referring to its transition matrix.
We recall that a Markov chain is ergodic if (entry-wise) for some . If is ergodic, then it has a unique stationary distribution satisfying . Moreover . A chain is said to be reversible if its stationary distribution satisfies detailed balance equations: For all , . Otherwise, is called non-reversible. For a Markov chain , the largest eigenvalue is (with multiplicity one). In a reversible chain , all eigenvalues belong to . We define the absolute spectral gap of a reversible chain as , where denotes the second largest (in absolute value) eigenvalue of . If is reversible, the absolute spectral gap controls the convergence rate of the state distributions of the chain towards the stationary distribution . If is non-reversible, the convergence rate is determined by the pseudo-spectral gap as introduced in [20] as follows. Define as: for all . Then, the pseudo-spectral gap is defined as:
2.2 Model and Problem Statement
We are now ready to describe our model. We consider a learner interacting with a finite set of Markov chains indexed by . For ease of presentation, we assume that all Markov chains are defined on the same state space222Our algorithm and results are straightforwardly extended to the case where the Markov chains are defined on different state spaces. with cardinality . The Markov chain , or for short chain , is specified by its transition matrix . In this work, we assume that all Markov chains are ergodic, which implies that any chain admits a unique stationary distribution, which we denote by . Moreover, the minimal element of is bounded away from zero: . The initial distributions of the chains are assumed to be arbitrary. Further, we let to denote the absolute spectral gap of chain if is reversible; otherwise, we define the pseudo-spectral gap of by .
A related quantity in our results is the Gini index of the various states. For a chain , the Gini index for state is defined as
[TABLE]
Note that . This upper bound is verified by the fact that the maximal value of is achieved when for all (in view of the concavity of ). In this work, we assume that for all , .333We remark that there exist chains with . In view of the definition of the Gini index, such chains are necessarily deterministic (or degenerate), namely their transition matrices belong to . One example is a deterministic cycle with nodes. We note that such chains may fail to satisfy irreducibility or aperiodicity. Another related quantity in our results is the sum (over states) of inverse stationary distributions: For a chain , we define . Note that . The quantity reflects the discrepancy between individual elements of .
The online learning problem.
The learner wishes to design a sequential allocation strategy to adaptively sample various Markov chains so that all transition matrices are learnt uniformly well. The game proceeds as follows: Initially all chains are assumed to be non-stationary with arbitrary initial distributions chosen by the environment. At each step , the learner samples a chain , based on the past decisions and the observed states, and observes the state . The state of evolves according to . The state of chains does not change: for all .
We introduce the following notations: Let denote the number of times chain is selected by the learner up to time : , where denotes the indicator function. Likewise, we let represent the number of observations of chain , up to time , when the chain was in state : Further, we note that the learner only controls (or equivalently, ), but not the number of visits to individual states. At each step , the learner maintains empirical estimates of the stationary distributions, and estimates transition probabilities of various chains based on the observations gathered up to . We define the empirical stationary distribution of chain at time as for all For chain , we maintain the following smoothed estimation of transition probabilities:
[TABLE]
where is a positive constant. In the literature, the case of is usually referred to as the Laplace-smoothed estimator. The learner is given a budget of samples, and her goal is to obtain an accurate estimation of transition matrices of the Markov chains. The accuracy of the estimation is determined by some notion of loss, which will be discussed later. The learner adaptively selects various chains so that the minimal loss is achieved.
2.3 Performance Measures
We are now ready to provide a precise definition of our notion of loss, which would serve as the performance measure of a given algorithm. Given , we define the loss of an adaptive algorithm as:
[TABLE]
The use of the -norm in the definition of loss is quite natural in the context of learning and estimation of distributions, as it is directly inspired by the quadratic estimation error used in active bandit allocation (e.g., [2]). Given a budget , the loss of an adaptive algorithm is a random variable, due to the evolution of the various chains as well as the possible randomization in the algorithm. Here, we aim at controlling this random quantity in a high probability setup as follows: Let . For a given algorithm , we wish to find such that
[TABLE]
Remark 1
We remark that the empirical stationary distribution may differ from the stationary distribution associated to the smoothed estimator of the transition matrix. Our algorithm and results, however, do not rely on possible relations between and , though one could have used smoothed estimators for . The motivation behind using empirical estimate of in is that it naturally corresponds to the occupancy of various states according to a given sample path.
Comparison with other losses.
We now turn our attention to the comparison between our loss function and some other possible notions. First, we compare ours to the loss function . Such a notion of loss might look more natural or simpler, since the weights are replaced simply with (equivalently, uniform weights). However, this means a strategy may incur a high loss for a part of the state space that is rarely visited, even though we have absolutely no control on the chain. For instance, in the extreme case when some states are reachable with a very small probability, may be arbitrarily small thus resulting in a large loss for all algorithms, while it makes little sense to penalize an allocation strategy for these “virtual" states. Weighting the loss according to the empirical frequency of visits avoids such a phenomenon, and is thus more meaningful.
In view of the above discussion, it is also tempting to replace the empirical state distribution with its expectation , namely to define a pseudo-loss function of the form (as studied in, e.g., [22] in a different setup). We recall that our aim is to derive performance guarantees on the algorithm’s loss that hold with high probability (for portions of the sample paths of the algorithm for a given ). To this end, (which uses ) is more natural and meaningful than as penalizes the algorithm’s performance by the relative visit counts of various states in a given sample path (through ), and not by the expected value of these. This matters a lot in the small-budget regime, where could differ significantly from — Otherwise when is large enough, becomes well-concentrated around with high probability. To clarify further, let us consider the small-budget regime, and some state where is not small. In the case of , using we penalize the performance by the mismatch between and , weighted proportionally to the number of rounds the algorithm has actually visited . In contrast, in the case of , weighting the mismatch proportionally to does not seem reasonable since in a given sample path, the algorithm might not have visited enough even though is not small. We remark that our results in subsequent sections easily apply to the pseudo-loss , at the expense of an additive second-order term, which might depend on the mixing times.
Finally, we position the high-probability guarantee on , in the sense of Eq. (2), against those holding in expectation. Prior studies on bandit allocation, such as [7, 2], whose objectives involve a max operator, consider expected squared distance. The presented analyses in these series of works rely on Wald’s second identity as the technical device. This prevents one to extend the approach therein to other distances. Another peculiarity arising in working with expectations is the order of “max” and “expectation” operators. While it makes more sense to control the expected value of the maximum, the works cited above look at maximum of the expected value, which is more in line with a pseudo-loss definition rather than the loss. All of these difficulties can be avoided by resorting to a high probability setup (in the sense of Eq. (2).
Further intuition and example.
We now provide an illustrative example to further clarify some of the above comments. Let us consider the following two-state Markov chain: , where . The stationary distribution of this Markov chain is . Let (resp. ) denote the state corresponding to the first (resp. second) row of the transition matrix. In view of , when , the chain tends to stay in (the lazy state) most of the time: Out of observations, one gets on average only observations of state , which means, for , essentially no observation of state . Hence, no algorithm can estimate the transitions from in such a setup, and all strategies would suffer a huge loss according to , no matter how samples are allocated to this chain. Thus, has limited interest in order to distinguish between good and base sampling strategies. On the other hand, using enables to better distinguish between allocation strategies, since the weight given to would be essentially [math] in this case, thus focusing on the good estimation of (and other chains) only.
2.4 Static Allocation
In this subsection, we investigate the optimal loss asymptotically achievable by an oracle policy that is aware of some properties of the chains. To this aim, let us consider a non-adaptive strategy where sampling of various chains is deterministic. Therefore, are not random. The following lemma is a consequence of the central limit theorem:
Lemma 1
We have for any chain :
The proof of this lemma consists in two steps: First, we provide lower and upper bounds on in terms of the loss incurred by the learner had she used an empirical estimator (corresponding to in (1)). Second, we show that by the central limit theorem, .
Now, consider an oracle policy , who is aware of for various chains. In view of the above discussion, and taking into account the constraint , it would be asymptotically optimal to allocate samples to chain , where
[TABLE]
The corresponding loss would satisfy: We shall refer to the quantity as the asymptotically optimal loss, which is a problem-dependent quantity. The coefficients characterize the discrepancy between the transition matrices of the various chains, and indicate that an algorithm needs to account for such discrepancy in order to achieve the asymptotically optimal loss. Having characterized the notion of asymptotically optimal loss, we are now ready to define the notion of uniformly good algorithm:
Definition 1** (Uniformly Good Algorithm)**
An algorithm is said to be uniformly good if, for any problem instance, it achieves the asymptotically optimal loss when grows large; that is, for all problem instances.
3 The BA-MC Algorithm
In this section, we introduce an algorithm designed for adaptive bandit allocation of a set of Markov chains. It is designed based on the optimistic principle, as in MAB problems (e.g., [34, 35]), and relies on an index function. More precisely, at each time , the algorithm maintains an index function for each chain , which provides an upper confidence bound (UCB) on the loss incurred by at ; more precisely, with high probability, , where denotes the smoothed estimate of with some (see Eq. (1)). Now, by sampling a chain at time , we can balance exploration and exploitation by selecting more the chains with higher estimated losses or those with higher uncertainty in these estimates.
In order to specify the index function , let us choose (we motivate this choice of later on), and for each state , define the estimate of Gini coefficient at time as The index is then defined as
[TABLE]
where \beta:=\beta(n,\delta):=c\log\Big{(}\left\lceil\frac{\log(n)}{\log(c)}\right\rceil\frac{6KS^{2}}{\delta}\Big{)}, with being an arbitrary choice. In this paper, we choose .
We remark that the design of the index above comes from the application of empirical Bernstein concentration for -smoothed estimators (see Lemma 4 in the supplementary) to the loss function . In other words, Lemma 4 guarantees that with high probability, . Our concentration inequality (Lemma 4) is new, to our knowledge, and could be of independent interest.
Having defined the index function , we are now ready to describe our algorithm, which we call BA-MC (Bandit Allocation for Markov Chains). BA-MC receives as input a confidence parameter , a budget , as well as the state space . It initially samples each chain twice (hence, this phase lasts for rounds). Then, BA-MC simply consists in sampling the chain with the largest index at each round . Finally, it returns, after pulls, an estimate for each chain . We provide the pseudo-code of BA-MC in Algorithm 1. Note that BA-MC does not require any prior knowledge of the chains (neither the initial distribution nor the mixing time).
In order to provide more insights into the design of BA-MC, let us remark that (as shown in Lemma 8 in the supplementary) provides a high-probability UCB on the quantity as well. Now by sampling the chain at time , in view of discussions in Section 2.4, BA-MC would try to mimic an oracle algorithm being aware of for various chains.
We remark that our concentration inequality in Lemma 4 (of the supplementary) parallels the one presented in Lemma 8.3 in [36]. In contrast, our concentration lemma makes appear the terms in the denominator, whereas Lemma 8.3 in [36] makes appear terms in the denominator. This feature plays an important role to deal with situations where some states are not sampled up to time , that is for when for some .
4 Performance Bounds
We are now ready to study the performance bounds on the loss L_{n}(\text{{\color[rgb]{0.5,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0.5,0,0}{BA-MC}}}) in both asymptotic and non-asymptotic regimes. We begin with a generic non-asymptotic bound as follows:
Theorem 1** (BA-MC, Generic Performance)**
Let . Then, for any budget , with probability at least , the loss under {\mathcal{A}}={\color[rgb]{0.5,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0.5,0,0}\textbf{BA-MC}} satisfies
[TABLE]
The proof of this theorem, provided in Section C in the supplementary, reveals the motivation to choose : It verifies that to minimize the dependency of the loss on , on must choose . In particular, the proof does not rely on the ergodicity assumption:
Remark 2
Theorem 1 is valid even if the Markov chains are reducible or periodic.
In the following theorem, we state another non-asymptotic bound on the performance of BA-MC, which refines Theorem 1. To present this result, we recall the notation , and that for any chain , , , and
Theorem 2
Let , and assume that n\geq\text{{n_{\text{cutoff}}}}:=K\max_{k}\Big{(}\frac{300}{\gamma_{\textsf{ps},k}\underline{\pi}_{k}}\log\Big{(}\frac{2K}{\delta}\sqrt{\underline{\pi}_{k}^{-1}}\Big{)}\Big{)}^{2}. Then, with probability at least ,
[TABLE]
where
Recalling the asymptotic loss of the oracle algorithm discussed in Section 2.4 being equal to , in view of the Bernstein concentration, the oracle would incur a loss at most for when the budget is finite. In this regard, we may look at the quantity as the pseudo-excess loss of (we refrain from calling this quantity the excess loss, as is not equal to the high-probability loss of the oracle). Theorem 2 implies that when is greater than the cut-off budget , the pseudo-excess loss under BA-MC vanishes at a rate . In particular, Theorem 2 characterizes the constant controlling the main term of the pseudo-excess loss: . This further indicates that the pseudo-excess loss is controlled by the quantity , which captures (i) the discrepancy among the values of various chains , and (ii) the discrepancy between various stationary probabilities . We emphasize that the dependency of the learning performance (through ) on is in alignment with the result obtained by [21] for the estimation of a single ergodic Markov chain.
The proof of this theorem, provided in Section D in the supplementary, shows that to determine the cut-off budget , one needs to determine the value of such that with high probability, for any chain and state , the term approaches , which is further controlled by (or if is reversible) as well as the minimal stationary distribution . This in turn allows us to show that, under BA-MC, the number of samples for any chain comes close to the quantity . Finally, we remark that the proof of Theorem 2 also reveals that the result in the theorem is indeed valid for any constant .
In the following theorem, we characterize the asymptotic performance of BA-MC:
Theorem 3** (BA-MC, Asymptotic Regime)**
Under BA-MC,
The above theorem asserts that, asymptotically, the loss under BA-MC matches the asymptotically optimal loss characterized in Section 2.4. We may thus conclude that BA-MC is uniformly good (in the sense of Definition 1). The proof of Theorem 3 (provided in Section E of the supplementary) proceeds as follows: It divides the estimation problem into two consecutive sub-problems, the one with the budget and the other with the rest of pulls. We then show when n_{0}=\sqrt{n}\geq\text{{n_{\text{cutoff}}}}, the number of samples on each chain at the end of the first sub-problem is lower bounded by , and as a consequence, the index would be accurate enough: with high probability. This allows us to relate the allocation under BA-MC in the course of the second sub-problem to that of the oracle, and further to show that the difference vanishes as .
Below, we provide some further comments about the presented bounds in Theorems 1–3:
Various regimes.
Theorem 1 provides a non-asymptotic bound on the loss valid for any , while Theorem 3 establishes the optimality of BA-MC in the asymptotic regime. In view of the inequality , the bound in Theorem 1 is at least off by a factor of from the asymptotic loss . Theorem 2 bridges between the two results thereby establishing a third regime, in which the algorithm enjoys the asymptotically optimal loss up to an additive pseudo-excess loss scaling as .
The effect of mixing.
It is worth emphasizing that the mixing times of the chains do not appear explicitly in the bounds, and only control (through the pseudo-spectral gap ) the cut-off budget that ensures when the pseudo-excess loss vanishes at a rate . This is indeed a strong aspect of our results due to our meaningful definition of loss, which could be attributed to the fact that our loss function employs empirical estimates in lieu of . Specifically speaking, as argued in [36], given the number of samples of various states (akin to using in the loss definition), the convergence of frequency estimates towards the true values is independent of the mixing time of the chain. We note that despite the dependence of on the mixing times, BA-MC does not need to estimate them as when n\leq\text{{n_{\text{cutoff}}}}, it still enjoys the loss guarantee of Theorem 1. We also mention that to define an index function for the loss function , one may have to derive confidence bounds on the mixing time and/or stationary distribution as well.
More on the pseudo-excess loss.
We stress that the notion of the pseudo-excess loss bears some similarity with the definition of regret for active bandit learning of distributions as introduced in [7, 2] (see Section 1). In the latter case, the regret typically decays as similarly to the pseudo-excess loss in our case. An interesting question is whether the decay rate of the pseudo-excess loss, as a function of , can be improved. And more importantly, if a (problem-dependent) lower bound on the pseudo-excess loss can be established. These questions are open even for the simpler case of active learning of distributions in the i.i.d. setup; see, e.g., [37, 8, 2]. We plan to address these as a future work.
5 Conclusion
In this paper, we addressed the problem of active bandit allocation in the case of discrete and ergodic Markov chains. We considered a notion of loss function appropriately extending the loss function for learning distributions to the case of Markov chains. We further characterized the notion of a “uniformly good algorithm” under the considered loss function. We presented an algorithm for learning Markov chains, which we called BA-MC. Our algorithm is simple to implement and does not require any prior knowledge of the Markov chains. We provided non-asymptotic PAC-type bounds on the loss incurred by BA-MC, and showed that asymptotically, it incurs an optimal loss. We further discussed that the (pseudo-excess) loss incurred by BA-MC in our bounds does not deteriorate with mixing times of the chains. As a future work, we plan to derive a (problem-dependent) lower bound on the pseudo-excess loss. Another interesting, yet very challenging, future direction is to devise adaptive learning algorithms for restless Markov chains, where the state of various chains evolve at each round independently of the learner’s decision.
Acknowledgements
This work has been supported by CPER Nord-Pas-de-Calais/FEDER DATA Advanced data science and technologies 2015-2020, the French Ministry of Higher Education and Research, Inria, and the French Agence Nationale de la Recherche (ANR), under grant ANR-16-CE40-0002 (project BADASS).
Appendix A Concentration Inequalities
Lemma 2** ([38, Lemma 2.4])**
Let be a sequence of random variables generated by a predictable process, and be its natural filtration. Let be a convex upper-envelope of the cumulant generating function of the conditional distributions with , and let denote its Legendre-Fenchel transform, that is:
[TABLE]
where . Assume that contains an open neighborhood of [math]. Let (resp. ) be its reverse map on (resp. ), that is
[TABLE]
Let be an integer-valued random variable that is -measurable and almost surely bounded by . Then, for all and ,
[TABLE]
Moreover, if is a possibly unbounded -valued random variable that is -measurable, then for all and ,
[TABLE]
We provide an immediate consequence of this lemma for the case of sub-Gamma random variables:
Corollary 1
Let be a sequence of random variables generated by a predictable process, and be its natural filtration. Assume for all , and for some positive numbers and . Let be an integer-valued random variable that is -measurable and almost surely bounded by . Then, for all and ,
[TABLE]
where \zeta(n,\delta):=c\log\Big{(}\left\lceil\frac{\log(n)}{\log(c)}\right\rceil\frac{1}{\delta}\Big{)}, with being an arbitrary parameter.
Proof. The proof follows by an application of Lemma 2 for sub-Gamma random variables with parameters . Note that sub-Gamma random variables satisfy , for all , so that
[TABLE]
Plugging these into the first statements of Lemma 2 completes the proof.
As a consequence of this corollary, we present the following lemma:
Lemma 3** (Bernstein-Markov Concentration)**
Let be generated from an ergodic Markov chain defined on a finite state-space with transition matrix . Consider the smoothed estimator of defined as follows: For all ,
[TABLE]
with . Then, for any , it holds that with probability at least , for all ,
[TABLE]
where \zeta(n,\delta):=c\log\Big{(}\left\lceil\frac{\log(n)}{\log(c)}\right\rceil\frac{2S^{2}}{\delta}\Big{)}, with being an arbitrary parameter.
Proof. The proof uses similar steps as in the one of Lemma 8.3 in [36]. Consider a pair . We have
[TABLE]
where . Hence,
[TABLE]
To control , we define the sequence , with , and
[TABLE]
Note that for all , almost surely. Moreover, denoting by the filtration generated by , we observe that is -measurable and . Hence, it is a martingale difference sequence with respect to , and it satisfies for all , and
[TABLE]
Applying Corollary 1 yields
[TABLE]
with probability at least . Plugging the above bound into (3) gives the announced result.
Lemma 4** (Empirical Bernstein-Markov Concentration)**
Let be generated from an ergodic Markov chain defined on with transition matrix . Consider the smoothed estimator of as defined in Lemma 3. Then, with probability at least , for all ,
[TABLE]
where \zeta:=\zeta(n,\delta):=c\log\Big{(}\left\lceil\frac{\log(n)}{\log(c)}\right\rceil\frac{2S^{2}}{\delta}\Big{)}, where is an arbitrary parameter, , and
[TABLE]
Proof. Fix a pair . Recall from Lemma 3 that with probability at least ,
[TABLE]
so that
[TABLE]
Next we derive an upper bound on . By Taylor’s expansion, we have
[TABLE]
Using the fact that implies for nonnegative numbers , we get
[TABLE]
where we have used valid for all . Taking square-root from both sides and using the fact valid for all give
[TABLE]
where we have used
[TABLE]
Plugging (5) and (6) into (4), we obtain
[TABLE]
with
[TABLE]
which after taking the square-root from both sides yields the announced result.
Next we recall a result for the convergence of empirical stationary distributions in a Markov chain to its stationary distribution:
Lemma 5** ([20])**
Let be an ergodic and reversible Markov chain defined on with stationary distribution and spectral gap . Let denote the corresponding empirical stationary distribution of the Markov chain. For any , with probability at least ,
[TABLE]
Appendix B Technical Lemmas
Before providing the proofs of the main theorems, we provide some technical lemmas. We begin with the following definition:
Definition 2** (Definition of the Event )**
Let and . For any and define
[TABLE]
where \beta(n,\delta):=c\log\Big{(}\left\lceil\frac{\log(n)}{\log(c)}\right\rceil\frac{6KS^{2}}{\delta}\Big{)}. Define
[TABLE]
Lemma 6
For any and , it holds that .
Proof. Let and . Define \zeta(n,\delta)=c\log\Big{(}\left\lceil\frac{\log(n)}{\log(c)}\right\rceil\frac{2KS^{2}}{\delta}\Big{)}, and note that . Applying Lemma 3, we obtain
[TABLE]
for all , and uniformly for all , with probability at least . With the choice of , and noting that and
[TABLE]
we obtain for all . Finally, using a union bound gives .
In the following lemma we provide an upper bound on the loss , which is valid for all .
Lemma 7** (Upper Bound on the Loss)**
Assume that the event holds. Then, for any budget and chain ,
[TABLE]
Proof. Let and consider a chain . To simplify the notation, we omit the dependence of various quantities on (hence , , and so on). On the event , we have
[TABLE]
so that
[TABLE]
Hence, we obtain the announced upper bound on the loss:
[TABLE]
where the last step follows from the Cauchy-Schwarz inequality.
The following lemma presents bounds on the index on the event (defined in Definition 2):
Lemma 8** (Bounds on the Index)**
Consider a chain , and assume that the event holds. Then, for any time ,
[TABLE]
Proof. Fix a chain and time . To ease notation, let us omit the dependence of various quantities on throughout. We first recall the definition of the index :
[TABLE]
where and .
To derive an upper bound on , we first find an upper bound on as follows. First, using Taylor’s expansion, we have
[TABLE]
where (7) follows from the definition of . Hence,
[TABLE]
Using (7) and (8), we obtain the following upper bound on , on the event :
[TABLE]
To prove the lower bound on the index, we recall from the proof of Lemma 4 (see (5) with the choices and ) that
[TABLE]
Putting this together with the definition of leads to , and thus completes the proof.
Appendix C Proof of Theorem 1
Consider a chain and assume that the event (defined in Definition 2) holds. Applying Lemma 7, we obtain
[TABLE]
where we have used Cauchy-Schwarz in the second inequality. Introducing
[TABLE]
we provide upper bounds on and in the following lemmas:
Lemma 9
On the event , it holds for any chain and any :
[TABLE]
Lemma 10
Assume that the event holds. Then for any chain and :
[TABLE]
Applying Lemmas 9 and 10 gives
[TABLE]
where we have used
[TABLE]
Finally, using the inequality valid for , and noting that the event holds with a probability higher than , we get the desired bound on the loss.
C.1 Proof of Lemma 9
Assume that holds. We claim that there exists a chain such that . We show this claim by contradiction: If for all , , then , which is a contradiction.
Now, consider a chain such that . Let be the last time that it has been sampled. Hence, and . Applying Lemma 8 for chain , it follows that on the event ,
[TABLE]
Noting that , we get
[TABLE]
where we have used that . Note that for any chain , by the definition of ,
[TABLE]
Furthermore, since is played at time , it holds that for any chain , , so that for any chain ,
[TABLE]
Thus, combining this with the upper bound on leads to the desired results.
C.2 Proof of Lemma 10
The proof borrows some ideas from the proof of Lemma 1 in [2]. Consider a chain that is sampled at least once after initialization, and let be the last time it was sampled. Hence, and . Moreover, let be the observed state of at . Then, and , whereas for all , . We thus have, for all .
By the design of the algorithm, for any chain , . Using Lemma 8 yields
[TABLE]
where in the second line we have used that for and ,
[TABLE]
The above holds for any chain , and any chain that is sampled at least once after the initialization (hence, ). Summing over such choices of gives
[TABLE]
where we have used Cauchy-Schwarz in the last inequality, and that . Noting that yields
[TABLE]
By Lemma 9, for any chain , which gives
[TABLE]
where we have used , , , and .
Appendix D Proof of Theorem 2
Let and n\geq\text{{n_{\text{cutoff}}}}. To control the loss in this case, we first state the following result for the concentration of empirical state distribution .
Lemma 11** (Concentration of Empirical State Distributions)**
Assume that event holds and n\geq\text{{n_{\text{cutoff}}}}. Then, for any chain and state , with probability at least .
Recalling that for all , on the event (defined in Definition 2), we have by Lemma 7 and Lemma 11,
[TABLE]
with probability at least , where the last step follows from the Cauchy-Schwarz inequality.
To control the right-hand side of the above, we first provide an upper bound on assuming that the event holds:
Lemma 12
Assume that the event holds. Then, for any chain and n\geq\text{{n_{\text{cutoff}}}}, it holds that
[TABLE]
with probability at least , where
[TABLE]
Applying Lemma 12, and noting (see Lemma 6), we obtain the following bound on , which holds with probability greater than :
[TABLE]
where (a) follows from the fact that for positive numbers , we have by Jensen’s inequality,
[TABLE]
so that . Finally, taking the maximum over completes the proof.
D.1 Proof of Lemma 11
By Lemma 5, we have for all chains and all ,
[TABLE]
with probability at least , where \varepsilon_{k}:=\frac{1}{\gamma_{k}}\log\Big{(}\frac{K}{\delta}\sqrt{\frac{2}{\underline{\pi}_{k}}}\Big{)}. It is easy to verify that if , then , so that for all and all ,
[TABLE]
with probability at least .
It remains to show that if n\geq\text{{n_{\text{cutoff}}}}, we have . Indeed, when occurs, as a consequence of Lemma 9, one has
[TABLE]
with probability at least . Using the trivial bound , it follows that
[TABLE]
so that
[TABLE]
with probability greater than . Putting together, we deduce that if satisfies , we have , and the lemma follows.
Moreover, when the chain is non-reversible, we may use [20, Theorem 3.4] (instead of Lemma 9), and follow the exact same lines as above to deduce that if n\geq K\max_{k}\Big{(}\frac{300}{\gamma_{\textsf{ps},k}\underline{\pi}_{k}}\log\Big{(}\frac{2K}{\delta}\sqrt{\underline{\pi}_{k}^{-1}}\Big{)}\Big{)}^{2}, the assertion of the lemma follows.
D.2 Proof of Lemma 12
The proof borrows some ideas from the proof of Lemma 1 in [2]. Consider a chain that is sampled at least once after initialization, and let be the last time it was sampled. Hence, and . Moreover, let be the observed state of at . Then, and , whereas for all , . We thus have, for all .
By the design of the algorithm, for any chain , . Applying Lemma 8 gives
[TABLE]
where and , and where where in the second line we have used that for and
[TABLE]
Now, applying Lemma 11 and using yield
[TABLE]
Note that the above relation is valid for any , and any that is sampled after initialization (i.e., ). Summing over such choices of gives
[TABLE]
Noting that , we have
[TABLE]
To carefully control the right-hand side of the last inequality, we use the following lemma:
Lemma 13
Under the same assumption of Lemma 12, we have for any chain ,
[TABLE]
Now, applying Lemma 13 yields
[TABLE]
Finally, using the inequality and valid for all , we get the desired result:
[TABLE]
D.3 Proof of Lemma 13
The proof borrows some ideas from the proof of Lemma 1 in [2]. Consider a chain that is sampled at least once after initialization, and let be the last time it was sampled. Hence, . Using the same arguments as in the beginning of the proof of Lemma 12, we have on the event ,
[TABLE]
Note that (10) is valid for any , and any that is sampled after initialization.
Now consider a chain such that . In other words, is over-sampled (w.r.t. budget ). In particular, is sampled at least once after initialization. Hence, using (10) and noting that , we obtain
[TABLE]
where (a) follows from the definition of . Multiplying both sides on gives:
[TABLE]
thus verifying the first statement of the lemma. To derive the second statement, we take square-root from both sides of (11):
[TABLE]
where the second and third inequalities respectively follow from and valid for all . Plugging and into the last inequality verifies the second statement and concludes the proof.
Appendix E Asymptotic Analyses — Proofs of Lemma 1 and Theorem 3
E.1 Proof of Lemma 1
Consider a chain , and let us denote by the corresponding empirical estimator of (corresponding to ). That is, for all , . Further, let denote the corresponding loss for chain . To prove the lemma, we first show that .
To this end, we derive upper and lower bounds on in terms of . We have for all :
[TABLE]
We therefore get, on the one hand,
[TABLE]
and on the other hand,
[TABLE]
Furthermore, is upper bounded as follows:
[TABLE]
where we have used Cauchy-Schwarz in the second line. In summary, we have shown that
[TABLE]
so that
[TABLE]
Taking the limit when and noting the fact that when , by ergodicity, for all , we obtain .
It remains to compute . We have
[TABLE]
When , by ergodicity, we have for all . Therefore, by the central limit theorem, converges (in distribution) to a Normal distribution with variance , and converges to a Gamma distribution with mean . Hence, the mean of would be , thus completing the proof.
E.2 Proof of Theorem 3
Let be a budget such that \sqrt{n}\geq\text{{n_{\text{cutoff}}}}, and let . The proof proceeds in two steps. We first consider the case with budget , and show that at the end of this sub-problem, the index of each chain is well estimated. Then, we consider allocation in the second sub-problem.
Step 1: Bounds on the index at .
Fix a chain . To derive upper and lower bounds on the index at , we derive a lower bound on . Recall that by Lemma 9, we have with the choice ,
[TABLE]
with probability at least . Using the trivial bound , it follows that
[TABLE]
so that
[TABLE]
with probability greater than .
Noting that n_{0}\geq\text{{n_{\text{cutoff}}}}, we apply Lemma 8 and 11 to obtain
[TABLE]
with probability at least . Using Cauchy-Schwarz and recalling , we obtain give
[TABLE]
so that
[TABLE]
with probability at least . Using the lower bound yields
[TABLE]
with probability at least . Let us write the last inequality as
[TABLE]
where , thus giving
[TABLE]
Step 2: The second sub-problem.
Now let us consider . It follows that with probability , BA-MC allocates according to the following problem
[TABLE]
whose optimal solution satisfies
[TABLE]
Recalling and noting that , we obtain .
It remains to show that the loss L_{n}({\color[rgb]{0.5,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0.5,0,0}\textbf{BA-MC}}) approaches as tends to infinity. By Lemma 1, recall that . So, using , we conclude , and the claim follows.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] András Antos, Varun Grover, and Csaba Szepesvári. Active learning in multi-armed bandits. In International Conference on Algorithmic Learning Theory , pages 287–302. Springer, 2008.
- 2[2] Alexandra Carpentier, Alessandro Lazaric, Mohammad Ghavamzadeh, Rémi Munos, and Peter Auer. Upper-confidence-bound algorithms for active learning in multi-armed bandits. In International Conference on Algorithmic Learning Theory , pages 189–203. Springer, 2011.
- 3[3] Valerii Vadimovich Fedorov. Theory of optimal experiments . Elsevier, 1972.
- 4[4] Hovav A. Dror and David M. Steinberg. Sequential experimental designs for generalized linear models. Journal of the American Statistical Association , 103(481):288–298, 2008.
- 5[5] David A. Cohn, Zoubin Ghahramani, and Michael I. Jordan. Active learning with statistical models. Journal of Artificial Intelligence Research , 4:129–145, 1996.
- 6[6] Pierre Etoré and Benjamin Jourdain. Adaptive optimal allocation in stratified sampling methods. Methodology and Computing in Applied Probability , 12(3):335–360, 2010.
- 7[7] András Antos, Varun Grover, and Csaba Szepesvári. Active learning in heteroscedastic noise. Theoretical Computer Science , 411(29-30):2712–2728, 2010.
- 8[8] Alexandra Carpentier, Remi Munos, and András Antos. Adaptive strategy for stratified Monte Carlo sampling. Journal of Machine Learning Research , 16:2231–2271, 2015.
