34
Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH DISCOVERY Victor E. Lee Department of Computer Science Kent State University Kent, OH 44242 [email protected] Ning Ruan Department of Computer Science Kent State University Kent, OH 44242 [email protected] Ruoming Jin Department of Computer Science Kent State University Kent, OH 44242 [email protected] Charu Aggarwal IBM T.J. Watson Research Center Yorktown Heights, NY 10598 [email protected] Abstract In this chapter, we present a survey of algorithms for dense subgraph discovery. The problem of dense subgraph discovery is closely related to clustering though the two problems also have a number of differences. For example, the problem of clustering is largely concerned with that of finding a fixed partition in the data, whereas the problem of dense subgraph discovery defines these dense compo- nents in a much more flexible way. The problem of dense subgraph discovery

Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

Chapter 10

A SURVEY OF ALGORITHMS FORDENSE SUBGRAPH DISCOVERY

Victor E. LeeDepartment of Computer ScienceKent State UniversityKent, OH 44242

[email protected]

Ning RuanDepartment of Computer ScienceKent State UniversityKent, OH 44242

[email protected]

Ruoming JinDepartment of Computer ScienceKent State UniversityKent, OH 44242

[email protected]

Charu AggarwalIBM T.J. Watson Research CenterYorktown Heights, NY 10598

[email protected]

Abstract In this chapter, we present a survey of algorithms for dense subgraph discovery.The problem of dense subgraph discovery is closely related to clustering thoughthe two problems also have a number of differences. For example, the problemof clustering is largely concerned with that of finding a fixedpartition in the data,whereas the problem of dense subgraph discovery defines these dense compo-nents in a much more flexible way. The problem of dense subgraph discovery

Page 2: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

304 MANAGING AND MINING GRAPH DATA

may wither be defined over single or multiple graphs. We explore both cases. Inthe latter case, the problem is also closely related to the problem of the frequentsubgraph discovery. This chapter will discuss and organizethe literature on thistopic effectively in order to make it much more accessible tothe reader.

Keywords: Dense subgraph discovery, graph clustering

1. Introduction

In almost any network, density is an indication of importance. Just as some-one reading a road map is interesting in knowing the locationof the largercities and towns, investigators who seek information from abstract graphs areoften interested in the dense components of the graph. Depending on whatproperties are being modeled by the graph’s vertices and edges, dense regionsmay indicate high degrees of interaction, mutual similarity and hence collec-tive characteristics, attractive forces, favorable environments, or critical mass.

From a theoretical perspective, dense regions have many interesting prop-erties. Dense components naturally have small diameters (worst case shortestpath between any two members). Routing within these components is rapid.A simple strategy also exists for global routing. If most vertices belong toa dense component, only a few selected inter-hub links are needed to have ashort average distance between any two arbitrary vertices in the entire network.Commercial airlines employ this hub-based routing scheme.Dense regions arealso robust, in the sense that many connections can be brokenwithout splittingthe component. A less well-known but equally important property of densesubgraphs comes from percolation theory. If a graph is sufficiently dense, orequivalently, if messages are forwarded from one node to itsneighbors withhigher than a certain probability, then there is very high probability of propa-gating a message across the diameter of the graph [20]. This fact is useful ineverything from epidemiology to marketing.

Not all graphs have dense components, however. A sparse graph may havefew or none. In order to understand this issue, we first need todefine a formalnotion of the words ‘dense’ and ‘sparse’. We will address this issue shortly.A uniform graph is either entirely dense or not dense at all. Uniform graphs,however, are rare, usually limited to either small or artificially created ones.Due to the usefulness of dense components, it is generally accepted that theirexistence is the rule rather than the exception in nature andin human-plannednetworks [39].

Dense components have been identified in and have enhanced understandingof many types of networks; among the best-known are social networks [53, 44],the World Wide Web [30, 17, 11], financial markets [5], and biological sys-

Page 3: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 305

tems [26]. Much of the early motivation, research, and nomenclature regardingdense components was in the field of social network analysis.Even before theadvent of computers, sociologists turned to graph theory toformulate modelsfor the concept of social cohesion. Clique,K-core,K-plex, andK-club aremetrics originally devised to measure social cohesiveness[53]. It is not sur-prising that we also see dense components in the World Wide Web. In manyways, the Web is simply a virtual implementation of traditional direct human-human social networks.

Today, the natural sciences, the social sciences, and technological fields areall using network and graph analysis methods to better understand complexsystems. Dense component discovery and analysis is one important aspectof network analysis. Therefore, readers from many different backgrounds willbenefit from understanding more about the characteristics of dense componentsand some of the methods used to uncover them.

In the next section, we outline the graph terminology and define the fun-damental measures of density to be used in the rest of the chapter. Section 3categorizes the algorithmic approaches and presents representative implemen-tations in more detail. Section 4 expands the topic to consider frequently-occurring dense components in a set of graphs. Section 5 provides examplesof how these techniques have been applied in various scientific fields. Section 6concludes the chapter with a look to the future.

2. Types of Dense Components

Different applications find different definitions ofdense componentto beuseful. In this section, we outline the many ways to define a dense component,categorizing them by their important features. Understanding these featuresof the various types of components are valuable for decidingwhich type ofcomponent to pursue.

2.1 Absolute vs. Relative Density

We can divide density definitions into two classes, absolutedensity and rel-ative density. An absolute density measure establishes rules and parametervalues for what constitutes a dense component, independentof what is out-side the component. For example, we could say that we are onlyinterestedin cliques, fully-connected subgraphs of maximum density.Absolute densitymeasures take the form of relaxations of the pure clique measure.

On the other hand, a relative density measure has no preset level for what issufficiently dense. It compares the density of one region to another, with thegoal of finding the densest regions. To establish the boundaries of components,a metric typically looks to maximize the difference betweenintra-componentconnectedness and inter-component connectedness. Often but not necessarily,

Page 4: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

306 MANAGING AND MINING GRAPH DATA

relative density techniques look for a user-defined numberk densest regions.The alert reader may have noticed that relative density discovery is closelyrelated to clustering and in fact shares many features with it.

Since this book contains another chapter dedicated to graphclustering, wewill focus our attention on absolute density measures. However, we will havemore so say about the relationship between clustering and density at the end ofthis section.

2.2 Graph Terminology

Let G(V,E) be a graph with∣V ∣ vertices and∣E∣ edges. If the edges areweighted, thenw(u) is the weight of edgeu. We treat unweighted graphsas the special case where all weights are equal to 1. LetS andT be sub-sets ofV . For an undirected graph,E(S) is the set of induced edges onS: E(S) = {(u, v) ∈ E ∣u, v ∈ S}. Then,HS is the induced subgraph(S,E(S)). Similarly,E(S, T ) designates the set of edges fromS to T . HS,T

is the induced subgraph(S, T,E(S, T )). Note thatS andT are not necessarilydisjoint from each other. IfS ∩ T = ∅, HS,T is a bipartite graph. IfS andTare not disjoint (possiblyS = T = V ), this notation can be used to represent adirected graph.

A dense component is a maximal induced subgraph which also satisfiessome density constraint. A componentHS is maximal if no other subgraphof G which is a superset ofHS would satisfy the density constraints. Table10.1 defines some basic graph concepts and measures that we will use to de-fine density metrics.

Table 10.1. Graph Terminology

Symbol Description

G(V,E) graph with vertex setV and edge setEHS subgraph with vertex setS and edge setE(S)HS,T subgraph with vertex setS ∪ T and edge setE(S, T )w(u) weight of edgeu

NG(u) neighbor set of vertexu in G: {v∣ (u, v) ∈ E}NS(u) only those neighbors of vertexu that are inS: {v∣ (u, v) ∈ S}

�G(u) (weighted) degree ofu in G :∑

v∈NG(u) w(v)

�S(u) (weighted) degree ofu in S :∑

v∈NS(u) w(v)

dG(u, v) shortest (weighted) path fromu to v traversing any edges inGdS(u, v) shortest (weighted) path fromu to v traversing only edges inE(S)

We now formally define thedensity of S, den(S), as the ratio of the totalweight of edges inE(S) to the number of possible edges among∣S∣ vertices.If the graph is unweighted, then the numerator is simply the number of actual

Page 5: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 307

edges, and the maximum possible density is 1. If the graph is weighted, themaximum density is unbounded. The number of possible edges in an undi-rected graph of sizen is

(n2

)= n(n − 1)/2. We give the formulas for an

undirected graph; the formulas for a directed graph lack thefactor of 2.

den(S) =2∣E(S)∣∣S∣(∣S∣ − 1)

denW (S) =2∑

u,v∈S w(u, v)

∣S∣(∣S∣ − 1)

Some authors define density as the ratio of the number of edgesto the numberof vertices: ∣E∣

∣V ∣ . We will refer to this asaverage degree of S.Another important metric is thediameter of S, diam(S). Since we have

given two different distance measures,dS anddG, we accordingly offer twodifferent diameter measures. The first is the standard one, in which we consideronly paths withinS. The second permits paths to stray outsideS, if it offers ashorter path.

