\documentclass[landscape]{slides}
\usepackage{multicol}
\usepackage[all,poly,ps,dvips,color]{xy}
\input{preamble}
  
\input{SLIDES}
 
%\usepackage[dvips]{graphics}
%\usepackage[all,poly,ps,dvips,color]{xy}
%\UseCrayolaColors

%\DeclareMathOperator{\mathin}{in}
%\DeclareMathOperator{\mathout}{out}

\newcommand{\vindex}[2]{\left[ #1 \right] _ #2}
\newcommand{\eigen}{\mathbf a}
\newcommand{\elem}{\mathbf e}
\newcommand{\state}{\mathbf x}
\newcommand{\maxdeg}{\Delta}
\newcommand{\maxdegC}{d_{max}}

\newcommand{\din}{d_{\mathin}}
\newcommand{\dout}{d_{\mathout}}
\newcommand{\dmax}{d_{\max}}


\newcommand{\nlabel}[2]{\ar@{} @(#1,#1) |<<{#2}}
\newcommand{\gnlabel}[2]{[#1(.25)] {#2}}
\newcommand{\node}{{\bullet}}
\newcommand{\bypass}{{\circ}}

\begin{document}

\begin{titlepage}
\title{CS 591, Guest Lecture}

\author {Jared Saia \\
{\red University of New Mexico}}

\date{}
\maketitle

\end{titlepage}


\begin{SLIDE}[Class Outline]

\begin{itemize}
\item The \emph{Abundance Problem}
\item Link Analysis
\item Clever Algorithm
\item Clever Algorithm Analysis
\item Google Algorithm
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[The Two Types of Search Queries]

Two types of search engine queries
\begin{itemize}
\item \emph{Specific Queries}: E.g. ``Does Netscape support the JDK
1.1 codesigning API?''

\item \emph{General Queries}: E.g. ``Find Information about Java''

\end{itemize}

\end{SLIDE}

\begin{SLIDE}[The Abundance Problem]

For General Queries, we have 
\begin{itemize}
\item {\bf The Abundance Problem:  The number of relevant pages is far
too large for a human to digest.}
\end{itemize}

More specifically:

\begin{itemize}
\item There are now hundreds of millions of pages on the web
\item For most search queries, the number of pages that contain the
query words is on the order of thousands
\item A person typically wants to look at less than five pages
\end{itemize}
\end{SLIDE}

\begin{SLIDE}[What we want]
One way to handle the abundance problem:

\begin{itemize}
\item Filter out from the huge set of relevant pages, those few pages
which are most ``authoritative'' or definitive''
\item To do this, we need a notion of what makes a page ``authoritative''
\end{itemize}

\end{SLIDE}


\begin{SLIDE}[An Example Problem]

\begin{itemize}
\item If we search for all pages containing the word ``Microsoft'' we
get back over a million pages.

\item There is nothing about \emph{content} of the page
www.microsoft.com that makes it stand out.

\begin{itemize}
\item This page doesn't use the term ``microsoft'' most frequently.
\item This page doesn't use the term ``microsoft'' most prominently.
\item There is nothing completely unique in the \emph{textual content}
of the page that identifies it as being authoritative.
\end{itemize}

\item What is it that makes the page www.microsoft.com most authoritative?
\end{itemize}
\end{SLIDE}


\begin{SLIDE}[Link Analysis]

\begin{itemize}
\item Link Structure is one external measure of authority of a page
\item If page $x$ links to page $y$, $x$ is conferring authority on
page $y$

\item There are some potential pitfalls here

\begin{itemize}
\item Links don't always confer authority (e.g. they could be for
navigation or to ads) 
\item There is a balance between popularity and relevance
\end{itemize}

\end{itemize}

\end{SLIDE}

\begin{SLIDE}[The Web as a Graph]

\begin{itemize}
\item Let each page in the web, be a node of a graph 
\item Let there be an edge from node $x$ to node $y$ iff there is a
link from page $x$ to page $y$
\item This formulation allows us to bring lots of great tools of
graph theory to bear on the problem of link analysis.
\end{itemize}

\end{SLIDE}

\begin{SLIDE}[Popularity and Relevance]

\begin{itemize}
\item Consider the simple heuristic for returning authoritative pages:
of all pages containing the search term, return those which have the
greatest number of in-links.

\item \emph{This heuristic fails}

\begin{itemize}
\item Many authoritative pages for a search term do not contain that
term.
\item Examples: ``seach engines'', ``automobile manufactures''

\item Many pages which are \emph{not} authoritative for a given term
would be incorrectly identified.

\item Examples: www.yahoo.com and www.microsoft.com would be
considered authoritative for any search term these pages contained.
\end{itemize}

\end{itemize}
\end{SLIDE}

\begin{SLIDE}[The \emph{Clever} Approach]

\begin{itemize}
\item Key observation: Certain pages point mainly to sites that are
authoritative.

\item These pages are called good \emph{Hubs}

\item Examples:
\begin{itemize}
\item www.yahoo.com
\item ``Jared's Big Page Of Links To Cool Sites''
\end{itemize}

\item Question: But then how do we define what makes a page a good Hub?

\end{itemize}

\begin{SLIDE}[The \emph{Clever} Approach]

\begin{itemize}
\item We use a mutually-recursive definition of the notion of
Authoritative and Hub-like
\item Good \emph{Hub} pages point to many good \emph{Authoritative} pages
\item Good \emph{Authoritative} pages are pointed to by many good
\emph{Hub} pages
\end{itemize}
\end{SLIDE}
\end{SLIDE}

\begin{SLIDE}[The Clever Algorithm]
High Level Idea:

\begin{itemize}
\item Clever collects all pages containing the search term, or
pages that are neighbors of pages containing the search term.
\item It then iteratively propogates ``authority'' scores and ``hub'' scores
\begin{itemize}
\item All pages start with equal authority and hub scores.  In each step:

\item The pages with hub weight confer authority weight to the pages
they point to.

\item The pages with authority weight confer hub weight to the pages
\emph{that point to them}
\end{itemize}
\end{itemize}
\end{SLIDE}


\begin{SLIDE}[The Clever Algorithm]

Algorithm CLEVER:\\
Input: Graph $G$ (G has $n$ nodes and adjacency matrix $A$) \\
Constants: $\epsilon > 0$, $t(=10)$

\begin{enumerate}
\item $\vec{w}_h^{0} \leftarrow$ length $n$ all $1$'s vector, $\vec{w}^{0}_a
\leftarrow \vec{0}$, $i\leftarrow0$ \\
\item Repeat
\begin{enumerate}
\item $i \leftarrow i+1$ \\
\item $\vec{w}_{a}^{i} \leftarrow A^T \vec{w}_{h}^{i-1}$, $\vec{w}_{h}^{i} \leftarrow A \vec{w}_{a}^{i-1}$\\
\item $\vec{w}_{h}^{i} \leftarrow \vec{w}_{h}^i/|\vec{w}_{h}^i|$, $\vec{w}_{a}^i \leftarrow \vec{w}_{a}^i/|\vec{w}_a^{i}|$\\
\end{enumerate}

\item Until $|\vec{w}_{h}^{i} - \vec{w}_{h}^{i-1}| \leq \epsilon$ and $|\vec{w}_{a}^{i} - \vec{w}_{a}^{i-1}| \leq \epsilon$\\
\item (Auth. nodes, Hub nodes) $\leftarrow$ top $t$ weight nodes in
$\vec{w}_h^{i}$,$\vec{w}_a^{i}$
\end{enumerate}

\end{SLIDE}



\begin{SLIDE}[What does this algorithm compute?]
\begin{itemize}
\item What exactly does this algorithm compute? 
\item If $E$ is the set of edges in the link graph, it returns the
vectors $w_{a}$ and $w_{h}$ such that $|w_a|=|w_h|=1$ and $\sum_{(s,t) \in E} w_h[s]*w_a[t]$
is maximized
\item This is the same as returning the vectors $w_{a}$ and $w_{h}$
such that $|w_a|=|w_h|=1$ and $w_h^TAw_a$ is maximized.
\end{itemize}
\end{SLIDE}



\begin{SLIDE}[{\large Singular Value Decomposition(SVD)}]

$$
A = 
\overbrace{\left[ \begin{array} {ccc}
	\vline & & \vline \\
	u_1 & \cdots & u_m \\
	\vline & & \vline \\
   \end{array}
\right]}^{U : m \times m}
\overbrace{\left[ \begin{array} {ccc}
	\sigma_1 & & \\
	& \ddots& \\
	& & \sigma_n \\
       \end{array}
\right]}^{D : m \times n}
\overbrace{\left[ \begin{array} {ccc}
	\rule[0.1cm]{0.25cm}{0.025cm} & v_1 & \rule[0.1cm]{0.25cm}{0.025cm} \\
	& \vdots & \\
	\rule[0.1cm]{0.25cm}{0.025cm} & v_n & \rule[0.1cm]{0.25cm}{0.025cm} \\
       \end{array}
\right]}^{V^T : n \times n}
$$

If $A$ is $m \times n$ , $ n \leq m$ with rank $r$ then $A = UDV^T$
where $U$, $V$ orthonormal, $D$ diagonal with $\sigma_1, \ldots
\sigma_r$ positive and nonincreasing and $\sigma_j=0$ $\forall j > r$.

$\{u_i\}$ called left singular vectors, $\{v_i\}$ called right
singular vectors, $\{\sigma_i\}$ called singular values.

SVD is unique up to multiplicities in singular values.

\end{SLIDE}


\begin{SLIDE}[Two Crucial Facts]

Let $u_i$ be the i-th column of $U$ and $U_k$ be the $k \times n$
matrix consisting of the first $k$ columns of $U$.  Then:

\begin{fact}
\label{maxarg singvector}
For any matrix $A$, $max_{|x|=1,|y|=1} x^TAy = \sigma_1(A)$ and \\
$maxarg_{|x|=1,|y|=1} x^TAy = (u_1,v_1)$.
\end{fact}

\begin{fact}
\label{BestApproxNorm}
The matrix $A_k = U_kU_k^TA$ minimizes $|A-B|$ over all matrices $B$ that have
rank $\leq k$.  $|A-A_k| = \sigma_{k+1}(A)$.
\end{fact}

\end{SLIDE}

\begin{SLIDE}[Link Analysis (Kleinberg, 1997 )]

\underline{Input}: Link graph with adjacency matrix $A$($=UDV^T$) for pages relevant to a query.\\
\underline{Output}: Vectors $w_a$, $w_h$ giving ``authority'' and
``hub'' scores for all pages in the query set.  If $E$ is the set of edges
in the link graph, gives $|w_a|=|w_h|=1$ maximizing $\sum_{(s,t) \in E}
w_h[s]*w_a[t]$ (=$w_h^TAw_a$).

\underline{Algorithm}: $w_h \leftarrow u_1$, $w_a \leftarrow v_1$\\
(this is same as limiting vectors of a weight updating algorithm).

\end{SLIDE}


\begin{SLIDE}[Example Weight Assignment]

\begin{tabular}{ccc}

$
\xymatrix{
Link \  Graph\\
a \ar @/^/[d] \\
b \ar @/^/[u] \ar[r] & c \ar[ul]\\
}
$
&
% $
% \xymatrix{
% a \ar[dr] & a' \\
% b \ar[ur] \ar[dr] & b'\\
% c \ar[uur] & c'\\
% }
% $
&
$
\xymatrix{
\underline{hub} & \underline{authority}\\
(0)a \ar[dr] & a' (.89)\\
(.89)b \ar[ur] \ar[dr] & b'(0)\\
(.45)c \ar[uur] & c'(.45)\\
}
$
\end{tabular}
\end{SLIDE}

\begin{SLIDE}[Google]
\begin{itemize}
\item Google does something similar to Clever but somewhat simpler.
\item Google assigns pages ``authorities'' based on the first singular
vector of a different adjacency matrix.
\item This singular vector is related to the stationary probabilities
of a random walk on the web.
\item Google computes the authority scores offline so it is much
faster (but possibly less accurate)
\end{itemize}
\end{SLIDE}




\end{document}
