CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh...
Transcript of CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh...
![Page 1: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/1.jpg)
CSE 494/598Lecture-9:Social Networks and their applications to WebLYDIA MANIKONDA HTTP://WWW.PUBLIC.ASU.EDU/~LMANIKON /
**Content adapted from last year’s slides
![Page 2: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/2.jpg)
Announcements• Homework-2 soon will be released
• Surprise quiz today!
![Page 3: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/3.jpg)
Today’s lecture• Social Networks – Network theory and concepts – General Introduction
• Hands-on Tutorial -- Crawling Twitter
![Page 4: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/4.jpg)
Networks – Physical & Cyber
Typhoid Mary(Mary Mallon)
Patient Zero(Gaetan Dugas)
![Page 5: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/5.jpg)
![Page 6: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/6.jpg)
Applications of Network Theory• World Wide Web and hyperlink structure
• The Internet and router connectivity
• Collaborations among…– Movie actors
– Scientists and mathematicians
• Sexual interaction
• Cellular networks in biology
• Food webs in ecology
• Phone call patterns
• Word co-occurrence in text
• Neural network connectivity of flatworms
• Conformational states in protein folding
![Page 7: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/7.jpg)
Web Applications of Social Networks• Analyzing Influence or Importance• Page Rank • Related to recursive in-degree computation
• Discovering Communities• Finding near-cliques
• Analyzing Trust • Propagating trust
• Using propagated trust to fight spam• In email
• In web page ranking
• Analyzing Information Diffusion• Modeling web interactions
![Page 8: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/8.jpg)
People are represented as nodes.
Society as a graph
![Page 9: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/9.jpg)
People are represented as nodes.
Relationships are represented as edges.
(Relationships may be acquaintanceship, friendship, co-authorship, etc.)
Society as a Graph
![Page 10: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/10.jpg)
People are represented as nodes.
Relationships are represented as edges.
(Relationships may be acquaintanceship, friendship, co-authorship, etc.)
Allows analysis using tools of mathematical graph theory
Society as a Graph
![Page 11: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/11.jpg)
Graphs – Sociograms (based on Hanneman, 2001)
Graphs – Network analysis uses one kind of graphic display that consists of points (nodes) to represent actors and lines (edges) to represent the ties or relations.
Sociograms – Called by Sociologists; Same as graphs
Strength of ties:
• Nominal – represents presence of absence of a tie
• Signed – represents a negative tie, positive tie or no tie
• Ordinal – represents whether a tie is the strongest, next strongest, etc.
• Valued – measured on an interval or ratio level
![Page 12: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/12.jpg)
ConnectionsSize
◦ Number of nodes
Density ◦ Number of ties that are present/the amount of ties that could be present
Out-degree
◦ Sum of connections from an actor to others
In-degree
◦ Sum of connections to an actor
![Page 13: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/13.jpg)
DistanceWalk
◦ A sequence of actors and relations that begins and ends with actors
Geodesic distance
◦ The number of relations in the shortest possible walk from one actor to another
Maximum flow
◦ The amount of different actors in the neighborhood of a source that lead to pathways to a target
Centrality
◦ This indicates the most important vertices within a graph
![Page 14: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/14.jpg)
Degree◦ Sum of connections from or to an actor
◦ Transitive weighted degreeAuthority, hub, pagerank
Closeness centrality◦ Distance of one actor to all others in the network
Betweenness centrality◦ Number that represents how frequently an actor is between other actors’
geodesic paths
Some Measures of Power & Prestige(based on Hanneman, 2001)
![Page 15: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/15.jpg)
Cliques and Social Roles (based on Hanneman, 2001)
Cliques ◦ Sub-set of actors
◦ More closely tied to each other than to actors who are not part of the sub-set
◦ (A lot of work on “trawling” for communities in the web-graph)
◦ Often, you first find the clique (or a densely connected subgraph) and then try to interpret what the clique is about
Social roles ◦ Defined by regularities in the patterns of relations among actors
![Page 16: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/16.jpg)
Outline•Small Worlds
•Random Graphs
•Alpha and Beta
•Power Laws
•Searchable Networks
•Six Degrees of Separation
![Page 17: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/17.jpg)
Small worlds
![Page 18: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/18.jpg)
Trying to make friends
Kentaro
![Page 19: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/19.jpg)
Trying to make friends
Kentaro
BashMicrosoft
![Page 20: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/20.jpg)
Trying to make friends
Kentaro Ranjeet
BashMicrosoft Asha
![Page 21: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/21.jpg)
Trying to make friends
Kentaro Ranjeet
Bash
Sharad
Microsoft Asha
New York CityYale
Ranjeet and I already had a friend in common!
![Page 22: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/22.jpg)
I didn’t have to worry…
Kentaro
Bash
Karishma
Sharad
Maithreyi
Anandan
Venkie
Soumya
![Page 23: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/23.jpg)
It’s a small world after all!
Kentaro Ranjeet
Bash
Karishma
Sharad
Maithreyi
Anandan Prof. Sastry
Venkie
PM Manmohan Singh
Prof. Balki
Pres. Kalam
Prof. Jhunjhunwala
Dr. Montek SinghAhluwalia
Ravi
Dr. Isher Judge Ahluwalia
Pawan
Aishwarya
Prof. McDermott
Ravi’sFather
AmitabhBachchan
Prof.Kannan
Prof. Prahalad
Soumya
NandanaSen
Prof. AmartyaSen
Prof. Veni
Rao
![Page 24: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/24.jpg)
The Kevin Bacon GameInvented by Albright College students in 1994:
◦ Craig Fass, Brian Turtle, Mike Ginelly
Goal: Connect any actor to Kevin Bacon, by linking actors who have acted in the same movie.
Oracle of Bacon website uses Internet Movie Database (IMDB.com) to find shortest link between any two actors:
http://oracleofbacon.org/
Boxed version of theKevin Bacon Game
![Page 25: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/25.jpg)
The Kevin Bacon Game
Kevin Bacon
An Example
Tim Robbins
Om Puri
Amitabh Bachchan
Yuva (2004)
Mystic River (2003)
Code 46 (2003)
Rani Mukherjee
Black (2005)
![Page 26: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/26.jpg)
Perhaps the other path is deemed more diverse/ colorful…
…actually Bachchan has a Bacon number 3
![Page 27: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/27.jpg)
Total # of actors in database: ~550,000
Average path length to Kevin: 2.79
Actor closest to “center”: Rod Steiger (2.53)
Rank of Kevin, in closeness to center: 876th
Most actors are within three links of each other! Center of Hollywood?
The Kevin Bacon Game
![Page 28: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/28.jpg)
Erdős Number (Bacon game for Brainiacs )
Number of links required to connect scholars to Erdős, via co-authorship of papers
Erdős wrote 1500+ papers with 507 co-authors.
Jerry Grossman’s (Oakland Univ.) website allows mathematicians to compute their Erdosnumbers:
http://www.oakland.edu/enp/
Connecting path lengths, among mathematicians only:
◦ average is 4.65◦ maximum is 13
Paul Erdős (1913-1996)
Unlike Bacon, Erdos has better centrality in his network
![Page 29: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/29.jpg)
Erdős NumberPaul Erdős
Dimitris Achlioptas
Bernard Schoelkopf
Kentaro Toyama
Andrew Blake
Mike Molloy
Toyama, K. and A. Blake (2002). Probabilistic tracking with exemplars in a metric space. International Journal of Computer Vision. 48(1):9-19.
Romdhani, S., P. Torr, B. Schoelkopf, and A. Blake (2001). Computationally efficient face detection. In Proc. Int’l. Conf. Computer Vision, pp. 695-700.
Achlioptas, D., F. McSherry and B. Schoelkopf. Sampling Techniques for Kernel Methods. NIPS 2001, pages 335-342.
Achlioptas, D. and M. Molloy (1999). Almost All Graphs with 2.522 n Edges are not 3-Colourable. Electronic J. Comb. (6), R29.
Alon, N., P. Erdos, D. Gunderson and M. Molloy (2002). On a Ramsey-type Problem. J. Graph Th. 40, 120-129.
![Page 30: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/30.jpg)
Six Degrees of SeparationThe experiment:
Random people from Nebraska were to send a letter (via intermediaries) to a stock broker in Boston.
Could only send to someone with whom they were on a first-name basis.
Among the letters that found the target, the average number of links was six.
Milgram (1967)
Stanley Milgram (1933-1984)
Many “issues” with the experiment…
![Page 31: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/31.jpg)
Some issues with Milgram’s setupA large fraction of his test subjects were stockbrokers
◦ So are likely to know how to reach the “goal” stockbroker
A large fraction of his test subjects were in Boston◦ As was the “goal” stockbroker
A large fraction of letters never reached ◦ Only 20% reached
![Page 32: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/32.jpg)
Six Degrees of Separation
John Guare wrote a play called Six Degrees of Separation, based on this concept.
Milgram (1967)
“Everybody on this planet is separated by only six other people. Six degrees of
separation. Between us and everybody else on this planet. The president of the United
States. A gondolier in Venice… It’s not just the big names. It’s anyone. A native in a rain
forest. A Tierra del Fuegan. An Eskimo. I am bound to everyone on this planet by a trail
of six people…”
![Page 33: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/33.jpg)
Today• PageRank algorithm
• Introduction to Social Networks
![Page 34: CSE 494/598 Lecture-9: Social Networks and their ...lmanikon/CSE494-598/lectures/lecture9.pdfAmitabh Bachchan Prof. Kannan Prof. Prahalad Soumya Nandana Sen Prof. Amartya Sen Prof.](https://reader034.fdocuments.us/reader034/viewer/2022042913/5f4c72580a0d1f05a544bd8c/html5/thumbnails/34.jpg)
In-class exercise: Crawling WebUSING TWITTER API