betaFeedback

WorksComputer Science

BiLight: A Fast Method for Estimating Counts of 6-Vertex Bipartite Motifs in Large Graphs

Abstract

Motifs, or small subgraphs, are fundamental building blocks of complex networks. Analyzing their frequency distribution provides deep insights into the local structure of graphs, with applications in social network analysis, bioinformatics, and web mining. However, exact enumeration of motifs becomes computationally expensive as the size of the motif and the network increases. This challenge is particularly acute for bipartite motifs, which are ubiquitous in modeling relationships like user-item, author-paper, and actor-movie interactions. In this work, we present BiLight (Bipartite Lightweight motif estimation), a scalable framework for estimating the frequencies of all 17 non-isomorphic 6-vertex bipartite motifs. Specifically, we focus on estimating the non-induced counts of these motifs, which is a common requirement in many graph mining tasks. Our approach relies on a randomized path sampling of paths on four vertices. We use an efficient, weighted strategy by counting the ways that each sampled path can be extended to one of the 17 motifs. This framework yields unbiased estimates of the global motif counts. We conduct extensive experiments on networks of various sizes. Our experiments demonstrate that BiLight converges rapidly to the ground truth with high accuracy, even on massive networks where exact counting is infeasible. The source code is publicly available at https://github.com/celikmustaa/BiLight.

Introduction

MOTIFS are small subgraphs on networks and counting how often they occur is central to network analysis, with uses in biology, the social sciences and the study of large online networks [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]. Motif frequency in real networks is an important feature in comparison to a random network [1], [4], [14]. The frequency distribution of motifs, often called the motif degree distribution or motif profile, provides a powerful signature of the network’s topology. Motif profile is also used as a graph feature to evaluate the performance of graph models representing networks and classify vertex roles [1], [5], [6], [7], [8], [9], [15], [16], [17]. Understanding the local structure of these networks is crucial for tasks like community detection, link prediction, anomaly detection, and graph similarities for graph classification, which have been widely used for a variety of graph mining and learning tasks.

Milo et al. [4] introduced network motifs as subgraphs that occur in real world networks more frequently when compared to random networks. Network motifs have been significant structures in the study of transcriptional regulation networks [18], the analysis of online social networks [17, 19, 20, 21] and internet traffic classification and anomaly detection [22, 23].

Graphlet (motif as induced subgraphs) counts are useful as significant graph features in graph classification and graph similarity comparison. Two widely used measures are the graphlet kernel [24], which scores a pair of graphs by the inner product of their normalized graphlet-count vectors, and the relative graphlet frequency (RGF) distance [6], which sums the absolute differences of the log-scaled relative frequencies. Such comparisons are needed in computational biology, cheminformatics and software analysis, among other fields. For example, protein function prediction problem asks whether a given protein is an enzyme. The topology of a biological network of a protein is used to determine this characteristic of a protein [25, 26]. Similarly, the networks representing chemical compounds are used for predicting activity or adverse effects of potential drugs [27, 28]. Computing similarities of networks using graph models is also useful in community detection and clustering problems. For example, Yanardag and Vishwanathan [29] compute graph similarity to determine the type of a community in online social networks. Further examples on application of graph similarity comparison arise in malware detection, where subroutines and classes in softwares and relationships are represented with a graph model [30, 31, 32] so that similarities between the topologies of these graphs help to identify the malwares.

Motif analysis is used widely in graph mining problems [33, 34, 35]. In these applications, the computation of the motif counts is an expensive process even for moderate size graphs due to the combinatorial explosion of the problem [36, 37]. Despite the progress on counting 4-vertex motifs [39, 40] and 5-vertex motifs [41, 42], little attention has been given to counting 6-vertex motifs: existing work targets a single pattern, such as the induced 6-cycle [43, 44], or general non-bipartite graphlets [45]. While counting 3-vertex or 4-vertex motifs (like triangles in unipartite graphs or butterflies in bipartite graphs) is well-studied, counting larger motifs (e.g., 6 vertices) presents a significant computational challenge. The number of such subgraphs grows combinatorially with the graph size, making exact enumeration impossible for large-scale networks. Consequently, researchers have turned to sampling-based approximation methods [42, 45]. In this work, we present BiLight (Bipartite Lightweight motif estimation), a scalable framework for estimating the non-induced counts of all 17 non-isomorphic 6-vertex bipartite motifs shown in Figure 1. While these motifs are bipartite, the input graph GG need not be; BiLight correctly counts these bipartite substructures within any general graph.

Figure 1. The 17 non-isomorphic 6-vertex bipartite motifs (M1–M17).

Our contribution can be summarized as follows:

  • BiLight’s core contribution is a method to sample paths on four vertices uniformly at random and extend them to estimate 6-vertex bipartite motifs counts. Our method is scalable and computationally efficient.

  • To validate our method, we conduct extensive experiments to show the accuracy of our method. We provide theoretical analysis to show that our framework finds unbiased estimates of 6-vertex bipartite motif counts. To do that, we bound the errors of the estimated counts finding bounds on the variance of the estimator.

  • We conduct experiments on real networks with various scales such as Amazon Ratings (Books), Amazon Ratings (Electronics), IMDB, and Flickr. Our experiments demonstrate that BiLight converges rapidly to the ground truth with high accuracy (the ground truth is approximated by high-sample runs), achieving low relative error and high stability even on massive graphs where exact counting is infeasible. Our empirical comparisons show that BiLight outperforms the state-of-the-art method. To allow the experiments to be repeated independently, we release the source code of BiLight, together with the test suite that checks the local counting patterns against a brute-force oracle.

The rest of this paper is organized as follows. In § 2, we provide necessary notation and terminology. § 3 summarizes the related work. The preprocessing step of our framework is described in § 4. § 5 presents our 6-vertex bipartite motif sampling method BiLight. The performance evaluation and testing results are presented in § 6.

Preliminaries

Let G=(V,E)G = (V, E) be an undirected graph with n=∣V∣n = |V| vertices and m=∣E∣m = |E| edges. For a vertex v∈Vv \in V, let Γ(v)\Gamma(v) denote its neighbor set and d(v)=∣Γ(v)∣d(v) = |\Gamma(v)| its degree. A graph GG is bipartite if its vertex set can be partitioned into two disjoint sets UU and WW such that every edge connects a vertex in UU to a vertex in WW. A motif MM is a small connected graph used as a pattern. An induced subgraph G′=(V′,E′)G' = (V', E') is a subgraph of GG such that E′E' is exactly the set of edges in EE that have both its endpoints in V′V'. For example, the cycle C3C_3 has three copies of P3P_3 as a subgraph, but none of them are induced as the endvertices of these paths are connected with an edge in C3C_3. The non-induced count N(M)N(M) is the number of subgraphs of GG isomorphic to MM (additional edges among the chosen vertices are allowed), whereas the induced count is the number of vertex subsets SS whose induced subgraph G[S]G[S] is isomorphic to MM (no additional edges). A motif counted in the induced sense is commonly called a graphlet. A path (cycle, resp.) on nn vertices is denoted by PnP_n (CnC_n, resp.). Table 1 summarizes the notation used throughout the paper.

SymbolDescription
G=(V,E)G = (V, E)Undirected graph with vertex set VV and edge set EE
n,mn, mNumber of vertices ∣V∣|V| and edges ∣E∣|E|
Γ(v)\Gamma(v)Neighbor set of vertex vv
d(v)d(v)Degree of vertex vv, i.e., ∣Γ(v)∣|\Gamma(v)|
Δ\DeltaMaximum degree in GG
α\alphaArboricity of GG: the minimum number of forests into which GG can be partitioned
PnP_nPath on nn vertices (n−1n - 1 edges)
CnC_nAn nn-cycle (cycle on nn vertices)
N(P4)N(P_4)Non-induced count of P4P_4 in GG
MiM_iThe ii-th bipartite 6-vertex motif (i=1,…,17i = 1, \ldots, 17)
N(M)N(M)Non-induced count of motif MM in GG
N^(M)\hat{N}(M)Estimated non-induced count of motif MM in GG
cMc_MNumber of distinct copies of P4P_4 inside a single instance of motif MM
A,A−1A, A^{-1}Conversion matrices between induced and non-induced counts
kkSample budget: the number of sampled P4P_4
wew_eEdge weight of e=(u,v)e = (u, v) in weighted P4P_4 sampling: (d(u)−1)(d(v)−1)−∣Γ(u)∩Γ(v)∣(d(u) - 1)(d(v) - 1) - |\Gamma(u) \cap\Gamma(v)|
ext⁡(M,P)\operatorname{ext}(M, P)Number of ways a sampled P4P_4 extends to motif MM in GG

Table 1. Notation used throughout the paper.

Related Work

In this section, we review various related works on counting motifs in networks. Subgraph and motif counting is a broad and well-studied area; we refer the reader to Ribeiro et al. [46] for a comprehensive survey.

Exact counting. Triangle counting has received the most attention, exactly [47] as well as by approximation [34, 48]. Gonen and Shavitt [49] give approximation algorithms for the non-induced counts of all 4-vertex motifs, including per-vertex counts, while Marcus and Shavitt [50] count the full set of 4-vertex motifs exactly. More progress and faster algorithms on counting 4-vertex motifs are developed by Ahmed et al. [35, 39] by utilizing the relationships between 3-vertex and 4-vertex motif counts. Pinar et al. [41] compute exact counts of all subgraphs on up to five vertices. Beyond five vertices, exact counting becomes provably hard: Bera et al. [51] show that in bounded-degeneracy graphs (which include most real-world networks) no near-linear-time algorithm can count a pattern containing an induced cycle of length six or more, unless standard fine-grained complexity conjectures fail. This barrier at size six is a central motivation for estimating rather than exactly counting 6-vertex motifs.

