Clustering and Community Detection in Directed Networks: A Survey
Abstract
Networks (or graphs) appear as dominant structures in diverse domains, including sociology, biology, neuroscience and computer science. In most of the aforementioned cases graphs are directed – in the sense that there is directionality on the edges, making the semantics of the edges non symmetric as the source node transmits some property to the target one but not vice versa. An interesting feature that real networks present is the clustering or community structure property, under which the graph topology is organized into modules commonly called communities or clusters. The essence here is that nodes of the same community are highly similar while on the contrary, nodes across communities present low similarity. Revealing the underlying community structure of directed complex networks has become a crucial and interdisciplinary topic with a plethora of relevant application domains. Therefore, naturally there is a recent wealth of research production in the area of mining directed graphs – with clustering being the primary method sought and the primary tool for community detection and evaluation. The goal of this paper is to offer an indepth comparative review of the methods presented so far for clustering directed networks along with the relevant necessary methodological background and also related applications. The survey commences by offering a concise review of the fundamental concepts and methodological base on which graph clustering algorithms capitalize on. Then we present the relevant work along two orthogonal classifications. The first one is mostly concerned with the methodological principles of the clustering algorithms, while the second one approaches the methods from the viewpoint regarding the properties of a good cluster in a directed network. Further, we present methods and metrics for evaluating graph clustering results, demonstrate interesting application domains and provide promising future research directions.
keywords:
Community detection, graph clustering, directed networks, complex networks, graph miningContents
 1 Introduction
 2 Basic Terminology and Background
 3 Clusters in Directed Networks – Intuition and Discussion
 4 Dealing with Edge Directionality: Approaches for Identifying ClustersCommunities in Directed Networks
 5 DefinitionBased Classification of Clustering Methods
 6 Evaluation Metrics and Benchmarking
 7 Realworld Applications on Directed Networks
 8 Open Problems and Future Research Directions
 9 Conclusions
1 Introduction
Networks have become ubiquitous as data from many different disciplines can be naturally mapped to graph structures newman (). Technological networks, including the Internet, electrical grids, telephone networks and road networks are an important part of everyday life. Information networks, such as the hyperlink structure of the Web and citation networks, offer an effective way to represent content and information and navigate through it. Biological networks, including proteinprotein interaction networks, neural networks, gene regulatory networks and food webs, can be used to model the function and interaction of natural entities. Social networks, such as collaboration networks, sexual networks and interaction networks over online social networking applications are used to represent and model the social ties among individuals. Due to the extent and the diversity of contexts in which graphs appear, the area of network analysis has become both crucial and interdisciplinary, in order to understand the features, the structure and the dynamics of these complex systems.
Realworld networks, as the ones presented above, are not classified as random networks (e.g., the ErdösRényi random graph model erdos ()); that is, they present fascinating patterns and properties conveying that their inherent structure is not governed by randomness. The degree distribution is skewed, following a powerlaw distribution barabasialbertscience (); fff (), the average distance between nodes in the network is short (the socalled smallworld phenomenon milgram (); webdiameter (); leskovecmsn ()), the ties between entities do not always represent reciprocal relations forming directed networks with non symmetric links newman (), while edge distribution is inhomogeneous resulting in node groups with high internal edges’ density and low density between them newman (); girvannewman (). The last property is referred to clustering or community structure and is of great interest in various fields and realworld applications. Detecting clusters in graphs with directed edges among nodes, is the focus of this survey paper.
Informally, a cluster or community can be considered as a set of entities that are closer each other, compared to the rest of the entities in the dataset. The notion of closeness is based on a similarity measure, which is usually defined over the set of entities. In the areas of machine learning and data mining, the task of clustering is also referred as “unsupervised learning” where the aim is to group (cluster) together similar objects without any prior knowledge about the clusters (e.g., see Ref. jainclustering ()).
In the case of networks, the clustering (or community detection) problem refers to grouping nodes into clusters according to their similarity, which usually considers either topological features (e.g., features extracted from the graph), or other characteristics related to the nodes and edges of the graph (e.g., additional information that may be associated with the nodes and edges), or both of them. In other words, the clusters typically correspond to groups of nodes sharing common properties and characteristics. Although there are several definitions for the graph clustering problem, the most common one states that a cluster corresponds to a set of nodes with more edges inside the set than to the rest of the graph.
It is important to stress out here that the task of graph clustering can be distinguished into two different problems. The first and most studied one – which is the focus of this paper – aims to group the nodes of a single graph according to some clustering definition (e.g., density). On the other hand, the second problem refers to the task where the goal is to cluster a set of graphs – treating them as individual objects – based on their similarity (e.g., see Ref. aggarwal10clustering ()).
Finding clusters in directed networks is a challenging task with several important applications in a wide range of domains. However, the problem of graph clustering has mainly been considered and studied for the case of undirected networks. A plethora of diverse algorithms have been proposed for the undirected settings, involving contributions from the fields of computer science, statistical physics and biology (e.g., see Ref. fortunato ()). Nevertheless, numerous graph data in several applications are by nature directed and thus it is meaningful to incorporate all the available information during the clustering process (i.e., the directionality of the edges). Some illustrative examples include (see Section 7 for a detailed list of applications related to clustering directed networks):

Social and information networks: Clusters in the directed hyperlink structure of the Web correspond to sets of web pages that share some common topics. Similarly, communities in a social network with nonsymmetric links (e.g., twitter) correspond to individuals with common interests or friendship relationships.

Biology: In prokaryote genome sequence data, the donorrecipient relations among genomes are modeled by directed networks (called Lateral Gene Transfer networks  LGT). Applying graph clustering methods to these directed networks enables testing hypotheses relevant to LGT patterns and mechanisms operating in nature genomeresearch ().

Neuroscience: Analyzing directed brain networks produced by neuron interactions, neuroscientists are able to comprehend the functional architecture of the brain neuro ().

Clustering nongraph data: Except from the cases where the data naturally can be modeled as graphs, graph clustering algorithms can be also applied on data with no inherent graph structure, operating thus as general purpose algorithms. In such cases, the data (e.g., points in a dimensional Euclidean space) is represented in terms of a similarity graph corresponding to topological relationships and distance among them. Hence, the problem of clustering a set of data points is transformed to a graph clustering problem (e.g., see tutorial by von Luxburg vonluxburg ()). Depending on the way the similarity graph is constructed, the final graph can contain directed edges (e.g., using nearest neighbor graphs or based on probabilistic dependence relations between data points clusteringaaai08 ()).
It is clearly evident that the clustering problem in directed networks is particularly significant with many important applications in several areas. Nevertheless, despite its importance, the problem has not received significant attention from the research community. Even though a plethora of directed graph data exist, the most common way to dealing with edge directionality during the clustering task, is simply to ignore it. In other words, the directed network is converted into an undirected one (by assuming edge symmetry), and then algorithms for the undirected graph clustering problem can be applied. However, in many cases, this simplistic technique would not be satisfactory, since some of the underlying semantics are not retained (e.g., in a citation network between scientific publications or in the hyperlinked structure of the Web).
The goal of this survey paper is to review the methods and algorithms proposed by the wider research community to deal with the clustering in directed networks. Some of them include extensions of approaches that have been previously applied in undirected networks while others propose novel ways as to how edge directionality can be utilized in the clustering task.
1.1 Challenges in Clustering Directed Networks
The problem of clustering in directed networks is considered to be a more challenging task as compared to the undirected case. Highlighting the difficulties of the problem, in his resent work Santo Fortunato stated that “Developing methods of community detection for directed graphs is a hard task. For instance, a directed graph is characterized by asymmetrical matrices (adjacency matrix, Laplacian, etc.), so spectral analysis is much more complex. Only a few methods can be easily extended from the undirected to the directed case. Otherwise, the problem must be formulated from scratch” fortunato (). This paragraph summarized the basic challenges for the directed graph clustering problem. Moreover, the nature of relationships captured by the edges are fundamentally different from the ones in the undirected settings pnasdirectedreciprocity (). To this direction, we briefly discuss on some of the main challenges, which actually can be helpful to understand how the directed graph clustering is differentiated from the undirected version.
It is clear that ignoring edge directionality and considering the graph as undirected is not a meaningful way to cluster directed networks as it fails to capture the asymmetric relationships implied by the edges of a directed network. Therefore, the main challenge is to propose meaningful ways to incorporate edge directionality in the clustering process. However, even this is not sufficient. In the broader literature in graph theory and graph algorithms, the main focus is on undirected graphs. Therefore, two additional points that strengthen the challenging nature of the problem are:

While several graph concepts (e.g., density) are theoretically well founded for undirected graphs, not enough effort has been put on how to extend these concepts on directed graphs.

Similarly, extending to the directed case the available theoretical tools that have been already applied to define and propose solutions for the undirected versions of the problem (including graph theoretic and linear algebraic tools), is not straightforward (e.g., the tool of spectral clustering based on the Laplacian matrix chungdirectedlaplacian05 ()).
In addition to the above points, a precise and common definition for the clustering problem in directed networks does not yet exist. The intuition based on the intracluster and intercluster edge density cannot be easily extended to the directed case, due to the absence of link symmetry. Moreover, the presence of directed edges implies more sophisticated types of clusters that do not exist in undirected networks and cannot be captured using only density and edge concentration characteristics (e.g., clusters that represent patterns of movement or flow circulation among nodes – see Section 3). As we will see at the rest of the paper, in the very recent literature several clustering definitions have been proposed and various algorithms have been designed to reveal different “types” of graph clusters (e.g., rosvallpnas08 ()).
1.2 Goals of the Survey and Contributions
The main goal of this survey paper is to organize, analyze and present in a unified and comparative manner the methods and algorithms proposed so far for the problem of clustering and community detection in directed networks. While a large amount of research works and related surveys have been devoted to the undirected version of the problem (see Section 1.3 for more details), our focus is on the clustering problem in the directed settings, where very recently many diverse methods and algorithms have been proposed.
Our survey adopts the following methodology:

As a first resort, we present a broad categorization of the efforts that have been proposed so far. This classification scheme is mostly concerned with the methodological principles and the algorithmic approaches for the graph clustering problem in directed networks and is mostly built upon the work for the undirected case of the problem. Hence, whenever possible we organize and review the related work describing how existing methods for undirected networks are extended in order to deal with edge directionality. Additionally, the related work is organized according to common methodological features that the approaches may share. We consider that such a classification and presentation scheme is a natural way to explore and study the relevant literature, since a large portion of the proposed approaches constitute extensions from the undirected case of the problem.

