Evaluating search engines CE-324: Modern Information Retrieval - - PowerPoint PPT Presentation

evaluating search engines
SMART_READER_LITE
LIVE PREVIEW

Evaluating search engines CE-324: Modern Information Retrieval - - PowerPoint PPT Presentation

Evaluating search engines CE-324: Modern Information Retrieval Sharif University of Technology M. Soleymani Spring 2020 Most slides have been adapted from: Profs. Manning, Nayak & Raghavan (CS-276, Stanford) Sec. 8.6 Evaluation of a


slide-1
SLIDE 1

Evaluating search engines

CE-324: Modern Information Retrieval

Sharif University of Technology

  • M. Soleymani

Spring 2020

Most slides have been adapted from: Profs. Manning, Nayak & Raghavan (CS-276, Stanford)

slide-2
SLIDE 2

2

Evaluation of a search engine

} How fast does it index?

} Number of documents/hour } Incremental indexing

} How large is its doc collection? } How fast does it search? } How expressive is the query language? } User interface design issues } This is all good, but it says nothing about the quality of its

search

  • Sec. 8.6
slide-3
SLIDE 3

3

User happiness is elusive to measure

} The key utility measure is user happiness.

} How satisfied is each user with the obtained results? } The most common proxy to measure human satisfaction is

relevance of search results to the posed information

} How do you measure relevance?

  • Sec. 8.1
slide-4
SLIDE 4

Why do we need system evaluation?

4

} How do we know which of the already introduced

techniques are effective in which applications?

} Should we use stop lists? Should we stem? Should we use

inverse document frequency weighting?

} How can we claim to have built a better search engine for

a document collection?

slide-5
SLIDE 5

Measuring relevance

5

} Relevance measurement requires 3 elements:

1.

A benchmark doc collection

2.

A benchmark suite of information needs

3.

A usually binary assessment

  • f

either Relevant

  • r

Nonrelevant for each information needs and each document

}

Some work on more-than-binary, but not the standard

slide-6
SLIDE 6

So you want to measure the quality of a new search algorithm

} Benchmark documents } Benchmark query suite } Judgments of document relevance for each query

6

docs sample queries

Relevance judgement

slide-7
SLIDE 7

Relevance judgments

} Binary (relevant vs. non-relevant) in the simplest case,

more nuanced (0, 1, 2, 3 …) in others

} What are some issues already?

} Cost of getting these relevance judgments

7

slide-8
SLIDE 8

Crowd source relevance judgments?

} Present query-document pairs to low-cost labor on

  • nline crowd-sourcing platforms

} Hope that this is cheaper than hiring qualified assessors

} Lots of literature on using crowd-sourcing for such tasks } Main takeaway – you get some signal, but the variance in

the resulting judgments is very high

8

slide-9
SLIDE 9

9

Evaluating an IR system

} Note: user need is translated into a query } Relevance is assessed relative to the user need, not the

query

} E.g., Information need: My swimming pool bottom is

becoming black and needs to be cleaned.

} Query: pool cleaner

} Assess whether the doc addresses the underlying need,

not whether it has these words

  • Sec. 8.1
slide-10
SLIDE 10

10

What else?

} Still need test queries

} Must be germane to docs available } Must be representative of actual user needs } Random query terms from the documents generally not a

good idea

} Sample from query logs if available

} Classically (non-Web)

} Low query rates – not enough query logs } Experts hand-craft “user needs”

  • Sec. 8.5
slide-11
SLIDE 11

11

Some public test Collections

  • Sec. 8.5

Typical TREC

slide-12
SLIDE 12

12

Standard relevance benchmarks

} TREC: NIST has run a large IR test bed for many years } Reuters and other benchmark doc collections } Human experts mark, for each query and for each doc,

Relevant or Nonrelevant

} or at least for subset of docs that some systems (participating

in the competitions) returned for that query

} Binary (relevant vs. non-relevant) in the simplest case,

