Offline Oracle-Efficient Learning for Contextual MDPs via Layerwise Exploration-Exploitation Tradeoff

Jian Qian, Haichen Hu, David Simchi-Levi

Contextual Markov Decision Processes (CMDPs) are fundamental in Reinforcement Learning (RL) for modeling environments where external information—such as a user's profile or environmental conditions—influences state transitions and rewards. While researchers have successfully built optimal algorithms for simpler, single-step problems (contextual bandits) using a small number of calls to an offline regression oracle, extending this efficiency to multi-step CMDPs has been a major hurdle.

Existing algorithms for CMDPs typically face one of three major drawbacks: they require computationally heavy online density estimation oracles, they need $O(T)$ calls to an offline oracle (requiring retraining at almost every time step), or they rely on highly restrictive structural assumptions about the environment (like uniform reachability).

This paper introduces LOLIPOP (Layerwise pOLicy cover Inverse gaP weighting with trusted OccuPancy measures), a novel algorithm that efficiently solves CMDPs by reducing the problem to offline density estimation. It achieves near-optimal regret with exponentially fewer computational oracle calls than previous methods without relying on restrictive structural assumptions.

Comparison of LOLIPOP against prior algorithms

The LOLIPOP Algorithm

Instead of updating the policy continuously, LOLIPOP divides the total $T$ rounds of interaction into a small number of epochs. Crucially, it further divides each epoch into $H$ segments, where $H$ is the horizon (number of layers or steps in the MDP).

Layerwise dataset generation and policy update process

The core techniques driving this approach include:

  • Offline Density Estimation: Instead of an online oracle, LOLIPOP collects batches of trajectory data and feeds them into an offline Maximum Likelihood Estimation (MLE) oracle to predict the environment's dynamics.
  • Trusted Occupancy Measures: In multi-step RL, estimation errors compound exponentially as you look further into the future. To fix this, the authors introduce "trusted occupancy measures." The algorithm explicitly identifies and clips out rarely visited state-action transitions. By only planning over "trusted" transitions, the algorithm prevents divergence from blowing up across layers.
  • Layerwise Exploration-Exploitation: In each segment, the algorithm uses Inverse Gap Weighting (IGW) on a set of explorative policies (a policy cover) to carefully balance exploiting known high-reward actions and exploring uncertain ones, layer by layer.

Key Insights

  • Decoupling layers prevents error explosion: Naively estimating occupancy measures for all layers from a single dataset causes errors to accumulate exponentially. By generating a new dataset from a different policy for each layer (the layerwise design), LOLIPOP successfully breaks this exponential accumulation.
  • Clipping is mathematically powerful: Simply estimating the environment isn't enough because rare transitions ruin mathematical guarantees. By explicitly defining a set of "trusted transitions" and zeroing out the rest, the estimated occupancy measures become multiplicatively bounded by the true dynamics. This guarantees that states the algorithm thinks it visits often are actually visited often in reality.
  • Versatility beyond regret: The layerwise trusted occupancy framework isn't just for standard reward-maximizing RL. It can be seamlessly adapted for reward-free RL (where an agent explores an environment without a reward signal to prepare for any future reward function), achieving near-optimal sample complexity.

Key Results

  • Drastic Computational Speedup: If the total number of rounds $T$ is unknown, the algorithm requires only $O(H \log T)$ calls to the offline oracle. If $T$ is known in advance, this drops even further to $O(H \log \log T)$. This is a massive improvement over previous $O(T)$ methods.
  • Near-Optimal Regret: LOLIPOP achieves a regret bound of $\tilde{O}(\text{poly}(H, S, A) \sqrt{T \log |\mathcal{M}|})$, which matches known theoretical lower bounds up to polynomial factors of the state/action space.
  • Reward-Free RL: When applied to reward-free exploration, the algorithm achieves a near-optimal sample complexity of $O(H^7 S^4 A^3 \log(|\mathcal{M}|/\delta) / \epsilon^2)$ using only $O(H)$ oracle calls—the first result of its kind for stochastic CMDPs.

Limitations and Future Work

  • Tabular Assumption: The current algorithm relies on tabular CMDPs (finite, discrete state and action spaces). Extending this to low-rank or linear CMDPs is a major future challenge, as the concept of "trusted transitions" does not easily translate to continuous, low-rank structures.
  • Model-Based vs. Model-Free: LOLIPOP is a model-based approach. Developing a model-free version would be more practical for real-world applications, but it is difficult to balance exploration without relying on explicit occupancy measures.
  • Oracle Requirements: The algorithm specifically requires an offline density estimation oracle (which provides a Hellinger distance guarantee). A standard offline regression oracle (which only gives a 2-norm distance) is inadequate for their math. Exploring whether a reduction to pure offline regression is possible remains an open question.

Summary updated

BibTeX
@inproceedings{qian2024offline,
  author = {Jian Qian and Haichen Hu and David Simchi-Levi},
  title = {{Offline Oracle-Efficient Learning for Contextual MDPs via Layerwise Exploration-Exploitation Tradeoff}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=848vuK2cKp},
}
Figure