At a second step, we present two major categories of clusters identified from the already proposed clustering methods, and then, the related work is classified to these categories. The first category corresponds to methods which adopt the more traditional densitybased definition of clusters, while the second one includes methods where the extracted clusters present interesting patterns, beyond simple edge density, reflecting the existence of directed edges (e.g., flowbased patterns – Section 3).
To the best of our knowledge, this is the first comprehensive and extensive survey fully devoted to the clustering problem in directed networks. We consider that the two aforementioned axes on which the survey will align, can be helpful both for researchers in the area and for practitioners that are interested in graph clustering algorithms for directed networks (e.g., see Section 7 for some important applications where directed graph clustering methods can be applied). For the latter case, our ultimate goal is that this survey can be used as a practitioner’s guide.
1.3 Related Surveys
There are many previous related works and surveys that refer to graph clustering and community detection in undirected networks. Fortunato fortunato () presents a comprehensive review in the area of community detection for undirected networks from a statistical physics perspective, while Schaeffer schaefferreview () mainly focuses on the graph clustering problem as an unsupervised learning task. Both surveys briefly discuss the case of directed networks, however their focus is on the undirected case of the problem. A similar but more compact description of clustering approaches in undirected networks is presented in Refs. communitiesams (); danonjstat05 (); arenassurvey (). Coscia et al. cosciareview () present a categorization for community discovery methods according to the definition of community they adopt (e.g., communities based on internal density or bridge detection). Our work shares some common features with the one of Coscia et al. since part of our presentation follows a similar categorization scheme. Parthasarathy et al. parthasarathybookcommunitydetection () present the principal methods for the undirected community discovery problem, as well as research trends and emerging tasks in the area. One of them is community discovery in directed networks. Aggarwal and Wang aggarwal10clustering () elaborate on the basic principles for finding communities in undirected networks, presenting some wellestablished approaches (e.g., spectral clustering, minimum cut problem). Moreover, a large part of their work is devoted to the problem of clustering a set of graphs, treating them as individual objects (in contrast to the node clustering problem of a single graph which is the focus of this paper). Finally, Papadopoulos et al. papadopoulossurvey12 () discuss the topic of community detection in the context of Social Media.
1.4 Structure of the Survey
The rest of the paper is organized as follows. In Section 2 we commence by providing the background and the basic terminology used throughout this survey. In Section 3 we elaborate on the problem of clustering in directed networks, providing the basic definitions proposed in the relevant works. These clustering definitionsnotions will later be used to classify the proposed methods based on the type of clusters they aim to identify. Then, in Section 4 we present the first and main methodological classification based on the algorithmic approaches they adopt to deal with edge directionality. Whenever the methods are built upon approaches for undirected networks, an incremental description is followed with respect to the undirected case. In Section 5 we present a second classification scheme of the clustering approaches according to the notiondefinition of clusters in directed networks, and we also present an empirical comparison of the main methods that have been reviewed throughout this paper. In Section 6 we present the evaluation metrics for assessing the clustering results and discuss on proposed benchmarking techniques for the graph clustering task. Section 7 presents the main applications of directed graph clustering in different application domains, while in Section 8 we discuss future research directions. Finally, in Section 9 we conclude the survey by summarizing and providing remarks on the problem.
2 Basic Terminology and Background
In this section we provide the basic terminology and background that will be used throughout the paper. We give the definitions for basic graph theoretic and linear algebraic concepts, and then we describe the main aspects of random walks which play crucial role in the design of clustering and community detection algorithms. Finally, we make a brief presentation of the major metrics used to quantify the quality of a community/cluster in undirected networks. Table 1 gives a list of used symbols along with their definition. For a general introduction to the field of complex networks, the reader may refer to Refs. physreportscomplexnetworks (); newman (); chakrabartifaloutsosacmcomputsurv06 ().
Symbol  Definition 

Directed network  
Undirected network  
Bipartite network  
Set of nodes and edges for network  
Number of nodes and edges in the network  
Edge from node to node  
Adjacency matrix of an undirected and directed network respectively  
Indegree and Outdegree of node  
Diagonal In and Out degree matrices  
Entry of matrix  
The transpose of matrix  
th largest eigenvalue of a matrix  
Eigenvector corresponds to th eigenvalue  
th component of th eigenvector 
2.1 Graph Theory
A network is usually represented by a graph (throughout the paper we use the terms network and graph interchangeably). A graph consists of a set of nodes and a set of edges which connect pairs of nodes (sometimes the nodes and edges of a graph are also called vertices and links respectively). The number of nodes in the graph is equal to and the number of edges . A graph may be directed or undirected, unipartite or bipartite and the edges may contain weights or not. Figure 1 depicts some examples of different types of graphs.
Definition 1.
(Directed and Undirected Graph). In a directed graph , every edge links node to node (ordered pair of nodes). An undirected graph is a directed one where if edge , then edge as well.
Definition 2.
(Bipartite Graph). A graph is called bipartite if the node set can be partitioned into two disjoint sets and , where , such that every edge connects a node of to a node of , i.e., and . In other words, there are no edges between nodes of the same partition.
(a) Undirected graph  (b) Directed graph  (c) Bipartite graph  (d) Weighted graph 
Every graph (directed or undirected, weighted or unweighted) can be represented by its adjacency matrix . Matrix has size (or ), where the rows and columns represent the nodes of the graph and the entries indicate the existence of edges.
Definition 3.
(Adjacency Matrix). The adjacency matrix of a graph is an matrix, such that
The above definition is rather general and is suitable both for weighted and unweighted graphs. For the former case, each value represents the weight associated with the edge , while for the latter case of unweighted graphs the weight of each edge is equal to one (i.e., ). If the graph is undirected, the adjacency matrix is symmetric, i.e., , while for directed graphs the adjacency matrix is nonsymmetric.
A basic property of the nodes in a graph is their degree. In an undirected graph , a node has degree if it has incident edges. In the case of directed graphs, every node is associated with an indegree and an outdegree. The indegree of node is equal to the number of incoming edges, i.e., , while the outdegree of node equals to the number of outgoing edges, i.e., . In undirected graphs, the indegree is equal to the outdegree, i.e., . The degree matrix is defined as the diagonal matrix , with the degree of each node in the main diagonal (zero entries outside main diagonal). Similarly, in directed graphs we can define the indegree matrix and outdegree matrix for the in and out degrees respectively.
Let be an undirected graph. A path is defined as a sequence of nodes , with the property that every consecutive pair of nodes in the sequence is connected by an edge. Two nodes are called connected if there is a path in from node to node . The above definitions can be extended to directed networks, where in a directed path, a directed edge should exist from each node of the sequence to the next node.
An undirected graph is called connected, if for every pair of nodes a path exists from node to node . In the case of directed networks, three different notions of connectivity can be defined. A directed graph is called strongly connected if for every pair of nodes , there is a directed path from to and a directed path from to . A directed graph is connected if for every pair of nodes , it contains a directed path from to or from to . Lastly, a directed graph is called weakly connected if ignoring the directionality of the edges (i.e., replacing the directed edges with undirected), a connected graph is produced.
A connected component in an undirected graph is a maximal subgraph where every pair of nodes is connected by a path. For directed graphs, the notions of strongly connected component and weakly connected component can be defined. In the former case, similar to the definition of strong connectivity that we described earlier, the edge directionality is taken into consideration, while a weakly connected component requires the existence of a path between every pair of nodes in the maximal subgraph without considering edge directionality.
2.2 Linear Algebra and Spectral Graph Theory
As we discussed earlier, every graph can be represented by a matrix, the socalled adjacency matrix. The adjacency matrix of a graph is the matrix with elements if there exist an edge between nodes in the graph. In the general case where the edges of the graph contain weights, the entries of the weighted adjacency matrix correspond to edge weights. For undirected graphs, the adjacency matrix is symmetric (i.e., ), while for directed graphs the matrix is nonsymmetric.
Let be a symmetric matrix. Then, can be written as , where the orthogonal matrix contains as columns the eigenvectors of , correspond to real eigenvalues and the diagonal matrix with the eigenvalues as entries golub1996 (); strang (); graphspectrabook2011 (). The eigenvalues of the adjacency matrix define the spectrum of a graph and have close connections with several important graph properties. As we stated above, in the case of directed graphs the corresponding adjacency matrix is nonsymmetric and therefore the eigenvalues can be complex. Thus, it is preferable to work with the singular values of the matrix which can be extracted by the singular value decomposition (SVD). That is, the SVD of a real matrix is defined as , where and contain the leftsingular and rightsingular vectors respectively and , the diagonal matrix comprised of singular values (note that, for symmetric matrices, the singular values correspond to the absolute values of the eigenvalues).
Another matrix commonly used to represent a graph is the Laplacian matrix.
Definition 4.
(Laplacian Matrix). In the case of undirected graphs, the Laplacian matrix is defined as
(1) 
where is the degree of node . In a more compact form, the Laplacian matrix can be written as , where is the adjacency matrix of the graph and the diagonal degree matrix chung ().
The normalized Laplacian matrix is symmetric and defined as . In other words, if two nodes are adjacent, the entry is equal to . The spectrum of the normalized Laplacian matrix , presents some interesting properties:

All eigenvalues are nonnegative. Moreover, is an eigenvalue of .

The number of eigenvalues with value corresponds to the number of connected components in the graph.

The smallest nonzero eigenvalue is called spectral gap and the corresponding eigenvector is used for the task of spectral clustering (e.g., see Ref. vonluxburg ()).
A basic difference between the spectrum of the Laplacian matrix and the one of normalized Laplacian is that in the former case the eigenvalues belong to the range , where is the maximum degree in the graph, while in latter case the eigenvalues always lying in the range . For a detailed presentation of the Laplacian matrix and its properties, one can refer to the Spectral Graph Theory textbook by Chung chung ().
Chung chungdirectedlaplacian05 () defined the Laplacian matrix for directed graphs, showing interesting connections of its spectrum with the mixing rate of random walks. Very recently, Li and Zhang diplacianwaw10 (); diplacian () proposed another generalization of the Laplacian matrix, establishing novel perspectives and results for the case of directed graphs. In Section 4.4.3 we discuss in detail about the definition of the Laplacian matrix in directed graphs and how can be used to solve the clustering problem.
2.3 Random Walks on Graphs
Generally, a random walk is a mathematical concept formalizing a procedure consisting of a sequence of random steps. In the case of graphs, given a node that corresponds to a starting point, a random walk is defined as the sequence of nodes formed by a repeating process starting from the initial node and randomly moving to neighborhood nodes. In other words, at each step the random walker is situated on a node of the graph and jumps to a new node selected randomly and uniformly among its neighbors.
More precisely, let be an undirected graph and be the starting node of the random walk. Let us suppose that at the th step, the random walk is situated at node . At step, the random walk is moving from node to node (neighbor of ) with transition probability . This defines the transition matrix of the random walk as
(2) 
In a compact form, this matrix can be written as , where is the inverse of the
diagonal degree matrix . This matrix can also be considered as a
degree normalized version of the adjacency matrix. In the general case, random
walks are considered to be Markov chains
Any distribution on a graph can be represented by a row vector , where the th entry captures the amount of the distribution resides at node . In the case of random walks, the probability distribution over the graph for each node at any time step, gives the probability of the random walk of being at node . Thus, if is the initial distribution, then is the distribution after one step and is the distribution after steps. Based on the above idea, we can define a stationary distribution , as the distribution where . In other words, the stationary distribution corresponds to a distribution that does not change over time and describes the probability that the walk is being at a specific node after a sufficiently long time. The mixing time is the time needed by the random walk to reach its stationary distribution. The spectrum of the transition matrix can be used to bound the mixing time of a random walk in a graph, and specifically the second largest eigenvalue sinclairmixingtime (). In a similar manner, random walks can be defined over directed graphs. However, in this case, two main difficulties can occur: (i) at some time point, the random walker can be situated in a node with no outgoing edges, and (ii) nodes with no incoming edges will never be reached. As we will present later, the PageRank algorithm is a random walk process on directed graphs that overcomes the above problems pagerank ().
The theoretical tool of random walks is closely related to the problem of clustering and community detection in graphs (e.g., Ref. ponslatapy2006 ()). For example, it is known that matrix has always the largest eigenvalue equal to one. In the case of networks with very clear community structure, matrix will also have eigenvalues close to one, where is the number of welldefined modules (clusters) in the network; the rest of the eigenvalues will be relatively away from one. The eigenvectors correspond to the first eigenvalues can be used to extract the clustering structure: for nodes that belong on the same clusters, their components in the eigenvectors will have similar values, following a stepwise form. The number of steps, corresponds to the number of clusters . In Section 4.3.3 we provide more details on this issue and we present random walk based techniques for the case of directed networks. For a more detailed discussion on various aspects of random walks, the reader can refer to Refs. lovasz1993random (); chung ().
2.4 Quality Measures
As we have already mentioned, a cluster or community in a network is typically considered as a group of nodes with better connectivity (and/or stronger interactions) among its members than with the nodes of different communities. Usually, the process of detecting communities in networks follows a two step approach:

