Top Banner
Multimedia Databases SVD II
45

Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Multimedia Databases

SVD II

Page 2: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case studies Conclusions

Page 3: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

SVD - detailed outline ... Case studies SVD properties more case studies

google/Kleinberg algorithms Conclusions

Page 4: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Optimality of SVD

Def: The Frobenius norm of a n x m matrix M is

(reminder) The rank of a matrix M is the number of independent rows (or columns) of M

Let A=UVT and Ak = Uk k VkT (SVD approximation of

A)

Theorem: [Eckart and Young] Among all n x m matrices C of rank at most k, we have that:

2],[ jiMMF

FFk CAAA

Page 5: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

SVD - Other properties - summary

can produce orthogonal basis can solve over- and under-

determined linear problems (see C(1) property)

can compute ‘fixed points’ (= ‘steady state prob. in Markov chains’) (see C(4) property)

Page 6: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

SVD -outline of properties

(A): obvious (B): less obvious (C): least obvious (and most

powerful!)

Page 7: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Properties - by defn.:

A(0): A[n x m] = U [ n x r ] [ r x r ] VT [ r x m]

A(1): UT [r x n] U [n x r ] = I [r x r ] (identity

matrix)

A(2): VT [r x n] V [n x r ] = I [r x r ]

A(3): k = diag( 1k, 2

k, ... rk ) (k: ANY

real number)

A(4): AT = V UT

Page 8: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Less obvious properties

A(0): A[n x m] = U [ n x r ] [ r x r ] VT [ r x m]

B(1): A [n x m] (AT) [m x n] = ??

Page 9: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Less obvious properties

A(0): A[n x m] = U [ n x r ] [ r x r ] VT [ r x m]

B(1): A [n x m] (AT) [m x n] = U 2 UT

symmetric; Intuition?

Page 10: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Less obvious properties

A(0): A[n x m] = U [ n x r ] [ r x r ] VT [ r x m]

B(1): A [n x m] (AT) [m x n] = U 2 UT

symmetric; Intuition?‘document-to-document’ similarity

matrix

B(2): symmetrically, for ‘V’ (AT) [m x n] A [n x m] = V 2 VT

Intuition?

Page 11: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Less obvious properties

B(3): ( (AT) [m x n] A [n x m] ) k= V 2k VT

and

B(4): (AT A )

k ~ v1 12k v1

T for k>>1

where v1: [m x 1] first column (eigenvector) of V

1: strongest eigenvalue

Page 12: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Less obvious properties

B(4): (AT A )

k ~ v1 12k v1

T for k>>1

B(5): (AT A )

k v’ ~ (constant) v1

ie., for (almost) any v’, it converges to a vector parallel to v1

Thus, useful to compute first eigenvector/value (as well as the next ones…)

Page 13: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Less obvious properties - repeated:

A(0): A[n x m] = U [ n x r ] [ r x r ] VT [ r x m]

B(1): A [n x m] (AT) [m x n] = U 2 UT

B(2): (AT) [m x n] A [n x m] = V 2 VT

B(3): ( (AT) [m x n] A [n x m] ) k= V 2k VT

B(4): (AT A )

k ~ v1 12k v1

T

B(5): (AT A )

k v’ ~ (constant) v1

Page 14: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Least obvious propertiesA(0): A[n x m] = U [ n x r ] [ r x r ] VT [ r x m]

C(1): A [n x m] x [m x 1] = b [n x 1]

let x0 = V (-1) UT b

if under-specified, x0 gives ‘shortest’ solution

if over-specified, it gives the ‘solution’ with the smallest least squares error

Page 15: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Least obvious propertiesIllustration: under-specified, eg [1 2] [w z] T = 4 (ie, 1 w + 2 z = 4)

1 2 3 4

1

2all possible solutionsx0

w

z shortest-length solution

Page 16: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Least obvious properties - cont’d

A(0): A[n x m] = U [ n x r ] [ r x r ] VT [ r x m]

C(2): A [n x m] v1 [m x 1] = 1 u1 [n x 1]

where v1 , u1 the first (column) vectors of V, U. (v1 == right-eigenvector)

C(3): symmetrically: u1T A = 1 v1

T

u1 == left-eigenvector

Therefore:

Page 17: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Least obvious properties - cont’d

A(0): A[n x m] = U [ n x r ] [ r x r ] VT [ r x m]

C(4): AT A v1 = 12 v1

(fixed point - the usual dfn of eigenvector for a symmetric matrix)

Page 18: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Least obvious properties - altogether

A(0): A[n x m] = U [ n x r ] [ r x r ] VT [ r x m]

C(1): A [n x m] x [m x 1] = b [n x 1]

then, x0 = V (-1) UT b: shortest, actual or least-squares solution

C(2): A [n x m] v1 [m x 1] = 1 u1 [n x 1]

C(3): u1T A = 1 v1

T

C(4): AT A v1 = 12 v1

Page 19: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Properties - conclusionsA(0): A[n x m] = U [ n x r ] [ r x r ] VT [ r x m]

B(5): (AT A )

k v’ ~ (constant) v1

C(1): A [n x m] x [m x 1] = b [n x 1]

then, x0 = V (-1) UT b: shortest, actual or least-squares solution

C(4): AT A v1 = 12 v1

Page 20: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

SVD - detailed outline ... Case studies SVD properties more case studies

Kleinberg/google algorithms Conclusions

Page 21: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s Algorithm Main idea: In many cases, when you

search the web using some terms, the most relevant pages may not contain this term (or contain the term only a few times) Harvard : www.harvard.edu Search Engines: yahoo, google, altavista

Authorities and hubs

Page 22: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithm Problem dfn: given the web and a query find the most ‘authoritative’ web pages

for this query

Step 0: find all pages containing the query terms (root set)

Step 1: expand by one move forward and backward (base set)

Page 23: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithm Step 1: expand by one move

forward and backward

Page 24: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithm on the resulting graph, give high

score (= ‘authorities’) to nodes that many important nodes point to

give high importance score (‘hubs’) to nodes that point to good ‘authorities’)

