cs224w: analysis of networks jure leskovec,...

58
CS224W: Analysis of Networks Jure Leskovec, Stanford University http://cs224w.stanford.edu

Upload: others

Post on 28-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

CS224W: Analysis of NetworksJure Leskovec, Stanford University

http://cs224w.stanford.edu

Page 2: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

Korea Rep.

Uruguay

Switz.Liecht

Sri Lanka

GibraltarArmenia

Ireland

Portugal

Nicaragua

Ghana

Morocco

Brazil

Paraguay

El Salvador

Slovenia

Cuba

Bulgaria

Dominican Rp

Barbados

Bermuda

Belarus

Mauritania

Philippines

Korea D P Rp

Burkina Faso

Uzbekistan

Myanmar

Costa Rica

TFYR Macedna Sudan

Senegal

Mongolia

Angola

NigeriaMexico Iran

Iraq

Kuwait

Oman

Saudi Arabia

Untd Arab Em

TurkeyUK

Lithuania

Russian Fed

Libya

Venezuela

Algeria

South Africa

Cote Divoire

USAColombia

Ecuador

Bahamas

Panama

Syria

Denmark

Netherlands

Finland

Norway

Sweden

Egypt

Cameroon

Gabon

Dem.Rp.Congo

Canada

Argentina

Bolivia

Chile

Peru

Guatemala

Trinidad Tbg

Yemen

Afghanistan

Indonesia

Malaysia

Singapore

China

Viet Nam

Estonia

Australia

Papua N.Guin

Kazakhstan

Italy

Spain

Qatar

New Zealand

Pakistan

Tunisia

Georgia

Thailand

Guinea

Liberia

Niger

JapanIndia

Taiwan

Ukraine

Germany

Greece

France,Monac

Austria

IsraelHungary

Benin

Azerbaijan

Belgium-Lux

Malta

Latvia

Jamaica

Poland

Czech Rep

Yugoslavia

Cyprus

Romania

Slovakia

Croatia

Trade in crudepetroleum and petroleum products, 1998, source: NBER-United Nations Trade Data

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 2

Page 3: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

Y

X

Y

X

Y X

Y

X

indegree

In each of the following networks, X has higher centrality than Y according to a particular measure

outdegree betweenness closeness

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 3

Page 4: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Intuition: Howmanypairsofindividualswouldhavetogothroughyouinordertoreachoneanotherintheminimumnumberofhops?

Y X

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 4

Page 5: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

Where 𝜎"#(𝑣) = the number of shortest paths 𝑠 − 𝑡 through node 𝑣

𝜎"# = the number of shortest paths from 𝑠 to 𝑡.

Where 𝜎"#(𝑣) is also called betweenness of a node 𝑣

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 5

Page 6: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Non-normalized version of betweennesscentrality (numbers are centralities):

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 6

Page 7: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Non-normalizedversion:

¡ Aliesbetweennotwoothervertices¡ BliesbetweenAand3othervertices:C,D,andE¡ Cliesbetween4pairsofvertices(A,D),(A,E),(B,D),(B,E)

¡ Notethattherearenoalternatepathsforthesepairstotake,soCgetsfullcredit

A B C ED

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 7

Page 8: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ ClosenessCentrality: Reciprocalofthemeanaverageshortestpathlengthfromnodex toallothernodesinthegraphy.

¡ Farnesscentrality: Avg.shortestpathlengthfromnodextoallothernodes

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 8

(we assume graph is connected)

Page 9: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Betweenness (left),Closeness(right)

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 9

Page 10: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin
Page 11: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Wewilltalkabouthumanbehavioronline

¡ Wewilltrytounderstandhowpeopleexpressopinionsabouteachotheronline§ Wewillusedataandnetworksciencetheorytomodelfactorsaroundhumanevaluations

§ ThiswillbeanexampleofComputationalSocialScienceresearch§ Wearemakingsocialscienceconstructsquantitativeandthenusecomputationtomeasurethem

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 11

