Learning to Optimize Plan Execution in Information Agents Craig A. - - PowerPoint PPT Presentation

learning to optimize plan execution in information agents
SMART_READER_LITE
LIVE PREVIEW

Learning to Optimize Plan Execution in Information Agents Craig A. - - PowerPoint PPT Presentation

Learning to Optimize Plan Execution in Information Agents Craig A. Knoblock Knoblock Craig A. University of Southern California University of Southern California Craig Knoblock University of Southern California 1 Acknowledgements


slide-1
SLIDE 1

Craig Knoblock University of Southern California 1

Learning to Optimize Plan Execution in Information Agents

Craig A. Craig A. Knoblock Knoblock University of Southern California University of Southern California

slide-2
SLIDE 2

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 2 2

Acknowledgements Acknowledgements

  • Electric Elves

Electric Elves

  • Jose Luis

Jose Luis Ambite Ambite

  • Maria

Maria Muslea Muslea

  • Hans

Hans Chalupsky Chalupsky

  • Yolanda Gil

Yolanda Gil

  • Jean Oh

Jean Oh

  • David V.

David V. Pynadath Pynadath

  • Thomas A. Russ

Thomas A. Russ

  • Milind

Milind Tambe Tambe

  • Theseus

Theseus Agent Agent Execution Execution

  • Greg

Greg Barish Barish

  • Steve Minton

Steve Minton

  • Maria

Maria Muslea Muslea

  • Speculative Execution

Speculative Execution

  • Greg

Greg Barish Barish

  • Funding

Funding

  • DARPA

DARPA

  • AFOSR

AFOSR

  • NSF

NSF

slide-3
SLIDE 3

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 3 3

Introduction Introduction

  • The Web is a tremendous resource, but

The Web is a tremendous resource, but designed for browsing designed for browsing

  • Sites provide limited capabilities for

Sites provide limited capabilities for personalization personalization

  • Few sites are designed to be integrated with

Few sites are designed to be integrated with

  • thers
  • thers
  • Goal: Develop technology to rapidly

Goal: Develop technology to rapidly construct personal software agents construct personal software agents

  • Build agents that can perform retrieval,

Build agents that can perform retrieval, integration, and monitoring tasks on any integration, and monitoring tasks on any

  • nline source
  • nline source
slide-4
SLIDE 4

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 4 4

Outline Outline

1. 1.

Motivating Application: The Electric Elves Motivating Application: The Electric Elves

2. 2.

Efficiently executing agent plans Efficiently executing agent plans

3. 3.

Speculative plan execution Speculative plan execution

4. 4.

Value prediction for speculative execution Value prediction for speculative execution

5. 5.

Related Work Related Work

6. 6.

Conclusions Conclusions

slide-5
SLIDE 5

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 5 5

Electric Elves Project Electric Elves Project

[ [Chalupsky Chalupsky et al, 2001] et al, 2001]

Elves project goal: Apply agent technology to Elves project goal: Apply agent technology to support human organizations support human organizations

  • Develop software agents that automate routine tasks
  • Enable software agents and humans to work together
  • Support coordination of tasks
  • Applications: Office Elves and Travel Elves

Applications: Office Elves and Travel Elves

W W W A g e n t P r o x i e s F o r P e o p l e I n f o r m a t i o n A g e n t s O n t o l o g y - b a s e d M a t c h m a k e r s

GRID

slide-6
SLIDE 6

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 6 6

Agents for Monitoring Travel Agents for Monitoring Travel

[Ambite et al, 2002] [Ambite et al, 2002]

  • Travel Elves created as an application of the

Travel Elves created as an application of the Electric Elves Electric Elves

  • Given travel itinerary, generates set of agents for

Given travel itinerary, generates set of agents for anticipating travel anticipating travel-

  • related failures and

related failures and

  • pportunities:
  • pportunities:
  • Price changes

Price changes

  • Schedule changes

Schedule changes

  • Flight delays & cancellations

Flight delays & cancellations

  • Earlier and close connections

Earlier and close connections

  • Finding the closest restaurant given GPS coordinates

Finding the closest restaurant given GPS coordinates

slide-7
SLIDE 7

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 7 7

Monitoring Travel Plans Monitoring Travel Plans

slide-8
SLIDE 8

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 8 8

Agents Deployed to Agents Deployed to Monitor Travel Itinerary Monitor Travel Itinerary

