Search

Search papers and lessons

Partially Observable Markov Decision Process

Level 3 · 11 min read

A partially observable Markov decision process is an MDP where the agent cannot see the state, so it must act on a belief, a probability distribution over the states it might be in.

On this page

  • Colour = topic mix
  • Probability
  • Linear algebra
  • Reinforcement learning
  • Stochastic processes
  • Discrete math
  • Sign in to see your progress

TL;DR

A partially observable Markov decision process (POMDP) is a Markov decision process in which the agent cannot see the true state. It receives an observation that depends on the state, and it must choose actions using the history of what it has seen. The standard trick is to summarise that history as a belief: a probability distribution over the states the agent might be in. Each new action and observation updates the belief with Bayes' rule, and the problem becomes a decision problem over beliefs.

Where you'll see it: robots with noisy sensors that must localise before they grasp, dialogue systems that must infer what a user wants, and medical or maintenance decisions made from test results that are only indirect evidence of the underlying condition.

Intuition

Acting in the dark

Suppose a robot must open one of two doors. Behind one is a tiger. Opening the tiger door is very costly; opening the other is worth a small reward. The robot cannot see the tiger. It can pay a small cost to listen, and listening gives a noisy hint about which side the tiger is on. This is the classic toy POMDP from the planning literature, and it captures the essential problem: the state is hidden, but the robot's actions can buy information.

A fully observable MDP would let the robot act on the state directly. Here the robot has only observations. Two different histories can produce the same current observation but imply very different states. A policy that looks only at the last observation throws away evidence. A policy that looks at the full history keeps everything, but the history grows without bound.

The belief is the compromise. It is a fixed-size summary that contains everything about the past that matters for the future. If the belief is right, it is as good as the whole history for making decisions. That is why POMDPs are solved in the space of beliefs.

Where the loop sits

flowchart LR
  env["Hidden state s(t)"] -->|"observation o(t)"| upd["Belief update"]
  upd -->|"belief b(t)"| pol["Policy"]
  pol -->|"action a(t)"| env

The environment changes state and emits an observation. The belief updater folds the observation into the belief. The policy looks only at the belief and picks the next action. Note that the policy never sees the state. In the PlaNet paper, which treats image-based control as a POMDP, the encoder plays the role of the belief updater: it infers an approximate belief over the hidden state from the history of images and actions.

The math

Definition

Definition: Partially observable Markov decision process

