Slides modified from Huan Liu, Lei Tang, Nitin Agarwal, Reza Zafarani

Slides:



Advertisements
Similar presentations
Community Detection and Graph-based Clustering
Advertisements

Clustering.
Hierarchical Clustering. Produces a set of nested clusters organized as a hierarchical tree Can be visualized as a dendrogram – A tree-like diagram that.
Community Detection and Evaluation
Online Social Networks and Media. Graph partitioning The general problem – Input: a graph G=(V,E) edge (u,v) denotes similarity between u and v weighted.
Social Media Mining Chapter 5 1 Chapter 5, Community Detection and Mining in Social Media. Lei Tang and Huan Liu, Morgan & Claypool, September, 2010.
Feb 20, Definition of subgroups Definition of sub-groups: “Cohesive subgroups are subsets of actors among whom there are relatively strong, direct,
V4 Matrix algorithms and graph partitioning
Lecture 21: Spectral Clustering
Lecture 8 Communities Slides modified from Huan Liu, Lei Tang, Nitin Agarwal.
Communities in Heterogeneous Networks Chapter 4 1 Chapter 4, Community Detection and Mining in Social Media. Lei Tang and Huan Liu, Morgan & Claypool,
Clustering… in General In vector space, clusters are vectors found within  of a cluster vector, with different techniques for determining the cluster.
© University of Minnesota Data Mining for the Discovery of Ocean Climate Indices 1 CSci 8980: Data Mining (Fall 2002) Vipin Kumar Army High Performance.
L16: Micro-array analysis Dimension reduction Unsupervised clustering.
Fast algorithm for detecting community structure in networks.
Segmentation Graph-Theoretic Clustering.
Ranking by Odds Ratio A Probability Model Approach let be a Boolean random variable: document d is relevant to query q otherwise Consider document d as.
Network Measures Social Media Mining. 2 Measures and Metrics 2 Social Media Mining Network Measures Klout.
Clustering Unsupervised learning Generating “classes”
Domain decomposition in parallel computing Ashok Srinivasan Florida State University COT 5410 – Spring 2004.
Lecture 18 Community structures Slides modified from Huan Liu, Lei Tang, Nitin Agarwal.
Social Media Mining Community Analysis.
A Clustering Algorithm based on Graph Connectivity Balakrishna Thiagarajan Computer Science and Engineering State University of New York at Buffalo.
Lecture 5: Mathematics of Networks (Cont) CS 790g: Complex Networks Slides are modified from Networks: Theory and Application by Lada Adamic.
Chapter 3. Community Detection and Evaluation May 2013 Youn-Hee Han
CS 8751 ML & KDDData Clustering1 Clustering Unsupervised learning Generating “classes” Distance/similarity measures Agglomerative methods Divisive methods.
Domain decomposition in parallel computing Ashok Srinivasan Florida State University.
University at BuffaloThe State University of New York Detecting Community Structure in Networks.
Community Discovery in Social Network Yunming Ye Department of Computer Science Shenzhen Graduate School Harbin Institute of Technology.
Mining information from social media
CS 590 Term Project Epidemic model on Facebook
Lecture 7 Communities Slides modified from Huan Liu, Lei Tang, Nitin Agarwal.
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Cluster Analysis This lecture node is modified based on Lecture Notes for Chapter.
Community structure in graphs Santo Fortunato. More links “inside” than “outside” Graphs are “sparse” “Communities”
Informatics tools in network science
Network Theory: Community Detection Dr. Henry Hexmoor Department of Computer Science Southern Illinois University Carbondale.
1 Microarray Clustering. 2 Outline Microarrays Hierarchical Clustering K-Means Clustering Corrupted Cliques Problem CAST Clustering Algorithm.
Example Apply hierarchical clustering with d min to below data where c=3. Nearest neighbor clustering d min d max will form elongated clusters!
Network Partition –Finding modules of the network. Graph Clustering –Partition graphs according to the connectivity. –Nodes within a cluster is highly.
Graph clustering to detect network modules
Unsupervised Learning
Social Media Analytics
Cohesive Subgraph Computation over Large Graphs
Computational Molecular Biology
Semi-Supervised Clustering
Clustering CSC 600: Data Mining Class 21.
Groups of vertices and Core-periphery structure
Slides modified from Huan Liu, Lei Tang, Nitin Agarwal, Reza Zafarani
Minimum Spanning Tree 8/7/2018 4:26 AM
Nithin Michael, Yao Wang, G. Edward Suh and Ao Tang Cornell University
Greedy Algorithm for Community Detection
Community detection in graphs
Degree and Eigenvector Centrality
Peer-to-Peer and Social Networks
Hierarchical clustering approaches for high-throughput data
Segmentation Graph-Theoretic Clustering.
Effective Social Network Quarantine with Minimal Isolation Costs
CSE572, CBS598: Data Mining by H. Liu
Clustering.
Data Mining – Chapter 4 Cluster Analysis Part 2
3.3 Network-Centric Community Detection
Slides modified from Huan Liu, Lei Tang, Nitin Agarwal, Reza Zafarani
Cluster Analysis.
Text Categorization Berlin Chen 2003 Reference:
CSE572: Data Mining by H. Liu
Hierarchical Clustering
Clustering.
Unsupervised Learning
Presentation transcript:

Slides modified from Huan Liu, Lei Tang, Nitin Agarwal, Reza Zafarani Lecture 8 Communities Slides modified from Huan Liu, Lei Tang, Nitin Agarwal, Reza Zafarani

Communities Community: “subsets of actors among whom there are relatively strong, direct, intense, frequent or positive ties.” -- Wasserman and Faust, Social Network Analysis, Methods and Applications Community is a set of actors interacting with each other frequently a.k.a. group, subgroup, module, cluster A set of people without interaction is NOT a community

Example of Communities Communities from Facebook Communities from Flickr

Why analyze communities? Analyzing communities helps better understand users Users form groups based on their interests Groups provide a clear global view of user interactions E.g., find polarization Some behaviors are only observable in a group setting and not on an individual level Some republican can agree with some democrats, but their parties can disagree Explicitly vs. implicitly formed groups

Example: political blogs (Aug 29th – Nov 15th, 2004) all citations between A-list blogs in 2 months preceding the 2004 election citations between A-list blogs with at least 5 citations in both directions edges further limited to those exceeding 25 combined citations only 15% of the citations bridge communities source: Adamic & Glance, LinkKDD2005

Implicit communities in other domains Protein-protein interaction networks Communities are likely to group proteins having the same specific function within the cell World Wide Web Communities may correspond to groups of pages dealing with the same or related topics Metabolic networks Communities may be related to functional modules such as cycles and pathways Food webs Communities may identify compartments

Community Detection Community Detection: “formalize the strong social groups based on the social network properties” a.k.a. grouping, clustering, finding cohesive subgroups Given: a social network Output: community membership of (some) actors Some social media sites allow people to join groups Not all sites provide community platform Not all people join groups Groups are not active: the group members seldom talk to each other Explicitly vs. implicitly formed groups

Community Detection Network interaction provides rich information about the relationship between users Is it necessary to extract groups based on network topology? Groups are implicitly formed Can complement other kinds of information Provide basic information for other tasks Applications Understanding the interactions between people Visualizing and navigating huge networks Forming the basis for other tasks such as data mining

Why Detecting Communities is Important? Zachary's karate club Interactions between 34 members of a karate club for over two years The club members split into two groups (gray and white) Disagreement between the administrator of the club (node 34) and the club’s instructor (node 1), The members of one group left to start their own club The same communities can be found using community detection

Subjectivity of Community Definition Each component is a community A densely-knit community No objective definition for a community Visualization might help, but only for small networks Real-world networks tend to be noisy Need a proper criteria Definition of a community can be subjective.

Overlapping vs. Disjoint Communities Overlapping Communities Disjoint Communities

User Preference or Behavior can be represented as class labels Classification User Preference or Behavior can be represented as class labels Whether or not clicking on an ad Whether or not interested in certain topics Subscribed to certain political views Like/Dislike a product Given A social network Labels of some actors in the network Output Labels of remaining actors in the network