Page 12: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 12

Observations

Smalldiameter,Edgeclustering

Patternsofsignededgecreation

ViralMarketing,Blogosphere,Memetracking

Scale-Free

Densificationpowerlaw,Shrinkingdiameters

Strengthofweakties,Core-periphery

Models

Erdös-Renyi model,Small-worldmodel

Structuralbalance,Theoryofstatus

Independentcascademodel,Gametheoreticmodel

Preferentialattachment,Copyingmodel

Microscopicmodelofevolvingnetworks

Kronecker Graphs

Algorithms

Decentralizedsearch

Modelsforpredictingedgesigns

Influencemaximization,Outbreakdetection,LIM

PageRank,Hubsandauthorities

Linkprediction,Supervisedrandomwalks

Communitydetection:Girvan-Newman,Modularity

Page 13: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

Inmanyonlineapplications usersexpresspositiveandnegativeattitudes/opinions:

¡ Throughactions:§ Ratingaproduct/person§ Pressinga“like”button

¡ Throughtext:§ Writingacomment,areview

¡ Successoftheseonlineapplicationsisbuiltonpeopleexpressingopinions§ Recommendersystems§ WisdomoftheCrowds§ Sharingeconomy

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 13

Page 14: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Aboutitems:§ Movieandproductreviews

¡ Aboutotherusers:§ Onlinecommunities

¡ Aboutitemscreatedbyothers:§ Q&Awebsites

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 14

+

++

++

+

––

––

+

+–

+

+

+

Page 15: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Manyonlinesettingswhereonepersonexpressesanopinionaboutanother(oraboutanother’scontent)§ Itrustyou[Kamvar-Schlosser-Garcia-Molina‘03]§ Iagreewithyou[Adamic-Glance’04]§ Ivoteinfavorofadmittingyouintothecommunity[Cosley etal.‘05,Burke-Kraut‘08]

§ Ifindyouranswer/opinionhelpful[Danescu-Niculescu-Mizil etal.‘09,Borgs-Chayes-Kalai-Malekian-Tennenholtz ‘10]

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 15

Page 16: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

Someofthecentralissues:

¡ Factors:Whatfactorsdriveone’sevaluations?

¡ Synthesis:Howdowecreateacompositedescriptionthataccuratelyreflectsaggregateopinionofthecommunity?

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 16

Page 17: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

§ Direct: Usertouser§ Indirect: Usertocontent(createdbyanothermemberofacommunity)

¡ Whereonlinedoesthisexplicitlyoccuronalargescale?

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 17

Direct Indirect

+

++

++

+

––

––

–+

+

Page 18: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Wikipedia adminship elections§ Support/Oppose(120kvotesinEnglish)§ 4languages:EN,GER,FR,SP

¡ StackOverflow Q&Acommunity§ Upvote/Downvote (7.5Mvotes)

¡ Epinions productreviews§ Ratingsofothers’productreviews(13M)

§ 5=positive,1-4=negative

+

+

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 18

Page 19: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Therearetwowaystolookatthis:Onepersonevaluatestheotherviaapositive/negativeevaluation

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 19

+

++

++

+

––

––

Then we will focus on evaluations in the

context of a network

BA

First we focus on a single evaluation

(without the context of a network)

Page 20: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Whatdriveshumanevaluations?

¡ HowdopropertiesofevaluatorAandtargetB affectA’svote?§ Status andSimilarity aretwofundamentaldriversbehindhumanevaluations

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 20

BA

Page 21: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Status:Levelofrecognition,merit,achievement,reputationinthecommunity

§ Wikipedia:#edits,#barnstars§ StackOverflow:#answers

¡ User-usersimilarity:§ OverlappingtopicalinterestsofA andB

§ Wikipedia: Similarityofthearticlesedited§ StackOverflow: Similarityofusersevaluated

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 21

