http://cs224w.stanford.edu Complex systems are around us: - - PowerPoint PPT Presentation
http://cs224w.stanford.edu Complex systems are around us: - - PowerPoint PPT Presentation
CS224W: Social and Information Network Analysis Jure Leskovec, Stanford University http://cs224w.stanford.edu Complex systems are around us: Society is a
¡ Complex ¡systems ¡are ¡around ¡us: ¡
§ Society ¡is ¡a ¡collec)on ¡of ¡six ¡billion ¡individuals ¡ § Communica5on ¡systems ¡link ¡electronic ¡devices ¡ § Informa5on ¡and ¡knowledge ¡is ¡organized ¡and ¡linked ¡ § Interac)ons ¡between ¡thousands ¡of ¡genes ¡regulate ¡ life ¡ § Our ¡thoughts ¡are ¡hidden ¡in ¡the ¡connec)ons ¡ between ¡billions ¡of ¡neurons ¡in ¡our ¡brain ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 11 ¡
What ¡do ¡these ¡systems ¡have ¡in ¡common? ¡ ¡ How ¡can ¡we ¡represent ¡them? ¡
¡ Mark ¡Lombardi: ¡tracked ¡and ¡
mapped ¡global ¡financial ¡fiascos ¡ in ¡the ¡1980s ¡and ¡1990s ¡from ¡ public ¡sources ¡such ¡as ¡news ¡ ar)cles ¡
¡ “I ¡happened ¡to ¡be ¡in ¡the ¡Drawing ¡Center ¡when ¡the ¡Lombardi ¡
show ¡was ¡being ¡installed ¡and ¡several ¡consultants ¡to ¡the ¡ Department ¡of ¡Homeland ¡Security ¡came ¡in ¡to ¡take ¡a ¡look. ¡They ¡ said ¡they ¡found ¡the ¡work ¡revelatory, ¡not ¡because ¡the ¡financial ¡ and ¡poli)cal ¡connec)ons ¡he ¡mapped ¡were ¡new ¡to ¡them, ¡but ¡ because ¡Lombardi ¡showed ¡them ¡an ¡elegant ¡way ¡to ¡array ¡ disparate ¡informa)on ¡and ¡make ¡sense ¡of ¡things, ¡which ¡they ¡ thought ¡might ¡be ¡useful ¡to ¡their ¡security ¡efforts. ¡I ¡didn‘t ¡know ¡ whether ¡to ¡find ¡that ¡response ¡comfor)ng ¡or ¡alarming, ¡but ¡I ¡saw ¡ exactly ¡what ¡they ¡meant.” ¡ ¡ ¡ ¡ ¡ ¡Michael ¡Kimmelman ¡ ¡Webs ¡Connec)ng ¡the ¡Power ¡Brokers, ¡the ¡Money ¡and ¡the ¡World ¡
¡NY ¡Times ¡November ¡14, ¡2003 ¡ ¡
¡ Is ¡this ¡just ¡a ¡random ¡network? ¡
9/21/15 ¡ Jure ¡Leskovec ¡and ¡Lada ¡Adamic, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 15 ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 16 ¡
Michael ¡Gastner, ¡Mark ¡Newman, ¡PNAS ¡2005 ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 20 ¡
Citation ¡networks ¡and ¡Maps ¡of ¡science ¡
[Börner ¡et ¡al., ¡2012] ¡
21 ¡
Understand ¡how ¡humans ¡ navigate ¡Wikipedia ¡ Get ¡an ¡idea ¡of ¡how ¡ people ¡connect ¡concepts ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡
[West-‑Leskovec, ¡2012] ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 22 ¡
9/11 ¡terrorist ¡network ¡
[Krebs, ¡2002] ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 23 ¡
Nodes: Links:
Companies Investment Pharma Research Labs Public Biotechnology Collaborations Financial R&D
Bio-‑tech ¡companies ¡
[Powell-‑White-‑Koput, ¡2002] ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 24 ¡
Human ¡brain ¡has ¡between ¡ ¡ 10-‑100 ¡billion ¡neurons ¡
[Sporns, ¡2011] ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 25 ¡
Metabolic ¡networks: ¡
Nodes: ¡Metabolites ¡and ¡enzymes ¡ Edges: ¡Chemical ¡reactions ¡
Protein-‑Protein ¡Interaction ¡Networks: ¡
Nodes: ¡Proteins ¡ Edges: ¡‘physical’ ¡interactions ¡
Behind ¡many ¡systems ¡there ¡is ¡an ¡intricate ¡ wiring ¡diagram, ¡a ¡network, ¡that ¡defines ¡ the ¡interac5ons ¡between ¡the ¡components ¡ We ¡will ¡never ¡understand ¡these ¡ ¡ systems ¡unless ¡we ¡understand ¡the ¡ networks ¡behind ¡them! ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 26 ¡
¡ Universal ¡language ¡for ¡describing ¡complex ¡data ¡
§ Networks ¡from ¡science, ¡nature, ¡and ¡technology ¡ ¡ are ¡more ¡similar ¡than ¡one ¡would ¡expect ¡ ¡
¡ Shared ¡vocabulary ¡between ¡fields ¡
§ Computer ¡Science, ¡Social ¡science, ¡Physics, ¡ Economics, ¡Sta)s)cs, ¡Biology ¡
¡ Data ¡availability ¡(/computa5onal ¡challenges) ¡
§ Web/mobile, ¡bio, ¡health, ¡and ¡medical ¡
¡ Impact! ¡
§ Social ¡networking, ¡Social ¡media, ¡Drug ¡design ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 27 ¡
Age ¡and ¡size ¡of ¡networks ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 28 ¡
CS!! ¡
¡ Network ¡data: ¡Orders ¡of ¡magnitude ¡
§ 436-‑node ¡network ¡of ¡email ¡exchange ¡at ¡a ¡corporate ¡ research ¡lab ¡[Adamic-‑Adar, ¡SocNets ¡‘03] ¡ § 43,553-‑node ¡network ¡of ¡email ¡exchange ¡at ¡an ¡ university ¡[Kossinets-‑Wacs, ¡Science ¡‘06] ¡ § 4.4-‑million-‑node ¡network ¡of ¡declared ¡friendships ¡on ¡a ¡ blogging ¡community ¡[Liben-‑Nowell ¡et ¡al., ¡PNAS ¡‘05] ¡ § 240-‑million-‑node ¡network ¡of ¡communica)on ¡on ¡ Microsod ¡Messenger ¡[Leskovec-‑Horvitz, ¡WWW ¡’08] ¡ § 800-‑million-‑node ¡Facebook ¡network ¡[Backstrom ¡et ¡al. ¡‘11] ¡
¡
29 ¡ 9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡
¡ Communica5on ¡networks: ¡
§ Intrusion ¡detec)on, ¡fraud ¡ § Churn ¡predic)on ¡
¡ Social ¡networks: ¡
§ Link ¡predic)on, ¡friend ¡recommenda)on ¡ § Social ¡circle ¡detec)on, ¡community ¡detec)on ¡ § Social ¡recommenda)ons ¡ § Iden)fying ¡influen)al ¡nodes, ¡Informa)on ¡virality ¡
¡ Informa5on ¡networks: ¡
§ Naviga)onal ¡aids ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 30 ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 31 ¡
buyers ¡ sellers ¡ (thickness) ¡purchase ¡price ¡ which ¡ratings ¡are ¡likely ¡to ¡be ¡fraudulent? ¡
9/21/15 ¡ Jure ¡Leskovec ¡and ¡Lada ¡Adamic, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 32 ¡
http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0040961 ¡
9/21/15 ¡ Jure ¡Leskovec ¡and ¡Lada ¡Adamic, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 33 ¡
(A) ¡vanilla ¡extract, ¡celery ¡ (B) ¡pepper, ¡onion ¡
¡ If ¡you ¡want ¡to ¡understand ¡the ¡spread ¡of ¡
diseases, ¡you ¡need ¡to ¡figure ¡out ¡who ¡will ¡be ¡in ¡ contact ¡with ¡whom ¡
¡ If ¡you ¡want ¡to ¡understand ¡the ¡structure ¡of ¡the ¡
Web, ¡you ¡have ¡to ¡analyze ¡the ¡‘links’. ¡
¡ If ¡you ¡want ¡to ¡understand ¡dissemina)on ¡of ¡
news ¡or ¡evolu)on ¡of ¡science, ¡you ¡have ¡to ¡ follow ¡the ¡flow. ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 34 ¡
¡ What ¡do ¡we ¡hope ¡to ¡achieve ¡from ¡
studying ¡ ¡networks? ¡
§ Pacerns ¡and ¡sta)s)cal ¡proper5es ¡of ¡ network ¡data ¡ § Design ¡principles ¡and ¡models ¡ § Understand ¡why ¡networks ¡are ¡organized ¡ the ¡way ¡they ¡are ¡ ¡
§ Predict ¡behavior ¡of ¡networked ¡systems ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 36 ¡
¡ How ¡do ¡we ¡reason ¡about ¡networks? ¡
§ Empirical: ¡Study ¡network ¡data ¡to ¡find ¡
- rganiza)onal ¡principles ¡
§ How ¡do ¡we ¡measure ¡and ¡quan)fy ¡networks? ¡
§ Mathema5cal ¡models: ¡Graph ¡theory ¡and ¡ sta)s)cal ¡models ¡
§ Models ¡allow ¡us ¡to ¡understand ¡behaviors ¡and ¡ dis)nguish ¡surprising ¡from ¡expected ¡phenomena ¡
§ Algorithms ¡for ¡analyzing ¡graphs ¡
§ Hard ¡computa)onal ¡challenges ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 37 ¡
What ¡do ¡we ¡study ¡in ¡networks? ¡
¡ Structure ¡and ¡evolu5on: ¡ ¡
§ What ¡is ¡the ¡structure ¡of ¡a ¡network? ¡ § Why ¡and ¡how ¡did ¡it ¡come ¡to ¡have ¡ ¡ such ¡structure? ¡
¡ Processes ¡and ¡dynamics: ¡
§ Networks ¡provide ¡“skeleton” ¡ for ¡spreading ¡of ¡informa)on, ¡ behavior, ¡diseases ¡ § How ¡do ¡informa)on ¡and ¡ ¡ diseases ¡spread? ¡ ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 38 ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis, ¡hcp://cs224w.stanford.edu ¡ 39 ¡
Properties ¡
Small ¡diameter, ¡ ¡ Edge ¡clustering ¡ Scale-‑free ¡ Strength ¡of ¡weak ¡)es, ¡ ¡ Core-‑periphery ¡ Densifica)on ¡power ¡law, ¡ Shrinking ¡diameters ¡ Pacerns ¡of ¡signed ¡edge ¡ crea)on ¡ Informa)on ¡virality, ¡ Memetracking ¡
Models ¡
Small-‑world ¡model, ¡ Erdös-‑Renyi ¡model ¡ Preferen)al ¡acachment, ¡ Copying ¡model ¡ Kronecker ¡Graphs ¡ Microscopic ¡model ¡of ¡ ¡ evolving ¡networks ¡ Structural ¡balance, ¡ ¡ Theory ¡of ¡status ¡ Independent ¡cascade ¡model, ¡ Game ¡theore)c ¡model ¡
Algorithms ¡
Decentralized ¡search ¡ PageRank, ¡Hubs ¡and ¡ authori)es ¡ Community ¡detec)on: ¡ Girvan-‑Newman, ¡Modularity ¡ Link ¡predic)on, ¡ Supervised ¡random ¡walks ¡ Models ¡for ¡predic)ng ¡ ¡ edge ¡signs ¡ Influence ¡maximiza)on, ¡ Outbreak ¡detec)on ¡
9/22/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 40 ¡
Paris ¡Syminelakis ¡ (head ¡TA) ¡ Rohit ¡Mundra ¡ Sameep ¡Bagadia ¡ Nihit ¡Desai ¡ Caroline ¡Suen ¡ Tim ¡Althoff ¡
¡ hTp://cs224w.stanford.edu ¡
§ Slides ¡posted ¡just ¡before ¡the ¡class ¡
¡ Readings: ¡
§ Chapters ¡from ¡Easley&Kleinberg ¡ § Papers ¡
¡ Op5onal ¡readings: ¡
§ Papers ¡and ¡pointers ¡to ¡addi)onal ¡literature ¡ § This ¡will ¡be ¡very ¡useful ¡for ¡project ¡proposals ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 41 ¡
¡ Piazza ¡Q&A ¡website: ¡
§ hcp://piazza.com/stanford/fall2014/cs224w ¡ ¡
§ Use ¡access ¡code ¡“snap” ¡
§ Please ¡par5cipate ¡and ¡help ¡each ¡other! ¡ ¡ (2 ¡% ¡of ¡grade) ¡
¡ For ¡e-‑mailing ¡course ¡staff, ¡always ¡use: ¡
§ cs224w-‑aut1516-‑staff@lists.stanford.edu ¡ ¡
¡ We ¡will ¡post ¡course ¡announcements ¡to ¡Piazza ¡
(make ¡sure ¡you ¡check ¡it ¡regularly) ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 42 ¡
¡ Assignments ¡are ¡long ¡and ¡take ¡5me ¡(10-‑20h) ¡
Start ¡early! ¡
§ A ¡combina)on ¡of: ¡Data ¡analysis, ¡Algorithm ¡design, ¡and ¡Math ¡
¡ How ¡to ¡submit? ¡
§ Upload ¡via ¡GradeScope ¡(hTp://gradescope.com) ¡
§ To ¡register ¡fill ¡this ¡form ¡hTp://bit.ly/1DuETte ¡ ¡ § IMPORTANT: ¡one ¡answer ¡per ¡page! ¡
§ Code ¡and ¡write-‑ups ¡(proposal, ¡milestone, ¡final ¡report) ¡ have ¡to ¡also ¡be ¡uploaded ¡at ¡hcp://snap.stanford.edu/submit/ ¡ ¡
¡ 2 ¡late ¡periods ¡for ¡the ¡quarter: ¡
§ 1 ¡late ¡period ¡expires ¡at ¡the ¡start ¡of ¡next ¡class ¡ § You ¡can ¡use ¡at ¡most ¡1 ¡late ¡period ¡per ¡assignment ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 43 ¡
¡ Substan5al ¡course ¡project: ¡
§ Experimental ¡evalua5on ¡of ¡algorithms ¡and ¡ ¡ models ¡on ¡an ¡interes)ng ¡network ¡dataset ¡ § A ¡theore5cal ¡project ¡that ¡considers ¡a ¡model, ¡an ¡ algorithm ¡and ¡derives ¡a ¡rigorous ¡result ¡about ¡it ¡ § Develop ¡scalable ¡algorithms ¡for ¡massive ¡graphs ¡
¡ Performed ¡in ¡groups ¡of ¡up ¡to ¡3 ¡students ¡
§ (all ¡projects ¡will ¡be ¡graded ¡equally, ¡regardless ¡of ¡group ¡ size) ¡
¡ Project ¡is ¡the ¡main ¡work ¡for ¡the ¡class ¡
§ We ¡will ¡help ¡with ¡ideas, ¡data ¡and ¡mentoring ¡ § Start ¡thinking ¡about ¡this ¡now ¡
¡ Poster ¡session ¡with ¡many ¡external ¡visitors ¡ ¡ Read: ¡hcp://web.stanford.edu/class/cs224w/info.html#proj ¡ ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 44 ¡
Week ¡ Assignment ¡ Due ¡on ¡ ¡THU ¡ 2 ¡ Homework ¡0 ¡ October ¡1 ¡ 3 ¡ Homework ¡1 ¡ October ¡8 ¡ 4 ¡ Project ¡proposal ¡ October ¡15 ¡ 5 ¡ Homework ¡2 ¡ October ¡22 ¡ 6 ¡
Work ¡on ¡the ¡project ¡
7 ¡ Homework ¡3 ¡ November ¡5 ¡ 8 ¡ Project ¡milestone ¡ November ¡12 ¡
(no ¡late ¡periods!) ¡
9 ¡ Homework ¡4 ¡ November ¡19 ¡
Thanksgiving ¡break ¡
10 ¡ Project ¡report ¡ December ¡8, ¡midnight ¡
(no ¡late ¡periods!) ¡
Poster ¡session ¡ December ¡9 ¡
8:30-‑11:30am ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 45 ¡
¡ Final ¡grade ¡will ¡be ¡composed ¡of: ¡
§ Homework: ¡48% ¡
§ Homework ¡1,2,3,4: ¡12% ¡each ¡
§ Substan5al ¡class ¡project: ¡50% ¡
§ Proposal: ¡20% ¡ § Project ¡milestone: ¡20% ¡ § Final ¡report: ¡50% ¡ § Poster ¡presenta)on: ¡10% ¡
§ Piazza ¡par5cipa5on, ¡snap ¡code ¡contribu5on: ¡2% ¡
§ Students ¡between ¡grades ¡get ¡extra ¡credit ¡for ¡Piazza ¡ par)cipa)on ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 46 ¡
¡ No ¡single ¡topic ¡in ¡the ¡course ¡is ¡too ¡hard ¡by ¡itself ¡ ¡ ¡ But ¡we ¡will ¡cover ¡and ¡touch ¡upon ¡many ¡topics ¡and ¡
this ¡is ¡what ¡makes ¡the ¡course ¡hard ¡
§ Good ¡background ¡in: ¡
§ Algorithms ¡and ¡graph ¡theory ¡ § Probability ¡and ¡Sta)s)cs ¡ § Linear ¡algebra ¡
§ Programming: ¡
§ You ¡should ¡be ¡able ¡to ¡write ¡non-‑trivial ¡programs ¡(in ¡Python) ¡
§ 2 ¡recita5on ¡sessions ¡(all ¡in ¡Nvidia ¡auditorium): ¡
§ SNAP.PY: ¡Friday, ¡9/25 ¡(4:00-‑5:30) ¡ ¡ § Review ¡of ¡Probability ¡and ¡Linear ¡Algebra: ¡Friday, ¡10/2 ¡(4:00-‑5:30) ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 47 ¡
¡ We ¡highly ¡recommend ¡SNAP: ¡
§ SNAP ¡C++: ¡more ¡challenging ¡but ¡more ¡scalable ¡ § SNAP.PY: ¡Python ¡ease ¡of ¡use, ¡most ¡of ¡C++ ¡scalability ¡
§ HW0 ¡asks ¡you ¡to ¡do ¡some ¡very ¡basic ¡network ¡analysis ¡with ¡ snap.py ¡
§ If ¡you ¡find ¡HW0 ¡difficult, ¡this ¡class ¡is ¡probably ¡not ¡for ¡you ¡
§ Other ¡tools ¡include ¡NetworkX, ¡JUNG, ¡iGraph ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 48 ¡
¡ Objects: ¡nodes, ¡ver)ces ¡
¡ ¡N
¡ Interac5ons: ¡links, ¡edges
¡ ¡ ¡E
¡ System: ¡network, ¡graph ¡
¡ ¡G(N,E)
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 50 ¡
¡ Network ¡oden ¡refers ¡to ¡real ¡systems ¡
§ Web, ¡ ¡Social ¡network, ¡Metabolic ¡network ¡ Language: ¡Network, ¡node, ¡link ¡
¡ Graph ¡is ¡mathema)cal ¡representa)on ¡of ¡a ¡
network ¡
§ Web ¡graph, ¡Social ¡graph ¡(a ¡Facebook ¡term) ¡ Language: ¡Graph, ¡vertex, ¡edge ¡
¡ ¡ ¡ ¡ ¡ ¡ ¡In ¡most ¡cases ¡we ¡will ¡use ¡the ¡two ¡terms ¡interchangeably ¡
9/21/15 ¡ Jure ¡Leskovec, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 51 ¡
¡ Directed ¡(also ¡called ¡arcs, ¡links) ¡
§ A ¡-‑> ¡B ¡ ¡
§ A ¡likes ¡B, ¡A ¡gave ¡a ¡gid ¡to ¡B, ¡A ¡is ¡B’s ¡child ¡
¡ Undirected ¡ ¡
§ A ¡<-‑> ¡B ¡or ¡A ¡– ¡B ¡
§ A ¡and ¡B ¡like ¡each ¡other ¡ § A ¡and ¡B ¡are ¡siblings ¡ § A ¡and ¡B ¡are ¡co-‑authors ¡
9/21/15 ¡ Jure ¡Leskovec ¡and ¡Lada ¡Adamic, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 53 ¡
The ¡image ¡shows ¡5 ¡streets ¡(A ¡and ¡B ¡streets, ¡and ¡1st, ¡2nd, ¡and ¡3rd ¡Avenue). ¡How ¡ can ¡a ¡network ¡be ¡constructed ¡from ¡these ¡streets? ¡
- 1) ¡Roads ¡(A ¡St., ¡B ¡St., ¡1st ¡Ave, ¡...) ¡are ¡nodes ¡
and ¡an ¡edge ¡is ¡drawn ¡between ¡every ¡pair ¡of ¡ roads ¡that ¡intersect. ¡
- 2) ¡Intersections ¡are ¡nodes ¡(e.g. ¡A ¡St. ¡and ¡1st ¡
Ave, ¡B ¡St. ¡and ¡2nd ¡Ave), ¡and ¡an ¡edge ¡is ¡drawn ¡ between ¡any ¡two ¡intersections ¡that ¡are ¡ directly ¡connected ¡by ¡a ¡segment ¡of ¡street ¡with ¡ no ¡intervening ¡intersections. ¡
- 3) ¡Street ¡blocks ¡are ¡nodes ¡(e.g. ¡the ¡block ¡
between ¡A ¡and ¡B, ¡and ¡2nd ¡and ¡3rd), ¡and ¡ blocks ¡that ¡are ¡adjacent ¡(i.e. ¡across ¡the ¡street ¡ from ¡each ¡other) ¡have ¡edges. ¡
¡ Examples ¡
§ weight ¡(e.g. ¡frequency ¡of ¡communica)on) ¡ § ranking ¡(best ¡friend, ¡second ¡best ¡friend…) ¡ § type ¡(friend, ¡rela)ve, ¡co-‑worker) ¡ § proper)es ¡depending ¡on ¡the ¡structure ¡of ¡the ¡rest ¡
- f ¡the ¡graph: ¡e.g. ¡betweenness ¡
2 ¡ 2
¡
1 ¡ 2
¡
1 ¡ 2
¡
1
¡
1 ¡ 1
¡
2 ¡ 2
¡
1
¡
1 ¡ 2
¡
1 ¡ 1 ¡ 2
¡
1 ¡ 2 ¡ 1 ¡ 2 ¡ 1 ¡ Ada ¡ Cora ¡ Louise ¡ Jean ¡ Helen ¡ Martha ¡ Alice ¡ Robin ¡ Marion ¡ Maxine ¡ Lena ¡ Hazel ¡ Hilda ¡ Frances ¡ Eva ¡ Ruth ¡ Edna ¡ Adele ¡ Jane ¡ Anna ¡ Mary ¡ Betty ¡ Ella ¡ Ellen ¡ Laura ¡ Irene ¡
¡ girls’ ¡school ¡dormitory ¡dining-‑table ¡partners, ¡1st ¡and ¡2nd ¡choices ¡(Moreno, ¡ The ¡sociometry ¡reader, ¡1960) ¡
¡ e.g. ¡one ¡person ¡
trus)ng/distrus)ng ¡ another ¡
§ Research ¡challenge: ¡ How ¡does ¡one ¡ ‘propagate’ ¡ nega)ve ¡feelings ¡in ¡ a ¡social ¡network? ¡Is ¡ my ¡enemy’s ¡enemy ¡ my ¡friend? ¡
sample ¡of ¡positive ¡& ¡negative ¡ratings ¡from ¡Epinions ¡network ¡
¡ adjacency ¡matrix ¡ ¡ edgelist ¡ ¡ adjacency ¡list ¡
¡ Represen)ng ¡edges ¡(who ¡is ¡adjacent ¡to ¡
whom) ¡as ¡a ¡matrix ¡
§ Aij ¡= ¡1 ¡if ¡node ¡i ¡has ¡an ¡edge ¡to ¡node ¡j ¡ ¡ ¡ ¡= ¡0 ¡if ¡node ¡i ¡does ¡not ¡have ¡an ¡edge ¡to ¡j ¡ § Aii ¡= ¡0 ¡unless ¡the ¡network ¡has ¡self-‑loops ¡ § Aij ¡= ¡Aji ¡if ¡the ¡network ¡is ¡undirected, ¡
- r ¡if ¡i ¡and ¡j ¡share ¡a ¡reciprocated ¡edge ¡
1 ¡ 2 ¡ 3 ¡ 4 ¡ 5 ¡
0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡
A ¡= ¡
9/21/15 ¡ Jure ¡Leskovec ¡and ¡Lada ¡Adamic, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 60 ¡
A) ¡ B) ¡ C) ¡
¡ Edge ¡list ¡
§ 2, ¡3 ¡ § 2, ¡4 ¡ § 3, ¡2 ¡ § 3, ¡4 ¡ § 4, ¡5 ¡ § 5, ¡2 ¡ § 5, ¡1 ¡
¡
1 ¡ 2 ¡ 3 ¡ 4 ¡ 5 ¡
¡
¡ Adjacency ¡list ¡
§ is ¡easier ¡to ¡work ¡with ¡if ¡ network ¡is ¡
§ large ¡ § sparse ¡
§ quickly ¡retrieve ¡all ¡neighbors ¡ for ¡a ¡node ¡
§ 1: ¡ § 2: ¡3 ¡4 ¡ § 3: ¡2 ¡4 ¡ § 4: ¡5 ¡ § 5: ¡1 ¡2 ¡
1 ¡ 2 ¡ 3 ¡ 4 ¡ 5 ¡
¡ degree ¡& ¡degree ¡distribu)on ¡ ¡ connected ¡components ¡
? ¡ ? ¡ ? ¡
¡ Node ¡network ¡proper)es ¡
§ from ¡immediate ¡connec)ons ¡
§ indegree ¡
how ¡many ¡directed ¡edges ¡(arcs) ¡are ¡incident ¡on ¡a ¡node ¡
§ outdegree ¡
how ¡many ¡directed ¡edges ¡(arcs) ¡originate ¡at ¡a ¡node ¡
§ degree ¡(in ¡or ¡out) ¡
number ¡of ¡edges ¡incident ¡on ¡a ¡node ¡
§ from ¡the ¡en)re ¡graph ¡(next ¡lecture) ¡
§ centrality ¡(betweenness, ¡closeness) ¡
- utdegree=2 ¡
indegree=3 ¡ degree=5 ¡
¡ Outdegree(i) ¡= ¡
0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡
A ¡= ¡
∑
= n j ij
A
1
example: ¡outdegree ¡for ¡node ¡3 ¡is ¡2, ¡which ¡we ¡
- btain ¡by ¡summing ¡the ¡number ¡of ¡non-‑zero ¡
entries ¡in ¡the ¡3rd ¡row ¡ n Indegree(j) ¡= ¡
0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡ 1 ¡ 0 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ 1 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡
A ¡= ¡
∑
= n i ij
A
1
example: ¡the ¡indegree ¡for ¡node ¡3 ¡is ¡1, ¡which ¡we ¡
- btain ¡by ¡summing ¡the ¡number ¡of ¡non-‑zero ¡
entries ¡in ¡the ¡3rd ¡column ¡
∑
= n i i
A
1 3
∑
= n j j
A
1 3
1 ¡ 2 ¡ 3 ¡ 4 ¡ 5 ¡
¡
Degree ¡sequence: ¡An ¡ordered ¡list ¡of ¡the ¡(in,out) ¡degree ¡of ¡each ¡node ¡
n In-‑degree ¡sequence: ¡
n [2, ¡2, ¡2, ¡1, ¡1, ¡1, ¡1, ¡0] ¡
n Out-‑degree ¡sequence: ¡
n [2, ¡2, ¡2, ¡2, ¡1, ¡1, ¡1, ¡0] ¡
n (undirected) ¡degree ¡sequence: ¡
n [3, ¡3, ¡3, ¡2, ¡2, ¡1, ¡1, ¡1] ¡
n Degree ¡distribution: ¡A ¡frequency ¡count ¡of ¡the ¡occurrence ¡of ¡each ¡degree ¡
n In-‑degree ¡distribution: ¡
n [(2,3) ¡ ¡(1,4) ¡ ¡(0,1)] ¡
n Out-‑degree ¡distribution: ¡
n [(2,4) ¡ ¡(1,3) ¡ ¡(0,1)] ¡
n (undirected) ¡distribution: ¡
n [(3,3) ¡(2,2) ¡(1,3)] ¡
1 2 1 2 3 4 5
indegree frequency
9/21/15 ¡ Jure ¡Leskovec ¡and ¡Lada ¡Adamic, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 68 ¡
A ¡ B ¡ C ¡ D ¡
¡ Strongly ¡connected ¡components ¡
§ Each ¡node ¡within ¡the ¡component ¡can ¡be ¡reached ¡from ¡every ¡other ¡ node ¡in ¡the ¡component ¡by ¡following ¡directed ¡links ¡
n Strongly ¡connected ¡components ¡
n B ¡C ¡D ¡E ¡ n A ¡ n G ¡H ¡ n F ¡
n Weakly ¡connected ¡components: ¡every ¡node ¡can ¡be ¡reached ¡from ¡every ¡
- ther ¡node ¡by ¡following ¡links ¡in ¡either ¡direction ¡
A ¡ B ¡ C ¡ D ¡ E ¡ F ¡ G ¡ H ¡ A ¡ B ¡ C ¡ D ¡ E ¡ F ¡ G ¡ H ¡
n Weakly ¡connected ¡components ¡
n A ¡B ¡C ¡D ¡E ¡ n G ¡H ¡F ¡
n In ¡undirected ¡networks ¡one ¡talks ¡simply ¡
about ¡‘connected ¡components’ ¡
9/21/15 ¡ Jure ¡Leskovec ¡and ¡Lada ¡Adamic, ¡Stanford ¡CS224W: ¡Social ¡and ¡Informa)on ¡Network ¡Analysis ¡ 71 ¡