Ranking and Repulsing Supermartingales for Reachability in - - PowerPoint PPT Presentation

ranking and repulsing supermartingales for reachability
SMART_READER_LITE
LIVE PREVIEW

Ranking and Repulsing Supermartingales for Reachability in - - PowerPoint PPT Presentation

Ranking and Repulsing Supermartingales for Reachability in Probabilistic Programs Toru Takisaka, Yuichiro Oyabu, Natsuki Urabe, Ichiro Hasuo A robot resolves a set of tasks Mode 1: safe mode N tasks Mode 1: safe mode 3 min. N-1 tasks N tasks


slide-1
SLIDE 1

Ranking and Repulsing Supermartingales for Reachability in Probabilistic Programs

Toru Takisaka, Yuichiro Oyabu, Natsuki Urabe, Ichiro Hasuo

slide-2
SLIDE 2

A robot resolves a set of tasks

slide-3
SLIDE 3

Mode 1: safe mode

N tasks

slide-4
SLIDE 4

Mode 1: safe mode

3 min. N tasks N-1 tasks

slide-5
SLIDE 5

Mode 2: urgent mode

N tasks

slide-6
SLIDE 6

Mode 2: urgent mode

1 min. 90% N tasks N-1 tasks

slide-7
SLIDE 7

Mode 2: urgent mode

1 min. 90% 10% N tasks N-1 tasks N+3 tasks

slide-8
SLIDE 8
slide-9
SLIDE 9

Complete 15 tasks within 30 minutes

slide-10
SLIDE 10

What is the probability that the robot completes the tasks?

Complete 15 tasks within 30 minutes

slide-11
SLIDE 11

Problem formulation

Input: probabilistic program

slide-12
SLIDE 12

Problem formulation

Input: probabilistic program

  • Nondet. / Prob.

branching

slide-13
SLIDE 13

Problem formulation

Input: probabilistic program

  • Nondet. / Prob.

branching

  • Nondet. / Prob.

assignment

slide-14
SLIDE 14

Problem formulation

What is the probability that the program terminates?

(under angelic/demonic scheduler) Input: probabilistic program Problem

We admit continuous variable ⇒Generally one can’t compute this value efficiently

  • Nondet. / Prob.

branching

  • Nondet. / Prob.

assignment

slide-15
SLIDE 15

Problem formulation

Input: probabilistic program

⇒ Certification by supermartingale

  • Nondet. / Prob.

branching

  • Nondet. / Prob.

assignment

What is the probability that the program terminates?

(under angelic/demonic scheduler) Problem

We admit continuous variable ⇒Generally one can’t compute this value efficiently

slide-16
SLIDE 16

Certification by supermartingale

(Agrawal+, POPL’18)

Probabilistic modification of real-world benchmarks

(in Alias+, SAS’10)

Almost-sure termination is certified in 20/28 examples

slide-17
SLIDE 17

Certification by supermartingale

(Steinhardt-Tedrake, IJRR’12)

System: a pendulum under Gaussian noise

>99% safety is guaranteed

(Pr(enter a bad state) <1%)

The log-base-10 of the failure probability (failure = within 1h)

slide-18
SLIDE 18
  • Start
  • A state is a pair (program location, memory state)
  • As powerful as MDP

Control flow graph

finite

slide-19
SLIDE 19
  • Start
  • A state is a pair (program location, memory state)
  • As powerful as MDP

Control flow graph

finite

slide-20
SLIDE 20
  • Start
  • A state is a pair (program location, memory state)
  • As powerful as MDP

Control flow graph

finite

slide-21
SLIDE 21
  • Start
  • A state is a pair (program location, memory state)
  • As powerful as MDP

Control flow graph

finite

slide-22
SLIDE 22
  • Start
  • A state is a pair (program location, memory state)
  • As powerful as MDP

Control flow graph

finite

slide-23
SLIDE 23

𝟔

(Locations) (Variables)

  • Start
  • A state is a pair (program location, memory state)
  • As powerful as MDP

⇒Pr(the system eventually visits the region )?

Problem

Control flow graph

finite

slide-24
SLIDE 24

Supermartingale = a function over states that is “non-increasing” through transitions

  • (angelic)
  • …(demonic)
slide-25
SLIDE 25

Ranking function

slide-26
SLIDE 26

Ranking function

slide-27
SLIDE 27

Ranking function

Int-valued

slide-28
SLIDE 28

Ranking function

The system eventually visits (under any nondeterministic choice)

Int-valued

slide-29
SLIDE 29

Ranking function

The system eventually visits (under any nondeterministic choice)

Int-valued

slide-30
SLIDE 30

Ranking supermartingale

slide-31
SLIDE 31

Ranking supermartingale

slide-32
SLIDE 32

Ranking supermartingale

decreases at least 1

  • valued
slide-33
SLIDE 33

The system eventually visits almost surely

Ranking supermartingale

decreases at least 1

  • valued
slide-34
SLIDE 34

Barrier certificate

Safe region Unsafe region

slide-35
SLIDE 35

Barrier certificate

Safe region Unsafe region

slide-36
SLIDE 36

Barrier certificate

Safe region Unsafe region

slide-37
SLIDE 37

Barrier certificate

Safe region Unsafe region

slide-38
SLIDE 38

Barrier certificate

Safe region Unsafe region

The system does not enter the unsafe region

slide-39
SLIDE 39