more nuanced (0, 1, 2, 3 …) in others

  • Sec. 8.2
slide-13
SLIDE 13

13

Unranked retrieval evaluation: Precision and Recall

} Precision: P(relevant|retrieved)

} fraction of retrieved docs that are relevant

} Recall: P(retrieved|relevant)

} fraction of relevant docs that are retrieved

} Precision P = tp/(tp + fp) } Recall

R = tp/(tp + fn)

Relevant Nonrelevant Retrieved tp fp Not Retrieved fn tn

  • Sec. 8.3
slide-14
SLIDE 14

Accuracy measure for evaluation?

} Accuracy: fraction of classifications that are correct

} evaluation measure in machine learning classification works

} The accuracy of an engine:

} (tp + tn) / ( tp + fp + fn + tn)

} Given a query, an engine classifies each doc as “Relevant”

  • r “Nonrelevant”

} Why is this not a very useful evaluation measure in IR?

14

slide-15
SLIDE 15

15

Why not just use accuracy?

} How to build a 99.9999% accurate search engine on a low

budget….

} The snoogle search engine below always returns 0 results (“No

matching results found”), regardless of the query

} Since many more non-relevant docs than relevant ones

} People want to find something and have a certain tolerance for

junk. Search for:

0 matching results found.

  • Sec. 8.3
slide-16
SLIDE 16

16

Precision/Recall

} Retrieving all docs for all queries!

} High recall but low precision

} Recall is a non-decreasing function of the number of docs

retrieved

} In a good system, precision decreases as either the

number of docs retrieved (or recall increases)

} This is not a theorem, but a result with strong empirical

confirmation

  • Sec. 8.3
slide-17
SLIDE 17

17

A combined measure: F

} Combined measure: F measure

} allows us to trade off precision against recall } weighted harmonic mean of P and R

} What value range of weights recall higher than precision?

R P PR R P F + + =

  • +

=

2 2

) 1 ( 1 ) 1 ( 1 1 b b a a

  • Sec. 8.3

𝛾" = 1 − 𝛽 𝛽

slide-18
SLIDE 18

A combined measure: F

} People usually use balanced F (b = 1 or a = ½)

𝐺 = 𝐺

()*

𝐺 = 2𝑄𝑆 𝑄 + 𝑆

} harmonic mean of P and R:

* / = * " * 0 + * 1

18

slide-19
SLIDE 19

Why harmonic mean?

19

} Why don’t we use a different mean of P and R as a measure?

} e.g., the arithmetic mean

} The simple (arithmetic) mean is 50% for “return-everything”

search engine, which is too high.

} Desideratum: Punish

really bad performance

  • n

either precision or recall.

} Taking the minimum achieves this. } F (harmonic mean) is a kind of smooth minimum.

slide-20
SLIDE 20

20

and other averages

1

F

Combined Measures

20 40 60 80 100 20 40 60 80 100 Precision (Recall fixed at 70%) Minimum Maximum Arithmetic Geometric Harmonic

  • Sec. 8.3

Harmonic mean is a conservative average We can view the harmonic mean as a kind of soft minimum

slide-21
SLIDE 21

21

Evaluating ranked results

} Precision, recall and F are measures for (unranked) sets.

} We can easily turn set measures into measures of ranked lists.

} Evaluation of ranked results:

} Taking various numbers of top returned docs (recall levels)

} Sets of retrieved docs are given by the top k retrieved docs.

¨ Just compute the set measure for each “prefix”: the top 1, top 2, top 3, top

4, and etc results

} Doing this for precision and recall gives you a precision-recall

curve

  • Sec. 8.4
slide-22
SLIDE 22

Rank-Based Measures

22

} Binary relevance

} Precision-Recall curve } Precision@K (P@K) } Mean Average Precision (MAP) } Mean Reciprocal Rank (MRR)

} Multiple levels of relevance

} Normalized Discounted Cumulative Gain (NDCG)