diam(S) = max{dS(u, v)∣ u, v ∈ S}diamG(S) = max{dG(u, v)∣ u, v ∈ S}

2.3 Definitions of Dense Components

We now present a collection of measures that have been used todefine densecomponents in the literature (Table 10.2). To focus on the fundamentals, weassume unweighted graphs. In a sense, all dense components are either cliques,which represent the ideal, or some relaxation of the ideal. There relaxationsfall into three categories: density, degree, and distance.Each relaxation can bequantified as either a percentage factor or a subtractive amount. While most ofthere definitions are widely-recognized standards, the name quasi-cliquehasbeen applied to any relaxation, with different authors giving different formaldefinitions. Abello [1] defined the term in terms of overall edge density, with-out any constraint on individual vertices. This offers considerable flexibilityin the component topology. Several other authors [36, 32, 33] have opted todefine quasi-clique in terms of minimum degree of each vertex. Li et al. [32]provide a brief overview and comparison of quasi-cliques. In our table, whenthe authorship of a specific metric can be traced, it is given.Our list is notexhaustive; however, the majority of definitions can be reduced to some com-bination of density, degree, and diameter.

Note that in unweighted graphs, cliques have a density of 1. Density-basedquasi-cliques are only defined for unweighted graphs. We usethe termKd-clique instead of Mokken’s original nameK-clique, becauseK-clique is al-ready defined in the mathematics and computer science communities to meana clique withk vertices.

Page 6: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

308 MANAGING AND MINING GRAPH DATA

Table 10.2. Types of Dense Components

Component Reference Formal definition Description

Clique ∃(i, j), i ∕= j ∈ S Every vertex connects to every othervertex inS.

Quasi-Clique(density-based)

[1] den(S) ≥ S has at least ∣S∣(∣S∣ − 1)/2 edges.Density may be imbalanced withinS.

Quasi-Clique(degree-based)

[36] �S(u) ≥ ∗ (k − 1) Each vertex has percent of the possi-ble connections to other vertices. Localdegree satisfies a minimum. Compare toK-core andK-plex.

K-core [45] �S(u) ≥ k Every vertex connects to at leastk othervertices inS. A clique is a (k-1)-core.

K-plex [46] �S(u) ≥ ∣S∣ − k Each vertex is missing no more thank−1 edges to its neighbors. A clique is a1-plex.

Kd-clique [34] diamG(S) ≤ k The shortest path from any vertex to anyother vertex is not more thank. An or-dinary clique is a 1d-clique. Paths maygo outsideS.

K-club [37] diam(S) ≤ k The shortest path from any vertex to anyother vertex is not more thank. Pathsmay not go outsideS. Therefore, everyK-club is a K-clique.

Figure 10.1, a superset of an illustration from Wasserman and Faust [53],demonstrates each of the dense components that we have defined above.

Cliques:{1,2,3} and{2,3,4}0.8-Quasi-clique:{1,2,3,4} (includes5/6 > 0.83 of possible edges)2-Core:{1,2,3,4,5,6,7}3-Core: none2-Plex:{1,2,3,4} (vertices 1 and 3 are missing one edge each)2d-Cliques:{1,2,3,4,5,6} and{2,3,4,5,6,7} (In the first component,5 connects to 6 via 7, which need not be a member of the component)2-Clubs:{1,2,3,4,5}, {1,2,3,4,6}, and{2,3,5,6,7}

2.4 Dense Component Selection

When mining for dense components in a graph, a few additionalquestionsmust be addressed:

Page 7: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 309

� �

Figure 10.1. Example Graph to Illustrate Component Types

1 Minimum size �: What is the minimum number of vertices in a densecomponentS? I.e.,∣S∣ ≥ �.

2 All or top-N?: One of the following criteria should be applied.

Select all components which meet the size, density, degree,anddistance constraints.Select theN highest ranking components that meet the minimumconstraints. A ranking function must be established. This can beas simple as one of the same metrics used for minimum constraints(size, density, degree, distance, etc.) or a linear combination ofthem.Select theN highest ranking components, with no minimum con-straints.

3 Overlap: May two components share vertices?

2.5 Relationship between Clusters and DenseComponents

The measures described above set an absolute standard for what constitutesa dense component. Another approach is to find the most dense components ona relative basis. This is the domain of clustering. It may seem that clustering,a thoroughly-studied topic in data mining with many excellent methodologies,would provide a solution to dense component discovery. However, clusteringis a very broad term. Readers interested in a survey on clustering may wish toconsult either Jain, Murty, and Flynn [24] or Berkhin [8]. Inthe data mining

Page 8: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

310 MANAGING AND MINING GRAPH DATA

community,clusteringrefers to the task of assigning similar or nearby itemsto the same group while assigning dissimilar/distant itemsto different groups.In most clustering algorithms, similarity is a relative concept; therefore it ispotentially suitable for relative density measures. However, not all clusteringalgorithms are based on density, and not all types of dense components can bediscovered with clustering algorithms.

Partitioning refers to one class of clustering problem, where the objectiveis to assign every item to exactly one group. Ak-partitioning requires theresult to havek groups.K-partitioning is not a good approach for identifyingabsolute dense components, because the objectives are at odds. Consider thewell-knownk-Means algorithm applied to a uniform graph. It will generate kpartitions, because it must. However, the partitioning is arbitrary, changing asthe seed centroids change.

In hierarchical clustering, we construct a tree of clusters. Conceptually, aswell as in actual implementation, this can be either agglomerative (bottom-up),where the closest clusters are merged together to form a parent cluster, or di-visive (top-down), where a cluster is subdivided into relatively distant childclusters. In basic greedy agglomerative clustering, the process starts by group-ing together the two closest items. The pair are now treated as a single item,and the process is repeated. Here, pairwise distance is the density measure,and the algorithm seeks to group together the densest pair. If we use divisiveclustering, we can choose to stop subdividing after findingk leaf clusters. Adrawback of both hierarchical clustering and partitioningis that they do notallow for a separate "non-dense" partition. Even sparse regions are forced tobelong to some cluster, so they are lumped together with their closest densercores.

Spectral clusteringdescribes a graph as a adjacency matrixW , from whichis derived the Laplacian matrixL = D − W (unnormalized) orL = I −D1/2WD−1/2(normalized), whereD is the diagonal matrix featuring each ver-tex’s degree. The eigenvectors ofL can be used as cluster centroids, with thecorresponding eigenvalues giving an indication of the cut size between clus-ters. Since we want minimum cut size, the smallest eigenvalues are chosenfirst. This ranking of clusters is an appealing feature for dense componentdiscovery.

None of these clustering methods, however, are suited for anabsolute den-sity criterion. Nor can they handle overlapping clusters. Therefore, somebut not all clustering criteria are dense component criteria. Most clusteringmethods are suitable for relative dense component discovery, excludingk-partitioning methods.

Page 9: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 311

3. Algorithms for Detecting Dense Components in aSingle Graph

In this section, we explore algorithmic approaches for finding dense com-ponents. First we look at basic exact algorithms for finding cliques and quasi-cliques and comment on their time complexity. Because the clique problem isNP-hard, we then consider some more time efficient solutions. The algorithmscan be categorized as follows: Exact enumeration (Section 3.1), Fast HeuristicEnumeration (Section 3.2), and Bounded Approximation Algorithms (Section3.3). We review some recent works related to dense componentdiscovery,concentrating on the details of several well-received algorithms.

The following table (Table 10.3) gives an overview of the major algorithmicapproaches and lists the representative examples we consider in this chapter.

Table 10.3. Overview of Dense Component Algorithms

Algorithm Type Component Type Example Comments

Enumeration Clique [12]Biclique [35]Quasi-clique [33] min. degree for each vertexQuasi-biclique [47]k-core [7]

Fast HeuristicEnumeration

Maximal biclique [30] nonoverlapping

Quasi-clique/biclique [13] spectral analysisRelative density [18] shinglingMaximal quasi-biclique [32] balanced noise toleranceQuasi-clique,k-core [52] pruned search; visual results with

upper-bounded estimates

Bounded Max. average degree [14] undirected graph: 2-approx.Approximation directed graph: 2+�-approx.

Densest subgraph,n ≥ k [4] 1/3-approx.Subgraph of knowndensity� [3] finds subgraph with density

Ω(�/ logΔ)

3.1 Exact Enumeration Approach

The most natural way to discover dense components in a graph is to enu-merate all possible subsets of vertices and to check if some of them satisfy thedefinition of dense components. In the following, we investigate some algo-rithms for discovering dense components by explicit enumeration.

Page 10: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

312 MANAGING AND MINING GRAPH DATA

