Thompson Sampling for Learning Parameterized MDPs

Aditya Gopalan, Shie MannorarXiv 2014

Abstract

We consider reinforcement learning in parameterized Markov Decision Processes (MDPs), where the parameterization may induce correlation across transition probabilities or rewards. Consequently, observing a particular state transition might yield useful information about other, unobserved, parts of the MDP. We present a version of Thompson sampling for parameterized reinforcement learning problems, and derive a frequentist regret bound for priors over general parameter spaces. The result shows that the number of instants where suboptimal actions are chosen scales logarithmically with time, with high probability. It holds for prior distributions that put significant probability near the true model, without any additional, specific closed-form structure such as conjugate or product-form priors. The constant factor in the logarithmic scaling encodes the information complexity of learning the MDP in terms of the Kullback-Leibler geometry of the parameter space.

Introduction

In Reinforcement Learning (RL), an agent seeks to maximize cumulative rewards by interacting with an environment typically modeled as a Markov Decision Process (MDP). Standard RL algorithms, such as UCRL2 or R-max, often treat every state-action pair as an independent entity. This "decoupled" approach assumes that learning about one state provides no information about another. However, many real-world systems possess a lower-dimensional structure where transitions and rewards are governed by a few shared parameters.

This paper introduces TSMDP (Thompson Sampling for MDPs), an algorithm designed to exploit these correlations. By leveraging the underlying parametric structure, TSMDP can generalize observations from one part of the state space to others, leading to significantly more efficient learning than traditional methods.

The Parameterized MDP Framework

In a parameterized MDP, the transition probabilities and reward functions are determined by a parameter vector $\theta$. For example, in a network queueing system, the arrival rate of packets might be a function of a single parameter $\mu$, even if the state space (the number of packets in the buffer) is large. In such systems, observing a transition in one state provides valuable information about the global parameter $\theta$, and thus about the transitions in all other states. The challenge lies in designing an algorithm that can effectively use this information to minimize "regret"—the difference between the reward obtained by the agent and the reward that would have been obtained by an optimal policy with full knowledge of the environment.

The TSMDP Algorithm

TSMDP operates in cycles or epochs, demarcated by visits to a specific reference state ($s_0$). The algorithm follows a Bayesian-inspired logic but is analyzed through a frequentist lens. The process within each epoch is as follows:

  1. Sampling: At the start of a new epoch, the agent samples a model parameter $\theta$ from its current posterior distribution (its "belief" about the world).
  2. Planning: The agent computes the optimal policy for the specific MDP defined by the sampled parameter $\theta$.
  3. Execution: The agent follows this optimal policy until it returns to the reference state $s_0$.
  4. Updating: Upon returning to $s_0$, the agent uses the transitions and rewards observed during the epoch to update its posterior distribution using Bayes' rule.

Theoretical Innovations

A major contribution of this work is the derivation of a frequentist regret bound for Thompson Sampling. While Thompson Sampling is a Bayesian method, the authors prove that it performs well even if the true environment was not actually drawn from the agent's initial prior.

Unlike previous analyses that required restrictive "conjugate prior" assumptions to maintain mathematical tractability, this paper employs a novel sample-path based concentration analysis. This allows for the use of general prior distributions, provided they satisfy a "grain of truth" requirement—meaning the initial prior must place sufficient probability mass in the neighborhood of the true model parameters.

Key Results and Insights

Logarithmic Regret

The authors demonstrate that the number of times TSMDP chooses a suboptimal action scales as $O(\log T)$, where $T$ is the time horizon. This logarithmic scaling is considered the "gold standard" for efficiency in reinforcement learning. Furthermore, the authors provide an explicit constant factor for this scaling, which is determined by the Kullback-Leibler (KL) geometry of the parameter space. This constant serves as a measure of the "information complexity" of the problem: if the agent's actions can quickly resolve the differences between the true parameter and incorrect ones in terms of KL divergence, the regret remains low.

Empirical Superiority

The algorithm was evaluated using a simulated queueing system with a buffer capacity of 50 packets. In this setup, the arrival rate followed a Gaussian-shaped curve parameterized by an unknown mean and standard deviation. The agent had to choose between "FAST" and "SLOW" service modes.

In head-to-head comparisons, TSMDP significantly outperformed UCRL2, a standard algorithm based on the "optimism-under-uncertainty" principle. While UCRL2’s regret continued to grow as it attempted to explore every state-action pair independently, TSMDP’s regret flattened out much earlier. This is because TSMDP successfully "solved" the global parameters of the system by generalizing information across the state space.

Limitations and Future Work

While TSMDP offers strong theoretical and empirical performance, it faces certain practical challenges:

  • The Reference State: The reliance on a reference state ($s_0$) to define epochs may be problematic in poorly connected or extremely large MDPs where returns to $s_0$ are infrequent.
  • Computational Complexity: Sampling from a complex posterior and solving an MDP at every epoch can be computationally demanding for large-scale applications.

Future research directions include extending the analysis to continuous parameter spaces and exploring the use of linear function approximation, which would align the TSMDP framework with modern deep reinforcement learning techniques.

Summary updated

BibTeX
@misc{gopalan2014thompson,
  author = {Aditya Gopalan and Shie Mannor},
  title = {{Thompson Sampling for Learning Parameterized MDPs}},
  year = {2014},
  eprint = {1406.7498},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1406.7498},
}
Figure