slide-23
SLIDE 23

23

A precision-recall curve

0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Recall Precision

  • Sec. 8.4
slide-24
SLIDE 24

An interpolated precision-recall curve

24

0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Recall Precision

𝑞345678 𝑠 = max

7=>7 𝑞(𝑠@)

slide-25
SLIDE 25

25

Averaging over queries

} Precision-recall graph for one query

} It isn’t a very sensible thing to look at

} Average performance over a whole bunch of queries. } But there’s a technical issue:

} Precision-recall: only place some points on the graph } How do you determine a value (interpolate) between the

points?

  • Sec. 8.4
slide-26
SLIDE 26

Binary relevance evaluation

} Graphs are good, but people want summary measures!

} 11-point interpolated average precision

} Precision at fixed retrieval level } MAP } Mean Reciprocal Rank

26

slide-27
SLIDE 27

27

11-point interpolated average precision

} The standard measure in the early TREC competitions } Precision at 11 levels of recall varying from 0 to 1

} by tenths of the docs using interpolation and average them

} Evaluates performance at all recall levels (0, 0.1, 0.2, …,1)

  • Sec. 8.4
slide-28
SLIDE 28

28

Typical (good) 11 point precisions

} SabIR/Cornell 8A1

} 11pt precision fromTREC 8 (1999)

0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 Recall Precision

  • Sec. 8.4
slide-29
SLIDE 29

Precision-at-k

} Precision-at-k: Precision of top k results

} Set a rank threshold K } Ignores documents ranked lower than K

} Perhaps appropriate for most of web searches

} people want good matches on the first one or two results

pages

} Does not need any estimate of the size of relevant set

} But: averages badly and has an arbitrary parameter of k

29

slide-30
SLIDE 30

Precision-at-k

30

} Compute % relevant in top K } Examples

} Prec@3 of 2/3 } Prec@4 of 2/4 } Prec@5 of 3/5

} In similar fashion we have Recall@K

slide-31
SLIDE 31

Average precision

31

} Consider rank position of each relevant doc

} K1, K2, … KR

} Compute Precision@K for each K1, K2, … KR } Average precision = average of P@K (for K1, K2, … KR) } Ex:

has AvgPrec of

76 . 5 3 3 2 1 1 3 1 » ÷ ø ö ç è æ + + ×

slide-32
SLIDE 32

32

Mean Average Precision (MAP)

} MAP is Average Precision across multiple queries/rankings } Mean Average Precision (MAP)

} Average precision is obtained for the top k docs, each time a

relevant doc is retrieved

} MAP for query collection is arithmetic average

} Macro-averaging: each query counts equally

  • Sec. 8.4
slide-33
SLIDE 33

Average precision: example

33

slide-34
SLIDE 34

MAP: example

34

slide-35
SLIDE 35

MAP

} 𝑅: set of information needs } Set of relevant docs to 𝑟D ∈ 𝑅: 𝑒D,*, 𝑒D,", … , 𝑒D,I } 𝑆DJ: set of ranked retrieval results from the top until

reaching 𝑒D,J

35

𝑁𝐵𝑄 𝑅 = 1 𝑅 M 1 𝑛D M Precision(𝑆JD)

WX 3)* Y D)*

slide-36
SLIDE 36

MAP

36

} Now perhaps most commonly used measure in research

papers

} Good for web search?

} MAP assumes user is interested in finding many relevant docs

for each query

} MAP requires many relevance judgments in text collection

slide-37
SLIDE 37

37

What if the results are not in a list?

} Suppose there’s only one Relevant Document } Scenarios:

} known-item search } navigational queries } looking for a fact

} Search duration ~ Rank of the answer

} measures a user’s effort

slide-38
SLIDE 38

Mean Reciprocal Rank