[WSDM ‘12]

Page 22: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ HowdopropertiesofevaluatorAandtargetB affectA’svote?

¡ Twonatural(butcompeting)hypotheses:§ (1) Prob.thatBreceivesapositiveevaluationdependsprimarilyonthecharacteristicsofB§ ThereissomeobjectivecriteriaforuserBtoreceiveapositiveevaluation

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 22

BA

Page 23: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ HowdopropertiesofevaluatorAandtargetB affectA’svote?

¡ Twonatural(butcompeting)hypotheses:§ (2) Prob.thatBreceivesapositiveevaluationdependsonrelationshipbetweenthecharacteristicsofAandB§ UserAcomparesherselftouserBandthenmakestheevaluation

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 23

BA

Page 24: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ HowdoesstatusofBaffectA’sevaluation?§ Eachcurveisafixedstatusdifference:D =SA-SB

¡ Observations:§ Flatcurves: Prob.ofpositiveeval.P(+)doesn’tdependonB’sstatus

§ Differentlevels: DifferentvaluesofD resultindifferentbehavior

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 24

Target B status(# edits in Wikipedia)

BAWe keep increasing status of B, while keeping the status

difference (SA-SB) fixed

Page 25: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Howdoespriorinteractionshapeevaluations?2hypotheses:§ (1)Evaluatorsaremoresupportiveoftargetsintheirarea§ “Themoresimilaryouare,themoreIlikeyou”

§ (2)Morefamiliarevaluatorsknowweaknessesandaremoreharsh§ “Themoresimilaryouare,thebetterIcanunderstandyourweaknesses”

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 25

Page 26: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

2610/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu

Prior interaction/ similarity boosts positive evaluations

Similarity: For each user create a set of words of all articles she edited. The similarity is then the Jaccard similarity between the two sets of words.Then sort the user pairs by similarity and bucket them into percentiles.

Page 27: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 27

Status is a proxy for quality when evaluator does not know the target

Page 28: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Whoshowsuptoevaluate?

¡ Selectioneffectinwhogivestheevaluation§ IfSA>SB thenAandBaremorelikelytobesimilar

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 28

Elite evaluators vote on targets in

their area of expertise

Page 29: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ WhatisP(+)asafunctionofΔ =SA-SB?§ Basedonfindingssofar:Monotonicallydecreasing

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 29

Δ, Status difference

P(+)

-10 (SA<SB)

0 (SA=SB)

10 (SA>SB)

Page 30: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ WhatisP(+)asafunctionofΔ =SA-SB?

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 30

Especially negativefor SA=SB

Reboundfor SA > SB

Status difference

[ICWSM ‘10]

Computed over 120k votes

Page 31: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Whylowevals.ofusersofsamestatus?§ Notduetousersbeingtoughoneachother§ Butduetotheeffectsofsimilarity

§ Sowegetthe“mercy”bounceduetounevenmixingofvotes

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 31

Explanation: For negative status difference we have low similarity people which behave according to the red curve on the left plot. As status difference increases the similarity also increases (green curve). For positive status difference, similarity is high, and evaluations follow the blue curve (left). By having a particularly weighted combination of red, green, and blue curve we observe the “mercy bounce” from the previous slide.

Page 32: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Sofar:Propertiesofindividualevaluations¡ But:Evaluationsneedtobe“summarized”§ Determiningrankingsofusersoritems§ Multipleevaluationsleadtoagroupdecision

¡ Howtoaggregateuserevaluationstoobtaintheopinionofthecommunity?§ Canweguesscommunity’sopinionfromasmallfractionofthemakeupofthecommunity?

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 32

Page 33: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ PredictWikipediaadminship electionresultswithoutseeingthevotes§ Observeidentitiesofthefirstk(=5)peoplevoting(butnothowtheyvoted)

§ Wanttopredicttheelectionoutcome§ Promotion vs.nopromotion

¡ Whyisithard?§ Don’tseethevotes(justvoters)§ Onlyseefirst5voters(outof~50)

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 33

[WSDM ‘12]

Page 34: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Wanttomodelprob.userAvotes+inelectionofuserB

¡ Ourmodel:𝑃 𝐴 = + 𝐵 = 𝑃/ + 𝑑(𝑆/ − 𝑆2, 𝑠𝑖𝑚 𝐴, 𝐵 )§ PA …empiricalfractionof+votesofA§ d(status,similarity)…avg.deviationinfrac.of+votes

§ WhenA evaluatesB fromaparticular(status,similarity)quadrant,howdoesthischangetheirbehavioronaverage?§ Note: d(status,similarity) onlytakes4differentvalues(basedonthequadrantinthe(status,similarity)space).Valuecomputedempirically.

¡ Predict‘elected’if:10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 34

B

Pki=1 P (Ai = +|B) > w

[WSDM ‘12]

Page 35: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Basedononlywhoshowedtovotepredicttheoutcomeoftheelection

§ Othermethods:§ Guessinggives52%accuracy§ LogisticRegressiononstatusandsimilarityfeatures:67%§ Ifweseethefirstk=5 votes85%(goldstandard)

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 35

Number of voters seen Accuracy

Theme: Learning from implicit feedbackAudience composition tells us something about their reaction

Page 36: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Socialmediasitesaregovernedby(oftenimplicit)userevaluations

¡ Wikipediavotingprocesshasanexplicit,publicandrecorded processofevaluation

¡ Maincharacteristics:§ Importanceofrelativeassessment:Status§ Importanceofpriorinteraction:Similarity§ Diversityofindividuals’responsefunctions

¡ Application: Ballot-blindprediction

3610/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu

Page 37: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Statusseemstobesalientfeature

¡ Similarity alsoplaysimportantrole

¡ Audiencecompositionhelpspredictaudience’sreaction

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 37

Page 38: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin
Page 39: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Therearetwowaystolookatthis:Onepersonevaluatestheotherviaapositive/negativeevaluation

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 39

+

++

++

+

––

––

Now we will focus on evaluations in the

context of a network

BA

So far we focused on a single evaluation

(without the context of a network)

Page 40: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Networkswithpositiveandnegativerelationships

¡ Ourbasicunitofinvestigationwill besignedtriangles

¡ Firstwetalkaboutundirectednetworksthendirected

¡ Plan:§ Model: Considertwosoc. theoriesofsignednets§ Data: Reasonabouttheminlargeonlinenetworks§ Application: PredictifAandBarelinkedwith+or-

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 40

--+

--+

Page 41: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Networkswithpositive andnegativerelationships

¡ Consideranundirectedcompletegraph¡ Labeleachedgeaseither:§ Positive:friendship,trust,positivesentiment,…§ Negative:enemy,distrust,negativesentiment,…

¡ ExaminetriplesofconnectednodesA,B,C

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 41

Page 42: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Startwiththeintuition[Heider ’46]:§ Friend ofmyfriend ismyfriend§ Enemy ofenemy ismyfriend§ Enemy offriendismyenemy

¡ Lookatconnectedtriplesofnodes:

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 42

+++

--+

++-

---

UnbalancedBalancedConsistent with “friend of a friend” or

“enemy of the enemy” intuitionInconsistent with the “friend of a friend”

or “enemy of the enemy” intuition

Page 43: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 43

BalancedUnbalanced

¡ Graphisbalancedifeveryconnectedtripleofnodeshas:§ All3edgeslabeled+,or§ Exactly1edgelabeled+

Page 44: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Balanceimpliesglobalcoalitions [Cartwright-Harary]

¡ Fact: Ifalltrianglesarebalanced,theneither:§ Thenetworkcontainsonlypositiveedges,or§ Nodescanbesplitinto2setswherenegativeedgesonlypointbetweenthesets

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 44

+ +L

+R

-

Page 45: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 45

B+

C

D

E

+

L: Friends of A R: Enemies of A

Every node in L is enemy of R

+ +

AAny 2 nodesin L are friends

Any 2 nodesin R are friends

L

R

Page 46: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Internationalrelations:§ Positive edge:alliance§ Negative edge:animosity

¡ SeparationofBangladeshfromPakistanin1971:USsupportsPakistan.Why?§ USSR wasenemyofChina§ ChinawasenemyofIndia§ IndiawasenemyofPakistan§ USwasfriendlywithChina§ ChinavetoedBangladeshfromU.N.

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 46

P

R

I

C

U

+

+ ––

+?

B–?–

Page 47: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Sofarwetalkedaboutcompletegraphs

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 47

Balanced?

-+

Def 1: LocalviewFillinthemissingedgestoachievebalance

Def 2: GlobalviewDividethegraphintotwocoalitions

The2definitionsareequivalent!

--

-

Page 48: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Graphisbalanced if andonlyifitcontainsnocyclewithanoddnumberofnegative edges

¡ Howtocomputethis?§ Findconnectedcomponentson+edges

§ Ifwefindacomponentofnodeson+edgesthatcontainsa–edgeÞ Unbalanced

§ Foreachcomponentcreateasuper-node§ ConnectcomponentsAandBifthereisanegativeedgebetweenthemembers

§ Assignsuper-nodestosidesusingBFS

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 48

Even length cycle

–––

––

Odd length cycle

Page 49: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 49

Page 50: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 50

Page 51: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 51

Page 52: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ UsingBFSassigneachnodeaside¡ Graphisunbalanced ifanytwoconnectedsuper-nodesareassignedthesameside

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 52

L

R R

L LL

RUnbalanced!

û

Page 53: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin
Page 54: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Projectisasubstantialpartoftheclass§ Studentsputsignificanteffortandgreatthingshavebeendone

¡ Typesofprojects:§ (1) Analysisofaninterestingdatasetwiththegoaltodevelopa(new)modeloranalgorithm

§ (2) Atestofamodeloralgorithm(thatyouhavereadaboutoryourown)onreal&simulateddata.§ Fastalgorithmsforbiggraphs.CanbeintegratedintoSNAP.

¡ Otherpoints:§ Theprojectshouldcontainsomemathematicalanalysis,andsomeexperimentationonrealorsyntheticdata

§ Theresultoftheprojectwilltypicallybean8pagepaper,describingtheapproach,theresults,andrelatedwork.

§ Cometousifyouneedhelpwithaprojectidea!10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 54

Page 55: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

Projectproposal: 3-5pages,teamsofupto3students¡ Projectproposalhas3parts:

§ (0)Quick200wordabstract§ (1)Relatedwork/Reactionpaper(2-3pages):

§ Read3papersrelatedtotheproject/class§ Doreadingbeyondwhatwascoveredinclass§ Thinkbeyondwhatyouread.Don’ttakeother’sworkforgranted!§ 2-3pages: Summary (~1page),Critique(~1page)

§ (2)Proposal(1-2pages):§ Clearlydefinetheproblemyouaresolving.§ HowdoesitrelatetowhatyoureadfortheReactionpaper?§ Whatdatawillyouuse?(makesureyoualreadyhaveit!)§ Whichalgorithm/modelwillyouuse/develop?Bespecific!§ Howwillyouevaluate/testyourmethod?

See http://cs224w.stanford.edu/info.html fordetailedinstructionsandexamplesofpreviousproposals

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 55

Page 56: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Logistics:§ 1)RegisteryourgroupontheGoogleDochttp://bit.ly/1BNiHae