Visualization after Prediction Predictions 6: Non-Smoking 7: Non-Smoking 8: Smoking 9: Non-Smoking 10: Smoking : Smoking : Non-Smoking : ? Unknown

Output a list of (ranked) pairs of nodes Link Prediction Given a social network, predict which nodes are likely to get connected Output a list of (ranked) pairs of nodes Example: Friend recommendation in Facebook (2, 3) (4, 12) (5, 7) (7, 13)

how modularity can help us visualize large networks source: M. E. J. Newman and M. Girvan, Finding and evaluating community structure in networks, Physical Review E 69, 026113 (2004).

What general properties indicate cohesion? mutuality of ties everybody in the group knows everybody else closeness or reachability of subgroup members individuals are separated by at most n hops frequency of ties among members everybody in the group has links to at least k others in the group relative frequency of ties among subgroup members compared to nonmembers

Viral Marketing/Outbreak Detection Users have different social capital (or network values) within a social network, hence, how can one make best use of this information? Viral Marketing: find out a set of users to provide coupons and promotions to influence other people in the network so benefit is maximized Outbreak Detection: monitor a set of nodes that can help detect outbreaks or interrupt the infection spreading (e.g., H1N1 flu) Goal: given a limited budget, how to maximize the overall benefit?

An Example of Viral Marketing Find the coverage of the whole network of nodes with the minimum number of nodes How to realize it – an example Basic Greedy Selection: Select the node that maximizes the utility, remove the node and then repeat Select Node 1 Select Node 8 Select Node 7 Node 7 is not a node with high centrality!

Discover communities of practice Measure isolation of groups Other reasons to care Discover communities of practice Measure isolation of groups Threshold processes: I will adopt an innovation if some number of my contacts do I will vote for a measure if a fraction of my contacts do

Why care about group cohesion? opinion formation and uniformity if each node adopts the opinion of the majority of its neighbors, it is possible to have different opinions in different cohesive subgroups

within a cohesive subgroup – greater uniformity

Bridge: an edge, that when removed, splits off a community Bridges Bridge: an edge, that when removed, splits off a community Bridges can act as bottlenecks for information flow younger & Spanish speaking younger & English speaking bridges older & English speaking union negotiators network of striking employees source: de Nooy et al., Exploratory Social Network Analysis with Pajek, Chapter 7, Cambridge U. Press, 2005.

Cut-vertices and bi-components Removing a cut-vertex creates a separate component bi-component: component of minimum size 3 that doesn’t contain a cut-vertex (vertex that would split the component) bi-component cut-vertex source: de Nooy et al., Exploratory Social Network Analysis with Pajek, Chapter 7, Cambridge U. Press, 2005.

Ego-networks and constraint ego-network: a vertex, all its neighbors, and connections among the neighbors Alejandro’s ego-centered network Alejandro is a broker between contacts who are not directly connected source: de Nooy et al., Exploratory Social Network Analysis with Pajek, Chapter 7, Cambridge U. Press, 2005.

Community Detection vs. Clustering   From Lei’s Slides

Taxonomy of Community Criteria Criteria vary depending on the tasks Roughly, community detection methods can be divided into 4 categories (not exclusive): Node-Centric Community Each node in a group satisfies certain properties Group-Centric Community Consider the connections within a group as a whole. The group has to satisfy certain properties without zooming into node-level Network-Centric Community Partition the whole network into several disjoint sets Hierarchy-Centric Community Construct a hierarchical structure of communities

Node-Centric Community Detection Group-Centric Network-Centric Hierarchy-Centric

Node-Centric Community Detection Nodes satisfy different properties Complete Mutuality cliques Reachability of members k-clique, k-clan, k-club Nodal degrees k-plex, k-core Relative frequency of Within-Outside Ties LS sets, Lambda sets Commonly used in traditional social network analysis

Complete Mutuality: Clique A maximal complete subgraph of three or more nodes all of which are adjacent to each other Find communities by searching for The maximum clique: the one with the largest number of vertices, or All maximal cliques: cliques that are not subgraphs of a larger clique; i.e., cannot be expanded further Both are NP-hard problems

Brute-Force Method    

Enhancing the Brute-Force Performance  