Approximating Motif Counts. There have been studies devoted to designing sampling methods for computing motif concentrations [38, 52, 53, 54, 55, 56, 57]. BiLight belongs to a family of sampling-based estimators. Wedge sampling [34, 58, 59] draws random 2-paths and tests for closure to estimate triangle counts and clustering coefficients. Alon et al. [60] propose the method of color-coding that reduces the computation cost by coloring vertices randomly and enumerating only colorful motifs. In [40], path sampling is reported to run hundreds of times faster than color coding on graphs with about a million edges, at comparable accuracy. In [61, 62, 63, 64], sampling method is used to estimate the number of triangles of static and dynamic graphs. Jha et al. [40] generalize this to path sampling, selecting random 3-paths (P4P_4) to estimate the counts of all 4-vertex subgraphs with provable error bounds. Wang et al. [42] design a sampling algorithm to estimate the counts of 5-vertex motifs. For larger patterns, Bressan et al. [45] use color coding to estimate induced counts of 5- to 8-vertex graphlets in general graphs; their tool Motivo [65, 66, 67] speeds this up with succinct data structures and adaptive sampling. BiLight extends the path-sampling paradigm one step further, sampling P4P_4 subgraphs and extending each to estimate all 6-vertex bipartite motifs simultaneously.

Preprocessing

BiLight estimates the non-induced count of each 6-vertex bipartite motif in two phases: preprocessing (Algorithm 1) builds an alias table for uniform P4P_4 sampling, and estimation (Algorithm 2) draws kk random P4P_4 subgraphs and accumulates local extension counts. The seed structure is a P4P_4, which is common to 16 of the 17 motifs (all except the star M12M_{12}).

Claim 1. For any path PP on 4 vertices, the probability that PP is picked in Algorithm 2 is 1/N(P4)1/N(P_4).

Proof. Let PP be a path on distinct vertices (v0,v1,v2,v3)(v_0,v_1,v_2,v_3) with central edge e={v1,v2}e=\{v_1,v_2\} and extension vertices {v0,v3}\{v_0,v_3\}, and let

we:=(d(v1)−1)(d(v2)−1)−∣Γ(v1)∩Γ(v2)∣.w_e := (d(v_1)-1)(d(v_2)-1)-|\Gamma(v_1)\cap\Gamma(v_2)|.

so that N(P4)=∑e∈EweN(P_4)=\sum_{e\in E}w_e. Indeed, the product counts the ordered pairs (v0,v3)∈(Γ(v1)∖{v2})×(Γ(v2)∖{v1})(v_0,v_3)\in(\Gamma(v_1)\setminus\{v_2\})\times(\Gamma(v_2)\setminus\{v_1\}), and the subtracted term removes the degenerate pairs with v0=v3v_0=v_3: these are exactly the common neighbors of v1v_1 and v2v_2, and they close a triangle instead of forming a P4P_4. On a triangle-free host—in particular a bipartite one—this term vanishes and we=(d(v1)−1)(d(v2)−1)w_e=(d(v_1)-1)(d(v_2)-1).

To draw PP uniformly at random among all P4P_4’s, we apply the following steps: (i) select a central edge ee with probability we/N(P4)w_e/N(P_4); (ii) select v0v_0 uniformly at random from Γ(v1)∖{v2}\Gamma(v_1)\setminus\{v_2\} and v3v_3 uniformly at random from Γ(v2)∖{v1}\Gamma(v_2)\setminus\{v_1\}; and (iii) if v0=v3v_0=v_3, reject the pair and repeat step (ii). Step (ii) draws each of the (d(v1)−1)(d(v2)−1)(d(v_1)-1)(d(v_2)-1) ordered pairs with equal probability, so conditioning on acceptance leaves each of the wew_e valid pairs equally likely, that is, with probability 1/we1/w_e. These steps yield

Pr⁡(P)=weN(P4)⋅1we=1N(P4).\Pr(P)=\frac{w_e}{N(P_4)}\cdot\frac{1}{w_e}=\frac{1}{N(P_4)}.
Algorithm 1: BiLight: Preprocessing

Input: Graph G = (V, E) with edges
       E = {e_1, …, e_m}
Output: Arrays prob[i], alias[i] for i = 1, …, m;
        total P_4 count N(P_4)

foreach edge e_i = (u, v) ∈ E do
    w_{e_i} ← (d(u) − 1)(d(v) − 1) − |Γ(u) ∩ Γ(v)|
        // number of P_4 centered at e_i
N(P_4) ← ∑_{i=1}^m w_{e_i}
for i ← 1 to m do
    q_i ← m w_{e_i}/N(P_4)  // scaled by m so the mean is 1
Small ← {i : q_i < 1};  Large ← {i : q_i ≥ 1}
while Small and Large are both non-empty do
    remove an index s from Small and an index ℓ from Large
    prob[s] ← q_s;  alias[s] ← ℓ
    q_ℓ ← q_ℓ − (1 − q_s)  // bin ℓ covers the shortfall of bin s
    if q_ℓ < 1 then
        move ℓ to Small
    else
        move ℓ to Large
foreach index i remaining in Small or Large do
    prob[i] ← 1
return prob[·], alias[·], N(P_4)

Rejecting the whole pair (rather than redrawing a single endpoint) is what keeps the accepted path uniform. The step also is inexpensive. Write a=d(v1)−1a=d(v_1)-1, b=d(v2)−1b=d(v_2)-1 and c=∣Γ(v1)∩Γ(v2)∣c=|\Gamma(v_1)\cap\Gamma(v_2)|, so that we=ab−cw_e=ab-c and the acceptance probability is 1−c/(ab)1-c/(ab). If max⁡(a,b)≥2\max(a,b)\ge2 then c≤min⁡(a,b)c\le\min(a,b) gives c/(ab)≤1/max⁡(a,b)≤1/2c/(ab)\le1/\max(a,b)\le1/2; and if a=b=1a=b=1 then we≥0w_e\ge0 forces c=0c=0, so the draw is always accepted. Hence every edge with we>0w_e>0 is accepted with probability at least 1/21/2, and the expected number of draws is at most two. In practice the step is far cheaper than this bound: across the twelve non-bipartite datasets of Table 3 the rejection fires on at most 3% of draws (com-amazon, the most triangle-dense of the set), and never on a bipartite host, where Γ(v1)∩Γ(v2)=∅\Gamma(v_1)\cap\Gamma(v_2)=\varnothing for every edge. □\square

DatasetVerticesEdgesP4P_4 CountRuntime (k=5Kk=5\mathrm{K})Source
Bipartite
Amazon (Electronics)4.5M7.7M25.8B12 s[69, 70, 71]
Amazon (Books)10.0M22.3M352.0B72 s[69, 70, 71]
IMDB1.2M3.8M4.6B2 s[72]
Flickr470.3K8.5M2.6T232 s[73]
Additional non-bipartite
wordassociation10.6K63.8K79.2M1 s[74, 75, 76]
facebook-wall44.0K182.4K126.3M1 s[77, 78]
facebook-links63.4K816.9K7.5B9 s[77, 78]
com-amazon.ungraph334.9K925.9K81.0M<1 s[79]
com-dblp.ungraph317.1K1.0M675.6M4 s[79]
web-BerkStan654.8K6.6M1.7T340 s[79]
as-skitter1.7M11.1M1.4T350 s[79]
cit-Patents3.8M16.5M9.1B3 s[79]
livejournal5.4M49.5M2.6T106 s[74, 75, 76]
hollywood1.1M56.3M60.2T3,326 s[74, 75, 76]
soc-orkut3.0M106.3M16.3T298 s[80]
orkut-links3.1M117.2M22.2T564 s[81, 82]

Table 3. Datasets used in experiments. Vertex and edge counts refer to the largest connected component (LCC) where applicable. P4P_4 Count is the number of P4P_4 subgraphs in the graph (sampling space). Runtime (k=5Kk=5\mathrm{K}) is BiLight’s estimation time at sample budget k=5Kk=5\mathrm{K} in seconds, excluding the one-time graph setup; bipartite values are averages over independent runs. The Flickr file is a mixed user–user and user–group graph; we keep only the user–group edges, which makes it bipartite.

It remains to implement the weighted edge draw of step (i) efficiently. A textbook solution stores the prefix sums of the we/N(P4)w_e/N(P_4) and binary-searches a uniform random value for each draw, costing O(log⁡m)O(\log m) per sample for a graph with mm edges. Because BiLight draws up to millions of paths, we instead use Walker’s Alias Method [68], as described in Algorithm 1, which reduces the cost of each draw to O(1)O(1). Let p:E→[0,1]p:E\to[0,1] be a probability distribution. To draw an edge from E={e1,…,em}E=\{e_1,\ldots,e_m\} we pick i∈{1,…,m}i\in\{1,\ldots,m\} and a value r∈[0,1)r\in[0,1), both uniformly at random. If r<prob⁡[i]r<\operatorname{prob}[i] we return the edge eie_i, otherwise we return its alias, the edge ealias⁡[i]e_{\operatorname{alias}[i]}. A single index draw plus one comparison thus return an edge with the intended probability p(e)p(e).

