Applying Hash-based Indexing in Text-based Information Retrieval - - PowerPoint PPT Presentation

applying hash based indexing in text based information
SMART_READER_LITE
LIVE PREVIEW

Applying Hash-based Indexing in Text-based Information Retrieval - - PowerPoint PPT Presentation

Applying Hash-based Indexing in Text-based Information Retrieval Benno Stein and Martin Potthast Bauhaus University Weimar Web-Technology and Information Systems Introduction Hash-based Indexing Methods Comparative Study DIR07 Mar.


slide-1
SLIDE 1

Introduction Hash-based Indexing Methods Comparative Study Σ

Applying Hash-based Indexing in Text-based Information Retrieval

Benno Stein and Martin Potthast Bauhaus University Weimar Web-Technology and Information Systems

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-2
SLIDE 2

Introduction Hash-based Indexing Methods Comparative Study Σ

Text-based Information Retrieval (TIR)

Motivation Consider a set of documents D. Term query—given a set of query terms: Find all documents D′ ⊂ D containing the query terms. ➜ Implemented by well-known web search engines. ➜ Best practice: Index D using an inverted file.

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-3
SLIDE 3

Introduction Hash-based Indexing Methods Comparative Study Σ

Text-based Information Retrieval (TIR)

Motivation Consider a set of documents D. Document query—given a document d: Find all documents D′ ⊂ D with a high similarity to d. ➜ Use cases: plagiarism analysis, query by example ➜ Naive approach: Compare d with each d′ ∈ D. In detail: Construct document models for D and d obtaining D and d. Employ a similarity function ϕ : D × D → [0, 1]. Is it possible to be faster than the naive approach?

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-4
SLIDE 4

Introduction Hash-based Indexing Methods Comparative Study Σ

Background

Nearest Neighbour Search Given a set D of m-dimensional points and a point d: Find the point d′∈ D which is nearest to d. Finding d′ cannot be done better than in O(|D|) time if m exceeds 10.

[Weber et. al. 1998]

In our case: 1.000 ≪ m < 1.000.000

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-5
SLIDE 5

Introduction Hash-based Indexing Methods Comparative Study Σ

Background

Approximate Nearest Neighbour Search Given a set D of m-dimensional points and a point d: Find some points D′⊂ D from a certain ε-neighbourhood of d.

ε-neighbourhood

Finding D′ can be done in O(1) time with high probabilty by means

  • f hashing.

[Indyk and Motwani 1998]

The dimensionality m does not affect the runtime of their algorithm.

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-6
SLIDE 6

Introduction Hash-based Indexing Methods Comparative Study Σ

Text-based Information Retrieval (TIR)

Nearest Neighbour Search

Index-based retrieval Grouping Classification Similarity search Categorization Near-duplicate detection Partial document similarity Complete document similarity Retrieval tasks Use cases focused search, efficient search (cluster hypothesis) preparation of search results plagiarism analysis query by example directory maintenance

Approximate retrieval results are often acceptable.

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-7
SLIDE 7

Introduction Hash-based Indexing Methods Comparative Study Σ

Similarity Hashing

Introduction With standard hash functions collisions occur accidentally. In similarity hashing collisions shall occur purposefully where the purpose is “high similarity”. Given a similarity function ϕ a hash function hϕ : D → U with U ⊂ N resembles ϕ if it has the following property

[Stein 2005]:

hϕ(d) = hϕ(d′) ⇒ ϕ(d, d′) ≥ 1 − ε with d, d′ ∈ D, 0 < ε ≪ 1

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-8
SLIDE 8

Introduction Hash-based Indexing Methods Comparative Study Σ

Similarity Hashing

Index Construction Given a similarity hash function hϕ a hash index µh : D → D width D = P(D) is constructed using

❑ a hash table T ❑ a standard hash function h : U → {1, . . . , |T |}

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-9
SLIDE 9

Introduction Hash-based Indexing Methods Comparative Study Σ

Similarity Hashing

Index Construction Given a similarity hash function hϕ a hash index µh : D → D width D = P(D) is constructed using

❑ a hash table T ❑ a standard hash function h : U → {1, . . . , |T |}

To index a set of documents D given their models D,

❑ compute for each d ∈ D its hash value hϕ(d) ❑ store a reference to d in T at storage position h(hϕ(d))

To search for documents similar to d given its model d,

❑ return the bucket in T at storage position h(hϕ(d))

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-10
SLIDE 10

Introduction Hash-based Indexing Methods Comparative Study Σ

Similarity Hash Functions

Fuzzy-Fingerprinting (FF)

[Stein 2005]

A priori probabilities of prefix classes in BNC Distribution of prefix classes in sample ➜ ➜ Normalization and difference computation Fuzzification