Enumeration Approach. Finding maximal cliques in a graph may bestraightforward, but it is time-consuming. The clique decision problem, decid-ing whether a graph of sizen has a clique of size at leastk, is one of Karp’s21 NP-Complete problems [28]. It is easy to show that the clique optimizationproblem, finding a largest clique in a graph, is also NP-Complete, because theoptimization and decision problems each can be reduced in polynomial timeto the other. Our goal is to enumerate all cliques. Moon and Moser showedthat a graph may contain up to3n/3 maximal cliques [38]. Therefore, even formodest-sized graphs, it is important to find the most effective algorithm.

One well-known enumeration algorithm for generating cliques was pro-posed by Bron and Kerbosch [12]. This algorithm utilizes thebranch-and-bound technique in order to prune branches which are unable to generate aclique. The basic idea is to extend a subset of vertices, until the clique is max-imal, by adding a vertex from a candidate set but not in a exclusion set. LetCbe the set of vertices which already form a clique,Cand be the set of verticeswhich may potentially be used for extendingC, andNCand be the set of ver-tices which are not allowed to be candidates forC. N(v) are the neighbors ofvertexv. Initially, C andNCand are empty, andCand contains all verticesin the graph. GivenC, Cand andNCand, we describe the Bron-Kerboschalgorithm below. The authors experimentally observedO(3.14n), but did notprove their theoretical performance.

Algorithm 6 CliqueEnumeration(C,Cand,NCand)

if Cand = ∅ andNCand = ∅ thenoutput the clique induced by verticesC;

elsefor all vi ∈ Cand doCand← Cand ∖ {vi};callCliqueEnumeration(C∪{vi}, Cand∩N(vi), NCand∩N(vi));NCand← NCand ∪ {vi};

end forend if

Makino et al. [35] proposed new algorithms making full use ofefficientmatrix multiplication to enumerate all maximal cliques in ageneral graph orbicliques in a bipartite graph. They developed different algorithms for differenttypes of graphs (general graph, bipartite, dense, and sparse). In particular, fora sparse graph such that the degree of each vertex is bounded by Δ ≪ ∣V ∣,an algorithm withO(∣V ∣∣E∣) preprocessing time,O(Δ4) time delay (i.e, thebound of running time between two consecutive outputs) andO(∣V ∣ + ∣E∣)space is developed to enumerate all maximal cliques. Experimental resultsdemonstrate good performance for sparse graphs.

Page 11: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 313

Quasi-clique Enumeration. Compared to exact cliques, quasi-cliquesprovide both more flexibility of the components being soughtas well as moreopportunities for pruning the search space. However, the time complexity gen-erally remains NP-complete. TheQuick algorithm, introduced in [33], pro-vided an illustrative example. The authors studied the problem of mining max-imal degree-based quasi-cliques with size at leastmin size and degree of eachvertex at least⌈ (∣V ∣−1)⌉. TheQuick algorithm integrates some novel prun-ing techniques based on degree of vertices with a traditional depth-first searchframework to prune the unqualified vertices as soon as possible. Those pruningtechniques also can be combined with other existing algorithms to achieve thegoal of mining maximal quasi-cliques.

They employ these established pruning techniques based on diameter, min-imum size threshold, and vertex degree. LetNG

k (v) = {u∣distG(u, v) ≤ k}be the set of vertices that are within a distance ofk from vertexv, indegX(u)denotes the number of vertices inX that are adjacent tou, andexdegX (u) rep-resents the number of vertices incand exts(X) that are adjacent tou. All ver-tices are sorted in lexicographic order, thencand exts(X) is the set of verticesafter the last vertex inX which can be used to extendX. For the pruning tech-nique based on graph diameter, the vertices which are not in∩v∈XNG

k (v) canbe removed fromcand exts(X). Considering the minimum size threshold,the vertices whose degree is less than⌈ (min size− 1)⌉ should be removed.

In addition, they introduce five new pruning techniques. Thefirst two tech-niques consider the lower and upper bound of the number of vertices that canbe used to extend currentX. The first pruning technique is based on the upperbound of the number of vertices that can be added toX concurrently to form a -quasi-clique. In other words, given a vertex setX, the maximum number ofvertices incand exts(X) that can be added intoX is bounded by the minimaldegree of the vertices inX; The second one is based on the lower bound ofthe number of vertices that can be added toX concurrently to form a -quasi-clique. The third technique is based on critical vertices. If we can find somecritical vertices ofX, then all vertices incand exts(X) and adjacent to criticalvertices are added intoX. Technique 4 is based on cover vertexu which maxi-mizes the size ofCX(u) = cand exts(X)∩NG(u)∩ (∩v∈X∧(u,v)∋EN

G(v)).

Lemma 10.1. [33] Let X be a vertex set andu be a vertex incand exts(X)such thatindegX (u) ≥ ⌈ × ∣X∣⌉. If for any vertexv ∈ X such that(u, v) ∈ E, we haveindegX(v) ≥ ⌈ × ∣X∣⌉, then for any vertex setYsuch thatG(Y ) is a -quasi-clique andY ⊆ (X ∪ (cand exts(X)∩NG(u)∩(∩v∈X∧(u,v)∋EN

G(v)))), G(Y ) cannot be a maximal -quasi-clique.

From the above lemma, we can prune theCX(u) of cover vertexu fromcand exts(X) to reduce the search space. The last technique, the so-calledlookahead technique, is to check ifX ∪ cand exts(X) is -quasi-clique. If

Page 12: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

314 MANAGING AND MINING GRAPH DATA

so, we do not need to extendX anymore and reduce some computational cost.See AlgorithmQuick above.

Algorithm 7 Quick(X, cand exts(X), ,min size)

find the cover vertexu of X and sort vertices incand exts(X);for all v ∈ cand exts(X)− CX(u) do

apply minimum size constraint on∣X∣+ ∣cand exts(X)∣;apply lookahead technique (technique 5) to prune search space;remove the vertices that are not inNG

k (v);Y ← X ∪ {u};calculate the upper bound and lower bound of the number vertices to beadded toY in order to form -quasi-clique;recursively prune unqualified vertices (techniques 1,2);identify critical vertices ofY and apply pruning (technique 3);apply existing pruning techniques to further reduce the search space;

end forreturn -quasi-cliques;

K-Core Enumeration. For k-cores, we are happily able to escapeNP -complete time complexity; greedy algorithms with polynomial time exist.Batagelj et al. [7] developed a efficient algorithm running inO(m) time, basedon the following observation: given a graphG = (V,E), if we recursivelyeliminate the vertices with degree less thank and their incident edges, the re-sulting graph is ak-core. The algorithm is quite simple and can be consideredas a variant of [29]. This algorithm attempts to assign each vertex with a corenumber to which it belongs. At the beginning, the algorithm places all verticesin a priority queue based on minimim degree. For each iteration, we eliminatethe first vertexv (i.e, the vertex with lowest degree) from the queue. After then,we assign the degree ofv as its core number. Consideringv’s neighbors whosedegrees are greater than that ofv, we decrease their degrees by one and reorderthe remaining vertices in the queue. We repeat such procedure until the queueis empty. Finally, we output thek-cores based on their assigned core numbers.

3.2 Heuristic Approach

As mentioned before, it is impractical to exactly enumerateall maximalcliques, especially for some real applications like protein-protein interactionnetworks which have a very large number of vertices. In this case, fast heuris-tic methods are available to address this problem. These methods are able toefficiently identify some dense components, but they cannotguarantee to dis-cover all dense components.

Page 13: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 315

Shingling Technique. Gibson et al. [18] propose an new algorithm basedon shingling for discovering large dense bipartite subgraphs in massive graphs.In this paper, a dense bipartite subgraph is considered a cohesive group ofvertices which share many common neighbors. Since this algorithm utilizesthe shingling technique to convert each dense component with arbitrary sizeinto shingles with constant size, it is very efficient and practical for single largegraphs and can be easily extended for streaming graph data.

We first provide some basic knowledge related to the shingling technique.Shingling was firstly introduced in [11] and has been widely used to esti-mate the similarity of web pages, as defined by a particular feature extractionscheme. In this work, shingling is applied to generate two constant-size finger-prints for two different subsetsA andB from setS of a universeU of elements,such that the similarity ofA andB can be computed easily by comparing fin-gerprints ofA andB, respectively. Assuming� is a random permutation ofthe elements in the ordered universeU which containsA andB, the probabil-ity that the smallest element ofA andB is the same, is equal to the Jaccardcoefficient. That is,

Pr[�−1(mina∈A{�(a)}) = �−1(minb∈B{�(b)})] =∣A ∩B∣∣A ∪B∣