First, a quality measure (or objective function) needs to be specified, that captures the notion of community structure as groups of nodes with better internal connectivity than external (or more generally, an objective criterion which quantifies the desired properties of a community).

Then, using algorithmic techniques, the nodes of the network are assigned to specific communities, optimizing the objective function. Since the optimization process of the objective functions typically leads to computational difficult problems (e.g., see Ref. schaefferreview ()), a common approach is to employ heuristics or other approximation techniques.
In the literature several measures have been proposed for quantifying the quality of communities in networks (most of them have been introduced for the case of undirected networks, but some of them have been also extended to directed ones; in Section 4.3 we describe some of these measures in detail and we also present their extensions to directed networks). Typically, some of the quality measures focus on both the intracluster and intercluster edge density (multicriterion scores), such as normalized cuts shimalikpami00 (), conductance and expansion. Other measures focus only in one of them (singlecriterion scores) and a wellknown representative of this category is modularity (e.g., see Refs. fortunato (); schaefferreview () and Ref. leskovecwww10 () for a recent comparative study of quality measures in undirected large scale networks).
Modularity newmannewmanphysreve04 (); newmanmodularity () is one of the most popular and widely used metrics to evaluate the quality of network’s partition into communities. Considering a specific partition of the network into clusters, modularity measures the number of edges that lie within a cluster compared to the expected number of edges of a null graph (or configuration model), i.e., a random graph with the same degree distribution. In other words, the measure of modularity is built upon the idea that random graphs are not expected to present inherent community structure; thus, comparing the observed density of a subgraph with the expected density of the same subgraph in case where edges are placed randomly, leads to a method for identifying clusters. More precisely, the modularity value of a specific partition of an undirected network into communities is defined as follows
(3) 
where is the adjacency matrix, is the community membership of node and if (i.e., if nodes belong to the same community) and otherwise. The modularity value can be either positive or negative. Higher positive values indicate better community structure properties and therefore, finding the partition that maximizes the modularity provides a method for extracting the underlying community structure. More details on modularity as well as its extension to directed networks are presented in Section 4.3.1.
Optimizing the modularity function is a computational difficult task modularitycompleteness (); however several heuristics and approximation techniques have been proposed. Newman newman03fast () proposed a greedy search algorithm for the problem of modularity maximization. Initially, every node of the graph belongs on its own community; then, iteratively, pairs of communities are joined on the same group if they achieve the highest increase of the modularity value. Thus, the algorithm can be considered as an agglomerative hierarchical clustering method (e.g., see Ref. jainclustering ()) and the whole procedure can be represented by a dendrogram. Clauset et al. clausetfastmodularity () presented a faster greedy algorithm (almost linear time in sparse graphs), based again on an hierarchical clustering approach. Other well known methods for modularity optimization are the ones rely on spectral techniques. For example, Newman newmanmodularity () showed that the measure of modularity can be expressed in terms of the spectrum of a specific matrix associated to the network (called modularity matrix), and therefore spectral techniques can be applied in the optimization process. In Section 4.3.1 we present a similar approach for the case of directed networks. Other methods apply simulated annealing techniques simulatedannealing () (e.g., Refs. guimerasimulatedannealing2004 (); guimeranature2005 ()) and extremal optimization ducharenasphysreve2005 (). For a more detailed presentation of modularity optimization techniques, the reader can refer to the survey paper of Fortunato fortunato (). Similar optimization approaches can be also applied to directed networks.
However, as noted by Fortunato and Barthélemy modularityresolution (), modularity suffers from the socalled resolution limit. That is, modularity optimization may fail to detect communities with size smaller than a scale which mainly depends on the size of the network. This point is particularly significant since typically real world networks contain communities of various sizes.
3 Clusters in Directed Networks – Intuition and Discussion
In this section we introduce the notion of clusters or communities in directed networks and we discuss about their structural properties. We provide different intuitive definitions regarding the properties of clusters, that will enable the reader to better comprehend the notion of clustering in directed networks and subsequently to classify the clustering methods according to the definition given. It is important to stress out here that there is no well defined definition for the graph clustering problem, both in the directed and undirected cases. Actually the formulation depends either on the application domain or generally on the type of clusters we are interesting in. Nevertheless, regardless of the problem definition, the ultimate goal of the clustering task remains the same: the graph nodes should be assigned to clusters, with “similar” nodes belonging to the same cluster.
Let us now present a high level definition of a cluster or community in networks which can be considered as a generic definition for the clustering task. Later, we capitalize on this to capture and describe different possible clustering structures for directed networks, as they have been proposed in the literature.
Definition 5 (High Level Definition of a Cluster).
A cluster or community in a network can be considered as a set of nodes that share common or similar features (characteristics).
In this generic definition, there are two things that need to be specified: (a) the notion of similarity among the nodes of a directed network and (b) the features/characteristics we are interesting in. We consider that specifying these two elements, we are able to capture and describe all possible clustering notions in directed networks. In order to become more precise, let us consider as example the traditional definition of clusters as modules with dense connections between the nodes of the same cluster but sparser connections between different clusters newmanmodularity (); leichtnewman2008 (). According to the above definition, the features correspond to graph’s edges, while the number of edges between a set of nodes (density) can be considered as a similarity node indicator in the graph.
Having defined the desired properties of the clustering structure, then the process of detecting communities is a two step approach: first, we should specify an objective function that captures the notion of clustering structure, according to the chosen definition. Then, using algorithmic techniques, the nodes of the network are assigned to specific clusters, optimizing the objective function. In Section 2, we gave a brief introduction about objective functions for undirected networks. Later at this paper, we will describe such objective criteria for directed networks, as well as approaches for detecting the community structure.
Next, we present the two main notionsdefinitions (or categories) for clusters in directed networks:

Densitybased clusters, i.e., groups of nodes that follow the traditional clustering definition based on edge density characteristics.

Patternbased clusters, i.e., groups of nodes that go beyond edge density patterns. As we will describe shortly, an example of this category is the case of flow circulation, where a pattern of movement induced within the nodes of the cluster.
This classification can also be extended to undirected networks, as some research works propose cosciareview (); ljubljanacommunitiesejpb12 (); communitiesicdm07 ()). Then the question rising is: which clustering definition for directed networks should one adopt? The answer highly depends on the application domain and on the features of the network dataset under consideration. Such features may include the nature of interactions among graph’s nodes (as captured by the edges) and prior knowledge of the underlying structure. In Section 7 we present a list with real applications of directed graph clustering, along with the most suitable clustering definition.
3.1 Densitybased Clusters
We consider densitybased clusters, that can be regarded as the more traditional definition of communities/clusters in both directed and undirected networks, and also the most well studied in the research community (e.g., Refs. newmannewmanphysreve04 (); girvannewman (); newmanmodularity (); leichtnewman2008 ()). The notion of densitybased clusters is entirely based on the distribution and topology of the edges inside the network. As we mentioned earlier, according to this definition, a cluster in directed networks is defined as a group of nodes with more intracluster than intercluster edges. Figure 2 (a) depicts an example of a directed network which contains three well defined densitybased clusters. It is clear that the edge density within each cluster (shadowed regions) is much larger than the density between different clusters. On the other hand, Fig. 2 (b) presents a homogeneous directed network with uniform edge distribution among nodes. The network lacks a modular organization and thus there is no obvious densitybased community structure. Based on this definition, the goal of a graph clustering algorithm is to assign the nodes into clusters, maximizing the number of edges within clusters, while minimizing the intercluster edges. As we will see later, there are several popular densitybased graph clustering techniques, that either trying to maximize the internal cluster density, either minimize the number of extracluster edges or both of them.
(a) Graph with densitybased clusters  (b) Graph with uniform structure 
The above notion of clustering in directed networks can be considered as a natural extension from the graph clustering problem in undirected networks (e.g., Refs. newmannewmanphysreve04 (); fortunato (); schaefferreview (); cosciareview ()). In the next sections of the paper we will see that some techniques, initially introduced for undirected networks, form the basis for dealing with the directed graph clustering problem.
Moreover, for the undirected case, the densitybased definition has close connections with the wellknown graph partitioning problem in the field of computer science (e.g., Ref. metis ()). However, there are two main differences between them: (a) in the graph partitioning problem, the desired number of partitions (or clusters) is a parameter of the problem and needs to be specified a priori, while in the case of graph clustering and community detection problems this is not always prerequisite, and (b) the goal of the partitioning problem is to equally assign nodes in the different partitions, where the size of each cluster will be approximately equal to fortunato (). On the other hand, in the clustering problem, the distribution of the clusters’ sizes may not be uniform.
It is important to note here that extending the notion of densitybased clusters to directed networks is not always a trivial procedure. While some of the proposed objective measures for the undirected case can be easily extended to directed graphs by considering in a meaningful way the directionality of the edges (e.g., the criterion of modularity leichtnewman2008 ()), due to the existence of directed edges, some of the desired cluster properties may not hold. Even worse, some graphtheoretic measures and concepts that help us to evaluate the quality of densitybased clusters cannot be easily extended and defined in the directed case. For example, as pointed out by Schaeffer schaefferreview (), each cluster in a graph should be connected (i.e., there should be at least one path between every pair of nodes in the graph). As mentioned in Section 2, in directed graphs, the connectivity property can be expressed in three forms: weak connectivity, connectivity and strong connectivity. Depending on the required cluster properties, any of the above criteria can be adopted in the definition of densitybased clusters for directed networks. This is just an indication where simple graph concepts, such as connectivity, become complex when edge directionality is taken into consideration.
3.2 Patternbased Clusters
Previously we presented the notion of
densitybased clusters that constitute the major type of clustering structure in
directed networks. Although this represents the most common and wellstudied
clustering definition
in both directed and undirected networks, it cannot capture more sophisticated
clustering structures, than the classical wellcohesive groups, where edge
density may not represent the major clustering criterion. More precisely, the
nodes of a directed network can be naturally clustered together according to
similar connectivity patterns that may exist and are not captured completely
applying only density criteria. Actually, in some cases, two or more nodes can
belong to the same cluster even though they are not directly connected by common
edges. We refer to this category of clusters as patternbased clusters,
since they represent structures with interesting connectivity properties in
directed networks
Examples of patterns that are interesting for clustering directed graphs are the cases of cocitation and flow. Cocitation implies that a set of nodes links to a set of nodes and this structure implies a similarity among the members of each group – i.e., the members of are similar among them as they all point to the same nodes, group . Another interesting pattern has to do with the network flow at the cluster level, i.e., the linking structure within a cluster forces that the flow through the links predominantly stays within the cluster instead of pouring out of it.
(a) Citationbased cluster  (b) Citationbased cluster  (c) Flowbased cluster 
Figure 3 depicts three cases of graphs that contain different types of patternbased clusters (as shown in the shadowed regions). The first graph (a) forms two clusters – we will refer on them as citationbased clusters. The most interesting point in this case is that the nodes of the graph that are clustered together do not have an edge between them. Their similarity emanates from the co citation event – i.e., the nodes of the leftmost cluster point to the nodes of the right cluster. Respectively the two nodes of the right cluster are pointed by the same group of nodes. This is actually a bipartite graph where the partitions represent two different communities. For example, let us consider the case of a citation network where nodes correspond to scientific papers and a directed edge from paper to paper implies that the first paper cites the latter. Although papers and do not share an edge, they form a natural cluster since they both cite papers and and it is probable that they belong on the same scientific topic.
A similar example of patternbased clusters, appears in Fig. 3 (b). In this case the two nodes in the shadowed region form a cluster, since they have outlinks to the same nodes, while at the same time having inlinks from the same group of nodes. This structure constitutes a common situation in the context of directed graphs. For example, these two nodes may correspond to the websites of two competing companies of the same market sector; they both link and are linked by a common group of webpages, but actually they do not have links among them due to competition sriniedbd11 (). According to our high level definition of clusters in directed networks (Definition 5), in this case the clustering features correspond to the common neighbors in the graph and thus the nodes are clustered together if the share common neighbors.
A different case of patternbased clusters is the one presented in Fig. 3 (c). The main characteristic of this network is that the edges form patterns of flow among nodes. In other words, the local interactions in the network combined with the edge directionality, induce a flow of information among the entities and therefore the clustering structure depends on how information flows (see Ref. rosvallpnas08 () by Rosvall and Bergstrom). Then, a cluster or community in the network corresponds to a group of nodes where the flow is larger (more persistent) as compared to the flow outside the group. Assuming a user that conducts random walk on the graph, a flowbased community is a group of nodes where a random surfer is more likely to be trapped inside instead of moving out of the group linkrankphysrev10 (); laiphysica10 ().
Remark We should note here that both types of clusters – cocitation and flow based ones – may coexist in a directed network. For example, as we can see from the related literature, most of the techniques that adopt the citationbased clustering rule, are also able to identify densitybased clusters. However, the novelty of these techniques resides exactly on this point; through appropriate transformations, a densitybased technique can be enhanced with patternbased clustering features.
4 Dealing with Edge Directionality: Approaches for Identifying ClustersCommunities in Directed Networks
There have been different directed network clustering approaches depending on the way directed edges are treated. In this section we review the clustering methods based on the methodological principles and algorithmic approaches followed. To the best of our knowledge this is the first proposal for a classification scheme of graph clustering methods for directed networks.
Since a large amount of work for the graph clustering problem in directed networks is built upon clustering approaches for undirected ones, whenever necessary we review the basic concepts to make our presentation self contained. We also consider that giving meaningful connections to the undirected case will be helpful to the reader. For a detailed description of the undirected graph clustering methods, the reader may refer to previous interesting surveys in the field (see Section 1.3).
The proposed classification follows:

Naive graph transformation approach: in this class we classify algorithms that ignore edge directionality and treat graph as undirected. Thus, clustering algorithms that have been proposed for undirected networks can be also applied to reveal the underlying community structure of directed ones (e.g., see Section 1.3). However, due to naive graph conversion, the underlying graph semantics are not retained and useful information is not taken into consideration during the clustering task. For instance, consider a citation network, where papers are represented by nodes and edges are the citations. Then assume a paper cites paper but not vice versa. Using the naive graph transformation each directed edge is replaced by an undirected one; thus a reciprocal relationship is introduced among papers and which misses to represent the endorsement of paper to paper .

Transformations maintaining directionality: In this class we have methods where the directed graph is converted into an undirected one, either unipartite or bipartite, and edge direction is meaningfully maintained in the produced network. For example, in some approaches the directed network is converted into an undirected and weighted one, where information about directionality is introduced via weights on the edges of the graph (e.g., Ref. sriniedbd11 ()). Then, algorithms and tools for clustering undirected weighted graphs can be applied. In other approaches, the directed network is converted into a bipartite one and then appropriate clustering algorithms are applied to the bipartite graph (e.g., Ref. zhounips05 ()).

Extending clustering objective functions and methodologies to directed networks: this category includes approaches that constitute extensions of methodologies from the undirected case. Thus objective criteria are extended to meet the requirements of the problem. The graph clustering problem is typically expressed as an optimization problem, where an objective criterion, capturing the desired cluster properties, is optimized by reassigning nodes into clusters. The algorithm iterates usually until a local min/max value is reached. Since most of the research literature has focused on the undirected version of problem, a large bulk of interesting approaches regarding the properties and functionality of the (undirected) objective criteria have been presented (e.g., modularity newmannewmanphysreve04 (); newmanmodularity () and normalized cut shimalikpami00 ()). Hence, a natural way to deal with the directed version of the graph clustering problem is to extend these measures for directed networks, where edge directionality is considered as an inherent network characteristic. Some prominent representatives of this category are the directed versions of modularity leichtnewman2008 (); linkrankphysrev10 (); arenasmodularity07 () and the objective function of weighted cuts in directed graphs meilasdm07 (). Similarly, another well established approach in this direction is the extension of algorithmic tools that have been introduced for undirected graphs. One of the most wellknown such approaches is the case of spectral graph clustering based on the Laplacian matrix vonluxburg (); spectralclusteringsurveyejor11 (). While Laplacian based spectral clustering methods initially applied on undirected networks, recent advances in the field make them also applicable to directed ones (e.g., Refs. chungdirectedlaplacian05 (); zhouicml05 ()).

Alternative approaches: this category includes approaches that follow diverse methodologies, mainly different from the ones described in the previous three categories. We identify three major types of methods, namely (i) informationtheoretic, (ii) methods based on probabilistic models and statistical inference, and (iii) stochastic blockmodeling methods. Even though the last two methodologies are closely related and both refer to probabilistic models, we review them independently since they rely on different statistical inference concepts. Furthermore, in this category we also review several additional approaches that mostly concern some variations of the community detection problem in directed networks. Some of these pose interesting features and may constitute interesting extensions for future research work in the field (e.g., community detection in dynamic directed networks).
Next we will elaborate on each of the above categories with more details, presenting their basic points and classifying the related works. This is the main proposed classification scheme for the clustering problem in directed networks. Figure 4 depicts schematically the proposed taxonomy of the different approaches for the problem. A large amount of research work has been devoted to methods that belong on the third category (extending methodologies to directed networks). We also note here that, some of the approaches share diverse methodological features (e.g., methods that transform the graph to undirected but at the same time propose extensions for the modularity objective criterion that is in accordance with their framework). Then, we do not assign them crisply in only one category; whenever necessary, we follow an overlapping classification trying to capture and present the features of each approach from all possible viewpoints. Lastly, we will shortly discuss why the naive approach is not appropriate for dealing with directed networks.
4.1 Naive Graph Transformation Approach
The first and simplest approach for the clustering problem in directed networks, is to discard edge directionality and treat graphs as undirected. After this simple transformation step, a large bulk of methods that have been proposed for undirected networks can be applied to extract the community structure (e.g., see Section 1.3 for details). Even though this is a common way in the related literature to deal with directed networks, this approach has several drawbacks that mainly derive from the fact that the information represented by edges’ direction is ignored and not utilized during the clustering process. In other words, directed edges typically indicate the existence of non reciprocal relationships between entities represented by the nodes of the graph, and thus a naive transformation to an undirected graph with symmetric relationships does not retain the underlying semantics. The two main drawbacks of this approach can be summarized as follows:

Data ambiguities: the naive graph transformation introduce ambiguities and to some degree incorrect information in the network. For example, let us consider the case of a citation network where a directed edge represents a citation from paper to . Converting this edge into an undirected one implies a mutual relation, i.e. an edge that does not exist in the graph. But more generally, even if someone argue that the new undirected edge represents similarity among papers and (since the first one cites the second), this does not always hold for both directions (i.e., paper may be an important paper, but in a different area; thus mutual relationship and similarity may not exist). Similar concerns could be used to justify possible ambiguities introduced by this transformation approach in other domains.
(a) Directed network (b) Undirected network after transformation Figure 5: Example of a naive graph transformation. The directed network (a) contains two communities, since the two leftmost nodes are connected to the rest of the network but only in one direction. After a naive graph transformation (b) it is difficult to identify any community structure. 
Deviations in clustering results: even if one could ignore the ambiguities introduced in the data by the naive graph transformation approach, these may have impact to the final outcome of a clustering algorithm. Discarding edge directionality, valuable information is not utilized at the clustering process, which at the end leads to deviations at the results. In other words, clusters that exist in the initial directed network may not be identified at the transformed one, due to the naive graph conversion process. This mainly occurs because the existence of directed edges forms interesting structural patterns and clusters (e.g., the flowbased clusters that we described in Section 3.2) that cannot be found in undirected networks. Of course, this is something closely related to the definition/notion of a cluster; nevertheless, even for the same clustering definition, the approach may lead to different results at the end. Figure 5 depicts an example of a directed graph, where a naive transformation could distort the clustering results.
It becomes clear that this approach is not effective and could possibly lead to incorrect inference about the underlying community structure. In the following section, we will describe more meaningful graph transformation approaches, where information about edge directionality is incorporated in the final network and utilized properly during the clustering process.
4.2 Transformations Maintaining Directionality
In this section we will review the second category of approaches for the clustering problem in directed networks. More precisely, we will present methods that perform “meaningful” transformations of the directed network into an undirected one, where the term meaningful is used to denote the difference to the previously described naive transformation method. According to this approach, the basic components of the clustering task in directed networks can be summarized as follows:

Transform the directed network to undirected.

Edges’ direction information should be retained as much as possible (e.g., by introducing weights on the edges of the transformed network).

Apply already proposed clustering algorithms designed for undirected networks.

The extracted communities will also correspond to the communities of the initial directed network.
More precisely, the initial graph is transformed into an undirected one, while information and semantics about the direction of the edges is meaningfully incorporated in the resulting graph. For example, this can be done by adding weights on the edges of the transformed network (or applying a reweighting scheme in case of already weighted networks). The resulting network can be either unipartite or bipartite. Then, algorithms that work on undirected networks can be applied to detect the community structure; such approaches can benefit from the plethora of diverse algorithms that have been proposed for the community detection task in undirected networks. Schematically, a high level description of this approach is depicted in Fig. 6.
Transformation to Unipartite Weighted Network
In a commonly used transformation approach in the related literature, the directed network is converted into an undirected unipartite one, where information about directionality is incorporated via weights on the edges of the transformed network. Satuluri and Parthasarathy sriniedbd11 (), investigate how the problem of clustering directed graphs can benefit using such symmetrization approaches. The basic insight on their approach is that, in directed networks, a meaningful cluster can be a group of nodes that share similar incoming and outgoing edges. In other words, a clustering approach should not based solely on density criteria, but also the inlink and outlink node similarity should be taken into consideration. Therefore, their approach is able to detect groups of nodes with homogeneous inlink and outlink structure (e.g., citationbased clusters), that do not necessarily share edges among them (e.g., similar to the clusters in Fig. 3 (b)). More precisely, the authors propose a twostage framework which is in accordance with the above discussion: (a) transformation to undirected graph applying symmetrization methods to the adjacency matrix and (b) clustering the symmetrized graph using existing algorithms. Let be the initial directed graph with adjacency matrix . The authors discuss and propose various ways to symmetrize a directed network:

symmetrization: in this approach, the produced undirected network will have the symmetric adjacency matrix . The network retains the same number of edges (i.e., every directed edge is replaced by an undirected), but in the case of directed edges in both directions, the weight of the new edge is the sum of the weights in the initial directed edges. However, this simple way to symmetrize a directed network cannot capture the notion of node similarity based on incoming and outgoing edges; although the two central nodes of Fig. 3 (b) exhibit structural similarity according to their inlinks and outlinks, they continue to remain unconnected at the resulting graph, and therefore, it is very difficult to be clustered together.

Symmetrization based on random walks: according to this approach, the normalized cut (Ref. shimalikpami00 ()) of a group of nodes in the produced undirected network will be preserved with respect to the initial directed one. In other words, the directed normalized cut of a group of nodes will be equal to the normalized cut of the same group in the symmetrized undirected network. More precisely, the transformed graph will be described by the following adjacency matrix
(4) where is the transition matrix of the random walk and is the diagonal matrix with the probabilities of staying at each node in the stationary state (stationary distribution). As noted by the authors (Ref. sriniedbd11 ()), this approach makes easier the extraction of clusters that satisfy the criterion of low normalized cuts, since this property is preserved during the symmetrization process (compared to approaches that will be presented later at this papers and rely on expensive spectral clustering based on the directed Laplacian matrix (see Section 4.4.3)). However, the symmetrization method follows the densitybased clustering notion due to the dependence to the normalized cut criterion, and therefore other types of meaningful structures like the case of patternbased clusters of Fig. 3 (b) with low normalized cut, cannot be easily identified.

Bibliometric symmetrization: both previous approaches maintain intact the edge set of the directed network (discarding directions); they only reweight them according the selected symmetrization scheme. However, a natural requirement that a symmetrization approach should meet is that at the final graph, edges should appear between similar nodes even though in the original network this does not happen. The prime example for this argument is the network of Fig. 3 (b), where there exist nodes that do not share common edges, but both of them point to the same group of nodes (and pointed by the same group of nodes). Therefore, these nodes share an intuitive notion of similarity and thus a clustering algorithm should be able to group them together.
The authors of Ref. sriniedbd11 () propose a symmetrization approach based on a combination of the bibliographic coupling matrix and the cocitation strength matrix . Both these matrices are symmetric. The former captures common outgoing edges between each pair of nodes (i.e., the number of common nodes that both nodes point to), while the latter common incoming edges (i.e., the number of nodes that commonly point to these nodes). These matrices were first introduced in the field of bibliometrics, but later have been used in several applications and domains where symmetric matrices are required (e.g., information retrieval hits () and network analysis gkantsidisinfocom03 ()). Since both incoming and outgoing edges should be of the same importance for a clustering algorithm, the authors propose to use the sum of these matrices as a symmetrization scheme:
(5) 
Degreediscounted symmetrization: one of the main properties of realworld networks is that they follow a powerlaw degree distribution (e.g., Ref. fff ()). The property states that, inside the network, there exist a few nodes with very high degree compared to the majority of the nodes. This observation has direct implications to the previously described symmetrizations, since nodes with high degree would be shared a lot of common edges with other nodes (and thus higher similarity). To this direction, the authors propose a symmetrization approach where the contribution of each node to the similarity score will be normalized according to its degree (indegree and outdegree respectively). More precisely, their approach is based on two intuitive observations:

Case : Suppose that two nodes both point to a node , which has high indegree .

Case : Suppose that two nodes both point to a node , with low indegree (i.e., it has incoming edges from only a few nodes other than ).
Based on these two points, the authors suggest that case should contribute more to the similarity between nodes since it is a less frequent event and thus more informative. Hence, when two nodes both point to a third one , the similarity between them should be inversely proportional to the indegree of node . Similarly, the number of outgoing links of the nodes should be taken into consideration. Thus, the outlink similarity between should be inversely related to the outdegrees of nodes and . Then, both the bibliographic coupling and cocitations matrices (matrices and C respectively) are redefined according to the degreediscounted idea as follows:
(6) where are the discounting parameters. Finally, the produced similarity matrix (and thus the adjacency matrix of the symmetrized undirected network) will be the sum of these two matrices, . The authors report that they have empirically observed that setting results into intuitive and meaningful clusterings. Having now symmetrized the directed network, algorithms designed to work on undirected graphs can be applied to extract the underlying community structure.

In a similar spirit, Lai et al. laiphysica10 () proposed a symmetrization method based on network embeddings, that indirectly can be considered as a transformation to an undirected weighted network. More precisely, the basic idea is to embed the initial directed network into a vector space, preserving as much as possible from its local topological characteristics. According to this approach, every node in the directed network can be treated as a point in the Euclidean space, as schematically shown in Fig. 7.
This can be considered as an equivalent representation scheme for a network, since in the general case, the adjacency matrix can be treated equivalently as a representation in a Euclidean vector space and more precisely in the space defined by the nodes of the network, that is . Essentially the authors rely on a specific type of network embedding and in particular on the Laplacian embedding for directed networks. As we described in Section 2, the Laplacian matrix is an alternative matrix representation for a network with several interesting characteristics. Similar to the adjacency matrix, the Laplacian can be considered as a network representation in the Euclidean space, where the similarities among node pairs are preserved. The authors are based on the extension of Laplacian matrix for directed networks proposed by Chung chungdirectedlaplacian05 () (see 4.4.3 for more details on the Laplacian matrix)
(7) 
where is the transition matrix of the random walk and the diagonal matrix with the probability of staying on each node in the stationary state.
The idea is similar to the random walk symmetrization
presented earlier as again the same concept
is utilized in order to define the Laplacian matrix (in this case, the PageRank
random walk). However, the authors observed that the directed version of the
Laplacian matrix in Eq. (7) can be expressed as , where . Matrix is symmetric, while
can be considered as the degree matrix of the network.
Hence, can be interpreted as the adjacency matrix of a new
undirected network
Later, the same authors presented a more extended approach laijstatmech10 (), where edge directionality is extracted using a PageRank random walk (e.g., Ref. pagerank ()), and introduced via weights on the edges of the transformed undirected network. The approach is more general regarding the types of cluster that are identified and introduces some interesting features. In contrast to the previous method which was based on the assumption that edges in the network capture only similarity between nodes, here the information about edges’ direction is utilized in order to decide whether an edge lies inside a community (i.e., intracommunity edge, connects two nodes that belong on the same community), or between communities (i.e., intercommunity edge). Hence, the edges of the network are distinguished between intercommunity and intracommunity edges, very close to approaches presented for undirected networks. In other words, the information about the directionality of the edges, and thus the weights on the network, operate as an indicator of how likely the associated edges will belong on the same community; while the topological structure of the network is modified, the connectivity among nodes is preserved and the underlying community structure becomes more clear compared to the original network.
As we mentioned earlier, the method rely on the usage of random walks for directed networks in order to determine the structure of the network and to extract weights from edge directionality. The basic idea is the following: assume two nodes and connected with an edge, and respective random walks starting from these two nodes. If both and are visited mutually during these random walks then the edge among those nodes is more likely to be an intracommunity edge.
That is, according to the random walk, nodes that belong to the same
community could interact more often among each other, and thus intracommunity
edges will receive higher weights than intercommunity edges. The authors define
the socalled nodes’ behavior vector, where each entry represents
the expected frequency with which the specific node will be visited by the
random walk in steps
Transformation to Bipartite Network
A somewhat different transformation approach than the ones presented earlier, assumes that the directed network is transformed into a bipartite undirected one and then community detection algorithms are applied on the latter. As we described in Section 2, bipartite networks form a special class of networks with interesting properties. Treating a directed network as bipartite is not something new, but it has been used in the past for other tasks in network analysis (e.g., Ref. salsatois ()).
In the context of community detection for directed networks, the authors of Refs. moduleidentificationphysrev07 (); zhounips05 () utilize a transformation scheme where a bipartite graph is constructed from the original directed network , according to the following process:



