Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social...

32
Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017.

Transcript of Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social...

Page 1: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

SpectralGraphTheory

SocialandTechnologicalNetworks

RikSarkar

UniversityofEdinburgh,2017.

Page 2: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Project

•  Proposalfeedbacktoday/tomorrow– Pleasesharewithyourteammates!

•  ProjectguidelinesandIpsareuponthewebpage

Page 3: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Project-teams

•  Brainstorminteams.Submityourownproject•  Theteamistohelpyouthinkabouttheproject,discussspecificissues

•  Treatyourteammate’sprojectasanyotherbookorpaper–youcanreference/useit,butcannotclaimcredit!

•  Youarefreetodiscusswithanybody.Givecreditforsignificantideas.

Page 4: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Project--wriIng

•  Donotkeepitfortheend!•  Asyougo,putinplots,pictures,diagramsinthedocument.Youcanchange/removethemlater

•  Putinsmallparagraphs,descripIonsastheyoccurtoyou–youwillnotrememberthisonthelastday.

•  Rememberthethoughts,discussions,problems,ideasasyougoalong.ThiswillhelpyoutowriteaninteresIngreport.

Page 5: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Project--wriIng

•  Donotkeepitfortheend!•  Asyougo,putinplots,pictures,diagramsinthedocument.Youcanchange/removethemlater

•  Putinsmallparagraphs,descripIonsastheyoccurtoyou–youwillnotrememberthisonthelastday.

•  Rememberthethoughts,discussions,problems,ideasasyougoalong.ThiswillhelpyoutowriteaninteresIngreport.

Page 6: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Topics

•  Aretheretopicsyouwouldlikedisucssedinclass?LetmeknowonPiazza

Page 7: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Spectralmethods

•  Understandingagraphusingeigenvaluesandeigenvectorsofthematrix

•  Wesaw:•  Ranksofwebpages:componentsof1steigenvectorofsuitablematrix

•  PagerankorHITSarealgorithmsdesignedtocomputetheeigenvector

•  Today:otherwaysspectralmethodshelpinnetworkanalysis

Page 8: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Laplacian

•  L=D–A[Disthediagonalmatrixofdegrees]

•  Aneigenvectorhasonevalueforeachnode•  WeareinterestedinproperIesofthesevalues

2

664

1 �1 0 0�1 2 �1 00 �1 2 �10 0 �1 1

3

775 =

2

664

1 0 0 00 2 0 00 0 2 00 0 0 1

3

775�

2

664

0 1 0 01 0 1 00 1 0 10 0 1 0

3

775

Page 9: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Laplacian

•  L=D–A[Disthediagonalmatrixofdegrees]

•  Symmetric.RealEigenvalues.•  Rowsum=0.Singularmatrix.Atleastoneeigenvalue=0.

•  PosiIvesemidefinite.Non-negaIveeigenvalues

2

664

1 �1 0 0�1 2 �1 00 �1 2 �10 0 �1 1

3

775 =

2

664

1 0 0 00 2 0 00 0 2 00 0 0 1

3

775�

2

664

0 1 0 01 0 1 00 1 0 10 0 1 0

3

775

Page 10: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

ApplicaIon1:Drawingagraph(Embedding)

•  Problem:Computerdoesnotknowwhatagraphissupposedtolooklike

•  Agraphisajumbleofedges

•  Consideragridgraph:•  Wewantitdrawnnicely

Page 11: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Graphembedding•  FindposiIonsforverIcesofagraphinlowdimension(comparedton)

•  CommonobjecIve:PreservesomeproperIesofthegraphe.g.approximatedistancesbetweenverIces.Createametric– UsefulinvisualizaIon–  Findingapproximatedistances–  Clustering

•  Usingeigenvectors– Oneeigenvectorgivesxvaluesofnodes– Othergivesy-valuesofnodes…etc

Page 12: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Drawwithv[1]andv[2]

•  Supposev[0],v[1],v[2]…areeigenvectors– Sortedbyincreasingeigenvalues

•  PlotgraphusingX=v[1],Y=v[2]

•  Producesthegrid

Page 13: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

IntuiIons:the1-Dcase

•  Supposewetakethejtheigenvectorofachain

•  Whatwouldthatlooklike?•  Wearegoingtoplotthechainalongx-axis•  Theyaxiswillhavethevalueofthenodeinthejtheigenvector

•  Wewanttoseehowtheseriseandfall

Page 14: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

ObservaIons•  j=0

•  j=1

•  j=2

•  j=3

•  j=19

Page 15: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

ForAllj

Page 16: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

ObservaIons