Motifext⁡(M,P)\operatorname{ext}(M,P)
M1IC4⋅∑u∈IL∣Γ(u)∩IR∣\mathbb{I}_{C_4}\cdot\sum_{u\in I_L}|\Gamma(u)\cap I_R|
M2IC4⋅(∣IL∣2+∣IR∣2)\mathbb{I}_{C_4}\cdot\left(\frac{|I_L|}{2}+\frac{|I_R|}{2}\right)
M3E(IL,IR)+IC4⋅(∑u∈IL(∣Γ(u)∩Γ′(v0)∣+∣Γ(u)∩Γ′(v2)∣)+∑u∈IR(∣Γ(u)∩Γ′(v1)∣+∣Γ(u)∩Γ′(v3)∣)+∣IL∣∣IR∣−∣IL∩IR∣)E(I_L,I_R)+\mathbb{I}_{C_4}\cdot\left(\sum_{u\in I_L}\left(|\Gamma(u)\cap\Gamma'(v_0)|+|\Gamma(u)\cap\Gamma'(v_2)|\right)+\sum_{u\in I_R}\left(|\Gamma(u)\cap\Gamma'(v_1)|+|\Gamma(u)\cap\Gamma'(v_3)|\right)+|I_L||I_R|-|I_L\cap I_R|\right)
M4(∣IL∣2+∣IR∣2)+IC4⋅(∣IL∣(d′(v1)+d′(v3)−2)+∣IR∣(d′(v0)+d′(v2)−2))\left(\frac{|I_L|}{2}+\frac{|I_R|}{2}\right)+\mathbb{I}_{C_4}\cdot\left(|I_L|(d'(v_1)+d'(v_3)-2)+|I_R|(d'(v_0)+d'(v_2)-2)\right)
M5∑u∈IL∣Γ′(u)∩Γ′(v2)∣+∑u∈IR∣Γ′(u)∩Γ′(v1)∣+IC4⋅(∑u∈ILd′(u)+∑u∈IRd′(u)+∑u∈IL(d′(v0)+d′(v2)−I(u∈Γ(v0))−I(u∈Γ(v2)))+∑u∈IR(d′(v1)+d′(v3)−I(u∈Γ(v1))−I(u∈Γ(v3))))\sum_{u\in I_L}|\Gamma'(u)\cap\Gamma'(v_2)|+\sum_{u\in I_R}|\Gamma'(u)\cap\Gamma'(v_1)|+\mathbb{I}_{C_4}\cdot\left(\sum_{u\in I_L}d'(u)+\sum_{u\in I_R}d'(u)+\sum_{u\in I_L}(d'(v_0)+d'(v_2)-\mathbb{I}(u\in\Gamma(v_0))-\mathbb{I}(u\in\Gamma(v_2)))+\sum_{u\in I_R}(d'(v_1)+d'(v_3)-\mathbb{I}(u\in\Gamma(v_1))-\mathbb{I}(u\in\Gamma(v_3)))\right)
M6E(IR,Γ′(v3))+E(IL,Γ′(v0))+∣IL∣∣IR∣−∣IL∩IR∣+IC4⋅(E(Γ′(v1),Γ′(v0))+E(Γ′(v1),Γ′(v2))+E(Γ′(v3),Γ′(v0))+E(Γ′(v3),Γ′(v2)))E(I_R,\Gamma'(v_3))+E(I_L,\Gamma'(v_0))+|I_L||I_R|-|I_L\cap I_R|+\mathbb{I}_{C_4}\cdot\left(E(\Gamma'(v_1),\Gamma'(v_0))+E(\Gamma'(v_1),\Gamma'(v_2))+E(\Gamma'(v_3),\Gamma'(v_0))+E(\Gamma'(v_3),\Gamma'(v_2))\right)
M7∣IL∣(d′(v1)−1)+∣IR∣(d′(v2)−1)+IC4⋅∑i=03d′(vi)|I_L|(d'(v_1)-1)+|I_R|(d'(v_2)-1)+\mathbb{I}_{C_4}\cdot\sum_{i=0}^{3}d'(v_i)
M8∑u∈Γ′(v1)∣Γ(u)∩Γ′(v2)∣+∑u∈ILd′(u)+∑u∈IRd′(u)+∑u∈IL(d′(v2)−I(u∈Γ(v2)))+∑u∈IR(d′(v1)−I(u∈Γ(v1)))+IC4⋅(d′(v0)d′(v1)+d′(v1)d′(v2)+d′(v2)d′(v3)+d′(v3)d′(v0)−∣Γ′(v0)∩Γ′(v1)∣−∣Γ′(v1)∩Γ′(v2)∣−∣Γ′(v2)∩Γ′(v3)∣−∣Γ′(v3)∩Γ′(v0)∣)\sum_{u\in\Gamma'(v_1)}|\Gamma(u)\cap\Gamma'(v_2)|+\sum_{u\in I_L}d'(u)+\sum_{u\in I_R}d'(u)+\sum_{u\in I_L}(d'(v_2)-\mathbb{I}(u\in\Gamma(v_2)))+\sum_{u\in I_R}(d'(v_1)-\mathbb{I}(u\in\Gamma(v_1)))+\mathbb{I}_{C_4}\cdot\left(d'(v_0)d'(v_1)+d'(v_1)d'(v_2)+d'(v_2)d'(v_3)+d'(v_3)d'(v_0)-|\Gamma'(v_0)\cap\Gamma'(v_1)|-|\Gamma'(v_1)\cap\Gamma'(v_2)|-|\Gamma'(v_2)\cap\Gamma'(v_3)|-|\Gamma'(v_3)\cap\Gamma'(v_0)|\right)
M9∣IL∣(d′(v3)−1)+∣IR∣(d′(v0)−1)+IC4⋅(d′(v1)d′(v3)−∣IL∣+d′(v0)d′(v2)−∣IR∣)|I_L|(d'(v_3)-1)+|I_R|(d'(v_0)-1)+\mathbb{I}_{C_4}\cdot\left(d'(v_1)d'(v_3)-|I_L|+d'(v_0)d'(v_2)-|I_R|\right)
M10∑u∈IL(d′(v0)−I(u∈Γ(v0)))+∑u∈IR(d′(v3)−I(u∈Γ(v3)))+E(Γ′(v0),Γ′(v1))+E(Γ′(v3),Γ′(v2))+IC4⋅∑i=03∑u∈Γ′(vi)d′(u)\sum_{u\in I_L}(d'(v_0)-\mathbb{I}(u\in\Gamma(v_0)))+\sum_{u\in I_R}(d'(v_3)-\mathbb{I}(u\in\Gamma(v_3)))+E(\Gamma'(v_0),\Gamma'(v_1))+E(\Gamma'(v_3),\Gamma'(v_2))+\mathbb{I}_{C_4}\cdot\sum_{i=0}^{3}\sum_{u\in\Gamma'(v_i)}d'(u)
M11∑u∈Γ′(v0)∣Γ(u)∩Γ′(v3)∣\sum_{u\in\Gamma'(v_0)}|\Gamma(u)\cap\Gamma'(v_3)|
M13d′(v1)2+d′(v2)2\frac{d'(v_1)}{2}+\frac{d'(v_2)}{2}
M14d′(v1)d′(v2)−∣Γ′(v1)∩Γ′(v2)∣d'(v_1)d'(v_2)-|\Gamma'(v_1)\cap\Gamma'(v_2)|
M15∑u∈Γ′(v1)d′(u)+∑u∈Γ′(v2)d′(u)+(d′(v1)d′(v0)−∣Γ′(v1)∩Γ′(v0)∣)+(d′(v2)d′(v3)−∣Γ′(v2)∩Γ′(v3)∣)\sum_{u\in\Gamma'(v_1)}d'(u)+\sum_{u\in\Gamma'(v_2)}d'(u)+(d'(v_1)d'(v_0)-|\Gamma'(v_1)\cap\Gamma'(v_0)|)+(d'(v_2)d'(v_3)-|\Gamma'(v_2)\cap\Gamma'(v_3)|)
M16d′(v0)2+d′(v3)2+d′(v1)d′(v3)−∣IL∣+d′(v0)d′(v2)−∣IR∣\frac{d'(v_0)}{2}+\frac{d'(v_3)}{2}+d'(v_1)d'(v_3)-|I_L|+d'(v_0)d'(v_2)-|I_R|
M17d′(v0)d′(v3)−∣Γ′(v0)∩Γ′(v3)∣+∑u∈Γ′(v0)d′(u)+∑u∈Γ′(v3)d′(u)d'(v_0)d'(v_3)-|\Gamma'(v_0)\cap\Gamma'(v_3)|+\sum_{u\in\Gamma'(v_0)}d'(u)+\sum_{u\in\Gamma'(v_3)}d'(u)

Sampling Algorithm

In Algorithm 2, ext⁡(M,P)\operatorname{ext}(M,P) denotes the number of ways a sampled P4P_4 can be extended to an occurrence of motif MM in GG, and cMc_M is the number of distinct copies of P4P_4 inside a single instance of MM. Many of the expressions in Table 2 have two additive components: a path term that is always evaluated, and a cycle term multiplied by IC4\mathbb{I}_{C_4}, which contributes only when the seed path closes into a C4C_4. Motif M12M_{12} is the six-vertex star K1,5K_{1,5}; its count is obtained directly from the degree sequence as ∑v(d(v)5)\sum_v\binom{d(v)}{5}, so it is excluded from sampling.

Motifext⁡(M,P)\operatorname{ext}(M,P)
M1IC4⋅∑u∈IL∣Γ(u)∩IR∣\mathbb{I}_{C_4}\cdot\sum_{u\in I_L}|\Gamma(u)\cap I_R|
M2IC4⋅(∣IL∣2+∣IR∣2)\mathbb{I}_{C_4}\cdot\left(\frac{|I_L|}{2}+\frac{|I_R|}{2}\right)
M3E(IL,IR)+IC4⋅(⋯ )E(I_L,I_R)+\mathbb{I}_{C_4}\cdot\left(\cdots\right)
M4(∣IL∣2+∣IR∣2)+IC4⋅(⋯ )\left(\frac{|I_L|}{2}+\frac{|I_R|}{2}\right)+\mathbb{I}_{C_4}\cdot\left(\cdots\right)
M5∑u∈IL∣Γ′(u)∩Γ′(v2)∣+⋯\sum_{u\in I_L}|\Gamma'(u)\cap\Gamma'(v_2)|+\cdots
M6E(IR,Γ′(v3))+E(IL,Γ′(v0))+⋯E(I_R,\Gamma'(v_3))+E(I_L,\Gamma'(v_0))+\cdots
M7∣IL∣(d′(v1)−1)+∣IR∣(d′(v2)−1)+⋯|I_L|(d'(v_1)-1)+|I_R|(d'(v_2)-1)+\cdots
M8∑u∈Γ′(v1)∣Γ(u)∩Γ′(v2)∣+⋯\sum_{u\in\Gamma'(v_1)}|\Gamma(u)\cap\Gamma'(v_2)|+\cdots
M9∣IL∣(d′(v3)−1)+∣IR∣(d′(v0)−1)+⋯|I_L|(d'(v_3)-1)+|I_R|(d'(v_0)-1)+\cdots
M10∑u∈IL(d′(v0)−I(u∈Γ(v0)))+⋯\sum_{u\in I_L}(d'(v_0)-\mathbb{I}(u\in\Gamma(v_0)))+\cdots
M11∑u∈Γ′(v0)∣Γ(u)∩Γ′(v3)∣\sum_{u\in\Gamma'(v_0)}|\Gamma(u)\cap\Gamma'(v_3)|
M13d′(v1)2+d′(v2)2\frac{d'(v_1)}{2}+\frac{d'(v_2)}{2}
M14d′(v1)d′(v2)−∣Γ′(v1)∩Γ′(v2)∣d'(v_1)d'(v_2)-|\Gamma'(v_1)\cap\Gamma'(v_2)|
M15∑u∈Γ′(v1)d′(u)+∑u∈Γ′(v2)d′(u)+⋯\sum_{u\in\Gamma'(v_1)}d'(u)+\sum_{u\in\Gamma'(v_2)}d'(u)+\cdots
M16d′(v0)2+d′(v3)2+d′(v1)d′(v3)−∣IL∣+⋯\frac{d'(v_0)}{2}+\frac{d'(v_3)}{2}+d'(v_1)d'(v_3)-|I_L|+\cdots
M17d′(v0)d′(v3)−∣Γ′(v0)∩Γ′(v3)∣+⋯d'(v_0)d'(v_3)-|\Gamma'(v_0)\cap\Gamma'(v_3)|+\cdots

Table 2. Local counting patterns for a general host (bipartite or non-bipartite): the closed-form expression for ext⁡(M,P)\operatorname{ext}(M,P) for each motif.

We relabel the vertices of the P4P_4 sampled in Algorithm 2 in path order as P=(v0,v1,v2,v3)P=(v_0,v_1,v_2,v_3), with v0v_0 and v3v_3 the endpoints, and compute ext⁡(M,P)\operatorname{ext}(M,P) for each motif MM. Each P4P_4 can potentially be extended to a 6-vertex motif by adding two more vertices from the neighborhoods of the path vertices. We derive a closed-form expression for each motif; Table 2 lists all of them. These expressions use neighborhood intersections, edge counts between vertex sets, and vertex degrees.

We use the following auxiliary definitions in Table 2. For a vertex uu, let Γ′(u)=Γ(u)∖{v0,v1,v2,v3}\Gamma'(u)=\Gamma(u)\setminus\{v_0,v_1,v_2,v_3\} be the neighbors of uu that lie off the path, and d′(u)=∣Γ′(u)∣d'(u)=|\Gamma'(u)|. We define two filtered intersection sets:

IL=Γ(v1)∩Γ(v3)∖{v0,v2},I_L=\Gamma(v_1)\cap\Gamma(v_3)\setminus\{v_0,v_2\},
IR=Γ(v0)∩Γ(v2)∖{v1,v3}.I_R=\Gamma(v_0)\cap\Gamma(v_2)\setminus\{v_1,v_3\}.

Let the indicator IC4\mathbb{I}_{C_4} equals 1 when v0v_0 is adjacent to v3v_3, and 0 otherwise. Similarly, I(Q)\mathbb{I}(Q) represents the indicator variable for a proposition QQ. We also use the notation E(U,W):=∣{(u,w)∈E:u∈U,w∈W}∣E(U,W):=|\{(u,w)\in E:u\in U,w\in W\}|. We compute this efficiently by iterating over the smaller set and probing the larger set’s adjacency, stored as a hash set. The same asymmetry-aware strategy applies to all intersection and edge-count computations throughout the local counting: when comparing two sets of different sizes, we always iterate over the smaller one.

Although our motifs are bipartite, neither the sampler nor the counting patterns assume a bipartite host. The edge weight wew_e of Algorithm 1 and the rejection step in the proof of Claim 1 already discount the triangles through each central edge, so a uniformly random P4P_4 is drawn on any input graph. The patterns of Table 2 are stated in the same generality: the adjacency indicators I(u∈Γ(vi))\mathbb{I}(u\in\Gamma(v_i)) and the intersection corrections such as −∣IL∩IR∣-|I_L\cap I_R| and −∣Γ′(vi)∩Γ′(vj)∣-|\Gamma'(v_i)\cap\Gamma'(v_j)| exclude the same-side adjacencies and triangles that a bipartite host rules out by construction. On a bipartite host every one of these terms is zero, and each expression reduces to its simpler bipartite form.

Algorithm 2: BiLight: Estimation

Input: GG; Arrays prob⁡[i]\operatorname{prob}[i], alias⁡[i]\operatorname{alias}[i] for i=1,…,mi=1,\ldots,m and N(P4)N(P_4) from Algorithm 1; sample budget kk

Output: Estimated counts N^(M1),…,N^(M17)\widehat{N}(M_1),\ldots,\widehat{N}(M_{17})

sj←0s_j\leftarrow0 for j≠12j\ne12; N^(M12)←∑v(d(v)5)\widehat{N}(M_{12})\leftarrow\sum_v\binom{d(v)}{5}

for t←1t\leftarrow1 to kk do

Sample edge e=(u,v)e=(u,v) with probability we/N(P4)w_e/N(P_4)

repeat

Pick u′∈Γ(u)∖{v}u'\in\Gamma(u)\setminus\{v\} uniformly at random

Pick v′∈Γ(v)∖{u}v'\in\Gamma(v)\setminus\{u\} uniformly at random

until u′≠v′u'\ne v'

// u′−v′u'-v' closes a triangle, not a P4P_4

P←(u′,u,v,v′)P\leftarrow(u',u,v,v')

foreach motif MjM_j, j≠12j\ne12 do

sj←sj+ext⁡(Mj,P)/cMjs_j\leftarrow s_j+\operatorname{ext}(M_j,P)/c_{M_j}

// Table 2 provides ext⁡(Mj,P)\operatorname{ext}(M_j,P)

for j←1j\leftarrow1 to 1717, j≠12j\ne12 do

N^(Mj)←N(P4)k⋅sj\widehat{N}(M_j)\leftarrow\frac{N(P_4)}{k}\cdot s_j

return N^(M1),…,N^(M17)\widehat{N}(M_1),\ldots,\widehat{N}(M_{17})

Lemma 1. For any motif M=MiM=M_i with i≠12i\ne12, the estimator is unbiased, E[N^(M)]=N(M)\mathbb{E}[\widehat{N}(M)]=N(M), and

Var⁡[N^(M)]≤1kN(P4)cM(N(M)+p),\operatorname{Var}[\widehat{N}(M)]\le\frac{1}{k}\frac{N(P_4)}{c_M}\left(N(M)+p\right),

where pp is the number of ordered pairs of MM-instances that share a P4P_4 seed. Thus, our estimator yields an (ϵ,δ)(\epsilon,\delta)-estimator by taking the median of O(log⁡(1/δ))O(\log(1/\delta)) estimators.

Proof. Let P\mathcal{P} denote the set of all P4P_4 subgraphs in GG, so ∣P∣=N(P4)|\mathcal{P}|=N(P_4). The estimator for the non-induced count of motif MM scales the average local count by the total number N(P4)N(P_4) of paths:

N^(M)=N(P4)k∑t=1kext⁡(M,Pt)cM\widehat{N}(M)=\frac{N(P_4)}{k}\sum_{t=1}^{k}\frac{\operatorname{ext}(M,P_t)}{c_M}

By Claim 1:

E[N^(M)]=N(P4)k∑t=1kE[ext⁡(M,Pt)cM]=N(P4)cM∑P∈PPr⁡(P)⋅ext⁡(M,P)=1cM∑P∈Pext⁡(M,P)=N(M).\begin{aligned} \mathbb{E}[\widehat{N}(M)]&=\frac{N(P_4)}{k}\sum_{t=1}^{k}\mathbb{E}\left[\frac{\operatorname{ext}(M,P_t)}{c_M}\right]\\ &=\frac{N(P_4)}{c_M}\sum_{P\in\mathcal{P}}\Pr(P)\cdot\operatorname{ext}(M,P)\\ &=\frac{1}{c_M}\sum_{P\in\mathcal{P}}\operatorname{ext}(M,P)=N(M). \end{aligned}

The last equality follows from the fact that every instance of motif MM in GG contains exactly cMc_M distinct copies of P4P_4, thus yielding ∑P∈Pext⁡(M,P)=cM⋅N(M)\sum_{P\in\mathcal{P}}\operatorname{ext}(M,P)=c_M\cdot N(M).

For the variance, consider a single draw Y=N(P4)ext⁡(M,P)/cMY=N(P_4)\operatorname{ext}(M,P)/c_M; as the kk paths are drawn independently (with replacement), N^(M)\widehat{N}(M) is the average of kk i.i.d. copies of YY. Let XiX_i indicate that the iith copy of MM, 1≤i≤N(M)1\le i\le N(M), contains the drawn path.

Var⁡[Y]=Var⁡[N(P4)cM∑i=1N(M)Xi]\operatorname{Var}[Y]=\operatorname{Var}\left[\frac{N(P_4)}{c_M}\sum_{i=1}^{N(M)}X_i\right]
=N(P4)2cM2Var⁡[∑i=1N(M)Xi]=N(P4)2cM2[∑i=1N(M)Var⁡[Xi]+∑i≠jCov⁡(Xi,Xj)]=N(P4)2cM2[N(M)(cMN(P4)−cM2N(P4)2)+∑i≠j(E[XiXj]−E[Xi]E[Xj])].(1)\begin{aligned} &=\frac{N(P_4)^2}{c_M^2}\operatorname{Var}\left[\sum_{i=1}^{N(M)}X_i\right]\\ &=\frac{N(P_4)^2}{c_M^2}\left[\sum_{i=1}^{N(M)}\operatorname{Var}[X_i]+\sum_{i\ne j}\operatorname{Cov}(X_i,X_j)\right]\\ &=\frac{N(P_4)^2}{c_M^2}\left[N(M)\left(\frac{c_M}{N(P_4)}-\frac{c_M^2}{N(P_4)^2}\right)+\sum_{i\ne j}\left(\mathbb{E}[X_iX_j]-\mathbb{E}[X_i]\mathbb{E}[X_j]\right)\right]. \tag*{(1)} \end{aligned}

We only consider the pairs {Xi,Xj}\{X_i,X_j\} that share at least one seed path, since otherwise E[XiXj]=0\mathbb{E}[X_iX_j]=0 and Cov⁡(Xi,Xj)≤0\operatorname{Cov}(X_i,X_j)\le0. If instances i,ji,j share aija_{ij} seed paths, then E[XiXj]=Pr⁡[Xi=1]Pr⁡[Xj=1∣Xi=1]=cMN(P4)aijcM=aijN(P4)\mathbb{E}[X_iX_j]=\Pr[X_i=1]\Pr[X_j=1\mid X_i=1]=\frac{c_M}{N(P_4)}\frac{a_{ij}}{c_M}=\frac{a_{ij}}{N(P_4)}, so

Cov⁡(Xi,Xj)=aijN(P4)−cM2N(P4)2.\operatorname{Cov}(X_i,X_j)=\frac{a_{ij}}{N(P_4)}-\frac{c_M^2}{N(P_4)^2}.

Using aij≤cMa_{ij}\le c_M and ignoring the negative contributions, we obtain

Var⁡[Y]≤N(P4)cM(N(M)+p),\operatorname{Var}[Y]\le\frac{N(P_4)}{c_M}(N(M)+p),

and Var⁡[N^(M)]=Var⁡[Y]/k\operatorname{Var}[\widehat{N}(M)]=\operatorname{Var}[Y]/k by independence, which is the stated bound. Let k=8N(P4)(N(M)+p)cMϵ2N(M)2k=\frac{8N(P_4)(N(M)+p)}{c_M\epsilon^2N(M)^2}. Chebyshev’s inequality then yields

Pr⁡[∣N^(M)−N(M)∣≥ϵN(M)]≤Var⁡[N^(M)]ϵ2N(M)2≤N(P4)(N(M)+p)cMkϵ2N(M)2=18.\begin{aligned} \Pr\left[|\widehat{N}(M)-N(M)|\ge\epsilon N(M)\right]\le\frac{\operatorname{Var}[\widehat{N}(M)]}{\epsilon^2N(M)^2} \\ &\le\frac{N(P_4)(N(M)+p)}{c_Mk\epsilon^2N(M)^2}=\frac{1}{8}. \end{aligned}

So, we can turn this estimator into an (ϵ,δ)(\epsilon,\delta)-estimator by taking the median of O(log⁡(1/δ))O(\log(1/\delta)) estimators. □\square

Claim 2. For a graph with maximum degree Δ\Delta, arboricity α\alpha, nn vertices and mm edges, the running time and total storage

(including all preprocessing) of BiLight are O(αm+kΔ2)O(\alpha m + k\Delta^{2}) and O(n+m)O(n + m), respectively.

Proof. Preprocessing (Algorithm 1) builds the edge weights and the alias table. The weight of each edge requires ∣Γ(u)∩Γ(v)∣|\Gamma(u) \cap\Gamma(v)|, so preprocessing costs O(∑(u,v)∈Emin⁡(d(u),d(v)))O\left(\sum_{(u,v)\in E} \min(d(u), d(v))\right), the usual bound for enumerating triangles, which is O(αm)O(\alpha m) for a graph of arboricity α\alpha [47]. Our implementation first tests bipartiteness in O(n+m)O(n+m) and skips the intersections on a bipartite host, where they are all empty, reducing this step to O(m)O(m). This is a one-time cost, independent of the sample budget kk. Each sample costs O(1)O(1) to draw and O(Δ2)O(\Delta^{2}) to score: the patterns of Table 2 reduce to adjacency-list intersections, each O(Δ)O(\Delta) with hash sets, and those that sum an intersection over a neighbor set (e.g., M11) need O(Δ)O(\Delta) of them. The total time for kk samples is therefore O(αm+kΔ2)O(\alpha m+k\Delta^{2}), linear in the sample budget, whereas exact enumeration over 6-vertex tuples scales with O(Δ4)O(\Delta^{4}) or worse and is prohibitive on large graphs. Figure 7 in Appendix A confirms the linear dependence on kk empirically.

The storage budget is independent of kk. The adjacency-list representation of GG requires O(n+m)O(n + m) space. Our implementation additionally keeps an explicit list of the mm edges when constructing the edge weight wew_e for each edge ee. The two alias arrays prob[ ⋅ ]prob[\,\cdot\,] and alias[ ⋅ ]alias[\,\cdot\,] add O(m)O(m) words. Between samples, BiLight updates only a fixed set of motif accumulators (one per motif), and the temporary structures used during local counting (e.g., neighbor-set intersections) are O(Δ)O(\Delta) in the worst case and are reused across the kk iterations rather than accumulated.

Remark 1. At small sample budgets, the running time is dominated by the one-time preprocessing.

On IMDB, for instance, setup takes about 10 s while estimation at k=10k = 10 takes under 30 ms. Figure 7 (Appendix A) plots estimation time alone, which grows linearly in kk from the smallest budget; its small irregularities reflect that the cost of scoring a sampled P4P_4 varies with the degrees of its vertices, not a deviation from the O(αm+kΔ2)O(\alpha m + k\Delta^{2}) bound.

Figure 7. BiLight runtime analysis; each of the four panels plots estimation time (one-time setup excluded) against a different quantity. Top row (log scales): runtime vs. largest connected component vertex count (left) and runtime vs. edge count (right). Bottom row: runtime vs. P4P_4 count (left) and runtime vs. sample budget kk (right). The vertex-count, edge-count, and P4P_4-count panels use the bipartite datasets only; in the sample-budget panel, solid lines are the bipartite datasets and dashed lines are the four large non-bipartite graphs of Figure 4.

Experimental Evaluation

All experiments (BiLight and Motivo [65], [66], [67]) were run on a single machine: an Intel Core i7-10750H CPU at 2.60 GHz (6 cores), 32 GB RAM, running Windows 11 Enterprise. The BiLight implementation used to produce these results is available as open source code at github.com/celikmustafa/BiLight.

BiLight runs on any undirected graph and estimates the counts of the 17 bipartite 6-vertex motifs as subgraphs of that graph. As listed in Table 3, we use four large bipartite datasets: Amazon Ratings (Books and Electronics), IMDB (actor–movie), and Flickr (user–group) and middle to large-scale nonbipartite graphs. Table 3 lists all datasets; the top block is bipartite, restricted to the largest connected component (LCC).

Induced and non-induced Motifs

Using BiLight, we are able to obtain the counts of non-induced copies of the motifs in Figure 1 on bipartite as well as nonbipartite networks. As observed in [41], one can formalize a linear relationship between induced and non-induced counts of motifs in a network. We generalize this idea for our framework, by letting CC and NN denote the vectors with 17 entries, where for each ii, CiC_i and NiN_i denotes the number of induced and non-induced copies of motif MiM_i, respectively. We provide in Appendix B, the 17×1717 \times17 matrix AA such that N=ACN = AC on any given bipartite network, where Ai,jA_{i,j} indicates the number of (non-induced) copies of motif MiM_i appearing in an instance of motif MjM_j. Reversely, one can obtain CC given NN by the relation C=A−1NC = A^{-1}N. For a suitable motif ordering AA is lower triangular. Using this conversion, we are able to obtain the counts of induced copies of each motif in Figure 1 on bipartite networks, which we use for comparison of our results with state of the art algorithms.

Performance and Comparison with previous work

Since exact counting is infeasible, we define ground truth as BiLight’s estimate at k=100k = 100K. For the bipartite datasets, which have five independent runs at each budget, we average the runs’ estimates at both the target and the reference budget before computing the error; for the non-bipartite single-run experiments, the k=100Kk = 100\mathrm{K} value serves directly as the reference. We measure accuracy using the Average Distance Error: the mean, over the 16 non-trivial motifs (M12 is excluded), of the per-motif relative error ∣N^(Mi)−Nref(Mi)∣/Nref(Mi)\lvert\widehat{N}(M_i)-N^{\mathrm{ref}}(M_i)\rvert/N^{\mathrm{ref}}(M_i). Table 5 reports this error on the non-bipartite datasets at k=1Kk = 1\mathrm{K}, 5K, and 20K. Nine of the twelve networks converge to within 8% error at k=5Kk = 5\mathrm{K}, and nine reach 4% or better at k=20Kk = 20\mathrm{K}; the two Orkut graphs, the largest in the set by edge count, remain the slowest to converge. On the bipartite datasets, the mean error at k=50Kk = 50\mathrm{K} is below 10% on all four graphs, with Flickr reaching 0.3%. Repeatability tracks graph density: the run-to-run coefficient of variation of the individual motif estimates at k=50Kk = 50\mathrm{K} averages 0.01 on Flickr and 0.06 on IMDB, rising to 0.12 on Amazon Books and 0.18 on Amazon Electronics, the sparsest of the four.

Datasetk=1k = 1Kk=5k = 5Kk=20k = 20K
wordassociation0.160.050.01
facebook-wall0.150.050.05
facebook-links0.100.030.02
com-amazon0.060.030.01
com-dblp0.060.030.00
web-BerkStan0.100.080.02
as-skitter0.050.030.02
cit-Patents0.040.100.02
livejournal0.070.050.03
hollywood0.050.000.01
soc-orkut0.220.220.08
orkut-links0.110.120.06

Table 5. Average Distance Error on non-bipartite datasets (lower is better). All entries are proportions (e.g., 0.10 = 10%). Reference is BiLight’s own estimate at k=100k = 100K.

Bressan et al. [45] addressed the problem of counting motifs beyond five vertices in general graphs with color coding, and later released Motivo [65, 66, 67], which extends that approach with succinct data structures and adaptive sampling. Motivo estimates the frequencies of induced motifs on 5 to 8 vertices in a single framework, in general (non-bipartite as well as bipartite) graphs.

We ran both methods on the four bipartite datasets (IMDB, Amazon Ratings Books and Electronics, Flickr): BiLight with sample budgets from k=1Kk = 1\mathrm{K} to k=100Kk = 100\mathrm{K}, and Motivo [65, 66, 67] with 10K, 100K, 1M, 10M, and (where feasible) 50M color-coding samples.

Table 4 breaks down the per-motif induced counts: BiLight at k=100Kk = 100\mathrm{K} (averaged over independent runs and converted via A−1A^{-1}) against Motivo at 50M samples. M12 is omitted because BiLight obtains it analytically rather than by sampling. On IMDB and Flickr, all 16 comparable motifs agree closely, with only two above 10% on IMDB and one on Flickr; on the Amazon datasets, Motivo leaves several motifs effectively unobserved even at 50M samples (M1, M3, M6 and M11 on Books, and additionally M2 and M5 on Electronics; on Electronics it returns 74 for M3, against BiLight’s 2.45×1082.45 \times10^{8}), while BiLight reports all of them. Figure 8 (Appendix C) traces the same comparison across budgets: on IMDB and Flickr the darkest BiLight and Motivo bars “meet in the middle,” visually confirming that the two methods converge to the same induced counts as their budgets grow, while on the Amazon datasets the gap persists on the motifs Motivo barely hits.

DatasetMethodM1M2M3M4M5M6M7M8M9M10M11M13M14M15M16M17Runtime
Amazon Elec.BiLight3.62e61.07e122.45e85.36e133.76e102.98e98.70e143.57e125.92e148.42e111.24e102.22e171.21e155.94e146.01e161.04e144 min
Amazon Elec.Motivo———2.72e12——3.72e141.54e121.55e142.21e11—2.17e171.24e156.09e145.35e169.97e135 h 3 min
Amazon BooksBiLight3.52e91.25e131.10e115.45e141.21e138.78e111.96e167.93e145.10e151.36e141.32e122.12e196.72e178.77e164.34e175.23e1523 min
Amazon BooksMotivo—1.15e13—4.66e141.78e13—1.96e169.71e144.97e159.17e13—2.41e198.40e171.17e175.09e177.12e1512 h 57 min
IMDBBiLight1.06e85.84e91.13e91.27e111.93e105.44e91.56e124.58e119.68e112.84e111.34e107.60e131.24e131.95e134.14e139.73e1245 s
IMDBMotivo1.16e85.07e91.14e91.13e111.86e105.34e91.51e124.51e119.22e112.79e111.30e107.50e131.22e131.94e134.05e139.67e1216 min
FlickrBiLight2.46e131.55e165.87e143.34e171.22e162.96e153.26e181.85e171.16e186.21e162.32e157.17e191.45e181.66e181.36e194.41e171 h 17 min
FlickrMotivo1.98e131.69e165.86e143.47e171.22e163.00e153.30e181.87e171.18e186.26e162.31e157.16e191.46e181.65e181.36e194.40e175 h 34 min

Table 4. Motif induced counts on the bipartite datasets: BiLight (k=100k = 100K) vs. Motivo (50M color-coding samples). Missing entries indicate that Motivo did not report the motif at that budget.

Figure 8. Per-motif induced counts at increasing sample budgets. Panels (top to bottom): IMDB; Flickr; Amazon Ratings (Books); Amazon Ratings (Electronics). Teal bars = BiLight (light to dark: k=1Kk = 1\mathrm{K}, 5K, 20K, 100K); orange bars = Motivo (dark to light: 50M, 10M, 1M, 100K color-coding samples). Wall-clock runtimes are shown in parentheses. Missing bars indicate motifs Motivo did not report at that budget. BiLight bars are averaged over five independent runs. The rarest motif, M1M_1 (K3,3K_{3,3}), is found on Amazon (Elec.) in only one of the five runs at k=1Kk=1\mathrm{K} and three of five at k=5Kk=5\mathrm{K}, so its bars at those budgets rest on a handful of hits; from k=20Kk=20\mathrm{K} on it is found in every run.

Figure 2 aggregates these per-motif differences into a single curve per dataset. For a given budget kk we convert BiLight’s non-induced estimates to induced counts via A−1A^{-1} and plot the mean, over the 16 sampled motifs, of the relative difference between the estimate at kk and the estimate at k=100Kk = 100\mathrm{K}; each dashed line gives, for one dataset, the mean of ∣CiBiLight−CiMotivo∣/CiBiLight\lvert C_i^{\mathrm{BiLight}}-C_i^{\mathrm{Motivo}}\rvert/C_i^{\mathrm{BiLight}} at k=100Kk = 100\mathrm{K} over the motifs Motivo reports. The percentages quoted below are values of this second quantity. The curves fall as kk increases; on IMDB and Flickr, where Motivo reports all 16 non-trivial motifs, BiLight at k=100Kk = 100\mathrm{K} agrees with their 50M-sample run to within 4% (3.7% and 2.6%). On the Amazon datasets, their coverage is incomplete even at 50M samples (12/16 for Books, 10/16 for Electronics), and the agreement on the motifs they do report is uneven. On Books the mean difference is about 21%. On Electronics, the sparsest of the four, the two methods agree to within 4% on the abundant tree-like motifs (M13M_{13}–M15M_{15} and M17M_{17}) but differ by a factor of two or more on the rarer cycle-containing ones (M4M_4, M7M_7–M10M_{10}), where Motivo’s 50M samples yield few hits; BiLight’s estimates for those motifs stay stable between k=50Kk = 50\mathrm{K} and k=100Kk = 100\mathrm{K}. This reflects the difficulty of these sparse bipartite structures for general-purpose color-coding methods.

Figure 2. BiLight’s convergence: the mean relative difference (%) between BiLight’s induced counts at budget kk and at k=100Kk = 100\mathrm{K}, averaged over the 16 sampled motifs. Horizontal dashed lines: the mean relative difference between BiLight at k=100Kk = 100\mathrm{K} and Motivo at 50M samples, averaged over the motifs Motivo reports (where applicable).

Convergence

We analyzed the convergence of BiLight by increasing the sample budget from k=10k = 10 to k=500Kk = 500\mathrm{K}. Figure 3 shows the estimated counts of all 16 sampled motifs on the four bipartite datasets: as kk grows, the curves overlap and the variance shrinks, indicating strong convergence. Figure 4 repeats the experiment on the four largest non-bipartite networks of Table 3 by edge count. The same P4P_4 sampling and local counting patterns apply unchanged, and the estimates stabilize in the same way, confirming that BiLight is not limited to bipartite inputs.

Convergence of motif count estimates on the four bipartite datasets

Figure 3. Convergence of motif count estimates on the four bipartite datasets (one subplot per dataset). xx-axis = motif index (M12 excluded), yy-axis = estimated count (log scale), line color = sample budget kk (lighter = smaller kk).

Convergence of motif count estimates on the four largest non-bipartite networks

Figure 4. Convergence of motif count estimates on the four largest non-bipartite networks; layout as in Figure 3.

Runtime efficiency:

The runtime column of Table 4 summarizes the runtime gap: BiLight at k=100Kk = 100\mathrm{K} finishes in 45s on IMDB and in at most 1 h 17 min on Flickr, while Motivo [65, 66, 67] at 50M samples ranges from 16 min to nearly 13 h on the same inputs. To our knowledge, BiLight is the first framework that estimates all seventeen 6-vertex bipartite motifs efficiently on large networks.

Figure 5 and Figure 6 summarize the estimated motif profiles at the largest budgets (k=500Kk = 500\mathrm{K} and k=100Kk = 100\mathrm{K}, respectively). The profiles follow similar trends across datasets (up to scale), suggesting comparable relative motif importance despite the different domains; the non-bipartite networks sit several orders of magnitude higher owing to their larger edge densities and P4P_4 counts. In Figure 6, Hollywood network seems to have a balanced distribution of all motifs, which may be also related to the fact that this network has the highest number of P4P_4’s as seen in Table 3. Figure 5 demonstrates that M1M_1, M3M_3, M6M_6 and M11M_{11}, the four motifs that contain a cycle on six vertices, are consistently among the least frequent across all four datasets. As expected, the counts fall as the motif gains edges. The five tree motifs (M13M_{13}–M17M_{17}) have the fewest edges and all rank in the upper half on every dataset, with M13M_{13} the most frequent throughout; M1=K3,3M_1 = K_{3,3}, the only motif with nine edges, is the rarest everywhere.

Figure 5. Estimated motif profiles (non-induced) of the four bipartite datasets at k=500k = 500K (one line per dataset).

Figure 6. Estimated motif profiles (non-induced) of the four largest non-bipartite networks at k=100k = 100K.

P4P_4 sampling, yielding unbiased and low-variance estimates. Our evaluation on large-scale networks shows that BiLight is accurate and scalable. The empirical comparison with Motivo [65], [66], [67] shows that our framework is substantially faster, and that the two agree closely on the datasets where Motivo’s sampling covers all sixteen motifs. BiLight is tailored to the 17 bipartite 6-vertex motifs and can deliver all estimates quickly and consistently. We provide our source code that can as well be used towards generalizing our framework to non-bipartite motifs.

Conclusion

We presented BiLight, a lightweight framework for estimating 6-vertex bipartite motif frequencies via weighted

Appendix A: Runtime Result

Figure 7 plots BiLight’s estimation time; it grows approximately linearly with the sample budget kk on both bipartite and non-bipartite graphs.

Appendix B: Conversion Matrices

Tables 6 and 7 give AA and A−1A^{-1} for the 17 motifs (rows/columns M1–M17; blank cells are zero).

M1M2M3M4M5M6M7M8M9M10M11M12M13M14M15M16M17
M11
M21
M391
M481
M51841
M61841
M71231
M83612421
M91231
M103612241
M116211
M121
M138321
M14942111
M15361666221
M16249241
M173616481261

Table 6. Direct matrix AA: N=ACN = AC. Entry Ai,jA_{i,j} is the number of copies of motif MiM_i contained in motif MjM_j.

M1M2M3M4M5M6M7M8M9M10M11M12M13M14M15M16M17
M11
M21
M3−91
M4−81
M518−41
M618−41
M712−31
M8−3612−4−21
M912−31
M10−3612−2−41
M11−62−11
M121
M13−83−21
M149−421−11
M1536−1666−2−21
M16−249−2−41
M1736−1648−1−2−61

Table 7. Inverse matrix A−1A^{-1}: C=A−1NC = A^{-1}N. Row ii, column jj correspond to motif MiM_i, MjM_j.

Appendix C: Per-Motif Comparison

Acknowledgments

The authors used Anthropic’s Claude in preparing this work. The algorithms, the local counting patterns, the theoretical analysis, the conversion matrices, and the experiments are the authors’ own. Claude’s contributions lie mainly in Sections 4 and 5: suggestion of Walker’s alias method in place of an O(log⁡m)O(\log m) prefix-sum draw, correction of the preprocessing cost to O(αm)O(\alpha m), brute-force verification to check the local counting patterns and assistance with efficient presentation of experimental results. Claude’s contributions to both the text and the code were reviewed and revised by the authors, who take full responsibility for the paper.

References

References

  1. [1]P. Holland and S. Leinhardt, “A method for detecting structure in sociometric data,” American Journal of Sociology, vol. 76, pp. 492–513, 1970.
  2. [2]J. Coleman, “Social capital in the creation of human capital,” American Journal of Sociology, vol. 94, pp. S95–S120, 1988.
  3. [3]A. Portes, “Social capital: Its origins and applications in modern sociology,” Annual Review of Sociology, vol. 24, no. 1, pp. 1–24, 1998.
  4. [4]R. Milo, S. Shen-Orr, S. Itzkovitz, N. Kashtan, D. Chklovskii, and U. Alon, “Network motifs: Simple building blocks of complex networks,” Science, vol. 298, no. 5594, pp. 824–827, 2002.
  5. [5]R. Burt, “Structural holes and good ideas,” American Journal of Sociology, vol. 110, no. 2, pp. 349–399, 2004.
  6. [6]N. Pržulj, D. G. Corneil, and I. Jurisica, “Modeling interactome: Scale-free or geometric?” Bioinformatics, vol. 20, no. 18, pp. 3508–3515, 2004.pubmed.ncbi.nlm.nih.gov/15284103
  7. [7]G. Fagiolo, “Clustering in complex directed networks,” Physical Review E, vol. 76, p. 026107, 2007.pubmed.ncbi.nlm.nih.gov/17930104
  8. [8]F. Hormozdiari, P. Berenbrink, N. Pržulj, and S. C. Sahinalp, “Not all scale-free networks are born equal: The role of the seed graph in PPI network evolution,” PLoS Computational Biology, vol. 3, no. 7, p. e118, 2007.pubmed.ncbi.nlm.nih.gov/17616981
  9. [9]L. Becchetti, P. Boldi, C. Castillo, and A. Gionis, “Efficient semi-streaming algorithms for local triangle counting in massive graphs,” in Proceedings of KDD ’08, 2008, pp. 16–24.DOI
  10. [10]K. Faust, “A puzzle concerning triads in social networks: Graph constraints and the triad census,” Social Networks, vol. 32, no. 3, pp. 221–233, 2010.DOI
  11. [11]M. Szell and S. Thurner, “Measuring social dynamics in a massive multiplayer online game,” Social Networks, vol. 32, pp. 313–329, 2010.
  12. [12]B. Welles, A. Van Devender, and N. Contractor, “Is a friend a friend?: Investigating the structure of friendship networks in virtual worlds,” in Proceedings of CHI-EA ’10, 2010, pp. 4027–4032.DOI
  13. [13]S. Son, A. Kang, H. Kim, T. Kwon, J. Park, and H. Kim, “Analysis of context dependence in social interaction networks of a massively multiplayer online role-playing game,” PLoS ONE, vol. 7, no. 4, p. e33918, Apr. 2012.DOI
  14. [14]D. J. Watts and S. H. Strogatz, “Collective dynamics of ‘small-world’ networks,” Nature, vol. 393, no. 6684, pp. 440–442, 1998.
  15. [15]C. Seshadhri, T. G. Kolda, and A. Pinar, “Community structure and scale-free collections of Erdős-Rényi graphs,” Physical Review E, vol. 85, no. 5, p. 056109, May 2012.pubmed.ncbi.nlm.nih.gov/23004823
  16. [16]N. Durak, A. Pinar, T. G. Kolda, and C. Seshadhri, “Degree relations of triangles in real-world networks and graph models,” in Proceedings of the 21st ACM International Conference on Information and Knowledge Management (CIKM ’12), 2012, pp. 1712–1716.
  17. [17]J. Ugander, L. Backstrom, and J. M. Kleinberg, “Subgraph frequencies: Mapping the empirical and extremal geography of large graph collections,” in Proceedings of the World Wide Web Conference (WWW), 2013, pp. 1307–1318.
  18. [18]S. S. Shen-Orr, R. Milo, S. Mangan, and U. Alon, “Network motifs in the transcriptional regulation network of Escherichia coli,” Nature Genetics, vol. 31, no. 1, pp. 64–68, 2002.
  19. [19]H. Chun, H. Kwak, Y.-H. Eom, Y.-Y. Ahn, S. Moon, and H. Jeong, “Comparison of online social relations in terms of volume vs. interaction: A case study of Cyworld,” in Proceedings of the 8th ACM SIGCOMM Conference on Internet Measurement, 2008, pp. 57–70.
  20. [20]J. Kunegis, A. Lommatzsch, and C. Bauckhage, “The Slashdot zoo: Mining a social network with negative edges,” in Proceedings of the 18th International Conference on World Wide Web. ACM, 2009, pp. 741–750.
  21. [21]J. Zhao, J. C. S. Lui, D. Towsley, X. Guan, and Y. Zhou, “Empirical analysis of the evolution of follower network: A case study on Douban,” in 2011 IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), 2011, pp. 924–929.DOI
  22. [22]Y. Jin, E. Sharafuddin, and Z.-L. Zhang, “Unveiling core network-wide communication patterns through application traffic activity graph decomposition,” in Proceedings of the 11th International Joint Conference on Measurement and Modeling of Computer Systems, 2009, pp. 49–60.
  23. [23]M. Milofotou, M. Faloutsos, and M. Mitzenmacher, “Exploiting dynamicity in graph-based traffic analysis: Techniques and applications,” in Proceedings of the 5th International Conference on Emerging Networking Experiments and Technologies, 2009, pp. 241–252.
  24. [24]N. Shervashidze, S. V. N. Vishwanathan, T. Petri, K. Mehlhorn, and K. Borgwardt, “Efficient graphlet kernels for large graph comparison,” in Proceedings of the Twelfth International Conference on Artificial Intelligence and Statistics, ser. Proceedings of Machine Learning Research, vol. 5. PMLR, 2009, pp. 488–495.
  25. [25]P. D. Dobson and A. J. Doig, “Distinguishing enzyme structures from non-enzymes without alignments,” Journal of Molecular Biology, vol. 330, no. 4, pp. 771–783, 2003.pubmed.ncbi.nlm.nih.gov/12850146
  26. [26]S. V. N. Vishwanathan, N. N. Schraudolph, R. Kondor, and K. Borgwardt, “Graph kernels,” Journal of Machine Learning Research, vol. 11, pp. 1201–1242, 2010.
  27. [27]N. Wale and G. Karypis, “Comparison of descriptor spaces for chemical compound retrieval and classification,” in 2006 IEEE International Conference on Data Mining, 2006, pp. 678–689.DOI
  28. [28]P. Yanardag and S. V. N. Vishwanathan, “A structural smoothing framework for robust graph comparison,” in Advances in Neural Information Processing Systems 28 (NIPS 2015), 2015.
  29. [29]—, “Deep graph kernels,” in Proceedings of the 21st ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2015, pp. 1365–1374.DOI
  30. [30]K. Chen, P. Wang, Y. Lee, X. Wang, N. Zhang, H. Huang, W. Zou, and P. Liu, “Finding unknown malice in 10 seconds: Mass vetting for new threats at the Google-Play scale,” in 24th USENIX Security Symposium (USENIX Security 15). USENIX Association, 2015, pp. 659–674.
  31. [31]T. Shen, Y. Zhongyang, Z. Xin, B. Mao, and H. Huang, “Detect Android malware variants using component based topology graph,” in 2014 IEEE 13th International Conference on Trust, Security and Privacy in Computing and Communications, 2014, pp. 406–413.DOI
  32. [32]H. Gascon, F. Yamaguchi, D. Arp, and K. Rieck, “Structural detection of Android malware using embedded call graphs,” in Proceedings of the 2013 ACM Workshop on Artificial Intelligence and Security, 2013, pp. 45–54.DOI
  33. [33]A. E. Sarıyüce and A. Pinar, “Peeling bipartite networks for dense subgraph discovery,” in Proceedings of the 11th ACM International Conference on Web Search and Data Mining, 2018, pp. 504–512.
  34. [34]C. Sheshadhri, A. Pinar, and T. G. Kolda, “Triadic measures on graphs: The power of wedge sampling,” in Proceedings of the SIAM International Conference on Data Mining. SIAM, 2013, pp. 10–18.
  35. [35]N. K. Ahmed, J. Neville, R. A. Rossi, N. G. Duffield, and T. L. Willke, “Graphlet decomposition: Framework, algorithms, and applications,” Knowledge and Information Systems, vol. 50, no. 3, pp. 689–722, 2017.arxiv.org/abs/1506.04322
  36. [36]N. Betzler, R. van Bevern, M. R. Fellows, C. Komusiewicz, and R. Niedermeier, “Parameterized algorithms for finding connected motifs in biological networks,” IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 8, no. 5, pp. 1296–1308, 2011.DOI
  37. [37]E. Wong, B. Baur, S. Quader, and C.-H. Huang, “Biological network motif detection: Principles and practice,” Briefings in Bioinformatics, vol. 13, no. 2, pp. 202–215, 2012.DOI
  38. [38]M. Rahman, M. A. Bhuiyan, and M. Al Hasan, “GRAFT: An efficient graphlet counting method for large graph analysis,” IEEE Transactions on Knowledge and Data Engineering, vol. 26, no. 10, pp. 2466–2478, 2014.DOI
  39. [39]N. K. Ahmed, J. Neville, R. A. Rossi, and N. Duffield, “Efficient graphlet counting for large networks,” in Proceedings of the 15th IEEE International Conference on Data Mining (ICDM), 2015, pp. 1–10.DOI
  40. [40]M. Jha, C. Seshadhri, and A. Pinar, “Path sampling: A fast and provable method for estimating 4-vertex subgraph counts,” in Proceedings of the 24th International Conference on World Wide Web, 2015, pp. 495–505.
  41. [41]A. Acharya, C. Seshadhri, and V. Vishal, “ESCAPE: Efficiently counting all 5-vertex subgraphs,” in Proceedings of the 26th International Conference on World Wide Web (WWW’17). ACM, 2017, pp. 1431–1440.
  42. [42]P. Wang, J. Zhao, X. Zhang, Z. Li, J. Cheng, J. C. Lui, D. TowSley, J. Tao, and X. Guan, “MOSS-5: A fast method of approximating counts of 5-node graphlets in large graphs,” IEEE Transactions on Knowledge and Data Engineering, vol. 30, no. 1, pp. 73–86, 2018.DOI
  43. [43]J. Niu, J. Zola, and A. E. Sariyuce, “Counting induced 6-cycles in bipartite graphs,” in Proceedings of the 51st International Conference on Parallel Processing, 2022, pp. 1–10.DOI
  44. [44]J. Niu, J. Zola, and A. E. Sariyuce, “Fast counting and utilizing induced 6-cycles in bipartite networks,” IEEE Transactions on Knowledge and Data Engineering, 2025.DOI
  45. [45]M. Bressan, F. Chierichetti, R. Kumar, S. Leucci, and A. Panconesi, “Motif counting beyond five nodes,” ACM Transactions on Knowledge Discovery from Data, vol. 12, no. 4, pp. 48:1–48:25, 2018.
  46. [46]P. Ribeiro, P. Paredes, M. E. P. Silva, D. Aparicio, and F. Silva, “A survey on subgraph counting: Concepts, algorithms, and applications to network motifs and graphlets,” ACM Computing Surveys, vol. 54, no. 2, pp. 28:1–28:36, 2021.DOI
  47. [47]N. Chiba and T. Nishizeki, “Arboricity and subgraph listing algorithms,” SIAM Journal on Computing, vol. 14, no. 1, pp. 210–223, 1985.DOI
  48. [48]C. Tsourakakis, M. N. Kolountzakis, and G. Miller, “Triangle sparsifiers,” Journal of Graph Algorithms and Applications, vol. 15, pp. 703–726, 2011.DOI
  49. [49]M. Gonen and Y. Shavitt, “Approximating the number of network motifs,” Internet Mathematics, vol. 6, no. 3, pp. 349–372, 2009.
  50. [50]D. Marcus and Y. Shavitt, “Efficient counting of network motifs,” in ICDCS Workshops. IEEE Computer Society, 2010, pp. 92–98.DOI
  51. [51]S. K. Bera, L. Gishboliner, Y. Levanzov, C. Seshadhri, and A. Shapira, “Counting subgraphs in degenerate graphs,” Journal of the ACM, vol. 69, no. 3, pp. 23:1–23:21, 2022.arxiv.org/abs/2010.05998
  52. [52]M. A. Bhuiyan, M. Rahman, M. Rahman, and M. Al Hasan, “GUISE: Uniform sampling of graphlets for large graph analysis,” in Proceedings of the 12th IEEE International Conference on Data Mining (ICDM), 2012, pp. 91–100.
  53. [53]P. Wang, J. C. S. Lui, B. Ribeiro, D. Towsley, J. Zhao, and X. Guan, “Efficiently estimating motif statistics of large networks,” ACM Transactions on Knowledge Discovery from Data, vol. 9, no. 2, pp. 8:1–8:27, 2014.arxiv.org/abs/1306.5288
  54. [54]N. Kashtan, S. Itzkovitz, R. Milo, and U. Alon, “Efficient sampling algorithm for estimating subgraph concentrations and detecting network motifs,” Bioinformatics, vol. 20, no. 11, pp. 1746–1758, 2004.pubmed.ncbi.nlm.nih.gov/15001476
  55. [55]S. Wernicke, “Efficient detection of network motifs,” IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 3, no. 4, pp. 347–359, 2006.pubmed.ncbi.nlm.nih.gov/17085844
  56. [56]S. Omidi, F. Schreiber, and A. Masoudi-Nejad, “MODA: An efficient algorithm for network motif discovery in biological networks,” Genes & Genetic Systems, vol. 84, no. 5, pp. 385–395, 2009.pubmed.ncbi.nlm.nih.gov/20154426
  57. [57]X. Chen, Y. Li, P. Wang, and J. C. S. Lui, “A general framework for estimating graphlet statistics via random walk,” Proceedings of the VLDB Endowment, vol. 10, no. 3, pp. 253–264, 2016.arxiv.org/abs/1603.07504
  58. [58]T. Schank and D. Wagner, “Approximating clustering coefficient and transitivity,” Journal of Graph Algorithms and Applications, vol. 9, pp. 265–275, 2005.DOI
  59. [59]T. G. Kolda, A. Pinar, T. Plantenga, C. Seshadhri, and C. Task, “Counting triangles in massive graphs with MapReduce,” SIAM Journal on Scientific Computing, vol. 36, no. 5, pp. S48–S77, 2014.DOI
  60. [60]N. Alon, R. Yuster, and U. Zwick, “Color-coding: A new method for finding simple paths, cycles and other small subgraphs within large graphs,” in Proceedings of the 26th Annual ACM Symposium on Theory of Computing (STOC), 1994, pp. 326–335.DOI
  61. [61]C. E. Tsourakakis, U. Kang, G. L. Miller, and C. Faloutsos, “DOULION: Counting triangles in massive graphs with a coin,” in Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2009, pp. 837–846.
  62. [62]A. Pavan, K. Tangwongsan, S. Tirthapura, and K. Wu, “Counting and sampling triangles from a graph stream,” Proceedings of the VLDB Endowment, vol. 6, no. 14, pp. 1870–1881, 2013.DOI
  63. [63]M. Jha, C. Seshadhri, and A. Pinar, “A space efficient streaming algorithm for triangle counting using the birthday paradox,” in Proceedings of the 19th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2013, pp. 589–597.arxiv.org/abs/1212.2264
  64. [64]N. K. Ahmed, D. F. Gleich, J. Neville, and R. Kompella, “Graph sample and hold: A framework for big-graph analytics,” in Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2014, pp. 1446–1455.
  65. [65]M. Bressan, S. Leucci, and A. Panconesi, “Motivo: Fast motif counting via succinct color coding and adaptive sampling,” arXiv:1906.01599, 2019.arxiv.org/abs/1906.01599
  66. [66]——, “Motivo: Fast motif counting via succinct color coding and adaptive sampling,” Proceedings of the VLDB Endowment, vol. 12, no. 11, pp. 1651–1663, 2019.arxiv.org/abs/1906.01599
  67. [67]——, “Faster motif counting via succinct color coding and adaptive sampling,” ACM Transactions on Knowledge Discovery from Data, vol. 15, no. 6, pp. 96:1–96:27, 2021.DOI
  68. [68]A. J. Walker, “An efficient method for generating discrete random variables with general distributions,” ACM Transactions on Mathematical Software, vol. 3, no. 3, pp. 253–256, 1977.DOI
  69. [69]UCSD, “Amazon product reviews and metadata,” 2023. [Online]. Available: https://cseweb.ucsd.edu/~jmcauley/datasets.html#amazon_reviews
  70. [70]J. McAuley, C. Targett, Q. Shi, and A. van den Hengel, “Image-based recommendations on styles and substitutes,” in Proceedings of the 38th International ACM SIGIR Conference on Research and Development in Information Retrieval, 2015, pp. 43–52.
  71. [71]R. He and J. McAuley, “Ups and downs: Modeling the visual evolution of fashion trends with one-class collaborative filtering,” in Proceedings of the 25th International Conference on World Wide Web, 2016, pp. 507–517.DOI
  72. [72]“IMDB bipartite network,” 2006, Network Repository. [Online]. Available: https://networkrepository.com/IMDB.php
  73. [73]“Flickr user–group network,” Network Repository. [Online]. Available: https://networkrepository.com/flickr.php
  74. [74]“LAW: Large-scale network data,” LAW, Università degli Studi di Milano. [Online]. Available: http://law.di.unimi.it/
  75. [75]P. Boldi and S. Vigna, “The WebGraph framework I: Compression techniques,” in Proceedings of the 13th International Conference on World Wide Web (WWW), 2004, pp. 595–602.
  76. [76]P. Boldi, M. Rosa, M. Santini, and S. Vigna, “Layered label propagation: A multiresolution coordinate-ordering for compressing social networks,” in Proceedings of the 20th International Conference on World Wide Web (WWW), 2011, pp. 587–596.
  77. [77]“Social networks data (WOSN, Facebook, etc.),” MPI-SWS. [Online]. Available: http://socialnetworks.mpi-sws.org/data-wosn2009.html
  78. [78]B. Viswanath, A. Mislove, M. Cha, and K. P. Gummadi, “On the evolution of user interaction in Facebook,” in Proceedings of the 2nd ACM Workshop on Online Social Networks (WOSN), 2009, pp. 37–42.DOI
  79. [79]J. Leskovec and A. Krevl, “SNAP Datasets: Stanford large network dataset collection,” Jun. 2014. [Online]. Available: https://snap.stanford.edu/data
  80. [80]A. L. Rossi and N. K. Ahmed, “The network data repository with interactive graph analytics and visualization,” in Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence, 2015, pp. 4292–4293. [Online]. Available: https://networkrepository.comDOI
  81. [81]“Orkut links (IMC 2007),” MPI-SWS. [Online]. Available: https://socialnetworks.mpi-sws.org/data-imc2007.html
  82. [82]A. Mislove, M. Marcon, K. P. Gummadi, P. Druschel, and B. Bhattacharjee, “Measurement and analysis of online social networks,” in Proceedings of the 7th ACM SIGCOMM Conference on Internet Measurement, 2007, pp. 29–42.DOI

Paper details

vlnc:W_rrdd9yku
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents