Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.



Published on

  • Be the first to comment

  • Be the first to like this


  1. 1. Web Search
  2. 2. Crawling <ul><li>Start from some root site e.g., Yahoo directories. </li></ul><ul><li>Traverse the HREF links. </li></ul><ul><li>Consequence: </li></ul><ul><ul><li>If there isn’t an HREF path from some Yahoo like directory, then your page probably isn’t indexed by any search engine. </li></ul></ul>
  3. 3. Information Retrieval (IR) <ul><li>Conceptually, IR is the study of finding needed information. </li></ul><ul><ul><li>IR helps users find information that matches their information needs expressed as queries </li></ul></ul><ul><li>Historically, IR is about document retrieval, emphasizing document as the basic unit. </li></ul><ul><ul><li>Finding documents relevant to user queries </li></ul></ul><ul><li>Web search also has its root in IR. </li></ul>From: Bing Liu. Web Data Mining. 2007
  4. 4. IR architecture From: Bing Liu. Web Data Mining. 2007
  5. 5. IR queries <ul><li>Keyword queries </li></ul><ul><li>Boolean queries (using AND, OR, NOT) </li></ul><ul><li>Phrase queries </li></ul><ul><li>Proximity queries </li></ul><ul><li>Full document queries </li></ul><ul><li>Natural language questions </li></ul>From: Bing Liu. Web Data Mining. 2007
  6. 6. Information retrieval models <ul><li>An IR model governs how a document and a query are represented and how the relevance of a document to a user query is defined. </li></ul><ul><li>Main models: </li></ul><ul><ul><li>Boolean model </li></ul></ul><ul><ul><li>Vector space model </li></ul></ul><ul><ul><li>Statistical language model </li></ul></ul><ul><ul><li>etc </li></ul></ul>From: Bing Liu. Web Data Mining. 2007
  7. 7. Boolean model <ul><li>Each document or query is treated as a “bag” of words or terms . Word sequence is not considered. </li></ul><ul><li>Given a collection of documents D , let V = { t 1 , t 2 , ..., t | V | } be the set of distinctive words/terms in the collection. V is called the vocabulary . </li></ul><ul><li>A weight w ij > 0 is associated with each term t i of a document d j in D . </li></ul><ul><li> d j = ( w 1 j , w 2 j , ..., w | V | j ) </li></ul><ul><li>For a term that does not appear in document d j , w ij = 0. </li></ul>From: Bing Liu. Web Data Mining. 2007
  8. 8. Boolean model (cont’d) <ul><li>Query terms are combined logically using the Boolean operators AND , OR , and NOT. </li></ul><ul><ul><li>E.g., (( data AND mining ) AND (NOT text )) </li></ul></ul><ul><li>Retrieval </li></ul><ul><ul><li>Given a Boolean query, the system retrieves every document that makes the query logically true. </li></ul></ul><ul><ul><li>Called exact match . </li></ul></ul><ul><li>The retrieval results are usually quite poor because term frequency is not considered. </li></ul>From: Bing Liu. Web Data Mining. 2007
  9. 9. Vector space model <ul><li>Documents are also treated as a “bag” of words or terms. </li></ul><ul><li>Each document is represented as a vector. </li></ul><ul><li>However, the term weights are no longer 0 or 1. Each term weight is computed based on some variations of TF or TF-IDF scheme. </li></ul><ul><li>Term Frequency (TF) Scheme: The weight of a term t i in document d j is the number of times that t i appears in d j , denoted by f ij . Normalization may also be applied. </li></ul><ul><li>Shortcoming of the TF scheme is that it doesn’t consider the situation where a term appears in many documents of the collection. </li></ul><ul><ul><li>Such a term may not be discriminative. </li></ul></ul>From: Bing Liu. Web Data Mining. 2007
  10. 10. TF-IDF term weighting scheme <ul><li>The most well known weighting scheme </li></ul><ul><ul><li>TF: (normalized) term frequency </li></ul></ul><ul><ul><li>IDF: inverse document frequency . </li></ul></ul><ul><ul><li>N : total number of docs </li></ul></ul><ul><ul><li>df i : the number of docs that t i appears. </li></ul></ul><ul><li>The final TF-IDF term weight is: </li></ul>From: Bing Liu. Web Data Mining. 2007
  11. 11. Retrieval in vector space model <ul><li>Query q is represented in the same way as a document. </li></ul><ul><li>The term w i q of each term t i in q can also computed in the same way as in normal document. </li></ul><ul><li>Relevance of d j to q : Compare the similarity of query q and document d j . </li></ul><ul><li>For this, use cosine similarity (the cosine of the angle between the two vectors) </li></ul>From: Bing Liu. Web Data Mining. 2007
  12. 12. An Example <ul><li>Suppose a document space is defined by three terms (words): </li></ul><ul><ul><li>hardware, software, users </li></ul></ul><ul><ul><li>the vocabulary </li></ul></ul><ul><li>A set of documents are defined as: </li></ul><ul><ul><li>A1=(1, 0, 0), A2=(0, 1, 0), A3=(0, 0, 1) </li></ul></ul><ul><ul><li>A4=(1, 1, 0), A5=(1, 0, 1), A6=(0, 1, 1) </li></ul></ul><ul><ul><li>A7=(1, 1, 1) A8=(1, 0, 1). A9=(0, 1, 1) </li></ul></ul><ul><li>If the Query is “hardware and software” </li></ul><ul><li>what documents should be retrieved? </li></ul>From: Bing Liu. Web Data Mining. 2007
  13. 13. An Example (cont.) <ul><li>In Boolean query matching: </li></ul><ul><ul><li>document A4, A7 will be retrieved (“AND”) </li></ul></ul><ul><ul><li>retrieved: A1, A2, A4, A5, A6, A7, A8, A9 (“OR”) </li></ul></ul><ul><li>In similarity matching (cosine): </li></ul><ul><ul><li>q=(1, 1, 0) </li></ul></ul><ul><ul><li>S(q, A1)=0.71, S(q, A2)=0.71, S(q, A3)=0 </li></ul></ul><ul><ul><li>S(q, A4)=1, S(q, A5)=0.5, S(q, A6)=0.5 </li></ul></ul><ul><ul><li>S(q, A7)=0.82, S(q, A8)=0.5, S(q, A9)=0.5 </li></ul></ul><ul><ul><li>Document retrieved set (with ranking)= </li></ul></ul><ul><ul><ul><li>{A4, A7, A1, A2, A5, A6, A8, A9} </li></ul></ul></ul>From: Bing Liu. Web Data Mining. 2007
  14. 14. Text pre-processing <ul><li>Word (term) extraction: easy </li></ul><ul><li>Stopwords removal </li></ul><ul><li>Stemming </li></ul><ul><li>Frequency counts and computing TF-IDF term weights. </li></ul>From: Bing Liu. Web Data Mining. 2007
  15. 15. Stopwords removal <ul><li>Some of the most frequently used words aren’t useful in IR and text mining – these words are called stop words . </li></ul><ul><ul><li>the , of , and , to , …. </li></ul></ul><ul><ul><li>Typically about 400 to 500 such words </li></ul></ul><ul><ul><li>For an application, an additional domain specific stopwords list may be constructed </li></ul></ul><ul><li>Why do we need to remove stopwords? </li></ul><ul><ul><li>Reduce indexing (or data) file size </li></ul></ul><ul><ul><ul><li>stopwords accounts 20-30% of total word counts. </li></ul></ul></ul><ul><ul><li>Improve efficiency and effectiveness </li></ul></ul><ul><ul><ul><li>stopwords are not useful for searching or text mining </li></ul></ul></ul><ul><ul><ul><li>they may also confuse the retrieval system. </li></ul></ul></ul>From: Bing Liu. Web Data Mining. 2007
  16. 16. Stemming <ul><li>Techniques used to find out the root/stem of a word. E.g., </li></ul><ul><ul><ul><ul><li>user engineering </li></ul></ul></ul></ul><ul><ul><ul><ul><li>users engineered </li></ul></ul></ul></ul><ul><ul><ul><ul><li>used engineer </li></ul></ul></ul></ul><ul><ul><ul><ul><li>using </li></ul></ul></ul></ul><ul><li>stem: use engineer </li></ul><ul><li>Usefulness: </li></ul><ul><li>improving effectiveness of IR and text mining </li></ul><ul><ul><li>matching similar words </li></ul></ul><ul><ul><li>Mainly improve recall </li></ul></ul><ul><li>reducing indexing size </li></ul><ul><ul><li>combing words with same roots may reduce indexing size as much as 40-50%. </li></ul></ul>From: Bing Liu. Web Data Mining. 2007
  17. 17. Basic stemming methods <ul><li>Using a set of rules. E.g., </li></ul><ul><li>remove ending </li></ul><ul><ul><li>if a word ends with a consonant other than s , </li></ul></ul><ul><ul><li>followed by an s , then delete s . </li></ul></ul><ul><ul><li>if a word ends in es , drop the s . </li></ul></ul><ul><ul><li>if a word ends in ing , delete the ing unless the remaining word consists only of one letter or of th . </li></ul></ul><ul><ul><li>If a word ends with ed , preceded by a consonant, delete the ed unless this leaves only a single letter. </li></ul></ul><ul><ul><li>… ... </li></ul></ul><ul><li>transform words </li></ul><ul><ul><li>if a word ends with “ ies ” but not “ eies ” or “ aies ” then “ ies --> y .” </li></ul></ul>From: Bing Liu. Web Data Mining. 2007
  18. 18. Precision and Recall <ul><li>In information retrieval (search engines) community, system evaluation revolves around the notion of relevant and not relevant documents. </li></ul><ul><li>Precision is the fraction of retrieved documents that are relevant </li></ul>Recall is the fraction of relevant documents that are retrieved
  19. 19. In terms of confusion matrix…
  20. 20. Why having two numbers? <ul><li>The advantage of having the two numbers for precision and recall is that one is more important than the other in many circumstances. </li></ul><ul><li>Typical web surfers : </li></ul><ul><ul><li>would like every result on the first page to be relevant (high precision), but have not the slightest interest in knowing let alone looking at every document that is relevant. </li></ul></ul><ul><li>Professional searchers such as paralegals and intelligence analysts: </li></ul><ul><ul><li>are very concerned with trying to get as high recall as possible, and will tolerate fairly low precision results in order to get it. </li></ul></ul>
  21. 21. What about a single number? <ul><li>The combined measure which is standardly used is called the F measure , which is the weighted harmonic mean of precision and recall: </li></ul>where <ul><li>The default is to equally weight precision and recall, giving a balanced F measure. </li></ul><ul><ul><li>This corresponds to making  = 1/2 or  =1. </li></ul></ul><ul><ul><li>Commonly written as F 1 , which is short for F  =1 </li></ul></ul>
  22. 22. Precision at k <ul><li>The above measures precision at all recall levels. </li></ul><ul><li>What matters is rather how many good results there are on the first page or the first three pages. </li></ul><ul><li>This leads to measures of precision at fixed low levels of retrieved results, such as 10 or 30 documents. </li></ul><ul><li>This is referred to as “ Precision at k ”, for example “ Precision at 10 .” </li></ul>
  23. 23. Web Search as a huge IR system <ul><li>A Web crawler (robot) crawls the Web to collect all the pages. </li></ul><ul><li>Servers establish a huge inverted indexing database and other indexing databases </li></ul><ul><li>At query (search) time, search engines conduct different types of vector query matching. </li></ul><ul><ul><li>There is an Information Retrieval score coming out of this. </li></ul></ul><ul><li>The documents have HREF links as well. They are used to compute a reputation score . </li></ul><ul><li>The two scores are combined together in order to produce a ranking of the returned documents. </li></ul>
  24. 24. Inverted Indexes <ul><li>The idea behind an inverted index is simple: </li></ul><ul><li>Start with a set of documents containing words, and you want to &quot; invert &quot; that, to create a bunch of words each of which lists all the documents that contain that word. </li></ul><ul><li>Usually used with “buckets.” </li></ul>
  25. 25. Additional Information in Buckets <ul><li>We can extend bucket to include role, position of word, e.g. Type Position </li></ul>
  26. 26. Google Page Ranking <ul><li>“ The Anatomy of a Large-Scale Hypertextual Web Search Engine” </li></ul><ul><li>by </li></ul><ul><li>Sergey Brin and Lawrence Page </li></ul><ul><li> </li></ul>
  27. 27. Outline <ul><li>Page rank , for discovering the most “important” pages on the Web, as used in Google. </li></ul><ul><li>Hubs and authorities , a more detailed evaluation of the importance of Web pages using a variant of the eigenvector calculation used for Page rank. </li></ul>
  28. 28. Page Rank (PR) <ul><li>Intuitively, we solve the recursive definition of “importance”: </li></ul><ul><li>A page is important if important pages link to it. </li></ul><ul><li>Page rank is the estimated page importance. </li></ul><ul><li>In short PageRank is a “vote”, by all the other pages on the Web, about how important a page is. </li></ul><ul><ul><li>A link to a page counts as a vote of support. </li></ul></ul><ul><ul><li>If there’s no link there’s no support (but it’s an abstention from voting rather than a vote against the page). </li></ul></ul>
  29. 29. Page Rank Formula <ul><li>PR(A) = PR(T 1 )/C(T 1 ) +…+ PR(T n )/C(T n ) </li></ul><ul><li>PR(T n ) - Each page has a notion of its own self-importance, which is say 1 initially. </li></ul><ul><li>C(T n ) – Count of outgoing links from page T n . </li></ul><ul><ul><li>Each page spreads its vote out evenly amongst all of it’s outgoing links. </li></ul></ul><ul><li>PR(T n )/C(T n ) – </li></ul><ul><ul><li>Each page spreads its vote out evenly amongst all of it’s outgoing links. </li></ul></ul><ul><ul><li>So if our page (say page A) has a back link from page “ n ” the share of the vote page A will get from page “ n ” is “ PR(T n )/C(T n ). ” </li></ul></ul>
  30. 30. How is Page Rank Calculated? <ul><li>This is where it gets tricky. The page rank ( PR ) of each page depends on the PR of the pages pointing to it . </li></ul><ul><ul><li>But we won’t know what PR those pages have until the pages pointing to them have their PR calculated and so on… </li></ul></ul><ul><ul><li>And when you consider that page links can form circles it seems impossible to do this calculation! </li></ul></ul><ul><li>But actually it’s not that bad. Google paper says: </li></ul><ul><ul><li>PageRank or PR(A) can be calculated using a simple iterative algorithm , and corresponds to the principal eigenvector of the link matrix of the web. </li></ul></ul><ul><li>Just go ahead and calculate a page’s PR without knowing the final value of the PR of the other pages. </li></ul><ul><ul><li>Each time we run the calculation we’re getting a closer estimate of the final value. </li></ul></ul><ul><ul><li>Repeat the calculations lots of times until the numbers stop changing much. </li></ul></ul>
  31. 31. Web Matrix <ul><li>Capture the formula by the web matrix WebM , that is: </li></ul><ul><li>Each page i corresponds to row i and column i of the matrix. </li></ul><ul><li>If page j has n successors (links), then: </li></ul><ul><ul><li>the ij th entry is 1/n if page i is one of these n successors of page j , and </li></ul></ul><ul><ul><li>0 otherwise. </li></ul></ul><ul><li>Then, the importance vector containing the rank of each page is calculated by: </li></ul><ul><li>Rank new = WebM • Rank old </li></ul>
  32. 32. Example <ul><li>In 1839, the Web consisted on only three pages: Netscape , Microsoft , and Amazon . </li></ul>For example, the first column of the Web matrix reflects the fact that Netscape divides its importance between itself and Amazon. The second column indicates that Microsoft gives all its importance to Amazon. Start with n = m = a = 1 , then do rounds of improvements. Based on Jeff Ullman’s notes
  33. 33. Example <ul><li>The first four iterations give the following estimates: </li></ul>n = 1 m = 1 a = 1 1 1/2 3/2 5/4 3/4 1 9/8 1/2 11/8 5/4 11/16 17/16 <ul><li>In the limit, the solution is n = a = 6/5; m = 3/5. </li></ul><ul><li>That is, Netscape and Amazon each have the same importance, and twice the importance of Microsoft (well this was 1839). </li></ul>Based on Jeff Ullman’s notes
  34. 34. Problems With Real Web Graphs <ul><li>Dead ends : a page that has no successors has nowhere to send its importance. </li></ul><ul><li>Eventually, all importance will “leak out of” the Web. </li></ul><ul><li>Example : Suppose Microsoft tries to claim that it is a monopoly by removing all links from its site. </li></ul><ul><li>The new Web, and the rank vectors for the first 4 iterations are shown. </li></ul>n = 1 1 3/4 5/8 1/2 m = 1 1/2 1/4 1/4 3/16 a = 1 1/2 1/2 3/8 5/16 Eventually, each of n , m , and a become 0 ; i.e., all the importance leaked out. Based on Jeff Ullman’s notes
  35. 35. Problems With Real Web Graphs <ul><li>Spider traps : a group of one or more pages that have no links out of the group will eventually accumulate all the importance of the Web. </li></ul><ul><li>Example : Angered by the decision, Microsoft decides it will link only to itself from now on. Now, Microsoft has become a spider trap. </li></ul><ul><li>The new Web, and the rank vectors for the first 4 iterations are shown. </li></ul>n = 1 1 3/4 5/8 1/2 m = 1 3/2 7/4 2 35/16 a = 1 1/2 1/2 3/8 5/16 Now, m converges to 3 , and n = a = 0 . Based on Jeff Ullman’s notes
  36. 36. Google Solution to Dead Ends and Spider Traps <ul><li>Stop the other pages having too much influence. </li></ul><ul><li>This total vote is “damped down” by multiplying it by a factor. </li></ul><ul><li>Example : If we use a 20% damp-down, the equation of previous example becomes: </li></ul>The solution to this equation is n = 7/11 ; m = 21/11 ; a = 5/11 . Based on Jeff Ullman’s notes
  37. 37. Hubs and Authorities <ul><li>Intuitively, we define “hub” and “authority” in a mutually recursive way: </li></ul><ul><ul><li>a hub links to many authorities, and </li></ul></ul><ul><ul><li>an authority is linked to by many hubs. </li></ul></ul><ul><li>Authorities turn out to be pages that offer information about a topic, e.g., </li></ul><ul><li>Hubs are pages that don't provide the information, but tell you where to find the information, e.g., </li></ul>
  38. 38. Matrix formulation <ul><li>Use a matrix formulation similar to that of PageRank, but without the stochastic restriction. </li></ul><ul><ul><li>We count each link as 1 , regardless of how many successors or predecessors a page has. </li></ul></ul><ul><li>Namely, define a matrix A whose rows and columns correspond to Web pages, with entry A ij = 1 if page i links to page j , and 0 if not. </li></ul><ul><ul><li>Notice that A T , the transpose of A , looks like the matrix used for computing Page rank, but A T has 1 's where the Page-rank matrix has fractions. </li></ul></ul>
  39. 39. Authority and Hubbiness Vectors <ul><li>Let a and h be vectors, whose i th component corresponds to the degrees of authority and hubbiness of the i th page. </li></ul><ul><li>Let  and  be suitable scaling factors. </li></ul><ul><li>Then we can state: </li></ul><ul><li>h =  A a </li></ul><ul><ul><li>That is, the hubbiness of each page is the sum of the authorities of all the pages it links to, scaled by  . </li></ul></ul><ul><li>a =  A T h </li></ul><ul><ul><li>That is, the authority of each page is the sum of the hubbiness of all the pages that link to it, scaled by  . </li></ul></ul>Based on Jeff Ullman’s notes
  40. 40. Simple substitutions <ul><li>We can derive from (1) and (2), using simple substitution, two equations that relate vectors a and h only to themselves. </li></ul><ul><li>a =   A T A a </li></ul><ul><li>h =   A A T h </li></ul><ul><li>As a result, we can compute h and a by relaxation, giving us the principal eigenvectors of the matrices AA T and A T A , respectively. </li></ul>Based on Jeff Ullman’s notes
  41. 41. Example If we use  =  = 1 and assume that the vectors h = [h n , h m , h a ] = [1, 1, 1], and a = [a n , a m , a a ] = [1, 1, 1], the first three iterations of the equations for a and h are: Based on Jeff Ullman’s notes
  42. 42. Web Spam: raison d’etre <ul><li>E-commerce is rapidly growing </li></ul><ul><ul><li>Projected to $329 billion by 2010 </li></ul></ul><ul><li>More traffic  more money </li></ul><ul><li>Large fraction of traffic from Search Engines </li></ul><ul><li>Increase Search Engine referrals: </li></ul><ul><ul><li>Place ads  </li></ul></ul><ul><ul><li>Provide genuinely better content  </li></ul></ul><ul><ul><li>Create Web spam …  </li></ul></ul>From: Ntoulas, Najork, Manasse, Fetterly. Detecting Spam Web Pages through Content Analysis. 2006
  43. 43. Web Spam (you know it when you see it)
  44. 44. Defining Web Spam <ul><li>Spam Web page: A page created for the sole purpose of attracting search engine referrals (to this page or some other “target” page) </li></ul><ul><li>Ultimately a judgment call </li></ul><ul><ul><li>Some web pages are borderline cases </li></ul></ul>From: Ntoulas, Najork, Manasse, Fetterly. Detecting Spam Web Pages through Content Analysis. 2006
  45. 45. Why Web Spam is Bad <ul><li>Bad for users </li></ul><ul><ul><li>Makes it harder to satisfy information need </li></ul></ul><ul><ul><li>Leads to frustrating search experience </li></ul></ul><ul><li>Bad for search engines </li></ul><ul><ul><li>Wastes bandwidth, CPU cycles, storage space </li></ul></ul><ul><ul><li>Pollutes corpus (infinite number of spam pages!) </li></ul></ul><ul><ul><li>Distorts ranking of results </li></ul></ul>From: Ntoulas, Najork, Manasse, Fetterly. Detecting Spam Web Pages through Content Analysis. 2006
  46. 46. How pervasive is Web Spam? <ul><li>Real-Web data from the MSNBot crawler </li></ul><ul><ul><li>Collected during August 2004 </li></ul></ul><ul><li>Processed only MIME types </li></ul><ul><ul><li>text/html </li></ul></ul><ul><ul><li>text/plain </li></ul></ul><ul><li>105 , 484 , 446 Web pages in total </li></ul>From: Ntoulas, Najork, Manasse, Fetterly. Detecting Spam Web Pages through Content Analysis. 2006
  47. 47. Spam per Top-level Domain 95% confidence From: Ntoulas, Najork, Manasse, Fetterly. Detecting Spam Web Pages through Content Analysis. 2006
  48. 48. Spam per Language 95% confidence From: Ntoulas, Najork, Manasse, Fetterly. Detecting Spam Web Pages through Content Analysis. 2006
  49. 49. Content Spamming <ul><li>Most search engines use variations of TF-IDF based measures to assess the relevance of a page to a user query. </li></ul><ul><li>Content-based spamming methods tailor the contents of the text fields in HTML pages to make spam pages more relevant to some queries. </li></ul><ul><li>Content spamming can be placed in any text field: </li></ul><ul><ul><li>Title </li></ul></ul><ul><ul><ul><li>Since search engines usually give higher weights to terms in the title of a page due to the importance of the title to a page, it is thus common to spam the title. </li></ul></ul></ul><ul><ul><li>Body </li></ul></ul><ul><ul><li>Anchor Text </li></ul></ul><ul><ul><ul><li>anchor text of a hyperlink is considered very important by search engines. </li></ul></ul></ul><ul><ul><ul><li>It is indexed for the page containing it and also for the page that it points to, so anchor text spam affects the ranking of both pages. </li></ul></ul></ul>
  50. 50. Link Spamming <ul><li>Hyperlinks play an important role in determining the reputation score of a page. Thus spammers also spam on hyperlinks. </li></ul><ul><li>Out-Link Spamming : </li></ul><ul><ul><li>It is quite easy to add out-links in one's pages pointing to some authoritative pages to boost the hub cores of one's pages. </li></ul></ul><ul><ul><ul><li>A page is a hub page if it points to many authoritative (or quality) pages. </li></ul></ul></ul><ul><ul><ul><li>To create massive out-links, spammers may use a technique called directory cloning. </li></ul></ul></ul><ul><ul><ul><ul><li>There are many directories, e.g., Yahoo!, DMOZ Open Directory. Spammers simply replicate a large portion of a directory in the spam page to create a massive out-link structure quickly. </li></ul></ul></ul></ul>
  51. 51. Link Spamming <ul><li>In-Link Spamming : </li></ul><ul><ul><li>harder to achieve because it is not easy to add hyperlinks on the Web pages of others. </li></ul></ul><ul><ul><li>Spammers typically use one or more of the following techniques. </li></ul></ul><ul><ul><ul><li>Creating a honey pot: If a page wants to have a high reputation/quality score, it needs quality pages pointing to it. </li></ul></ul></ul><ul><ul><ul><ul><li>This method tries to create some important pages that contain links to target spam pages. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>For example, the spammer can create a set of pages that contains some very useful information, e.g., glossary of Web mining terms, or Java FAQ and help pages. </li></ul></ul></ul></ul><ul><ul><ul><li>Posting links to the user-generated content (reviews, forum discussions, blogs, etc): </li></ul></ul></ul><ul><ul><ul><ul><li>There are numerous sites on the Web that allow the user to freely post messages, which are called the user-generated content. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Spammers can add links pointing to their pages to the seemly innocent messages that they post. </li></ul></ul></ul></ul><ul><ul><ul><li>Participating in link exchange : </li></ul></ul></ul><ul><ul><ul><ul><li>In this case, many spammers form a group and set up a link exchange scheme so that their sites point to each other in order to promote the pages of all the sites </li></ul></ul></ul></ul>
  52. 52. Hiding Techniques <ul><li>Content Hiding : Spam items are made invisible. One simple method is to make the spam terms the same color as the background color. </li></ul><ul><ul><li>For example, one may use the following for hiding, </li></ul></ul><ul><ul><ul><li><body background = white> </li></ul></ul></ul><ul><ul><ul><li><fontcolor= white>spamitems</font> </li></ul></ul></ul><ul><ul><ul><li>… </li></ul></ul></ul><ul><ul><ul><li></body> </li></ul></ul></ul><ul><li>Cloaking : Spam Web servers return a HTML document to the user and a different document to a Web crawler. </li></ul><ul><ul><li>Spam Web servers can identify Web crawlers in one of the two ways: </li></ul></ul><ul><ul><ul><li>It maintains a list of IP addresses of search engines and identifies search engine crawlers by matching IP addresses. </li></ul></ul></ul><ul><ul><ul><li>It identifies Web browsers based on the user-agent field in the HTTP request message. For instance, the user-agent name of the following </li></ul></ul></ul><ul><ul><ul><li>HTTP request message is the one used by the Microsoft Internet Explorer </li></ul></ul></ul><ul><ul><ul><ul><li>GET/pub/WWWlTheProject.html HTTP/1.1 </li></ul></ul></ul></ul><ul><ul><ul><ul><li> </li></ul></ul></ul></ul><ul><ul><ul><ul><li>User-Agent:Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.1) </li></ul></ul></ul></ul><ul><ul><ul><li>Search engine crawlers usually identify themselves by names distinct from normal Web browsers. </li></ul></ul></ul>
  53. 53. Combating Spam <ul><li>Combating spam can be seen as a classification problem, i.e., predicting whether a page is a spam page or not. </li></ul><ul><ul><li>One can use any classification algorithm to train a spam classifier. </li></ul></ul><ul><li>The key issue is to design features used in learning. </li></ul><ul><ul><li>The following are some example features used in [ Ntoulas, Najork, Manasse, Fetterly, 2006] to detect spam. </li></ul></ul><ul><ul><ul><li>Number of words in the page : A spam page tends to contain more words than a non-spam page so as to cover a large number of popular words. </li></ul></ul></ul><ul><ul><ul><li>Average word length : The mean word length for English prose is about 5 letters. Average word length of synthetic content is often different. </li></ul></ul></ul><ul><ul><ul><li>Number of words in the page title : Since search engines usually give extra weights to terms appearing in page titles, spammers often put many keywords in the titles of the spam pages. </li></ul></ul></ul><ul><ul><ul><li>Fraction of visible content : Spam pages often hide spam terms by making them invisible to the user. </li></ul></ul></ul>