38

} Consider rank position, K, of first relevant doc

} Could be – only clicked doc

} Reciprocal Rank score =

* I

} MRR is the mean RR across multiple queries } 𝑅: set of information needs

} 𝑠𝑏𝑜𝑙D: Rank position of the first relevant doc for 𝑟D ∈ 𝑅

𝑁𝑆𝑆 𝑅 = 1 𝑅 M 1 𝑠𝑏𝑜𝑙D

Y D)*

slide-39
SLIDE 39

Beyond binary relevance

39 fair fair Good

slide-40
SLIDE 40

Discounted Cumulative Gain

} Popular measure for evaluating web search and related

tasks

} Two assumptions:

} Highly relevant docs are more useful } The lower ranked position of a relevant doc, the

less useful it is for the user

40

slide-41
SLIDE 41

Discounted Cumulative Gain

} Uses graded relevance as a measure of usefulness

} More than two levels (i.e. relevant and non-relevant)

} Gain is accumulated starting at the top of the ranking and

may be reduced, or discounted, at lower ranks

} Typical discount is 1/log (rank)

} With base 2, the discount at rank 4 is 1/2, and at rank 8 it is 1/3

41

slide-42
SLIDE 42

Summarize a Ranking: DCG

} Cumulative Gain (CG) at rank n

} Let the ratings of the n docs be r1, r2, …rn (in ranked order) } CG = r1+r2+…rn

} Discounted Cumulative Gain (DCG) at rank n

} DCG = r1 + r2/log22 + r3/log23 + … rn/log2n

} We may use any base for the logarithm

42

slide-43
SLIDE 43

Discounted Cumulative Gain

} DCG is the total gain accumulated at a particular rank p: } Alternative formulation:

} used by some web search companies } emphasis on retrieving highly relevant documents

43

slide-44
SLIDE 44

DCG Example

} 10 ranked documents judged on 0-3 relevance scale:

3 2 3 0 1 2

} discounted gain:

3 2/1 3/1.59 1/2.59 2/2.81 = 3 2 1.89 0.39 0.71

} DCG:

3 5 6.89 6.89 6.89 7.28 7.99

44

slide-45
SLIDE 45

45

Summarize a Ranking: NDCG

} NDCG(q,k) is computed over the k top search results (similar

to p@k)

} NDCG normalizes DCG at rank k by the DCG value at rank k

  • f the ideal ranking

} Ideal ranking: first returns docs with the highest relevance level, then the

next highest relevance level, etc

} Normalization useful for contrasting queries with varying

numbers of relevant results

} NDCG is now quite popular in evaluating Web search

slide-46
SLIDE 46

NDCG - Example

i Ground Truth Ranking Function1 Ranking Function2 Document Order ri Document Order ri Document Order ri 1 d4 2 d3 2 d3 2 2 d3 2 d4 2 d2 1 3 d2 1 d2 1 d4 2 4 d1 d1 d1 NDCGGT=1.00 NDCGRF1=1.00 NDCGRF2=0.9203

6309 . 4 4 log 3 log 1 2 log 2 2

2 2 2

= ÷ ÷ ø ö ç ç è æ + + + =

GT

DCG 6309 . 4 4 log 3 log 1 2 log 2 2

2 2 2 1

= ÷ ÷ ø ö ç ç è æ + + + =

RF

DCG 2619 . 4 4 log 3 log 2 2 log 1 2

2 2 2 2

= ÷ ÷ ø ö ç ç è æ + + + =

RF

DCG 6309 . 4 = =

GT

DCG MaxDCG

4

d ,

3

d ,

2

d ,

1

d documents: 4

46

slide-47
SLIDE 47

NDCG: Example

47

} Perfect ranking:

} 3, 3, 3, 2, 2, 2, 1

} ideal DCG values:

} 3, 6, 7.89, 8.89, 9.75, 10.52, 10.88

} Actual DCG: (3 2 3 0

1 2)

} 3, 5, 6.89, 6.89, 6.89, 7.28, 7.99

} NDCG values (divide actual by ideal):

} 1, 0.83, 0.87, 0.76, 0.71, 0.69 } NDCG £ 1 at any rank position

