Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf ·...

36
Scalable Clustering of Signed Networks Using Balance Normalized Cut Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin The 21st ACM International Conference on Information and Knowledge Management (CIKM 2012) Oct. 29 - Nov. 2, 2012 Joyce Jiyoung Whang University of Texas at Austin

Transcript of Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf ·...

Page 1: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Scalable Clustering of Signed Networks Using BalanceNormalized Cut

Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. DhillonUniversity of Texas at Austin

The 21st ACM International Conference on Information and KnowledgeManagement (CIKM 2012)

Oct. 29 - Nov. 2, 2012

Joyce Jiyoung Whang University of Texas at Austin

Page 2: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Contents

Introduction

Clustering of Unsigned Networks

Signed Networks and Social Balance

Clustering via Signed Laplacian

k-way Signed Objectives for Clustering

Multilevel Approach for Large-scale Signed Graph Clustering

Experimental Results

Conclusions

Joyce Jiyoung Whang University of Texas at Austin

Page 3: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Introduction

Social NetworksNodes: the individual actorsEdges: the relationships (social interactions) between the actors

Joyce Jiyoung Whang University of Texas at Austin

Page 4: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Introduction

Signed Networks

Positive relationship: friendship, collaborationNegative relationship: distrust, disagreement

Clustering problem in signed networks

Entities within the same cluster have a positive relationship.Entities between different clusters have a negative relationship.

Contributions

New k-way objectives and kernels for signed networks.Show equivalence between our new k-way objectives and a generalweighted kernel k-means objective.Fast and scalable clustering algorithm for signed networks.

Joyce Jiyoung Whang University of Texas at Austin

Page 5: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Clustering of Unsigned Networks

Joyce Jiyoung Whang University of Texas at Austin

Page 6: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Graph Cuts on Unsigned Networks

Ratio Cut objectiveMinimizes the number of edges between different clusters relative to thesize of the cluster.The graph Laplacian L = D − A where Dii =

∑nj=1 Aij .

min{x1,...,xk}∈I

(k∑

c=1

xTc LxcxTc xc

).

Under the special case k = 2,

minx

(xTLx

), where xi =

{√|π2|/|π1|, if node i ∈ π1,

−√|π1|/|π2|, if node i ∈ π2.

Joyce Jiyoung Whang University of Texas at Austin

Page 7: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Graph Cuts on Unsigned Networks

Ratio Association objectiveMaximizes the number of edges within clusters relative to the size of thecluster.

max{x1,...,xk}∈I

(k∑

c=1

xTc AxcxTc xc

), where xc(i) =

{1, if node i ∈ πc ,0, otherwise.

Normalized Association and Normalized Cut objectivesNormalized by the volume of each cluster.The volume of a cluster: the sum of degrees of nodes in the cluster.

max{x1,...,xk}∈I

(k∑

c=1

xTc AxcxTc Dxc

)≡ min{x1,...,xk}∈I

(k∑

c=1

xTc LxcxTc Dxc

).

Joyce Jiyoung Whang University of Texas at Austin

Page 8: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Weighted Kernel K -means

A general weighted kernel k-means objective is equivalent to aweighted graph clustering objective. (Dhillon et al. 2007)

Weighted kernel k-means

Objective

minπ1...πk

k∑c=1

∑vi∈πc

wi‖ϕ(vi )−mc‖2, where mc =

∑vi∈πc

wiϕ(vi )∑vi∈πc

wi.

Algorithm

Computes the closest centroid for every node, and assigns the node tothe closest cluster.After all the nodes are considered, the centroids are updated.Given the Kernel matrix K , where Kji = 〈ϕ(vj), ϕ(vi )〉,

D(vi ,mc) = Kii −2∑

j∈c wjKji∑j∈c wj

+

∑j∈c

∑l∈c wjwlKjl

(∑

j∈c wj)2.

Joyce Jiyoung Whang University of Texas at Austin

Page 9: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Signed Networks and Social Balance

Joyce Jiyoung Whang University of Texas at Austin

Page 10: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Social Balance

Certain configuration of positive and negative edges are more plausiblethan others.

A friend of my friend is my friend.An enemy of my friend is my enemy.An enemy of my enemy is my friend.

Joyce Jiyoung Whang University of Texas at Austin

Page 11: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Balance Theory

A network is balanced iff (i) all of its edges are positive, or (ii) nodescan be clustered into two groups such that edges within groups arepositive and edges between groups are negative. (Cartwright and Harary)

Joyce Jiyoung Whang University of Texas at Austin

Page 12: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Weak Balance Theory

Allows an enemy of one’s enemy to still be an enemy.

A network is weakly balanced iff (i) all of its edges are positive, or (ii)nodes can be clustered into k groups such that edges within groups arepositive and edges between groups are negative. (Davis 1967)

Joyce Jiyoung Whang University of Texas at Austin

Page 13: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Clustering via Signed Laplacian

Joyce Jiyoung Whang University of Texas at Austin

Page 14: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Signed Laplacian

The signed Laplacian L̄ = D̄ − Awhere D̄ is the diagonal absolute degree matrix, i.e., D̄ii =

∑nj=1 |Aij |.

(Kunegis et al. 2010)

L̄ is always positive semidefinite: ∀x ∈ Rn,

xT L̄x =∑(i ,j)

|Aij |(xi − sgn(Aij)xj)2 ≥ 0.

k-way ratio cut for signed networksThe sum of positive edge weights for edges that lie between differentclusters and the sum of negative edge weights of all edges lie within thesame cluster, normalized by each cluster’s size.

Joyce Jiyoung Whang University of Texas at Austin

Page 15: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Signed Laplacian

The 2-way signed ratio cut objective can be formulated as anoptimization problem with a quadratic form:

minx

(xT L̄x

),

where the 2-class indicator x has the following form:

xi =

{12(√|π2|/|π1|+

√|π1|/|π2|), if node i ∈ π1,

−12(√|π2|/|π1|+

√|π1|/|π2|), if node i ∈ π2.

Joyce Jiyoung Whang University of Texas at Austin

Page 16: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Extension of Signed Laplacian to k-way Clustering

Extension to k-way objective

min{x1,...,xk}∈I

(k∑

c=1

xTc L̄xcxTc xc

).

Theorem

There does not exist any representation of {x1, ..., xk} such that theobjective minimizes the general k-way signed ratio cut.

This direct extension suffers a weakness.No matter how we select an indicator vector, we will always punish somedesirable clustering patterns.

Joyce Jiyoung Whang University of Texas at Austin

Page 17: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

k-way Signed Objectives for Clustering

Joyce Jiyoung Whang University of Texas at Austin

Page 18: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Proposed k-way Signed Objectives

Adjacency matrix of a signed network

Aij

> 0, if relationship of (i , j) is positive,

< 0, if relationship of (i , j) is negative,

= 0, if relationship of (i , j) is unknown.

We can break A into its positive part A+ and negative part A−.Formally, A+

ij = max(Aij , 0) and A−ij = −min(Aij , 0).

By this definition, we have A = A+ − A−.

Joyce Jiyoung Whang University of Texas at Austin

Page 19: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Proposed k-way Signed Objectives

Overview of k-way signed objectives

Joyce Jiyoung Whang University of Texas at Austin

Page 20: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Proposed k-way Signed Objectives

Positive/Negative Ratio AssociationPositive Ratio Association

max{x1,...,xk}∈I

(k∑

c=1

xTc A+xcxTc xc

).

Negative Ratio Association

min{x1,...,xk}∈I

(k∑

c=1

xTc A−xcxTc xc

).

Joyce Jiyoung Whang University of Texas at Austin

Page 21: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Proposed k-way Signed Objectives

Positive/Negative Ratio CutPositive Ratio Cut

Minimizes the number of positive edges between clusters.

min{x1,...,xk}∈I

{k∑

c=1

xTc (D+ − A+)xcxTc xc

=k∑

c=1

xTc L+xc

xTc xc

},

where D+ is the diagonal degree matrix of A+.

The Negative Ratio Cut can also be defined similarly.

Joyce Jiyoung Whang University of Texas at Austin

Page 22: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Proposed k-way Signed Objectives

(a) Balance Ratio Cut (b) Balance Ratio Association

Balance Ratio Cut/AssociationBalance Ratio Cut

min{x1,...,xk}∈I

(k∑

c=1

xTc (D+ − A)xcxTc xc

).

Balance Ratio Association

max{x1,...,xk}∈I

(k∑

c=1

xTc (D− + A)xcxTc xc

).

Joyce Jiyoung Whang University of Texas at Austin

Page 23: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Proposed k-way Signed Objectives

Balance Normalized CutObjectives normalized by cluster volume instead of by the number ofnodes in the clusters.Balance Normalized Cut

min{x1,...,xk}∈I

(k∑

c=1

xTc (D+ − A)xcxTc D̄xc

).

Theorem

Minimizing balance normalized cut is equivalent to maximizing balancenormalized association.

Joyce Jiyoung Whang University of Texas at Austin

Page 24: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Multilevel Approach forLarge-scale Signed Graph Clustering

Joyce Jiyoung Whang University of Texas at Austin

Page 25: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Equivalence of Objectives

Equivalence between k-ways signed objectives and weighted kernelk-means objective

Theorem (Equivalence of objectives)

For any signed cut or association objective, there exists some correspondingweighted kernel k-means objective (with properly chosen kernel matrix),such that these two objectives are mathematically equivalent.

We can use k-means like algorithm to optimize the objectives.Fast and scalable multilevel clustering algorithm for signed networks.

Joyce Jiyoung Whang University of Texas at Austin

Page 26: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Multilevel Framework of Graph Clustering

Overview

Joyce Jiyoung Whang University of Texas at Austin

Page 27: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Multilevel Clustering Algorithm for Signed Networks

Coarsening Phase

Given the input graph G0, we generate a series of graphs G1 . . .G`, suchthat |Vi+1| < |Vi | for all 0 ≤ i < `.

Base Clustering Phase

Minimize balance normalized cut of A` with spectral relaxation.

Perform unsigned graph clustering on A`+

using region-growingalgorithm as in Metis. (Karypis and Kumar 1999)

Refinement Phase

Derive clustering results in G`−1, G`−2, . . . , G0.Given a clustering of Gi , the goal is to get a clustering result in Gi−1.

Project the clustering result in Gi to Gi−1 as the initial clusters.Refine the clustering result by running weighted kernel k-means.

Joyce Jiyoung Whang University of Texas at Austin

Page 28: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Experimental Results

Joyce Jiyoung Whang University of Texas at Austin

Page 29: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Graph Kernels

Criteria and Kernels

Criterion Kernel

Signed Laplacian σI − L̄

Normalized Signed Laplacian σD̄−1 + D̄−1AD̄−1

Positive Ratio Association σI + A+

Positive Ratio Cut σI − L+

Ratio Association σI + A

Balance Ratio Cut σI − (D+ − A)

Balance Normalized Cut σD̄−1 − D̄−1(D+ − A)D̄−1

Table: Criteria and kernels considered in experiments.

Joyce Jiyoung Whang University of Texas at Austin

Page 30: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Graph Kernels

Experimental Setup and MetricsSynthetic networks

Begin with a complete 5-weakly balanced network Acom, in which groupsizes are 100, 200, . . . 500 respectively.Uniformly sample some entries from Acom to form a weakly balancednetwork A, with two parameters: sparsity s and noise level ε.

Error rate

Have the “real” clustering as the ground truth in synthetic dataset

k∑c=1

xTc A−comxc + xTc L

+comxc

n2.

Measuring the degree of imbalance of clusters

Ratio objective (W = I ) and normalized objective (W = D̄)

k∑c=1

xTc A−xc + xTc L

+xcxTc W xc

.

Joyce Jiyoung Whang University of Texas at Austin

Page 31: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Graph Kernels

Spectral clustering results using different kernels on weakly balancednetworks, with different sparsity

PosRatioAssoc, NegRatioAssoc and PosRatioCut, which only considerone of positive or negative criterion, perform worse than others.BalRatioCut and BalNorCut outperform SignLap and NorSignLap underevery sparsity level.

(c) Error rate (d) Ratio objective (e) Normalized objective

Joyce Jiyoung Whang University of Texas at Austin

Page 32: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Multilevel Clustering

Methods

Multilevel Clustering with Balance Normalized CutNormalized signed Laplacian (NorSignLap)MC-SVP

Use SVP to complete the network and run k-means on k eigenvectors ofthe completed matrix to get the clustering result.

MC-MF

Complete the network using matrix factorization and derive two low rankfactors U,H ∈ Rn×k , and run k-means on both U and H.Select the clustering that gives us smaller normalized balance cutobjective.

Joyce Jiyoung Whang University of Texas at Austin

Page 33: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Multilevel Clustering

Clustering results of multilevel clustering and other state-of-the-artmethods on weakly balanced networks, with different sparsity

Create some networks sampled from a complete 10-weakly balancednetwork, in which each group contains 1, 000 nodes.The multilevel clustering outperforms other state-of-the-art methods inmost cases.

(f) Error rate (g) Normalized objective

Joyce Jiyoung Whang University of Texas at Austin

Page 34: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Multilevel Clustering

Running time of multilevel clustering and MC-MF on weakly balancednetworks

Consider Acom to be a large balanced network, which contains 20 groups,with 50, 000 nodes in each group.Randomly sample some edges from Acom to form A with desired numberof edges.While we report the running time of whole procedure for multilevelclustering, we only report the time for computing two factors U and Hfor MC-MF.

Joyce Jiyoung Whang University of Texas at Austin

Page 35: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

Conclusions

Show a fundamental weakness of the signed graph Laplacian in k-wayclustering problems.

New k-way objectives and kernels for signed networks.

Equivalence between our new k-way objectives and a general weightedkernel k-means objective.

Fast and scalable multilevel clustering algorithm for signed networks.

Comparable in accuracy to other state-of-the-art methods.Much faster and more scalable.

Joyce Jiyoung Whang University of Texas at Austin

Page 36: Scalable Clustering of Signed Networks Using Balance ...joyce/slides/CIKM2012_joyce_sign.pdf · Kai-Yang Chiang, Joyce Jiyoung Whang, Inderjit S. Dhillon University of Texas at Austin

References

D. Cartwright and F. Harary. Structure balance: A generalization of Heiderstheory. Psychological Review, 63(5):277293, 1956.

J. A. Davis. Clustering and structural balance in graphs. Human Relations,20(2):181187, 1967.

I. S. Dhillon, Y. Guan, and B. Kulis. Weighted graph cuts withouteigenvectors: A multilevel approach. IEEE Trans. on Pattern Analysis andMachine Intelligence, 29(11):1944-1957, 2007.

F. Harary. On the notion of balance of a signed graph. MichiganMathematical Journal, 2(2):143146, 1953.

J. Kunegis, S. Schmidt, A. Lommatzsch, J. Lerner, E. W. D. Luca, and S.Albayrak. Spectral analysis of signed graphs for clustering, prediction andvisualization. In SDM, pages 559570, 2010.

G. Karypis and V. Kumar. A fast and high quality multilevel scheme forpartitioning irregular graphs. SIAM Journal on Scientific Computing,20(1):359392, 1999.

J. Leskovec, D. Huttenlocher, and J. Kleinberg. Predicting positive and

negative links in online social networks. In WWW, pages 641650, 2010.

Joyce Jiyoung Whang University of Texas at Austin