Partially observable Markov decision process explained

A partially observable Markov decision process (POMDP) is a generalization of a Markov decision process (MDP). A POMDP models an agent decision process in which it is assumed that the system dynamics are determined by an MDP, but the agent cannot directly observe the underlying state. Instead, it must maintain a sensor model (the probability distribution of different observations given the underlying state) and the underlying MDP. Unlike the policy function in MDP which maps the underlying states to the actions, POMDP's policy is a mapping from the history of observations (or belief states) to the actions.

The POMDP framework is general enough to model a variety of real-world sequential decision processes. Applications include robot navigation problems, machine maintenance, and planning under uncertainty in general. The general framework of Markov decision processes with imperfect information was described by Karl Johan Åström in 1965[1] in the case of a discrete state space, and it was further studied in the operations research community where the acronym POMDP was coined. It was later adapted for problems in artificial intelligence and automated planning by Leslie P. Kaelbling and Michael L. Littman.[2]

An exact solution to a POMDP yields the optimal action for each possible belief over the world states. The optimal action maximizes the expected reward (or minimizes the cost) of the agent over a possibly infinite horizon. The sequence of optimal actions is known as the optimal policy of the agent for interacting with its environment.

Definition

Formal definition

A discrete-time POMDP models the relationship between an agent and its environment. Formally, a POMDP is a 7-tuple

(S,A,T,R,\Omega,O,\gamma)

, where

S

is a set of states,

A

is a set of actions,

T

is a set of conditional transition probabilities between states,

R:S x A\toR

is the reward function.

\Omega

is a set of observations,

O

is a set of conditional observation probabilities, and

\gamma\in[0,1)

is the discount factor.

At each time period, the environment is in some state

s\inS

. The agent takes an action

a\inA

, which causes the environment to transition to state

s'

with probability