Given a constant numberc of permutations�1, ⋅ ⋅ ⋅ , �c of U , we generate afingerprinting vector whosei-th element ismina∈A�i(a). The similarity be-tweenA andB is estimated by the number of positions which have the sameelement with respect to their corresponding fingerprint vectors. Furthermore,we can generalize this approach by considering everys-element subset of en-tire set instead of the subset with only one element. Then thesimilarity oftwo setsA andB can be measured by the fraction of theses-element subsetsthat appear in both. This actually is an agreement measure used in informationretrieval. We say eachs-element subset is ashingle. Thus this feature extrac-tion approach is named the(s, c) shingling algorithm. Given an-element setA = {ai, 0 ≤ i ≤ n} where each elementai is a string, the(s, c) shinglingalgorithm tries to extractc shingles such that the length of each shingle is exacts. We start from converting each stringai into a integerxi by a hashing func-tion. Following that, given two random integer vectorsR,S with sizec, wegenerate an-element temporary setY = {yi, 0 ≤ i ≤ n} where each elementyi = Rj × xi + Sj. Then thes smallest elements ofY are selected and con-catenated together to form a new stringy. Finally, we apply a hash functionon stringy to get one shingle. We repeat such procedurec times in order togeneratec shingles.

Remember that our goal is to discover dense bipartite subgraphs such thatvertices in one side share some common neighbors in another side. Figure10.2 illustrates a simple scenario in a web community where each web page

Page 14: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

316 MANAGING AND MINING GRAPH DATA

Figure 10.2. Simple example of web graph

Figure 10.3. Illustrative example of shingles

in the upper part links to some other web pages in the lower part. We can de-scribe each upper web page (vertex) by the list of lower web pages to which itlinks. In order to put some vertices into the same group, we have to measurethe similarity of the vertices which denotes to what extent they share commonneighbors. With the help of shingling, for each vertex in theupper part, we cangenerate constant-size shingles to describe its outlinks (i.e, its neighbors in thelower part). As shown in Figure 10.3, the outlinks to the lower part are con-verted to shingless1, s2, s3, s4. Since the size of shingles can be significantlysmaller than the original data, much computational cost canbe saved in termsof time and space.

In the paper, Gibson et al. repeatedly employ the shingling algorithm forconverting dense component into constant-size shingles. The algorithm is atwo-step procedure. Step 1 is recursive shingling, where the goal is to exactsome subsets of vertices where the vertices in each subset share many com-mon neighbors. Figure 10.4 illustrates the recursive shingling process for agraph (Γ(V ) is the outlinks of verticesV ). After the first shingling process,for each vertexv ∈ V , its outlinksΓ(v) are converted into a constant size offirst-level shinglesv′. Then we can transpose the mapping relationE0 toE1 sothat each shingle inv′ corresponds to a set of vertices which share this shingle.In other words, a new bipartite graph is constructed where each vertex in one

Page 15: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 317

Figure 10.4. Recursive Shingling Step

part represents one shingle, and each vertex in another partis the original ver-tex. If there is a edge from shinglev′ to vertexv, v′ is one of the shingles forv’s outlinks generated by shingling. From now on,V is considered asΓ(V ′).Following the same procedure, we apply shingling onV ′ andΓ(V ′). Afterthe second shingling process,V is converted into a constant-sizeV

′′

, so-calledsecond-level shingles. Similar to the transposition in thefirst shingling pro-cess, we transposeE1 to E2 and obtain many pairs< v′′,Γ(v′′) > wherev′′

is second-level shingles andΓ(v′′) are all the first-level shingles that share asecond-level shingle. Step 2 is clustering, where the aim isto merge first-levelshingles which share some second-level shingles. Essentially, merges a num-ber of biclique subsets into one dense component. Specifically, given all pairs< v′′,Γ(v′′) >, a traditional algorithm, namelyUnionFind, is used to mergesome first-level shingles inΓ(V ′′) such that any two first-level shingles at leastshare one second-level shingle. To the end, we map the clustering results backto the vertices of the original graph and generate one dense bipartite subgraphfor each cluster. The entire algorithm is presented in Algorithm DiscoverDens-eSubgraph.

GRASP Algorithm. As mentioned in Table 10.2, Abello et al. [1] wereone of the first to formally define quasi-dense components, namely -cliques,and to investigate their discovery. They utilize a existingframework knownas a Greedy Randomized Adaptive Search Procedure (GRASP). Their papermakes two major contributions. First, they propose a novel evaluation measure

Page 16: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

318 MANAGING AND MINING GRAPH DATA

Algorithm 8 DiscoverDenseSubgraph(c1 , s1, c2, s2)

apply recursive shingling algorithms to obtain first- and second-level shin-gles;let S =< s,Γ(s) > be first-level shingles;let T =< t,Γ(t) > be second-level shingles;apply clustering approach to get the clustering resultC in terms of first-levelshingles;for all C ∈ C do

output∪s∈CΓ(s) as a dense subgraph;end for

on potential improvement of adding a new vertex to a current quasi-clique.This measure enables the construction of quasi-cliques incrementally. Second,a semi-external memory algorithm incorporating edge pruning and externalbreath first search traversal is introduced to handle very large graphs. The basicidea is to decompose a large graph into several small components, then processeach of them using GRASP. In the following, we concentrate our efforts ondiscussing the first point and its usage in GRASP. Interestedreaders can referto [1] for the details of the second algorithm.

GRASP is a multi-start iterative process, with two steps periteration, ini-tial construction and local optimization. The initial construction step aims toproduce a feasible solution for subsequent processing. Forlocal optimization,we examine the neighborhood of the current solution in termsof the solutionspace, and try to find a better local solution. A comprehensive survey of theGRASP approach can be found in [41]. In this paper, Abello et al. proposed aincremental algorithm to build a maximal -clique, which serves as the initialfeasible solution in GRASP. Before we move to the algorithm,we first definethe potential of a vertex setR as

�(R) = ∣E(R)∣ − (∣R∣2

)

and the potential ofR with respect to a disjoint vertices setS to be

�S(R) = �(S ∪R)Furthermore, considering a graphG = (V,E) and a -clique induced by ver-tices setS ⊂ V , we call a vertexx ∈ (V ∖S) a�-vertex with respect toS if andonly if the graph induced byS ∪ {x} is a -clique. Then, the set of -verticeswith respect toS is denoted asN (S). Given this, the incremental algorithmtries to add agood vertex inN (S) into S. To facilitate our discussion, apotential difference of a vertexy ∈ N (S) ∖ {x} is defined to be

�S,x(y) = �S∪{x}({y}) − �S({y})

Page 17: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 319

The above equation can also expressed as

�S,x(y) = deg(x)∣S + deg(y)∣{x} − (∣S∣+ 1)

wheredeg(x)∣S is the degree ofx in the graph induced by vertex setS. Thisequation implies that the potential ofy which is a -neighbor ofx does notdecrease whenx is included inS. Here the -neighbors of vertexx are theneighbors ofx with deg(x)∣S greater than ∣S∣. The total effect caused byadding vertexx to current -cliqueS is

ΔS,x =∑

y∈N (S)∖{x}�S,x(y) = ∣N ({x})∣ + ∣N (S)∣(deg(x)∣S − (∣S∣+ 1))

We see that the vertices with a large number of -neighbors and high degreewith respect toS are preferred to be selected. A greedy algorithm to builda maximal -clique is outlined in AlgorithmDiscoverMaximalQuasi-Clique.The time complexity of this algorithm isO(∣S∣∣V ∣2), whereS the vertex setused to induce a maximal -clique.

Algorithm 9 DiscoverMaximalQuasi-clique(V,E, )

∗ ← 1, S∗ ← ∅;select a vertexx ∈ V and add intoS∗;while ∗ ≥ doS ← S∗;if N ∗(S) ∕= ∅ then

selectx ∈ N ∗(S);else

if N (S) ∖ S = ∅ thenreturn S;

end ifselectx ∈ N (S) ∖ S;

end ifS∗ ← S ∪ {x}; ∗ ← 2∣E(S∗)∣/(∣S∗∣(∣S∗∣ − 1));

end whilereturn S;

Then applying GRASP, a local search procedure tries to improve the gen-erated maximal -clique. Generally speaking, given current -clique inducedby vertex setS, this procedure attempts to substitute two vertices withinSwith one vertex outsideS in order to improve aforementionedΔS,x. GRASPguarantees to obtain a local optimum.

Page 18: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

320 MANAGING AND MINING GRAPH DATA

Visualization of Dense Components. Wang et al. [52] combine theoret-ical bounds, a greedy heuristic for graph traversal, and visual cues to developa mining technique for clique, quasi-clique, andk-core components. Their ap-proach is named CSV for Cohesive Subgraph Visualization. Figure 10.5 showsa representative plot and how it is interpreted.

Traversal Order

C_s

een(

v i)

k

Contains w connected vertices with degree � k.May contain a clique of size ������k,w).

w

Figure 10.5. Example of CSV Plot

A key measure in CSV is co-cluster sizeCC(v, x), meaning the (estimated)size of the largest clique containing both verticesv andx. Then,C(v) =max{CC(v, x),∀x ∈ N(v)}.

At the top level of abstraction, the algorithm is not difficult. We maintain apriority queue of vertices observed so far, sorted byC(v) value. We traversethe graph and draw a density plot by iterating the following steps:

1 Remove the top vertex from the queue, making this the current vertexv.2 Plotv.3 Addv’s neighbors to the priority queue.