Maximum Clique: Pruning…   Even with pruning, cliques are less desirable Cliques are rare A clique of 1000 nodes, has 999x1000/2 edges A single edge removal destroys the clique That is less than 0.0002% of the edges! Normally use cliques as a core or seed to explore larger communities

Geodesic Reachability is calibrated by the Geodesic distance Geodesic: a shortest path between two nodes (12 and 6) Two paths: 12-4-1-2-5-6, 12-10-6 12-10-6 is a geodesic Geodesic distance: #hops in geodesic between two nodes e.g., d(12, 6) = 2, d(3, 11)=5 Diameter: the maximal geodesic distance for any 2 nodes in a network #hops of the longest shortest path 6 degrees of separation is the average distance, not the maximum one. Diameter = 5

Reachability: k-clique, k-club Any node in a group should be reachable in k hops k-clique: a maximal subgraph in which the largest geodesic distance between any nodes <= k A k-clique can have diameter larger than k within the subgraph e.g., 2-clique {12, 4, 10, 1, 6} Within the subgraph d(1, 6) = 3 k-club: a substructure of diameter <= k e.g., {1,2,5,6,8,9}, {12, 4, 10, 1} are 2-clubs V1, v2, v3, v4, v5 is also a 3-clan Both k-clans and k-clubs are k-cliques. Node-centric community definition are either too strict , or it is too time-consuming to find the groups.

Nodal Degrees: k-core, k-plex Each node should have a certain number of connections to nodes within the group k-core: a substracture that each node connects to at least k members within the group k-plex: for a group with ns nodes, each node should be adjacent no fewer than ns-k in the group The definitions are complementary A k-core is a (ns-k)-plex However, the set of all k-cores for a given k is not same as the set of all (ns-k)-plexes as group size ns can vary for each k-core. The union of k-core is still a k-core.

Within-Outside Ties: LS sets LS sets: Any of its proper subsets has more ties to other nodes in the group than outside the group Too strict, not reasonable for network analysis A relaxed definition is k-component Require the computation of edge-connectivity between any pair of nodes via minimum-cut, maximum-flow algorithm 1-component is a connected component

Recap of Node-Centric Communities Each node has to satisfy certain properties Complete mutuality Reachability Nodal degrees Within-Outside ties Limitations: Too strict, but can be used as the core of a community Not scalable, commonly used in network analysis with small-size network Sometimes not consistent with property of large-scale networks e.g., nodal degrees for scale-free networks

Group-Centric Community Detection Node-Centric Group-Centric Network-Centric Hierarchy-Centric

Group-Centric Community Detection Consider the connections within a group as whole, Some nodes may have low connectivity A subgraph with Vs nodes and Es edges is a γ-dense quasi-clique if Recursive pruning: Sample a subgraph, find a maximal γ-dense quasi-clique the resultant size = k Remove the nodes that whose degree < kγ all their neighbors with degree < kγ A greedy algorithm is adopted to find a maximal quasi-clique Starting from the node with largest degree, expanding it with nodes that are likely to contribute to a larger quasi-clique Continue until no more nodes can be added

IV. Dense Communities: -dense  

Finding Maximal -dense Quasi-Cliques We can use a two-step procedure consisting of “local search” and “heuristic pruning” Local search Sample a subgraph, and find a maximal -dense quasi-clique A greedy approach is to expand a quasi-clique by all of its high-degree neighbors until the density drops below  Heuristic pruning For a -dense quasi-clique of size k, we recursively remove nodes with degree less than  k and incident edges We can start from low-degree nodes and recursively remove all nodes with degree less that  k

Network-Centric Community Detection Node-Centric Group-Centric Network-Centric Hierarchy-Centric

Network-Centric Community Detection To form a group, we need to consider the connections of the nodes globally. Goal: partition the network into disjoint sets Groups based on Node Similarity Latent Space Model Block Model Approximation Cut Minimization Modularity Maximization

Node Similarity Node similarity is defined by how similar their interaction patterns are Two nodes are structurally equivalent if they connect to the same set of actors e.g., nodes 8 and 9 are structurally equivalent Groups are defined over equivalent nodes Too strict Rarely occur in a large-scale Relaxed equivalence class is difficult to compute In practice, use vector similarity e.g., cosine similarity, Jaccard similarity Related to positional analysis

