SMA Module1
SMA Module1
Analytics
Module 1
Introduction to Social Networks/Media
Overview - Introduction to Social Networks/Media
Built on the Web 2.0 philosophy (i.e. give more control to the
user over the content) social media is an easy-to-use
Internet-based platform that provides users with
opportunities to create and exchange content (such as text
videos audio and graphics) in a many-to-many context.
What is Social Media?
4
Examples of Social Media Platforms:
• Facebook: One of the earliest and most popular social networking
platforms, Facebook allows users to connect with friends, share updates,
photos, and videos, and join interest-based groups.
• Instagram: Focused on visual content, Instagram is a platform for sharing
photos and short videos. It is widely used by individuals, influencers, and
businesses for brand promotion.
• Twitter: Known for its short-form content (tweets limited to 280 characters),
Twitter is a microblogging platform that facilitates real-time conversations
and the sharing of news and updates.
• LinkedIn: Geared towards professionals, LinkedIn is a platform for
networking and career development. Users can showcase their professional
achievements, connect with colleagues, and explore job opportunities.
Examples
• 💡 Problem: A brand notices a tweet goes viral but doesn’t know why.
• Social Media: Platforms (like Twitter, Facebook, Instagram) where users create,
share, and engage with content.
• Social Networks: The underlying connections between people, organizations, and
communities that exist within and outside of social media.
• 📌 Example of Their Connection:
• When you follow someone on Instagram, you're creating a social network
connection.
• When you like, comment, or share a post, you're engaging in social media activity—
which can be analyzed using Social Network Analysis (SNA) to understand who
influences whom.
What is Social Network Analysis?
Network:
An abstract representation of relations
among entities
Social Network:
A simplified representation of the social
structure characterized by actors and ties
A graph having neither self loops nor parallel edges are called a
simple graph.
A graph having directed edges (i.e. links having a direction) is
called a directed graph. Directed edges are also referred to as
arcs. A directed graph
A graph having no direction in its edges is called an undirected
A graph with loops 3
graph.
and parallel edges 3
A graph having weights associated with its edges are called a -6
1
weighted graph. A weighted graph can be directed as well as 6 2 9 7
undirected. 4 7
A graph having its nodes and/or edges attributed with feature -5
values is called an attributed graph. -2
A simple graph A weighted graph
A sample of Twitter follower-followee network
(image source: http://allthingsgraphed.com/2014/11/02/twitter-friends-network/)
Social Networks
• A social network is a set of actors that may have relationships with one
another.
• Networks can have few or many actors (nodes), and one or more kinds of
relations (edges) between pairs of actors.
• A social relation is anything that links two actors. Examples include:
• Kinship Co-membership
• Friendship Talking with
• Exchange Trust
• Coauthorship
Facebook as a Graph
• In the Facebook network model, there are three types of nodes which are users, posts
and groups.
• The links are friendship (red), reactions on posts (green), creation of posts (blue),
messages (pink) and group membership (purple).
• Four sub graphs can be extracted from Facebook network model to analyze the user
behavior of Facebook.
• They are; Friendship graph, Graph for reacting on posts, Groups graph, Messaging graph.
Social Network as a Graph
Node
Edge
Graphs - Sociograms
• In a friendship social graph, nodes are people and any pair of people connected
denotes the friendship between them
• Depending on the context, these nodes are called nodes, or actors
– In a web graph, “nodes” represent sites and the connection between nodes indicates web-
links between them
– In a social setting, these nodes are called actors
– The size of the graph is
Edges
• In a social setting, where nodes represent social entities such as people, edges
indicate internode relationships and are therefore known as relationships or
(social) ties
An adjacency matrix 𝐴 = 𝑎𝑖𝑗 for a graph 𝐺(𝑉, 𝐸) is a square matrix of dimension |𝑉| × |𝑉|
such that each element 𝑎𝑖𝑗 of A indicates the existence of an edge between the node 𝑣𝑖 and
node 𝑣𝑗 (also the weight of the corresponding edge in case of a weighted graph) in 𝐺.
8
1 2 1 2
0 1 1 0 0 7
1 0 1 1 1 5 0 8 3 0 0
A(G1) = 1 1 0 0 1 3 6 8 0 5 6 7
5 0 1 0 0 1 5 A(G2) = 3 5 0 0 9
0 1 1 1 0 0 6 0 0 2
3 3 9 0 7 9 2 0
2
4 4
G1 G2
Adjacency Matrix (a.k.a. sociomatrix)
Proximity 15
Jim Jill Jen Joe 3
2
Jim - 3 9 2 Joe
Jill 3 - 1 15
Jen 9 1 - 3
Joe 2 15 3 -
Adjacency Matrix and Connectivity
Advantages Disadvantages
An adjacency list for a graph 𝐺(𝑉, 𝐸) is a collection of unordered lists such that each node
correspond to a list from the collection that indicates the set of neighbours of the node.
Every entry in an adjacency list 𝐴𝑖 for node 𝑣𝑖 in the graph is a node adjacent to node 𝑣𝑖
1 2 3 1 2,8 3,3
1 2 1 8 2
2 7 2 1,8 3,5 4,6 5,7
1 3 4 5 5
5 3 6 5
3 3 1 2 5 3 1,3 2,5 5,9
3 9
4 2
4 2 5 4 4 2,6 5,2
G1 G2
5 2 3 4 5 2,7 3,9 4,2
Network Representation: Adjacency List (Cont…)
advantages disadvantages
Require 𝑂(|𝑉|+|𝐸|) space
Removal of edge require 𝑂(|𝐸|)
Insertion of vertex and edge require time
𝑂(1) time
Query to an edge require 𝑂(|𝑉|)
Removal of vertex require time
𝑂(|𝑉|+|𝐸|) time
Adjacency List
• In an adjacency list for every node, we maintain a list of all the nodes that it
is connected to
• The list is usually sorted based on the node order or other preferences
Edge List
In general, a relation can be: (1) Binary or Valued (2) Directed or Undirected
b d b d
a c e a c e
b d b d
1 3 1 2
a c
4
e a c e
Relationship exists (1) or does not Two people are friends on Facebook
Binary Relation
exist (0) or not
Relationship has a weight (frequency, Number of messages exchanged on
Valued Relation
strength) WhatsApp
Jack
Bob
Alex Eve
Tim
Stan
Bob
Irene
DBLP- Weighted Edges
Tan
2 2
1
Liu Ping Mark
3
2
Han
1
Kumar
Heterogenous Social Graphs
• Different types of entities (multi-mode network) and relationships
(multirelational network).
–Co-purchasing network -product nodes and customer nodes. Edges may
exist if a customer purchases a product.
–In Amazon it is reasonable existence of distributor information to add a
third type of node.
–Edges between customer and a product, a product sold by a distributor,
and also a customer and a distributor. Different customers could buy the
same product from different distributors.
–Movies dataset UCI eight different node types, actor, movie, role, studio,
distributor, genre, award and country and links between them.
• k-partite graph - k is the number of different node types.
• k-partite graph consists of k disjoint sets of nodes, with no edges between
nodes of the same set.
• One special graph is a bi-partite graph where k=2.
A tripartite Social Graph
X1 X2
X3
A
P1
B C
P2
Signed Graphs
Used to model the situation when links can join any pair of nodes
of the network
Network Types: Link-centric View
Bipartite Network
Consists of a vertex set V that is divided into two sets V1
and V2 that are disjoint and independent. Each edge of the
network connects a vertex in V1 to another vertex in V2
Example: An e-commerce user-product network. One part
consists of the users, the other part consists of the
products, the links are based on the basis of who bought
what.
Generalization of Bipartite network is n-partite networks,
where the vertex set is partitioned into n number of part,
an edges join a node from one part with a node from
another part.
Network Types: Link-centric View
Signed Networks
Consists of a set of nodes V, a set of edges E, and a function f : E
+ → {+, −} that assigns each edge a positive or a negative sign
+
+ -
+ Example: Consider a social media website that allows users to
+ - tag other users as friends or foes. The positive edges are
friendship links and negative links are between foes.
Example: We consider a specific instance of Facebook network like ECE, IIT CSE, NIT
the figure
Nodes are some Facebook users ECE, NIT
CSE, IIT
Edges are given by Facebook friendship relationship between CSE, NIT
these users
CSE, IIT ECE, IIT
Node attributes are the users’ academic affiliations
There is no edge attribute in this network
The example is a node-attributed network
Network Types: Node and Link-centric View: Multidimensional
Network
Consists of a set of nodes V and a set of edges E where each edge ei,j ∈ E is
represented by a three- tuple ei,j = {vi, vj, tij}. Here, vi and vj are two end-points, and
tij indicates the persistence duration of the edge eij
• Study Benefits
To know the way social interactions influence a network
To learn how the information flows inside a network
To characterize roles of the individuals in a network
To characterize communities inside a network
To characterize the evolution of a network
Key Application Areas
https://library.bu.edu/citedreferences
SNA Applications: Scientific Research & Academic Collaboration
https://scholarlykitchen.sspnet.org/2017/04/07/updated-figures-
scale-nature-researchers-use-scholarly-collaboration-networks/
SNA Applications: Computer-supported Collaborative Learning
https://www.semanticscholar.org/paper/The-Characteristics-of-the-Computer-
Supported-a-on-Hashim-Ismail/42176e6bf76dd15a2c9874e6fa8696e153a3f554
Popular Real-world Networks
We begin by analyzing how a pair of nodes interacts and gradually trace the
interactions at the group level or subgraph level.
Dyadic level Interaction patterns among two nodes
Examined properties: homophily, reciprocity, social equality, mutuality, etc.
Derived global statistics: assortativity, mixing coefficient, etc.
Triadic level Interaction patterns among three nodes
Examined properties: triadic closure
Derived network properties: Clustering Coefficient, local bridges, etc.
Ego-centric circles Interaction pattern between ego node with its alters
Levels of Social Network Analysis: Mesoscopic Level
Mesoscopic analysis is an intermediary between microscopic and macroscopic
analyses, which mostly deals with a subset of the entire population.
Communities Formed due to frequent interactions among homogeneous
nodes in a network
Within a community, the nodes exhibit a particular kind of dynamicity
Across communities, the dynamic behaviour differs
Network Motifs Subgraphs that repeat themselves frequently within or across
a network
Highly effective in capturing functional properties in a network
At macroscopic level, we deal with the entire network as a whole and try to
understand the micro-level dynamics by exploring the overall graph property.
Features of Interest :
Connectedness,
Diameter or Average path length,
Degree Distribution,
Edge Density, etc.
Example:
We find that the diameter of a network is too small ⇒ network may look like a
star, or a clique
We further find that overall edge density is too high ⇒ network looks like a clique
History - Early Foundations (1930s–1970s)
Year Key Event Contributor(s) Significance
First graphical
1930s Sociograms introduced Jacob Moreno representation of social
networks
Mathematical modeling
1950s Random graph theory Paul Erdős, Alfréd Rényi
of networks
Basis for network flow
1950s Information theory Claude Shannon and communication
models
Explains how weak
1973 Strength of Weak Ties Mark Granovetter connections help spread
information
Defines key measures:
1979 Social network centrality Linton Freeman degree, closeness,
betweenness
History - Computational & Web Graphs (1990s–2000s)
Year Key Event Contributor(s) Significance
Larry Page, Sergey Ranks web pages using link
1998 PageRank algorithm
Brin analysis
Duncan Watts, Shows real-world networks
1999 Small-world networks
Steven Strogatz have short path lengths
Facebook's Social Popularizes social graph
2003 Mark Zuckerberg
Graph concept
Twitter’s follower First large-scale directed
2006 Twitter Team
network social network
Identifies hubs and
2008 HITS algorithm Jon Kleinberg authorities in social
networks
History - AI & Big Data in Social Networks (2010s)
Year Key Event Contributor(s) Significance
Enables efficient storage
2012 Graph Databases Neo4j Team of large-scale social
graphs
Introduces deep
2014 DeepWalk Algorithm Perozzi et al. learning on graphs for
embeddings
Improves representation
2015 Node2Vec Algorithm Grover & Leskovec learning for social
networks
Graph Convolutional Applies deep learning to
2017 Kipf & Welling
Networks (GCN) graph-structured data
Uses attention
Graph Attention
2018 Veličković et al. mechanisms for social
Networks (GAT)
graph analysis
History - Real-Time & AI-Driven Social Graphs (2020s & Beyond)