Professional Documents
Culture Documents
Paid
Search Ads
Algorithmic results.
Slides by Manning, Raghavan, Schutze 4
Introduction to Information Retrieval Sec. 19.4.1
CG Appliance Express
Discount Appliances (650) 756-3931
User
Same Day Certified Installation
www.cgappliance.com
San Francisco-Oakland-San Jose,
CA
Search
Indexer
The Web
Indexes
Slides by Manning, Raghavan, Schutze Ad indexes
5
Introduction to Information Retrieval Sec. 19.4.1
User Needs
Need [Brod02, RL04]
Informational – want to learn about something (~40% / 65%)
Low hemoglobin
Navigational – want to go to that page (~25% / 15%)
United Airlines
Transactional – want to do something (web‐mediated) (~35% / 20%)
Access a service Seattle weather
Downloads Mars surface images
Shop Canon S410
Gray areas
Find a good hub Car rental Brasil
Exploratory search “see what’s there”
SPAM
(SEARCH ENGINE OPTIMIZATION)
Motives
Commercial, political, religious, lobbies
Promotion funded by advertising budget
Operators
Contractors (Search Engine Optimizers) for lobbies, companies
Web masters
Hosting services
Forums
E.g., Web master world ( www.webmasterworld.com )
Search engine specific tricks
Discussions about academic papers
Simplest forms
First generation engines relied heavily on tf/idf
The top‐ranked pages for the query maui resort were the
ones containing the most maui’s and resort’s
SEOs responded with dense repetitions of chosen terms
e.g., maui resort maui resort maui resort
Often, the repetitions would be in the same color as the
background of the web page
Repeated terms got indexed by crawlers
But not visible to humans on browsers
Meta-Tags =
“… London hotels, hotel, holiday inn, hilton, discount,
booking, reservation, sex, mp3, britney spears, viagra, …”
Cloaking
Serve fake content to search engine spider
DNS cloaking: Switch IP address. Impersonate
SPAM
N
Is this a Search
Engine spider?
Y Real
Cloaking Doc
More on spam
Web search engines have policies on SEO practices
they tolerate/block
http://help.yahoo.com/help/us/ysearch/index.html
http://www.google.com/intl/en/webmasters/
Adversarial IR: the unending (technical) battle
between SEO’s and web search engines
Research http://airweb.cse.lehigh.edu/
New definition?
The statically indexable web is whatever search
engines index.
IQ is whatever the IQ tests measure.
Different engines have different preferences
max url depth, max count/host, anti‐spam rules, priority
rules, etc.
Different engines index different things under the
same URL:
frames, meta‐keywords, document restrictions, document
extensions, ...
(1/2)*Size A = (1/6)*Size B
Size A / Size B =
(1/6)/(1/2) = 1/3
Sampling URLs
Ideal strategy: Generate a random URL and check for
containment in each index.
Problem: Random URLs are hard to find! Enough to
generate a random URL contained in a given Engine.
Approach 1: Generate a random URL contained in a
given engine
Suffices for the estimation of relative size
Approach 2: Random walks / IP addresses
In theory: might give us a true estimate of the size of the web (as
opposed to just relative sizes of indexes)
Statistical methods
Approach 1
Random queries
Random searches
Approach 2
Random IP addresses
Random walks
Random searches
Choose random searches extracted from a local log
[Lawrence & Giles 97] or build “random searches”
[Notess]
Use only queries with small result sets.
Count normalized URLs in result sets.
Use ratio statistics
Random searches
575 & 1050 queries from the NEC RI employee logs
6 Engines in 1998, 11 in 1999
Implementation:
Restricted to queries with < 600 results in total
Counted URLs from each engine after verifying query
match
Computed size ratio & overlap for individual queries
Estimated index size ratio & overlap by averaging over all
queries
Random IP addresses
Generate random IP addresses
Find a web server at the given address
If there’s one
Collect all pages from server
From this, choose a page at random
Random IP addresses
Random walks
View the Web as a directed graph
Build a random walk on this graph
Includes various “jump” rules back to visited sites
Does not get stuck in spider traps!
Can follow all links!
Converges to a stationary distribution
Must assume graph is finite and independent of the walk.
Conditions are not satisfied (cookie crumbs, flooding)
Time to convergence not really known
Sample from stationary distribution of walk
Use the “strong query” method to check coverage by SE
Conclusions
No sampling solution is perfect.
Lots of new ideas ...
....but the problem is getting harder
Quantitative studies are fascinating and a good
research problem
DUPLICATE DETECTION
Duplicate documents
The web is full of duplicated content
Strict duplicate detection = exact match
Not as common
But many, many cases of near duplicates
E.g., last‐modified date the only difference
between two copies of a page
Duplicate/Near‐Duplicate Detection
Computing Similarity
Features:
Segments of a document (natural or artificial breakpoints)
Shingles (Word N‐Grams)
a rose is a rose is a rose →
a_rose_is_a
rose_is_a_rose
is_a_rose_is
a_rose_is_a
Similarity Measure between two docs (= sets of shingles)
Jaccard coefficient: Size_of_Intersection / Size_of_Union
Sketch of a document
Create a “sketch vector” (of size ~200) for each
document
Documents that share ≥ t (say 80%) corresponding
vector elements are near duplicates
For doc D, sketchD[ i ] is as follows:
Let f map all shingles in the universe to 0..2m‐1 (e.g., f =
fingerprinting)
Let i be a random permutation on 0..2m‐1
Pick MIN {i(f(s))} over all shingles s in D
Document 1 Document 2
264 264
264 264
264 264
A B
264 264
However…
Document 1 Document 2
264 264
264 264
A 264 B 264
264 264
0 1
1 0
1 1 Jaccard(C1,C2) = 2/5 = 0.4
0 0
1 1
0 by Manning,
Slides 1 Raghavan, Schutze 49
Introduction to Information Retrieval Sec. 19.6
Key Observation
For columns Ci, Cj, four types of rows
Ci Cj
A 1 1
B 1 0
C 0 1
D 0 0
Overload notation: A = # of rows of type A
Claim
A
Jaccard(C i , C j )
ABC
Slides by Manning, Raghavan, Schutze 50
Introduction to Information Retrieval Sec. 19.6
“Min” Hashing
Randomly permute rows
Hash h(Ci) = index of first row with 1 in column
Ci
Surprising Property
P h(C i ) h(C j ) Jaccard C i ,C j
Why?
Both are A/(A+B+C)
Look down columns Ci, Cj until first non-Type-D row
h(Ci) = h(Cj) type A row
Min‐Hash sketches
Pick P random row permutations
MinHash sketch
SketchD = list of P indexes of first rows with 1 in column C
Similarity of signatures
Let sim[sketch(Ci),sketch(Cj)] = fraction of permutations
where MinHash values agree
Observe E[sim(sketch(Ci),sketch(Cj))] = Jaccard(Ci,Cj)
Example
Signatures
S1 S2 S3
Perm 1 = (12345) 1 2 1
C1 C2 C3 Perm 2 = (54321) 4 5 4
R1 1 0 1 Perm 3 = (34512) 3 5 4
R2 0 1 1
R3 1 0 0
R4 1 0 1 Similarities
R5 0 1 0 1-2 1-3 2-3
Col-Col 0.00 0.50 0.25
Sig-Sig 0.00 0.67 0.00
CRAWLING
Crawling picture
URLs crawled
and parsed
Unseen Web
URLs crawled
and parsed
Unseen Web
Seed
Pages
URL frontier
Crawling thread Slides by Manning, Raghavan, Schutze 62
Introduction to Information Retrieval Sec. 20.2
URL frontier
Can include multiple pages from the same
host
Must avoid trying to fetch them all at the
same time
Must try to keep all crawling threads busy
Robots.txt
Protocol for giving spiders (“robots”) limited
access to a website, originally from 1994
www.robotstxt.org/wc/norobots.html
Website announces its request on what can(not)
be crawled
For a server, create a file /robots.txt
This file specifies access restrictions
Robots.txt example
No robot should visit any URL starting with
"/yoursite/temp/", except the robot called
“searchengine":
User-agent: *
Disallow: /yoursite/temp/
User-agent: searchengine
Disallow:
WWW
Parse
Fetch Dup
Content URL
seen?
URL
filter
elim
URL Frontier
Slides by Manning, Raghavan, Schutze 68
Introduction to Information Retrieval Sec. 20.2.2
Content seen?
Duplication is widespread on the web
If the page just fetched is already in
the index, do not further process it
This is verified using document
fingerprints or shingles
DNS To
Doc robots other URL
FP’s filters nodes set
WWW
Parse Host
Fetch splitter Dup
Content URL
seen?
URL
filter
elim
From
other
URL Frontier
Slides by Manning, Raghavan, Schutze
nodes 75
Introduction to Information Retrieval Sec. 20.2.3
Politeness – challenges
Even if we restrict only one thread to fetch
from a host, can hit it repeatedly
Common heuristic: insert time gap between
successive requests to a host that is >> time
for most recent fetch from that host
Prioritizer
K front queues
Front queues
Prioritizer
1 K
Front queues
Prioritizer assigns to URL an integer priority
between 1 and K
Appends URL to corresponding queue
Heuristics for assigning priority
Refresh rate sampled from previous crawls
Application‐specific (e.g., “crawl news sites more
often”)
Back queues
Biased front queue selector
Back queue router
1 B
Resources
IIR Chapter 19
IIR Chapter 20
Mercator: A scalable, extensible web crawler (Heydon et al.
1999)
A standard for robot exclusion