§ 2)SubmitPDF onGradeScope AND athttp://snap.stanford.edu/submit/

§ Duein9days:ThuOct19at23:59PST!§ Nolateperiods

¡ Ifyouneedhelp/ideas/advicecometoOfficehours/Emailus

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 56

Page 57: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ Foodwebs:¡ http://vlado.fmf.uni-lj.si/pub/networks/data/bio/foodweb/foodweb.htm

withmetadata:https://www.cbl.umces.edu/~atlss/

¡ Tradenetworksovertime:¡ http://faostat3.fao.org/download/F/FT/E

¡ StackExchange(replynetworks,Q/Anetworks):¡ https://archive.org/details/stackexchange

¡ Microfinancedata:¡ http://web.stanford.edu/~jacksonm/Data.html

¡ Reddit: Over1000subreddits foroneyear(2014).¡ Networkswhereuserswhocommentneareachother.Veryinterestingforcomparingdifferent

communitiesetc.Lotsofmetadata(e.g.,frompostsorcomments).Dataislarge(hundredsofGbs)

¡ Interpersonalexpertiseoverlapwithinacompany¡ Withinacompany,employeeswereaskedtorespondtothisquestion: Foreachpersoninthelistbelow,

pleaseshowhowstronglyyouagreeordisagreewiththefollowingstatement:“Ingeneral,thispersonhasexpertiseinareasthatareimportantinthekindofworkIdo.”