Vector Similarity Cosine Similarity: Jaccard Similarity: a vector 1 2 3 4 5 6 7 8 9 10 11 12 13 a vector structurally equivalent Cosine Similarity: Jaccard Similarity:

Clustering based on Node Similarity For practical use with huge networks: Consider the connections as features Use Cosine or Jaccard similarity to compute vertex similarity Apply classical k-means clustering Algorithm K-means Clustering Algorithm Each cluster is associated with a centroid (center point) Each node is assigned to the cluster with the closest centroid

Illustration of k-means clustering

Shingling can be exploited Pair-wise computation of similarity can be time consuming with millions of nodes Shingling can be exploited Mapping each vector into multiple shingles so the Jaccard similarity between two vectors can be computed by comparing the shingles Implemented using a quick hash function Similar vectors share more shingles after transformation Nodes of the same shingle can be considered belonging to one community In reality, we can apply 2-level shingling

Fast Two-Level Shingling 1 2 3 4 5 6 Nodes 1st level shingling Shingles 2nd level shingling Meta-Shingles 1, 2, 3, 4 2, 3, 4, 5, 6

Groups on Latent-Space Models Latent-space models: Transform the nodes in a network into a lower-dimensional space such that the distance or similarity between nodes are kept in the Euclidean space Multidimensional Scaling (MDS) Given a network, construct a proximity matrix to denote the distance between nodes (e.g. geodesic distance) Let D denotes the square distance between nodes denotes the coordinates in the lower-dimensional space Objective: minimize the difference Let (the top-k eigenvalues of ), V the top-k eigenvectors Solution: Apply k-means to S to obtain clusters

Geodesic Distance Matrix MDS-example 1, 2, 3, 4, 10, 12 5, 6, 7, 8, 9, 11, 13 k-means S Geodesic Distance Matrix -1.22 -0.12 -0.88 -0.39 -2.12 -0.29 -1.01 1.07 0.43 -0.28 0.78 0.04 1.81 0.02 -0.09 -0.77 0.30 1.18 2.85 0.00 -0.47 2.13 -1.81 1 2 3 4 5 6 7 8 9 10 11 12 13 Node 3 and 11 are furthest, so in the mapped space, 3 and 11 are far away. For nodes 8 and 9, they map to exactly the same location as the distance to all the other nodes are the same. MDS

Block-Model Approximation After Reordering Network Interaction Matrix Block Structure Objective: Minimize the difference between an interaction matrix and a block structure Challenge: S is discrete, difficult to solve Relaxation: Allow S to be continuous satisfying Solution: the top eigenvectors of A Post-Processing: Apply k-means to S to find the partition S is a community indicator matrix L is the loss function, A is the network interaction matrix, \sigma is a diagonal matrix represents the interaction density, and S is the indicator matrix Need to introduce the community indicator here

Cut-Minimization Between-group interactions should be infrequent Cut: number of edges between two sets of nodes Objective: minimize the cut Limitations: often find communities of only one node Need to consider the group size Two commonly-used variants: Cut=2 Number of nodes in a community Cut =1 Number of within-group Interactions

Ratio Cut & Normalized Cut: Example B A For Cut A For Cut B Both ratio cut and normalized cut prefer a balanced partition

Graph Laplacian Cut-minimization can be relaxed into the following min-trace problem L is the (normalized) Graph Laplacian Solution: S are the eigenvectors of L with smallest eigenvalues (except the first one) Post-Processing: apply k-means to S a.k.a. Spectral Clustering The first eigenvectors essentially represents all the nodes belong to one community, not very interesting

Spectral Clustering: Example     The 1st eigenvector is discarded   2 Eigenvectors i.e., we want 2 communities

Modularity and Modularity Maximization Given a degree distribution, we know the expected number of edges between any pairs of vertices We assume that real-world networks should be far from random. Therefore, the more distant they are from this randomly generated network, the more structural they are. Modularity defines this distance and modularity maximization tries to maximize this distance