slide-48
SLIDE 48

Human judgments are

} Expensive } Inconsistent

} Between raters } Over time

} Decay in value as documents/query mix evolves } Not always representative of “real users”

} Rating vis-à-vis query, vs underlying need

} So – what alternatives do we have?

48

slide-49
SLIDE 49

Using user Clicks

49

slide-50
SLIDE 50

What do clicks tell us?

50

# of clicks received

Strong position bias, so absolute click rates unreliable

Adapted from: CIKM'09 Tutorial, Hong Kong, China

slide-51
SLIDE 51

Applications of click models

} Optimizing the retrieval function

} Adapt ranking to user clicks?

} Online advertising } Search engine evaluation } User behavior analysis

} e.g., navigational and informational queries

51

Adapted from: CIKM'09 Tutorial, Hong Kong, China

slide-52
SLIDE 52

Eye-tracking User Study

52

Adapted from: CIKM'09 Tutorial, Hong Kong, China

slide-53
SLIDE 53

} Higher positions receive more

user attention (eye fixation) and clicks than lower positions.

} This is true even in the extreme

setting where the

  • rder
  • f

positions is reversed.

} “Clicks

are informative but biased”.

53

[Joachims+07]

Click Position-bias

Normal Position Percentage Reversed Impression Percentage

Adapted from: CIKM'09 Tutorial, Hong Kong, China

slide-54
SLIDE 54

Relative vs absolute ratings

54

3 Result > 1 Result Hard to conclude 2 Result > 3 Result Probably can conclude User’s click sequence

Adapted from: CIKM'09 Tutorial, Hong Kong, China

slide-55
SLIDE 55

Clicks as Relative Judgments

} “Clicked > Skipped Above” [Joachims02]

55

¡ Preference pairs:

#5>#2, #5>#3, #5>#4.

¡ Use learning to rank to

  • ptimize the retrieval

function.

1 2 3 4 5 6 7 8

Adapted from: CIKM'09 Tutorial, Hong Kong, China

slide-56
SLIDE 56

Pairwise relative ratings

} Pairs of the form: DocA better than DocB for a query

} Doesn’t mean that DocA relevant to query

} Now, rather than assess a rank-ordering wrt per-doc

relevance assessments

} Assess in terms of conformance with historical pairwise

preferences recorded from user clicks

56

slide-57
SLIDE 57

A/B testing: refining a deployed system

} Purpose:Test a single innovation } Prerequisite:You have a large search engine up and running. } Method: Divert a small proportion of traffic (e.g., 1%) to the

new system that includes the innovation

} So most users use old system

57

  • Sec. 8.6.3
slide-58
SLIDE 58

A/B testing at web search engines

} Have most users use old system } Divert a small proportion of traffic (e.g., 1%) to an

experiment to evaluate an innovation

} Full page experiment } Interleaved experiment

58

  • Sec. 8.6.3
slide-59
SLIDE 59

Comparing two rankings via clicks (Joachims 2002)

59

Kernel machines SVM-light Lucent SVM demo Royal Holl. SVM SVM software SVM tutorial Kernel machines SVMs Intro to SVMs Archives of SVM SVM-light SVM software

Query: [support vector machines] Ranking A Ranking B

slide-60
SLIDE 60

Interleave the two rankings

60

Kernel machines SVM-light Lucent SVM demo Royal Holl. SVM Kernel machines SVMs Intro to SVMs Archives of SVM SVM-light

This interleaving starts with B …

slide-61
SLIDE 61

Remove duplicate results

61

Kernel machines SVM-light Lucent SVM demo Royal Holl. SVM Kernel machines SVMs Intro to SVMs Archives of SVM SVM-light

