Modeling and Reasoning with ProbLog: An Application in Recognizing - - PowerPoint PPT Presentation

modeling and reasoning with problog an application in
SMART_READER_LITE
LIVE PREVIEW

Modeling and Reasoning with ProbLog: An Application in Recognizing - - PowerPoint PPT Presentation

Modeling and Reasoning with ProbLog: An Application in Recognizing Complex Activities Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt 1 19.03.2018 19.03.2018 Content C O M O R EA @P ERCOM 2018 1. Motivation 2. Model & System 3.


slide-1
SLIDE 1

Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

Modeling and Reasoning with ProbLog: An Application in Recognizing Complex Activities

1 19.03.2018

slide-2
SLIDE 2

19.03.2018 2 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

Content

  • 1. Motivation
  • 2. Model & System
  • 3. Preliminary Results
  • 4. Discussion
  • 5. Ongoing Work

COMOREA@PERCOM2018

slide-3
SLIDE 3

MOTIVATION

19.03.2018 3 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

slide-4
SLIDE 4

COMOREA@PERCOM2018

19.03.2018 4

Scenario

Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

We focus on recognizing complex activities like “watering plants” or “taking medicine”. So far we relied on... What we are targeting right now ... ... ontological and probabilistic reasoning

(as it overcomes well-known limitations)

... online recognition and active learning

slide-5
SLIDE 5

COMOREA@PERCOM2018

19.03.2018 5 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

Scenario

slide-6
SLIDE 6

COMOREA@PERCOM2018

19.03.2018 6

Motivation

Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

Until now we used Markov Logic Networks (RockIt) to model our scenario, but ... ... weights are not this intuitive as probabilities We decided to investigate ProbLog in respect of Activity Recognition ... much computational effort ... did not support time-constraints and marginal inferences (RockIt).

slide-7
SLIDE 7

COMOREA@PERCOM2018

19.03.2018 7

Idea

Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

ProbLog is a probabilistic extension of Prolog which allows to explicitly define probabilistic facts and rules. Segment sensor stream into windows Build for each window a ProbLog program Allows to query the user in almost real-time “Marginal Inferences” allows to apply rules but also interpret the results across windows

slide-8
SLIDE 8

COMOREA@PERCOM2018

19.03.2018 8

Contribution

Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

We clarify the benefits of ProbLog for activity recognition We introduce a guidance on how to write ProbLog programs. We present a ProbLog-based method to recognize activities of daily living in an online fashion We show potential advantages of ProbLog’s marginal inference

slide-9
SLIDE 9

MODEL & SYSTEM

19.03.2018 9 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

slide-10
SLIDE 10

COMOREA@PERCOM2018

19.03.2018 10 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

System

  • 1. Extracting probabilities (sensor type ↔ activity)
  • 2. Segmentation
  • 3. ProbLog Program Generation
  • 4. Online Activity Recognition

extracted from the dataset (supervised) Standard windowing approach with a fixed size As soon as a window is finalized we generate the ProbLog program We choose the most likely activity

slide-11
SLIDE 11

COMOREA@PERCOM2018

19.03.2018 11 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

Building a ProbLog Program (1/4)

Event and Instance Clauses (Example)

1.0::event(e1, water, 5). 1.0::event(e2, absent, 6).

This implies that these two clauses have to be part of each possible world (ground truth).

0.5::instance(ai1, ac1, 0, 7); 0.5::instance(ai1, ac2, 0, 7). 0.5::instance (ai2, ac1, 4, 10); 0.5::instance(ai2, ac2, 4, 10).

XOR e.g. cleaning predicate

slide-12
SLIDE 12

COMOREA@PERCOM2018

19.03.2018 12 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

Building a ProbLog Program (1/4)

Probabilistic Facts (Example) Temporal Constraints (Example)

0.9::related(X, watering) :- event(X, water, T)

allows to incorporate mined probabilities

closeAfter(T1,T2) :- T1>T2,T3 is T1-T2, T3<3. 0.6::producedBy(X2,I) :- event(X1,Y1,T1), event(X2,Y2,T2), closeAfter(T2,T1), producedBy(X1,I)

Intuitively, temporally close events more likely belong to the same activity instance.

slide-13
SLIDE 13

COMOREA@PERCOM2018

19.03.2018 13 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

Building a ProbLog Program (1/4)

Knowledge-based Facts (Example) Domain Constraints (Example)

0.9::bond(Y, waterplants) :- event(X1, water, T1), event(X2, can, T2), closeAfter(T1,T2), producedBy(X1,Y).

We assume that “can” is only used for “waterplants”

r1 :- related(e1, ac1), \+related(e1, ac2); related(e2, ac1), \+related(e2, ac2); evidence(r1,true).

We want to be sure that each sensor event is assigned to exactly one activity.

slide-14
SLIDE 14

COMOREA@PERCOM2018

19.03.2018 14

An instance of

  • ur program

instance(ai1,ac1,0,7) producedBy(e1,ac1) related(e1, cleaning)

Executing a ProbLog Program

Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

C A 3 X Y 1 A 1 X

Each of them has a probability Probability of a certain program instance The probabilities of all instances answer our query We have to formulate a query

slide-15
SLIDE 15

PRELIMINARY RESULTS

19.03.2018 15 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

slide-16
SLIDE 16

COMOREA@PERCOM2018

19.03.2018

Dataset: CASAS

16 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

CASAS: A smart home in a box, D.J. Cook et al., 2013

slide-17
SLIDE 17

COMOREA@PERCOM2018

19.03.2018 17

Results: Recognition Rate

Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

The activities are well recognized but there is a gap between the worst and best result (ac1 vs. ac5)

0,1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 0,9 1 ac1 ac2 ac3 ac4 ac5 ac6 ac7 ac8

F-measure Activities

slide-18
SLIDE 18

COMOREA@PERCOM2018

19.03.2018 18

Results: Marginal Inference

This militates for the quality of the ranking but also for the reliability of the approach.

Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

0,5 0,6 0,7 0,8 0,9 1 ac1 ac2 ac3 ac4 ac5 ac6 ac7 ac8 Top-1 Top-2 Top-3

F-measure Activities

slide-19
SLIDE 19

COMOREA@PERCOM2018

19.03.2018 19

Runtime

Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

Computation time of a segment (seconds) Cumulative probability

slide-20
SLIDE 20

DISCUSSION

19.03.2018 20 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

slide-21
SLIDE 21

COMOREA@PERCOM2018

19.03.2018 21 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

The results look promising but ...

Discussion

... difficult to compare to existing works due to different setups ... only a standard windowing approach ... probabilities were extracted from the dataset ... Interleaved activities are not explicitly modeled

slide-22
SLIDE 22

ONGOING WORK

19.03.2018 22 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

slide-23
SLIDE 23

COMOREA@PERCOM2018

19.03.2018 23 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

Ongoing Work

Our next steps are ...

... fully exploit marginal inferences ... investigating active learning for personalization (e.g. correcting/adapting probabilities) refine the classification of the windows Currently, in another work, we focus on suitable

  • nline and active learning techniques
slide-24
SLIDE 24

COMOREA@PERCOM2018

19.03.2018 24 Timo Sztyler, Gabriele Civitarese, Heiner Stuckenschmidt

Thank you for your attention :)