¡ Link: http://opsahl.co.uk/tnet/datasets/Cross_Parker-Consulting_info.txt¡ TypeofData:Originnode,destinationnode,weightofconnection(1-5)

¡ Moviegalaxies:¡ Socialnetworksof200moviesfrom www.moviegalaxies.com.Eachnetworkrepresentshowcharacters

interactinonemovie.

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 57

Page 58: CS224W: Analysis of Networks Jure Leskovec, ...snap.stanford.edu/class/cs224w-2017/slides/05-evals.pdf · India Taiwan Ukraine Germany Greece France,Monac Austria Hungary Israel Benin

¡ TheNeuralNetworkofa Caenorhabditis elegans worm¡ Link: http://opsahl.co.uk/tnet/datasets/celegans_n306.txt¡ FormatofData:Originnode(Neuron),destinationnode(Neuron),weightoflink

¡ ThenetworkofairportsintheUnitedStates¡ Description:FlightsbetweenUSairportsin2002(undirected),weightedbyhowmanyavailableseats

whereonflightsbetweentwoairportsoverthecourseoftheyear.¡ Link: http://opsahl.co.uk/tnet/datasets/USairport500.txt¡ TypeofData:Airport1,Airport2,numberofseatsacrosstheentireyearthatwereavailable

¡ Citation/authorrelationships¡ Description:Asetofroughly630,000papers,andtheirrespectiveauthors¡ Link: https://aminer.org/citation¡ Link:https://www.microsoft.com/en-us/research/project/microsoft-academic-graph/¡ TypeofData:(wouldrequiresometextprocessingtoextract)Nameofpaper,indexofpaper,authors

¡ Pages/hostnetwork¡ Description:Asetofhostsfromthe.uk domainandthepagestheylinkto¡ Link: http://law.di.unimi.it/webdata/uk-2014/

¡ WolfePrimatesinteraction¡ Description:Thesedatarepresent3monthsofinteractionsamongatroopofmonkeys.Vertex

attributescontainadditionalinformation:(1)IDnumberoftheanimal;(2)ageinyears;(3)sex;(4)rankinthetroop.

¡ Link: http://nexus.igraph.org/api/dataset_info?id=45&format=html

¡ Pythondependencygraphforpypi¡ Description:Thelibrarieswhichdependonotherlibrariesinthepackagepypi¡ Link: https://ogirardot.wordpress.com/2013/01/05/state-of-the-pythonpypi-dependency-graph/¡ Format:nameofdependency,versionextracted,json stringofotherdependencies

10/9/17 JureLeskovec,StanfordCS224W:AnalysisofNetworks,http://cs224w.stanford.edu 58