Travel Itinerary

W W W A g e n t P r o x i e s F o r P e o p l e I n f o r m a t i o n A g e n t s O n t o l o g y - b a s e d M a t c h m a k e r s

GRID

Flight Prices & Schedules Weather Flight Status Restaurants

slide-9
SLIDE 9

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 9 9

Monitoring Agents Monitoring Agents

  • Flight

Flight-

  • Status Agent:

Status Agent:

  • Flight delayed message:

Flight delayed message:

Your United Airlines flight 190 has been delayed. Your United Airlines flight 190 has been delayed. It was originally scheduled to depart at 11:45 AM It was originally scheduled to depart at 11:45 AM and is now scheduled to depart at 12:30 PM. and is now scheduled to depart at 12:30 PM. The new arrival time is 7:59 PM. The new arrival time is 7:59 PM.

  • Flight cancelled message:

Flight cancelled message:

Your Delta Air Lines flight 200 has been cancelled. Your Delta Air Lines flight 200 has been cancelled.

  • Fax to hotel message:

Fax to hotel message:

Attention: Registration Desk Attention: Registration Desk I am sending this message on behalf of David I am sending this message on behalf of David Pynadath Pynadath, who has a reservation at your hotel. David , who has a reservation at your hotel. David Pynadath Pynadath is on United Airlines 190, which is now is on United Airlines 190, which is now scheduled to arrive at IAD at 7:59 PM. Since the scheduled to arrive at IAD at 7:59 PM. Since the flight will be arriving late, I would like to request flight will be arriving late, I would like to request that you indicate this in the reservation so that the that you indicate this in the reservation so that the room is not given away. room is not given away.

slide-10
SLIDE 10

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 10 10

Monitoring Agents Monitoring Agents

  • Airfare Agent: Airfare dropped message

Airfare Agent: Airfare dropped message

The airfare for your American Airlines itinerary The airfare for your American Airlines itinerary (IAD (IAD -

  • LAX) dropped to $281.

LAX) dropped to $281.

  • Earlier

Earlier-

  • Flight Agent: Earlier flights message

Flight Agent: Earlier flights message

The status of your currently scheduled flight is: The status of your currently scheduled flight is: # 190 LAX (11:45 AM) # 190 LAX (11:45 AM) -

  • IAD (7:29 PM) 45 minutes Late

IAD (7:29 PM) 45 minutes Late If you would like to return earlier, the following If you would like to return earlier, the following United Airlines flights will arrive earlier than your United Airlines flights will arrive earlier than your scheduled flights: scheduled flights: # 946 LAX (8:31 AM) # 946 LAX (8:31 AM) -

  • IAD (3:35 PM) 11 minutes Late

IAD (3:35 PM) 11 minutes Late

  • # 388 LAX (9:25 AM)

# 388 LAX (9:25 AM) -

  • DEN (12:25 PM) 10 minutes Late

DEN (12:25 PM) 10 minutes Late # 1534 DEN (1:20 PM) # 1534 DEN (1:20 PM) -

  • IAD (6:06 PM) On Time

IAD (6:06 PM) On Time

slide-11
SLIDE 11

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 11 11

Outline Outline

1. 1.

Motivating Application: The Electric Elves Motivating Application: The Electric Elves

2. 2.

Efficiently executing agent plans Efficiently executing agent plans

3. 3.

Speculative plan execution Speculative plan execution

4. 4.

Value prediction for speculative execution Value prediction for speculative execution

5. 5.

Related Work Related Work

6. 6.

Conclusions Conclusions

slide-12
SLIDE 12

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 12 12

Efficiently Executing Efficiently Executing Agent Plans Agent Plans

  • Problem

Problem

  • Information gathering may involve accessing

Information gathering may involve accessing and integrating data from many sources and integrating data from many sources

  • Total time to execute these plans may be large

Total time to execute these plans may be large

  • Why?

Why?

  • Slow remote sources

Slow remote sources

  • Unpredictable network latencies

Unpredictable network latencies

  • Binding patterns

Binding patterns

  • Source cannot be queried until a previous query has

Source cannot be queried until a previous query has been answered been answered

  • Result: execution is often I/O

Result: execution is often I/O-

  • bound

bound

slide-13
SLIDE 13

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 13 13

Theseus Agent Execution System Theseus Agent Execution System

