vikramaditya r. jakkula, diane j. cook & aaron s. crandall washington state university presented...

23
Using Temporal Relations in Smart Environment Data for Anomaly Detection Vikramaditya R. Jakkula , Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

Post on 19-Dec-2015

219 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

Using Temporal Relations in Smart Environment Data for Anomaly Detection

Vikramaditya R. Jakkula , Diane J. Cook & Aaron S. CrandallWashington State University

Presented by Aaron S. Crandall

Page 2: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Index

• Introduction• MavHome Project• Experimentation Environment• Temporal Relations• Experimentation Process• Results• Conclusion & Future Work

Page 3: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Smart Homes: GoalsAdapt to Needs

Cost Effective and Reliable

Maximum Comfort and Security

Page 4: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Smart home Challenges

Health care• Tele-

Health and Health Monitoring Smart Devices

• Device Automation such as smart watch to read blood pressure and other vital health parameters.

Assisted Living• Reminder

Assistant Systems

Learning and Adaptation• Prediction of

activity and detecting anomaly in activity.

• Lifestyle Patterns such as preferences of daily activities , such as exercise preferences.

Robotics• Virtual Pets• Robot

enabled wheelchair and more.

Human Computer Interface• Audio Video

based applications for event detection and analysis

Page 5: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

MavHome: Smart Home Project

• Project Unique– Focus on entire home

• House perceives and acts– Sensors– Controllers for devices– Connections to the mobile user and Internet

• Unified project incorporating varied AI techniques, cross disciplinary with mobile computing, databases, multimedia, and others

Page 6: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Experimentation Environment1

Page 8: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Experimentation Environment3

MavLAB Argus Sensor Network

around 100 Sensors. include Motion, Devices, Light, Pressure, Humidity and more.

Page 9: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

What is a temporal relation?

Food “Contains” Wateror

Water “Before” Pillsor

Food “Meets” Pillsor

Food “Contains” Water “before” Pills

Food Food

WaterWater

PillsPills

Time Interval

“It is common to describe scenarios using time intervals rather than time points” - James F. Allen

Page 10: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Why Temporal Relations?

Reminder Assistance

• Reminder system based on temporal relations.

Anomaly Detection

• If Pills are to be taken “After” Food, we can notice violation of this activity!

Maintenance

• If Cooker is Spoiled should we call emergency or a normal repair?

Temporary Need Analysis

• If Oven used for Turkey, Is turkey at Home?

Improve Prediction

• Increase prediction accuracy with association rules!

Page 11: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

Temporal Relations

Before After XDuring XContains Overlaps Overlapped-By XMeets Met-by XStarts Started-By Finishes Finished-By Equals

VJ © AI LAB EECS@WSU 2007

TEMPORAL RELATION

VISUAL DIAGRAM

CONSTRAINT USABLE

X Before Y

Y Contains X

X Overlaps Y

Start(X)<Start(Y); End(X)<Start(Y)

Start(X)>Start(Y); End(X)<End(Y)

Start(X)<Start(Y); Start(Y)<End(X); End(X)<End(Y)

X Meets Y

XFinishesY

YFinishedbyX

XStarts Y

YStartedby X

X Equals Y

Start(Y) = End(X)

Start(X)≠Start(Y); End(X) = End (Y) Start(X)≠Start(Y); End(X) = End (Y)

Start(X)=Start(Y); End(X)≠End(Y)

Start(X)=Start(Y); End(X)≠End(Y)

Start(X)=Start(Y); End(X)=End(Y)

XX

XX

YY

XX

YY

XX

YY

XX

YY

XX

YY

XX

YY

XX

XX

YY

YY

YY

Page 12: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Datasets: Real vs. Synthetic• Real Dataset and synthetic datasets consist

timestamp of the activity with the activity name and the state it is in.Real Dataset (Sample):

3/2/2003 12:40:0 AM, (Studio E) E9 OFF3/2/2003 2:40:0 AM, (Living Room) H9 ON3/2/2003 2:40:0 AM, (Living Room) H9 OFF3/2/2003 6:4:0 AM, (Living Room) H9 OFF3/3/2003 3:43:0 AM, (Studio C) C14 ON

Synthetic Dataset (Sample):2/1/2006 10:02:00 AM, off, oven2/1/2006 11:00:00 AM, on, lamp2/1/2006 11:11:00 AM, off, thermostat2/1/2006 12:02:00 PM, off, lamp2/1/2006 12:35:00 PM, off, cooker

Datasets

Parameter Setting

No of DaysNo of Events

No of Intervals Identified

Size of Data

Synthetic 60 8 1729 106KBReal 60 17 1623 104KB

Train: 59 DaysTest: 1 Day

Page 13: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Experimentation

• Step 1: Find frequent activities in the sensor data.

• Step 2:. Parse raw sensor data and formulate time intervals for event occurrences and Associate temporal relations.

• Step 3: Run for Anomaly detection.

Page 14: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

The Apriori Algorithm Example for detecting frequent events

