A Survey on Subgraph Counting: Concepts, Algorithms and Applications to Network Motifs and Graphlets
Pedro Ribeiro, Pedro Paredes, Miguel E.P. Silva, David Aparicio, Fernando Silva
AA Survey on Subgraph Counting: Concepts, Algorithmsand Applications to Network Motifs and Graphlets
PEDRO RIBEIRO , PEDRO PAREDES , , MIGUEL E.P. SILVA , , DAVID APARÍCIO , ,and FERNANDO SILVA DCC-FCUP & CRACS/INESC-TEC, University of Porto, Portugal Carnegie Mellon University, USA University of Manchester, UK FeedzaiComputing subgraph frequencies is a fundamental task that lies at the core of several network analysismethodologies, such as network motifs and graphlet-based metrics, which have been widely used to categorizeand compare networks from multiple domains. Counting subgraphs is however computationally very expensiveand there has been a large body of work on efficient algorithms and strategies to make subgraph countingfeasible for larger subgraphs and networks.This survey aims precisely to provide a comprehensive overview of the existing methods for subgraphcounting. Our main contribution is a general and structured review of existing algorithms, classifying themon a set of key characteristics, highlighting their main similarities and differences. We identify and describethe main conceptual approaches, giving insight on their advantages and limitations, and provide pointers toexisting implementations. We initially focus on exact sequential algorithms, but we also do a thorough surveyon approximate methodologies (with a trade-off between accuracy and execution time) and parallel strategies(that need to deal with an unbalanced search space).
Keywords:
Subgraphs, Subgraph Enumeration, Network Motifs, Graphlets, Analytical Algorithms, Approxi-mate Counting, Sampling, Parallel Computation, Unbalanced Work Division
Networks (or graphs) are a very flexible and powerful way of modeling many real-world systems.In its essence, they capture the interactions of a system, by representing entities as nodes and theirrelations as edges connecting them (e.g., people are nodes in social networks and edges connectthose that have some relationship between them, such as friendships or citations). Networkshave thus been used to analyze all kinds of social, biological and communication processes [35].Extracting information from networks is therefore a vital interdisciplinary task that has beenemerging as a research area by itself, commonly known as Network Science [15, 90].One very common and important methodology is to look at the networks from a subgraphperspective, identifying the characteristic and recurrent connection patterns. For instance, networkmotif analysis [121] has identified the feed-forward loop as a recurring and crucial functional patternin many real biological networks, such as gene regulation and metabolic networks [101, 208]. An-other example is the usage of graphlet-degree distributions to show that protein-protein interactionnetworks are more akin to geometric graphs than with traditional scale-free models [138].At the heart of these topologically rich approaches lies the subgraph counting problem, that is,the ability to compute subgraph frequencies. However, this is a very hard computational task. In fact,determining if one subgraph exists at all in another larger network (i.e., subgraph isomorphism [182])is an NP-Complete problem [34]. Determining the exact frequency is even harder, and millions oreven billions of subgraph occurrences are typically found even in relatively small networks.
Authors’ contacts: Pedro Ribeiro ([email protected]), Pedro Paredes ([email protected]), Miguel E.P. Silva([email protected]), David Aparício ([email protected]), Fernando Silva ([email protected])This work was made when all the authors were at DCC-FCUP. a r X i v : . [ c s . D S ] O c t P. Ribeiro, P. Paredes, M. E. P. Silva, D. Aparício, and F. Silva
Given both its usefulness and hard tractability, subgraph counting has been raising a considerableamount of interest from the research community, with a large body of published literature. Thissurvey aims precisely to organize and summarize these research results, providing a comprehensiveoverview of the field. Our main contributions are the following: • A comprehensive review of algorithms for exact subgraph counting.
We give a struc-tured historical perspective on algorithms for computing exact subgraph frequencies. Weprovide a complete overview table in which we employ a taxonomy that allows to classify allalgorithms on a set of key characteristics, highlighting their main similarities and differences.We also identify and describe the main conceptual ideas, giving insight on their main advan-tages and possible limitations. We also provide links to existing implementations, exposingwhich approaches are readily available. • A comprehensive review of algorithms for approximate subgraph counting.
Giventhe hardness of the problem, many authors have resorted to approximation schemes, whichallow trading some accuracy for faster execution times. As on the exact case, we providehistorical context, links to implementations and we give a classification and description of keyproperties, explaining how the existing approaches deal with the balance between precisionand running time. • A comprehensive review of parallel subgraph counting methodologies.
It is onlynatural that researchers have tried to harness the power of parallel architectures to providescalable approaches that might decrease the needed computation time. As before, we providean historical overview, coupled with classification on a set of important aspects, such asthe type of parallel platform or availability of an implementation. We also give particularattention to how the methodologies tackle the unbalanced nature of the search space.We complement this journey trough the algorithmic strategies with a clear formal definition ofthe subgraph counting problem being discussed here, an overview of its applications and completeand a large number of references to related work that is not directly in the scope of this article. Webelieve that this survey provides the reader with an insightful and complete perspective on thefield, both from a methodological and an application point of view.The remainder of this paper is structured as follows. Section 2 presents necessary terminology,formally describes subgraph counting, and describes possible applications related subgraph counting.Section 3 reviews exact algorithms, divided between full enumeration and analytical methods.Approximate algorithms are described in Section 4 and parallel strategies are presented in Section 5.Finally, in Section 6 we give our concluding remarks.
Survey on Subgraph Counting 3
This section introduces concepts and terminology related to subgraph counting that will be usedthroughout this paper. A network is modeled with the mathematical object graph , and the two termsare used interchangeably. Networks considered in this work are simple labeled graphs . Here we areinterested in algorithms that count small, connected, non-isomorphic subgraphs on a single network.
Graph:
A graph G is comprised of a set V ( G ) of vertices/nodes and a set E ( G ) of edges/connections .Nodes represent entities and edges correspond to relationships between them. Edges are repre-sented as pairs of vertices of the form ( u , v ) , where u , v ∈ V ( G ) . In directed graphs, edges ( u , v ) are ordered pairs ( u → v ) whereas in undirected graphs there is no order since nodes are alwaysreciprocally connected ( u ⇄ v ). The size of a graph is the number of vertices in the graph andit is written as | V ( G )| . A k -graph is a graph of size k . A graph is considered simple if it does notcontain multiple edges (two or more edges connecting the same vertex pair) nor self-loops (anedge connecting a vertex to itself). Nodes are labeled from 0 to | V ( G )| −
1, and L ( u ) < L ( v ) meansthan u has a smaller label than v . Neighborhood and Degree:
The neighborhood of vertex u ∈ V ( G ) , denoted as N ( u ) , is composedby the set of vertices v ∈ V ( G ) such that ( u , v ) ∈ E ( G ) . The degree of u , written as deд ( u ) , isthe given by | N ( u )| . The exclusive neighborhood N exc ( u , S ) are the neighbors of u that are notneighbors of any v ∈ S with u (cid:44) v . Graph Isomorphism: A mapping of a graph is a bijection where each vertex is assigned a value.In the context of this work, since graphs are labeled , a mapping is a permutation of the nodelabels. Two graphs G and H are said to be isomorphic if there is a one-to-one mapping betweenthe vertices of both graphs, such that there is an edge between two vertices of G if and only iftheir corresponding vertices in H also form an edge (preserving direction in the case of directedgraphs). More informally, isomorphism captures the notion of two networks having the sameedge structure – the same topology – if we ignore distinction between individual nodes. Figure 1illustrates this concept. Despite looking different, the structure of the graphs is the same, and theyare isomorphic. The labels in the nodes illustrate mappings that would satisfy the conditions givenfor isomorphism.
01 2 3 45 43 2 1 05 23 1 4 05 20 1 4 35
Fig. 1. Four isomorphic undirected graphs of size 6.
Subgraphs: A subgraph G k of a graph G is a k -graph such that V ( G k ) ⊆ V ( G ) and E ( G k ) ⊆ E ( G ) .A subgraph is induced if ∀ ( u , v ) ∈ E ( G K ) ↔ ( u , v ) ∈ E ( G ) and is said to be connected when allpairs of vertices have a sequence of edges connecting them. Graphlets [138] are small, connected,non-isomorphic, induced subgraphs. Figure 2 presents all 4-node undirected graphlets. G G G G G G Fig. 2. All non-isomorphic undirected subgraphs (or graphlets) of size 4.
P. Ribeiro, P. Paredes, M. E. P. Silva, D. Aparício, and F. Silva
Orbit:
The set of isomorphisms of a graph into itself is called the group of automorphisms : twovertices are said to be equivalent when there exists some automorphism that maps one vertex intothe other. This equivalence relation partitions V ( G ) into equivalence classes, which we refer toas orbits . Therefore, orbits are all the unique positions of a subgraph. For instance, a k − hub has k nodes but only 2 orbits: one center-orbit inhabited by a single node and a leaf-orbit where theremaining k -1 nodes are. Nodes at the same orbit are topologically equivalent. Figure 3 shows alldifferent orbits of the graphlets from Figure 2. Fig. 3. The 10 orbits of all 4-node undirected graphlets.
Match and Frequency: A match of graph H in graph G occurs when there is a set of nodes from V ( G ) that induce H . In other words, G k is a subgraph of G that is isomorphic to H . Figure 4 showsthe matches of three different subgraphs ( A , B and C ) on graph G . The frequency of H in G is thenumber of different G k ⊆ G that induce H . Two matches are considered different if they do notshare all nodes and edges. Graphlet-Degree Distribution :
It is an extension of the node-degree distribution and both canbe used for graph characterization and comparison. Notice that the node-degree can be seenas simply the orbit a in Figure 4. The graphlet-degree vector GDV ( v ) is a feature vector of v specifying how many times it occurs in each orbit. The graphlet-degree distribution GDD G is afeature matrix of graph G where cell ( i , j ) indicates the number of nodes that appear i times inorbit j , and can be constructed from Fr G , the frequency matrix where each line is the GDV of asingle node.
Gorbit c dba vGDV ( ) v A B C c dba wx yz w Fr xvyz G = cdba GDD G = aa bb b cd d Fig. 4.
GDV ( v ) obtained by enumerating all undirected graphlet-orbits of sizes 2 and 3 ( A , B and C ) touching v , and resulting Fr G and GDD G matrices for the complete -subgraph census Making use of previous concepts and terminology, we now give a more formal definition of theproblem tackled by this survey:Definition 2.1 (
Subgraph Counting ). Given a set G of non-isomorphic subgraphs and a graph G , determine the frequency of all induced matches of the subgraphs G s ∈ G in G . Two occurrences areconsidered different if they have at least one node or edge that they do not share. Survey on Subgraph Counting 5
This problem is also known as subgraph census . In short, one wants to extract the occurrencesof all subgraphs of a given size, or just a smaller set of "interesting" subgraphs, contained in alarge graph G . Note how here the input is a single graph, in contrast with Frequent SubgraphMining (FSM) where collections of graphs are more commonly used (differences between SubgraphCounting and FSM are discussed in Section 2.4.5).Approaches diverge on which subgraphs are counted in G . Network-centric methods extract all k − node occurrences in G and then assess each occurrence’s isomorphic type. On the other end of thespectrum, subgraph-centric methods first pick a isomorphic class and then only count occurrencesmatching that class in G . Therefore, subgraph-centric methods are preferable to network-centricalgorithms when only one or a few different subgraphs are to be counted. Set-centric approachesare middle-ground algorithms that take as input a set of interesting subgraphs and only count thoseon G . This work is mainly focused on network-centric algorithms, while not limited to them, since:(a) exploring all subgraphs offers the most information possible when applying subgraph countingto a real dataset, (b) hand-picking a set of interesting subgraphs might might be hard or impossibleand could be heavily dependent on our knowledge of the dataset, (c) it is intrinsically the mostgeneral approach. It is obviously possible to use subgraph-centric methods to count all isomorphicclasses, simply by executing the method once per isomorphic type. However, that option is onlyfeasible for small subgraph sizes because larger k values produce too many subgraphs (see Table 1)and it is likely that a network only has a small subset of them, meaning that the method wouldspend a considerable amount of time looking for features that do not exist, while network-centricmethods always do useful work since they count occurrences in the network. Table 1. Number of different undirected and directed subgraphs (i.e., isomorphic classes), as well as theirrespective orbits, depending on the size of the graphlets.
Undirected Directed k × × × × × ≈ × ≈ × ≈ × Here we are mainly interested in algorithms that count induced subgraphs, but non-inducedsubgraphs counting algorithms are also considered. Counting one or the other is equivalent since itis possible to obtain induced occurrences from non-induced occurrences, and vice-versa. However,we should note that, at the end of the counting process, induced occurrences need to be obtainedby the algorithm. This choice penalizes non-induced subgraph counting algorithms since thetransformation is quadratic on the number of subgraphs [52]. Some algorithms count orbits insteadof subgraphs [62]. However, counting orbits can be reduced to counting subgraphs and, therefore,these algorithms are also considered.We should note that we only consider the most common and well studied subgraph frequencydefinition, in which different occurrences might share a partial subset of nodes and edges, but thereare other possible frequency concepts, in which this overlap is explicitly disallowed [47, 167].
P. Ribeiro, P. Paredes, M. E. P. Silva, D. Aparício, and F. Silva
In this work we focus on practical algorithms that are capable of counting all subgraphs of a givensize. Therefore, algorithms that only target specific subgraphs are not considered (e.g., triads [163],cliques [7, 51], stars [37, 54] or subtrees [91]). Furthermore, given our focus on generalizability,we do not consider algorithms that are only capable of counting sugraphs in specific graphs (e.g.,bipartite networks [161], trees [36]), or that only count local subgraphs [38].Graphs used throughout this work are simple, have a single layer of connectivity and do notdistinguish the node or edge types with qualitative or quantitative features. Therefore we donot discuss here algorithms that use colored nodes or edges [53, 58, 148], and neither those thatconsider networks that are heterogeneous [57, 156], multilayer [23, 143], labelled/attributed [123],probabilistic [162] or any kind of weighted graphs [197].Finally, the networks we consider are static and do not change their topology. We should howevernote that there has been an increasing interest in temporal networks, that evolve over time [66].Some algorithms beyond the scope of this survey try to tackle temporal subgraph counting, either byconsidering temporal networks as a series of static snapshots [14, 70], by timestamping edges [129],or by considering a stream of small updates to the graph topology [27, 77, 166, 173].
Given two graphs G and H , the subgraph isomorphism problem is thecomputational task of determining if G contains a subgraph isomorphic to H . Although efficientsolutions might be found for specific graph types (e.g., linear solutions exist for planar graphs [48]),this is a known NP-Complete problem for general graphs [34], and can be seen as much simplerversion of counting, that is, determining if the number of occurrences is bigger than zero. This taskis closely related to the graph isomorphism problem [107, 108], that is, the task of determining iftwo given graphs are isomorphic. Since many subgraph counting approaches rely on finding thesubgraphs contained in a large graph and then checking to what isomorphic class the subgraphsfound belong to, subgraph isomorphism can be seen as an integral part of them. The well knownand very fast nauty tool [106] is used by several subgraph counting algorithms to assess the typeof the subgraph found [130, 149, 196]. The small patterns found in large graphs can offer insights about thenetworks. By considering the frequency of all k -subgraphs, we have a very powerful and rich featurevector that characterizes the network. There has been a long tradition on using the triad census onthe analysis of social networks [191], and they have been used as early as in the 70s to describelocal structure [65]. Examples of applications in this field include studying social capital featuressuch as brokerage and closure [137], discovering social roles [42], seeing the effect of individualpsychological differences on network structure [76] or characterizing communication [181] andsocial networks [28]. Given the ubiquity of graphs, these frequencies have also been used on manyother domains, such as in biological [175], transportation [184] or interfirm networks [99]. A subgraph is considered a network motif if it is somehow exceptional.Instead of simply using a frequency vector, motif based approaches construct a significance profile that associates an importance to each subgraph, typically related to how overrepresented it is. Thisconcept first appeared in 2002 and it was first defined as subgraphs that occurred more often thanexpected when compared against a null model [121]. The most common null model is to keep thedegree sequence and with this we can obtain characteristic network fingerprints that have beenshown to be very rich and capable of classifying networks into distinct superfamilies [120]. Networkmotif analysis has since been in a vast range of applications, such as in the analysis of biological
Survey on Subgraph Counting 7 networks (e.g., brain [177], regulation and protein interaction [204] or food webs [16]), socialnetworks (e.g., co-authorship [32] or online social networks [43]), sports analytics (e.g., footballpassing [17]) or software networks (e.g., software architecture [183] or function-call graphs [199]).In order to compute the significance profile of motifs in a graph G , most conceptual approachesrely on generating a large set of R ( G ) of similar randomized networks that serve as the desirednull model. Thus, subgraph counting needs to be performed both on the original network andon the set of randomized networks. If the frequency of a subgraph S is significantly bigger in G than it its average frequency in R ( G ) , we can consider S to be a network motif of G [79]. Otherapproaches try to avoid exhaustive generation of random networks and, thus, avoid also countingsubgraphs on them, by following a more analytical approach capable of providing estimationsof the expected frequencies (e.g., using an expected degree model [117, 135, 165] or a scale-freemodel [178]. Nevertheless, there is always the need of counting subgraphs in the original network.While network motifs are usually about induced subgraph occurrences [121, 198], there are somemotif algorithms that count non-induced occurrences instead [92, 126]. Moreover, although mostof the network motifs usages assume the previously mentioned statistical view on significance asoverrepresentation, there are other possible approaches [200] such as using information theoryconcepts (e.g., motifs based on entropy [1, 33], subgraph covers [192], or minimum descriptionlength [22]). We should also note that some approaches try to better navigate the space of "inter-esting" subgraphs, so that reaching larger motif sizes can be reached not by searching all possiblelarger k -subgraphs, but instead by leveraging computations of smaller motifs [97, 134].Finally, we should note that several authors use the term motif to refer to small subgraphs, evenwhen it does not imply any significance value beyond simple frequency on the original network. When authors use the term graphlet , theycommonly take orbits into consideration, and use metrics such as the graphlet-degree distribution(GDD, see details in section 2.1), a concept that appeared in 2007 [138]. In this way, graphletalgorithms count how many times each node appears in each orbit. Unlike motifs, graphlets donot usually need a null model (i.e., networks are directly compared by comparing their respectiveGDDs). These orbit-aware distributions can be used for comparing networks. For instance, theyhave shown that protein interaction networks are more akin to random geometric graphs thanto traditional scale-free networks [138]. Moreover, they are also used to compare nodes (usinggraphlet-degree vectors). This makes them useful for network alignment tasks, where one needsto establish topological similarity between nodes from different networks [118]. Several graphlet-based network alignment algorithms have been proposed and shown to work very well for aligningbiological networks [11, 87, 88, 100, 179].
FSM algorithms find subgraphs that have a support higherthan a given threshold. The most prevalent branch of FSM takes as input a bundle of networks andfinds which subgraphs appear in a vast number of them - refereed to as graph transaction basedFSM [74]. These algorithms [69, 125, 202] heavily rely on the Downward Closure Property (DCP)to efficiently prune the search space. Algorithms for subgraph counting, which is our focus, cannot, in general, rely on the DCP since it is not possible to know if growing an infrequent k -nodesubgraph will result, or not, in a frequent k + single graph based FSM , targets frequentsubgraphs in a single large network, much like our subgraph counting problem. However, theyadopt various support metrics that allow for the DCP to be verified, which, as stated previously, isnot the case in the general subgraph counting problem [74]. P. Ribeiro, P. Paredes, M. E. P. Silva, D. Aparício, and F. Silva
To the best of our knowledge there is no other comparable work to this survey in terms of scope,thoroughness and recency. Most of the already existing surveys that deal with subgraph countingare directly related to network motif discovery. Some of them are from before 2015 and thereforepredate many of the most recent algorithmic advances [82, 105, 150, 180, 198], and all of themonly present a small subset of the strategies discussed here. There are more recent review papers,but they all differ from our work and have a much smaller scope.
Al Hasan and Dave [6] onlyconsider triangle counting,
Xia et al. [200] focus mainly on significance metrics, and finally, whilewe here present a structured overview of more than 50 exact, approximate and parallel algorithmicapproaches,
Jain and Patgiri [72] presents a much simpler description of 5 different algorithms.
As subgraph counting evolved over the years, a multitude of algorithms and methods were developedthat address the problem in different ways and for distinct purposes. As such, it is useful, althoughnot easy, to group strategies together in order to facilitate their understanding as well as learn whyand how they came about. With this in mind we divided this section into two major groups ofalgorithms, namely enumeration and analytic approaches, which are further subdivided in theirrespective section. Table 2 summarizes our proposed taxonomy composed of six aspects, orderedby their publication year: (i) approach (enumeration or analytic), (ii) type (a subgroup of theunderlying approach), (iii) k -restriction (does the method only work for certain subgraph sizes?),(iv) orbit awareness (does the method also count orbits?), (v) directed (is the method applicable todirected graphs?) and (vi) if code is publicly available . At the end of this section, we also presentsome related theoretical results that influenced some of the algorithms we discuss. Table 2. Overview of all major exact algorithms.
Year Approach Type k -restriction Orbit Directed Code Mfinder [121] 2002 Enum. Classical None ✗ ✓ [9]ESU [193, 196] 2005 Enum. Classical None ✗ ✓ [194]Itzhack [71] 2007 Enum. Classical ≤ ✗ ✓ ✗ Grochow [56] 2007 Enum. Single-subgraph None ✗ ✓ ✗
Kavosh [78] 2009 Enum. Classical None ✗ ✓ [122]Gtries [147, 149] 2010 Enum. Encapsulation None ✓ ✓ [144]Rage [102, 103] 2010 Analytic Decomposition ≤ ✗ ✓ [104]NeMo [85] 2011 Enum. Single-subgraph None ✗ ✓ [155]Netmode [92] 2012 Enum. Encapsulation ≤ ✗ ✓ [93]SCMD [185] 2012 Enum. Encapsulation None ✗ ✗ ✗ acc-Motif [110, 111] 2012 Analytic Decomposition ≤ ✗ ✓ [109]ISMAGS [40, 68] 2013 Enum. Single-subgraph None ✗ ✓ [133]Quatexelero [80] 2013 Enum. Encapsulation None ✗ ✓ [81]FaSE [130] 2013 Enum. Encapsulation None ✗ ✓ [145]ENSA [205] 2014 Enum. Encapsulation None ✗ ✓ ✗ Orca [62, 63] 2014 Analytic Matrix-based ≤ ✓ ✗ [64]Hash-ESU [75] 2015 Enum. Encapsulation None ✗ ✓ ✗ Song [176] 2015 Enum. Encapsulation None ✗ ✓ ✗
Ortmann [127, 128] 2016 Analytic Matrix-based ≤ ✓ ✓ ✗ PGD [3, 5] 2016 Analytic Decomposition ≤ ✓ ✗ [2]Patcomp [61] 2017 Enum. Encapsulation None ✗ ✓ ✗ Escape [136] 2017 Analytic Decomposition ≤ ✓ ✗ [168]Jesse [112, 114] 2017 Analytic Matrix-based None ✓ ✗ [113] Survey on Subgraph Counting 9
A significant part of the history of practical subgraph counting algorithms is intertwined with net-work motif analysis. This is because when motifs were first proposed [121], they raised the interestand necessity for efficient subgraph counting, which has since been growing and establishing itselfas a very important graph analysis primitive with multidisciplinary applicability.Exact subgraph counting consists of counting and categorizing (i.e., determining the isomorphicclass of) all subgraph occurrences. Early methods first enumerate all connected subgraphs with k -vertices and only afterwards categorize each subgraph found using a graph isomorphism tool likenauty [106]. We refer to these as classical methods .Many methods followed this strategy, until new methods appeared that counted the frequency ofa single-subgraph category instead, thus avoiding the categorization step necessary by the classicalmethods. This was done by only enumerating one particular subgraph of interest. Even though theywere not the fastest methods for a network-centric application, they were an important milestonetowards the methods that followed. We refer to these as single-subgraph-search methods .The next step was to combine the two previous ideas into a more efficient approach: merge theenumeration and categorization steps together. This was achieved in different ways, such as usingcommon topological features of subgraphs or pre-computing some information about subgraphs toavoid repeated computations of isomorphism. We refer to these as encapsulation methods .The next sections thoroughly delve into the most well-known methods of each category, givingan historical perspective on each, in an effort to understand each method’s breakthroughs anddrawbacks, and how subsequent algorithms built upon them to reduce (or mitigate) their limitations. In the seminal work,
Milo et al. [121] first defined the concept of networkmotif and also proposed MFinder, an algorithm to count subgraphs. MFinder is a recursivebacktracking algorithm, that is applied to each edge of the network. A given edge is initially storedon a set S , which is recursively grown using edges that are not in S but share one endpoint withat least one edge in S . When | S | = k , the algorithm checks if the subgraph induced by S has beenfound for the first time by keeping a hash table of subgraphs already found. If the subgraph wasreached for the first time, the algorithm categorizes it and updates the hash table (otherwise, thesubgraph is ignored).Another very important work, by Wernicke [193], proposed a new algorithm called ESU, alsoknown as FANMOD due to the graphical tool that uses ESU as its core algorithm [196]. Thisalgorithm greatly improved on MFinder by never counting the same subgraph twice, thus avoidingthe need to store all subgraphs in a hash table. ESU applies the same recursive method to eachvertex v of the input graph G : it uses two sets V S and V E , which initially are set as V S = { v } and V E = N ( v ) . Then, for each vertex u in V E , it removes it from V E and makes V S = V S ∪ { u } , effectivelyadding it to the subgraph being enumerated and V E = V E ∪ { u ∈ N exc ( u , V S ) : L ( u ) > L ( v )} (where v is the original vertex to be added to V S ). The N exc here makes sure we only grow thelist of possibilities with vertices not already in V S and the condition L ( u ) > L ( v ) is used to breaksymmetries, consequently preventing any subgraph from being found twice. This process is doneseveral times until V S has k elements, which means V S contains a single occurrence of a k -subgraph.At the end of the process, ESU performs isomorphism tests to assess the category of each subgraphoccurrence, which is a considerable bottleneck. Itzhack et al. [71] proposed a new algorithm that was able to count subgraphs using constantmemory (in relation to the size of the input graph). Itzhack et al. did not name their algorithm, sowe will refer to it as Itzhack from here on. Itzhack avoids explicitly computing the isomorphismclass of each counted subgraph by caching it for each different adjacency matrix, seen as a bitstring.This strategy only works for subgraphs of k up to 5, since it would use too much memory for higher values. Additionally, the enumeration algorithm is also different from ESU. This method is basedon counting all subgraphs that include a certain vertex, then removing that node from the networkand repeating the same procedure for the remaining nodes. For each vertex v , first the algorithmconsiders the tree composed of the k neighborhood of v , that is, a tree of all vertices at a distanceof k − v . This is very similar to the tree obtained from performing a breadth-firstsearch starting on v , with the difference that vertices that appear on previous levels of the treeare excluded if visited again. This tree can be traversed in a way that avoids actually creating itby following neighbors, and thus only using constant memory. To perform the actual search, themethod uses the concept of counting patterns , which are different combinatorial ways of choosingvertices from different levels of the tree. For instance, if we are searching for 3-subgraphs, andconsidering that at the tree root level we can only have one vertex, we could have the combinationswith pattern 1-2 (one vertex at root level 0, two vertices at level 1) or with pattern 1-1-1 (one vertexat root level 0, one at level 1 and one at level 2). In an analogous way, 4-subgraphs would lead topatterns 1-1-1-1, 1-1-2, 1-2-1 and 1-3. Itzhack et al. claimed that Itzhack is over 1,000 times fasterthan ESU, however the author of ESU disputed this claim in [195], stating that the experimentalsetup was faulty and claimed that Itzhack is only slightly faster than ESU (its speedup could beattributed mainly to the caching procedure). Kashani et al. [78] proposed a new algorithm called Kavosh. Like ESU and Itzhack, the coreidea of the Kavosh is to find all subgraphs that include a particular vertex, then remove thatvertex and continue from there iteratively. Its functioning is very similar to that of Itzhack: itbuilds an implicit breadth-first search tree and then uses a similar concept to the counting patternsused by Itzhack. However, it is a more general method since it does not perform any caching ofisomorphism information, allowing the enumeration of larger subgraphs.
The idea that it is possible to obtain a very efficient methodof counting a single subgraph category was first noticed by
Grochow and Kellis [56]. Their basemethod consists on a backtracking algorithm that is applied to each vertex. It tries to build a partialmapping from the input graph to the target subgraph (the subgraph it is trying to count) by buildingall possible assignments based on the number of neighbours. Grochow and Kellis also suggested animprovement based on symmetry breaking, using the automorphisms of the target subgraph tobuild set of conditions, of the form L ( a ) < L ( b ) , to prevent the same subgraph from being countedmultiple times. This symmetry breaking idea allowed for considerable improvements in runtime,specially for higher values of k . Grochow and Kellis did not name their algorithm, so we will referto it as the Grochow algorithm from here on. Koskas et al. [85] presented a new algorithm which they called NeMo. This method drawssome ideas from Grochow, since it performs a backtrack based search with symmetry breaking ina similar fashion. Although, instead of using conditions on vertex labels, it finds the orbits of thetarget subgraph and forces an ordering between the labels of the vertices from the input graph thatmatch vertices in the target subgraph with the same orbit. Additionally, it uses a few heuristicsto prune the search early, such as ordering the vertices from the target graph such that for all1 ≤ i ≤ k , its first i vertices are connected.ISMAGS, which is based on its predecessor ISMA [40], was proposed by Houbraken et al. [68].The base idea of this method is similar to the one in Grochow, however, the authors use a clevernode ordering and other heuristics to speedup the partial mapping procedure. Additionally, theirsymmetry breaking conditions are significantly improved by applying several heuristic techniquesbased on group theory.
The ideas applied to Grochow introduced a way of escaping theclassic setup of enumerating and then categorizing subgraphs, albeit focusing on a single subgraph.
Survey on Subgraph Counting 11
The next step would be to extend this idea to a more general algorithm, which is appropriate to afull subgraph counting. This was first done by
Ribeiro and Silva [147] using a new data-structurethey called the g-trie , for graph trie . The g-trie is a prefix tree for graphs, each node represents adifferent graph, where the graph of a parent node has shared common substructures with the graphof its child node, which are characterized precisely by the vertices of the graph of the child node.The root represents the one vertex graph with one child, a node representing the edge graph, whichin turn has two children representing the triangle graph and the 3-path, and so on. This tree can beaugmented by giving each node symmetry breaking conditions similar to those from Grochow. Theauthors show how to efficiently build this data-structure and augment with the symmetry breakingconditions for any set of graphs. Also, they describe a subgraph counting algorithm based on usingthis data-structure along with an enumeration technique similar to that of Grochow. However,since this data-structure encapsulates the information of multiple graphs in an hierarchical order, itachieves a much faster full subgraph counting algorithm. The usage of this data-structure has beensignificantly extended since its original publication, such as a version for colored networks [148]or an orbit aware version [13]. A more detailed discussion of the data-structure and the subgraphcounting algorithm is presented in [149]. Also, even though the subgraph counting algorithm wasnot named, we will refer to it as the Gtrie algorithm from here on.Gtrie encapsulates common topological information of the subgraphs being counted, but thereare other approaches, such as
Li et al. [92], who developed Netmode. It builds on Kavosh, byusing its enumeration algorithm, but instead of using nauty to perform the categorization step, itmakes use of a cache to store isomorphism information and thus is able to perform it in constanttime. This is very similar to what Itzhack does, however, Li et al. suggested an improvement thatallows Netmode to scale to k = reconstruction conjecture [60], that states that two graphs with 3 or more vertices are isomorphicif their deck (the set of isomorphism classes of all vertex-deleted subgraphs of a graph) is the same.This is known to be false for directed graphs with k =
6, but there are very few counter-examplesthat can be directly stored such as in the k ≤ Wang et al. [185] proposed a new method called SCMD that counts subgraphs in compressednetworks. SCMD applies a symmetry compression method that finds sets of vertices that are in anhomeomorphism to cliques or empty subgraphs, which have the additional property that any othervertex that connects to a vertex in the set is connected to all other vertices in the set. These sets ofvertices form a partition of the graph that is obtained using a method published in [98], which isbased on looking at vertices in the same orbit. This is a versatile method that can use algorithmslike ESU or Kavosh to enumerate all subgraphs of sizes from 1 to k in the compressed network.Finally, SCMD “decompresses” the results by looking at all the different enumerated subgraphs andcalculating all the combinations that can form a decompressed subgraph. For example, for k =
3, ifa compressed 2-subgraph is found containing two vertices: one compressed vertex representing aclique of 5 uncompressed vertices and a compressed vertex representing a single vertex from theuncompressed graph, it results in (cid:0) (cid:1) + (cid:0) (cid:1) triangles from the uncompressed graph, obtained bytaking two vertices from the clique vertex and one from the other vertex, which are all connectedand thus form a triangle, (cid:0) (cid:1) , plus taking three vertices from the clique vertex (cid:0) (cid:1) . The authors arguethat most complex networks exhibit high symmetries and thus are improved by the application ofthis technique. Even though their work only includes undirected graphs, the authors affirm it iseasy to extend the same concepts to directed networks. Xu et al. described another algorithm thatenumerates subgraphs on compressed networks, called ENSA [201, 205]. Their method is based on an heuristic graph isomorphism algorithm, and they also discuss an optimization based onidentifying vertices with unique degrees.Following the ideas first applied in Gtrie,
Khakabimamaghani et al. [80] proposed a newalgorithm they called Quatexelero. Quatexelero is built upon any incremental enumerationalgorithm, like ESU, and it implements a data structure similar to a quaternary tree. Each nodein the tree represents a graph, that can be built by looking into the nodes from the path from itto the root of the tree. Additionally, all graphs represented by a single node belong to the sameisomorphism class. To fill the tree, initially a pointer to the root of the tree is set. Whenever anew vertex is added to the partial enumeration map, Quatexelero looks into the existing edgesbetween the newly added node and the previously existing nodes in the mapping and stores itsinformation in the quaternary tree. For each vertex in the mapping, depending on whether there isno edge, an inedge, an outedge or a biedge between it and the newly added vertex, the pointer isassigned to one of its four children, creating it if it was nonexistent.Parallel to the publishing of the work of Quatexelero,
Paredes and Ribeiro [130] proposedFaSE. The idea of FaSE is similar to the one from Quatexelero, however, instead of using aquaternary tree, it uses a data-structure similar to the g-trie, albeit without the symmetry breakingcondition augmentation. This data-structure has the same property as the quaternary tree thatevery node represents a graph and each node is built using the adjacency information of a newlyadded vertex in relation to the vertices present in its parent.Other works that extend these ideas have been proposed subsequently. For example,
Jing andCheng [75] propose Hash-ESU, an algorithm based on the same idea from Quatexelero and FaSE,but which hashes the adjacency information instead of storing it in a tree. Another example is thework by
Song et al. [176]. They describe a method that starts by enumerating all k = Himamshu and Jain [61] proposed Patcomp. Their methodcompresses the quaternary tree using a technique similar to a radix tree, however, their method is2 to 3 times slower and only saves around 10% of the memory usage.
Since the overall goal of the problem we are aiming to solve is to count subgraphs, it is not necessaryto explicitly enumerate each connected set of size k . Here lies the difference between counting and enumerating or listing . It was with this in mind that a new class of methods emerged striving toavoid enumerating all subgraphs in a graph. We can point two main approaches to this type ofcounting.The first one tries to relate the frequency of each subgraph with the frequencies of othersubgraphs of the same or smaller size. This permits constructing a matrix of linear equationsbetween subgraphs frequencies that can be solved using traditional linear algebra methods. Werefer to these as matrix based methods .The second approach targets each subgraph individually by decomposing it in several smallerpatterns of graph properties, like common neighbors, or triangles that touch two vertices. We referto these as decomposition methods . The first known method to apply a practical analytic approach basedon matrix multiplication to subgraph counting was ORCA, a work by
Hočevar and Demšar [62],which is based on counting orbits and not directly subgraphs. Their original work was targeted at
Survey on Subgraph Counting 13 orbits in subgraphs up to 5 vertices and, because of that, they count induced subgraphs specifically,while most analytic approaches count non-induced occurrences. ORCA works by setting up asystem of linear equations per vertex of the input graph that relate different orbit frequencies,which are the system’s variables. This system of linear equations contains information about theinput graph. By construction, the matrix has a rank equal to the number of orbits minus 1, thus tosolve it one only need to find the value of one the orbit frequencies and use any standard linearalgebra method to solve it. Usually, the orbit pertaining to the clique is chosen, since there areefficient algorithms to count this orbit and, for sparse enough networks, it is usually the one withthe least occurrences, making it less expensive to count.Later, the authors of ORCA extended their work by suggesting a way of producing equations forarbitrary sized subgraphs [63], although their available practical implementation is still limited tosize 5 [64]. Another possible extension for ORCA was proposed by [112] with the Jesse algorithm,which was further complemented with a strategy for optimizing the computation by carefullyselecting less expensive equations [114].Similar to ORCA, but using a different strategy,
Ortmann and Brandes [127] proposed a newmethod, which they further improved and better described in [128]. They also target orbits, but forsubgraphs of size up to 4. Their approach is based on looking into non-induced subgraphs usingthem to build linear equations that are less expensive to compute. Additionally, they also apply animproved clique counting algorithm.
Ortmann and Brandes [127] did not name their algorithm,so we will refer to it as the Ortmann algorithm from here on.
Before ORCA was proposed, the first ever practical method thatused an analytic approach to subgraph counting was Rage, by
Marcus and Shavitt [102, 103].Their method is based on [55] which employs similar techniques but with a more theoreticalfocus. Rage targets non-induced subgraphs and orbits of size 3 and 4. It does so by running adifferent algorithm for each of the 8 existing subgraphs. Each algorithm is based on merging theneighborhoods of pairs of vertices to ensure that a given quartet of vertices have the desired edgesto form a certain subgraph.acc-Motif, which was proposed by
Meira et al. [110] and then further improved in [111], wasalso one of the first methods to employ an analytic strategy, but stands out as the only knownanalytic method that also works for directed subgraphs. acc-Motif also targets non-inducedsubgraphs and their latest version supports up to size 6 subgraphs.Another method that followed this trend of decomposition methods is PGD, proposed by
Ahmedet al. [3, 4]. This method builds on the classic triangle counting algorithm to count several primitivesthat are then used to obtain the frequency of each subgraph and orbit. It is currently one of thefastest methods, however it can only count undirected subgraphs of size 3 and 4. Additionally, asmost analytic methods, it is highly parallelizible. Due to its versatile nature, PGD has been expandedto other frequency metrics and it stands out as one of the only available efficient methods that cancount motifs incident to a vertex or edge of the graph [5], in what is called a “local subgraph count”.More recently, ESCAPE was proposed by
Pinar et al. [136]. This method is based on a divideand conquer approach that identifies substructures of each counting subgraph to partition theminto smaller patterns. It is a very general method, but with the correct choices for decomposition, itis possible to describe a set of formulas to compute the frequency of each subgraph. The originalpaper only describes the resulting formulas to subgraphs up to size 5, however larger sizes can beobtained with some effort. As of this writing, it is possibly the most efficient algorithm to countundirected subgraphs and orbits up to size 5.
Even though the focus of this work is to look at the proposed practical algorithms, it is importantto note that some of the existing work drew inspiration from numerous more theoretical-orientedworks. Thus, it is of relevance to briefly summarize some of the achievements in this area and wewill do so with a special interest in those that directly influenced some of the algorithms discussedin this section.The first interest in subgraph counting stemmed from the world of enumeration algorithms.The book “Enumeration in Graphs” [18] surveyed several methods to enumerate several differentstructures in a graph, such as cycles, trees or cliques. Even though these are specific subpatterns,they often represent the fundamental computation that needs to be done in order to enumerate anysubgraph. These ideas were translated into works that count subgraphs by efficiently enumeratingsimpler substructures like these [71, 83]. Approximation schemes can also be developed with thisin mind, which approximates the frequency of several subgraph families like cycles or paths andthen generalize these for all size 4 subgraphs [55].Another example of an initially purely theoretical technique is the work by
Kowaluk et al. [86],which was one of the inspirations for the multitude of matrix based analytic algorithms for countingsubgraphs. In fact, the most efficient algorithms are based on several theoretical foundations thatallow a tighter analysis of runtime. Due to this interplay, it is worth mentioned a few more recentpapers on subgraph counting and enumerating. There is an interest in finding efficient algorithmsthat are parameterized or sensitive to certain properties of the graph, such as independent sets [197]or its maximum degree [20]. Another current interest is in counting and enumerating subgraphs ina dynamic or online environment [94]. Finally, another active theoretical topic is to find optimalalgorithms for enumeration, as in [50], as well as proving lower bounds on their time complexity,as
Björklund et al. [21] does for triangle listing.
Despite the significant advances made towards faster subgraph counting algorithms, currentstate of the art algorithms that determine exact frequencies still take hours, if not days, for verylarge networks. With the ever increasing amount of data our society generates (e.g., in big socialnetworks such as Twitter and Facebook new members/nodes join every second), it is unfeasible tocount all possible subgraphs. To solve this problem, subgraph counting research drifted towardsapproximating these frequencies, making a trade-off between losing accuracy but gaining time.Additionally, in some applications, approximate subgraphs counts might be sufficient [79, 146].Throughout this section we make a distinction between algorithms that estimate (i) subgraphfrequencies or (ii) subgraph concentrations. Estimating subgraph frequencies is harder since thealgorithm needs to know the magnitude of the values, whereas to estimate concentrations thealgorithm only needs to know the different proportions of each subgraph in the network. Obtain-ing subgraph concentrations from subgraph frequencies is trivial but the reverse requires extracomputational tasks.We further split the approximate counting algorithms in five broad categories: randomisedenumeration , enumerate-generalize , path sampling , random walk , and colour coding . Ineach subsection, we provide an algorithmic overview of each strategy and delve into the individualalgorithms that implement it and how they differ between themselves.Tables 3 and 4 summarize the algorithms we discuss in the section. We split the methods intoalgorithms where the full topology is assumed (Table 3) and algorithms tailored to networks withrestricted access (Table 4). Although some algorithms from each category may work in the othersetting, they excel for the task they were designed for and the distinction should be made clear. The Survey on Subgraph Counting 15 tables summarize our proposed taxonomy composed of five aspects, ordered by their publicationyear: (i) the type of output (frequencies or concentrations), (ii) k -restrictions (does the methodonly work for certain subgraph sizes?), (iii) directed (is the method applicable to directed graphs?),(iv) the strategy it employs, according to our taxonomy, and (v) if code is publicly available . Notethat some authors do not have executable versions publicly available, but will be happy to sharethem through email. We mark these algorithms with a ✓ in the code column of the table. Table 3. Algorithms for approximate subgraph counting.
Year Output k -restriction Directed Strategy Code ESA [79] 2004 Conc. None ✓ Random Walk [9]RAND-ESU [193] 2005 Freq. None ✓ Rand. Enum. [194]TNP [139] 2006 Conc. 5 ✗ Enum. - Generalize ✗ RAND-GTrie [146] 2010 Freq. None ✓ Rand. Enum. [144]GUISE [19] 2012 Conc. 5 ✗ Random Walk [141]RAND-SCMD [185] 2012 Freq. None ✓ Enum. - Generalize ✗ Wedge Sampling [169] 2013 Freq. 3 ✓ Path Sampling [84]GRAFT [142] 2014 Freq. 5 ✗ Enum. - Generalize [140]PSRW & MSS [187] 2014 Conc. None ✗ Random Walk ✗ MHRW [159] 2015 Conc. None ✗ Random Walk ✓ RAND-FaSE [131] 2015 Freq. None ✓ Rand. Enum. [132]Path Sampling [73] 2015 Freq. 4 ✗ Path Sampling ✗ k -profile sparsifier [45, 46] 2016 Freq. 4 ✗ Enum. - Generalize [44]MOSS [189] 2018 Freq. 5 ✗ Path Sampling [186]SSRW [203] 2018 Freq. 7 ✗ Random Walk ✗ CC [25] 2018 Freq. None ✗ Color Coding [24]
Table 4. Algorithms for approximate subgraph counting with restricted access.
Year Output k -restriction Directed Strategy Code WRW [59] 2016 Conc. None ✗ Random Walk ✗ IMPR [31] 2016 Freq. 5 ✗ Random Walk [29]CSS & NB-SRW [30] 2016 Conc. None ✗ Random Walk ✓ Minfer [188] 2017 Conc. 5 ✓ Enumerate - Generalize ✗ These algorithms are adaptations of older enumeration algorithms that perform exact counting.They have the particularity that they all induce a tree-like search space in the computation, wherethe leaves are the subgraph occurrences, and thus perform the approximation in a similar manner.Each level of the search tree is assigned a value, p i , which denotes the probability of transitioningfrom parent node to the child node in the tree. In this scheme, each leaf in this tree is reachablewith probability P = (cid:206) ki = p i and the frequency of each subgraph is estimated using the number ofsamples obtained of that subgraph divided by P . Figure 5 illustrates how probabilities are added to the search tree. In this specific example, whichcould be equivalent to searching subgraphs of size 4, the first two levels of the tree have probability100%, so their successors are all explored. On the other hand, in the last two levels, the probabilityof exploring a node in the tree is only 80%, therefore some nodes, marked as grey, are not visited.
Fig. 5. Example of a tree-like search space induced by a Randomised Enumeration algorithm and a possibledistribution of transition probabilities per tree level.
The first algorithm to implement this strategy was RAND-ESU by
Wernicke [193], an approxi-mate version of ESU (described in Section 3.1.1). Recall that ESU maintains two sets V S and V E , theset of vertices in the subgraph and the set of candidate vertices for extending the subgraph. Whenadding a vertex from V E to V S , this vertex is added with probability p | V S | , where | V S | is the depth ofthe search tree.Using the more efficient g-trie data structure, Ribeiro and Silva [146] proposed RAND-GTrieand
Paredes and Ribeiro [131] proposed RAND-FaSE. Each level of the g-trie is assigned aprobability, p i . When adding a new vertex to a subgraph of size d , corresponding to depth d in the g-trie , this is done with probability p d . The general idea of these algorithms is to perform an exact count on a smaller network that wasobtained from the original one (e.g., a sample, or a compressed network). From the frequenciesof each subgraph in the smaller network, the frequencies in the original network are estimated.Algorithms vary on (i) how the smaller network is obtained and on (ii) which estimator they use.The first example of an algorithm in this category is Targeted Node Processing (TNP) by
Pržuljet al. [139]. This algorithm is specially tailored for protein-protein interaction ,that, according tothe authors, have a periphery that is sparser than the more central parts of the network. Using thisinformation, it performs an exact count of the subgraphs in the periphery of the network and usestheir frequencies to estimate the frequencies in the rest of the network. The authors claim that, dueto the uniformity of the aforementioned networks, the distribution of the subgraphs in the fringe isrepresentative of the distribution in the rest of the network.SCMD by
Wang et al. [185] (already covered in Section 3.1.3) allows the use of any approximatecounting method in the compressed graph. There is no guarantee that subgraphs are counteduniformly in the compressed graph, introducing a bias that needs to be corrected. The authors givethe example of this bias when using their method in conjunction with RAND-ESU. If each leaf(subgraph) of depth k in the search tree is reached with probability P and a specific subgraph in thecompressed graph is sampled with probability ρ , then, to correct the sampling bias, the probabilityof decompressing the relevant k -subgraph is P / ρ .In GRAFT, Rahman et al. [142] provide a strategy for counting undirected graphlets of sizeup to 5, using edge sampling. The algorithm starts by picking an edge e д from each of the 29graphlets and a set of edges sampled from the graph S , without replacement. For each edge e ∈ S and for each graphlet д , the frequency of д is calculated such that e has the same position in д as e д ( e is said to be aligned with e д ). These frequencies are summed for all edges and divided by a Survey on Subgraph Counting 17 normalising factor, based on the automorphisms of each graphlet, which becomes the estimation forthe frequency of that graphlet in the whole network. Note that if S is equal to E ( G ) , the algorithmoutputs an exact answer. Elenberg et al. create estimators for the frequency of size 3 [45] and 4 [46] subgraphs. A majordifference from this work to previous ones is that
Elenberg et al. estimate the frequencies ofsubgraphs that are not connected, besides the usual connected ones. The authors start by removingeach edge from the network with a certain probability and computing the exact counts in this“sub-sampled” network. Then, they craft a set of linear equations that relate the exact counts onthis smaller network to the ones of the original network. Using these equations, the estimation ofthe frequency of the subgraphs in the original network follows.
Wang et al. [188] introduce an algorithm that aims to estimate the subgraph concentrationsof a network when only a fraction of its edges are known. They call this a “RESampled Graph”,obtained from the real network through random edge sampling, a common scenario on applicationssuch as network traffic analysis. A key aspect of this algorithm is the number of non- inducedsubgraphs of a size k graphlet that are isomorphic to another size k graphlet, an example of thiscalculation can be found in Table 5. Using this number and the proportion of edges sampled toform the smaller network, the authors compute the probability that a subgraph in the “RESampledGraph” is isomorphic to another subgraph in the original graph. Then, an exact counting algorithmis applied to the “RESampled Graph” and by composing the results from this algorithm with theaforementioned probability, the subgraph concentrations in the original network are estimated. This family of algorithms relies on the idea of sampling path subgraphs to estimate the frequenciesof the other subgraphs. Path subgraphs are composed by 2 exterior nodes and k − k is the size of the subgraph) arranged in a single line; the interior nodes all have degreeof 2, while the exterior nodes have degree of 1. Examples of these are the subgraphs G , G and G in Figure 6. The main idea for these algorithms, mainly for k ≥
4, is relating the number ofnon-induced occurrences of each subgraph of size k in the other size k subgraph. For example,when k =
4, there are 4 non-induced occurrences of G in G or 12 non-induced occurrences of G in G . Table 5 shows this full relationship when k = G G G G G G G G G G G G G G G G G G G G G G G G G G G G G Fig. 6. The 29 isomorphic classes of undirected subgraphs between size 3 and 5.
Seshadhri et al. [169] introduced the idea of wedge sampling , where wedges denote size 3 pathsubgraphs. The premise of the algorithm is simple, they select a number of wedges uniformly at д д д д д д д д д д д д Table 5. Number of non-induced occurences of each undirected graph of size 4 in each other. Position ( i , j ) inthe table indicates the number of times that graph i occurs non-induced in graph j . random and check whether they are closed or not. The fraction of closed wedges sampled is anestimation from for the clustering coefficient, from which the number of triangles can be derived.Building on the idea of wedge sampling , Jha et al. [73] propose path sampling to estimatethe frequency of size 4 graphlets. The main primitive of the algorithm is sampling non-inducedoccurrences of G and determining which graphlet is induced by that sample. The estimator relieson both the number of induced subgraphs counted via the sampling and information containedin Table 5. Finally, the authors determine an equation to count the number of stars with 4 nodes( G ) based on the frequencies of each other graphlet, since G does not have any non-inducedoccurrence of G .Applying the same concepts to size 5 subgraphs, Wang et al. [189] present MOSS-5. For size 5,sampling paths is not enough to estimate the frequencies of all different subgraphs, as there are 3subgraphs that do not have a non-induced occurrence of a path: G , G and G . On the otherhand, G does not have a non-induced occurrence in 3 subgraphs as well ( G , G and G ). Usingthis knowledge, the authors create an algorithm divided in two parts: first it samples non-inducedsize 5 paths ( G ), similarly to Jha et al. [73], and then they repeat the procedure but samplingoccurrences of G instead. Combining the results from these two sampling schemes, the authorsare able to estimate the frequency of every size 5 subgraph.To the best of our knowledge, MOSS-5 is the algorithm that achieves the best trade-off of accuracyand time to estimate the frequency of 5-subgraphs, as it is able to reach very small errors (magnitude10 − ) with a very limited number of samples, even for big networks. However the ideas behindMOSS-5 are not easily extendable to directed subgraphs and larger sized undirected subgraphs dueto the ever increasing number of dependencies between the number of non-induced occurrences,making it harder to use the information contained in a table similar to Table 5 for these cases. A random walk in a graph G is a sequence of nodes, R , of the form R = ( n , n , . . . ) , where n is the seed node and n i the i th node visited in the walk. A random walk can also be seen as aMarkov chain. We identify two main approaches to sample subgraphs using random walks. Thefirst is incrementing the size of the walk until a sequence of k distinct nodes is drawn, forming a k -subgraph, which is then identified by an isomorphism test. The second approach is consideringa graph of relationships between subgraphs, where two subgraphs are connected if one can beobtained from the other by adding or removing a node or by adding or removing an edge. A randomwalk is then performed on this graph instead of on the original one. Kashtan et al. [79], in their seminal work commonly called ESA (Edge Sampling), implementedone of the first subgraph sampling methods in the MFinder software. The authors propose to do arandom walk on the graph, sampling one edge at a time until a set of k nodes is found, from which Survey on Subgraph Counting 19 the subgraph induced by that set of nodes is discovered. This method resulted in a biased estimator.To correct the bias, the authors propose to re-weight the sample, which takes exponential time inthe size of the subgraphs.
Bhuiyan et al. [19] develop GUISE that computes the graphlet degree distribution for subgraphsof size 3, 4 and 5 in undirected networks. The algorithm is based on Monte Carlo Markov Chain(MCMC) sampling. It works by sampling a seed graphlet, calculating its neighbourhood (a set ofother graphlets), picking one randomly and calculating an acceptance probability to transition tothis new graphlet. This process is then repeated until a predefined number of samples is takenfrom the graph. The neighbourhood of a graphlet is similar to the graph of relationships previouslymentioned, but to obtain a k -graphlet from another k -graphlet, a node from the original one isremoved and, if the remaining k − k -graphlet.A similar approach to GUISE is used by Saha and Al Hasan [159], where MCMC sampling isalso used to compute subgraph concentration. A difference to GUISE is that the size of graphlets istheoretically unbound and only a specific size k is counted, whereas GUISE counts graphlets of size3, 4 and 5 simultaneously. They also suggest a modified version where the acceptance probabilityis always one (that is, there is always a transition to the new subgraph), which introduces a biastowards graphlets with nodes with a high degree. In turn, they propose an estimator that re-weightsthe concentration to remove this bias. Wang et al. [187] propose a random walk based method to estimate subgraph concentrationsthat aims to improve on the approach taken by GUISE. The main improvement over GUISE is thatno samples are rejected, avoiding a cost of sampling without any gain of information. The authorsuse a graph of relationships between connected induced subgraphs, where two k -subgraphs areconnected if they share k − Pairwise Subgraph Random Walk (PSRW), estimates size k subgraphby looking at the graph of relationships composed by k − Mixed Subgraph Sampling (MSS), estimates subgraphs of size k − k and k + Han and Sethu [59] present an algorithm to estimate subgraph concentration based on randomwalks. Their algorithm,
Waddling Random Walk (WRW), gets its name from how the random walkis performed, allowing sampling of nodes not only on the path of the walk, but also query randomnodes in the neighbourhood. Let l be the number of vertices (with repetition) in the shortest pathof a particular k -graphlet. The goal of the waddling is to reduce the number of steps the walk hasto take to identify graphlets with l > k . While executing a random walk to identify a k -subgraph,the waddling approach limits the number of nodes explored to the size of the subgraph, k . Chen and Lui [31] propose a random walk based algorithm to estimate graphlet counts in onlinesocial networks, which are often restricted and the entire topology is hidden behind a prohibitivequery cost. With this context in mind, the authors introduced the concepts of touched and visible subgraphs. The former are subgraphs composed of vertices whose neighbourhood is accessible.The latter possess one and only one vertex with inaccessible neighbourhood. Their method, IMPR,works by generating k − touched subgraphs via random walk and combining them withtheir node’s neighbourhood for obtain k -node visible subgraphs, which form the k -node samples. Chen et al. [30] introduce a new framework that incorporates PSRW as a special case. To sample k -subgraphs, the authors also use a graph of relationships between connected induced d -subgraphs, d ∈ { , .., k − } , and perform a random walk over this graph. The difference to PSRW is that
PSRW only uses d as k −
1, which becomes ineffective as k grows to larger sizes. The authors also augmentthis method of sampling with a different re-weight coefficient to improve estimation accuracy and add non-backtracking random walks, which eliminates invalid states in the Markov Chain that donot contribute to the estimation. Yang et al. [203] introduce another algorithm using random walks,
Scalable subgraph Samplingvia Random Walk (SSRW), able to compute both frequencies and concentrations of undirectedsubgraphs of size up to 7. The next nodes in the random walk are picked from the concatenationof the neighbourhoods of all nodes previously selected to be a part of the sampled subgraph. Theauthors present an unbiased estimator and compare it against
Chen et al. [30] and
Han andSethu [59], getting better results than both for the single network tested.
The technique of colour coding [8] has been adapted to the problem of approximating subgraphfrequencies by
Zhao et al. [206],
Zhao et al. [207] and
Slota and Madduri [174]. However, allthese works focus on specific categories of subgraphs, for example, SAHad [207] attempts to onlyfind subgraphs that are in the form of a tree.More recently,
Bressan et al. [25] present a general algorithm using colour coding, that worksfor any undirected subgraph of size theoretically unbound. The algorithm works in two phases.The first, based on the original description of [8], is counting the number of non-induced trees, treelets , in the graph but with a particularity, the nodes were previously partitioned into k sets andattributed a label (a colour ). These treelets then must be constituted solely of nodes with differentcolours. This part of the algorithm outputs counters C ( T , S , v ) , for every v ∈ V ( G ) , which are thenumber of treelets rooted in v isomorphic to T , whose colours span the colour set S .The second phase of the algorithm is the sampling part, which is focused on sampling treeletsuniformly at random. To pick a treelet with k nodes, the authors choose a random node v , a treelet T with probability proportional to C ( T , [ k ] , v ) and then pick one of the treelets that is rooted in v ,is isomorphic to T and is coloured by [ k ] . Given a treelet T k , the authors consider the graphlet G k induced by the nodes of T k and increment its frequency by σ ( G k ) , where σ ( G k ) is the number ofspanning trees of G k . By this point it should be clear that subgraph counting is a computationally hard problem. Asdiscussed in Section 3, analytic approaches are much more efficient than enumeration algorithms;however, they are specific to certain sets of small subgraphs. Sampling strategies can produce resultsin a fraction of the time; but there’s a trade-off between time and accuracy. Therefore, speedingup subgraph counting remains a crucial task. The availability of parallel environments, such asmulticores, hybrid clusters, and GPUs gave rise to strategies that leverage on these resources.Here we follow a different organizational approach than Sections 3 and 4: we first give an historicoverview of the parallel algorithms put forward throughout the years and then we discuss thestrategies on a higher level. This is done because most parallel algorithms have a sequentialcounterpart (already described in previous sections) and many common aspects can be foundbetween the parallel strategies. Table 6 summarizes our proposed taxonomy composed of sevenaspects, ordered by their publication year: (i) their computational platform , (ii) the initial work-units (what part of the graph is divided initially), (iii) the runtime work-units (what part of thegraph is divided during runtime), (iv) the search traversal strategy (how the graph is explored), (v)the work division strategy (how work-units are distributed), (vi) how work sharing is performed(if applicable) between workers (e.g., CPU processors, or CPU/GPU threads), and (vii) if code is publicly available . Survey on Subgraph Counting 21
Table 6. Parallel algorithms for subgraph counting.
Year Platform Work-units Search Work Work PublicInitial Runtime Traversal Division Sharing Code
ParWang [190] 2005 DM Vertices ✗ DFS Static ✗ ✗
DM-Grochow [164] 2008 DM Isoclasses Isoclasses DFS First-Fit ✗ ✗
MPRF [96] 2009 MapReduce Edges Subgraphs BFS Static ✗ ✗
DM-ESU [154] 2010 DM Vertices Subgraph-trees DFS Diagonal M-W ✗ DM-Gtries [151] 2010 DM Vertices Subgraph-trees DFS Diagonal W-W ✗ SM-Gtries [12] 2014 SM Vertices Subgraph-trees DFS Diagonal W-W [145]SM-FaSE [10] 2014 SM Vertices Subgraph-trees DFS Diagonal W-W [145]Subenum [172] 2015 SM Edges Subgraphs DFS First-Fit ✗ [170]GPU-Orca [119] 2015 GPU Vertices Subgraphs BFS Static ✗ ✗ Lin [95] 2015 GPU Vertices Subgraphs BFS Static ✗ ✗
MRSUB [171] 2015 MapReduce Edges Subgraphs BFS Static ✗ ✗
PGD [3] 2015 SM Edges ✗ DFS Static ✗ [2]GPU-PGD [157] 2016 CPU+GPU Edges Subgraph-trees BFS First-Fit W-W ✗ Elenberg [46] 2016 DM Vertices Subgraphs DFS First-Fit ✗ [44]MR-Gtries [124] 2017 MapReduce Vertices Subgraph-trees DFS Timed M-W ✗ One key aspect necessary to achieve a scalable parallel computation is finding a balanced workdivision (i.e., splitting work-units evenly between workers – parallel processors/threads). A naivepossibility for subgraph counting is to assign | V ( G )|| P | nodes from network G to each worker p ∈ P .This egalitarian division is a poor choice since two nodes induce very different search spaces;for instance, hub -like nodes induce many more subgraph occurrences than nearly-isolated nodes.Instead of performing an egalitarian division, Wang et al. [190] discriminate nodes by their degreeand distribute them among workers, the idea being that each worker gets roughly the same amountof hard and easy work-units. Despite achieving a more balanced division than the naive version,there is still no guarantee that the node-degree is sufficient to determine the actual complexityof the work-unit. Distributing work immediately (without runtime adjustments) is called a staticdivision . Wang et al. did not assess scalability in [190], but they showed that their parallel algorithmwas faster than Mfinder [121] in an E. Coli transcriptional regulation network. Since their methodwas not named, we refer to it as ParWang henceforth.The first parallel strategy with a single-subgraph-search algorithm at its core, namely Gro-chow [56], was by
Schatz et al. [164]. Since the algorithm was not named, and it targets a distributed memory (DM) architecture (i.e., parallel cluster), we refer to it as DM-Grochow. Inorder to distribute query subgraphs (also called isoclasses ) among workers they employed twostrategies: naive and first-fit . The naive strategy is similar to ParWang’s. In the first-fit model,each slave processor requests a subgraph type (or isoclass ) from the master and enumerates alloccurrences of that type (e.g., cliques, stars, chains). This division is dynamic , as opposed to static,but it is not balanced since different isoclasses induce very different search trees. For instance, insparse networks k -cliques are faster to compute than k -chains. Using 64 cores, Schatz et al. obtained ≈ All parallel algorithms mentioned so far traverse occurrences in a depth-first (DFS) fashion,since doing so avoids having to store intermediate states. By contrast,
Liu et al. [96] use a breadth-first search (BFS) where, at each step, all subgraph occurrences found in the previous one areexpanded by one node. Their algorithm, MPRF, is implemented following a
MapReduce model [39]which is intrinsically a BFS-like framework. In MPRF, mappers extend size k occurrences to size k + ≈ x on a 48-node cluster, when compared to the execution on a single-processor.DFS-based algorithms discussed so far either perform a complete work-division right at thebeginning (ParWang), or they perform a partial work-division at the beginning and then workersrequest work when idle (DM-Grochow). In both cases, a worker has to finish a work-unit beforeproceeding a new one. Therefore, it is possible that a worker gets stuck processing a very computa-tionally heavy work-unit while all the others are idle. This has to do with work-unit granularity:work-units at the top of the DFS search space have high (coarse) granularity since the algorithm hasto explore a large search space. BFS-based algorithms mitigate this problem because work-units aremuch more fine grained (usually a worker only extends his work-unit(s) by one node). The work by Ribeiro et al. [154] was the first to implement work sharing during parallel subgraph counting,alleviating the problem of coarse work-unit granularity of DFS-based subgraph counting algorithms.Workers have a splitting threshold that dictates how likely it is to, instead of fully processing awork-unit, putting part of it in a global work queue. A work-unit is divided using diagonal worksplitting which gathers unprocessed nodes at level k (i.e., nodes that are reached by expanding thecurrent work-unit) and recursively goes up in the search tree, also gathering unprocessed nodes oflevel k − i , i < k , until reaching level 1. This process results in a set of finer-grained work-unitsthat induces a more balanced search space than static and first-fit divisions. In [154] Ribeiro et al.use ESU as their core enumeration algorithm and propose a master-worker (M-W) architecturewhere a master-node manages a work-queue and distributes its work-units among slave workers.This strategy, DM-ESU, was the first to achieve near-linear speedups ( ≈ worker-worker (W-W) architecture where workers perform work stealing.DM-Gtries improves upon DM-ESU by using a faster enumeration algorithm (GTries) and havingall workers perform subgraph enumeration (without wasting a node in work queue management).Similar implementations (based on W-W sharing and diagonal splitting) of GTries and FASE werealso developed for shared memory (SM) environments , which achieved near-linear speedupsin a 64-core machine [10, 12]. The main advantages of SM implementations is that work sharingis faster (since no message passing is necessary) and SM architectures (such as multicores) are acommodity while DM architectures (such as a cluster) are not.Instead of developing efficient work sharing strategies, Shahrivari and Jalili [172] try to avoidthe unbalanced computation induced by vertice-based work-unit division. Subenum is an adaptationof ESU which uses edges as starting work-units, achieving near-linear speedup ( ≈
10x on a 12-coremachine). Using edges as starting work-units is also more suitable for the MapReduce modelsince edges are finer-grained work-units than vertices. In a follow-up work [171], Shahrivari andJalili propose a MapReduce algorithm, MRSUB, which greatly improves upon [96], reporting aspeedup of ≈
34x on a 40-core machine. Like Subenum, MRSUB does not support work sharingbetween workers. A MapReduce algorithm with work sharing was put forward by
Naser-eddinand Ribeiro [124], henceforth called MR-Gtries. Using work sharing with timed redistribution
Survey on Subgraph Counting 23 (i.e., after a certain time, every worker stops and work is fully redistributed), they report a speedupof ≈
26x on a 32-core machine. While MRSUB and MR-GTries efficiency is comparable ( ≈ GPUs ) are processors specialized in image generation, but numerousgeneral purpose tasks have been adapted to them [49, 67, 115]. GPUs are appealing due to theirlarge number of cores, reaching hundreds or thousands of parallel threads whereas commoditymulticores typically have no more than a dozen. However, algorithms that rely on graph traversalare not best suited for the GPU framework due to branching code, non-coalesced memory accessesand coarse work-unit granularity [115].
Milinković et al. [119] were one of the firsts to follow aGPU approach (GPU-Orca), with limited success.
Lin et al. [95] put forward a GPU algorithm(henceforth refereed to as Lin since it was unnamed) mostly targeted at network motif discoverybut also with some emphasis on efficient subgraph enumeration. Lin avoids duplicate in a similarfashion to ESU [193] and auxiliary arrays are used to mitigate uncoalesced memory accesses. ABFS-style traversal is used (extending each subgraph 1 node at a time) to better balance work-units among threads. They compare Lin running on a 2496-core GPU (Tesla K20) against parallelCPU algorithms and report a speedup of ≈
10x to a 6-core execution of the fastest CPU algorithm,DM-GTries.
Rossi and Zhou proposed the first algorithm that combines multiple GPUs and CPUs [157].Their method dynamically distributes work between CPUs and GPUs, where unbalanced com-putation is given to the CPU whereas GPUs compute the more regular work-units. Since theirmethod was not named, we refer to it as GPU-PGD. Their hybrid CPU-GPU version achievesspeedups of ≈
20x to ≈ Different parallel platforms offer distinct advantages and are more suited for particular strategies.Next we discuss the strategic differences between platforms.
A parallel cluster offers the opportunity to use multiple (heteroge-nous) machines to speedup computation. Clusters can have hundreds of processors and therefore,if speedup is linear, computation time is reduced from weeks to just a few hours. For work sharingto be efficiently performed on DM architectures one can either have a master-node mediatingwork sharing [154] or have workers directly steal work from each other [151, 153]. Usually DMapproaches are implemented directly using MPI [151–153, 164, 190] but higher level software, suchas GraphLab, can also be used [46]. DM has the drawback of workers having to send messagesthrough the network, making network bandwidth a bottleneck.
SM approaches have the advantage in their underlying hardwarebeing a commodity (multicore computers). Furthermore, workers in a SM environment do notcommunicate via network messages (since they can communicate directly in main memory), thusavoiding a bottleneck in the network bandwidth. However, the number of cores is usually verylow when compared to DM, MapReduce, and GPU architectures. Algorithms on multicores tend totraverse the search space in a DFS fashion [3, 10, 12, 172] thus avoiding the storage of large numberof subgraph occurrences in disk or main memory.
Fig. 7. Different base work-units, and their division to two workers P and Q . The MapReduce paradigm has been successfully applied to problems whereeach worker executes very similar tasks, which is the case of subgraph counting. MapReduce is aninherently BFS method, whereas most subgraph counting algorithms are DFS-based. The biggestsetback of using MapReduce is the huge amount of subgraph occurrences that are stored in filesbetween each BFS-level iteration (corresponding to a node expansion) [96, 171]. To avoid thissetback, one can instead store them in RAM when the number of occurrences fits in memory [124].
GPUs are very appealing due to their large amount of parallel threads. Despite linearspeedups being rare in the GPU, since they have such a large number of cores the gains can stillbe substantial. However, they are not well-suited for graph traversal algorithms. One of currentbest pure BFS algorithms [115] on the GPU only achieve a speedup of ≈
8x (on a 448-core NVIDIAC2050) when compared to a 4-core CPU BFS algorithm [89]. By contrast, Monte Carlo calculationson a NVIDIA C2050 GPU achieve a speedup of ≈
30x [41] when compared to a 4-core CPUimplementation. This is mainly due to branching problems, uncoalesced memory accesses andcoarse work-unit granularity, sometimes leading to almost non-existent speedups in subgraphcounting [119]. Using additional memory to efficiently store neighbors and smart work divisionhelp achieve some speedup [95]. Another approach is to combine CPUs and GPUs: CPUs handleunbalanced computation while GPUs execute regular computation [157].
When a program can be split into a series of (nearly) independent tasks, efficient parallelism greatlyreduces execution times. Each worker (be it a thread, CPU-core, or GPU-core) is assigned work-units (parallel tasks), either at the start of the computation ( initial work-units ) or during runtime ( runtimework-units ). Work-units in subgraph counting can be either (a) vertices , (b) edges , (c) subgraphs , (d)isomorphic classes (or isoclasses for short), or (e) subgraph-trees , and each option is described next.Figure 7 illustrates each base work-unit and gives an example of how each can be divided.
One possibility is to consider each vertex v ∈ V ( G ) as a work-unit and splitthem among workers. A worker p then computes all size- k subgraph occurrences that containvertex v . Naive approaches have different workers finding repeated occurrences that need to beremoved [190], but efficient sequential algorithms have canonical representations that eliminatethis problem [78, 149, 193], making each work-unit independent. Using vertices as work-units hasthe drawback of creating very coarse work-units: different vertices induce search spaces with verydifferent computational costs. For instance, counting all the subgraph occurrences that start (oreventually reach) a hub-like node is much more time-consuming than counting occurrences of Survey on Subgraph Counting 25 a nearly isolated node. For algorithms with vertices as work-units to be efficient they can eithertry to find a good initial division [190] or enable work sharing between workers [10, 12, 152, 153].Each of these work division strategies is discussed in Section 5.5.
Due to the unbalanced search tree induced by vertex division, some algorithmsuse edges as work-units [3, 96, 171, 172]. The idea is similar to vertice division: distribute all e ( v i , v j ) ∈ E ( G ) evenly among the workers. An initial edge division guarantees that all workershave an equal amount of 2-node subgraphs, which is not true for vertex division. However, for k ≥ At the start of computation, only vertices and edges from the network are known.As the k -subgraph counting process proceeds, subgraphs of sizes k − i , i < k are found. Thus,the work-units divided among threads can be these intermediate states (incomplete subgraphs).Some BFS-based algorithms [95, 96, 119, 171] begin with either edges or vertices as initial work-units and, at the end of each BFS-level, intermediate subgraphs are found and divided amongworkers. DFS-based methods expand each subgraph work-unit by one node until they reach a k -subgraph [46, 171]. Instead of partitioning the graph, like the previous three strategies do, one caninstead chose to partition the set of isoclasses being enumerated [164]. Work-units split in thisfashion have similar problems to the previously discussed: isomorphic classes do not inducecomputationally equivalent search spaces. For instance, in sparse networks it is much more time-consuming to enumerate chains or hubs than cliques.
This approach is applicable only for DFS-like algorithms where, since thesearch tree is explored in a depth-first fashion, a work-tree is implicitly built during enumeration:when the algorithm is at level k of the search, unexplored candidates of stages { k − , k − , ..., } were previously generated. Then, instead of splitting top vertices from stage 1 only (as described inSection 5.3.1), the search-tree is split among sharing processors [10, 12, 151, 152] (more details onthis in Section 5.5.3). Subgraph-trees are expected to be similar since both coarse- and fine-grainedwork-units are generated. Nevertheless, it is not guaranteed that work-units from the same level ofthe search tree induce similar work. This strategy also incurs the additional complexity of buildingthe candidate-set of each level and splitting them among workers. Discounting analytic approaches presented in Section 3.2, subgraph counting algorithms typicallycount occurrences by traversing the graph. How graph traversal is performed greatly influencesthe parallel performance and is dependent on the platform, as is discussed next.
Algorithms that adopt this strategy are typically MapReduce meth-ods [96, 124, 171] or GPU [95, 119, 157] approaches. MapReduce works intrinsically in BFS fashion,and GPUs are very inefficient when work is unbalanced and contains branching code. BFS starts by(i) splitting edges among workers, (ii) the processors compute the patterns of size-3 from each edge(size-2 subgraphs), (iii) the patterns of size-3 are themselves split among processors and (iv) thisprocess is repeated until the desired size- k patterns are obtained. The idea of BFS is to give largeamounts of fine-grained work-units to each worker, thus making work division more balancedsince these work-units induce similar work, making this approach more suitable for methods that require regular data. However, the main drawback is that these algorithms need to store partialresults (which grow exponentially as k increases) and synchronize at the end of each BFS-level. To avoid the cost of synchronization and of storing partial results, mostsubgraph counting algorithms traverse the search space in a depth-first fashion [3, 10, 12, 56, 151–153, 172, 190]. This means that the algorithm starts with V sub = { v } and incrementally adds a newnode to V sub until it obtains a match of the desired size, and backtracks to find new matches. Thisstrategy leads to unbalanced search spaces, caused by coarse-grained work-units, that need to becontrolled. Splitting work is obviously essential for a parallel approach. Work can be divided at two moments:(i) an initial work division before subgraph counting starts and/or (ii) divisions during runtime.
The simplest form of work division is to produce an initial distribution of work-unitsand proceed with the parallel computation, without ever spending time dividing work duringruntime. Trying to obtain an estimation of the work beforehand [157, 190] is valuable but limited:if the estimation is done quickly but is not very precise (such as using node-degrees or clusteringcoefficients to estimate work-unit difficulty) little guarantees are offered that the work divisionis balanced, and obtaining a very precise estimation is as computationally expensive as doingsubgraph enumeration itself. Following a BFS approach [96, 119, 171] helps balancing out thework-units and a static work division at each BFS-level is usually sufficient to obtain good results.However, those strategies have limitations as discussed in Section 5.4.1. Some analytic works,which do not rely on explicit subgraph enumeration, do not need advanced work division strategiesbecause their algorithm is almost embarrassingly parallel [158].
Instead of trying to estimate a good division one can generate workon-demand during runtime. One isomorphic class [164] or small portions of the graph [172] canbe initially given at each processor and, when that computation is done, idle processors requestmore work. This strategy has the penalty of maintaining a global queue of work-units to beprocessed. Furthermore, the last | P | work-units (where | P | is the number of workers) can havedifferent granularities (and thus computational cost), so the speedup is largely dependent on howwell-balanced they are. Algorithms that employ this strategy [10, 12, 151, 152]perform an initial static work division. They do not need a sophisticated criteria to choose to whomwork-units are assigned because work will be dynamically redistributed during runtime: wheneverworkers are idle, some work will be relocated from busy workers to them. Furthermore, instead ofsimply giving half of their top-level work-units away and keeping the other half, a busy workerfully splits its work tree The main idea is to build work-units of both fine- and coarse-grained sizes,and this is particularly helpful in cases where a worker becomes stuck managing a very complexinitial work-unit; this way, that work-unit is split in half, and it can be split iteratively to otherworkers if needed. These work-units can then either be stored in a global work queue, which amaster worker is responsible of managing [151, 152], or sharing is conducted between workerthreads themselves [10, 12] (more details on Sections 5.6.1 and 5.6.2, respectively).
Timed Redistribution is a way to avoid estimating workduring runtime while guaranteeing that every worker has work (after a while). Workers firstreceive work and try to process as much as they can. After a certain time, they all stop and workis redistributed. This strategy is specially useful when worker communication is not practical,
Survey on Subgraph Counting 27 such as in a MapReduce environment [124] on in the GPU. Setting an adequate threshold for workredistribution has a great impact: redistributing work too quickly has the drawback of wastingtoo much time in work division, while redistributing work too late has the drawback of havingidle workers. One solution is to use an adaptive threshold [124]: if workers are too often withoutwork, the threshold of the next iteration is lower, if workers are too often with much work left tocompute, the threshold of the next iteration is higher.
Since work is unbalanced for enumeration algorithms, work sharing can be used in order to balancework during runtime.
This type of work sharing is mostly adopted in distributed memory(DM) environments since workers do not share positions of memory that they can easily access anduse to communicate. A master worker initially splits the work-units among the workers (slaves)and then manages load balancing. Load balancing can be achieved by managing a global queuewhere slaves put some of their work, to be later redistributed by the master [154]. This strategyimplies that the master is not being used the enumeration and that there is a need communicationover the network.
Shared memory (SM) environments allow for direct communicationbetween workers, therefore a master node is redundant. In this strategy, an idle worker asks arandom worker for work [10, 12]. One could try to estimate which worker should be polled forwork (which is computationally costly) but random polling has been established as an efficientheuristic for dynamic load balancing [160]. After the sharing process, computation resumes witheach worker evolved in the exchange computing their part of the work. Computation ends when allworkers are polling for work. This strategy achieves a balanced work-division during runtime, andthe penalty caused by worker communication is negligible [10, 12]. Most implementations of W-Wsharing are built on top of relatively homogeneous systems, such as multiworkered CPUs [172] orclusters of similar processors [164]. In these systems, since all workers are equivalent, it is irrelevantwhich ones get a specific easy (or hard) work-unit, thus only load balancing needs to be controlled.Strategies that combine CPUs with GPUs, for instance, can split tasks in a way that takes advantageof both architectures: GPUs are very fast for regular tasks while CPUs can deal with irregular ones.For instance, a shared deque can be kept where workers, either GPUs or CPUs, put work on or takework from [157]; the queue is ordered by complexity: complex tasks are placed at the front, andsimple tasks at the end. The main idea is that CPUs handle just a few complex work-units from thefront of the deque while GPUs take large bundles of work-units from the back.
Over the last twenty years, subgraph counting has been under increased focus in the networkscience community, specially since the introduction of networks motifs [121], and its status as animportant tool for network analysis, as well as graphlets [138] which are now established measuresfor network alignment.In this survey we explored existing practical methods to solve the subgraph counting problemfrom three perspectives: (i) algorithms that efficiently perform exact counting, which is an in-trinsically computationally hard task, (ii) algorithms that perform an approximation of subgraphfrequencies, making the process faster but taking into account the accuracy of their estimation,and (iii) algorithms that efficiently exploit parallel architectures despite the unbalanced nature ofsubgraph counting. We showed that all three of these categories are still attracting new work, withnew methods still emerging in an attempt to improve previous work.
The aim of this work was precisely to describe and classify the major algorithmic ideas in each ofthese three categories, offering a structured and thorough review of how they work and what aretheir advantages and disadvantages. Moreover, we provided more than two hundred references thatallow further exploration of any aspects that might be of particular interest to the reader, includingdirect links to the existing practical implementations of the methods.We feel that this survey provides valuable insight both from a more practical point of view,offering solutions and application ideas for those who view subgraph counting as a tool for networkanalysis, and from a more methodological angle, being not only a very strong starting point fornew researchers joining the area, but also a very useful and comprehensive summary of recentresearch results for more established researchers.
REFERENCES [1] Christoph Adami, Jifeng Qian, Matthew Rupp, and Arend Hintze. 2011. Information content of colored motifs incomplex networks.
Artificial Life
17, 4 (2011), 375–390.[2] Nesreen K. Ahmed. 2018. A Parallel Graphlet Decomposition Library for Large Graphs. https://github.com/nkahmed/PGD. Accessed: 2019-10-09.[3] Nesreen K Ahmed, Jennifer Neville, Ryan A Rossi, and Nick Duffield. 2015. Efficient graphlet counting for largenetworks. In
Data Mining (ICDM), 2015 IEEE International Conference on . IEEE, 1–10.[4] Nesreen K Ahmed, Jennifer Neville, Ryan A Rossi, Nick G Duffield, and Theodore L Willke. 2017. Graphlet decompo-sition: Framework, algorithms, and applications.
Knowledge and Information Systems
50, 3 (2017), 689–722.[5] Nesreen K Ahmed, Theodore L Willke, and Ryan A Rossi. 2016. Estimation of local subgraph counts. In
Big Data (BigData), 2016 IEEE International Conference on . IEEE, 586–595.[6] Mohammad Al Hasan and Vachik S Dave. 2018. Triangle counting in large networks: a review.
Wiley InterdisciplinaryReviews: Data Mining and Knowledge Discovery
8, 2 (2018), e1226.[7] Maryam Aliakbarpour, Amartya Shankha Biswas, Themis Gouleakis, John Peebles, Ronitt Rubinfeld, and AnakYodpinyanee. 2018. Sublinear-time algorithms for counting star subgraphs via edge sampling.
Algorithmica
80, 2(2018), 668–697.[8] Noga Alon, Raphael Yuster, and Uri Zwick. 1995. Color-coding.
Journal of the ACM (JACM)
European Conference on Parallel Processing . Springer, 194–205.[11] David Aparício, Pedro Ribeiro, Tijana Milenković, and Fernando Silva. 2019. Temporal network alignment viaGoT-WAVE.
Bioinformatics
35, 18 (2019), 3527–3529.[12] David Aparício, Pedro Ribeiro, and Fernando Silva. 2014. Parallel subgraph counting for multicore architectures. In
Parallel and Distributed Processing with Applications (ISPA), 2014 IEEE International Symposium on . IEEE, 34–41.[13] David Aparicio, Pedro Ribeiro, and Fernando Silva. 2016. Extending the Applicability of Graphlets to DirectedNetworks.
IEEE/ACM Transactions on Computational Biology and Bioinformatics (2016).[14] David Aparício, Pedro Ribeiro, and Fernando Silva. 2018. Graphlet-orbit Transitions (GoT): A fingerprint for temporalnetwork comparison.
PloS one
13, 10 (2018), e0205497.[15] Albert-László Barabási et al. 2016.
Network science . Cambridge university press.[16] Jordi Bascompte and Carlos J Melián. 2005. Simple trophic modules for complex food webs.
Ecology
86, 11 (2005),2868–2873.[17] Joris Bekkers and Shaunak Dabadghao. 2017. Flow Motifs in Soccer: What can passing behavior tell us?
Journal ofSports Analytics
Preprint (2017), 1–13.[18] MA Bezem and Jan van Leeuwen. 1987.
Enumeration in graphs . Vol. 87. Unknown Publisher.[19] Mansurul A Bhuiyan, Mahmudur Rahman, and M Al Hasan. 2012. Guise: Uniform sampling of graphlets for largegraph analysis. In
Data Mining (ICDM), 2012 IEEE 12th International Conference on . IEEE, 91–100.[20] Andreas Bjorklund, Thore Husfeldt, Petteri Kaski, Mikko Kalle Henrik Koivisto, et al. 2018. Counting connectedsubgraphs with maximum-degree-aware sieving. In . Schloss Dagstuhl-Leibniz-Zentrum für Informatik.[21] Andreas Björklund, Rasmus Pagh, Virginia Vassilevska Williams, and Uri Zwick. 2014. Listing triangles. In
InternationalColloquium on Automata, Languages, and Programming . Springer, 223–234.[22] Peter Bloem and Steven de Rooij. 2017. Large-scale network motif learning with compression.
CoRR arXiv
Survey on Subgraph Counting 29 [23] Hanjo D Boekhout, Walter A Kosters, and Frank W Takes. 2019. Efficiently counting complex multilayer temporalmotifs in large-scale networks.
Computational Social Networks
6, 1 (2019), 1–34.[24] Marco Bressan. 2018. Motif Counting Beyond Five Nodes. https://github.com/Steven--/graphlets. Accessed:2019-10-09.[25] Marco Bressan, Flavio Chierichetti, Ravi Kumar, Stefano Leucci, and Alessandro Panconesi. 2018. Motif CountingBeyond Five Nodes.
ACM Transactions on Knowledge Discovery from Data (TKDD)
12, 4 (2018), 48.[26] Aydın Buluç, Henning Meyerhenke, Ilya Safro, Peter Sanders, and Christian Schulz. 2016. Recent advances in graphpartitioning. In
Algorithm Engineering . Springer, 117–158.[27] Robrecht Cannoodt, Joeri Ruyssinck, Jan Ramon, Katleen De Preter, and Yvan Saeys. 2018. IncGraph: Incrementalgraphlet counting for topology optimisation.
PloS one
13, 4 (2018), e0195997.[28] Raphaël Charbey and Christophe Prieur. 2019. Stars, holes, or paths across your Facebook friends: A graphlet-basedcharacterization of many networks.
Network Science (2019), 1–22.[29] Xiaowei Chen. 2018. Mining Graphlet Counts in Online Social Networks. https://github.com/xwchen666/GraphletCountOSN. Accessed: 2019-10-09.[30] Xiaowei Chen, Yongkun Li, Pinghui Wang, and John Lui. 2016. A general framework for estimating graphlet statisticsvia random walk.
Proceedings of the VLDB Endowment
10, 3 (2016), 253–264.[31] Xiaowei Chen and John CS Lui. 2016. Mining Graphlet Counts in Online Social Networks. In
Data Mining (ICDM),2016 IEEE 16th International Conference on . IEEE, 71–80.[32] Sarvenaz Choobdar, Pedro Ribeiro, Sylwia Bugla, and Fernando Silva. 2012. Comparison of co-authorship networksacross scientific fields using motifs. In
Advances in Social Networks Analysis and Mining (ASONAM), 2012 IEEE/ACMInternational Conference on . IEEE, 147–152.[33] Sarvenaz Choobdar, Pedro Ribeiro, and Fernando Silva. 2012. Motif Mining in Weighted Networks. In . IEEE, 210–217. https://doi.org/10.1109/ICDMW.2012.111[34] Stephen A Cook. 1971. The complexity of theorem-proving procedures. In
Proceedings of the third annual ACMsymposium on Theory of computing . ACM, 151–158.[35] Luciano da Fontoura Costa, Osvaldo N Oliveira Jr, Gonzalo Travieso, Francisco Aparecido Rodrigues, Paulino RibeiroVillas Boas, Lucas Antiqueira, Matheus Palhares Viana, and Luis Enrique Correa Rocha. 2011. Analyzing and modelingreal-world phenomena with complex networks: a survey of applications.
Advances in Physics
60, 3 (2011), 329–412.[36] Éva Czabarka, László A Székely, and Stephan Wagner. 2018. On the number of nonisomorphic subtrees of a tree.
Journal of Graph Theory
87, 1 (2018), 89–95.[37] Maximilien Danisch, Oana Balalau, and Mauro Sozio. 2018. Listing k-cliques in sparse real-world graphs. In
Proceedingsof the 2018 World Wide Web Conference . International World Wide Web Conferences Steering Committee, 589–598.[38] Vachik S Dave, Nesreen K Ahmed, and Mohammad Al Hasan. 2017. E-CLoG: counting edge-centric local graphlets.In . IEEE, 586–595.[39] Jeffrey Dean and Sanjay Ghemawat. 2008. MapReduce: simplified data processing on large clusters.
Commun. ACM
51, 1 (2008), 107–113.[40] Sofie Demeyer, Tom Michoel, Jan Fostier, Pieter Audenaert, Mario Pickavet, and Piet Demeester. 2013. The index-basedsubgraph matching algorithm (ISMA): fast subgraph enumeration in large networks using optimized search trees.
PloS one
8, 4 (2013), e61183.[41] Aiping Ding, Tianyu Liu, Chao Liang, Wei Ji, Mark S Shephard, X George Xu, and Forrest B Brown. 2011. Evaluation ofspeedup of Monte Carlo calculations of two simple reactor physics problems coded for the GPU/CUDA environment.(2011).[42] Derek Doran. 2014. Triad-based role discovery for large social systems. In
International Conference on Social Informatics .Springer, 130–143.[43] Alexandra Duma and Alexandru Topirceanu. 2014. A network motif based approach for classifying online socialnetworks. In .IEEE, 311–315.[44] Ehtna R. Elenberg. 2016. GraphLab PowerGraph implementation of 4-profile counting. https://github.com/eelenberg/4-profiles. Accessed: 2019-10-09.[45] Ethan R Elenberg, Karthikeyan Shanmugam, Michael Borokhovich, and Alexandros G Dimakis. 2015. Beyond triangles:A distributed framework for estimating 3-profiles of large graphs. In
Proceedings of the 21th ACM SIGKDD InternationalConference on Knowledge Discovery and Data Mining . ACM, 229–238.[46] Ethan R Elenberg, Karthikeyan Shanmugam, Michael Borokhovich, and Alexandros G Dimakis. 2016. Distributedestimation of graph 4-profiles. In
Proceedings of the 25th International Conference on World Wide Web . InternationalWorld Wide Web Conferences Steering Committee, 483–493.[47] Rasha Elhesha and Tamer Kahveci. 2016. Identification of large disjoint motifs in biological networks.
BMCbioinformatics
17, 1 (2016), 408. [48] David Eppstein. 2002. Subgraph isomorphism in planar graphs and related problems. In
Graph Algorithms andApplications I . World Scientific, 283–309.[49] Wenbin Fang, Ka Keung Lau, Mian Lu, Xiangye Xiao, Chi K Lam, Philip Yang Yang, Bingsheng He, Qiong Luo, Pedro VSander, and Ke Yang. 2008. Parallel data mining on graphics processors.
Hong Kong Univ. Sci. and Technology, HongKong, China, Tech. Rep. HKUST-CS08-07 (2008).[50] Rui Ferreira. 2013. Efficiently Listing Combinatorial Patterns in Graphs. arXiv preprint arXiv:1308.6635 (2013).[51] Irene Finocchi, Marco Finocchi, and Emanuele G Fusco. 2015. Clique counting in MapReduce: algorithms andexperiments.
Journal of Experimental Algorithmics (JEA)
20 (2015), 1–7.[52] Peter Floderus, Mirosław Kowaluk, Andrzej Lingas, and Eva-Marta Lundell. 2015. Induced subgraph isomorphism:Are some patterns substantially easier than others?
Theoretical Computer Science
605 (2015), 119–128.[53] Ali Gholami Rudi, Saeed Shahrivari, Saeed Jalili, and Zahra Razaghi Moghadam Kashani. 2013. RANGI: a fastlist-colored graph motif finding algorithm.
IEEE/ACM Transactions on Computational Biology and Bioinformatics(TCBB)
10, 2 (2013), 504–513.[54] Mira Gonen, Dana Ron, and Yuval Shavitt. 2011. Counting stars and other small subgraphs in sublinear-time.
SIAMJournal on Discrete Mathematics
25, 3 (2011), 1365–1411.[55] Mira Gonen and Yuval Shavitt. 2009. Approximating the number of network motifs.
Internet Mathematics
6, 3 (2009),349–372.[56] Joshua A Grochow and Manolis Kellis. 2007. Network motif discovery using subgraph enumeration and symmetry-breaking. In
Annual International Conference on Research in Computational Molecular Biology . Springer, 92–106.[57] Shawn Gu, John Johnson, Fazle E Faisal, and Tijana Milenković. 2018. From homogeneous to heterogeneous networkalignment via colored graphlets.
Scientific reports
8, 1 (2018), 12524.[58] Sylvain Guillemot and Florian Sikora. 2013. Finding and counting vertex-colored subtrees.
Algorithmica
65, 4 (2013),828–844.[59] Guyue Han and Harish Sethu. 2016. Waddling Random Walk: Fast and Accurate Mining of Motif Statistics in LargeGraphs. In
Data Mining (ICDM), 2016 IEEE 16th International Conference on . IEEE, 181–190.[60] Frank Harary. 1974. A survey of the reconstruction conjecture. In
Graphs and combinatorics . Springer, 18–28.[61] Himamshu and Sarika Jain. 2017. Impact of Memory Space Optimization Technique on Fast Network Motif SearchAlgorithm. In
Advances in Computer and Computational Sciences . Springer, 559–567.[62] Tomaž Hočevar and Janez Demšar. 2014. A combinatorial approach to graphlet counting.
Bioinformatics
30, 4 (2014),559–565.[63] Tomaž Hočevar and Janez Demšar. 2017. Combinatorial algorithm for counting small induced graphs and orbits.
PloSone
Sociological methodology
Physics reports
Parallel Architectures and Compilation Techniques (PACT), 2011 International Conference on . IEEE, 78–88.[68] Maarten Houbraken, Sofie Demeyer, Tom Michoel, Pieter Audenaert, Didier Colle, and Mario Pickavet. 2014. TheIndex-based Subgraph Matching Algorithm with General Symmetries (ISMAGS): exploiting symmetry for fastersubgraph enumeration.
PloS one
9, 5 (2014), e97896.[69] Jun Huan, Wei Wang, and Jan Prins. 2003. Efficient mining of frequent subgraphs in the presence of isomorphism. In
Third IEEE International Conference on Data Mining . IEEE, 549–552.[70] Yuriy Hulovatyy, Huili Chen, and T Milenković. 2015. Exploring the structure and function of temporal networkswith dynamic graphlets.
Bioinformatics
31, 12 (2015), i171–i180.[71] Royi Itzhack, Yelena Mogilevski, and Yoram Louzoun. 2007. An optimal algorithm for counting network motifs.
Physica A: Statistical Mechanics and its Applications
381 (2007), 482–490.[72] Deepali Jain and Ripon Patgiri. 2019. Network Motifs: A Survey. In
International Conference on Advances in Computingand Data Sciences . Springer, 80–91.[73] Madhav Jha, C Seshadhri, and Ali Pinar. 2015. Path sampling: A fast and provable method for estimating 4-vertexsubgraph counts. In
Proceedings of the 24th International Conference on World Wide Web . International World WideWeb Conferences Steering Committee, 495–505.[74] Chuntao Jiang, Frans Coenen, and Michele Zito. 2013. A survey of frequent subgraph mining algorithms.
TheKnowledge Engineering Review
28, 01 (2013), 75–105.[75] Zhao Jing and Zhong Cheng. 2015. HashESU: Efficient Algorithm for Identifying Motifs in Biological Networks.
Journal of Chinese Computer Systems
Survey on Subgraph Counting 31 [76] Yuval Kalish and Garry Robins. 2006. Psychological predispositions and network structure: The relationship betweenindividual predispositions, structural holes and network closure.
Social networks
28, 1 (2006), 56–84.[77] John Kallaugher, Michael Kapralov, and Eric Price. 2018. The sketching complexity of graph and hypergraph counting.In . IEEE, 556–567.[78] Zahra Razaghi Moghadam Kashani, Hayedeh Ahrabian, Elahe Elahi, Abbas Nowzari-Dalini, Elnaz Saberi Ansari,Sahar Asadi, Shahin Mohammadi, Falk Schreiber, and Ali Masoudi-Nejad. 2009. Kavosh: a new algorithm for findingnetwork motifs.
BMC bioinformatics
10, 1 (2009), 318.[79] Nadav Kashtan, Shalev Itzkovitz, Ron Milo, and Uri Alon. 2004. Efficient sampling algorithm for estimating subgraphconcentrations and detecting network motifs.
Bioinformatics
20, 11 (2004), 1746–1758.[80] Sahand Khakabimamaghani, Iman Sharafuddin, Norbert Dichter, Ina Koch, and Ali Masoudi-Nejad. 2013. QuateXelero:an accelerated exact network motif detection algorithm.
PloS one
8, 7 (2013), e68073.[81] Sahand Khakabimamaghani, Iman Sharafuddin, Norbert Dichter, Ina Koch, and Ali Masoudi-Nejad. 2018. QuateXelero– Fast Motif Detection algorithm. http://apps.cytoscape.org/apps/ismags. Accessed: 2019-10-09.[82] Wooyoung Kim, Martin Diko, and Keith Rawson. 2013. Network motif detection: Algorithms, parallel and cloudcomputing, and related tools.
Tsinghua science and technology
18, 5 (2013), 469–489.[83] Ton Kloks, Dieter Kratsch, and Haiko Müller. 2000. Finding and counting small induced subgraphs efficiently.
Inform.Process. Lett.
Book of Abstracts for Journées Ouvertes Biologie Informatique Mathématiques (JOBIM) (2011), 53–60.[86] Mirosław Kowaluk, Andrzej Lingas, and Eva-Marta Lundell. 2013. Counting and detecting small subgraphs viaequations.
SIAM Journal on Discrete Mathematics
27, 2 (2013), 892–909.[87] Oleksii Kuchaiev, Tijana Milenković, Vesna Memišević, Wayne Hayes, and Nataša Pržulj. 2010. Topological networkalignment uncovers biological function and phylogeny.
Journal of the Royal Society Interface
7, 50 (2010), 1341–1354.[88] Oleksii Kuchaiev and Nataša Pržulj. 2011. Integrative network alignment reveals large regions of global networksimilarity in yeast and human.
Bioinformatics
27, 10 (2011), 1390–1396.[89] Charles E Leiserson and Tao B Schardl. 2010. A work-efficient parallel breadth-first search algorithm (or how to copewith the nondeterminism of reducers). In
Proceedings of the twenty-second annual ACM symposium on Parallelism inalgorithms and architectures . ACM, 303–314.[90] Ted G Lewis. 2011.
Network science: Theory and applications . John Wiley & Sons.[91] Guanghui Li, Jiawei Luo, Zheng Xiao, and Cheng Liang. 2018. MTMO: an efficient network-centric algorithm forsubtree counting and enumeration.
Quantitative Biology
6, 2 (2018), 142–154.[92] Xin Li, Douglas S Stones, Haidong Wang, Hualiang Deng, Xiaoguang Liu, and Gang Wang. 2012. Netmode: Networkmotif detection without nauty.
PloS one
7, 12 (2012), e50093.[93] Xin Li, Douglas S Stones, Haidong Wang, Hualiang Deng, Xiaoguang Liu, and Gang Wang. 2016. NetMODESourceForge.net. https://sourceforge.net/projects/netmode/. Accessed: 2019-10-09.[94] Min Chih Lin, Francisco J Soulignac, and Jayme L Szwarcfiter. 2012. Arboricity, h-index, and dynamic algorithms.
Theoretical Computer Science
426 (2012), 75–90.[95] Wenqing Lin, Xiaokui Xiao, Xing Xie, and Xiao-Li Li. 2015. Network motif discovery: A GPU approach. In
DataEngineering (ICDE), 2015 IEEE 31st International Conference on . IEEE, 831–842.[96] Yang Liu, Xiaohong Jiang, Huajun Chen, Jun Ma, and Xiangyu Zhang. 2009. Mapreduce-based pattern findingalgorithm applied in motif detection for prescription compatibility network. In
International Workshop on AdvancedParallel Processing Technologies . Springer, 341–355.[97] Jiawei Luo, Lv Ding, Cheng Liang, and Nguyen Hoang Tu. 2018. An efficient network motif discovery approach forco-regulatory networks.
IEEE Access
DiscreteApplied Mathematics
Academy of Management Journal
47, 6 (2004), 918–927.[100] Noël Malod-Dognin and Nataša Pržulj. 2015. L-GRAAL: Lagrangian graphlet-based network aligner.
Bioinformatics
31, 13 (2015), 2182–2189.[101] Shmoolik Mangan and Uri Alon. 2003. Structure and function of the feed-forward loop network motif.
Proceedings ofthe National Academy of Sciences
Distributed Computing SystemsWorkshops (ICDCSW), 2010 IEEE 30th International Conference on . IEEE, 92–98. [103] Dror Marcus and Yuval Shavitt. 2012. Rage–a rapid graphlet enumerator for large networks.
Computer Networks
IET systems biology
6, 5 (2012), 164–174.[106] Brendan D McKay. 2003. nauty user’s guide (version 2.2) . Technical Report. Technical Report TR-CS-9002, AustralianNational University.[107] Brendan D McKay et al. 1981.
Practical graph isomorphism . Department of Computer Science, Vanderbilt UniversityTennessee, USA.[108] Brendan D McKay and Adolfo Piperno. 2014. Practical graph isomorphism, II.
Journal of Symbolic Computation
Signal Image Technology and Internet Based Systems (SITIS), 2012 Eighth InternationalConference on . IEEE, 744–753.[111] Luis AA Meira, Vinícius R Máximo, Álvaro L Fazenda, and Arlindo F Da Conceição. 2014. Acc-motif: acceleratednetwork motif detection.
IEEE/ACM Transactions on Computational Biology and Bioinformatics (TCBB)
11, 5 (2014),853–862.[112] Ine Melckenbeeck, Pieter Audenaert, Didier Colle, and Mario Pickavet. 2017. Efficiently counting all orbits of graphletsof any order in a graph using autogenerated equations.
Bioinformatics
34, 8 (11 2017), 1372–1380.[113] Ine Melckenbeeck, Pieter Audenaert, Thomas Van Parys, Yves Van De Peer, Didier Colle, and Mario Pickavet.2019. Jesse - Tree-based algorithm to calculate graphlet densities of nodes in a graph using equations. https://github.com/biointec/jesse. Accessed: 2019-10-09.[114] Ine Melckenbeeck, Pieter Audenaert, Thomas Van Parys, Yves Van De Peer, Didier Colle, and Mario Pickavet. 2019.Optimising orbit counting of arbitrary order by equation selection.
BMC bioinformatics
20, 1 (2019), 27.[115] Duane Merrill, Michael Garland, and Andrew Grimshaw. 2012. Scalable GPU graph traversal. In
ACM SIGPLANNotices , Vol. 47. ACM, 117–128.[116] Henning Meyerhenke, Peter Sanders, and Christian Schulz. 2017. Parallel graph partitioning for complex networks.
IEEE Transactions on Parallel and Distributed Systems
28, 9 (2017), 2625–2638.[117] Giovanni Micale, Rosalba Giugno, Alfredo Ferro, Misael Mongiovì, Dennis Shasha, and Alfredo Pulvirenti. 2018. Fastanalytical methods for finding significant labeled graph motifs.
Data Mining and Knowledge Discovery
32, 2 (2018),504–531.[118] Tijana Milenković, Weng Leong Ng, Wayne Hayes, and Nataša Pržulj. 2010. Optimal network alignment with graphletdegree vectors.
Cancer informatics
Infoteh Jahorina Symposium , Vol. 14. 741–745.[120] Ron Milo, Shalev Itzkovitz, Nadav Kashtan, Reuven Levitt, Shai Shen-Orr, Inbal Ayzenshtat, Michal Sheffer, and UriAlon. 2004. Superfamilies of evolved and designed networks.
Science
Science
Graph Data Management . Springer, 71–95.[124] Ahmad Naser-eddin and Pedro Ribeiro. 2017. Scalable subgraph counting using MapReduce. In
Proceedings of theSymposium on Applied Computing . ACM, 1574–1581.[125] Siegfried Nijssen and Joost N Kok. 2005. The gaston tool for frequent subgraph mining.
Electronic Notes in TheoreticalComputer Science
Genes & genetic systems
84, 5 (2009), 385–395.[127] Mark Ortmann and Ulrik Brandes. 2016. Quad census computation: simple, efficient, and orbit-aware. In
Proceedingsof the 12th International Conference and School on Advances in Network Science-Volume 9564 . Springer-Verlag NewYork, Inc., 1–13.[128] Mark Ortmann and Ulrik Brandes. 2017. Efficient orbit-aware triad and quad census in directed and undirectedgraphs.
Applied Network Science
2, 1 (2017), 13.
Survey on Subgraph Counting 33 [129] Ashwin Paranjape, Austin R Benson, and Jure Leskovec. 2017. Motifs in temporal networks. In
Proceedings of theTenth ACM International Conference on Web Search and Data Mining . ACM, 601–610.[130] Pedro Paredes and Pedro Ribeiro. 2013. Towards a faster network-centric subgraph census. In
Advances in SocialNetworks Analysis and Mining (ASONAM), 2013 IEEE/ACM International Conference on . IEEE, 264–271.[131] Pedro Paredes and Pedro Ribeiro. 2015. Rand-FaSE: fast approximate subgraph census.
Social Network Analysis andMining
5, 1 (2015), 17.[132] Pedro Paredes and Pedro Ribeiro. 2018. FaSE - Fast Subgraph Enumeration. https://github.com/ComplexNetworks-DCC-FCUP/fase. Accessed: 2019-10-09.[133] Thomas V Parys and Ine Melckenbeeck. 2016. ISMAGS - Enumerate all instances of a motif in a graph, makingoptimal use of the motif’s symmetries. http://apps.cytoscape.org/apps/ismags. Accessed: 2019-10-09.[134] Sabyasachi Patra and Anjali Mohapatra. 2018. Motif discovery in biological network using expansion tree.
Journal ofbioinformatics and computational biology
16, 6 (2018), 1850024–1850024.[135] Franck Picard, J-J Daudin, Michel Koskas, Sophie Schbath, and Stephane Robin. 2008. Assessing the exceptionality ofnetwork motifs.
Journal of Computational Biology
15, 1 (2008), 1–20.[136] Ali Pinar, C Seshadhri, and Vaidyanathan Vishal. 2017. Escape: efficiently counting all 5-vertex subgraphs. In
Proceedings of the 26th International Conference on World Wide Web . International World Wide Web ConferencesSteering Committee, 1431–1440.[137] Christina Prell and John Skvoretz. 2008. Looking at social capital through triad structures.
Connections
28, 2 (2008),4–16.[138] Nataša Pržulj. 2007. Biological network comparison using graphlet degree distribution.
Bioinformatics
23 (2007),177–183.[139] N Pržulj, Derek G Corneil, and Igor Jurisica. 2006. Efficient estimation of graphlet frequency distributions inprotein–protein interaction networks.
Bioinformatics
22, 8 (2006), 974–980.[140] Mahmudur Rahman, Mansurul Bhuiyan, and Mahmuda Rahman. 2018. GRAFT: an approximate graphlet countingalgorithm for large graph analysis. https://github.com/DMGroup-IUPUI/GRAFT-Source. Accessed: 2019-10-09.[141] Mahmudur Rahman, Mansurul Bhuiyan, Mahmuda Rahman, and Mohammad Al Hasan. 2018. GUISE: UniformSampling of Graphlets for Large Graph Analysis. https://github.com/DMGroup-IUPUI/GUISE-Source. Accessed:2019-10-09.[142] Mahmudur Rahman, Mansurul Alam Bhuiyan, and Mohammad Al Hasan. 2014. Graft: An efficient graphlet countingmethod for large graph analysis.
IEEE Transactions on Knowledge and Data Engineering
26, 10 (2014), 2466–2478.[143] Yuanfang Ren, Aisharjya Sarkar, Ahmet Ay, Alin Dobra, and Tamer Kahveci. 2019. Finding Conserved Patternsin Multilayer Networks. In
Proceedings of the 10th ACM International Conference on Bioinformatics, ComputationalBiology and Health Informatics
Algorithms inBioinformatics (2010), 238–249.[147] Pedro Ribeiro and Fernando Silva. 2010. G-tries: an efficient data structure for discovering network motifs. In
Proceedings of the 2010 ACM Symposium on Applied Computing . ACM, 1559–1566.[148] Pedro Ribeiro and Fernando Silva. 2014. Discovering colored network motifs. In
Complex Networks V . Springer,107–118.[149] Pedro Ribeiro and Fernando Silva. 2014. G-Tries: a data structure for storing and finding subgraphs.
Data Mining andKnowledge Discovery
28, 2 (2014), 337–377.[150] Pedro Ribeiro, Fernando Silva, and Marcus Kaiser. 2009. Strategies for network motifs discovery. In . IEEE, 80–87.[151] Pedro Ribeiro, Fernando Silva, and Luís Lopes. 2010. Efficient parallel subgraph counting using g-tries. In
ClusterComputing (CLUSTER), 2010 IEEE International Conference on . IEEE, 217–226.[152] Pedro Ribeiro, Fernando Silva, and Luís Lopes. 2010. A parallel algorithm for counting subgraphs in complex networks.In
International Joint Conference on Biomedical Engineering Systems and Technologies . Springer, 380–393.[153] Pedro Ribeiro, Fernando Silva, and Luís Lopes. 2012. Parallel discovery of network motifs.
J. Parallel and Distrib.Comput.
72, 2 (2012), 144–154.[154] Pedro Ribeiro, Fernando MA Silva, and Luís MB Lopes. 2010. Parallel Calculation of Subgraph Census in BiologicalNetworks.. In
BIOINFORMATICS . 56–65.[155] Stéphane Robin, Etienne Birmelé, Michel Koskas, Gilles Grasseau, and Sophie Schbath. 2018. RAGE - graphletenumeration algorithm. https://cran.r-project.org/src/contrib/Archive/NeMo/. Accessed: 2019-10-09. [156] Ryan A Rossi, Nesreen K Ahmed, Aldo Carranza, David Arbour, Anup Rao, Sungchul Kim, and Eunyee Koh. 2019.Heterogeneous network motifs. arXiv preprint arXiv:1901.10026 (2019).[157] Ryan A Rossi and Rong Zhou. 2016. Leveraging Multiple GPUs and CPUs for Graphlet Counting in Large Networks. In
Proceedings of the 25th ACM International on Conference on Information and Knowledge Management . ACM, 1783–1792.[158] Ryan A Rossi, Rong Zhou, and Nesreen K Ahmed. 2017. Estimation of graphlet statistics. arXiv preprint arXiv:1701.01772 (2017).[159] Tanay Kumar Saha and Mohammad Al Hasan. 2015. Finding Network Motifs Using MCMC Sampling.. In
CompleNet .13–24.[160] Peter Sanders. 1994. A detailed analysis of random polling dynamic load balancing. In
Parallel Architectures, Algorithmsand Networks, 1994.(ISPAN), International Symposium on . IEEE, 382–389.[161] Seyed-Vahid Sanei-Mehri, Ahmet Erdem Sariyuce, and Srikanta Tirthapura. 2018. Butterfly Counting in BipartiteNetworks. In
Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining .ACM, 2150–2159.[162] Aisharjya Sarkar, Yuanfang Ren, Rasha Elhesha, and Tamer Kahveci. 2018. A new algorithm for counting independentmotifs in probabilistic networks.
IEEE/ACM transactions on computational biology and bioinformatics (2018).[163] Thomas Schank and Dorothea Wagner. 2005. Finding, counting and listing all triangles in large graphs, an experimentalstudy. In
International Workshop on Experimental and Efficient Algorithms . Springer, 606–609.[164] Michael Schatz, Elliott Cooper-Balis, and Adam Bazinet. 2008. Parallel network motif finding.
Techinical report,University of Maryland Insitute for Advanced Computer Studies (2008).[165] Sophie Schbath, Vincent Lacroix, and Marie-France Sagot. 2008. Assessing the exceptionality of coloured motifs innetworks.
EURASIP Journal on Bioinformatics and Systems Biology
International Conference on Algorithms for Computational Biology . Springer,53–67.[167] Falk Schreiber and Henning Schwöbbermeyer. 2005. Frequency concepts and pattern detection for the analysis ofmotifs in networks. In
Transactions on computational systems biology III . Springer, 89–104.[168] C Seshadhri. 2017. Escape (Bitbucket). https://bitbucket.org/seshadhri/escape. Accessed: 2019-10-09.[169] Comandur Seshadhri, Ali Pinar, and Tamara G Kolda. 2013. Triadic measures on graphs: The power of wedge sampling.In
Proceedings of the 2013 SIAM International Conference on Data Mining . SIAM, 10–18.[170] Saeed Shahrivari. 2016. GraphLab PowerGraph implementation of 4-profile counting. https://github.com/eelenberg/4-profiles. Accessed: 2019-10-09.[171] Saeed Shahrivari and Saeed Jalili. 2015. Distributed discovery of frequent subgraphs of a network using MapReduce.
Computing
97, 11 (2015), 1101–1120.[172] Saeed Shahrivari and Saeed Jalili. 2015. Fast parallel all-subgraph enumeration using multicore machines.
ScientificProgramming
International Workshop on Complex Networks . Springer, 17–29.[174] George M Slota and Kamesh Madduri. 2013. Fast approximate subgraph counting and enumeration. In
ParallelProcessing (ICPP), 2013 42nd International Conference on . IEEE, 210–219.[175] Ricard V Solé and Sergi Valverde. 2007. Spontaneous emergence of modularity in cellular networks.
Journal of TheRoyal Society Interface
5, 18 (2007), 129–133.[176] Xiaoli Song, Changjun Zhou, Bin Wang, and Qiang Zhang. 2015. A Method of Motif Mining Based on Backtrackingand Dynamic Programming. In
International Workshop on Multi-disciplinary Trends in Artificial Intelligence . Springer,317–328.[177] Olaf Sporns and Rolf Kötter. 2004. Motifs in brain networks.
PLoS biology
2, 11 (2004), e369.[178] Clara Stegehuis, Remco van der Hofstad, and Johan SH van Leeuwaarden. 2019. Variational principle for scale-freenetwork motifs.
Scientific reports
9, 1 (2019), 6762.[179] Yihan Sun, Joseph Crawford, Jie Tang, and Tijana Milenković. 2015. Simultaneous optimization of both node and edgeconservation in network alignment via WAVE. In
International Workshop on Algorithms in Bioinformatics . Springer,16–39.[180] Ngoc Tam L Tran, Sominder Mohan, Zhuoqing Xu, and Chun-Hsi Huang. 2014. Current innovations and futurechallenges of network motif detection.
Briefings in bioinformatics
16, 3 (2014), 497–525.[181] Shahadat Uddin and Liaquat Hossain. 2013. Dyad and triad census analysis of crisis communication network.
SocialNetworking (2013).[182] Julian R Ullmann. 1976. An algorithm for subgraph isomorphism.
Journal of the ACM (JACM)
23, 1 (1976), 31–42.[183] Sergi Valverde and Ricard V Solé. 2005. Network motifs in computational graphs: A case study in software architecture.
Physical Review E
72, 2 (2005), 026107.
Survey on Subgraph Counting 35 [184] Sebastian Wandelt and Xiaoqian Sun. 2015. Evolution of the international air transportation country network from2002 to 2013.
Transportation Research Part E: Logistics and Transportation Review
82 (2015), 55–78.[185] Jianxin Wang, Yuannan Huang, Fang-Xiang Wu, and Yi Pan. 2012. Symmetry compression method for discoveringnetwork motifs.
IEEE/ACM Transactions on Computational Biology and Bioinformatics (TCBB)
9, 6 (2012), 1776–1789.[186] Pinghui Wang. 2018. MOSS-5: Fast Method of Approximating Counts of 5-Node Graphlets in Large Graphs. http://nskeylab.xjtu.edu.cn/dataset/phwang/code/mosscode.zip. Accessed: 2019-10-09.[187] Pinghui Wang, John Lui, Bruno Ribeiro, Don Towsley, Junzhou Zhao, and Xiaohong Guan. 2014. Efficiently estimatingmotif statistics of large networks.
ACM Transactions on Knowledge Discovery from Data (TKDD)
9, 2 (2014), 8.[188] Pinghui Wang, Yiyan Qi, John CS Lui, Don Towsley, Junzhou Zhao, and Jing Tao. 2017. Inferring Higher-OrderStructure Statistics of Large Networks From Sampled Edges.
IEEE Transactions on Knowledge and Data Engineering (2017).[189] Pinghui Wang, Junzhou Zhao, Xiangliang Zhang, Zhenguo Li, Jiefeng Cheng, John CS Lui, Don Towsley, Jing Tao,and Xiaohong Guan. 2018. MOSS-5: A fast method of approximating counts of 5-node graphlets in large graphs.
IEEETransactions on Knowledge and Data Engineering
30, 1 (2018), 73–86.[190] Tie Wang, Jeffrey W Touchman, Weiyi Zhang, Edward B Suh, and Guoliang Xue. 2005. A parallel algorithm forextracting transcriptional regulatory network motifs. In
Bioinformatics and Bioengineering, 2005. BIBE 2005. Fifth IEEESymposium on . IEEE, 193–200.[191] Stanley Wasserman and Katherine Faust. 1994.
Social network analysis: Methods and applications . Vol. 8. Cambridgeuniversity press.[192] Anatol E Wegner. 2014. Subgraph covers: an information-theoretic approach to motif analysis in networks.
PhysicalReview X
4, 4 (2014), 041026.[193] Sebastian Wernicke. 2005. A faster algorithm for detecting network motifs. In
WABI , Vol. 3692. Springer, 165–177.[194] Sebastian Wernicke. 2006. FANMOD: a tool for fast network motif detection. http://theinf1.informatik.uni-jena.de/motifs/. Accessed: 2019-10-09.[195] Sebastian Wernicke. 2011. Comment on ’An optimal algorithm for counting networks motifs’.
Physica A: StatisticalMechanics and its Applications
390 (2011), 143–145.[196] Sebastian Wernicke and Florian Rasche. 2006. FANMOD: a tool for fast network motif detection.
Bioinformatics
22, 9(2006), 1152–1153.[197] Virginia Vassilevska Williams and Ryan Williams. 2013. Finding, minimizing, and counting weighted subgraphs.
SIAM J. Comput.
42, 3 (2013), 831–854.[198] Elisabeth Wong, Brittany Baur, Saad Quader, and Chun-Hsi Huang. 2012. Biological network motif detection:principles and practice.
Briefings in bioinformatics
13, 2 (2012), 202–215.[199] Peng Wu, Junfeng Wang, and Bin Tian. 2018. Software homology detection with software motifs based on function-callgraph.
IEEE Access
IEEE Access
Evolutionarybioinformatics online
10 (2014), 155.[202] Xifeng Yan and Jiawei Han. 2002. gspan: Graph-based substructure pattern mining. In
IEEE, 721–724.[203] Chen Yang, Min Lyu, Yongkun Li, Qianqian Zhao, and Yinlong Xu. 2018. SSRW: A Scalable Algorithm for EstimatingGraphlet Statistics Based on Random Walk. In
International Conference on Database Systems for Advanced Applications .Springer, 272–288.[204] Esti Yeger-Lotem, Shmuel Sattath, Nadav Kashtan, Shalev Itzkovitz, Ron Milo, Ron Y Pinter, Uri Alon, and HanahMargalit. 2004. Network motifs in integrated cellular networks of transcription–regulation and protein–proteininteraction.
Proceedings of the National Academy of Sciences
BioData mining
8, 1 (2014), 29.[206] Zhao Zhao, Maleq Khan, VS Anil Kumar, and Madhav V Marathe. 2010. Subgraph enumeration in large social contactnetworks using parallel color coding and streaming. In
Parallel Processing (ICPP), 2010 39th International Conferenceon . IEEE, 594–603.[207] Zhao Zhao, Guanying Wang, Ali R Butt, Maleq Khan, VS Anil Kumar, and Madhav V Marathe. 2012. Sahad: Subgraphanalysis in massive networks using hadoop. In
Parallel & Distributed Processing Symposium (IPDPS), 2012 IEEE 26thInternational . IEEE, 390–401.[208] Dongxiao Zhu and Zhaohui S Qin. 2005. Structural comparison of metabolic networks in selected single cell organisms.