Each directed edge between two nodes of the directed network , will be represented by an edge between nodes and of the produced bipartite network .
This implies that in the general case, the nodes of the directed network are doubled and each one is represented by a node at each of the two partitions. However, since some nodes may not have outgoing or incoming links (and thus they will be isolated in the resulting bipartite network), every node is placed in the two sets according to its out and in degree respectively. Figure 8 shows a construction of the bipartite network for a given directed one.
(a) Directed network  (b) Transformed bipartite network 
The above representation scheme is inspired by Kleinberg’s hub and authority web model hits (), where the web pages are distinguished in two sets: authoritative pages and hub pages. The first category includes web pages relevant to a specific topic, while the second one web pages that point to authorities of a relevant topic. Moreover, a web page can simultaneously belong to both sets.
In Ref. moduleidentificationphysrev07 (), the authors construct a bipartite network from the original directed one (adding all nodes to both sets of the bipartite graph), trying to identify clusters of nodes with similar outgoing links as well as similar incoming links. They distinguish the two partitions of the graph into the actor partition and team partition ( and in our description). The ultimate goal is to identify groups of actors that are closely connected to each other through coparticipation in many teams. To this end, their approach is based on the idea of modularity optimization. More precisely, they define a modularity function for bipartite networks, modifying Newman’s modularity measure newmannewmanphysreve04 (), and then apply an optimization technique based on simulated annealing for detecting the underlying community structure.
In a similar spirit, the authors of Ref. zhanevolutionaryphysrev11 ()
propose an approach for revealing the community structure of bipartite and
directed networks. They rely on the network transformation scheme presented
above
and suggest that every unipartite or directed network can be transformed to a
bipartite one, while the modularity is preserved
A different approach that based on the construction of a bipartite network is the one presented in Ref. zhounips05 (). The authors describe a framework for semisupervised learning on directed networks, which can also be applied for the task of graph clustering. The framework was introduced for the problem of node classification in directed networks, where some nodes in the graph bear labels (positive or negative) and the goal is to classify unlabeled nodes. However, in case of absence of labeled node instances, the framework can be used as a graph clustering tool for both directed and bipartite networks. The main idea behind the approach is the socalled category similarity of colinked nodes in directed networks; the existence of nodes with common parents (sibling structures) and nodes with common children (coparent structures) should be taken into consideration at the clustering task since they can operate as indicators regarding node similarity (the general idea is similar with the one presented by Satuluri and Parthasarathy in Ref. sriniedbd11 ()). The construction of a bipartite network from the original directed one is also inspired by Kleinberg’s hub and authority web model, where colinked node structures are highlighted.
4.3 Extending Objective Functions and Methodologies to Directed Networks
In the previous section, we presented methods where the graph clustering and community detection problem is not treated on the original directed network, but on a new undirected network that is produced applying meaningful transformation methods. The main advantage of these approaches is that they can benefit from the large bulk of techniques for the undirected case of the problem. However, the basic question behind such approaches remains the same: to what extend the information about the directionality of the edges is retained? To this direction, several methodologies have been proposed trying to deal with the problem without changing the structure of the original network. That is, instead of transforming the directed network to undirected, a different approach would be to transform or extend existing methods making them capable to work with directed networks.
Usually, two things need to be specified for the problem of clustering and community detection in networks. The first one has to do with the quality assessment of the produced clustering results, while the other is more general and is related to the algorithmic framework that will be applied to extract the community structure (according to how a “good” clustering should looks like). In fact, these two things compose the basic steps of each clustering and community detection algorithm: (i) an objective function that quantifies the quality of a cluster and (ii) an algorithmic technique for optimizing this function. Both these aspectsquestions have been treated for the case of undirected networks (or generally, several solutions have been proposed). In other words, there exist several objective measures for quantifying the quality of a clustering result, as well as algorithmic frameworks that are trying to optimize those objective criteria in order to identify and extract the underlying clustering structure of undirected networks (e.g., see Refs. fortunato (); schaefferreview ()). Thus, a natural question would be if these quality measures and general methodologies can be extended to the case of directed networks and how this could be done.
In this section we present approaches for detecting clusters and communities in directed networks that constitute extensions of the undirected case. Note that, this category contains the most wellstudied approaches for the clustering problem in directed networks. First, we will discuss wellknown objective criteria that have been extended to take into consideration the directionality of the edges (e.g., modularity, cutbased measures). Then, we describe more general algorithmic frameworks that were initially introduced for clustering undirected networks and how they can be extended to the directed case. Such methodological frameworks include spectral clustering approaches based on the Laplacian matrix, as well as PageRank based and randomwalk based methods. We must note here that some of these approaches are not independent. For example, several modularitybased methods apply spectral clustering in order to identify the best clusters. Whenever necessary, we briefly review the problem for the undirected case, trying to make this survey paper as selfcontained as possible (see Section 2 for more details about the background, as well as other survey papers that focus on undirected networks).
Modularity for Directed Networks
One of the basic objective criteria about the quality of a particular division into clusters for a network, is the socalled modularity function. Modularity was initially introduced by Newman and Girvan newmannewmanphysreve04 () for the case of undirected networks, as a measure for assessing the strength of the partitions produced by an hierarchical clustering algorithm (an thus indicating which partition should be kept). The measure is based on the idea that networks with inherent community structure usually deviate from random graphs. That is, since random graphs are not expected to have community structure, measuring the deviation between the concentration of edges in the original network from that someone expect in the case of random distributed edges, would be an indicator of the presence (or lack thereof) of community structure. Informally, the modularity score of each possible partition will be newmannewmanphysreve04 ():
(8) 
Larger positive values of modularity indicate better community structure, since there are more edges within communities than one would expect if edges were placed in random (the maximum value of modularity can be ). The expected fraction of edges among a group of nodes is usually based on the chosen configuration model, i.e., a random graph with the same degree sequence of the original network. In this model, the probability of an edge between two nodes with degree and is , where is the total number of (undirected) edges in the network. Then, the modularity for undirected networks can be expressed as
(9) 
where is the entry of the adjacency matrix which represents the existence or not of edge between nodes and , if (i.e., if nodes belong on the same community) and otherwise.
Generally, modularity can be used both as quality measure for a specific network partition, as well as the basic ingredient of a framework for extracting the community structure. The latter procedure, usually called modularity optimization, is one of the dominant approaches for extracting the community structure in undirected networks (e.g., Ref. newmanmodularity ()).
In the case of directed networks, several extensions have been proposed for the measure of modularity. Arenas et al. arenasmodularity07 () proposed a generalization for directed networks, where their ultimate goal was to reduce the size of the initial network (directed or undirected), while preserving the modularity value (this is a very crucial point since optimizing the modularity is a hard task). Their extension is based on the observation that the existence of a directed edge between nodes and , depends on the outdegree and indegree of nodes and respectively. Let us consider that node has high outdegree but low indegree, while node has high indegree and low outdegree. Then, it is more probable to observe the directed edge from node to node , instead of observing edge . Putting these insights together, the configuration model can be extended to the directed case, where an edge from node to node will exist with probability . Then, the modularity function for directed networks can be expressed as
(10) 
where the notation is similar to the one of Eq. (9). Also, observe that there is no factor of in the denominator (the sum of outdegrees (similarly indegrees) is equal to ). Moreover, Arenas et al. arenasmodularity07 () gave the relationship between directed and undirected modularity:
(11) 
Leicht and Newman leichtnewman2008 () were based on the above definition of modularity to propose an algorithm for detecting communities in directed networks. Their approach constitutes a generalization of the modularity optimization method, presented by Newman and Girvan in Ref. newmannewmanphysreve04 (), where modularity can be expressed in terms of the spectrum (eigenvalues and eigenvectors) of a special matrix called modularity matrix. More precisely, let us suppose that our goal is to assign the nodes of the network into two communities, namely and . Let be an indicator variable taking value if vertex is assigned to community and if is assigned to community and be the vector whose elements are the values. Then, modularity can be written as
(12) 
where is the modularity matrix. In the general case matrix is not symmetric and thus we are not able to apply a spectral approach. However, transposing Eq. (12), can be expressed as . Finally, taking the average of this quantity with the one in Eq. (12) gives
(13) 
Matrix is now symmetric. Thus, applying wellknown approaches in optimization theory, a simple clustering algorithm can be derived from the spectrum of this matrix: compute the eigenvector that corresponds to the largest positive eigenvalue of the matrix and assign the nodes to communities or according to the signs in the components of the eigenvector (generally, node is associated with the th component of the eigenvector).
Additionally, other optimization tools can be applied (e.g., see Section 2 and Ref. fortunato ()). The above method can be extended to assign the nodes is more than two communities. This can be achieved by an iterative procedure which subdivides the produced communities until the modularity value is not increased. The algorithm has been tested on both synthetic and real datasets and the results show that, considering edge directionality in the modularity optimization process, meaningful communities can be identified (whereas ignoring the direction of the edges this cannot be achieved).
However, Kim at al. linkrankphysrev10 () observed that the directed version of modularity in Eq. (10) exhibits two limitations:

It cannot properly distinguish the directionality of the edges.