{213235632, 157234594}

Fingerprint ➜ ➜

All words having the same prefix belong to the same prefix class.

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-11
SLIDE 11

Introduction Hash-based Indexing Methods Comparative Study Σ

Similarity Hash Functions

Locality-Sensitive Hashing (LSH)

[Indyk and Motwani 1998, Datar et. al. 2004]

Vector space with sample document and random vectors Real number line

d a1 ak a2

➜ ai . d

T

Dot product computation ➜ ➜

{213235632}

Fingerprint

The results of the k dot products are summed.

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-12
SLIDE 12

Introduction Hash-based Indexing Methods Comparative Study Σ

Similarity Hash Functions

Adjusting Recall and Precision Recall:

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-13
SLIDE 13

Introduction Hash-based Indexing Methods Comparative Study Σ

Similarity Hash Functions

Adjusting Recall and Precision Recall:

hϕ h'

ϕ

(FF) # fuzzy schemes. (LSH) # random vector sets. A set of hash values per document is called fingerprint.

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-14
SLIDE 14

Introduction Hash-based Indexing Methods Comparative Study Σ

Similarity Hash Functions

Adjusting Recall and Precision Recall:

hϕ h'

ϕ

(FF) # fuzzy schemes. (LSH) # random vector sets. A set of hash values per document is called fingerprint. Precision: (FF) # prefix classes or # intervals per fuzzy scheme. (LSH) # random vectors.

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-15
SLIDE 15

Introduction Hash-based Indexing Methods Comparative Study Σ

Experimental Setting

Three test collections for three retrieval situations

  • 1. Web results: 100.000 documents from a focused search.

➜ Documents as Web retrieval systems return them.

  • 2. Plagiarism corpus: 3.000 documents with high similarity.

➜ Documents as they appear in plagiarism analysis.

  • 3. Wikipedia Revision corpus: 6m documents, 80m revisions.

➜ Documents as they appear in social software, plagiarism analysis, and the Web.

❑ first revision of each document used as query document d ❑ comparison with each of d’s revisions ❑ comparison with d’s immediate succeeding document

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-16
SLIDE 16

Introduction Hash-based Indexing Methods Comparative Study Σ

Experimental Setting

  • y

y z z { { | |

  • y

y z z { { | |

  • yy

yy yy zz zz zz {{ {{ {{ || || ||

  • y

y z z { { | |

  • y

y z z { { | |

  • y

y z z { { | |

  • y

z { |

  • y

z { |

  • yyy

zzz {{{ |||

  • yy

zz {{ ||

  • yy

zz {{ ||

Wikipedia Web results

  • yy

zz {{ ||

0.2 0.4 0.6 0.8 1

Similarity Intervals

0.0001 0.001 0.01 0.1 1

Percentage of Similarities

Precision and Recall were recorded for similarity thresholds ranging from 0 to 1.

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-17
SLIDE 17

Introduction Hash-based Indexing Methods Comparative Study Σ

Results

  • 0.2

0.4 0.6 0.8

  • 1
  • 0.2

0.4 0.6 0.8

  • 1

Recall Similarity

Wikipedia Revision Corpus FF LSH

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-18
SLIDE 18

Introduction Hash-based Indexing Methods Comparative Study Σ

Results 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1

Precision Similarity

Wikipedia Revision Corpus FF LSH

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-19
SLIDE 19

Introduction Hash-based Indexing Methods Comparative Study Σ

Results

Web results

  • 0.2

0.4 0.6 0.8

  • 1
  • 0.2

0.4 0.6 0.8

  • 1

Recall Similarity

LSH FF

  • 0.2

0.4 0.6 0.8

  • 1

LSH FF

Plagiarism corpus

  • Web results
  • 0.2

0.4 0.6 0.8

  • 1
  • 0.2

0.4 0.6 0.8

  • 1

Precision Similarity

LSH FF

  • 0.2

0.4 0.6 0.8

  • 1

LSH FF

Plagiarism corpus

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-20
SLIDE 20

Introduction Hash-based Indexing Methods Comparative Study Σ

Summary

Similarity hashing may contribute to various retrieval tasks Comparison of similarity hash functions:

❑ FF outperforms LSH in terms of Precision and Recall. ❑ FF constructs significantly smaller fingerprints.

Conclusions: ➜ Both hash-based indexing methods are applicable to TIR. ➜ The incorporation of domain knowledge significantly increases retrieval performance. None of the hash-based indexing methods is limited to TIR. The only prerequisite is a reasonable vector representation.

DIR’07 Mar. 29th, 2007 Stein/Potthast

slide-21
SLIDE 21

Introduction Hash-based Indexing Methods Comparative Study Σ

Thank you!

DIR’07 Mar. 29th, 2007 Stein/Potthast