Now for some details. If this is thei-th iteration, plot the point(i, Cseen(vi)),whereCseen(vi) is the largest value ofC(vi) observed so far. We say "seen sofar" because we may not have observed all ofv neighbors yet, and even when

Page 19: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 321

we have, we are only estimating clique sizes. Next, some neighbors ofv mayalready be in the queue. In this case, update theirC values and reprioritize.Due to the estimation method described below, the new estimate is no worsethat the previous one.

Since an exact determination ofCC(v, x) is computationally expensive,CSV takes several steps to efficiently find a good estimate of the actual cliquesize. First, to reduce the clique search space, the graph’s vertices and edges arepre-processed to map them to a multi-dimensional space. A certain number ofvertices are selected as pivot points. Then each vertex is mapped to a vector:v →M(v) = {d(v, p1), ⋅ ⋅ ⋅ , d(v, pp)}, whered(v, pi) is the shortest distancein the graph fromv to pivot pi. The authors prove that all the vertices of aclique map to the same unit cell, so we can search for cliques by searchingindividual cells.

Second, CSV further prunes the vertices within each occupied cell. Do thefollowing for each vertexv in each occupied cell: For each neighborx of v,identify the set of verticesY which connect to bothv andx. Construct theinduced subgraphS(v, x, Y ). If there is a clique, it must be a subgraph ofS.SortY by decreasing order of degree inS. To be in ak-clique, a vertex musthave degree≥ k − 1. Consequently, we step through the sortedY list andeliminate the remainder when the threshold�S(yi) < i − 1 is reached. Thesize of the remaining list is an upper bound estimate forC(v) andCC(v, x).With relatively minor modification, the same general approach can be used forquasi-cliques andk-cores.

The slowest step in CSV is searching the cells for pseudo-cliques, with over-all time complexityO(∣V ∣2log∣V ∣2d). This becomes exponential when thegraph is a single large clique. However, when tested on two real-life datasets,DBLP co-authorship and SMD stock market networks,d << ∣V ∣, so perfor-mance is polynomial.

Other Heuristic Approaches. We give a brief overview of three addi-tional heuristic approaches. Li et al. [32] studied the problem of discoveringdense bipartite subgraphs with so-called balanced noise tolerance, meaningthat each vertex in one part is allowed no more than a certain number or a cer-tain percentage of missing edges to the other part. This definition can avoidthe density skew found within density-based quasi-cliques. Li et al. observedthat their type of maximal quasi-biclique cannot be trivially expanded fromtraditional maximal bicliques. Some useful properties such as bounded clo-sure and the fixed point property are utilized to develop an efficient algorithm,� − CompleteQB, for discovering maximal quasi-bicliques with balancednoise tolerance. Given a bipartite graph, the algorithm looks for maximalquasi-bicliques where the number of vertices in each part exceeds a specifiedvaluems ≥ �. Two cases are considered. Ifms ≥ 2�, the problem is con-

Page 20: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

322 MANAGING AND MINING GRAPH DATA

verted into the problem to find exact maximal�-quasi bicliques that has beenwell discussed in [47]. On the other hand, ifms < 2�, a depth-first search for�-tolerance maximal quasi-bicliques whose vertex size is betweenms and2�is conducted to achieve the goal.

A spectral analysis method [13] is used to uncover the functionality of acertain dense component. To begin, the similarity matrix for a protein-proteininteraction network is defined, and the corresponding eigenvalues and eigen-vectors are calculated. In particular, each eigenvector with positive eigenvalueis identified as a quasi-clique, while each eigenvector withnegative eigenvalueis considered a quasi-biclique. Given these dense components, a statisticaltest based on p-value is applied to measure whether a dense component is en-riched with proteins from a particular category more than would be expectedby chance. Simply speaking, the statistical test ensures that the existence ofeach dense component is significant with respect to a specificprotein category.If so, that dense component annotated with the corresponding protein function-ality.

Kumar et al. [30] focus on enumerating emerging communitieswhich havelittle or no representation in newsgroups or commercial webdirectories. Theydefine an(i, j) biclique, where the number of vertices in each part arei andj,respectively, to be thecore of interested communities. Therefore, this paperaims to extract a non-overlapping maximal set ofcores for interested com-munities. A stream-based algorithm combining a set of pruning techniquesis presented to process huge raw web data and eventually generate the appro-priate cores. Some open problems like how to automatically extract semanticinformation and organize them into a useful structure are also discussed.

3.3 Exact and Approximation Algorithms for DiscoveringDensest Components

In this section, we focus on the problem of finding the densestcomponents,i.e., the quasi-cliques with the highest values ofgamma. We first look atexact solutions, utilizing max-flow/min-cut related algorithms. To reach fasterperformance, we then consider several greedy approximation algorithms thatguarantee. These bounded-approximation algorithms are able to efficientlyhandle the large graphs and obtain guaranteed reasonable results.

Exact Solution for Discovering Densest Subgraph. We first considerdensity of a graph defined as its average degree. Using this definition, Gold-berg [19] showed that the problem of finding the densest subgraph can be ex-actly reduced to a sequence of max-flow/min-cut problems. Given a valueg,algorithm constructs a network and finds a min-cut on it. The resulting sizestell us whether there is a subgraph with density at leastg. Given a graphG

Page 21: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 323

with n vertices andm edges, the construction of its corresponding cut networkare as follows:

1 Add two vertices sources and sinkt to undirectedG;

2 Replace each undirected edge with two directed edges with capacity 1such that each endpoint is the source and target of those two edges, re-spectively;

3 Add directed edges with capacitym from s to all vertices inG, and adddirected edges with capacitym + 2g − di from all vertices inG to t,wheredi is the degree of vertexvi in the original graph.

We apply the max-flow/min-cut algorithm to decompose the vertices of thenew network into two non-overlapping setsS andT , such thats ∈ S andt ∈ T . Let Vs = S ∖ {s}. Goldberg proved that there exists a subgraph withdensity at leastg if Vs ∕= ∅. The following theorem formally presents thisresult:

Theorem 10.2. GivenS andT which are generated by the algorithm for max-flow min-cut problem, ifVs ∕= ∅, then there is no subgraph with densityD suchthat g ≤ D. If Vs = ∅, then there exists a subgraph with densityD such thatg ≥ D.

The remaining issue is to enumerate all possible values of density and applythe max-flow/min-cut algorithm for each value. Goldberg observed that thedifference between any two subgraphs is no more than1n(n−1) . Combinedwith binary search, this observation provides a effective stop criteria to reducethe search space. The sketch of the entire algorithm is outlined in AlgorithmFindDensestSubgraph.

Greedy Approximation Algorithm with Bound. In [14], Charikardescribes exact and greedy approximation algorithms to discover subgraphswhich can maximize two different notions of density, one forundirected graphsand one for directed graphs. The density notion utilized forundirected graphsis the average degree of the subgraph, such that densityf(S) of the subsetSis ∣E(S)∣

∣S∣ . For directed graphs, the criteria first proposed by Kannan and Vinay[27] is applied. That is, given two subsets of verticesS ⊆ V andT ⊆ V , thedensity of subgraphHS,T is defined asd(S, T ) = ∣E(S,T )∣√

∣S∣∣T ∣. Here,S andT are

not necessarily disjoint. This paper studies the optimization problem of dis-covering a subgraphHs induced by a subsetS with maximumf(S) or HS,T

induced by two subsetsS andT with maximumd(S, T ), respectively.The author shows that finding a subgraphHS in undirected graph with max-

imum f(S) is equivalent to solving the following linear programming (LP)problem:

Page 22: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

324 MANAGING AND MINING GRAPH DATA

Algorithm 10 FindDensestSubgraph(G)

mind← 0;maxd← m;Vs ← ∅;while maxd−mind ≥ 1

n(n−1) do

g ← maxd+mind2 ;

Construct new network as we have mentioned;GenerateS andT utilizing max-flow min-cut algorithm;if S = {s} thenmaxd← g;

elsemind← g;Vs ← S − {s};

end ifend whilereturn subgraph induced byVs;

(1) max∑

ij xij(2) ∀ij ∈ E xij ≤ yi(3) ∀ij ∈ E xij ≤ yj(4)

∑i yi ≤ 1

(5) xij , yi ≥ 0

Page 23: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 325

From a graph viewpoint, we assign each vertexvi with weight∑

j xij , andmin(yi, yj) is the threshold for the weight of all edges(vi, vj) incident tovertexvi. Thenxij can be considered as the weight of edge(vi, vj) whichvertexvi distributes. Weights are normalized so that the sum of threshold foredges incident to vertexvi,

∑i yi, is bounded by 1. In this sense, finding

the optimal solution of∑

ij xij is equivalent to finding a set of edges such thatthe weights of their incident vertices mostly distribute tothem. Charikar showsthat the optimality of the above LP problem is exactly equivalent to discoveringthe densest subgraph in a undirected graph.

Intuitively, the complexity of this LP problem depends highly on the num-ber of edges and vertices in the graph (i.e., the number of inequality con-straints in LP). It is impractical for large graphs. Therefore, Charikar pro-poses an efficient greedy algorithm and proves that this algorithm produces a2-approximation forf(G). This greedy algorithm is a simple variant of [29].Let S is a subset ofV andHS is its induced subgraph with densityf(HS).Given this, we outline this greedy algorithm as follows:

1 LetS be the subset of vertices, initialized asV ;

2 LetHS be the subgraph induced by verticesS;

3 For each iteration, eliminate the vertex with lowest degree inHS fromSand recompute its density;

4 For each iteration, measure the density ofHS and record it as a candidatefor densest component

Similar techniques are also applied to finding the densest subgraph in a di-rected graph. The greedy algorithm for directed graphs takesO(m+ n) time.According to the analysis, Charikar claims that we have to run the greedy al-gorithm forO( logn� ) values of c in order to get a2 + � approximation, wherec = ∣S∣/∣T ∣ andS, T are two subset of vertices in the graph.

A variant of this approach is presented in [25]. Jin et al. developed anapproximation algorithm for discovering the densest subgraph by introducinga new notion ofrank subgraph. The rank subgraph can be defined as follows:

Definition 10.3. (Rank Subgraph) [25]. Given an undirected graphG =(V,E) and a positive integerd, we remove all vertices with degree less than dand their incident edges fromG. Repeat this procedure until no vertex can beeliminated and form a new graphGd. Each vertex inGd is adjacent to at leastd vertices inGd. If Gd has no vertices, it is denotedG∅. Given this, constructa subgraph sequenceG ⊇ G1 ⊇ G2 ⋅ ⋅ ⋅ ⊇ Gl ⊃ Gl+1 = G∅, whereGl ∕= G∅and contains at leastl + 1 vertices. Definel as the rank of the graphG, andGl as the rank subgraph ofG.

Page 24: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

326 MANAGING AND MINING GRAPH DATA

Lemma 10.4. Given an undirected graphG, letGs be the densest subgraphofGwith densityd(Gs) andGl be its rank subgraph with densityd(Gl). Then,the density ofGl is no less than half of the density ofGs:

d(Gl) ≥d(Gs)

2

The above lemma implies that we can use the rank subgraphGl with highestrank ofG to approximate its densest subgraph. This technique is utilized to de-rive a efficient search algorithm for finding densest subgraphs from a sequenceof bipartite graphs. The interested reader can refer to [25]for details.

Other Approximation Algorithms. Anderson et al. [4] consider the prob-lem of discovering dense subgraphs with lower bound or upperbound of size.Three problems includingdalks, damks and dks are formulated. In detail,dalks is the abbreviation for Densest-At-Least-K subgraph problem aiming atextracting an induced subgraph with highest average degreeamong all sub-graphs with at least k vertices. Similarly,damks looks for the Densest At-Most-K subgraph anddks seeks the densest subgraph with exactly k vertices.Clearly, bothdalks anddamks are relaxed versions ofdks. Anderson et al.show thatdaks is approximately as hard asdks which has been proven tobe NP-Complete. More importantly, an effective 1/3-approximation algorithmbased on core decomposition of a graph is proposed fordalks. This algorithmruns inO(m + n) andO(m + n log n) time for unweighted and weightedgraphs, respectively.

We describe the algorithm fordalks as follows. Given a graphG = (V,E)with n vertices and a lower bound of sizek, letHi be the subgraph induced byi vertices. At the beginning,i is initialized withn andHi is the original graphG. Then, we remove the vertexvi with minimum weighted degree fromHi

to formHi−1. Next, we update its corresponding total weightW (Hi−1) anddensityd(Hi−1). We repeat this procedure and get a sequence of subgraphsHn,Hn−1, ⋅ ⋅ ⋅ ,H1. Finally, we choose the subgraphHk with maximal densityd(Hk) as the resulting dense component.

Anderson [3] develops a local search algorithm to find a densebipartitesubgraph near a specified starting vertex in a bipartite graph. Specifically, forany bipartite subgraph withK vertices and density� (the definition of densityis identical to the definition in [27]), the proposed algorithm guarantees togenerate a subgraph with densityΩ(�/ log Δ) near any starting vertexv whereΔ is the maximum degree in the graph. The time complexity of this algorithmis O(ΔK2) which is independent of the size of graph, and thus has potentialto be scaled for large graphs.

Page 25: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 327

4. Frequent Dense Components

The dense component discovery problem can be extended to consider adataset consisting of a set of graphsD = {G1, ⋅ ⋅ ⋅ , Gn}. In this case, wehave two criteria for components: they must be dense and theymust occurfrequently. The density requirement can be any of our earlier criteria. Thefrequency requirement says that a component satisfies a minumum supportthreshold; that is, it appears in at least a certain number ofgraphs. Obviously,if we say that we find the same component in different graphs, there must bea correspondence of vertices from one graph to another. If the graphs haveexactly the same vertex sets, then we call this a relation graph set.

Many authors have considered the broader problem of frequent pattern min-ing in graphs [50, 23, 31]; however, not until recently has there been a clearfocus on patterns defined and restricting by density. Several recent papers havelooked into discovery methods for frequent dense subgraphs. We take a moredetailed look at some of these papers.

4.1 Frequent Patterns with Density Constraints

One approach is to impose a density constraint on the patterns discoveredby frequent pattern mining. In [55], Yan et al. use the minumum cut clusteringcriterion: a component must have an edge cut less than or equal to k. Notethat this is equivalent to ak-core criterion. Furthermore, each frequent patternmust be closed, meaning it does not have any supergraph with the same supportlevel. They develop two approaches, pattern growth and pattern reduction. Inpattern growth, begin with a small subgraph (possibly a single vertex) thatsatisfies both the frequency and density requirements but may not be closed.The algorithm incrementally adds adjacent edges until the pattern is closed. Inpattern reduction, initialize the working setP1 to be the first graphG1. Updatethe working set by intersecting its edge set with the edges ofthe next graph:

Pi = Pi−1 ∩GI = (V,E(Pi−1) ∩ E(GI))

This removes any edges that do not appear in both input graphs. DecomposePi into k-core subgraphs. Recursively call pattern reduction for each densesubgraph. Record the dense subgraphs that survive enough intersections to beconsidered frequent.

The greedy removal of edges at each iteration quickly reduces the workingset size, leading to fast execution time. The trade-off is that we prune awayedges that might have contributed to a frequent dense component. The con-sequence of edge intersection is that we only find componentswhose edgeshappen to appear in the firstmin support graphs. Therefore, a useful heuris-tic would be to order the graphs by decreasing overall density. In [55], theyfind that pattern reduction works better when targeting highconnectivity but a

Page 26: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

328 MANAGING AND MINING GRAPH DATA

low support threshold. Conversely, pattern growth works better when targetinghigh support but only modest connectivity.

4.2 Dense Components with Frequency Constraint

Hu et al. [22] take a different perspective, providing a simple meta-algorithmon top of an existing dense component algorithm. From the input graphs,which must be a relation graph set, they derive two new graphs, the Sum-mary Graph and the Second-Order Graph. The Summary Graph isG =(V, E), where an edge exists if it appears in at leastk graphs inD. Forthe Second-Order Graph, we transform each edge inD into a vertex, givingusF = (V × V,EF ). An edge joins two vertices inF (equivalent to twoedges inG) if they have similar support patterns inD. An edge’s supportpattern is represented as then-dimensional vector of weights in each graph:w(e) = {wG1(e), ⋅ ⋅ ⋅ , wGn(e)}. Then, a similarity measure such as Eu-clidean distance can be used to determine whether two vertices inF shouldbe connected.

Given these two secondary graphs, the problem is quite simple to state: findcoherent dense subgraphs, where a subgraphS qualifies if its vertices form adense component inG and if its edges form a dense component inF . Densityin Gmeans that the component’s edges occur frequently, when considering thewhole relation graph setD. Density inF ensures that these frequent edges arecoherent, that is, they tend to appear in the same graphs.

To efficiently find dense subgraphs, Hu uses a modified versionof Hartuvand Shamir’s HCS mincut algorithm [21]. Because Hu’s approach convertsanyn graphs into only 2 graphs, it scales well with the number of graphs. Adrawback, however, is the potentially large size of the second-order graph. Theworst case would occur when alln graphs are identical. Since all edge supportvectors would be identical, the second order graph would become a clique ofsize∣E∣ with O(∣E∣2) edges.

4.3 Enumerating Cross-Graph Quasi-Cliques

Pei et al. [40] consider the problem of finding so-called cross-graph quasi-cliques, CGQC for short. They use the balanced quasi-cliquedefinition. Givena set of graphsD = {G1, ⋅ ⋅ ⋅ , Gn} on the same set of verticesU , correspond-ing parameters 1, ⋅ ⋅ ⋅ , n for the completeness of vertex connectivity, and aminimum component sizeminS, they seek to find all subsets of vertices ofcardinality≥ minS such that when each subset is induced upon graphGi, itwill form a maximal i-quasi-clique.