Modularity Maximization Modularity measures the group interactions compared with the expected random connections in the group In a network with m edges, for two nodes with degree di and dj , expected random connections between them are The interaction utility in a group: To partition the group into multiple groups, we maximize Most previous methods do not consider the degree distribution of nodes. 2m is added to normalize the modularity between -1 and 1. Larger modularity means the interaction is substantiallyfrquent than random. Thus, should be a community. Expected Number of edges between 6 and 9 is 5*3/(2*17) = 15/34

Modularity Matrix The modularity maximization can also be formulated in matrix form B is the modularity matrix Solution: top eigenvectors of the modularity matrix

Modularity Maximization Modularity matrix   Reformulation of the modularity  

Properties of Modularity Between (-1, 1) Modularity = 0 If all nodes are clustered into one group Can automatically determine optimal number of clusters Resolution limit of modularity Modularity maximization might return a community consisting multiple small modules

Modularity Maximization: Example Two Communities: {1, 2, 3, 4} and {5, 6, 7, 8, 9}   From Lei Tang’s Book and Slides 2 eigenvectors Modularity Matrix

Matrix Factorization Form For latent space models, block models, spectral clustering and modularity maximization All can be formulated as (Latent Space Models) Sociomatrix (Block Model Approximation) Graph Laplacian (Cut Minimization) Modularity Matrix (Modularity maximization) X=

Recap of Network-Centric Community Network-Centric Community Detection Groups based on Node Similarity Latent Space Models Cut Minimization Block-Model Approximation Modularity maximization Goal: Partition network nodes into several disjoint sets Limitation: Require the user to specify the number of communities beforehand

Hierarchy-Centric Community Detection Node-Centric Group-Centric Network-Centric Hierarchy-Centric

Hierarchy-Centric Community Detection Goal: Build a hierarchical structure of communities based on network topology Facilitate the analysis at different resolutions Representative Approaches: Divisive Hierarchical Clustering Agglomerative Hierarchical Clustering

Divisive Hierarchical Clustering Partition the nodes into several sets Each set is further partitioned into smaller sets Network-centric methods can be applied for partition One particular example is based on edge-betweenness Edge-Betweenness: Number of shortest paths between any pair of nodes that pass through the edge Between-group edges tend to have larger edge-betweenness

The Girvan-Newman Algorithm Calculate edge betweenness for all edges in the graph. Remove the edge with the highest betweenness. Recalculate betweenness for all edges affected by the edge removal. Repeat until all edges are removed.

Divisive clustering on Edge-Betweenness 3 5 4 Progressively remove edges with the highest betweenness Remove e(2,4), e(3, 5) Remove e(4,6), e(5,6) Remove e(1,2), e(2,3), e(3,1) root V1,v2,v3 V4, v5, v6 v1 v2 v3 v4 v5 v6

Agglomerative Hierarchical Clustering Initialize each node as a community Choose two communities satisfying certain criteria and merge them into larger ones Maximum Modularity Increase Maximum Node Similarity root V1,v2 V4, v5, v6 v1 v2 v3 v5 v6 v4 V1, v2, v3 (Based on Jaccard Similarity) A Hierarchy constructed based on Jaccard similarity

Recap of Hierarchical Clustering Most hierarchical clustering algorithm output a binary tree Each node has two children nodes Might be highly imbalanced Agglomerative clustering can be very sensitive to the nodes processing order and merging criteria adopted. Divisive clustering is more stable, but generally more computationally expensive

Hierarchical clustering: Zachary Karate Club source: Girvan and Newman, PNAS June 11, 2002 99(12):7821-7826

Is hierarchical clustering really this bad? Zachary karate club data hierarchical clustering tree using edge-independent path counts

betweenness clustering algorithm & the karate club data set

Summary of Community Detection The Optimal Method? It varies depending on applications, networks, computational resources etc. Other lines of research Communities in directed networks Overlapping communities Community evolution Group profiling and interpretation Community Detection Node-Centric Group-Centric Network-Centric Hierarchy-Centric

Network and Community Evolution How does a network change over time? How does a community change over time? What properties do you expect to remain roughly constant? What properties do you expect to change? For example, Where do you expect new edges to form? Which edges do you expect to be dropped?