A POMDP is a tuple (S,A,O,P,R,O,γ)(\mathcal{S}, \mathcal{A}, \mathcal{O}, P, R, O, \gamma), where

  • S\mathcal{S} is the set of hidden states,
  • A\mathcal{A} is the set of actions,
  • O\mathcal{O} is the set of observations,
  • P(s′∣s,a)P(s' \mid s, a) is the probability that the next state is s′s' when action aa is taken in state ss,
  • R(s,a)R(s, a) is the expected reward for taking action aa in state ss,
  • O(o∣s′,a)O(o \mid s', a) is the probability of observing oo after action aa leads to state s′s',
  • γ∈[0,1)\gamma \in [0, 1) is the discount factor.

Compared with a plain MDP, the new ingredient is OO. The MDP's state is no longer visible. The agent's data are the pairs of action and observation it has actually received, and the probability of each observation depends on the hidden state that produced it.

The belief

The belief at time tt is the probability distribution over states given everything the agent has seen and done:

bt(s)=P(st=s∣o1,a1,…,ot−1,at−1,ot)b_t(s) = P(s_t = s \mid o_1, a_1, \ldots, o_{t-1}, a_{t-1}, o_t)

It lives in the probability simplex over S\mathcal{S}. For two states it is a single number, the probability of the first state, between 0 and 1. For nn states it has n−1n - 1 free numbers. The belief is a sufficient statistic: the best action depends on the history only through btb_t.

Updating the belief

When the agent takes action aa from belief bb and then observes oo, the new belief is

b′(s′)=O(o∣s′,a)∑sP(s′∣s,a) b(s)∑s′′O(o∣s′′,a)∑sP(s′′∣s,a) b(s)b'(s') = \frac{O(o \mid s', a) \sum_{s} P(s' \mid s, a)\, b(s)}{\sum_{s''} O(o \mid s'', a) \sum_{s} P(s'' \mid s, a)\, b(s)}

Read this in two steps. The sum over ss is a prediction: it spreads the current belief through the transition model. The product with O(o∣s′,a)O(o \mid s', a) is a correction: it multiplies each candidate state by how likely the observation would be there. The denominator normalises the result. This is Bayes' rule, where the prior is the predicted belief and the likelihood is the observation model. The Bayes rule step is the heart of the whole framework.

The belief MDP

Define the reward on beliefs as the expected reward under the belief, ρ(b,a)=∑sb(s)R(s,a)\rho(b, a) = \sum_s b(s) R(s, a). Together with the update above, which gives the distribution over next beliefs, this makes a new MDP whose states are beliefs. Its states are continuous, but the Markov property holds again: the next belief depends only on the current belief, the action, and the observation. So the theory of MDPs carries over, including Bellman equations, where the value function is defined on beliefs:

V(b)=max⁡a[ρ(b,a)+γ∑oP(o∣b,a) V(ba,o′)]V(b) = \max_{a} \Big[ \rho(b, a) + \gamma \sum_{o} P(o \mid b, a)\, V(b'_{a,o}) \Big]

Here ba,o′b'_{a,o} is the updated belief and P(o∣b,a)P(o \mid b, a) is the normaliser from the update. The formula is the ordinary Bellman equation with beliefs in place of states.

Shape of the value function

For a finite horizon, the optimal value function over beliefs is the maximum of a finite set of linear functions of bb, the so-called alpha vectors:

V(b)=max⁡α∈Γ∑sα(s) b(s)V(b) = \max_{\alpha \in \Gamma} \sum_{s} \alpha(s)\, b(s)

Each α\alpha is a vector over states, and the value of a belief is the best linear score among them. The function is piecewise linear and convex. Exact solvers exploit this structure by keeping a set of alpha vectors and pruning dominated ones. The set can grow quickly, which is the main computational barrier.

Worked examples

Example
Two observations, one state

Consider a system with two states, s1s_1 and s2s_2. It does not move; the action is only to listen. The sensor says "1" with probability 0.80.8 when the state is s1s_1, and with probability 0.20.2 when the state is s2s_2, so O(1∣s1)=0.8O(1 \mid s_1) = 0.8 and O(1∣s2)=0.2O(1 \mid s_2) = 0.2. The prior is uniform: b0=(0.5,0.5)b_0 = (0.5, 0.5). Transitions are the identity, so the prediction step does nothing.

First observation is "1".

  1. Unnormalised: O(1∣s1)⋅0.5=0.8×0.5=0.40O(1 \mid s_1) \cdot 0.5 = 0.8 \times 0.5 = 0.40 for s1s_1, and O(1∣s2)⋅0.5=0.2×0.5=0.10O(1 \mid s_2) \cdot 0.5 = 0.2 \times 0.5 = 0.10 for s2s_2.
  2. Normaliser: 0.40+0.10=0.500.40 + 0.10 = 0.50.
  3. New belief: b1=(0.80,0.20)b_1 = (0.80, 0.20).

Second observation is also "1", with the belief from step one as the prior.

  1. Unnormalised: 0.8×0.80=0.640.8 \times 0.80 = 0.64 for s1s_1, and 0.2×0.20=0.040.2 \times 0.20 = 0.04 for s2s_2.
  2. Normaliser: 0.64+0.04=0.680.64 + 0.04 = 0.68.
  3. New belief: b2=(0.941,0.059)b_2 = (0.941, 0.059).

Interpretation: two agreeing observations move the belief from 0.80 to 0.94 on s1s_1. Each observation is only 80 percent reliable, but two agreeing ones are much stronger evidence. A policy that acts on the last observation alone would be less certain than one that tracks the belief.

Example
A belief that drifts and is then corrected

Now let the state flip over time. Each step it stays with probability 0.90.9 and flips with probability 0.10.1, so P(s1∣s1)=0.9P(s_1 \mid s_1) = 0.9, P(s2∣s1)=0.1P(s_2 \mid s_1) = 0.1, and symmetrically for s2s_2. Start from the belief b=(0.8,0.2)b = (0.8, 0.2) and take a listening action.

  1. Prediction, for s1s_1: 0.9×0.8+0.1×0.2=0.72+0.02=0.740.9 \times 0.8 + 0.1 \times 0.2 = 0.72 + 0.02 = 0.74.
  2. Prediction, for s2s_2: 0.1×0.8+0.9×0.2=0.08+0.18=0.260.1 \times 0.8 + 0.9 \times 0.2 = 0.08 + 0.18 = 0.26. The predicted belief (0.74,0.26)(0.74, 0.26) sums to 1.
  3. Observation is "2", with O(2∣s1)=0.2O(2 \mid s_1) = 0.2 and O(2∣s2)=0.8O(2 \mid s_2) = 0.8.
  4. Correction, unnormalised: 0.2×0.74=0.1480.2 \times 0.74 = 0.148 for s1s_1, and 0.8×0.26=0.2080.8 \times 0.26 = 0.208 for s2s_2.
  5. Normaliser: 0.148+0.208=0.3560.148 + 0.208 = 0.356.
  6. New belief: b′=(0.416,0.584)b' = (0.416, 0.584).

Interpretation: the prior favoured s1s_1, but the observation favoured s2s_2 strongly enough to reverse the lean. The transition step is what keeps the belief from becoming overconfident, because the state can always change. Without it, the belief would keep piling evidence onto the old state.

Tradeoffs and failure modes

Exact POMDP planning is hard. Papadimitriou and Tsitsiklis showed in 1987 that finite-horizon POMDP planning is PSPACE-complete, so there is no hope of an efficient exact algorithm in general. In practice the difficulty appears as the number of alpha vectors and the dimension of the belief.

SituationProblemBetter choice
Few states, short horizonExact alpha-vector methods are feasibleExact value iteration with pruning
Many statesThe belief has too many dimensionsPoint-based methods, which back up beliefs sampled from reachable histories
Long horizon, rich observationsHand-built belief updates are impracticalLearned belief models, such as an RNN or a latent state-space model
Model of OO or PP is wrongThe belief is confidently wrongRecalibrate the model, or keep a broader belief
Only a fixed-length history is neededBelief tracking is more machinery than the task needsA policy over the last kk observations, or a recurrent policy

Two failure modes come up repeatedly. The first is a model mismatch: if the observation model is wrong, the belief update is systematically biased, and the agent can be confident and wrong. The second is belief collapse: a near-zero prior on the true state, which the observations never correct, leaves the belief stuck. A small amount of probability on every state, or a transition model that allows changes, protects against this.

Compared with an MDP, a POMDP agent can act to gain information. A policy might take a costly action only to reduce uncertainty, such as listening before opening a door. An MDP policy cannot value information, since it already knows the state.

History

The idea of control under incomplete state information goes back to the 1960s. Åström studied discrete-time control of Markov processes with incomplete information in 1965, showing that the posterior distribution over states is the right object to control. In the early 1970s, Smallwood and Sondik studied optimal control of partially observable Markov processes over finite horizons, which established the piecewise-linear convex structure of the value function. Their work was the basis for the alpha-vector solvers.

Interest in POMDPs spread through artificial intelligence and robotics in the 1990s, as approximate solvers became practical. Kaelbling, Littman and Cassandra's 1998 paper connected the formalism to planning and acting for robots. In recent years, deep reinforcement learning has revived the problem: agents learn recurrent or latent belief models end to end instead of computing exact beliefs.

Check yourself

QuestionRecall: what is a belief in a POMDP, and why is it enough to act on?Show answer

A belief is a probability distribution over hidden states, conditioned on the full history of actions and observations. It is enough because it is a sufficient statistic for the future. Any two histories that give the same belief lead to the same distribution over future states and observations, so the optimal action depends on the history only through the belief.

QuestionComputation: the belief is (0.5,0.5)(0.5, 0.5), the transitions are the identity, O(1∣s1)=0.9O(1 \mid s_1) = 0.9 and O(1∣s2)=0.3O(1 \mid s_2) = 0.3. After observing 1, what is the new belief on s1s_1?Show answer

Unnormalised weights: 0.9×0.5=0.450.9 \times 0.5 = 0.45 for s1s_1 and 0.3×0.5=0.150.3 \times 0.5 = 0.15 for s2s_2. The normaliser is 0.45+0.15=0.600.45 + 0.15 = 0.60. The belief on s1s_1 is 0.45/0.60=0.750.45 / 0.60 = 0.75, and on s2s_2 it is 0.250.25. So the new belief is (0.75,0.25)(0.75, 0.25).

QuestionWhy does a policy that looks only at the most recent observation do worse than one that tracks the belief?Show answer

The most recent observation is noisy, and it ignores evidence from earlier steps. Two different histories can end with the same observation yet imply different distributions over the hidden state. A belief combines all the evidence, weighting each observation by its likelihood and carrying forward what the transition model says about change. Acting on one observation discards that information, so the agent is less certain than it could be.

QuestionApplied: a warehouse robot cannot see whether a shelf is empty until it moves close, and moving close costs time. When should it move closer rather than act on its belief?Show answer

It should move closer when the value of the information it gains exceeds the cost of moving. A POMDP solves this trade-off: the expected improvement in the value of the best action, given the possible observations, is weighed against the time spent. If the belief is already close to certain, the information is worth little and the robot should act. If the belief is near even and the shelf choice matters a lot, the information is worth the trip.

QuestionApplied: why might a recurrent policy trained end to end fail to match an exact belief-based solution on a small POMDP, even though it sees the same observations?Show answer

A recurrent policy has to learn the belief update from data. With limited experience it can learn a summary that is inaccurate for rare histories, and it has no guarantee that its summary is sufficient. An exact belief uses the true model, so it is correct by construction, given that the model is right. The trade-off is that the exact belief needs a model and is expensive for large state spaces, while the learned policy needs data and no model.

Sources