slide-62
SLIDE 62

Count user clicks

62

Kernel machines SVM-light Lucent SVM demo Royal Holl. SVM Kernel machines SVMs Intro to SVMs Archives of SVM SVM-light

… Clicks Ranking A: 3 Ranking B: 1 A, B A A

slide-63
SLIDE 63

Interleaved ranking

} Present interleaved ranking to users

} Start randomly with ranking A or ranking B to evens out

presentation bias

} Count clicks on results from A versus results from B } Better ranking will (on average) get more clicks

63

slide-64
SLIDE 64

Facts/entities (what happens to clicks?)

64

slide-65
SLIDE 65

Summary: User behavior

} User behavior is an intriguing source of relevance data

} Users make (somewhat) informed choices when they interact

with search engines

} Potentially a lot of data available in search logs

} But there are significant caveats

} User behavior data can be very noisy } Interpreting user behavior can be tricky } Spam can be a significant problem } Not all queries will have user behavior

slide-66
SLIDE 66

Summary

} Benchmarks consist of

} Document collection } Query set } Assessment methodology

} Assessment methodology can use raters, user clicks, or a

combination

} These

get quantized into a goodness measure – Precision/NDCG etc.

} Different

engines/algorithms compared

  • n

a benchmark together with a goodness measure

66

slide-67
SLIDE 67

Other factors than relevance

67

slide-68
SLIDE 68

68

Result summery or snippet

} Having ranked docs matching a query, we wish to present

a results list that is informative to the user

} Usually, a list of doc titles plus a short summary (snippet)

} Snippet: a short summary of the document that is

designed so as to allow the user to decide its relevance

  • Sec. 8.7

68

slide-69
SLIDE 69

69

Result summery or snippet

} Title is often automatically extracted from doc metadata.

} Or field and zone

} What about summaries?

} This description is crucial. } User can identify good/relevant hits based on description.

} Two basic kinds:

} Static } Dynamic

  • Sec. 8.7
slide-70
SLIDE 70

Summaries

} Static summary of a doc is always the same, regardless

  • f the query that hit the doc

} Dynamic summary is a query-dependent attempt to

explain why doc was retrieved for query at hand

70

slide-71
SLIDE 71

71

Static summaries

} In typical systems, static summary is a subset of doc.

} Simplest heuristic: e.g., title & the first 50 words of the doc

} Summary cached at indexing time

} More sophisticated: extract from each doc a set of “key”

sentences

} Simple NLP heuristics to score each sentence and summary is made

up of top-scoring sentences.

} Most sophisticated: NLP used to synthesize a summary

} Seldom used in IR; cf. text summarization work

  • Sec. 8.7
slide-72
SLIDE 72

72

Dynamic summaries

} Present one or more “windows” within the doc that contain

several of the query terms

} “KWIC” snippets: Keyword in Context

} Requires a high disk space to save docs or at-least their prefixes

} However, they can greatly improve the usability of IR systems.

  • Sec. 8.7
slide-73
SLIDE 73

Techniques for dynamic summaries

} Find small windows in doc that contain query terms

} Requires fast window lookup in a doc cache

} Score each window wrt query

} Use various features such as window width, position, etc. } Combine features through a scoring function

} Challenges in evaluation: judging summaries

} Pairwise comparisons rather than binary relevance assessments

73

  • Sec. 8.7
slide-74
SLIDE 74

Quicklinks

} Example navigational query: united airlines

} user’s need likely satisfied on www.united.com } Quicklinks provide navigational cues on that home page

74

slide-75
SLIDE 75

Alternative results presentations?

75

slide-76
SLIDE 76

76

Resources for this lecture

} IIR 8 } MIR Chapter 3 } MG 4.5 } Carbonell and Goldstein 1998. The use of MMR, diversity-

based reranking for reordering documents and producing

  • summaries. SIGIR 21.