Model-based Bootstrap of Controlled Markov Chains

Ziwei Su, Imon Banerjee, Diego Klabjan

TL;DR

This paper introduces the first model-based bootstrap method for finite Controlled Markov Chains (CMCs) that accommodates nonstationary or history-dependent behavior policies. By proving the method's distributional consistency, the authors provide a mathematically rigorous and practically superior tool for constructing accurate confidence intervals in offline reinforcement learning tasks like policy evaluation and optimal policy recovery.

What Problem Does This Paper Address?

In offline reinforcement learning (RL), agents learn optimal strategies using historical datasets rather than interacting directly with an environment. For safe deployment in real-world systems (like healthcare or finance), it is crucial to know not just the estimated value of a policy, but also the uncertainty (confidence intervals) around that estimate.

Standard statistical tools like the Central Limit Theorem (CLT) can provide these intervals, but they require complex covariance estimations that perform poorly with small sample sizes. The bootstrap method—resampling data to estimate uncertainty—is a classic alternative, but existing bootstrap techniques fail in offline RL. Why? Because offline data is typically generated by an unknown "behavior policy" (e.g., historical human choices) that changes over time or depends on past history, breaking the standard assumption of stationary, independent data.

This paper addresses this gap by developing a model-based bootstrap tailored for finite controlled Markov chains under arbitrary, potentially nonstationary or history-dependent behavior policies.

Methods

The authors propose a Model-based Bootstrap framework consisting of the following steps:

  1. Estimation: From the offline dataset, calculate the count-based empirical transition estimator ($\hat{M}$) and a simple one-step empirical behavior policy ($\hat{\pi}_b$).
  2. Simulation: Use $\hat{M}$ and $\hat{\pi}_b$ to generate $B$ independent bootstrap replicate datasets. Crucially, in the episodic setting, each bootstrap episode is initialized by copying the exact starting states from the original dataset, avoiding the need to model a complex reset mechanism.
  3. Re-estimation: Compute bootstrap transition estimators ($\hat{M}^*$) for each replicate.
  4. Downstream Application: Plug these replicates into the Bellman equations to calculate bootstrap value functions for Offline Policy Evaluation (OPE) and Optimal Policy Recovery (OPR).

The core theoretical contribution is proving distributional consistency—showing that the bootstrap error ($\sqrt{n}(\hat{M}^* - \hat{M})$) converges to the same Gaussian distribution as the true estimation error ($\sqrt{n}(\hat{M} - M)$). The authors achieve this using a novel bootstrap law of large numbers for visitation counts and the martingale central limit theorem. They then use the delta method via Hadamard differentiability of Bellman operators to extend this consistency directly to downstream OPE and OPR targets.

Datasets

The method was evaluated empirically using the RiverSwim MDP, a standard benchmark consisting of 6 states and 2 actions.

  • Characteristics: RiverSwim is deliberately designed to be highly challenging for statistical inference. The agent begins on the left and receives a small reward for staying there, but a much larger reward shines at the far right (state 6). Swimming right is difficult due to a "current" (probabilistic transitions pushing the agent left).
  • The Challenge: The behavior policy rarely visits the high-reward upstream states, leading to highly imbalanced data and sparse visitation counts, which severely strains asymptotic normality assumptions.

Key Insights and Ideas

  • The Sufficiency of One-Step Estimates: A major "aha" moment is that even if the true behavior policy is highly complex, nonstationary, or history-dependent, the bootstrap only needs a simple one-step empirical policy estimate ($\hat{\pi}_b(a|s) = N_s^{(a)}/N_s$). The long-term asymptotic distributions depend only on the ergodic occupation measure (how often state-action pairs are visited overall), not the exact chronological history.
  • Percentile vs. Pivot CIs: The paper highlights that percentile confidence intervals (built directly from the quantiles of the bootstrap replicates) significantly outperform pivot intervals. Pivot intervals struggle near boundaries where the non-degeneracy condition is weak (e.g., when two actions yield nearly identical optimal values).

Key Results

The authors compared their model-based bootstrap (percentile and pivot CIs) against two baselines: the episodic bootstrap and standard plug-in CLT intervals.

  • Near-Nominal Coverage: For both OPE and OPR tasks, the model-based bootstrap percentile CI achieved near-nominal coverage (e.g., hovering around 92%–97% for a nominal 95% confidence interval) in well-sampled regimes ($n \ge 500$).
  • Baseline Collapse: The episodic bootstrap baseline completely failed at small sample sizes or short episode lengths. For instance, when only a single long episode or very few episodes were available, the episodic bootstrap collapsed to zero coverage because it couldn't capture within-episode variation.
  • Data Efficiency: The proposed method proved much more robust and better calibrated than plug-in CLT methods at small sample sizes, where the plug-in methods systematically undercovered due to covariance estimation errors.

Limitations and Future Work

While a major step forward, the authors note several limitations:

  1. Finite Spaces Only: The current analysis is strictly limited to finite state-action spaces. Extending this to continuous spaces or function approximation (like deep neural networks) remains an open challenge.
  2. Known Rewards: The framework assumes the reward function is known. If rewards must be estimated from data, additional estimation errors could impact finite-sample performance.
  3. Asymptotic Regimes: The episodic proofs assume a fixed episode length $T$ while the number of episodes $K \to \infty$. The alternative regime (fixed $K$, $T \to \infty$) is left for future exploration.

Summary updated

BibTeX
@inproceedings{su2026model,
  author = {Ziwei Su and Imon Banerjee and Diego Klabjan},
  title = {{Model-based Bootstrap of Controlled Markov Chains}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=0pYlkhyLTf},
}
Figure