A complete enumeration is#P -Complete. Therefore, they derive sev-eral graph-theoretical pruning methods that will typically reduce the executiontime. They employ aset enumeration tree[43] to list all possible subsets of

Page 27: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 329

{ }

{ x } { y } { z }

{ xy } { xz } { yz }

{ xyz }

Figure 10.6. The Set Enumeration Tree for {x,y,z}

vertices, while taking advantage of some tree-based concepts, such as depth-first search and sub-tree pruning. An example of a set enumeration tree isshown in Figure 10.6. Below is a brief listing of some of the graph and treeproperties they utilize to prune the set of candidate components, followed bythe main algorithm, calledCrochet.

1 Given and graph sizen, there exist upper bounds on the graph diameterdiam(G). For example,diam(G) ≤ n− 1 if > 1

n−1 .

2 DefineNk(u) = vertices within a distancek of u.3 Reducing vertices: If�(u) < i(minS − 1) or ∣Nk(u)∣ < (minS − 1),

thenu cannot be in a CGQC.4 Candidate projection: when traversing the tree, a child cannot be in a

CGQC if it does not satisfy its parent’s neighbor distance boundsNkiGi

.5 Subtree pruning: apply various rules onminS , redundancy, monotonic-

ity.

5. Applications of Dense Component Analysis

In financial and economic analysis, dense components represent entities thatare highly correlated. For example, Boginski et al. define a market graph,where each vertex is a financial instrument, and two verticesare connectedif their behaviors (say, price change over time) are highly correlated [9, 10].A dense component then indicates a set of instruments whose members arewell-correlated to one another. This information is valuable both for under-standing market dynamics and for predicting the behavior ofindividual instru-ments. Density can also indicate strength and robustness. Du et al. [15] iden-tify cliques in a financial grid space to assist in discovering price-value motifs.Some researchers have employed bipartite and multipartitenetworks. Sim etal. [47] correlates stocks to financial ratios using quasi-bicliques. Alkemade

Page 28: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

330 MANAGING AND MINING GRAPH DATA

Algorithm 11 Crochet(G1, G2, 1, 2,mins)

1: for all graphGi do2: constructset enumeration treefor all possible vertex subsets ofGi;3: ki ← upper bound diameter of complete i-quasi-complete graph inGi;4: end for5: apply Vertex and Edge Reduction toG1 andG2;6: for all v ∈ V (G1), using DFS and highest-degree-child-first orderdo7: recursive-mine({v}, G1, G2);8: end for9:

10: Function recursive-mine(X,G1 , G2); {returns TRUE if still seekingquasi-cliques in this branch}

11: Gi ← Gi(P ), P = {u∣u ∈ ∩v∈X,i=1,2NkiGi(v)} {Candidate Projection}

12: Gi ← Gi(P (X));13: apply Vertex Reduction;14: if a Subtree Pruning condition appliesthen return FALSE;15: continue← FALSE;16: for all v ∈ P (X)∖X, using DFS and highest-degree-child-first orderdo17: continue← continue ∨ recursive-mine(X ∪ {v}, G1, G2);18: end for19: if (not continue) ∧ (Gi(X) is a i-quasi-complete graph)then20: outputX;21: return TRUE;22: else23: return continue;24: end if

et al. [2] finds edge density in a tripartite graph of producers, consumers, andintermediaries to be an important factor in the dynamics of commerce.

In the first decade of the 21st century, the field that perhaps has shownthe greatest interest and benefitted the most from dense component analysisis biology. Molecular and systems biologists have formulated many types ofnetworks: signal transduction and gene regulation networks, protein interac-tion networks, metabolic networks, phylogenetic networks, and ecological net-works. [26].

Proteins are so numerous that even simple organisms such asSaccha-romyces cerevisiae, a budding yeast, are believed to have over 6000 [51]. Un-derstanding the function and interrelationships of each one is a daunting task.Fortunately, there is some organization among the proteins. Dense componentsin protein-protein interaction networks have been shown tocorrelate to func-tional units [49, 42, 54, 13, 6]. Finding these modules and complexes helps

Page 29: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 331

to explain metabolic processes and to annotate proteins whose functions are asyet unknown.

Gene expression faces similar challenges. Microarray experiments canrecord which of the thousands of genes in a genome are expressed under aset of test conditions and over time. By compiling the expression results fromseveral trials and experiments, a network can be constructed. Clustering thegenes into dense groups can be used to identify not only healthy functionalclasses, but also the expression pattern for genetic diseases [48].

Proteins interact with genes by activating and regulating gene transcriptionand translation. Density in a protein-gene bipartite graphsuggests which pro-tein groups or complexes operate on which genes. Everett et al. [16] haveextended this to a tripartite protein-gene-tissue graph.

Other biological systems are also being modeled as networks. Ecologicalnetworks, famous for food chains and food webs, are receiving new attentionas more data becomes available for analysis and as the effects of climate changebecome more apparent.

Today, the natural sciences, the social sciences, and technological fields areall using network and graph analysis methods to better understand complexsystems. Dense component discovery and analysis is one important aspectof network analysis. Therefore, readers from many different backgrounds willbenefit from understanding more about the characteristics of dense componentsand some of the methods used to uncover them.

6. Conclusions and Future Research

In this chapter, we presented a survey of algorithms for dense subgraph dis-covery. This problem has been studied in the classical literature in the contextof the problem of graph partitioning. Subsequently, a number of techniqueshave been designed for quasi-clique detection, as well as shingling approachesfor dense subgraph discovery. Many of the recent applications are designedin the contexts of the web, social, communication and biological networks.These networks have a number of properties, in that they aremassiveand oftendynamic in nature. This leads to a number of interesting problems forfutureresearch:

In many large scale applications, the data is often disk-resident. Thisleads to issues involving efficient processing of the underlying network.This is because it is not possible to perform random access ofthe edgesin a disk-resident networks.

In applications such as the web and social networks, thedomainof theunderlying graph may be massive. In many web, telecommunication,biological and social networks, we may have millions of nodes in theunderlying graph. Consequently, the number of edges may range in the

Page 30: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

332 MANAGING AND MINING GRAPH DATA

trillions. This may lead to storage issues, since the numberof distinctedges may not even be possible to store effectively on many desktopmachines.

A number of recent applications may lead to the streaming scenario inwhich the edges in the graph are received incrementally overtime at afast speed. This is the case in many large telecommunicationand socialnetworks. In such cases, it may be extremely challenging to analyze theunderlying graph in real time to determine dense patterns.

The area of dense graph mining in massive graphs is still relatively unexploredand represents a fertile area of future research for a numberof different appli-cations.

Page 31: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 333

References

[1] J. Abello, M. G. C. Resende, and S. Sudarsky. Massive quasi-clique de-tection. InLATIN ’02: Proc. 5th Latin American Symposium on Theoret-ical Informatics, pages 598–612. Springer-Verlag, 2002.

[2] F. Alkemade, H. A. La Poutr«e, and H. A. Amman. An agent-based evolu-tionary trade network simulation. In A. Nagurney, editor,Innovations inFinancial and Economic Networks (New Dimensions in Networks), chap-ter 11, pages 237–255. Edward Elgar Publishing, 2004.

[3] R. Andersen. A local algorithm for finding dense subgraphs. In SODA’08: Proc. 19th ACM-SIAM Symp. on Discrete Algorithms, pages 1003–1009. Society for Industrial and Applied Mathematics, 2008.

[4] R. Andersen and K. Chellapilla. Finding dense subgraphswith sizebounds. InWAW ’09: Proc. 6th Intl. Workshop on Algorithms and Modelsfor the Web-Graph, pages 25–37. Springer-Verlag, 2009.

[5] Anna Nagurney, ed.Innovations in Financial and Economic Networks(New Dimensions in Networks). Edward Elgar Publishing, 2004.

[6] G. Bader and C. Hogue. An automated method for finding molecularcomplexes in large protein interaction networks.BMC Bioinformatics,4(1):2, 2003.

[7] V. Batagelj and M. Zaversnik. An o(m) algorithm for coresde-composition of networks. CoRR (Computing Research Repository),cs.DS/0310049, 2003.

[8] P. Berkhin. Survey of clustering data mining techniques. In C. N. Ja-cob Kogan and M. Teboulle, editors,Grouping Multidimensional Data,chapter 2, pages 25–71. Springer Berlin Heidelberg, 2006.

[9] V. Boginski, S. Butenko, and P. M. Pardalos. On structural properties ofthe market graph. In A. Nagurney, editor,Innovations in Financial andEconomic Networks (New Dimensions in Networks), chapter 2, pages 29–45. Edward Elgar Publishing, 2004.

[10] V. Boginski, S. Butenko, and P. M. Pardalos. Mining market data: Anetwork approach.Computers and Operations Research, 33(11):3171–3184, 2006.

[11] A. Z. Broder, S. C. Glassman, M. S. Manasse, and G. Zweig.Syntacticclustering of the web.Comput. Netw. ISDN Syst., 29(8-13):1157–1166,1997.

