Learning Mixtures of Markov Chains and MDPs

Chinmaya Kausik, Kevin Tan, Ambuj Tewari

Abstract

Learning the underlying dynamics of a system from a mixture of behaviors is a fundamental challenge in reinforcement learning and sequence modeling. Traditional methods like Expectation-Maximization (EM) often struggle with local optima and require long trajectories for accurate estimation. This paper introduces a novel algorithm for learning mixtures of Markov Decision Processes (MDPs) and Markov Chains from short, unlabeled trajectories. By leveraging subspace estimation and a unique "blocking technique" to handle temporal dependencies, the proposed method achieves high clustering accuracy and provides strong theoretical guarantees independent of state-space size.

Introduction

In many real-world scenarios, such as healthcare or user behavior analysis, data is collected from a population consisting of several distinct sub-groups. Each group may follow a different set of transition rules, effectively forming a "Mixture of MDPs." For instance, patients with different subtypes of a disease might respond differently to the same sequence of treatments.

The primary challenge in this setting is twofold: the trajectories are often short, providing insufficient data to "fingerprint" an individual's transition matrix, and the labels (which group a trajectory belongs to) are unknown. While the EM algorithm is a standard tool for such latent variable problems, it is prone to poor convergence when initialized poorly. This research addresses these issues by proposing a spectral approach that reliably clusters behaviors even with sparse data.

Methodology

The proposed pipeline shifts the focus from iterative local search to a geometric subspace estimation framework.

Subspace Estimation and the Blocking Technique

The core innovation lies in identifying a $K$-dimensional subspace where the next-state distributions reside. Estimating this subspace from trajectory data is difficult because consecutive states are temporally correlated. To overcome this, the authors employ a "blocking technique" to ensure statistical independence between samples.

Illustration of the blocking technique used to handle temporal dependencies in trajectory data.

As shown in the figure above, trajectories are divided into segments separated by intervals related to the mixing time $T$ of the Markov process. By sampling states at specific intervals (e.g., $T, T+T/G, \dots$), the algorithm can treat these observations as nearly independent, allowing for unbiased estimation of the transition subspace.

Clustering and Model Reconstruction

Once the subspace is identified, the high-dimensional transition data is projected into this lower-dimensional space. This projection acts as a denoiser, filtering out the variance inherent in short trajectories. Spectral clustering is then applied to group the trajectories. Finally, with trajectories labeled by cluster, standard Maximum Likelihood Estimation (MLE) is used to reconstruct the transition probabilities for each of the $K$ constituent models.

Experimental Evaluation

The algorithm was evaluated on a Gridworld benchmark consisting of an 8x8 grid (64 states) and a mixture of two distinct MDPs: a standard navigation task and an "adversarial" version designed to trap the agent.

The results demonstrate a significant improvement over traditional methods. The proposed subspace-based algorithm achieved an average clustering accuracy of 96.6%, whereas EM with random initialization only reached 73.2%. Furthermore, the experiments validated the theoretical finding that performance is primarily governed by the system's mixing time rather than the total number of states, confirming the method's potential for scalability.

Discussion

A key insight of this work is that transition behavior can be captured by its "essence" in a low-dimensional subspace. By breaking temporal correlations through clever sampling, the authors provide a robust mathematical foundation for unsupervised behavior modeling.

Future work will focus on improving computational efficiency, as the current $O(N^2)$ complexity for pairwise distances may be prohibitive for very large datasets. Additionally, extending the framework to continuous state spaces via function approximation remains an important open challenge.

Summary updated

BibTeX
@inproceedings{kausik2023learning,
  author = {Chinmaya Kausik and Kevin Tan and Ambuj Tewari},
  title = {{Learning Mixtures of Markov Chains and MDPs}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=wZdykpFd6U},
}
Figure