•  InDim1grid:–  v[1]ismonotone–  v[2]isnotmonotone

•  Indim2grid:–  bothv[1]andv[2]aremonotoneinsuitabledirecIons

•  Forlowvaluesofj:– Nearbynodeshavesimilarvalues•  Usefulforembedding

Page 17: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

ApplicaIon2:Colouring•  Colouring:AssigncolourstoverIces,suchthatneighboringverIcesdonothavesamecolour–  E.g.Assignmentofradiochannelstowirelessnodes.Goodcolouringreducesinterference

•  Idea:Higheigenvectorsgivedissimilarvaluestonearbynodes

•  Useforcolouring!

Page 18: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

ApplicaIon3:Cuts/segmentaIon/clustering

•  Findthesmallest‘cut’•  Asmallsetofedgeswhoseremovaldisconnectsthegraph

•  Clustering,communitydetecIon…

Page 19: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Clustering/communitydetecIon

•  v[1]tendstostretchthenarrowconnecIons:discriminatesdifferentcommuniIes

Page 20: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Clustering:communitydetecIon

•  MorecommuniIes•  Spectralembeddingneedshigherdimensions

•  Warning:itdoesnotalwaysworksocleanly

•  Inthiscase,thedataisverysymmetric

Page 21: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

ImagesegmentaIonShi&malik’00

Page 22: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Laplacianmatrix

•  ImagineasmallanddifferentquanItyofheatateachnode(say,inametalmesh)

•  wewriteafuncIonu:u(i)=heatati•  Thisheatwillspreadthroughthemesh/graph•  QuesIon:howmuchheatwilleachnodehavealerasmallamountofIme?

•  “heat”canberepresentaIveoftheprobabilityofarandomwalkbeingthere

Page 23: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Heatdiffusion

•  Supposenodesiandjareneighbors– Howmuchheatwillflowfromitoj?

Page 24: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Heatdiffusion

•  Supposenodesiandjareneighbors•  Howmuchheatwillflowfromitoj?•  ProporIonaltothegradient:– u(i)-u(j)–  thisissigned:negaIvemeansheatflowsintoi

Page 25: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Heatdiffusion

•  Ifihasneighborsj1,j2….•  Thenheatflowingoutofiis:

=u(i)-u(j1)+u(i)-u(j2)+u(i)-u(j3)+…=degree(i)*u(i)-u(j1)-u(j2)-u(j3)-….

•  HenceL=D-A

Page 26: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

TheheatequaIon

•  ThenetheatflowoutofnodesinaImestep•  ThechangeinheatdistribuIoninasmallImestep– TherateofchangeofheatdistribuIon

@u

@t= L(u)

Page 27: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

ThesmoothheatequaIon

•  ThesmoothLaplacian:

•  ThesmoothheatequaIon:

�f =@f

@t

Page 28: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Heatflow

•  Willeventuallyconvergetov[0]:thezerotheigenvector,witheigenvalue

•  v[0]isaconstant:nomoreflow!

�0 = 0

v[0]=const

Page 29: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Laplacian•  ChangedimpliedbyLonanyinputvectorcanberepresentedbysumofacIonofitseigenvectors(wesawthislastImeforMMT)

•  v[0]istheslowestcomponentofthechange– WithmulIplierλ0=0

•  v[1]isslowestnon-zerocomponent– withmulIplierλ1

Page 30: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Spectralgap•  λ1–λ0

•  Determinestheoverallspeedofchange•  Iftheslowestcomponentv[1]changesfast–  Thenoverallthevaluesmustbechangingfast–  Fastdiffusion

•  Iftheslowestcomponentisslow–  Convergencewillbeslow

•  Examples:–  Expandershavelargespectralgaps–  Gridsanddumbbellshavesmallgaps~1/n

Page 31: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

ApplicaIon4:isomorphismtesIng

•  Eigenvaluesdifferentimpliesgraphsaredifferent

•  Thoughnotnecessarilytheotherway

Page 32: Spectral Graph Theory - The University of Edinburgh · 2017-10-31 · Spectral Graph Theory Social and Technological Networks Rik Sarkar University of Edinburgh, 2017. Project •

Spectralmethods•  Wideapplicabilityinsideandoutsidenetworks•  Relatedtomanyfundamentalconcepts

–  PCA–  SVD

•  Randomwalks,diffusion,heatequaIon…•  ResultsaregoodmanyImes,butnotalways•  RelaIvelytoproveproperIes•  Inefficient:eig.computaIoncostlyonlargematrix•  (Somewhat)efficientmethodsexistformorerestricted

problems–  e.g.whenwewantonlyafewsmallest/largesteigenvectors