a strategy selection framework for adaptive prefetching in visual exploration punit r. doshi,...

28
A Strategy Selection Framework for Adaptive Prefetching in Visual Exploration Punit R. Doshi, Geraldine E. Rosario, Elke A. Rundensteiner, and Matthew O. Ward Computer Science Department Worcester Polytechnic Institute Supported by NSF grant IIS-0119276. Presented at SSDBM2003, July 10, 2003.

Post on 21-Dec-2015

227 views

Category:

Documents


0 download

TRANSCRIPT

A Strategy Selection Framework for Adaptive Prefetching

in Visual Exploration

Punit R. Doshi, Geraldine E. Rosario, Elke A. Rundensteiner,

and Matthew O. Ward

Computer Science Department

Worcester Polytechnic Institute

Supported by NSF grant IIS-0119276.

Presented at SSDBM2003, July 10, 2003.

2

Motivation

• Why visually explore data?– Ever increasing data set sizes make data

exploration infeasible– Possible solution: Interactive Data Visualization --

humans can detect certain patterns better and faster than data mining tools

• Why cache and prefetch?– Interactive visualization tools do not scale well,

yet we need real-time response

3Data Hierarchy

Flat Display

Hierarchical Display

Example Visual Exploration Tool: XmdvTool

4

Example Visual Exploration Tool: XmdvTool

Structure-Based Brush2 Parallel Coordinates (Linked with Brush2)

Roll-Up:

Structure-Based Brush1 Parallel Coordinates (Linked with Brush1)

Drill Down:

5

Characteristics of a Visualization Environment Exploited for Prefetching

• Locality of exploration

• Contiguity of user movements

• Idle time due to user viewing display

Move left/right

Move up/down

6

Overview of Prefetching• Locality of exploration• Contiguity of user

movements• Idle time due to user

viewing display

New user query

Idle time

Prefetching

Cache DB

User’s next request can be predicted with high accuracy

Time to prefetch

Fetching

7

(m-1) m (m+1)

Direction StrategyRandom Strategy

1/41/4

1/4

1/4

Static Prefetching Strategies

8

Drawbacks of Static Prefetching

• Lacks a feedback mechanism

• Different users have different exploration patterns

• A user’s pattern may be changing within same session

Generates predictions independent of past performance.

No single strategy will work best for all users.

A single strategy may not be sufficient within one user session.

This calls for Adaptive Prefetching – changing prediction behavior in response to changing data access patterns.

9

Types of Adaptive Prefetching

• Fine tuning one strategy:– Change parameter values of one strategy over time

depending on past performance

• Strategy selection among several strategies:– Given a set of strategies, allow the choice of

strategy to change over time within same session, depending on past performance

10

Strategy Selection

Requirements for strategy selection:1. Set of strategies to select from2. Performance measures3. Fitness function4. Strategy selection policy

11

Set of Strategies & Performance Measures

Strategy#Correctly

Predicted

#Not

Predicted

#Mis-

Predicted

No Prefetch

Random

Direction

Performance measuresStrategies

Yes No

Yes Correctly predicted

Mis-predicted

No Not predicted

Required by user

Predictedby prefetcher

12

Fitness FunctionStrategy #Correctly

Predicted

#Not

Predicted

#Mis-

Predicted

Local Avg. Mis-Classification Cost

No Prefetch

Random

Direction

Other fitness functions:

• global average misclass. cost

• local average response time

• global average response time

Fitness function

MPNPCP

MPMPNPNP CCstmisclassco

###

##

Cost of No prediction

Cost of Mis-predictionNPC

MPC

1 MPNP CC

13

Fitness Function DefinitionsGlobal Average:

t

istmisClassCotglobalAvg

t

i 1

Local Average (using exponential smoothing):

11 tlocalAvgtstmisClassCotlocalAvg

14

Strategy Selection Policy

Strategy selection policies:

1. Best

2. Proportionate

Strategy #Correctly

Predicted

#Not

Predicted

#Mis-

Predicted

Local Avg. Mis-Classification Cost

No Prefetch 12 38 86 0.5

Random 10 116 148 0.4

Direction 4 125 107 0.3

Overall 26 279 341 0.4

15

Performance EvaluationSetup –• XmdvTool as testbed• 14 real user traces analyzed• User traces were analyzed for:

• Tendency to move in the same direction• Frequency of movement• Size of sample focused on

• 3 user types: random-starers, indeterminates, directional-movers

We will show:• Detailed analysis and results for 2 user traces• Summary results for all user types

16

Directional User: Navigation Patterns Over Time

% directional vs Time

0

10

20

30

40

50

60

70

80

90

100

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

time

% d

irec

tio

nal

# queries vs Time

0

20

40

60

80

100

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

time

# que

ries

•Ave 73%directional

•Ave 70queries/min

•Navigationpattern changes over time

17

Directional User: Navigation Patterns Over Time

Move upor downthen moveleft to right to left

Brush movements over time

0

0.5

1

1.5

2

