Where are we? Informatics 2D Reasoning and Agents Semester 2, - - PowerPoint PPT Presentation

where are we informatics 2d reasoning and agents
SMART_READER_LITE
LIVE PREVIEW

Where are we? Informatics 2D Reasoning and Agents Semester 2, - - PowerPoint PPT Presentation

Introduction Introduction Constructing DBNs Constructing DBNs Inference in DBNs Inference in DBNs Summary Summary Where are we? Informatics 2D Reasoning and Agents Semester 2, 20192020 Last time . . . Inference in temporal


slide-1
SLIDE 1

Introduction Constructing DBNs Inference in DBNs Summary

Informatics 2D – Reasoning and Agents

Semester 2, 2019–2020

Alex Lascarides alex@inf.ed.ac.uk

Lecture 28 – Dynamic Bayesian Networks 24th March 2020

Informatics UoE Informatics 2D 1 Introduction Constructing DBNs Inference in DBNs Summary

Where are we?

Last time . . . ◮ Inference in temporal models ◮ Discussed general model (forward-backward, Viterbi etc.) ◮ Specific instances: HMMs ◮ But what is the connection to Bayesian networks? Today . . . ◮ Dynamic Bayesian Networks

Informatics UoE Informatics 2D 183 Introduction Constructing DBNs Inference in DBNs Summary

Dynamic Bayesian Networks

◮ We’ve already seen an example of a DBN—Umbrella World ◮ A DBN is a BN describing a temporal probability model that can have any number of state variables Xt and evidence variables Et ◮ HMMs are DBNs with a single state and a single evidence variable ◮ But recall that one can combine a set of discrete (evidence or state) variables into a single variable (whose values are tuples). ◮ So every discrete-variable DBN can be described as a HMM. ◮ So why bother with DBNs? ◮ Because decomposing a complex system into constituent variables, as a DBN does, ameliorates sparseness in the temporal probability model

Informatics UoE Informatics 2D 184 Introduction Constructing DBNs Inference in DBNs Summary Transient failure Persistent failure

Constructing DBNs

◮ We have to specify prior distribution of state variables P(X0), transition model P(Xt+1|Xt), and sensor model P(Et|Xt) ◮ Also, we have to fix topology of nodes ◮ Stationarity assumption most convenient to specify topology for first slice ◮ Umbrella world example:

0.3 f 0.7 t 0.9 t 0.2 f

Rain0 Rain1 Umbrella1

P(U )

1

R1 P(R )

1

R0 0.7 P(R )

Informatics UoE Informatics 2D 185

slide-2
SLIDE 2

Introduction Constructing DBNs Inference in DBNs Summary Transient failure Persistent failure

An example

◮ Consider a battery-driven robot moving in the X × Y plane ◮ Let Xt = (Xt, Yt) and ˙ Xt = ( ˙ Xt, ˙ Yt) state variables for position and velocity, and Zt measurements of position (e.g. GPS) ◮ Add Batteryt for battery charge level and BMetert for the measurement of it ◮ We obtain the following basic model:

Z1 X1 X1 t X X0 X0

1

Battery Battery0

1

BMeter

Informatics UoE Informatics 2D 186 Introduction Constructing DBNs Inference in DBNs Summary Transient failure Persistent failure

Modelling failure

◮ Assume Batteryt and BMetert take on discrete values (e.g. integer between 0 and 5) ◮ These variables should be identically distributed (CPT=identity matrix) unless error creeps in ◮ One way to model error is through Gaussian error model, i.e. a small Gaussian error is added to the meter reading ◮ We can approximate this also for the discrete case through an appropriate distribution ◮ But problem is usually much worse: sensor failure rather than inaccurate measurements

Informatics UoE Informatics 2D 187 Introduction Constructing DBNs Inference in DBNs Summary Transient failure Persistent failure

Transient failure

◮ Transient failure: sensor occasionally sends inaccurate data ◮ Robot example: after 20 consecutive readings of 5 suddenly BMeter21 = 0 ◮ In Gaussian error model belief about Battery21 depends on:

◮ Sensor model: P(BMeter21 = 0|Battery21) and ◮ Prediction model: P(Battery21|BMeter1:20)

◮ If probability of large sensor error is smaller than sudden transition to 0, then with high probability battery is considered empty ◮ A measurement of zero at t = 22 will make this (almost) certain ◮ After a reading of 5 at t = 23 the probability of full battery will go back to high level ◮ But robot made completely wrong judgement . . .

