Informed Posterior Sampling: More Efficient Online Learning with Few Offline Demonstrations in Average-Reward MDPs

Dengwang Tang, Dongze Ye, Botao Hao, Rahul Jain, Zheng WenNeurIPS 2026

TL;DR

Online reinforcement learning is notoriously data-hungry, while offline learning often breaks down the moment an agent steps into the real world. This paper bridges the two by showing that if an online agent explicitly models how competent a human or expert demonstrator is when reading a tiny offline dataset, it can supercharge its exploration in endless, non-episodic tasks. By uniting imitation learning and online reinforcement learning into a single Bayesian framework, the authors cut learning mistakes by orders of magnitude on tough exploration problems.

What Problem Does This Paper Address?

Imagine teaching an AI to navigate a complex system that runs forever without resets—what researchers call an infinite-horizon, average-reward Markov Decision Process (MDP). Think of managing a power grid or personalizing an assistant over months.

If the AI learns purely through trial and error (online RL), it takes forever to stumble upon deeply hidden rewards. On the flip side, if it learns strictly from historical logs (offline RL or imitation learning), it suffers from distribution shift: the moment it makes a slight mistake and wanders into an unfamiliar state, its training fails.

Combining offline pre-training with online fine-tuning is the obvious fix. However, real-world demonstrations usually come from imperfect "sub-experts." If you blindly imitate a flawed teacher, you inherit their flaws. If you treat their demonstrations merely as raw physics data (ignoring why they chose certain actions), you throw away valuable strategic hints. How can an online agent squeeze the maximum strategic value out of a small, imperfect offline dataset?

Methods

The authors tackle this using Posterior Sampling, a classic Bayesian strategy where an agent maintains a probabilistic belief about how the world works, samples one plausible hypothesis, acts optimally for it for a fixed "episode" of time, updates its beliefs, and repeats.

  1. Modeling the Imperfect Expert: Instead of assuming the demonstrator is flawless, the authors model the expert as making softmax (Boltzmann) choices based on state-action values, scaled by a deliberateness parameter ($\beta$). If $\beta = 0$, the expert acts randomly; as $\beta \to \infty$, they act optimally.
  2. inf-iPSRL (The Theoretical Ideal): An exact Bayesian algorithm that updates its world-beliefs using both the environment transitions and the implied intentions of the $\beta$-competent expert. Unlike prior infinite-horizon algorithms that require complex, state-counting rules to decide when to switch policies, inf-iPSRL works with simple, predetermined episode lengths.
  3. inf-iRLSVI (The Practical Approximation): Because exact Bayesian math becomes intractable quickly, the authors build an efficient approximation using a Bayesian bootstrap. Rather than computing exact probabilities, the agent injects random Gaussian and exponential noise into its loss function and solves for the best fit—even when the expert's competence $\beta$ is completely unknown.

Datasets

Because this is a reinforcement learning paper, evaluation happens in interactive simulated environments rather than static datasets, seeded with small synthetic expert trajectories (typically just $5 \times \text{States} \times \text{Actions}$ transitions):

  • RiverSwim ($S$ states): A classic hard-exploration chain where an easy, tiny reward sits at one end, and a massive reward sits at the far end against a strong "current."
  • Grid2Room & Grid4Room: Stochastic gridworlds where an agent must navigate doorways between rooms to find a goal.
  • ClusterRing-$M$ (Newly Introduced): A sparse-reward benchmark consisting of $M$ random MDPs wired together in a directed cycle. To get the optimal average reward, the agent must figure out how to traverse the entire ring without getting distracted.

Key Insights and Ideas

  • Don't just watch the physics; read the mind: A transition $(s, a, s')$ tells you about environment dynamics, and the choice of $a$ tells you what the expert thought was smart. Modeling expert competence turns a handful of demonstrations into a compass for deep exploration.
  • Imitation Learning + Value Iteration = One Loss Function: In inf-iRLSVI, the math naturally decomposes into a randomized Temporal-Difference (value learning) loss plus a randomized KL-divergence (imitation) loss. As the agent gathers more online experience, the online loss naturally overwhelms the offline imitation loss, allowing smooth, organic fine-tuning.
  • Simpler schedules still work: In infinite-horizon theory, proving low regret (the cumulative reward lost compared to an omniscient optimal policy) usually requires tricky, dynamic episode-stopping rules. The authors prove you can hit optimal $\tilde{\mathcal{O}}(\sqrt{\varepsilon T})$ regret scaling using simple deterministic schedules, where $\varepsilon$ shrinks exponentially as offline data grows.

Key Results

Across 100,000 online steps, modeling expert competence yields dramatic drops in cumulative regret (lower is better), especially where pure exploration is brutal:

  • Crushing the "partially informed" baseline: To prove their expert model matters, the authors test piRLSVI—an ablation given the exact same offline data, but treating it as ordinary transitions without modeling the expert's policy. On RiverSwim-25, uRLSVI (online-only) racks up 38.6k regret, piRLSVI barely improves at 33.5k, and inf-iRLSVI plummets to 108—over a 300x improvement.
  • Scaling to large spaces: On ClusterRing-10 (100 states, 10 actions), inf-iRLSVI achieves 213 regret, beating online-only competitors like IMED-RL (3.5k) and UCRL3 (5.0k) by more than an order of magnitude.
  • Graceful under broken assumptions: Even when demonstrators violate the algorithm's assumptions—such as using $\epsilon$-greedy policies, having biased value estimates, or pooling data from a mixture of different experts—fitting a single scalar $\beta$ still beats piRLSVI in 15 out of 15 benchmark comparisons (e.g., 1,793 vs. 38,658 on RiverSwim-50 with an $\epsilon$-greedy expert).

Limitations and Future Work

  • Tabular worlds only: Both the theoretical proofs and experiments live in tabular MDPs (discrete, countable states and actions).
  • Theory-practice gap: While inf-iPSRL has ironclad theoretical regret bounds, the practical inf-iRLSVI relies on heuristics (like a DQN-style frozen target trick) whose formal regret analysis remains an open question.
  • Next steps: Because inf-iRLSVI relies on a clean, differentiable loss function, the authors note it is ripe to be plugged directly into deep neural networks—potentially powering continual, infinite-horizon adaptation and personalization for LLM agents.

Summary updated

Abstract

We study efficient online reinforcement learning in the infinite horizon setting when there is an offline dataset to start with. We assume that the offline dataset is generated by an expert but with an unknown level of competence, i.e., it is not perfect and not necessarily using the optimal policy. We show that if the learning agent models the behavioral policy (parameterized by a competence parameter) used by the expert, it can do substantially better in terms of minimizing cumulative regret than if it does not do that. We establish an upper bound on regret of the exact informed PSRL (iPSRL) algorithm that scales as $\tilde{\mathcal{O}}(\sqrt{T})$. This requires a novel prior-dependent regret analysis of Bayesian online learning algorithms for the infinite horizon setting. We then propose the informed RLSVI (iRLSVI) algorithm to efficiently approximate the iPSRL algorithm. Empirical results show that small offline expert datasets are sufficient for iRLSVI to outperform online-only algorithms on hard exploration domains.
BibTeX
@inproceedings{tang2026informed,
  author = {Dengwang Tang and Dongze Ye and Botao Hao and Rahul Jain and Zheng Wen},
  title = {{Informed Posterior Sampling: More Efficient Online Learning with Few Offline Demonstrations in Average-Reward MDPs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=8WF7tRvbkZ},
}
Figure