[ [Barish Barish & Knoblock, JAIR’05] & Knoblock, JAIR’05]

  • Plan language

Plan language and and execution system execution system for Web for Web-

  • based information integration

based information integration

  • Expressive enough for monitoring a variety of sources

Expressive enough for monitoring a variety of sources

  • Efficient enough for real

Efficient enough for real-

  • time monitoring

time monitoring

Theseus

Executor

PLAN myplan { INPUT: x OUTPUT: y BODY { Op (x : y) } } 01010101010110 00011101101011 11010101010101

Plan Input Data

slide-14
SLIDE 14

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 14 14

Streaming Dataflow Streaming Dataflow

  • Plans consist of a network of operators

Plans consist of a network of operators

  • Examples

Examples: : Wrapper Wrapper, , Select Select, etc. , etc.

  • Operators produce and consume data

Operators produce and consume data

  • Operators “fire” upon any input data

Operators “fire” upon any input data

  • Data passed as

Data passed as tuples tuples of a relation

  • f a relation

Wrapper Select Join Wrapper

Address 100 Main St., Santa Monica, 90292 520 4th St. Santa Monica, 90292 2 Ocean Blvd, Venice, 90292

City State Max Price Santa Monica CA 200000

Input relation Output relation Plan

slide-15
SLIDE 15

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 15 15

MUL MUL ADD a b c d

Parallelism in Streaming Dataflow Parallelism in Streaming Dataflow

  • Dataflow

Dataflow

  • Operations scheduled by data

Operations scheduled by data availability availability

  • Independent operations execute in parallel

Independent operations execute in parallel

  • Maximizes horizontal parallelism

Maximizes horizontal parallelism

  • Example

Example: computing : computing (a*b) + (c*d)

  • Streaming

Streaming

  • Operations emit data as soon as

Operations emit data as soon as possible possible

  • Independent data processed in parallel

Independent data processed in parallel

  • Maximizes vertical parallelism

Maximizes vertical parallelism

Producer Consumer MUL MUL ADD a b c d

slide-16
SLIDE 16

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 16 16

CarInfo CarInfo Agent Agent

  • Agent for recommending used cars:

Agent for recommending used cars:

  • Combine information from

Combine information from

  • Prices of used cars

Prices of used cars

  • Safety ratings

Safety ratings

  • Reviews

Reviews

  • Example:

Example:

  • 2002 Midsize coupe/hatchback

2002 Midsize coupe/hatchback

  • $4K

$4K-

  • $12K,

$12K,

  • No

No Oldsmobiles Oldsmobiles

slide-17
SLIDE 17

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 17 17

The The CarInfo CarInfo agent agent

  • 1. Locate cars that

meet criteria

  • Edmunds.com
slide-18
SLIDE 18

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 18 18

The The CarInfo CarInfo agent agent

  • 1. Locate cars that

meet criteria

  • Edmunds.com
  • 2. Filter out

Oldsmobiles

slide-19
SLIDE 19

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 19 19

The The CarInfo CarInfo agent agent

  • 1. Locate cars that

meet criteria

  • Edmunds.com
  • 2. Filter out

Oldsmobiles

  • 3. Gather safety

reviews for each

  • NHSTA.gov
slide-20
SLIDE 20

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 20 20

The The CarInfo CarInfo agent agent

  • 1. Locate cars that

meet criteria

  • Edmunds.com
  • 2. Filter out

Oldsmobiles

  • 3. Gather safety

reviews for each

  • NHSTA.gov
  • 4. Gather detailed

reviews of each

  • ConsumerGuide.com
slide-21
SLIDE 21

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 21 21

ConsumerGuide ConsumerGuide Navigation Navigation

  • Requires navigating through multiple pages

Requires navigating through multiple pages

slide-22
SLIDE 22

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 22 22

Agent Execution Performance Agent Execution Performance

  • Standard von Neumann model

Standard von Neumann model

  • Execute one operation at a time

Execute one operation at a time

  • Each operation processes all of its input before output

Each operation processes all of its input before output is used for next operation is used for next operation

  • Assume

Assume: : 1000ms per I/O op, 100ms per CPU op 1000ms per I/O op, 100ms per CPU op

  • Execution time = 13.4 sec

Execution time = 13.4 sec

time (seconds)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Select Edmunds NHTSA CG Search CG Summary CG Full