T(s'\mids,a)

. At the same time, the agent receives an observation

o\in\Omega

which depends on the new state of the environment,

s'

, and on the just taken action,

a

, with probability

O(o\mids',a)

(or sometimes

O(o\mids')

depending on the sensor model). Finally, the agent receives a reward

r

equal to

R(s,a)

. Then the process repeats. The goal is for the agent to choose actions at each time step that maximize its expected future discounted reward:

E\left[

infty
\sum
t=0

\gammatrt\right]

, where

rt

is the reward earned at time

t

. The discount factor

\gamma

determines how much immediate rewards are favored over more distant rewards. When

\gamma=0

the agent only cares about which action will yield the largest expected immediate reward; when

\gamma1

the agent cares about maximizing the expected sum of future rewards.

Discussion

Because the agent does not directly observe the environment's state, the agent must make decisions under uncertainty of the true environment state. However, by interacting with the environment and receiving observations, the agent may update its belief in the true state by updating the probability distribution of the current state. A consequence of this property is that the optimal behavior may often include (information gathering) actions that are taken purely because they improve the agent's estimate of the current state, thereby allowing it to make better decisions in the future.

It is instructive to compare the above definition with the definition of a Markov decision process. An MDP does not include the observation set, because the agent always knows with certainty the environment's current state. Alternatively, an MDP can be reformulated as a POMDP by setting the observation set to be equal to the set of states and defining the observation conditional probabilities to deterministically select the observation that corresponds to the true state.

Belief update

After having taken the action

a

and observing

o

, an agent needs to update its belief in the state the environment may (or not) be in. Since the state is Markovian (by assumption), maintaining a belief over the states solely requires knowledge of the previous belief state, the action taken, and the current observation. The operation is denoted

b'=\tau(b,a,o)

. Below we describe how this belief update is computed.

After reaching

s'

, the agent observes

o\in\Omega

with probability

O(o\mids',a)

. Let

b

be a probability distribution over the state space

S

.

b(s)

denotes the probability that the environment is in state

s

. Given

b(s)

, then after taking action

a

and observing

o

,

b'(s')=ηO(o\mids',a)\sums\inT(s'\mids,a)b(s)

where

η=1/\Pr(o\midb,a)

is a normalizing constant with

\Pr(o\midb,a)=\sums'\inO(o\mids',a)\sums\inT(s'\mids,a)b(s)

.

Belief MDP

A Markovian belief state allows a POMDP to be formulated as a Markov decision process where every belief is a state. The resulting belief MDP will thus be defined on a continuous state space (even if the "originating" POMDP has a finite number of states: there are infinite belief states (in

B

) because there are an infinite number of probability distributions over the states (of

S

)).

Formally, the belief MDP is defined as a tuple

(B,A,\tau,r,\gamma)

where

B

is the set of belief states over the POMDP states,

A

is the same finite set of action as for the original POMDP,

\tau

is the belief state transition function,

r:B x A\toR

is the reward function on belief states,

\gamma

is the discount factor equal to the

\gamma

in the original POMDP.

Of these,

\tau

and

r

need to be derived from the original POMDP.

\tau

is

\tau(b,a,b')=\sumo\in\Pr(b'|b,a,o)\Pr(o|a,b),

where

\Pr(o|a,b)

is the value derived in the previous section and

Pr(b'|b,a,o)=\begin{cases} 1&ifthebeliefupdatewithargumentsb,a,oreturnsb'\\ 0&otherwise\end{cases}.

The belief MDP reward function (

r

) is the expected reward from the POMDP reward function over the belief state distribution:

r(b,a)=\sums\inb(s)R(s,a)

.

The belief MDP is not partially observable anymore, since at any given time the agent knows its belief, and by extension the state of the belief MDP.

Policy and value function

Unlike the "originating" POMDP (where each action is available from only one state), in the corresponding Belief MDP all belief states allow all actions, since you (almost) always have some probability of believing you are in any (originating) state. As such,

\pi

specifies an action

a=\pi(b)

for any belief

b

.

Here it is assumed the objective is to maximize the expected total discounted reward over an infinite horizon. When

R

defines a cost, the objective becomes the minimization of the expected cost.

The expected reward for policy

\pi

starting from belief

b0

is defined as
\pi(b
V
0)

=

infty
\sum
t=0

\gammatr(bt,at)=

infty
\sum
t=0

\gammatEl[R(st,at)\midb0,\pir]

where

\gamma<1

is the discount factor. The optimal policy

\pi*

is obtained by optimizing the long-term reward.

\pi*=\underset{\pi}{argmax

}\ V^\pi(b_0)where

b0

is the initial belief.

The optimal policy, denoted by

\pi*

, yields the highest expected reward value for each belief state, compactly represented by the optimal value function

V*

. This value function is solution to the Bellman optimality equation:

V*(b)=maxa\inl[r(b,a)+\gamma\sumo\in\Pr(o\midb,a)V*(\tau(b,a,o))r]

For finite-horizon POMDPs, the optimal value function is piecewise-linear and convex.[3] It can be represented as a finite set of vectors. In the infinite-horizon formulation, a finite vector set can approximate

V*

arbitrarily closely, whose shape remains convex. Value iteration applies dynamic programming update to gradually improve on the value until convergence to an

\epsilon

-optimal value function, and preserves its piecewise linearity and convexity.[4] By improving the value, the policy is implicitly improved. Another dynamic programming technique called policy iteration explicitly represents and improves the policy instead.[5] [6]

Approximate POMDP solutions

In practice, POMDPs are often computationally intractable to solve exactly. This intractability is often due to the curse of dimensionality or the curse of history (the fact that optimal policies may depend on the entire history of actions and observations). To address these issues, computer scientists have developed methods that approximate solutions for POMDPs. These solutions typically attempt to approximate the problem or solution with a limited number of parameters,[7] plan only over a small part of the belief space online, or summarize the action-observation history compactly.

Grid-based algorithms[8] comprise one approximate solution technique. In this approach, the value function is computed for a set of points in the belief space, and interpolation is used to determine the optimal action to take for other belief states that are encountered which are not in the set of grid points. More recent work makes use of sampling techniques, generalization techniques and exploitation of problem structure, and has extended POMDP solving into large domains with millions of states.[9] [10] For example, adaptive grids and point-based methods sample random reachable belief points to constrain the planning to relevant areas in the belief space.[11] [12] Dimensionality reduction using PCA has also been explored.[13]

Online planning algorithms approach large POMDPs by constructing a new policy for the current belief each time a new observation is received. Such a policy only needs to consider future beliefs reachable from the current belief, which is often only a very small part of the full belief space. This family includes variants of Monte Carlo tree search[14] and heuristic search.[15] Similar to MDPs, it is possible to construct online algorithms that find arbitrarily near-optimal policies and have no direct computational complexity dependence on the size of the state and observation spaces.[16]

Another line of approximate solution techniques for solving POMDPs relies on using (a subset of) the history of previous observations, actions and rewards up to the current time step as a pseudo-state. Usual techniques for solving MDPs based on these pseudo-states can then be used (e.g. Q-learning). Ideally the pseudo-states should contain the most important information from the whole history (to reduce bias) while being as compressed as possible (to reduce overfitting).[17]

POMDP theory

Planning in POMDP is undecidable in general. However, some settings have been identified to be decidable (see Table 2 in,[18] reproduced below). Different objectives have been considered. Büchi objectives are defined by Büchi automata. Reachability is an example of a Büchi condition (for instance, reaching a good state in which all robots are home). coBüchi objectives correspond to traces that do not satisfy a given Büchi condition (for instance, not reaching a bad state in which some robot died). Parity objectives are defined via parity games; they enable to define complex objectives such that reaching a good state every 10 timesteps. The objective can be satisfied:

We also consider the finite memory case in which the agent is a finite-state machine, and the general case in which the agent has an infinite memory.

!Objectives!Almost-sure (infinite memory)!Almost-sure (finite memory)!Positive (inf. mem.)!Positive (finite mem.)!Quantitative (inf. mem)!Quantitative (finite mem.)
BüchiEXPTIME-completeEXPTIME-completeundecidableEXPTIME-completeundecidableundecidable
coBüchiundecidableEXPTIME-completeEXPTIME-completeEXPTIME-completeundecidableundecidable
parityundecidableEXPTIME-completeundecidableEXPTIME-completeundecidableundecidable

Applications

POMDPs can be used to model many kinds of real-world problems. Notable applications include the use of a POMDP in management of patients with ischemic heart disease,[19] assistive technology for persons with dementia,[9] [10] the conservation of the critically endangered and difficult to detect Sumatran tigers[20] and aircraft collision avoidance.[21]

One application is a teaching case, a crying baby problem, where a parent needs to sequentially decide whether to feed the baby based on the observation of whether the baby is crying or not, which is an imperfect representation of the actual baby's state of hunger.[22] [23]

External links

Notes and References

  1. Åström, K.J. . Optimal control of Markov processes with incomplete state information . Journal of Mathematical Analysis and Applications . 10 . 174–205 . 1965. 10.1016/0022-247X(65)90154-X . free .
  2. 10.1016/S0004-3702(98)00023-X . Kaelbling, L.P., Littman, M.L., Cassandra, A.R. . Planning and acting in partially observable stochastic domains . Artificial Intelligence . 101 . 1–2 . 99–134 . 1998 .
  3. PhD . The optimal control of partially observable Markov processes . Sondik . E.J. . 1971 . Stanford University . https://web.archive.org/web/20191017142947/https://apps.dtic.mil/docs/citations/AD0730503. dead. October 17, 2019.
  4. 10.1287/opre.21.5.1071 . Smallwood, R.D., Sondik, E.J. . The optimal control of partially observable Markov decision processes over a finite horizon . Operations Research . 21 . 5 . 1071–88 . 1973 .
  5. 10.1287/opre.26.2.282 . Sondik, E.J. . The optimal control of partially observable Markov processes over the infinite horizon: discounted cost . Operations Research . 26 . 2 . 282–304 . 1978 .
  6. Proceedings of the Fourteenth International Conference on Uncertainty In Artificial Intelligence (UAI-98) . Solving POMDPs by searching in policy space . E. . Hansen . 1998 . 1301.7380 .
  7. 10.1613/jair.678 . Hauskrecht, M. . Value function approximations for partially observable Markov decision processes. Journal of Artificial Intelligence Research. 13. 33–94. 2000. free. 1106.0234.
  8. 10.1287/opre.39.1.162 . Lovejoy, W. . Computationally feasible bounds for partially observed Markov decision processes . Operations Research . 39 . 162–175 . 1991 .
  9. Assisting Persons with Dementia during Handwashing Using a Partially Observable Markov Decision Process . Jesse Hoey . Axel von Bertoldi . Pascal Poupart . Alex Mihailidis . Proceedings of the International Conference on Computer Vision Systems . 2007 . 10.2390/biecoll-icvs2007-89.
  10. 10.1016/j.cviu.2009.06.008 . Automated Handwashing Assistance For Persons With Dementia Using Video and a Partially Observable Markov Decision Process . Jesse Hoey . Pascal Poupart . Axel von Bertoldi . Tammy Craig . Craig Boutilier . Alex Mihailidis. . Computer Vision and Image Understanding . 114 . 5 . 503–519 . 2010. 10.1.1.160.8351 .
  11. Point-based value iteration: An anytime algorithm for POMDPs . Pineau, J., Gordon, G., Thrun, S. . International Joint Conference on Artificial Intelligence (IJCAI). Acapulco, Mexico . August 2003 . 1025–32 .
  12. Incremental methods for computing bounds in partially observable Markov decision processes . Hauskrecht, M.. Proceedings of the 14th National Conference on Artificial Intelligence (AAAI). Providence, RI . 1997 . 734–739 . 10.1.1.85.8303.
  13. Book: Roy, Nicholas . Nicholas Roy. Gordon, Geoffrey . Exponential Family PCA for Belief Compression in POMDPs . Advances in Neural Information Processing Systems . 2003 . http://papers.nips.cc/paper/2319-exponential-family-pca-for-belief-compression-in-pomdps.pdf.
  14. David Silver and Joel Veness. Monte-Carlo planning in large POMDPs. Advances in neural information processing systems. 2010.
  15. Nan Ye, Adhiraj Somani, David Hsu, and Wee Sun Lee . Journal of Artificial Intelligence Research . DESPOT: Online POMDP Planning with Regularization . 10.1613/jair.5328 . 58 . 2017. 231–266 . free . 1609.03250 .
  16. Michael H. Lim, Tyler J. Becker, Mykel J. Kochenderfer, Claire J. Tomlin, and Zachary N. Sunberg . Optimality Guarantees for Particle Belief Approximation of POMDPs . Journal of Artificial Intelligence Research . 77 . 2023 . 1591–1636 . 10.1613/jair.1.14525 . free . 2210.05015 .
  17. On overfitting and asymptotic bias in batch reinforcement learning with partial observability. Francois-Lavet, V., Rabusseau, G., Pineau, J., Ernst, D., Fonteneau, R.. Journal of Artificial Intelligence Research (JAIR). 2019. 65. 1–30 . 1709.07796.
  18. Chatterjee. Krishnendu. Chmelík. Martin. Tracol. Mathieu. 2016-08-01. What is decidable about partially observable Markov decision processes with ω-regular objectives. Journal of Computer and System Sciences. 82. 5. 878–911. 10.1016/j.jcss.2016.02.009. 0022-0000. free.
  19. 10.1016/S0933-3657(99)00042-1. 10675716. Planning treatment of ischemic heart disease with partially observable Markov decision processes. Hauskrecht, M., Fraser, H. . Artificial Intelligence in Medicine. 18. 3. 221–244. 2000.
  20. Chadès, I., McDonald-Madden, E., McCarthy, M.A., Wintle, B., Linkie, M., Possingham, H.P. . When to stop managing or surveying cryptic threatened species . Proc. Natl. Acad. Sci. U.S.A. . 105 . 37 . 13936–40 . 16 September 2008 . 18779594 . 2544557 . 10.1073/pnas.0805265105 . 2008PNAS..10513936C. free .
  21. Book: Kochenderfer, Mykel J. . Optimized Airborne Collision Avoidance . Decision Making Under Uncertainty . The MIT Press . 2015 . https://ieeexplore.ieee.org/document/7288641.
  22. Book: Kochenderfer . Mykel J.. Wheeler. Tim A. . Wray. Kyle H. . 2022 . Algorithms for decision making . Cambridge, Massachusetts; London, England. MIT Press . 678 . 9780262047012.
  23. Web site: Moss. Robert J.. WATCH: POMDPs: Decision Making Under Uncertainty POMDPs.jl. Crying baby problem . youtube.com . . en . video . Sep 24, 2021.