Download presentation

Presentation is loading. Please wait.

Published byDestiney Foote Modified about 1 year ago

1
Chris Re, Julie Letchner, Magdalena Balazinska and Dan Suciu University of Washington

2
One Slide Overview Motivating App: RFID Ecosystem Tagged people, cups, books, keys, laptops, etc. Event queries [Cayuga, SASE, Snoop] Alert when anyone enters the coffee room Two problems Missed readings, read-rates in practice are low Granularity mismatch, e.g. Office v. Antenna 41 Instead, infer location from sensors Propose, keep probs & query with PEEX+ PEEX+ (Probabilistic Event EXtraction) keeps data probabilistic to get higher P/R and is still efficient.

3
Motivating Apps RFID apps Diary and Active Calendar Application. ○ Alert if I go to a database meeting. Supply chain ○ Alert if Mach 3 razors are being stolen Many independent HMMs Elder care [Intel,Patterson] ○ Alert if elder takes their medicine with water Financial applications on predictive HMM ○ Alert if head-and-shoulders market

4
Outline RFID to Probabilities via Particle Filters PEEX+ query language Extended Regular Query Algorithm Experiments

5
The source of probabilities Each orange particle is a guess of true location 6 th Floor in PAC Blue ring is ground truth Connectivity Diagram Antennas

6
PFs to a (prob) DB person TagtLocP Joe7O20.4 H20.2 H30.4 Joe8O20.6 H20.2 H30.2 Sue7…… At(tag,loc) To query Particle Filter output, query At

7
TagtLocP Joe7O20.4 H20.2 H30.4 Joe8O20.6 H20.2 H30.2 Sue7…… Semantics of the Model At(tag,loc) TagtLoc Joe7O2 Joe8O2 Sue7… Prob =0.4 * 0.6 * … NB: Markovian correlations OK “Joe enter O2 at t=8” Query Semantic: sum weight of all worlds where Q is true at time t possible stream (worlds) Probability outside O2 (in H2,H3)

8
Outline RFID to Probabilities via Particle Filters PEEX+ query language Extended Regular Query Algorithm Experiments

9
A hierarchy of PEEX+ queries Regular Queries Alert me when Joe goes to the coffee room Extended Regular Alert when anyone goes to the coffee room Safe Alert when anyone goes to the coffee room and a DB member follows them. Hard Others (Simulation) This line is sharp for some queries

10
Peex+ Queries Fragment of Cayuga, queries define events. OperatorDescription Base stream semicolonSequence Select Kleene+ Technical Point: Left-to-right eval, Same p in both p in some location

11
Regulars and Extended Regular Query is regular if no variable is shared between subgoals Query is extended regular if any variable shared by two subgoals, is shared by all subgoals, i.e. templated regular query p is shared between subgoals

12
Wrinkle in the language: Filter v. Selection “Alert next time Joe is in 502 after he is in 501” Time Yes No “Alert if the next place Joe is in after 501 is 502” At

13
Outline RFID to Probabilities via Particle Filters PEEX+ query language Extended Regular Query Algorithm Experiments

14
Why are ER queries hard? Regular Queries ~ Regular Expressions Mapping is non-trivial ○ similar to Cayuga [Demers et al. 06] Queries have #P-combined complexity ○ Can encode mDNF as regular expression Intuition: n-sized automaton leads to Extended regular ~ 1 NFA per/person k persons implies O(k)-size automaton Exponential cost When ER, can avoid blowup

15
Algorithm for Regular Queries Overview Deterministic Algorithm 1. Compile a query q 1. NFA –like-thing in a language 2. Mapping events to subsets of 2. At runtime, at time t have events E 1. Create set of symbols at time t: 2. Process NFA on Focus on the compilation

16
Compile Select and Filter Intuition: goal maps to two letters: match (m) : matches filter accept (a) : accepted by select Final Does not contain Does contain language and automaton are the same for both queries

17
The difference is the mapping Final Does not contain Does contain EventFilterSelect

18
Regular Queries w. Probabilities Probabilistic Algorithm 1. Compile a query q 1. NFA with transition in a language 2. Mapping events to subsets of 2. At time t have events E with probs 1. Create set of symbols at time t: 2. Process NFA on Stays the same distribution on inputs Algorithm is constant in data, exponential in |Q| distribution on states State at t+1 only depends on state at t and input at t+1

19
Extension to Extended regular “Alert when anyone in 501 and next step in 502” If substitute for p, result is regular Bindings use disjoint sets of tuples. Algorithm: independent copies, multiply Depends on # distinct values (shared vars), not # of timesteps – can stream

20
Recap of Algorithms Regular Queries Compiled them to an NFA, then used image Data complexity O(1) Extended regular Several regulars multiplied together Depends on number of distinct people in the data, not number of time steps. Markov Correlations: more arithmetic & state

21
PEEX+ Algorithms and Analysis Compilation procedures Safe plans. More complicated based on algebra cost grows with data (useful for archives) Aggregates Complexity: Can we do better? For a restricted class, draw a crisp line Minor variants of safe result in hardness

22
Outline RFID to Probabilities via Particle Filters PEEX+ query language Extended Regular Query Algorithm Experiments

23
Experimental Setup Quality Experiment 52 objects, 352 locations, 10k sq. ft. ○ 2x30m trace with 10 m break in between Participants marked down true locations “Alert when anyone enters the Coffee Room” Consider two Scenarios Realtime (No correlations) v. MLE Archived (Smoothing) v. Viterbi In practice, can smooth in a short time

24
Quality: Realtime Declare an event “true”, if its Pr > threshold Vary threshold Precision Recall F1 10% improvement in F1

25
Quality: Archived Smoothing v. Viterbi PEEX keeps track of Markovian Correlations PrecisionRecallF1 Approx ~30% gain in F1

26
Performance

27
Conclusion Showed PEEX+ Processed output of several inference tasks ○ Applies more generally than just RFID Quality (F1) gains by keeping probability 50% from probs, 50% from correlations Performance was usable in real-time No indexing! Preprint available on request

28

29
Future Work Implementing archived stream indexing. Aggregations in time Aggressive indexing Ranking? Top-K? Shaper lines for complexity Are there more streamable queries? Richer language Similar to linear style plans What do people need? Temporal Models! Consistency

30
Correlations

31
Sequencing by example Sequencing is parameterized [Cayuga] Time Semicolon means “the next event among those that match next goal” Semicolon is not “after”

32
Compilation by example Each goal “corresponds” to two letters: move (m) – the query should advance accept (a) – the next subgoal accepts Any other maps to empty set Final Does not contain Does contain

33
Subtle example.. What about: Any other maps to empty set Final Does not contain Does contain

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google