Presentation is loading. Please wait.

Presentation is loading. Please wait.

Query Operations. Query Models n IR Systems usually adopt index terms to process queries; n Index term: u A keyword or a group of selected words; u Any.

Similar presentations


Presentation on theme: "Query Operations. Query Models n IR Systems usually adopt index terms to process queries; n Index term: u A keyword or a group of selected words; u Any."— Presentation transcript:

1 Query Operations

2 Query Models n IR Systems usually adopt index terms to process queries; n Index term: u A keyword or a group of selected words; u Any word (more general); n Stemming may be used: u connect: connecting, connection, connections n An inverted file is built for the selected index terms.

3 Queries Docs Information Need Index Terms doc query Ranking match

4 Boolean queries n Query: terms, AND, OR, NOT, (, ); n Result: documents that “satisfy” the query; n Implementation by inverted lists (secondary index); n Use of special data structures: B-trees, trie tables; digital trees("trie"); hashing; Pat-trees...

5 Boolean queries: problems u It is difficult to elaborate the query; u The match must be exact; u A mismatch between the term and the concept can occur; u It is not adapted to browsing.

6 Boolean queries: extensions n Information about term positions: - Adjacent to; - In the same sentence; - ex: informatics in the same sentence of knowledge; - In the same paragraph; - In a window of n words...

7 Boolean queries: extensions n Implementation: - To analyze the entire text; - To create an inverted list relating positions and terms; - ex: for each term #paragraph, #sentence, #term (Stairs da IBM). n Increases precision.

8 Boolean queries: extensions n Term weighting : increases precision. n Synonymy: increases recall. n Stemming: increases recall.