hubs authorities

Page 25: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithm

observations recursive definition! each node (say, ‘i’-th node) has

both an authoritativeness score ai and a hubness score hi

Page 26: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithm

Let E be the set of edges and A be the adjacency matrix: the (i,j) is 1 if the edge from i to j exists

Let h and a be [n x 1] vectors with the ‘hubness’ and ‘authoritativiness’ scores.

Then:

Page 27: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithm

Then:ai = hk + hl + hm

that isai = Sum (hj) over all j

that (j,i) edge existsora = AT h

k

l

m

i

Page 28: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithm

symmetrically, for the ‘hubness’:

hi = an + ap + aq

that ishi = Sum (qj) over all j

that (i,j) edge existsorh = A a

p

n

q

i

Page 29: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithm

In conclusion, we want vectors h and a such that:

h = A aa = AT h

Recall properties:C(2): A [n x m] v1 [m x 1] = 1 u1 [n x 1]

C(3): u1T A = 1 v1

T

Page 30: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithmIn short, the solutions to

h = A aa = AT h

are the left- and right- eigenvectors of the adjacency matrix A.

Starting from random a’ and iterating, we’ll eventually converge

(Q: to which of all the eigenvectors? why?)

Page 31: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithm

(Q: to which of all the eigenvectors? why?)

A: to the ones of the strongest eigenvalue, because of property B(5):B(5): (AT

A ) k v’ ~ (constant) v1

Page 32: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithm - results

Eg., for the query ‘java’:0.328 www.gamelan.com0.251 java.sun.com0.190 www.digitalfocus.com (“the

java developer”)

Page 33: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg’s algorithm - discussion

‘authority’ score can be used to find ‘similar pages’ to page p (how?)

closely related to ‘citation analysis’, social networs / ‘small world’ phenomena

Page 34: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

google/page-rank algorithm

closely related: The Web is a directed graph of connected nodes

imagine a particle randomly moving along the edges (*)

compute its steady-state probabilities. That gives the PageRank of each pages (the importance of this page

(*) with occasional random jumps

Page 35: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

PageRank Definition Assume a page A and pages P1, P2,

…, Pm that point to A. Let d is a damping factor. PR(A) the pagerank of A. C(A) the out-degree of A. Then:

))(

)(...

)2(

)2(

)1(

)1(()1()(

TmC

TmPR

TC

TPR

TC

TPRddAPR

Page 36: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

google/page-rank algorithm Compute the PR of each

page~identical problem: given a Markov Chain, compute the steady state probabilities p1 ... p5

1 2 3

45

Page 37: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Computing PageRank Iterative procedure Also, … navigate the web by

randomly follow links or with prob p jump to a random page. Let A the adjacency matrix (n x n), di out-degree of page i

Prob(Ai->Aj) = pn-1+(1-p)di–1Aij

A’[i,j] = Prob(Ai->Aj)

Page 38: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

google/page-rank algorithm Let A’ be the transition matrix (=

adjacency matrix, row-normalized : sum of each row = 1)

1 2 3

45

1

1/2 1/2

1

1

1/2 1/2

p1

p2

p3

p4

p5

p1

p2

p3

p4

p5

=

Page 39: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

google/page-rank algorithm A p = p

1 2 3

45

1

1/2 1/2

1

1

1/2 1/2

p1

p2

p3

p4

p5

p1

p2

p3

p4

p5

=

A p = p

Page 40: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

google/page-rank algorithm A p = p thus, p is the eigenvector that

corresponds to the highest eigenvalue (=1, since the matrix is row-normalized)

Page 41: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Kleinberg/google - conclusions

SVD helps in graph analysis:hub/authority scores: strongest left-

and right- eigenvectors of the adjacency matrix

random walk on a graph: steady state probabilities are given by the strongest eigenvector of the transition matrix

Page 42: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Conclusions SVD: a valuable tool given a document-term matrix, it

finds ‘concepts’ (LSI) ... and can reduce dimensionality

(KL) ... and can find rules (PCA;

RatioRules)

Page 43: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

Conclusions cont’d ... and can find fixed-points or

steady-state probabilities (google/ Kleinberg/ Markov Chains)

... and can solve optimally over- and under-constraint linear systems (least squares)

Page 44: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

References Brin, S. and L. Page (1998). Anatomy of a

Large-Scale Hypertextual Web Search Engine. 7th Intl World Wide Web Conf.

Chen, C. M. and N. Roussopoulos (May 1994). Adaptive Selectivity Estimation Using Query Feedback. Proc. of the ACM-SIGMOD , Minneapolis, MN.

Page 45: Multimedia Databases SVD II. SVD - Detailed outline Motivation Definition - properties Interpretation Complexity Case studies SVD properties More case.

References cont’d

Kleinberg, J. (1998). Authoritative sources in a hyperlinked environment. Proc. 9th ACM-SIAM Symposium on Discrete Algorithms.

Press, W. H., S. A. Teukolsky, et al. (1992). Numerical Recipes in C, Cambridge University Press.