Standard Reinforcement Learning (RL) relies on the Markov property: the idea that the current state provides all the information necessary to predict the future. In the real world, this assumption frequently breaks down. A robot might encounter different floor frictions, a doctor treats patients with unique medical histories, or a recommendation system interacts with users who have distinct, unobserved preferences.
In these cases, the "rules" of the environment—the rewards and the physics—are governed by a latent context. While this context is hidden from the agent, it often remains constant or changes slowly over time. This research direction focuses on how agents can efficiently infer these hidden variables to act optimally without the computational explosion of general partially observable models.
The Gap Between State and Context
In a standard Markov Decision Process (MDP), the transition from state $s$ to $s'$ under action $a$ is fixed. However, Jeongyeol Kwon, Yonathan Efroni, and colleagues argue in RL for Latent MDPs: Regret Guarantees and a Lower Bound that real-world dynamics are often "mixed."
Imagine a drone flying in different wind conditions. The "state" (position and velocity) is observable, but the "context" (wind speed) is not. If the drone ignores the wind, its transitions appear non-Markovian and noisy. The Latent MDP (LMDP) framework addresses this by assuming the environment is a collection of several possible MDPs. At the start of an episode, one is chosen, and the agent must figure out which one it is interacting with based on the sequence of states and rewards it observes.
Inference as a Substitute for Observability
The core challenge is that the agent cannot see the context variable directly. Early work by Dit-Yan Yeung and Samuel P. M. Choi on Hidden-Mode MDPs (An Environment Model for Nonstationary Reinforcement Learning) framed this as a filtering problem: the agent maintains a belief over which "mode" it is in.
Modern approaches refine this by using history to "collapse" uncertainty. For example:
- Retrospective Inference: Lue Tao and Zhi-Hua Zhou propose in Avoiding Undesired Future with Sequential Decisions that agents can look back at their trajectory to calibrate their internal model of hidden environmental factors.
- Contextual World Models: To achieve zero-shot generalization, James Chapman and Guido Montufar show in Zero-Shot Context Generalization in Reinforcement Learning from Few Training Contexts that agents can learn to map short sequences of observations to a latent context space, allowing them to adapt to new physics (like gravity) without explicit labels.
Why Latent MDPs are Tractable
General Partially Observable MDPs (POMDPs) are notoriously difficult to solve (PSPACE-complete). Why is the latent context setting different? The intuition lies in persistence.
In a general POMDP, the hidden state can change at every step. In an LMDP, the context is typically static within an episode. This allows the agent to aggregate information over time. Runlong Zhou and Simon Shaolei Du demonstrate in Horizon-Free Reinforcement Learning for Latent Markov Decision Processes that if the different possible environments are sufficiently "separated" in their dynamics, the regret of the agent scales only logarithmically with the planning horizon. Essentially, once the agent identifies the context, the problem reduces to a standard, easy-to-solve MDP.
Reward-Mixing vs. Dynamics-Mixing
A significant distinction in the literature is whether the latent context affects the rewards, the transitions, or both.
In Reward-Mixing MDPs (RMMDPs), the physics of the world are the same for everyone, but different "types" of users want different things. Jeongyeol Kwon and Shie Mannor show in Reward-Mixing MDPs with Few Latent Contexts are Learnable that these are learnable even when the number of contexts is large, often by using higher-order moments of the observed rewards to "de-mix" the underlying distributions.
However, when the context also influences transitions (Dynamics-Mixing), the problem becomes harder. The agent's actions now serve a dual purpose: they must maximize reward while simultaneously "probing" the environment to reveal its hidden laws. This "co-exploration" is explored by Sumantrak Mukherjee in Co-Exploration and Co-Exploitation via Shared Structure in Multi-Task Bandits, where gathering information for the global model is prioritized even if it is suboptimal for the current latent user.
Overcoming Expert Bias
The latent context problem also appears in offline learning. If an agent learns from expert demonstrations, but the expert had access to hidden information (latent confounders) that the agent cannot see, the agent may learn a dangerously flawed policy. Guy Tennenholtz and Assaf Hallak highlight this in On Covariate Shift of Latent Confounders in Imitation and Reinforcement Learning, proving that pure imitation fails in these scenarios. The solution is to use the expert data as a prior while allowing the agent to perform online "corrective" sampling to resolve the ambiguity of the hidden context.