Near-Optimal Clustering in Mixture of Markov Chains

Junghyun Lee, Yassir Jedra, Alexandre Proutière, Se-Young Yun

Introduction

Clustering is a fundamental task in unsupervised learning, traditionally applied to static data points or nodes within a graph. However, modern data often takes the form of sequential trajectories—such as user navigation paths on a website, app usage patterns, or conversation traces used in Reinforcement Learning from Human Feedback (RLHF). Clustering these sequences requires accounting for the underlying temporal dynamics, a challenge addressed by the Mixture of Markov Chains (MMC) model.

In the MMC framework, we observe $T$ trajectories, each of length $H$, generated by one of $K$ unknown Markov chains over a finite state space $S$. The objective is to group these trajectories according to their generative source. While previous research has explored this problem, existing solutions often required prior knowledge of specific model parameters (such as separation gaps) or lacked rigorous statistical guarantees. This paper establishes the fundamental mathematical limits of MMC clustering and proposes a computationally efficient, parameter-free algorithm that achieves near-optimal performance.

The Proposed Methodology

The authors introduce a two-stage clustering pipeline designed to operate without a priori knowledge of the underlying transition kernels or their separation.

Stage I: Spectral Initialization via Euclidean Embedding

The first stage involves a novel injective Euclidean embedding specifically tailored for ergodic Markov chains. Rather than comparing transition matrices directly—which can be sensitive to noise—the authors map the chains into an $S^2$-dimensional space. Crucially, this mapping is weighted by the square root of the stationary distribution ($\sqrt{\pi}$).

By building an empirical data matrix from the trajectories using this embedding, the algorithm performs Singular Value Decomposition (SVD) to project the data into a lower-dimensional subspace. This spectral approach provides a robust initial grouping of the trajectories, even when the number of clusters $K$ is not known beforehand.

Stage II: One-Shot Likelihood Refinement

While the spectral stage provides a strong starting point, it may not reach the information-theoretic limit of accuracy. The second stage uses the initial clusters to estimate the transition probabilities for each of the $K$ chains. It then performs a "clean-up" step by reassigning each trajectory to the specific Markov chain that maximizes its likelihood. This one-shot refinement allows the algorithm to converge toward the optimal misclassification rate.

Theoretical Contributions

Information-Theoretic Limits

The paper identifies that the fundamental difficulty of clustering in MMC is governed by a weighted Kullback-Leibler (KL) divergence, denoted as $D$. This metric captures not just the difference between transition kernels, but also the frequency with which those distinguishing states are visited. The authors prove a lower bound on the misclassification rate, showing it scales as $T \exp(-2HD)$.

Performance Guarantees

The proposed algorithm's upper bound on error is $T \exp(-C \gamma_{ps} H D_\pi)$, where $\gamma_{ps}$ is the pseudo-spectral gap. This result nearly matches the theoretical lower bound, with the slight discrepancy (the presence of $\gamma_{ps}$) attributed to the fact that the algorithm must estimate transition kernels that the lower bound assumes are known.

Sample Complexity Improvements

A major highlight of this work is the drastic reduction in required data. To achieve accurate clustering in "uniform-like" Markov chains, previous state-of-the-art methods required a trajectory length of $H = O(S^3 \log^4 T)$. The authors' method reduces this requirement to approximately $H = O(S^2 \log T)$. This improvement stems from the new $\ell_2$-based embedding, which aggregates separation information across all states rather than relying on a single, highly-visited "gap" state.

Discussion and Future Directions

While the paper represents a significant leap forward in the statistical theory of sequential clustering, some challenges remain:

  1. The Theoretical Gap: Closing the remaining gap between the upper and lower bounds (specifically regarding the pseudo-spectral gap) remains an open nonparametric statistical question.
  2. Computational Efficiency: The algorithm's $O(TS^2)$ memory requirement may be prohibitive for very large state spaces. Future work could integrate streaming algorithms or randomized linear algebra to mitigate this.
  3. Extensions to MDPs: The authors suggest that this framework could be extended to controlled Markov chains or Markov Decision Processes (MDPs). Such an extension would have significant implications for personalized Reinforcement Learning and latent/block MDP research.

By providing the first instance-specific high-probability bounds for MMC clustering, this work sets a new standard for how we understand and process sequential mixture data.

Summary updated

BibTeX
@inproceedings{lee2026near,
  author = {Junghyun Lee and Yassir Jedra and Alexandre Proutière and Se-Young Yun},
  title = {{Near-Optimal Clustering in Mixture of Markov Chains}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2026},
  url = {https://openreview.net/forum?id=FqOdMqgLb3},
}
Figure