Day Event23/10/2005 TV cooker lamp24/10/2005 Oven Cooker Fan25/10/2005 TV Oven Cooker Fan

26/10/2005 Oven Fan

Database D itemset sup.{TV} 2

{oven} 3{cooker } 3{lamp} 1{fan} 3

itemset sup.{TV} 2

{Oven} 3{cooker} 3

{fan} 3

Scan D

C1 L1

{TV Oven}{TV Cooker}

{TV Fan}{Oven Cooker}

{Oven Fan}

{Cooker Fan}

itemset sup{TV Oven} 1

{TV Cooker} 2{TV Fan} 1

{Oven Cooker} 2{Oven Fan} 3

{Cooker Fan} 2

itemset sup{TV Cooker} 2

{Oven Cooker} 2{Oven Fan} 3

{Cooker,Fan} 2

L2

C2C2

Scan D

C3 L3itemset{Oven Cooker Fan}

Scan D itemset sup{Oven Cooker Fan} 2

Page 15: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Temporal Intervals• Process raw data to form temporal

intervals.

Raw Sensor Data

Timestamp Sensor State Sensor ID3/3/2003 11:18:00 AM OFF E163/3/2003 11:23:00 AM ON G123/3/2003 11:23:00 AM ON G113/3/2003 11:24:00 AM OFF G12

Identify Time Intervals

Date Sensor ID Start Time End time.03/02/2003 G11 01:44:00 01:48:0003/02/2003 G19 02:57:00 01:48:0003/02/2003 G13 04:06:00 01:48:0003/02/2003 G19 04:43:00 01:48:00

Associated Temporal Relations

Date time Sensor ID Temporal Relation Sensor ID3/3/2003 12:00:00 AM G12 DURING E163/3/2003 12:00:00 AM E16 BEFORE I143/2/2003 12:00:00 AM G11 FINISHESBY G114/2/2003 12:00:00 AM J10 STARTSBY J12

Raw Sensor Data Interval Data

Temporal Relations

Data

Page 16: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Temporal Interval AnalyzerAlgorithm : Temporal Interval Analyzer   Input: data timestamp, event name and state Repeat While [Event && Event + 1 found] Find paired “ON” or “OFF” events in data to determine temporal range. Read next event and find temporal range. Identify relation type between event pair from possible relation

types (see Table 1). Record relation type and related data. Increment Event Pointer Loop until End of Input. 

Page 17: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Anomaly Detection Process

1] Calculate the evidence of occurrence with other frequent events as shown in probability model in next slide.

2] Calculate the anomaly.

3] Check if the calculated anomaly is equal to or greater than (mean + 2 * St. Dev.), If yes, declare it as an Anomaly.

Page 18: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Probability Model

• P(Z|Y) = |Before(Y,Z)| + |Contains(Y,Z)| + |Overlaps(Y,Z)| + |

Meets(Y,Z)| + |Starts(Y,Z)| + |StartedBy(Y,Z)| + |Finishes(Y,Z)| + |

FinishedBy(Y,Z)| + |Equals(Y,Z)| / |Y|

• Anomalyz= 1 – P(Z|Y)

Page 19: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Experimentation Results

Frequent Event Evidence Anomaly DetectedJ10 0.45 0.55 NoJ11 0.32 0.68 NoA11 0.33 0.67 NoA15 0.24 0.76 NoA11 0.23 0.77 NoA15 0.22 0.78 NoI11 0.27 0.73 NoI14 0.34 0.66 NoAnomaly Mean 0.7Anomaly St. Dev. 0.071764Anomaly Cut-off Threshold 0.8435

Anomaly Detection on Real Dataset

Frequent Event Evidence Anomaly DetectedLamp 0.3 0.7 NOLamp 0.23 0.77 NOLamp 0.01 0.99 YESFan 0.32 0.68 NOCooker 0.29 0.71 NOLamp 0.45 0.55 NOLamp 0.23 0.77 NOLamp 0.01 0.99 YESLamp 0.23 0.77 NOFan 0.3 0.7 NOCooker 0.34 0.66 NOLamp 0.33 0.67 NOLamp 0.2 0.8 NOLamp 0.02 0.98 NOLamp 0.002 0.998 YESFan 0.34 0.66 NOCooker 0.42 0.58 NOAnomaly Mean 0.763412Anomaly St. Dev. 0.135626Anomaly Cut-off Threshold 1

Anomaly Detection on Synthetic Dataset

Page 20: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Experimentation results

Page 21: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Conclusion

• Unique and new Approach.

• Larger datasets would be incorporated and experimented soon.

• Promising performance on the synthetic datasets.

Page 22: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Future Direction

• Expansion of the temporal relations by including more temporal relations, such as until, since, next, and so forth, to create a richer collections.

• Adapting to multiple inhabitants using Entity discovery approach.

Page 23: Vikramaditya R. Jakkula, Diane J. Cook & Aaron S. Crandall Washington State University Presented by Aaron S. Crandall

VJ © AI LAB EECS@WSU 2007

Questions

Thank You