Informatics UoE Informatics 2D 188 Introduction Constructing DBNs Inference in DBNs Summary Transient failure Persistent failure

Transient failure

◮ Curves for prediction depending on whether BMetert is only 0 for t = 22/23 or whether it stays 0 indefinitely

  • 1

1 2 3 4 5 15 20 25 30 E(Batteryt) Time step t E(Batteryt |...5555005555...) E(Batteryt |...5555000000...)

Informatics UoE Informatics 2D 189

slide-3
SLIDE 3

Introduction Constructing DBNs Inference in DBNs Summary Transient failure Persistent failure

Transient failure model

◮ To handle failure properly, sensor model must include possibility of failure ◮ Simplest failure model: assign small probability to incorrect values, e.g. P(BMetert = 0|Batteryt = 5) = 0.03 ◮ When faced with 0 reading, provided that predicted probability of empty battery is much less than 0.03, best explanation is failure ◮ This model is much less susceptible to failure, because an explanation is available ◮ However, it cannot cope with persistent failure either

Informatics UoE Informatics 2D 190 Introduction Constructing DBNs Inference in DBNs Summary Transient failure Persistent failure

Transient failure model

◮ Handling transient failure with explicit error models ◮ In case of permanent failure the robot will (wrongly) believe the battery is empty

  • 1

1 2 3 4 5 15 20 25 30 E(Batteryt) Time step E(Batteryt |...5555005555...) E(Batteryt |...5555000000...)

Informatics UoE Informatics 2D 191 Introduction Constructing DBNs Inference in DBNs Summary Transient failure Persistent failure

Persistent failure

◮ Persistent failure models describe how sensor behaves under normal conditions and after failure ◮ Add additional variable BMBroken, and CPT to next BMBroken state has a very small probability if not broken, but 1.0 if broken before (persistence arc) ◮ When BMBroken is true, BMeter will be 0 regardless of Battery:

1

Battery Battery0

1

BMeter BMBroken

1

BMBroken

f t

B

1

P(B )

1.000 0.001 Informatics UoE Informatics 2D 192 Introduction Constructing DBNs Inference in DBNs Summary Transient failure Persistent failure

Persistent failure

◮ In case of temporary blip probability of broken sensor rises quickly but goes back if 5 is observed ◮ In case of persistent failure, robot assumes discharge of battery at “normal” rate

  • 1

1 2 3 4 5 15 20 25 30 E(Batteryt) Time step E(Batteryt |...5555005555...) E(Batteryt |...5555000000...) P(BMBrokent |...5555000000...) P(BMBrokent |...5555005555...)

Informatics UoE Informatics 2D 193

slide-4
SLIDE 4

Introduction Constructing DBNs Inference in DBNs Summary Exact inference in DBNs

Exact inference in DBNs

◮ Since DBNs are BNs, we already have inference algorithms like variable elimination ◮ Essentially DBN equivalent to infinite “unfolded” BN, but slices beyond required inference period are irrelevant ◮ Unrolling: reproducing basic time slice to accommodate

  • bservation sequence

0.3 f 0.7 t P(R )

1

R 0.7 P(R

0 )

0.2 f 0.9 t P(U )

1

R

1

Umbrella

1

Rain Rain

1

Rain0 0.7 P(R

0 )

0.2 f 0.9 t P(U )

1

R

1

Umbrella1 f t R 0.3 0.7 P(R )

1

Rain1 Umbrella2 f t R 0.3 0.7 P(R )

2 1

Rain2 Umbrella3 f t R 0.3 0.7 P(R )

3 2

Rain3 Umbrella4 f t R 0.3 0.7 P(R )

4 3

Rain4 0.2 f 0.9 t P(U )

2

R2 0.2 f 0.9 t P(U )

3

R3 0.2 f 0.9 t P(U )

4

R4 Informatics UoE Informatics 2D 194 Introduction Constructing DBNs Inference in DBNs Summary Exact inference in DBNs

Exact inference in DBNs

◮ Exact inference in DBNs is intractable, and this is a major problem. ◮ There are approximate inference methods that work well in practice. ◮ This issue is currently a hot topic in AI. . .

Informatics UoE Informatics 2D 195 Introduction Constructing DBNs Inference in DBNs Summary

Summary

◮ Account of time and uncertainty complete ◮ Looked at general Markovian models ◮ HMMs ◮ DBNs as general case ◮ Quite intractable, but powerful ◮ Next time: Decision Making under Uncertainty

Informatics UoE Informatics 2D 196