Probabilistic barrier certificate (a.k.a. nonnegative repulsing supermartingale)

Safe region Unsafe region

𝑦

slide-40
SLIDE 40

Safe region Unsafe region

𝑦

  • valued

Probabilistic barrier certificate (a.k.a. nonnegative repulsing supermartingale)

slide-41
SLIDE 41

Safe region Unsafe region

𝑦

  • valued

Probabilistic barrier certificate (a.k.a. nonnegative repulsing supermartingale)

slide-42
SLIDE 42

Safe region Unsafe region

𝑦

  • valued

Probabilistic barrier certificate (a.k.a. nonnegative repulsing supermartingale)

slide-43
SLIDE 43

Safe region Unsafe region

Pr(the system enters the unsafe region)

𝑦

  • valued

Probabilistic barrier certificate (a.k.a. nonnegative repulsing supermartingale)

slide-44
SLIDE 44

Our contributions

Comprehensive account of martingale-based

approximation methods via fixed point argument

Soundness/completeness for uncountable-states MDPs,

under angelic/demonic nondeterminism

Implementation and experiments

slide-45
SLIDE 45

Our contributions

Comprehensive account of martingale-based

approximation methods via fixed point argument

Soundness/completeness for uncountable-states MDPs,

under angelic/demonic nondeterminism

Implementation and experiments

slide-46
SLIDE 46

Two objective functions

  • Given: a control flow graph, and a subset
  • f its states
  • and

are

slide-47
SLIDE 47

Two objective functions

  • Given: a control flow graph, and a subset
  • f its states
  • and

are …under angelic/demonic scheduler

slide-48
SLIDE 48

Soundness/completeness

Soundness: Completeness:

Ranking supermartingale

(

  • )

Soundness: Completeness:

Nonnegative repulsing supermartingale

slide-49
SLIDE 49

Soundness/completeness

Soundness: Completeness:

Ranking supermartingale

(

  • )

Soundness: Completeness:

Nonnegative repulsing supermartingale

Known Partly known Partly known Not known

slide-50
SLIDE 50

Soundness/completeness

For certain endofunctions and and

slide-51
SLIDE 51

Soundness/completeness

The lattice

… the set of all (measurable) functions

Our theorem

slide-52
SLIDE 52

Soundness/completeness

The lattice

… the set of all (measurable) functions

Soundness is a RankSM Our theorem

slide-53
SLIDE 53

Soundness/completeness

The lattice

… the set of all (measurable) functions

Soundness is a RankSM Our theorem

slide-54
SLIDE 54

Soundness/completeness

The lattice

… the set of all (measurable) functions

Soundness is a RankSM Knaster-Tarski theorem Our theorem

slide-55
SLIDE 55

Soundness/completeness

The lattice

… the set of all (measurable) functions

Soundness is a RankSM Completeness Knaster-Tarski theorem Our theorem

slide-56
SLIDE 56

Soundness/completeness

The lattice

… the set of all (measurable) functions

Soundness is a RepSM Completeness Knaster-Tarski theorem Our theorem

slide-57
SLIDE 57

Our contributions

Comprehensive account of martingale-based

approximation methods via fixed point argument

Soundness/completeness for uncountable-states MDPs,

under angelic/demonic nondeterminism

Implementation and experiments

slide-58
SLIDE 58

Soundness/completeness for martingale methods

Approximation method It certifies Soundness Completeness Additive ranking Supermartingale

(Chakarov-Sankaranarayanan, CAV’13 etc.)

Yes (MDP, continuous variable) Yes (MDP, discrete variable) Nonnegative repulsing supermartingale

(Steinhardt+, IJRR’12 etc.)

Yes (Markov Chain)

  • scaled submartingale

(Urabe+, LICS‘17)

Yes (Markov Chain)

  • decreasing repulsing

supermartingale

(Chatterjee+, POPL’17)

Yes (MDP, continuous variable, linearity assumpt.)

slide-59
SLIDE 59

Soundness/completeness for martingale methods

Approximation method It certifies Soundness Completeness Additive ranking Supermartingale

(Chakarov-Sankaranarayanan, CAV’13 etc.)

Yes (MDP, continuous variable) Yes (MDP, discrete variable) Nonnegative repulsing supermartingale

(Steinhardt+, IJRR’12 etc.)

Yes (Markov Chain)

  • scaled submartingale

(Urabe+, LICS‘17)

Yes (Markov Chain)

  • decreasing repulsing

supermartingale

(Chatterjee+, POPL’17)

Yes (MDP, continuous variable, linearity assumpt.)

  • Yes (MDP, continuous variable)

Yes (MDP, continuous variable) No Yes (MDP, continuous variable)

slide-60
SLIDE 60

Our contributions

Comprehensive account of martingale-based

approximation methods via fixed point argument

Soundness/completeness for uncountable-states MDPs,

under angelic/demonic nondeterminism

Implementation and experiments

slide-61
SLIDE 61

Implementation and experiments

  • Implemented template-based synthesis algorithms
  • Nontrivial bounds are found (①)
  • Observed comparative advantage of nonnegative RepSM over -decreasing RepSM (②)

① ① ②

slide-62
SLIDE 62

Summary

  • Martingale can evaluate reachability of probabilistic

programs in various ways

  • We gave a comprehensive account of martingale-based approximation

methods via fixed point argument

  • We proved soundness/completeness of several methods for

uncountable-states MDPs, which extends known results

  • We demonstrated implementation and experiments