9 Queries Direct Matching with index terms is very imprecise; Users frequently are frustrated; Most of the users don`t have query elaboration abilities; Relevance decision is a critic point in IR systems, specially the order in which the documents are shown.

10 Queries The ranking of selected documents must indicate relevance, according to the user query; A ranking is based on fundamental premises, such as: common sets of index terms; weighted terms sharing; relevance. Each set of premises indicates a different IR model.

11 Changing the query by feedback

12 Relevance Feedback n After initial retrieval results are presented, allow the user to provide feedback on the relevance of one or more of the retrieved documents; n Use this feedback information to reformulate the query; n Produce new results based on reformulated query; n Allows more interactive, multi-pass process.

13 Relevance Feedback Architecture Rankings IR System Document corpus Ranked Documents 1. Doc1 2. Doc2 3. Doc3. 1. Doc1  2. Doc2  3. Doc3 . Feedback Query String Revise d Query ReRanked Documents 1. Doc2 2. Doc4 3. Doc5. Query Reformulation

14 Query Reformulation n Revise query to account for feedback: u Query Expansion: Add new terms to query from relevant documents. u Term Reweighting: Increase weight of terms in relevant documents and decrease weight of terms in irrelevant documents. n Several algorithms for query reformulation.

15 Query Reformulation for Vector Space Retrieval n Change query vector using vector algebra; n Add the vectors for the relevant documents to the query vector; n Subtract the vectors for the irrelevant docs from the query vector; n This both adds both positive and negatively weighted terms to the query as well as reweighting the initial terms.

16 Optimal Query n Assume that the relevant set of documents C r are known. n Then the best query that ranks all and only the relevant docs. at the top is: Where N is the total number of documents.

17 Standard Rocchio Method n Since all relevant documents unknown, just use the known relevant (D r ) and irrelevant (D n ) sets of documents and include the initial query q.  : Tunable weight for initial query;  : Tunable weight for relevant documents;  : Tunable weight for irrelevant documents.

18 n The Rocchio method automatically: u Recalculate the weights of the terms; u Addition new terms (form the relevant documents); F Careful use of negative terms; F Rocchio`s is not a Machine Learning algorithm; n Most of the methods have similar performance; n Results depend strongly on the collection; n ML methods must present better results then the ones of Rocchio`s. Rocchio method

19 Ide Regular Method n Since more feedback should perhaps increase the degree of reformulation, do not normalize for amount of feedback:  : Tunable weight for initial query;  : Tunable weight for relevant documents;  : Tunable weight for irrelevant documents.

20 Ide “Dec Hi” Method n Bias towards rejecting just the highest ranked of the irrelevant documents:  : Tunable weight for initial query;  : Tunable weight for relevant documents;  : Tunable weight for irrelevant document.

21 Comparison of Methods n Overall, experimental results indicate no clear preference for any one of the specific methods; n All methods generally improve retrieval performance (recall & precision) with feedback; n Generally just let tunable constants equal 1.

22 Evaluating Relevance Feedback n By construction, reformulated query will rank explicitly-marked relevant documents higher and explicitly-marked irrelevant documents lower. n Method should not get credit for improvement on these documents, since it was told their relevance. n In machine learning, this error is called “testing on the training data”. n Evaluation should focus on generalizing to other un-rated documents.

23 Fair Evaluation of Relevance Feedback n Remove from the corpus any documents for which feedback was provided. n Measure recall/precision performance on the remaining residual collection. n Compared to complete corpus, specific recall/precision numbers may decrease since relevant documents were removed. n However, relative performance on the residual collection provides fair data on the effectiveness of relevance feedback.

24 Retrieval Information 0.5 1.0 0 0.51.0 D1D1 D2D2 Q0Q0 Q’ Q” Q 0 = retrieval of information = (0.7,0.3) D 1 = information science = (0.2,0.8) D 2 = retrieval systems = (0.9,0.1) Q’ = ½*Q 0 + ½ * D 1 = (0.45,0.55) Q” = ½*Q 0 + ½ * D 2 = (0.80,0.20) Rocchio method

25 Relevant docs. Non-rel. docs. Original query Constants Rocchio computation New query Rocchio method

26 Why is Feedback Not Widely Used n Users sometimes reluctant to provide explicit feedback; n Results in long queries that require more computation to retrieve, and search engines process lots of queries and allow little time for each one; n Makes it harder to understand why a particular document was retrieved.

27 Pseudo Feedback n Use relevance feedback methods without explicit user input. n Just assume the top m retrieved documents are relevant, and use them to reformulate the query. n Allows for query expansion that includes terms that are correlated with the query terms.

28 Pseudo Feedback Architecture Rankings IR System Document corpus Ranked Documents 1. Doc1 2. Doc2 3. Doc3. Query String Revise d Query ReRanked Documents 1. Doc2 2. Doc4 3. Doc5. Query Reformulation 1. Doc1  2. Doc2  3. Doc3 . Pseudo Feedback

29 Pseudo-Feedback Results n Found to improve performance on TREC competition ad-hoc retrieval task. n Works even better if top documents must also satisfy additional Boolean constraints in order to be used in feedback.

30 Thesaurus n A thesaurus provides information on synonyms and semantically related words and phrases. n Example: physician syn: ||croaker, doc, doctor, MD, medical, mediciner, medico, ||sawbones rel: medic, general practitioner, surgeon,…

31 Thesaurus-based Query Expansion n For each term, t, in a query, expand the query with synonyms and related words of t from the thesaurus. n May weight added terms less than original query terms. n Generally increases recall. n May significantly decrease precision, particularly with ambiguous terms. u “interest rate”  “interest rate fascinate evaluate”

32 Three steps:  Query representation as index terms; 2 Based on the similarity thesaurus, compute the similarity sim(q,kv) between each term kv correlated with the query terms; 3 Query expansion using the n better terms, according to the sim(q,kv) ranking. Query expansion with a thesaurus

33 Query expansion – step 1 A vector q is associated to the query Where wi,q is the weight associated to the pair index- query [ki,q]

34 sim(q,kv) computation between each term kv and the user query q : Where Cu,v is the correlation factor. Query expansion – step 2

35 Addition to the original query q of the r better terms according to the ranking sim(q,kv), resulting in the expanded query q’; For each term kv in the expansion query q’ a weight w v,q’ is associated: The expanded query q’ is then used to retrieve new documents for the user. Query expansion – step 3

36  Doc1 = D, D, A, B, C, A, B, C  Doc2 = E, C, E, A, A, D  Doc3 = D, C, B, B, D, A, B, C, A  Doc4 = A  c(A,A) = 10.991  c(A,C) = 10.781  c(A,D) = 10.781 ...  c(D,E) = 10.398  c(B,E) = 10.396  c(E,E) = 10.224 Query expansion - example

37 n Query: q = A E E n sim(q,A) = 24.298 n sim(q,C) = 23.833 n sim(q,D) = 23.833 n sim(q,B) = 23.830 n sim(q,E) = 23.435 n New query: q’ = A C D E E n w(A,q')= 6.88 n w(C,q')= 6.75 n w(D,q')= 6.75 n w(E,q')= 6.64 Query expansion – example

38 WordNet n A more detailed database of semantic relationships between English words; n Developed by famous cognitive psychologist George Miller and a team at Princeton University; n About 144,000 English words; n Nouns, adjectives, verbs, and adverbs grouped into about 109,000 synonym sets called synsets.

39 WordNet Synset Relationships n Antonym: front  back n Attribute: benevolence  good (noun to adjective) n Pertainym: alphabetical  alphabet (adjective to noun) n Similar: unquestioning  absolute n Cause: kill  die n Entailment: breathe  inhale n Holonym: chapter  text (part-of) n Meronym: computer  cpu (whole-of) n Hyponym: tree  plant (specialization) n Hypernym: fruit  apple (generalization)

40 WordNet Query Expansion n Add synonyms in the same synset; n Add hyponyms to add specialized terms; n Add hypernyms to generalize a query; n Add other related terms to expand query.

41 Statistical Thesaurus n Existing human-developed thesauri are not easily available in all languages. n Human thesuari are limited in the type and range of synonymy and semantic relations they represent. n Semantically related terms can be discovered from statistical analysis of corpora.

42 Automatic Global Analysis n Determine term similarity through a pre- computed statistical analysis of the complete corpus. n Compute association matrices which quantify term correlations in terms of how frequently they co-occur. n Expand queries with statistically most similar terms.

43 Association Matrix w 1 w 2 w 3 …………………..w n w1w2w3..wnw1w2w3..wn c 11 c 12 c 13 …………………c 1n c 21 c 31. c n1 c ij : Correlation factor between term i and term j f ik : Frequency of term i in document k

44 Correlation analysis n If terms t 1 and t 2 are independents: n If t 1 and t 2 are correlated: Measure of the correlation degree

45 Normalized Association Matrix n Frequency based correlation factor favors more frequent terms. n Normalize association scores: n Normalized score is 1 if two terms have the same frequency in all documents.

46 Metric Correlation Matrix n Association correlation does not account for the proximity of terms in documents, just co- occurrence frequencies within documents. n Metric correlations account for term proximity. V i : Set of all occurrences of term i in any document. r(k u,k v ): Distance in words between word occurrences k u and k v (  if k u and k v are occurrences in different documents).

47 Normalized Metric Correlation Matrix n Normalize scores to account for term frequencies:

48 Query Expansion with Correlation Matrix n For each term i in query, expand query with the n terms, j, with the highest value of c ij (s ij ). n This adds semantically related terms in the “neighborhood” of the query terms.

49 Example d 1 d 2 d 3 d 4 d 5 d 6 d 7 K 1 2 1 0 2 1 1 0 K 2 0 0 1 0 2 2 5 K 3 1 0 3 0 4 0 0 11 4 6 4 34 11 6 11 26 1.0 0.097 0.193 0.097 1.0 0.224 0.193 0.224 1.0 Correlation Matrix Normalized Correlation Matrix 1 th Assoc cluster for K 2 is K 3

50 Example Normalized correlation matrix A K1 USER(43): (neighborhood normatrix) 0: (COSINE-METRIC (1.0 0.09756097 0.19354838) (1.0 0.09756097 0.19354838)) 0: returned 1.0 0: (COSINE-METRIC (1.0 0.09756097 0.19354838) (0.09756097 1.0 0.2244898)) 0: returned 0.22647195 0: (COSINE-METRIC (1.0 0.09756097 0.19354838) (0.19354838 0.2244898 1.0)) 0: returned 0.38323623 0: (COSINE-METRIC (0.09756097 1.0 0.2244898) (1.0 0.09756097 0.19354838)) 0: returned 0.22647195 0: (COSINE-METRIC (0.09756097 1.0 0.2244898) (0.09756097 1.0 0.2244898)) 0: returned 1.0 0: (COSINE-METRIC (0.09756097 1.0 0.2244898) (0.19354838 0.2244898 1.0)) 0: returned 0.43570948 0: (COSINE-METRIC (0.19354838 0.2244898 1.0) (1.0 0.09756097 0.19354838)) 0: returned 0.38323623 0: (COSINE-METRIC (0.19354838 0.2244898 1.0) (0.09756097 1.0 0.2244898)) 0: returned 0.43570948 0: (COSINE-METRIC (0.19354838 0.2244898 1.0) (0.19354838 0.2244898 1.0)) 0: returned 1.0 1.0 0.226 0.383 0.226 1.0 0.435 0.383 0.435 1.0 Scalar cluster matrix The 1 th cluster for K 2 is K 3

51 Problems with Global Analysis n Term ambiguity may introduce irrelevant statistically correlated terms. u “Apple computer”  “Apple red fruit computer” n Since terms are highly correlated anyway, expansion may not retrieve many additional documents.

52 Automatic Local Analysis n At query time, dynamically determine similar terms based on analysis of top-ranked retrieved documents. n Base correlation analysis on only the “local” set of retrieved documents for a specific query. n Avoids ambiguity by determining similar (correlated) terms only within relevant documents. u “Apple computer”  “Apple computer Powerbook laptop”

53 Global vs. Local Analysis n Global analysis requires intensive term correlation computation only once at system development time. n Local analysis requires intensive term correlation computation for every query at run time (although number of terms and documents is less than in global analysis). n But local analysis gives better results.

54 Global Analysis Refinements n Only expand query with terms that are similar to all terms in the query. u “fruit” not added to “Apple computer” since it is far from “computer.” u “fruit” added to “apple pie” since “fruit” close to both “apple” and “pie.” n Use more sophisticated term weights (instead of just frequency) when computing term correlations.

55 Query Expansion Conclusions n Expansion of queries with related terms can improve performance, particularly recall. n However, must select similar terms very carefully to avoid problems, such as loss of precision.


Download ppt "Query Operations. Query Models n IR Systems usually adopt index terms to process queries; n Index term: u A keyword or a group of selected words; u Any."

Similar presentations


Ads by Google