0 1 2 3 3 4 5 5 6 6 7 7 8 9 10 10 11 12 12 13 14 15 17 18 19 19 22 23 24 25 25 26 26 27 28 29

time (mins)

exte

nts

xycenter level

regions visited per 1 min snapshot

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

1 minute snapshots

leve

l

18

Directional User: Directional prefetcher is best

cum misclassification cost vs Time

0.4

0.42

0.44

0.46

0.48

0.5

0.52

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

time

DIR RANDOM NO PREFETCH

Selectionmatchedmore directionalnavigationpattern.

Any kind of prefetchingis better than none.

19

… but SelectBest is even better

SelectBestchose Directional& No-Prefetching

No-Prefetchingselected when #queries/minis high & %diris low.

cum misclassification cost vs Time

0.4

0.42

0.44

0.46

0.48

0.5

0.52

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

time

DIR RANDOM NO PREFETCH BEST

% times selected vs time

0

20

40

60

80

100

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

time

% ti

mes

sel

ecte

d

% times no-prefetch selected % times random selected % times directional selected

20

Directional User: Other performance measures

Misclassificationcost = trade-offbetween %NP& %MP.

SelectBestgave low%NP andhigh %MP.

%Not Predicted vs Time

0

20

40

60

80

100

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

time

%N

P

DIR RANDOM NO PREFETCH BEST

%Mis-Predicted vs Time

0

10

20

30

40

50

60

70

80

90

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

time

%M

P

DIR RANDOM NO PREFETCH BEST

21

Directional User: Other performance measures

SelectBestgave best %CP & response time but this will not alwaysbe the case.

Choice of fitness functionis important.

%Correctly Predicted vs Time

024

68

101214

161820

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

time

%CP

DIR RANDOM NO PREFETCH BEST

Total Response Time vs Time

0

20000

40000

60000

80000

100000

120000

140000

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

time

Tota

l Res

pons

e Ti

me

DIR RANDOM NO PREFETCH BEST

22

•Ave 50%directional

•Ave 40queries/min

•Pattern changes over time

•Move leftthen perturbup & down.

Move rightthen perturbup & down.

regions visited per 1 min snapshot

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

1 minute snapshots

leve

l

Brush movements over time

0

0.5

1

1.5

2

0 1 1 2 2 3 3 4 5 5 6 7 8 9 10 11 12 12 13 13 14 15 15 16 16 17 17 18 19 19 20 21 21 22 22 23

time (mins)

exte

nts

xycenter level

Indeterminate User: Navigation Patterns Over Time

23

Indeterminate User: SelectBest is better

SelectBestchose Random& No-Prefetching

No-Prefetchingselected when #queries/minis high & %diris low.

cum misclass cost vs Time

0.35

0.37

0.39

0.41

0.43

0.45

0.47

0.49

0.51

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

time

DIR RANDOM NO PREFETCH BEST

% times selected vs time

0

20

40

60

80

100

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

time

% ti

mes

sel

ecte

d

% times no-prefetch selected % times random selected % times directional selected

24

Summary Across All User Types

Experiments repeated 3x and averaged.

Reduced prediction error for random-starters and directional-movers.

No improvement in response time.

0

10

20

30

40

50

60

70

80

90

100

No

Pre

fetc

h

Random

Direction

Best

No

Pre

fetc

h

Random

Direction

Best

No

Pre

fetc

h

Random

Direction

Best

Random-Starers Indeterminates Directional-Movers

Cluster

No

rm

alized

Resp

on

se T

ime

(A

verag

ed

)0.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

0.40

0.45

0.50

No

Pre

fetc

h

Ra

nd

om

Dir

ectio

n

Be

st

No

Pre

fetc

h

Ra

nd

om

Dir

ectio

n

Be

st

No

Pre

fetc

h

Ra

nd

om

Dir

ectio

n

Be

st

Random-Starers Indeterminates Directional-Movers

Cluster

Glo

bal A

verag

e M

iscla

ssif

icati

on

Co

st

(Averag

ed

)

25

Related Work• Adaptive Prefetching –

• Strategy Refinement - Davidson98, Tcheun97, Curewitz93, Kroeger96, Palpanas99

• Learning - Agrawal95, Swaminathan00

• Adaptation Concepts – Mitchell99, Waldspurger94, Avnur00

• Performance Measures – Joseph97,Weiss25, Mitchell99

• Database support for Interactive Applications – Stolte02, Tioga96

26

Observations• Prefetching is better than no prefetching• Different users have different navigation patterns,

same user has varying navigation patterns within same session

• No single prefetcher works best in all cases• Strategy selection allows prefetcher to adapt• Performance of strategy selection depends on

fitness function being optimized

27

Contributions

• The first to study adaptive prefetching in the context of visual data exploration

• A proposed framework for adaptive prefetching via strategy selection, as opposed to common approach of strategy refinement

• Empirical results showing benefits of strategy selection over a wide range of user navigation traces

28

That’s all folks

XmdvTool Homepage:

http://davis.wpi.edu/~xmdv

[email protected]

Code is free for research and education.

Contact author: [email protected]