{'fraction_non_alphanumeric': 0.028225806451612902, 'fraction_numerical': 0.014481707317073171, 'mean_word_length': 4.769219858156029, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
LazyFox: Fast and parallelized overlapping community detection in large graphs

The detection of communities in graph datasets provides insight about a graph's underlying structure and is an important tool for various domains such as social sciences, marketing, traffic forecast, and drug discovery. While most existing algorithms provide fast approaches for community detection, their results usually contain strictly separated communities. However, most datasets would semantically allow for or even require overlapping communities that can only be determined at much higher computational cost. We build on an efficient algorithm, Fox, that detects such overlapping communities. Fox measures the closeness of a node to a community by approximating the count of triangles which that node forms with that community. We propose LazyFox, a multi-threaded version of the Fox algorithm, which provides even faster detection without an impact on community quality. This allows for the analyses of significantly larger and more complex datasets. LazyFox enables overlapping community detection on complex graph datasets with millions of nodes and billions of edges in days instead of weeks. As part of this work, LazyFox's implementation was published and is available as a tool under an MIT licence at https://github.com/TimGarrels/LazyFox.


INTRODUCTION & RELATED WORK
Graphs, also called networks, are present in many fields as they capture the interaction of entities as edges between nodes representing those entities. Communities (or clusters, or modules) are considered to be important network structures as they describe functionally similar groups within networks. The identification of such groups is relevant in various domains such as biology (Barabasi and Oltvai, 2004;Regan et al., 2002;Boccaletti et al., 2006;Ahn et al., 2010), medicine (Barabasi et al., 2011;Gavin et al., 2006) and technical infrastructure (Regan and Barabasi, 2003;. In social networks, communities can identify common interest groups or friend circles (Mcauley and Leskovec, 2014). In drug research, new, targetable proteins can be discovered by clustering proteins into functionality groups (Ma et al., 2019). Similar products of an online shop can be grouped together to derive product recommendations (Basuchowdhuri et al., 2014).
While community itself is a term whose precise definition is highly context dependent (Kelley et al., 2012), various algorithms have been developed to detect such structures (Fortunato, 2010). In this work, we focus on communities of bond. These are communities where the membership of a community is based on the relation to other members -their connectivity in the network -rather than an affinity to the identity of that group as a whole. This naturally leads to more interconnections between group members (Ren et al., 2007). Algorithms detecting such communities typically exploit this property by optimizing communities so that nodes of one group are more densely connected with each other than with nodes outside of that group. algorithms can yield disjoint or overlapping communities depending on whether nodes are allowed to join multiple communities.
Efficient WCC-based large scale overlapping community detection WCC-based overlapping community detection approaches also suffer from computational complexity issues when dealing with large scale datasets. Thus, parallelized (Prat-Pérez et al., 2014) and distributed (Saltz et al., 2015) WCC versions have been proposed that allow multiple nodes at the same time to decide for changes to the community partition, so those decisions can be computed on separate threads or machines. Furthermore, computationally less expensive estimations of the WCC score have been suggested (Prat-Pérez et al., 2014;Lyu et al., 2020) to further improve runtime. Thereby, Lyu and colleagues have found that approximating triangle counts with their metric, WCC, in an algorithm they call FOX yields very similar results as calculating the exact count. While their proposed estimation allows FOX to compute overlapping communities on large networks with millions of edges, the implementation of FOX was not published making it hard to reproduce the results or to use them for further applications.

LAZYFOX-Parallelized Large Scale Overlapping Community Detection
We here propose our tool for overlapping community detection, LAZYFOX, that contains an implementation of the FOX algorithm. In addition, we extend the work of Lyu and colleagues and combine it with ideas from (Prat-Pérez et al., 2014) by introducing parallelism to leverage the advantage of modern multiprocessor systems to even further accelerate the algorithm.
We show that LAZYFOX produces extremely similar results to FOX in a fraction of FOX's runtime, making it more efficient to work with. This also enables the usage of the approach on large scale graphs like the social media network Friendster with millions of nodes and billions of edges (Leskovec and Krevl, 2014). We analyse the impact of hyperparameters of the FOX and LAZYFOX algorithm on realworld examples. The C++ implementation of LAZYFOX (which also includes a FOX implementation) is published as open-source under MIT licence.
In the following sections we introduce the datasets, the algorithmic details of FOX and LAZYFOX and the methods used to evaluate them. We describe the impact of our LAZYFOX contribution on the runtime and community quality of three datasets. We include the analysis of a fourth dataset to illustrate the ability of LAZYFOX to handle large scale datasets in contrast to FOX. Finally, we summarize and discuss our results.

METHODS
We introduce LAZYFOX, with its required input data and preprocessing, the employed metric WCC, and the performed steps in the algorithm. We describe the parallelization that sets LAZYFOX apart from FOX (Lyu et al., 2020) and allows LAZYFOX to scale across multiple CPU cores, and finally the performance measures employed here.

Input Data
Our algorithm LAZYFOX takes the edge list of an undirected, unweighted graph G(V, E) as input, V denoting the nodes and E the edges of the graph. We assume this graph to be connected for the theoretical discussions, however, LAZYFOX will still work on a graph with multiple connected components.

Preprocessing
LAZYFOX performs the following preprocessing steps on the input edge list of G: Remove Multi-Edges In graphs a pair of nodes can be connected via multiple edges. Since our research on FOX and LAZYFOX works on "by-bond" communities, we regard multiple connections between two entities as one. Therefore, we remove such duplicated edges, turning any input multi-graph into a simple graph.
Dense Node Labels The node identifiers (IDs) in edge lists are not necessarily consecutive due to preprocessing (this is the case in most datasets introduced in the 'Datasets' section). We apply a shift to the node IDs to restore their consecutive nature. This allows both FOX and LAZYFOX to use the node IDs directly as data-structure indices which speeds up computation. Node Order As LAZYFOX computes communities by gradually improving node memberships, there needs to be a well defined order in which the nodes are being processed. We define this order by sorting them by decreasing clustering coefficient (CC): k i denotes the number of triangles containing node i (equal to the number of edges between two neighbors of node i), while d i denotes the degree of node i. A higher CC indicates that a node is central in its neighborhood, and we process more central nodes first. Ties are resolved by node degrees in decreasing order. This order ensures that nodes with less connectivity and thus less influence can adapt to changes in memberships of more important, connected nodes resulting in a more coherent community structure at the end of one iteration.
Initial Clustering To initiate the clustering process LAZYFOX computes a greedy, non-overlapping community decomposition using the above node order. A node that is not yet part of a community is assigned to a new community. Then all its not yet assigned neighbors join this community. This process allows for self-initialization on any given network. LAZYFOX derives the initial community count and the initial clustering from the structure of the underlying network. On the other hand, LAZYFOX is, just like FOX (Lyu et al., 2020), also able to improve upon an existing division into communities by replacing the initial clustering step by inserting those existing divisions. Therefore, known structural properties can be taken into account. This way LAZYFOX can be used to generate overlapping community structure from partitions, i.e. from non-overlapping community structure. See Lyu et al. (2020) for a discussion and examples.

WCC-A Metric to Optimize for
Lyu and colleagues introduced WCC as an advanced metric to assess the quality of a partition into communities. This metric forms the core of both the FOX and the LAZYFOX algorithm as they use WCC to decide on the necessary local optimization steps. To provide a better understanding of WCC we will first describe WCC. WCC The weighted clustering coefficient WCC as introduced by Prat-Pérez et al. (2012) is a score that rates a community decomposition as the sum of its community ratings. We denote such a rating of a community decomposition P = {C 1 , . . . ,C k } as This rating of an individual community C i can be again decomposed into how well the individual nodes of that community fit into the community: Such a fit of a node x into its community C is assessed by the ratio of t(x,C) to t(x,V ): The number of triangles that the node forms within its community to the number of triangles that it forms within the whole graph. The assessment also uses vt(x,C), the number of nodes in the community C that form triangles with node x. Furthermore, vt(x,V \C), the number of nodes outside of the community C that form triangles with node x, influences this assessment: Heuristic Counting of Triangles The counting of triangles for the WCC computation is expensive.
To accelerate the evaluation of a new community decomposition, the exact count can be replaced by a heuristic. Rather than counting the triangles a node forms with the nodes of a community C and all other nodes, WCC (Lyu et al., 2020) approximates this by using the number of edges instead.
Assuming that the edges inside a community are homogeneously distributed between the nodes, a mean-field approximation can be performed. This delivers the expected triangle count depending on the density p of the community and the degree deg(x,C), which is the count of edges between node x and all nodes within community C: Analogously, one can also define an estimator for the average number of triangles in the whole graph. It uses the global clustering coefficient cc (Watts and Strogatz, 1998), the average of all local clustering coefficients (CC): The exact values of vt(x,V ) and vt(x,V \ C) are harder to estimate. However, both have an upper bound. If all neighbours of x form a triangle with x, the upper bound of vt(x,V ) is reached -it is exactly deg(x,V ). The same holds for all neighbors of the vertices V \C, so that the upper bound of vt( and these upper bounds, an estimator WCC for the weighted clustering coefficient WCC can be derived: This can be then used to define the WCC for whole communities C i and community decompositions P = {C 1 , . . . ,C k }, respectively: Both FOX (Lyu et al., 2020) and LAZYFOX use this estimate to compute the optimization steps, as it is faster than the WCC metric.

Node Changes
Starting with the initial, non-overlapping community decomposition obtained by the preprocessing step, FOX and LAZYFOX process the nodes of our graph in multiple iterations. One iteration here is equivalent to computing and applying changes for each node once, described in Algorithm 1 and Algorithm 2. Before deciding on changes, LAZYFOX gathers WCC(P), the quality rating of the current decomposition P. The LAZYFOX algorithm then computes for the node a potential joinand a potential leave-action.
Joining a Community For the current node x, LAZYFOX finds all communities that x is currently not part of but any of x's neighbors are. Each of these communities C k is then evaluated by creating a decomposition P that differs from the current one by adding x to C k and then computing the, potentially negative, improvement in WCC(P ) compared to WCC(P). If any of these changes yields a positive improvement, we choose the community with the highest increase in WCC as the current join-action. This is described in lines two to six in Algorithm 1.

Leaving a Community
Similarly LAZYFOX checks all communities C k of the current node x and evaluates the gain in WCC if x leaves that community. Therefore, we again form a P per community by removing x from C k and gather the improvement in WCC compared to the old decomposition. If any of these improvements is positive, we again choose the community with the highest increase in WCC as the current leave-action. This is described in lines seven to eleven in Algorithm 1.

5/17
After determining the best join-action and leave-action for a node, these are executed yielding a new decomposition as the new P before calculating change actions for the next node. This is described in line twelve.
In FOX, the steps of one iteration are sequential and executed on one single thread, visualized in Figure 1a.
Algorithm 1 FOX (Lyu et al., 2020) 1: for node x ∈ Graph do   Figure 1b) can leverage up to queue size many threads that are synchronized by applying their respective node changes. Queue size is denoted as q. Note that each Find-Apply-Block in LAZYFOX contains q nodes, except for the last one, as the total number of nodes of the graph, n, might not be a multiple of q.

Parallelism on Node Change Computations
To leverage the advantage of modern multi-core computer systems, LAZYFOX is capable of parallelizing the computations for the join and leave-actions by doing this in parallel for a queue of nodes. Figure 1b visualizes the parallel nature of a LAZYFOX iteration. Every compute thread fetches a node from the node queue and computes the best actions independently. After the queue is emptied, LAZYFOX gathers all the computed join-actions and leave-actions and applies all of them before re-filling the queue by the next set of nodes of the current iteration.

6/17
The core process for calculating node changes in LAZYFOX is the same as in FOX (see Algorithm 2): The lines seven to 16 of Algorithm 2 are the same as the lines three to eleven of Algorithm 1. The difference is the parallel computation of queueSize many nodes in LAZYFOX (lines one to six) and the bulk apply of node changes in lines 19 to 21.
The parallel computation introduces the first hyper-parameter of LAZYFOX-the queue size. The parallelization is what sets apart LAZYFOX from FOX.

Stopping Criteria
While computing and applying the join-actions and leave-actions, LAZYFOX updates the WCC of the partition. At the end of each iteration, the current WCC is compared to the WCC of the partition an iteration earlier. If the total relative improvement of WCC is below a WCC-threshold -a second hyperparameter -LAZYFOX stops and switches over to the post-processing phase. The first iteration of LAZYFOX is compared to the WCC of the initial node clustering described in the Preprocessing paragraph.

Post-processing
As LAZYFOX allows nodes to leave communities, communities can degenerate to having less than two members. This means that no triangle can be formed with that community anymore. Therefore, after each iteration, we remove such degenerated communities with less than two members. In LAZYFOX' final result, individual communities can not only overlap but also contain each other. The overlap can also lead to duplicated communities. Depending on the use-case, such duplicated or contained communities can be unwanted and have to be removed as part of the post-processing. While we provide an API to include custom post-processing of the final result, LAZYFOX does not post-process the communities other than removing degenerated ones.

Evaluation Criteria
LAZYFOX improves the runtime of the community detection via the FOX approach. To evaluate the quality of the results from LAZYFOX we utilize overlapping normalized mutual information (ONMI) distance 1 and an appropriate F1 score 2 , two quality measurements that are widely adopted in the field of overlapping community detection.
Overlapping NMI Distance We use a recent variation of the common Normalized Mutual Information to enable its use for overlapping clusterings: Overlapping Normalized Mutual Information (ONMI) . The core idea of the ONMI score is to compare each combination of a community from the LAZYFOX output with each community in the ground truth. We then select for each output community the closest community in the ground truth leveraging lack of information as our distance function. Then the sum over minimal distances is averaged across all output clusters yielding one score, the ONMI distance, ranging from 0 (best) to 1 (worst). We employ its implementation via the OverlappingNMIDistance function in Networkit (Staudt et al., 2015).

F1-Score for Overlapping Communities
To enable the use of the common F1 score for community partitions we use the approach proposed by (Epasto et al., 2017) and implemented as CoverF1Similarity function in Networkit (Staudt et al., 2015). Every community is matched to its best ground truth community, and the resulting F1 scores are then averaged to form the final F1-Score, ranging from 0 (worst) to 1 (best). A single overlapping community C out of the detected partition P is compared with the regular F1-Score to all ground truth communities C out of the ground truth partition P. The maximum F1 score is then chosen as the F1 score for C : The F1 score for comparing a detected community C and a ground truth community C is defined via the precision p(C ,C) = |C∩C | |C | and recall r(C ,C) = |C∩C | |C| : F 1 (C ,C) = 2 · p(C ,C) · r(C ,C) p(C ,C) + r(C ,C)

DATASETS
To validate both our FOX and LAZYFOX implementation we collected a set of well-known "by bond" (Ren et al., 2007) networks and ran the algorithms on them to either benchmark their performance or test whether our implementations are capable of dealing with the respective input sizes. All of our datasets were obtained from the SNAP-datasets Leskovec and Krevl (2014) collection (see Table 1 for an overview). The networks are provided in an edge list format. In the following subsections, we present the specific datasets that we used with both their semantic and structural properties.

Eu-core
Eu-core 3 (Leskovec and Krevl, 2014) is our first and smallest benchmarking dataset. It consists of anonymized email data between members of a large European research institution. An edge exists between two members if at least one email has been sent between these members. The Eu-core graph consists of 1005 nodes and 25,571 edges. The network is very dense with a diameter of length 7 and a 90-percentile effective diameter of 2.9. This can be expected from any cooperation, as people working with each other are likely to communicate.

DBLP
The Digital Bibliography & Library Project (DBLP) is a computer science publication database provided by DBLP Organisation. The Library consists of more than 5.4 million publications from different journals and conference articles. The DBLP dataset 4 (Leskovec and Krevl, 2014), the second of our benchmarking datasets, is the co-authorship network calculated for these publications. Each of the 1,049,866 edges in this dataset represents co-authorship on a publication between two of the 317,080 authors.

LiveJournal
The LiveJournal dataset is derived from the LiveJournal social network. In this social network, users can assign mutual friendship and join user-defined groups. For the dataset 5 (Leskovec and Krevl, 2014) the 3,997,962 nodes represent users and the 34,681,189 edges are formed from the friendship relations between these nodes.

Friendster
Like the LiveJournal dataset, the Friendster dataset 6 (Leskovec and Krevl, 2014) is also derived from the social network bearing the same name. But the Friendster dataset is an order of magnitude larger bringing in 65,608,366 nodes and 1,806,067,135 edges and 8.7GB of compressed edges. While this scale makes it unattractive for benchmarking FOX and LAZYFOX, it serves us as a feasibility test for the algorithm and implementation on large scale.

RESULTS
The implementation of the LAZYFOX algorithm enables us to evaluate the runtime improvements and the impact on overlapping community quality of a multithreaded approach. Note that running LAZYFOX with a queue size of one is equivalent to the original FOX algorithm. During the evaluation, the queue size was always equal to the thread count. The results of this section were computed with the thread counts in {1, 2, 4, 8, 16, 32, 64, 128, 256} and a fixed WCC threshold of 0.01. The computations were made on an HPE XL225n Gen10 machine with 512 GB RAM, and two AMD EPYC 7742 with 64 cores.

Runtime Improvements
The main goal of any multithreaded approach is to improve the runtime. LAZYFOX enables the parallel calculation of node changes, speeding up this step. The execution of these changes, however, has to be done sequentially, which is the main non-parallelizable part of the algorithm. The runtime measurements were taken without saving the results of the computation to disk to remove the very volatile I/O operation bottleneck from the benchmarks. The preprocessing steps described in the methods section are part of the measurement.
We find significant improvements of runtime with the multithreaded approach on the Eu-core, DBLP and LiveJournal datasets (see Figure 2). Even the use of two threads instead of one reduces the original runtime of the FOX algorithm by about 20%. While extra threads improve the runtime, the improvement rate does not stay the same.
The relative runtime improvements in the DBLP and the LiveJournal datasets are roughly the same, despite the fact that the LiveJournal dataset has orders of magnitude more nodes than the DBLP dataset. The original runtime on the Eu-core dataset (Eu) is reduced massively. With 256 threads LAZYFOX takes just 4% of the original FOX runtime. However, this extreme improvement is an exception to the overall results, due to the small scale of the Eu-core dataset (∼ 1000 nodes spread on 256 threads). Overall, we observe consistent runtime improvements also for larger scale networks, making the improvements independent of dataset size.
We also see that the runtime of LAZYFOX on the DBLP dataset gets worse switching from 128 to 256 threads (see Figure 2). It is not caused by an additional iteration that had to be made by LAZYFOX due to imprecision, as all DBLP runs take exactly seven iterations to converge. Instead, the increase in runtime appears before the first iteration runs, in the run preparations, such as initializing the threads. Thus, the most likely cause for the increased runtime is that the 128 additional thread initializations going from 128 threads in total to 256 threads in total do not yield enough runtime improvement to account for their own initialization time. Taken together, we see a thread count of 64 or 128 as optimal, being a trade-off between runtime improvement and resource usage for our examined networks.

Figure 2. Runtime Comparison
The runtimes of LAZYFOX on three different datasets EU-core, DBLP, and LiveJournal and different threadcounts relative to the non-parallelized runtime (threadcount 1, FOX algorithm).

Quality Impact
The multithreaded approach of LAZYFOX does alter the computations. Therefore, the results of LAZYFOX on the same dataset differ for different threadcounts. However, we find these changes to be insignificant for sufficiently large datasets. The following sections compare quality measurements and analysis results of the singlethreaded approach to the multithreaded approaches.

Ground Truth Metrics
To verify that the difference in community results of LAZYFOX and FOX are negligible, we compare the results with each other (see Table 2). We use two common metrics to measure overlapping community similarities, F1-Score and ONMI distance (see Methods). As the computational differences between FOX and LAZYFOX increase with a higher degree of parallelism, we compare LAZYFOX with increasing threadcounts.  (Staudt et al., 2015).
We find that on sufficiently large datasets, LAZYFOX results in communities extremely similar to the FOX communities (F1-Score of .99, ONMI distance of ≤ .01). However, we find that for the small Eu-core dataset, a high degree of parallelism does impact the result. While LAZYFOX with a threadcount of 128 creates results with .99 F1-Score and .05345 ONMI distance, the increase to 256 threads impacts the final result, reducing the F1-Score to .85 and increasing the ONMI distance to 0.32. These results suggest that smaller datasets such as Eu-core are more prone to changes caused by parallelization.

Community Analysis
We also perform a structural analysis of the results obtained by LAZYFOX. In the best case, the properties measured (such as average community size) should stay the same, regardless of threadcount. Similar properties mean that all threadcounts can be used to draw the same conclusions over community structures within a specific dataset, making the degree of parallelism used in LAZYFOX a hyper-parameter only relevant for run-time improvement, not for result quality.
The most obvious property of community detection is the number of detected communities. The threadcount used has no impact on this number, and for all threadcounts we detected 213 communities for the Eu-core, 76,513 communities for the DBLP and 920,534 communities for the LiveJournal dataset.
Looking at the size of the communities, the maximum and minimum sizes for DBLP and LiveJournal communitites do not change dependent on threadcount. The biggest community in DBLP has 115 members, LiveJournal 574. In the Eu-core dataset the threadcount changes the original maximum size of 135 members by maximum of plus two. However, the run with 256 threads is an exception, as the maximum size here is decreased by 39. This is another indication that a threadcount close to the node count of the dataset (256 is about one fourth of the Eu-core node count) is not optimal.
Finally, we can investigate the overlap between communities. This is the average number of communities a node belongs to. Again, this value does not change for DBLP or LiveJournal over different threadcounts, staying at 1.19 for DBLP and 1.9 for LiveJournal. The Eu-core dataset's overlap changes with different threadsizes, starting with an overlap of 5.44 for threadcount equal to one. For a threadcount up to four this stays relatively stable with changes of less than 0.1. However, higher threadcounts change the overlap quite drastically, up to +0.3. Threadcount 256 is the exception here again, changing the overlap from the original 5.44 to 4.22, which is one community less per node.
From these results we conclude that on sufficiently large datasets, the threadcount does not impact the obtained community structure. The changes only occur with the Eu-core dataset, and get worse with higher threadcounts. This is caused by the small node count in Eu-core. The nodecount therefore can be used as an indicator to determine the most favorable degree of parallelization. As the Eu-core results already change at two threads instead of one, we would suggest that the node count should at least be 500 times the threadcount to avoid these complications.

Cluster Analysis
While it is worthwhile to investigate the impact of the threadcount to the various metrics, these metrics can also be used to analyze the semantics of the datasets.
LAZYFOX optimizes triangle count. This means nodes end up in the same group if they are strongly connected with each other. If we speak of people, this means they are socially close. In all our datasets the nodes represent people, connected by bond, such as common work (Eu-core, DBLP) or other social interaction (LiveJournal, Friendster).

Eu-core
We find 213 communities with an average size of 11. This means that within the research institution, there are about 213 teams with an average team size of 11 people. These teams can already be disbanded, as the data contains e-mails of a long timespan. The high overlap of 5.44 indicates that a single person works on average in 5.44 teams, however, because teams can already be disbanded this is not true for any point in time. It means that an employee works on average in 5.44 teams before leaving the institution or settling for a final research team. This could mean that there are only 5 or 6 team changes before reaching a leading position in a team or leaving the company, capping off the team changes.

DBLP
We find 76,513 communities in the DBLP network with an average size of 4.9 members per community. Semantically these communities represent research groups. Scientists are the nodes, and edges are their co-authorship. Strong connections mean that any author of the group has published at least once with most of the other authors. The average size is reasonable for research groups, and indicates that larger research groups have sub-groups who rarely co-author with each other. Also, there is low overlap between groups, about 1.2, which means each author has on average 1.2 research groups. While one would assume a researcher stays true to his or her field, the nodes with an overlap over 1 are likely to be more senior members of the research community, having been part of multiple research groups, or researchers who changed their fields.

LiveJournal
Another dataset we looked at is LiveJournal, a platform and social network for blogging. Users can befriend each other and join common interest groups. In this dataset we find that the average node has a degree of 17 and an overlap of 1.9. This means that each user has on average 17 friends and belongs to about two friendship groups. We assume these represent real life groups, as we think a mutual friendship circle of average 8 people (community size mean) is unlikely to form from social network interactions alone. However, this is an assumption and verifying that would need sensitive data of LiveJournal user accounts to the people behind them and their real life friendships, which we do not have.

Large Scale Analysis -Friendster
Finally, we would like to present the results of our computations on the Friendster dataset. The enormous scale of this dataset makes an analysis with FOX not feasible in reasonable time. However, due to the runtime improvements achieved with LAZYFOX this analysis is made possible. We ran LAZYFOX with 256 threads on the Friendster dataset twice, once with and once without saving the intermediate results to disk. For both runs we use the measured LAZYFOX runtime to estimate the FOX runtime Figure 3. We do this by assuming a speedup ratio similar to the speedup ratios of the DBLP and LiveJournal datasets (0.18), as we found that the speedup is independent of scale at datasets of sufficient size.
The disk operations of saving the computation results of such a large dataset as Friendster are time consuming: After each iteration about 1.5 GB of clustering results are written to disk. LAZYFOX converged after eight iterations, running about 171.3 hours (∼ 7.1 days) with and 71.6 hours (∼ 3.0 days) without saving to disk. It is save to say that the I/O operations and their preparations take up most of the runtime. This has to be kept in mind when working with large datasets. Figure 3 illustrates why LAZYFOX enables community analysis of large scale networks. A runtime of 71.6 hours (∼ 3.0 days) is far more feasible than a runtime of almost 400 hours (∼ 16.7 days).
After the 8th iteration, LAZYFOX results in 13,861,732 detected communities, with an average size of 9 nodes per community. However, the largest community has 4,721 members. This indicates that Friendster was mostly used for real friend groups where a size of 9 people is reasonable, but it also contains closely connected communities of great size. We find that about 92% of all communities have 2 to 19 members. Communities over 100 members make up only 0.003% of all communities. We assume that these large communities are career networks, institutions or non-human user networks (bots), where a high interconnectedness between members is beneficial to the members, even if they do not know each other personally. We also find that a node belongs on average to 1.92 communities, meaning each user has about 2 groups of friends. We find LAZYFOX highly viable to run analyses on such large datasets, despite the runtime of over a week. However, computing metrics such as F1 which compare the results to the graph itself would be challenging due to the sheer size of the graph.

WCC Threshold Impact
Another hyper-parameter apart from the threadcount for the LAZYFOX algorithm is the iteration termination criterion, the WCC threshold. Lyu and colleagues propose a threshold of 0.01 of relative WCC change, meaning that if an iteration decreases the global WCC by less than 1%, the algorithm stops. This threshold was determined by experiments measuring community size and density (compare Lyu et al. (2020), Table 7), as a lower threshold did not yield significant change in these properties. However, we find that the threshold's impact on the algorithm's runtime is quite extraordinary. As  Figure 4 shows, a slightly higher threshold can save multiple iterations. This has high impact on runtime, as the iterations get slower over time. We find that even the threshold of 0.02 instead of 0.01 yields great runtime improvements for runs on a single thread. For the Eu-core dataset, it saves five iterations, which is equivalent to 39% of the total runtime. For DBLP, we save two, for LiveJournal three iterations, which is equivalent to 33% and 43% of the total runtime, respectively. These runtime improvements are due to an earlier termination and therefore can still be seen in runs with a higher threadcount. Running LAZYFOX with 256 threads on the LiveJournal dataset with a WCC threshold of 0.02 still saves 39% of the runtime, compared to the same run with a WCC threshold of 0.01. However, the effectiveness can be dependent on the dataset scale, as the savings for the Eu-core and DBLP datasets at this high threadcount are significantly smaller (3% and 10%, respectively).
It is important to note that these decreased savings at higher threadcounts are due to the overall decreased total runtime and not due to a different WCC development over time (see Figure 5). While a higher threadcount can lead to different results and therefore change the WCC scores, this is not the case at large scale datasets. As the community analysis results are unaffected by higher threadcounts (see 'Quality Impact' section), so is the WCC. The Eu-core dataset here again is an outlier due to the threadcount being close to its nodecount.

DISCUSSION
Our proposed parallelization of the algorithm slightly differs in its logic from the original version FOX (Lyu et al., 2020): LAZYFOX computes first all node changes for a certain batch of nodes (in parallel) and then executes them altogether to generate a new community structure. In contrast, in FOX, computed changes for a single node are applied immediately. However, LAZYFOX still generates highly similar results to FOX and therefore enables detecting meaningful overlapping communities. These results go along the same lines as the parallelization of e.g. the BigClam algorithm (Liu and Chamberlain, 2018). They show once more that many analysis approaches can be parallelized even if the resulting algorithms are not strictly equivalent to their sequential counterparts.
With the runtime improvement provided by the parallelization LAZYFOX brings overlapping community detection into new areas of application and allows for the analyses of significantly larger and more complex datasets. It reduces the computation time for networks with millions of nodes and billions of edges from weeks to days. For example, LAZYFOX could not only be used to find community structures in huge social media networks such as twitter, but also to find complexes or pathways in intricately connected multi-layered molecular network (Liu et al., 2020), or querying global-scale, finely resolved climate (Steinhaeuser et al., 2011), or ecological networks (Bohan et al., 2017). LAZYFOX is very flexible, the algorithm can be straightforwardly adapted to take directed or weighted graphs into account. We would like to address these extensions in the future, thereby opening even further application areas for overlapping community detection.
LAZYFOX relies on nodes iteratively joining and leaving communities. Therefore, it could generate empty, disconnected, or communities fully contained in other communities. We provide an additional post-processing function to eliminate those types of undesired results. However, note that it can be computationally expensive to perform this post-processing on large graphs, or graphs with many detected communities. Sometimes, communities that are fully contained in other communities are desirable and occur in the ground truth. In these cases, e.g. the citation network in SNAP (Yang and Leskovec, 2012), they should not be removed. The post-processing needed is therefore dictated by the research domain which is why detailed analyses on post-processing is not part of our work. We showed that the value of the WCC threshold hyperparameter is decisive for the runtime of the algorithm. This is expected as it constitutes the termination criterion of this iterative algorithm, and it is comparable to criteria applied to convergence assessment for other graph-based analyses, such as the PageRank algorithm in NetworKit (Staudt et al., 2015). Alternatively, limiting the number of performed steps is another solution for termination of iterative algorithms that has been applied previously, e.g. in node-centric PageRank computation in iPregel (Capelli et al., 2019). An investigation of the asymptotic behavior, i.e. whether the WCC score of LAZYFOX converges, might be interesting, but we have not experienced problems in the application cases we analyzed. As heuristic solution, we suggest to monitor the change in WCC over the course of the computation to discover problematic cases.
The queue size as second hyperparameter of LAZYFOX was set to the available threadcount in our experiments. In principle, LAZYFOX allows to choose both values independently from one another. However, increasing the threadcount over the queue size does not yield any runtime improvements as the queue size controls the maximum degree of parallelization. Additional threads will then actually slow down the computation as their allocation takes time.
Moreover, the larger the queue size, the more different LAZYFOX becomes to FOX in theory, and we cannot guarantee that the community detection results remain stable. Overall, we find that the optimal queue size and thread count should scale with the size of the dataset, but unless very small graphs are analysed, up to 250 cores can be exploited without strong impact on the results.

CONCLUSION
We provide LAZYFOX, an open-source implementation of an efficient, parallelized algorithm for overlapping community detection. Our implementation and analysis is another positive example for the idea that many graph analysis algorithms can be parallelized, even if not being strictly equivalent to their sequential version. The results show that the in-parallel computed optimization of the WCC metric yields extremely similar results to the sequential computation. This allows the leverage of modern hardware to significantly decrease runtime, enabling the detection of community structures of very large graphs, without loosing community quality. The results on the impact of the WCC threshold allows an informed decision on the runtime -WCC score trade-off. With our improvements, we make overlapping community detection achievable for very large graphs with at least tens of million nodes and a few billion edges in a reasonable amount of time. Thus, we enable this type of graph analysis for novel and complex application domains that have not been previously explored with respect to overlapping community detection.