It cannot be used to detect patternbased clusters representing patterns of movement among nodes.
Figure 9 presents an example where the directed modularity as introduced in Ref. arenasmodularity07 () and used in the algorithm of Ref. leichtnewman2008 (), is not able to distinguish the two different cases. According to the modularity definition, nodes and are more likely to belong in the same community than nodes and , since the edge from to is more informative than the one from to (because of the fact that node has small outdegree and node small indegree; thus the edge from to should contribute more to the modularity since it is a statistically surprising configuration). However, both edges have the same contribution to the directed modularity.
Based on the above observations, in Ref. linkrankphysrev10 () the authors proposed a somewhat different formulation of modularity for directed networks. Their approach, called LinkRank, is related to random walks and more specifically to Google’s PageRank algorithm brinpageisdn (); pagerank (). More precisely, LinkRank indicates the importance of links (edges) in the network (instead of nodes) as the probability that a random surfer will follow this link in the stationary state (similar to the definition of PageRank but now for the edges). That is, the LinkRank value of a particular edge can be defined as
(14) 
where is the th element of PageRank vector and
is the element of Google matrix
(15) 
According to this modularity definition (which holds for both directed and undirected networks), a community is not just a group of nodes with more than expected number of edges, but a group of nodes where a random surfer is more likely to stay. Therefore, the directed modularity can be expressed as
(16) 
where is the expected probability (in the configuration model) that a random surfer is moving from node to (and thus the expected value of ). Furthermore, the authors show that the proposed modularity measure is consistent with the original modularity of Eq. (9) for undirected networks. In other words, for undirected networks, the proposed definition of a community as a group of nodes where a random surfer is more likely to be trapped in is consistent with the traditional one, where a community represents a group of, more than expected, densely connected nodes. One other important feature is that the proposed LinkRankbased modularity function can be optimized using already existing methods fortunato (), leading to a community discovery algorithm for directed networks. The authors claim that their method is able to detect mainly communities in directed networks where edges can be considered to represent citation/reference relationships (e.g., patternbased clusters).
The same definition of modularity for directed networks was also presented in Ref. laiphysica10 () (the method was also described in Section 4.2.1 since the original directed network is transformed into an undirected one). The method applies PageRank random walk to define the Laplacian matrix for the directed network, which at the end can be considered as a network embedding. Additionally, the authors provide an alternative definition of communities as nodes sharing common properties; nodes of the same group are more similar to each other compared to nodes outside the group. This can be also considered as a high level clustering definition, and is in agreement with the one we presented in Section 3.
In Refs. pantazisasilomar10 () and pantazisisbi11 (), Chang et al. present an alternative formulation of modularity (compared to of Eq. (10)), that relies on a different configuration model. As we described earlier, the configuration model used in (arenasmodularity07 (); leichtnewman2008 ()) assumes that the existence of a directed edge from node to node is proportional to . The authors present a different configuration model that rely on the idea of conditional expected network (a similar approach has been presented for undirected networks pantazisisbi10 ()). That is, the configuration model can be formed by conditioning on the degrees (both in and out) of nodes in the original network as
(17) 
The solution of the above conditional expected model suggested by the authors is considered for the case where the edges are distributed according to a Gaussian distribution and the final configuration model is the directed Gaussian random network (DGRN). A benefit of this model stands from the point that one can introduce prior information to the model in the form of the mean and covariance of the Gaussian distribution. Then, measuring the deviation from the configuration model, the modularity can be expressed as
(18) 
Furthermore, using spectral techniques similar to the ones of Ref. girvannewman () (or generally other modularity maximization algorithms), the modularity can be optimized obtaining a clustering assignment.
Modularity for Overlapping Communities
In the discussion until now, we have reviewed approaches for the clustering and community detection problem, where each node is assigned into just one community with no overlaps among communities. However, a different version of the problem is to allow nodes to be assigned in more than one communities, leading to the concept of overlapping communities. The intuition behind overlapping clustering is based on the fact that real complex networks usually are not divided into sharp subnetworks, but typically nodes may naturally belong to more than one communities. For instance, in a social relationship network, individuals usually belong to several different communities at the same time (family’s community, friendship’s community, profession’s community, etc). Thus, being able to identify the overlapping communities of directed networks, could offer fruitful insights about network structure.
To this direction, Nicosia et al. nicosiasstatmech09 () extended the measure of modularity to the more general case of directed networks with overlapping communities. The main point of their approach is to extend the configuration model that is used in the definition of modularity leichtnewman2008 (), allowing nodes to belong to several communities at the same time. Typically, nodes belong to each community with a certain strength and each node is associated with a coefficient that indicates how strongly this node belongs to community (i.e., each node is associated with a vector , where the total number of communities). Then, a similar coefficient can be defined for the participation of edges to communities; for each directed edge the belonging factor to community can be represented by a function of the corresponding coefficients of nodes , i.e., . Then, the function can be substituted by two different coefficients and , regarding the contribution of edge to the modularity of the network and the configuration model respectively. Finally, the modularity can be expressed as
(19) 
One can observe that if there is no overlap between communities, then , where the edge contributes to modularity only if . The value can be thought of as the contribution of edge to the modularity of community and according to the above discussion, . For the factor that is related to the configuration model, assuming that the belonging of a node to a community is independent from the belonging of every other node on the same community (i.e., the probability that a node belongs to community with strength is not related to the probability that any other node belongs to the same community with strength ), the modularity can be defined as
(20) 
where
(21) 
are the expected belonging coefficients of any edge , where node belong to community (i.e., the average membership for all edges). One more thing needs to be specified for defining the modularity measure for directed networks with overlapping communities and it concerns the selection of function which specifies the belonging of an edge in a community according to the belonging coefficients of the end nodes . The authors suggest that the selection of the function should lead to a valid modularity measure: (i) should equals to zero when no community structure can be identified and all nodes belong to the same community and (ii) higher value of indicates better community structure. Every potential function that preserves these properties can be applied to modularity. Finally, the authors present a genetic algorithm for optimizing the proposed modularity criterion, and therefore it can be used to identify the underlying overlapping community structure in directed networks.
Local Definition of Modularity
The definitions for the directed version of modularity that we have presented so far, assume that in the configuration model (the random graph model competitor), each node could be equally connected to any other node in the network. That is, the probability of an edge between every pair of nodes is the same, independent of the relative position of the nodes in the graph. In Ref. localmodularity (), Muff et al. propose a local definition of modularity for directed networks, where the expected number of edges within each community is computed with respect to the subgraph consisting of the community and its neighbor communities (and not based on the full network). That is, a local function of modularity can be expressed as
(22) 
where is the number of edges within community , the number of edges contained in ’s neighbor communities and () the total external (internal) degree of community . The authors provide experimental results where the maximization of provides more cohesive partitions in a school network dataset (interactions among students and their classmates) as well as in the metabolic network of E. coli.
Discussion
As discussed in Section 2, the modularity function suffers from the socalled resolution limit modularityresolution (), i.e., modularity optimization may fail to identify communities smaller than a specific size that depends on the scale of the network. This limitation was initially found in the undirected version of modularity ( in Eq. (9)), but a similar behavior is expected for the extension in directed networks (as we mentioned earlier, there is a close connection between and arenasmodularity07 ()). Thus, the produced partition that maximizes modularity may correspond either to single communities or to a merging of smaller weakly connected communities. In the literature, some possible metaalgorithmic approaches have been proposed, that can help to overcome the resolution limit fortunato ().
Spectral Clustering and Cutbased Measures for Directed Networks
In this section, we will review methodologies for the clustering problem in directed networks that are based on the concept of spectral clustering and graph cuts, and we will present the close relationship between them; these methods mainly constitute extensions of popular clustering approaches from the undirected case.
The algorithmic framework of spectral clustering was initially considered for the case of undirected networks, and includes methods that partition the nodes of a graph into clusters using information related to the spectrum of a matrix representation of the dataset (e.g., Laplacian or adjacency matrix). Spectral methods can be applied not only in networks (graph structures), but generally in every set of objects where a pairwise similarity function between them can be defined. For a nice tutorial about spectral graph clustering, one can refer to the survey paper of vonLuxburg vonluxburg (). Here we will present extensions to directed networks and more precise, we will examine the generalization of the Laplacian matrix for directed graphs.
Furthermore, spectral clustering methods can also be applied in a slightly different way for solving the graph clustering problem. This can be achieved through their close connection with the cutbased graph clustering method. Broadly speaking, in the graph clustering problem the goal is to partition the nodes of a network, in such a way that the edges between different groups should have low weight (or in the case of unweighted networks, the number of edges should be small), while the edges within a group should have high weight (note that the total weight of every cluster is considered aggregating the weights of edges). In other words, there are two criteria of interest when quantifying how good a community or a cluster is. The first one considers the number of edges between the nodes of the cluster, while the second the number of edges between nodes of the candidate community with the rest of network. As noted in Section 2, the objective functions for the clustering problem can be formed according to one of these criteria (singlecriterion scores) or based on a combination of them (multicriterion scores) leskovecwww10 ().
However, the optimization of these objective cutbased criteria typically lead to computational difficult problems, but relaxed versions of them can be turned into spectral clustering problems. The optimization measures can be expressed in a matrix form and then the spectrum (eigenvectors) of this matrix can be used to obtain the final clusters. We remind here that something similar was presented in Section 4.3.1 for the optimization of modularity. In that case, the modularity was expressed in a matrix form and applying spectral techniques the partition that maximizes modularity was detected. Thus, it is clear that spectral methods have a dual use: either as clustering framework itself or as an optimization framework for objective functions. For the latter case, first we will present how cutbased measures can be extended to directed networks and then how spectral methods can be applied on them as an optimization process. In the next section, we will discuss about the connections between cuts, spectral clustering and random walks on graphs.
Laplacian Matrix for Directed Networks
The Laplacian matrix of an undirected graph chung () is one of the main tools for spectral clustering. As we discussed in Section 2, the eigenvector that corresponds to the second smallest nonzero eigenvalue of the Laplacian matrix (the socalled Fiedler vector) can be used to obtain a bipartition of the nodes of the graph into two sets , with relatively small number of edges connecting the two sets (this can be achieved through the wellknown Cheeger inequality). That is, the eigenvectors of the Laplacian matrix provide a solution to the normalized cut objective function, which captures the clustering notion of a subset as (see also Ref. shimalikpami00 () by Shi and Malik):
(23) 
where and is the total number of edges starting from nodes in . Then, the optimal bipartition of the graph is the one that minimizes the normalized cut value and this can be approximated by the spectrum of the Laplacian matrix.
In the case of directed graphs, how the above property is generalized? The answer was initially provided by Chung chungdirectedlaplacian05 (), who proposed a version of the Laplacian matrix for directed networks, based on a random walk process. That is, for a directed network the Laplacian matrix can be defined as
(24) 
where is the transition matrix, i.e., and the diagonal matrix with the probability of finding the random walk on each vertex (the stationary distribution of the random walk). (One can observe that the matrix is the same with the one used by Ref. laiphysica10 () in Eq. (7)). Moreover, the most important point is that the Laplacian matrix of Eq. (24) satisfies the socalled Cheeger inequality, making it a useful tool for the graph clustering problem. In other words, the eigenvector of the second smallest nonzero eigenvalue of can be used to approximate a good cut in the network. Another version of the Laplacian matrix for directed networks (called Diplacian) with similar interesting properties, was recently presented by Li and Zhang in Refs. diplacianwaw10 (); diplacian ().
Based on Chung’s extension of the Laplacian matrix for directed networks, Gleich gleichdirected () proposed an hierarchical spectral graph clustering algorithm for directed networks. The idea utilizes Cheeger inequality that holds for the new directed Laplacian matrix and by recursively using the eigenvector that corresponds to the second smallest nonzero eigenvalue , a partition of the graph into two clusters can be achieved. The author suggests that this recursive process can terminate when the resulting subgraph contains less than nodes. Moreover, a possible extension of the algorithm to higher eigenvectors is discussed, where each higher eigenvector (other that ) offers the next best solution for the normalized cut. That is, the spectrum of the directed Laplacian matrix ( smallest eigenpairs) can be used to partition the network into clusters.
A similar solution to the problem was proposed by Zhou et al. zhouicml05 (), who considered a normalized analogous of the directed Laplacian matrix. More precisely, the authors define the matrix
(25) 
where . According to this relation between and , the best normalized cut will correspond to the eigenvector of the second largest eigenvalue of (instead of second smallest in the case of ). Algorithm 1 describes the pseudocode of the clustering algorithm for directed networks based on the above discussion, where the graph is partitioned into two parts (the algorithm is similar to the one presented by Gleich in Ref. gleichdirected ()).
The above algorithm can be extended in the case of a partition (instead of a bipartition), considering the eigenvectors that correspond to the largest eigenvalues of . Furthermore, in the case of labeled data (where each node is associated with a label), the above methodology can be used as a general learning (classification) framework for directed networks. Later, the framework was extended to the case of graphs with multiple views, where data is associated with multiple representations zhouicml07 (). For example, in the case of the web graph, each web page can be represented either as a node in a directed network based on the hyperlink structure, or using the vectorspace model based on occurrences of words in a web page. These two different views can be combined as a directed hyperlink network, weighted according to the similarity of the web pages. In the general case, each different view can be represented as a directed network with the same set of nodes and the idea is to combine these different views to improve the accuracy of the learning framework (e.g., the graph clustering task).
Cutbased Measures for Directed Networks
A basic point of the Laplacianbased spectral clustering algorithm that we presented above, is that it provides a solution to the normalized cut problem. The objective criterion that is optimized while using the eivenvectors of the Laplacian matrix (of a directed or undirected network), is a generalized version of the normalized cut. Additionally, other possible cutbased objective criteria can also be applied to the clustering problem in directed networks, as the one of weighted cuts proposed by Meilă and Pentney meilasdm07 (). More precisely, the authors introduced the generalized weighted cut criterion, defined as follows
(26) 
One can observe that this criterion is similar to the one of normalized cut (Eq. (23)), but it is parametrized by the vectors and . That is, the objective is to form node clusters of balanced size, where clusters’ size is parametrized by vector , while vector plays the role of a normalization factor for the adjacency matrix . An important point is that different normalized cutbased measures can be recovered from the definition of WCut, by properly setting the parameter vectors and . This point makes the new criterion more flexible. The authors show that the optimization of the WCut function can be relaxed on an analogous symmetric problem, where many existing spectral clustering algorithms and theoretical results can be applied for extracting the final clusters. The experimental results show that the symmetrized version of the spectral clustering problem produced by the weighted cut objective function, gives better results compared to the cases where the matrix is symmetrized using simple linear algebraic transformations (e.g., some of those presented in Section 4.2.1).
In the context of image processing and analysis, the authors of Ref. Yushi01 () present an approach for clustering directed networks, generalizing the normalized cuts criterion. At a first point, a new representation scheme is proposed, in which all possible pairwise relationships are characterized according to two types of node correlations, namely attraction and repulsion. According to these relationships, the general compatibility between two pixels in the image can be captured by two different directed networks that correspond to each of these two relationships. The general idea behind the approach is that at the clustering process, the attraction of nodes that belong on the same group should be as large as possible, while the repulsion between two different groups should be minimized. Then, information about these two graphs is introduced in a “dual” clustering criterion that extends the notion of normalized cuts. Finally, the optimization of the produced objective functions leads to an eigendecomposition problem of a Hermitian matrix, where the imaginary part encodes directed relationships, while the real part encodes undirected relationships with positive numbers for attraction and negative numbers for repulsion.
PageRank and Random Walk based Methods
The PageRank and generally random walks over graphs are closely related to spectral clustering. That is, cutbased measures in networks (e.g., normalized cuts) and their optimization process, can be expressed in terms of random walks mailashiaistats01 (). Broadly speaking, the minimization of the number of edges that crossing a cut in a network can be described as a similar process where the random surfer is forced to stay more time within a cluster. In other words, the normalized cut objective criterion presented in Eq. (23), corresponds to the probability of the random walk transitioning from the vertex set to set in one step if it is currently in and the random walk is started in the stationary distribution (or viceversa):
(27) 
That is, if represents the stationary distribution of the random walk, then the probability with which the random surfer can be found in a node in can be defined as (similarly for and also ). Then, the probability that the random walk will move from to can be defined as , where is the transition matrix.
Equation (27) considers the general case of graphs with the existence of directed edges and thus can be naturally applied in directed networks (in the case of undirected networks , since the probability of transition from to is equal to the one from to ). As we described in Section 4.4.3, this criterion can be approximated by the eigenvalues of the Laplacian matrix for directed networks zhouicml05 ().
It also holds for undirected networks that relying only on the first top eigenvectors of the transition matrix which is related to the random walk, one is able to identify the underlying clusters meilamultiway04 (). A similar result was presented for directed networks, which states that a clustering can be achieved by looking for piecewise constant eigenvectors in the transition matrix pentneimeilaaaai05 (). However, as noted by Capocci et al. capocciphysicaA2005 (), one can rely on the eigenvectors of matrix , if the network has a clear modular structure. However, in practice, this is something that occurs rarely; typically, real large networks have no clear community structure, and the eigenvector components do not show a clear stepwise form. To deal with this issue, Capocci et al. capocciphysicaA2005 () presented an approach where the underlying community structure is revealed by correlations between the same components of different eigenvectors. That is, the eigenvector components that correspond to nodes of the same cluster, will show high correlation among each other. In the case of directed networks, the adjacency matrix of the network is replaced by matrix and a similar methodology is applied (therefore the method first transforms the directed network to undirected by a transformation approach which introduces edges between nodes with common neighbors).
In the context of community detection in the directed Web graph, Huang et al. huangpkdd06 () proposed to extend the randomwalk based approach, using some variations of random walks that are able to identify latent Web communities. That is, instead of only satisfying a normalized cut criterion where two web pages (nodes) are assumed to be related if they are directly connected, the authors also consider the case of patternbased clusters where cocitation and coreference information is taken into consideration. In other words, the random walk should ensure that Web pages that share a common topic or interest should be grouped together, even if they are not directly connected (the case of patternbased clusters that we described in Section 3.2). More precisely, their first approach involves two versions of the PageRank random walk (or teleporting random walk) pagerank (), one following the forward hyperlinks while the other the backward ones. The first one can be considered as an authoritybased ranking of nodes while the second as hubbased (e.g., see Ref. hits ()). Moreover, PageRank guarantees the convergence to a stationary distribution through the adoption of a damping factor (in case of absence of in/out edges for a node). In their second approach, the authors consider a twostep random walk, in order to reveal latent communities that imposed by the existence of cocitation and coreference edges. That is, starting from a node , the random surfer first jumps one hop backward to a hub node with probability , and then she moves one step forward to a node (adjacent to ) with probability . Then, the twostep transition probability between authorities is defined as
(28) 
where nodes are treated as authorities. Similarly, forcing the random surfer to move firstly one step forward and then one step backward, the nodes are treated as hubs, and the transition probability matrix can be similarly defined. Moreover, since both these twostep random walks require that each node should have incoming and outgoing edges, again a teleporting probability (damping factor) is introduced. Finally, the above two types of random walks can be combined through a convex combination, in order to consider both cocitation and coreference node similarity. In this case, the transition matrix can be expressed as , where parameter controls the cocitation and coreference effects. Since the modified transition matrix has been defined, it can be applied to the Laplacian matrix of Eq. (25), and spectral methods can be used to extract the clusters.
A similar PageRankbased approach for clustering hypertext document
collections that are represented by directed networks, was introduced in Ref.
clusteringsigir08 (). The proposed algorithm (called PRC) is composed by
two parts. In a first step, a set of centroid nodes are selected (according to a
node ranking criterion such as PageRank or Hits), and after that, the nodes are
assigned to clusters using a Personalized PageRank method
In Ref. laimessagepassing () the authors combined random walks with the concept of affinity propagation affinitypropagation () and proposed a message passing algorithm for community detection in both directed and undirected networks. Affinity propagation is a mechanism that has been previously used in the task of clustering data points, where each group is associated with a representative point. Broadly speaking, the method of community detection via affinity propagation can be likened to an election process, in which nodes represent voters and the group leaders are the representative nodes. Through message passing along the edges of the network, the nodes are able to identify the community that they belong to; this is determined by its community leader, examining the similarity with their neighbors. The similarity between two nodes is computed using random walks and a variant of the transition matrix; each node is finally represented as a vector in and wellknown similarity metrics are applied (e.g., cosine similarity).
A somewhat different version of the problem is the one of local graph partitioning, where instead of clustering the whole graph, the goal is to find a “good” local clustering structure near a specified seed node, by examining only a small portion of the input graph. As we will discuss later at this paper, this is a very interesting variant of the community detection problem. In Ref. langlocal (), Andersen et al. propose a local clustering algorithm for directed networks (extending a similar method for undirected networks), combining information from both the Personalized PageRank score of a node and the global one (i.e., the classical version of PageRank). That is, for a specific seed node, the authors compute the Personalized PageRank score with a single starting node (the seed node), as well as a global PageRank score with a uniform starting distribution over all nodes. Then, it is proved that taking the ratio of the entries in the Personalized PageRank and global PageRank vectors and sorting the nodes of the graph according to this ratio, one is able to identify a local set of nodes (cluster) with good clustering properties. The quality of the obtained cluster is determined by the measure of conductance (e.g., see Ref. leskovecwww10 ()) which is generalized for directed networks.
Other Extensions
In this section we describe a few other diverse approaches for detecting communities in directed networks, that mainly extend concepts from the undirected case of the problem.
Clique Percolation Method for Overlapping Community Detection
Palla et al. palladirectednetworkmodules () presented a technique which extends the clique percolation method initially proposed for undirected networks. The goal of the method is to detect network modules (i.e., dense connected groups of nodes), following a local search approach based on edge density. Moreover, the produced modules may overlap with each other (i.e., a node may belong to more than one communities). In the case of undirected networks, the clique percolation method considers that the definition of modules is based on adjacent cliques. A clique is a complete subgraph with nodes, while two cliques are adjacent if they share nodes. A module is defined to be the union of cliques that can be reached from each other traversing the edges of adjacent cliques. In other words, considering a clique as a template, the modules can be identified by rolling the template to an adjacent clique (retaining all but one node fixed) as shown in Fig. 10.
The method is extended in directed networks, defining the concept of directed cliques as complete subgraphs of size , where the nodes can be ordered such that between any pair of nodes there is a directed edge from a higher order node to a lower one. The ordering is obtained according to the restricted outdegree of a node in the clique (the number of outneighbors in the clique). Then, the directed clique modules are defined in a similar way as in the undirected case, by considering the union of adjacent directed cliques. The authors discuss that the proposed definition of cliques for directed networks is not unique, and other extensions can be considered as well.
Local Density Clustering
One other clustering method that aims to detect clusters based solely on local information, is the one presented by Schaeffer and Virtanen in Refs. schaefferpakdd05 (); chileanweb () respectively. The basic idea of the approach is to extend the concept of cluster density to directed networks. (The problem is similar to the one presented earlier in Section 4.3.3 about local graph partitioning). More precisely, a local search method is applied in order to find a good cluster that contains a specified seed node (the approach can be naturally extended to several seed nodes). That is, the internal degree of a local cluster is defined as (i.e., the number of edges with both endpoints in ), while the external degree is (i.e., the number of directed edges that have only the start node in ). The density of the directed network is defined as , where and . Similarly, the density of a cluster (also called local density) can be defined as and the relative density as . The authors combine the local and relative density and the final quality measure is selected to be the product of them: . Having define the clustering quality function, the problem of local clustering can be stated as follows: find a subgraph with nodes (i.e., the cluster) that contains a given node , maximizing . Since this is a computational difficult problem, the authors propose a local search approach starting from node and gradually expanding the subgraph around .
4.4 Alternative Approaches for Community Detection in Directed Networks
In this section we review “alternative” clustering approaches for directed networks that do not belong to one of the previous categories. While the approaches described so far either transform the original directed network to undirected or constitute wellknown extensions from undirected to directed networks, here we will review algorithms that follow different and diverse methodological approaches. We classify them in three categories, according to the main methodology they follow, namely (a) informationtheoretic, (b) mixture models and statistical inference, and (c) stochastic blockmodels. One additional category is devoted to approaches that mainly deal with variations of the clustering problem (e.g., community detection in dynamic directed networks). We note that even some of these approaches have been applied in the past on undirected networks, we decide to review them independently, trying to identify and demonstrate additional concepts that can be used for the problem. Moreover, some of them can be applied on both directed and undirected networks (i.e., independent from edge directionality), and we briefly discuss about this interesting feature. Although categories (b) and (c) both refer to approaches on probabilistic models, we decide to review them independently, since they are based on different statistical inference techniques.
InformationTheoretic Based Approaches
A prominent methodology for extracting the community structure of a network is the one that applies informationtheoretic and compression principles. Generally, the existence of communities in networks represent structural patterns and regularities, that similar to more traditional data mining and analysis tasks, they can be used to effectively compress the network (data), e.g., Refs. rosvallbergstrompnas07 (); megalooikonomoufaloutsosdmkd07 (). Rosvall and Bergstrom rosvallpnas08 () proposed a method (called Isomap) to identify communities in directed networks, by combining random walks and compression principles. That is, the modules of the network can be recognized based on how fast information flows on them. The authors apply the concept of random walks to describe the process of information flow in the network and the clusters can be extracted by compressing the description of the random walk. As we have already discussed, a community corresponds to a group of nodes in which the random surfer is more likely be trapped in, visiting more time nodes of the group than other nodes outside of that. Thus, intuitively, a community would correspond to a group of nodes in which the random walk can be compressed better and the problem can be reformulated as a coding one: the goal is to select a partition of the nodes into communities, minimizing the description length of the random walk.
At a first step, each node in the network is described by a unique codeword based on the visiting frequency of the random walk. Using Huffman coding, shorter codewords are assigned to more frequently visited nodes. At a second step, the random walk trajectory on the network can be described following a twolevel description: unique names (codewords) are assigned to the clusters of the network (coarsegrained structure), while the codewords for the description of nodes inside a module are reused (finegrained structure). Thus, reporting only the codewords that have been assigned to communities, a coarsegrained description of the network is achieved. The procedure is similar to the one used while designing a geographic map; unique names are assigned to cities (communities in our case), while names for the streets (nodes in our case) of a city can be reused. Then, the clustering problem can be expressed as finding the partition that yields the minimum description code length. If the network has a welldefined community structure, the above twolevel description scheme will produce shorter code length: the random walk will jump between different communities infrequently and thus the description length will be shorter (since the codewords represent individual nodes are shorter). The minimization of the description length can be achieved combining greedy search and simulated annealing methods. Regarding the clustering results, the Isomap algorithm is able to identify patternbased clusters and more specifically clusters of flow patterns induced by the edges of the network.
A somewhat different formulation of information theoretic principles in
the community detection problem has been presented by
Chakrabarti in Ref. autopartpkdd05 () (even though the algorithm is tested
on undirected networks, it seems that it can be applied in directed networks as
well). The proposed algorithm (called AutoPart) can be considered as a
coclustering tool for binary matrices (the adjacency matrix in our case),
where compression concepts are applied to identify the underlying clustering
structure
(a) Initial matrix  (b) Reordered matrix 
To minimize the total compression cost , a twostep iterative approach is applied. Initially, the graph is considered as a single cluster itself. At each iteration, the algorithm first finds a good node grouping for a given number of clusters, and then, is looking for the number of clusters to be formed by splitting the previously created clusters with the maximum entropy per node. This iterative procedure continues until finding the optimal number of clusters , for which the compression cost cannot further be decreased. Thus the complexity of the method is , where the number of iterations to achieve convergence of the compression cost (the author state that in practice iterations are enough). To conclude, the main features of the algorithm are: (i) it treats the community detection problem as a coclustering task where the number of clusters is automatically determined by the MDL principle, and (ii) it scales linearly with respect to the number of edges.
Probabilistic Models and Statistical Inference
A different formulation and solution for the community detection problem in
networks can be achieved applying statistical inference methods.
Broadly speaking, statistical inference
Assume that is a variable that represents the fraction of nodes in community and is the probability of existence of a directed edge from a particular node in community to a node (i.e., the preferences of nodes in about which other nodes they link to). The following quantities are used to define the model: the network data , the missing data (i.e., community assignment), and model parameters