[12] C. Bron and J. Kerbosch. Algorithm 457: finding all cliques of an undi-rected graph.Commun. ACM, 16(9):575–577, 1973.

Page 32: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

334 MANAGING AND MINING GRAPH DATA

[13] D. Bu, Y. Zhao, L. Cai, H. Xue, and X. Z. andH. Lu. Topological structureanalysis of the protein-protein interaction network in budding yeast.Nucl.Acids Res., 31(9):2443–2450, 2003.

[14] M. Charikar. Greedy approximation algorithms for finding dense compo-nents in a graph. InAPPROX ’00: Proc. 3rd Intl. Workshop on Approx-imation Algoritms for Combinatorial Optimization, volume 1913, pages84–95. Springer, 2000.

[15] X. Du, J. H. Thornton, R. Jin, L. Ding, and V. E. Lee. Migration motif: Aspatial-temporal pattern mining approach for financial markets. InKDD’09: Proc. 15th ACM SIGKDD Intl. Conf. on Knowledge Discovery andData Mining. ACM, 2009.

[16] L. Everett, L.-S. Wang, and S. Hannenhalli. Dense subgraph computa-tion via stochastic search: application to detect transcriptional modules.Bioinformatics, 22(14), July 2006.

[17] G. W. Flake, S. Lawrence, and C. L. Giles. Efficient identification ofweb communities. InKDD’00: Proc. 6th ACM SIGKDD Intl. Conf. onKnowledge Discovery and Data Mining, pages 150 – 160, 2000.

[18] D. Gibson, R. Kumar, and A. Tomkins. Discovering large dense sub-graphs in massive graphs. InVLDB ’05: Proc. 31st Intl. Conf. on VeryLarge Data Bases, pages 721–732. ACM, 2005.

[19] A. V. Goldberg. Finding a maximum density subgraph. Technical report,UC Berkeley, 1984.

[20] G. Grimmett.Precolation. Springer Verlag, 2nd edition, 1999.

[21] E. Hartuv and R. Shamir. A clustering algorithm based ongraph connec-tivity. Inf. Process. Lett., 76(4-6):175–181, 2000.

[22] H. Hu, X. Yan, Y. H. 0003, J. Han, and X. J. Zhou. Mining coherent densesubgraphs across massive biological networks for functional discovery. InISMB (Supplement of Bioinformatics), pages 213–221, 2005.

[23] A. Inokuchi, T. Washio, and H. Motoda. An apriori-basedalgorithm formining frequent substructures from graph data. InPKDD ’00: Proc. 4thEuropean Conf. on Principles of Data Mining and Knowledge Discovery,pages 13–23, 2000.

[24] A. K. Jain, M. N. Murty, and P. J. Flynn. Data clustering:a review.ACMComput. Surv., 31(3):264–323, 1999.

[25] R. Jin, Y. Xiang, N. Ruan, and D. Fuhry. 3-hop: A high-compressionindexing scheme for reachability query. InSIGMOD ’09: Proc. ACMSIGMOD Intl. Conf. on Management of Data. ACM, 2009.

[26] B. H. Junker and F. Schreiber.Analysis of Biological Networks. Wiley-Interscience, 2008.

Page 33: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

A Survey of Algorithms for Dense Subgraph Discovery 335

[27] R. Kannan and V. Vinay. Analyzing the structure of largegraphs.manuscript, August 1999.

[28] R. M. Karp. Reducibility among combinatorial problems. In R. E.Miller and J. W. Thatcher, editors,Complexity of Computer Computa-tions, pages 85–103. Plenum, New York, 1972.

[29] G. Kortsarz and D. Peleg. Generating sparse 2-spanners. J. Algorithms,17(2):222–236, 1994.

[30] R. Kumar, P. Raghavan, S. Rajagopalan, and A. Tomkins. Trawlingthe web for emerging cyber-communities.Computer Networks, 31(11-16):1481–1493, 1999.

[31] M. Kuramochi and G. Karypis. Frequent subgraph discovery. In ICDM’01: Proc. IEEE Intl. Conf. on Data Mining, pages 313–320. IEEE Com-puter Society, 2001.

[32] J. Li, K. Sim, G. Liu, and L. Wong. Maximal quasi-bicliques with bal-anced noise tolerance: Concepts and co-clustering applications. InSDM’08: Proc. SIAM Intl. Conf. on Data Mining, pages 72–83. SIAM, 2008.

[33] G. Liu and L. Wong. Effective pruning techniques for mining quasi-cliques. In W. Daelemans, B. Goethals, and K. Morik, editors,ECML/PKDD (2), volume 5212 ofLecture Notes in Computer Science,pages 33–49. Springer, 2008.

[34] R. Luce. Connectivity and generalized cliques in sociometric group struc-ture. Psychometrika, 15(2):169–190, 1950.

[35] K. Makino and T. Uno. New algorithms for enumerating allmaximalcliques.Algorithm Theory - SWAT 2004, pages 260–272, 2004.

[36] H. Matsuda, T. Ishihara, and A. Hashimoto. Classifyingmolecular se-quences using a linkage graph with their pairwise similarities. Theor.Comput. Sci., 210(2):305–325, 1999.

[37] R. Mokken. Cliques, clubs and clans.Quality and Quantity, 13(2):161–173, 1979.

[38] J. W. Moon and L. Moser. On cliques in graphs.Israel Journal of Math-ematics, 3:23–28, 1965.

[39] M. E. J. Newman. The structure and function of complex networks.SIAMREVIEW, 45:167–256, 2003.

[40] J. Pei, D. Jiang, and A. Zhang. On mining cross-graph quasi-cliques. InKDD’05: Proc. 11th ACM SIGKDD Intl. Conf. on Knowledge Discoveryand Data Mining, pages 228–238. ACM, 2005.

[41] L. Pitsoulis and M. Resende. Greedy randomized adaptive search pro-cedures. In P. Pardalos and M. Resende, editors,Handbook of AppliedOptimization, pages 168–181. Oxford University Press, 2002.

Page 34: Chapter 10 A SURVEY OF ALGORITHMS FOR DENSE SUBGRAPH …

336 MANAGING AND MINING GRAPH DATA

[42] N. Pr»zulj, D. Wigle, and I. Jurisica. Functional topology in a network ofprotein interactions.Bioinformatics, 20(3):340–348, 2004.

[43] R. Rymon. Search through systematic set enumeration. In Proc. ThirdIntl. Conf. on Knowledge Representation and Reasoning, 1992.

[44] J. P. Scott. Social Network Analysis: A Handbook. Sage PublicationsLtd., 2nd edition, 2000.

[45] S. B. Seidman. Network structure and minimum degree.Social Networks,5(3):269–287, 1983.

[46] S. B. Seidman and B. Foster. A graph theoretic generalization of theclique concept.J. Math. Soc., 6(1):139–154, 1978.

[47] K. Sim, J. Li, V. Gopalkrishnan, and G. Liu. Mining maximal quasi-bicliques to co-cluster stocks and financial ratios for value investment. InICDM ’06: Proc. 6th Intl. Conf. on Data Mining, pages 1059–1063. IEEEComputer Society, 2006.

[48] D. K. Slonim. From patterns to pathways: gene expression data analysiscomes of age.Nature Genetics, 32:502–508, 2002.

[49] V. Spirin and L. Mirny. Protein complexes and functional modules inmolecular networks.Proc. Natl. Academy of Sci., 100(21):1123–1128,2003.

[50] Y. Takahashi, Y. Sato, H. Suzuki, and S.-i. Sasaki. Recognition of largestcommon structural fragment among a variety of chemical structures.An-alytical Sciences, 3(1):23–28, 1987.

[51] P. Uetz, L. Giot, G. Cagney, T. A. Mansfield, R. S. Judson,J. R.Knight, D. Lockshon, V. Narayan, M. Srinivasan, P. Pochart,A. Qureshi-Emili, Y. Li, B. Godwin, D. Conover, T. Kalbfleisch, G. Vijayadamodar,M. Yang, M. Johnston, S. Fields, and J. M. Rothberg. A comprehen-sive analysis of protein-protein interactions in saccharomyces cerevisiae.Nature, 403:623–631, 2000.

[52] N. Wang, S. Parthasarathy, K.-L. Tan, and A. K. H. Tung. Csv: visualizingand mining cohesive subgraphs. InSIGMOD ’08: Proc. ACM SIGMODIntl. Conf. on Management of Data, pages 445–458. ACM, 2008.

[53] S. Wasserman and K. Faust.Social Network Analysis: Methods and Ap-plications. Cambridge University Press, 1994.

[54] S. Wuchty and E. Almaas. Peeling the yeast interaction network. Pro-teomics, 5(2):444–449, 2205.

[55] X. Yan, X. J. Zhou, and J. Han. Mining closed relational graphs withconnectivity constraints. InKDD ’05: Proc. 11th ACM SIGKDD Intl.Conf. on Knowledge Discovery in Data Mining, pages 324–333. ACM,2005.