CPU-bound operation I/O-bound operation

slide-23
SLIDE 23

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 23 23

Dataflow Dataflow-

  • style

style CarInfo CarInfo agent plan agent plan

WRAPPER

ConsumerGuide Search

(Midsize coupe/hatchback, $4000 to $12000, 2002) ((http://cg.com/summ/20812.htm),

  • ther summary review URLs)

((http://cg.com/full/20812.htm),

  • ther full review URLs)

search criteria

WRAPPER

ConsumerGuide Summary

WRAPPER

ConsumerGuide Full Review

(car reviews)

WRAPPER

Edmunds Search

((Oldsmobile Alero), (Dodge Stratus), (Pontiac Grand Am), (Mercury Cougar)) JOIN SELECT

maker != "Oldsmobile"

WRAPPER

NHTSA Search

(safety reports)

((Dodge Stratus), (Pontiac Grand Am), (Mercury Cougar))

slide-24
SLIDE 24

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 24 24

Streaming Dataflow Performance Streaming Dataflow Performance

  • Improved, but plan remains I/O

Improved, but plan remains I/O-

  • bound

bound (76%) (76%)

  • Main problem

Main problem: : remote source latencies remote source latencies

  • Meanwhile, local resources are wasted

Meanwhile, local resources are wasted

  • Complicating factor

Complicating factor: : binding constraints binding constraints

  • Remote queries dependent on other remote queries

Remote queries dependent on other remote queries

  • Question

Question: : How can execution be more efficient? How can execution be more efficient?

time (seconds)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Select Edmunds CG Search CG Summary CG Full Join

slide-25
SLIDE 25

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 25 25

Outline Outline

1. 1.

Motivating Application: The Electric Elves Motivating Application: The Electric Elves

2. 2.

Efficiently executing agent plans Efficiently executing agent plans

3. 3.

Speculative plan execution Speculative plan execution

4. 4.

Value prediction for speculative execution Value prediction for speculative execution

5. 5.

Related Work Related Work

6. 6.

Conclusions Conclusions

slide-26
SLIDE 26

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 26 26

Speculative Execution Speculative Execution

[ [Barish Barish & Knoblock ’02, ’03] & Knoblock ’02, ’03]

  • Basic idea

Basic idea

  • Exploit idle resources to execute future

Exploit idle resources to execute future instructions in advance of when they are instructions in advance of when they are normally issued normally issued

  • Challenges

Challenges

  • How to augment plans for speculation

How to augment plans for speculation

  • How to ensure correctness and fairness

How to ensure correctness and fairness

  • How to decide what to speculate on

How to decide what to speculate on

slide-27
SLIDE 27

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 27 27

Speculative plan execution Speculative plan execution

  • Execute operators ahead of schedule

Execute operators ahead of schedule

  • Predict data based on past execution

Predict data based on past execution

  • Allows greater degree of parallelism

Allows greater degree of parallelism

  • Solves the problem caused by binding constraints

Solves the problem caused by binding constraints

  • Can lead to speedups > streaming dataflow

Can lead to speedups > streaming dataflow

time (seconds)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Select Edmunds CG Search CG Summary CG Full Join

GOAL

slide-28
SLIDE 28

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 28 28

How to speculate? How to speculate?

  • General problem

General problem

  • Means for issuing and confirming predictions

Means for issuing and confirming predictions

  • Two new operators

Two new operators

  • Speculate

Speculate: Makes predictions based on "hints" : Makes predictions based on "hints"

  • Confirm

Confirm: Prevents errant results from exiting plan : Prevents errant results from exiting plan

Speculate

answers hints confirmations predictions/additions

Confirm

confirmations probable results actual results

slide-29
SLIDE 29

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 29 29

J S W W W W W

BEFORE

  • Example:

Example: CarInfo CarInfo

  • Predict cars based on search criteria

Predict cars based on search criteria

  • Makes practical sense:

Makes practical sense:

  • Same criteria yields same cars

Same criteria yields same cars

How to speculate? How to speculate?

slide-30
SLIDE 30

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 30 30

AFTER

How to speculate? How to speculate?

  • Example:

Example: CarInfo CarInfo

  • Predict cars based on search criteria

Predict cars based on search criteria

  • Makes practical sense:

Makes practical sense:

  • Same criteria yields same cars

Same criteria yields same cars

J S W W Speculate

hints predictions/additions confirmations answers

W Confirm W W

slide-31
SLIDE 31

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 31 31

Detailed example Detailed example

J S W W Speculate W Confirm W W

2002 Midsize coupe $4000-$12000

Time = 0.0 sec

slide-32
SLIDE 32

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 32 32

Issuing predictions Issuing predictions

J S W W Speculate W Confirm W W

Oldsmobile Alero T1 Dodge Stratus T2 Pontiac Grand Am T3 Mercury Cougar T4

Time = 0.1 sec

slide-33
SLIDE 33

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 33 33

Speculative parallelism Speculative parallelism

J S W W Speculate W Confirm W W

Dodge Stratus T2 Pontiac Grand Am T3 Mercury Cougar T4

Time = 0.2 sec

slide-34
SLIDE 34

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 34 34

Answers to hints Answers to hints

J S W W Speculate W Confirm W W

Oldsmobile Alero Dodge Stratus Pontiac Grand Am Mercury Cougar

Time = 1.0 sec

slide-35
SLIDE 35

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 35 35

Continued processing Continued processing

J S W W Speculate W Confirm W W

T1 T2 T3 T4

Time = 1.1 sec Additions (corrections), if any

slide-36
SLIDE 36

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 36 36

Generation of final results Generation of final results

J S W W Speculate W Confirm W W

Dodge Stratus (safety) (review) T2 Pontiac Grand Am (safety) (review) T3 Mercury Cougar (safety) (review) T4

Time = 3.2 sec

slide-37
SLIDE 37

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 37 37

Confirmation of results Confirmation of results

J S W W Speculate W Confirm W W

Dodge Stratus (safety) (review) Pontiac Grand Am (safety) (review) Mercury Cougar (safety) (review)

Time = 3.3 sec

slide-38
SLIDE 38

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 38 38

Safety and fairness Safety and fairness

  • Safety

Safety

  • Confirm

Confirm blocks predictions (and results of) from blocks predictions (and results of) from exiting plan before verification exiting plan before verification

  • Fairness

Fairness

  • CPU

CPU

  • Speculative operations use "speculative threads"

Speculative operations use "speculative threads"

  • Lower priority threads

Lower priority threads

  • Memory and bandwidth

Memory and bandwidth

  • Speculative operations allocate "speculative resources"

Speculative operations allocate "speculative resources"

  • Drawn from "speculative pool" of memory / objects

Drawn from "speculative pool" of memory / objects

slide-39
SLIDE 39

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 39 39

  • Cascading speculation

Cascading speculation

  • Single speculation allows a max speedup of 2

Single speculation allows a max speedup of 2

  • Time spent either speculating or confirming

Time spent either speculating or confirming

  • Cascading speculation allows

Cascading speculation allows arbitrary arbitrary speedups speedups

  • Up to the length of the longest plan flow

Up to the length of the longest plan flow

Getting better speedups Getting better speedups

W

a

W W

b c

W

d

W W

e f

W

g

W W

h i

W

j

W W W W W W W W W W S S S S S S S S S C

slide-40
SLIDE 40

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 40 40

Cascading Speculation Cascading Speculation

  • Use predicted cars to speculate about the

Use predicted cars to speculate about the ConsumerGuide ConsumerGuide summary and full URLs summary and full URLs

  • Optimistic performance

Optimistic performance

  • Execution time:

Execution time: max

max { {1.2, 1.4, 1.5, 1.6

1.2, 1.4, 1.5, 1.6}

} =

= 1.6 sec 1.6 sec

  • Speedup over streaming dataflow:

Speedup over streaming dataflow: (4.2/1.6) (4.2/1.6) = = 2.63 2.63

W J S W W SPEC CONF SPEC W W SPEC

slide-41
SLIDE 41

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 41 41

Automatic plan transformation Automatic plan transformation

  • Agent plans are automatically modified for

Agent plans are automatically modified for speculative execution speculative execution

  • Successive runs of the plan benefit

Successive runs of the plan benefit

  • Even with different input data

Even with different input data

  • Optimize only the most expensive path (

Optimize only the most expensive path (MEP MEP) )

  • Algorithm

Algorithm

1. 1.Find MEP Find MEP 2. 2.Find best candidate speculative plan Find best candidate speculative plan transformation transformation 3. 3.IF no candidate found, THEN exit IF no candidate found, THEN exit 4. 4.Transform plan accordingly Transform plan accordingly 5. 5.REPEAT REPEAT (anytime property) (anytime property)

slide-42
SLIDE 42

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 42 42

Speculation Results Speculation Results

0.00 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50

CarInfo RepInfo TheaterLoc FlightStatus StockInfo

Plan Speedup

100% correct 50% correct 0.00 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50 CarInfo RepInfo TheaterLoc FlightStatus StockInfo

Plan Speedup

100% correct 50% correct

  • Time to first

Time to first tuple tuple: :

  • Time to last

Time to last tuple tuple: :

slide-43
SLIDE 43

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 43 43

Outline Outline

1. 1.

Motivating Application: The Electric Elves Motivating Application: The Electric Elves

2. 2.

Efficiently executing agent plans Efficiently executing agent plans

3. 3.

Speculative plan execution Speculative plan execution

4. 4.

Value prediction for speculative execution Value prediction for speculative execution

5. 5.

Related Work Related Work

6. 6.

Conclusions Conclusions

slide-44
SLIDE 44

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 44 44

Value prediction Value prediction

  • Better value prediction = better speedups

Better value prediction = better speedups

  • Prediction capability

Prediction capability

  • Examples:

Examples:

Edmunds car list Edmunds car list from from search criteria search criteria

2002 Midsize coupe 4K 2002 Midsize coupe 4K-

  • 12K

12K Olds Olds Alero Alero, Dodge Stratus, Pontiac Grand Am, Mercury Cougar , Dodge Stratus, Pontiac Grand Am, Mercury Cougar

ConsumerGuide ConsumerGuide full review URL full review URL from from summary URL summary URL

http://cg.com/summary/20812.htm http://cg.com/summary/20812.htm http://cg.com/full/20812.htm http://cg.com/full/20812.htm

Category Hint Prediction A Previously seen Previously seen B Never seen Previously seen C Never seen Never seen

H P 5K-12K ?

http://cg.com/summary/12345.htm ?

slide-45
SLIDE 45

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 45 45

Learning for Speculative Execution Learning for Speculative Execution

  • Caching

Caching

  • Associate a hint with a predicted value

Associate a hint with a predicted value

  • 2002 Midsize coupe 4K

2002 Midsize coupe 4K-

  • 12K

12K

  • Olds

Olds Alero Alero, Dodge Stratus, Pontiac Grand Am, Mercury Cougar , Dodge Stratus, Pontiac Grand Am, Mercury Cougar

  • Classification

Classification

  • Use features of a hint to predict value

Use features of a hint to predict value

  • EXAMPLE

EXAMPLE: : Predicting car list from Edmunds Predicting car list from Edmunds type = SUV : (Nissan Pathfinder, Ford Explorer) type = Midsize : :...min <= 10000 : (Olds Alero, Dodge Stratus) min > 10000 : (Honda Accord, Toyota Camry)

Cache Decision list

Year Type Min Max Car list 2002 Midsize 8000 15000 (Oldmobile Alero, Dodge Stratus) 2002 Midsize 7500 14500 (Oldmobile Alero, Dodge Stratus) 2002 SUV 14000 20000 (Nissan Pathfinder, Ford Explorer) 2001 Midsize 11000 18000 (Honda Accord, Toyota Camry) 2002 SUV 18000 22000 (Nissan Pathfinder, Ford Explorer)

slide-46
SLIDE 46

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 46 46

1

"http://cg.com/summary/" : ε : COPY

3

"." :

2

ε : COPY

Learning for Speculative Execution Learning for Speculative Execution

  • Transduction

Transduction

  • Transducers are FSM that translate hints into predictions

Transducers are FSM that translate hints into predictions http://cg.com/summary/20812.htm http://cg.com/full/20812.htm

To create full review URL:

  • 1. Insert "http://cg.com/full/"
  • 2. Extract & insert the dynamic part
  • f the summary URL (e.g., 20812)
  • 3. Insert ".htm"
slide-47
SLIDE 47

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 47 47

Unifying Algorithm: Unifying Algorithm: Learn Value Transducers Learn Value Transducers

  • Combines different learning methods

Combines different learning methods

  • Identify predicted value "templates"

Identify predicted value "templates"

  • Alternating

Alternating seq seq of STATIC/DYNAMIC elements

  • f STATIC/DYNAMIC elements
  • Value transducers built from templates

Value transducers built from templates

  • State transitions (arcs) = high

State transitions (arcs) = high-

  • level

level

  • perations:
  • perations:
  • INSERT, CACHE, CLASSIFY, TRANSDUCE

INSERT, CACHE, CLASSIFY, TRANSDUCE http://cg.com/summary/20812.htm http://cg.com/full/20812.htm

1

STATIC

2

DYNAMIC

3

STATIC

TRANSDUCE

Dodge Stratus http://cg.com/summary/20812.htm

CACHE or CLASSIFY

1

STATIC

2

DYNAMIC

3

STATIC

slide-48
SLIDE 48

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 48 48

Learning value transducers Learning value transducers

  • Identify

Identify STATIC/DYNAMIC STATIC/DYNAMIC template template

  • Find LCS for the set of predicted values, using technique

Find LCS for the set of predicted values, using technique based on (Hirschberg 1975) based on (Hirschberg 1975)

  • For each

For each STATIC STATIC element, element,

  • Construct

Construct INSERT INSERT arc to next automata state arc to next automata state

  • For each

For each DYNAMIC DYNAMIC element, element,

  • Construct

Construct TRANSDUCE TRANSDUCE, , CLASSIFY CLASSIFY, or , or CACHE CACHE arc to arc to next automata state next automata state

  • Prefer TRANSDUCE and CLASSIFY because

Prefer TRANSDUCE and CLASSIFY because

  • Better predictive capability on average

Better predictive capability on average

  • Better space efficiency on average

Better space efficiency on average

slide-49
SLIDE 49

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 49 49

Detailed example: Detailed example: CarInfo CarInfo URLs URLs

http://cg.com/summary/20812.htm

ANSWERS: HINTS: TEMPLATE

http://cg.com/full/[DYNAMIC].htm

http://cg.com/summary/12345.htm http://cg.com/full/20812.htm http://cg.com/full/12345.htm

1 2

INSERT INSERT("http://cg.com/full/")

3

INSERT INSERT(".htm") ?? TRANSDUCE

slide-50
SLIDE 50

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 50 50

Example Value Transducer Example Value Transducer

1 2

INSERT INSERT("http://cg.com/full/") TRANSDUCE TRANSDUCE(hint)

3

INSERT INSERT(".htm")

2a 2b

u:ACCEPT ACCEPT /:ACCEPT ACCEPT ε:ACCEPT ACCEPT

2c

ε:COPY COPY .:ACCEPT ACCEPT

2d

ε:ACCEPT ACCEPT ε:ACCEPT ACCEPT

http://cg.com/ http://cg.com/summ/20812.h summ/20812.htm tm

slide-51
SLIDE 51

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 51 51

Effect on spec exec performance Effect on spec exec performance

  • CarInfo

CarInfo

1000 2000 3000 4000 5000 6000 7000 No spec (0) Spec (1-25) Spec (26-50) Spec (51-75) Spec (76-100) Spec (101-125)

Number of tuples seen Average agent execution time (ms)

First tuple Average tuple Last tuple

slide-52
SLIDE 52

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 52 52

Effect on spec exec performance Effect on spec exec performance

  • RepInfo

RepInfo

1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

No spec (0) Spec (1-20) Spec (21-40) Spec (41-60) Spec (61-80) Number of tuples seen Average agent execution time (ms) First tuple Average tuple Last tuple

slide-53
SLIDE 53

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 53 53

Outline Outline

1. 1.

Motivating Application: The Electric Elves Motivating Application: The Electric Elves

2. 2.

Efficiently executing agent plans Efficiently executing agent plans

3. 3.

Speculative plan execution Speculative plan execution

4. 4.

Value prediction for speculative execution Value prediction for speculative execution

5. 5.

Related Work Related Work

6. 6.

Conclusions Conclusions

slide-54
SLIDE 54

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 54 54

Related Work Related Work

  • Speculative execution

Speculative execution

  • Approximate & partial query results

Approximate & partial query results

  • [

[Hellerstein Hellerstein et al. 1997] et al. 1997] [ [Shanmugasundaram Shanmugasundaram et al. 2000] et al. 2000] [Raman [Raman and and Hellerstein Hellerstein 2001] 2001]

  • Executing anticipated actions in advance

Executing anticipated actions in advance

  • Continual computation

Continual computation [Horvitz 2001]

[Horvitz 2001],

, time time-

  • critical decision

critical decision making making [Greenwald and Dean 1994]

[Greenwald and Dean 1994]

  • Other types of speculative execution

Other types of speculative execution

  • File system

File system prefetching prefetching [Chang and Gibson 1999]

[Chang and Gibson 1999],

, control

control speculation in workflow processing speculation in workflow processing [Hull et al. 2000]

[Hull et al. 2000]

  • Network

Network prefetching prefetching

slide-55
SLIDE 55

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 55 55

Related Work Related Work

  • Learning value predictors

Learning value predictors

  • Predicting commands

Predicting commands

  • Command line prediction

Command line prediction [Davison and Hirsh 1998, 2001]

[Davison and Hirsh 1998, 2001]

  • Assisted browsing

Assisted browsing [Lieberman 1995] [

[Lieberman 1995] [Joachims Joachims et al. et al. 1997] 1997]

  • Value prediction as speedup learning

Value prediction as speedup learning

  • [

[Fikes Fikes et al. 1972], [Mitchell 1983], [Minton 1988] et al. 1972], [Mitchell 1983], [Minton 1988]

  • Transducer learning

Transducer learning

  • Provably correct transducers

Provably correct transducers [

[Oncina Oncina et al. 1993] et al. 1993]

  • Issues: Requires many examples, generalization capability

Issues: Requires many examples, generalization capability differs differs

  • Transducers for data extraction

Transducers for data extraction [Hsu and Chang 1999]

[Hsu and Chang 1999]

  • URL prediction

URL prediction

  • [

[Zukerman Zukerman et al. 1999], [Su et al. 2000] et al. 1999], [Su et al. 2000]

slide-56
SLIDE 56

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 56 56

Outline Outline

1. 1.

Motivating Application: The Electric Elves Motivating Application: The Electric Elves

2. 2.

Efficiently executing agent plans Efficiently executing agent plans

3. 3.

Speculative plan execution Speculative plan execution

4. 4.

Value prediction for speculative execution Value prediction for speculative execution

5. 5.

Related Work Related Work

6. 6.

Conclusions Conclusions

slide-57
SLIDE 57

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 57 57

Summary Summary

  • An approach to

An approach to speculative execution speculative execution of

  • f

information agent plans information agent plans

  • Can yield arbitrary speedups

Can yield arbitrary speedups

  • Safe, fair

Safe, fair

  • Value prediction approach that combines

Value prediction approach that combines caching, classification caching, classification, and , and transduction transduction

  • More accurate & space efficient than strictly

More accurate & space efficient than strictly caching caching

slide-58
SLIDE 58

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 58 58

Conclusions Conclusions

  • Speculative execution is a form of speed

Speculative execution is a form of speed-

  • up learning

up learning

  • Two very large search spaces:

Two very large search spaces:

  • Plan transformations for speculative execution

Plan transformations for speculative execution

  • Value prediction for each speculate operator

Value prediction for each speculate operator

  • Both of these are potential opportunities for CBR in

Both of these are potential opportunities for CBR in information gathering information gathering

  • Could learn finer

Could learn finer-

  • grained plan transformations that depend on

grained plan transformations that depend on the request the request

  • Could learn more sophisticated value prediction strategies

Could learn more sophisticated value prediction strategies (e.g., speculating on multiple inputs) (e.g., speculating on multiple inputs)

  • Finding the right speculative plan and value predictions can

Finding the right speculative plan and value predictions can provide significant speedups! provide significant speedups!

slide-59
SLIDE 59

Craig Knoblock Craig Knoblock University of Southern California University of Southern California 59 59

More Information More Information

  • My home page:

My home page: http://www.isi.edu/~knoblock http://www.isi.edu/~knoblock

  • Papers:

Papers:

  • Theseus

Theseus execution system: JAIR’05 execution system: JAIR’05

  • Speculative execution: ICAPS’02

Speculative execution: ICAPS’02

  • Value prediction: IJCAI’03

Value prediction: IJCAI’03

  • Electric Elves: IAAI’01, IAAI’02

Electric Elves: IAAI’01, IAAI’02

  • Thesis:

Thesis:

  • Greg

Greg Barish Barish, 2004, USC , 2004, USC

slide-60
SLIDE 60

Craig Knoblock University of Southern California 60

The End The End