---
title: Artificial Benchmark for Community Detection (ABCD)
url: https://www.emergentmind.com/topics/artificial-benchmark-for-community-detection-abcd
type: topic
---

# Artificial Benchmark for Community Detection (ABCD)

Searching arXiv for the ABCD benchmark paper and closely related follow-up work to ground the encyclopedia entry.
arxiv_search.query({"search_query":"id:2002.00843 OR all:\"Artificial Benchmark for Community Detection\"","max_results":10,"sort_by":"submittedDate","sort_order":"descending"})
Looking up extensions and theoretical follow-ups on ABCD, including modularity, self-similarity, outliers, hypergraph, and multilayer variants.
arxiv_search.query({"search_query":"all:\"Artificial Benchmark for Community Detection\" OR all:ABCD community detection benchmark","max_results":20,"sort_by":"submittedDate","sort_order":"descending"})
Artificial Benchmark for Community Detection (ABCD) is a random graph model with community structure and power-law distribution for both degrees and community sizes, introduced as an alternative to the standard and extensively used LFR graph generator for benchmarking community-detection algorithms [2002.00843]. It was designed for settings in which synthetic graphs must combine planted community structure with degree heterogeneity and realistic size heterogeneity, while remaining scalable and analytically tractable. In the original formulation, ABCD addresses three issues attributed to LFR—scalability limitations, difficulty of theoretical analysis, and a mixing parameter with non-obvious interpretation—and is constructed so that one can move smoothly between two extremes: a disjoint union of independent communities and a random graph with no community structure [2002.00843].

## 1. Motivation and benchmark role

Many complex networks of practical interest possess community structure, and many machine learning algorithms and tools developed for complex networks try to take advantage of the existence of communities to improve their performance or speed [2002.00843]. Because there are many competing algorithms for detecting communities in large networks, and because these algorithms are often sensitive and cannot be fine-tuned for a given but constantly changing real-world network, synthetic benchmarks with built-in ground truth remain a standard evaluation device [2002.00843].

Within that benchmark landscape, ABCD targets large static graphs with planted, non-overlapping communities and heavy-tailed marginals. The original paper positions it directly against LFR, whereas other benchmark families emphasize different objectives. FARZ, for example, is a one-pass growth model intended to generate intrinsically modular networks with scale-free degrees, nonzero clustering, and tunable assortativity [1801.01229]. A separate dynamic benchmark based on a deterministic strongly-assortative block model focuses instead on progressively evolving graphs and scenario languages for merge, split, birth, death, and related temporal events [2007.08635]. This suggests that ABCD occupies the niche of a static, power-law, community benchmark whose construction is deliberately simple enough to support both high scalability and asymptotic analysis.

## 2. Formal specification

The core ABCD input parameters are the number of vertices $n$; a degree-distribution exponent $\tau_d$ (called $\gamma$ in the paper); minimum and maximum degrees $d_{\min}, d_{\max}$; a community-size exponent $\tau_c$ (called $\beta$ in the paper); minimum and maximum community sizes $s_{\min}, s_{\max}$; a mixing parameter $\xi \in [0,1]$; and a choice between an “exact” configuration-model variant and an “expected” Chung–Lu variant [2002.00843]. Recommended defaults in the original summary are $\tau_d=2.5$, $\tau_c=1.5$, $\xi=0.2$, and the exact variant; $d_{\max}$ is suggested as $O(\sqrt{n})$ or $500$ for $n$ up to $10^6$–$10^7$, while $s_{\min}$ and $s_{\max}$ are typically chosen to match the degree bounds [2002.00843].

Both the degree sequence and the community-size sequence are sampled from truncated discrete power laws. If $\gamma$ is the degree exponent and $d$ runs from $d_{\min}$ to $d_{\max}$, then
$$
\Pr\{\text{degree}=d\}\propto d^{-\gamma}, \qquad d_{\min}\le d\le d_{\max}.
$$
Likewise, if $\beta$ is the community-size exponent and $s$ runs from $s_{\min}$ to $s_{\max}$, then
$$
\Pr\{\text{community size}=s\}\propto s^{-\beta}, \qquad s_{\min}\le s\le s_{\max}.
$$
In practice one draws i.i.d. samples until the sum of degrees is even and the sum of community sizes is exactly $n$ [2002.00843].

The standard notation is as follows. The sampled target degree of vertex $i$ is $w_i$, and $W=\sum_i w_i$. There are $k$ communities with sizes $s_1,\dots,s_k$ summing to $n$, and the vertex set of community $\ell$ is denoted $V_\ell$ [2002.00843].

## 3. Construction procedure

ABCD generates a graph $G$ as a union of $k+1$ independent graphs,
$$
G_0 + \bigcup_{\ell=1}^k G_\ell,
$$
where $G_0$ is a background graph and each $G_\ell$ is a cluster graph for community $\ell$ [2002.00843]. The key mechanism is a split of each target degree into an intra-community part and an inter-community part:
$$
y_i=(1-\xi)w_i, \qquad z_i=\xi w_i.
$$
Roughly, $y$ controls intra-community edges and $z$ controls inter-community noise [2002.00843].

Vertex-to-community assignment is constrained by feasibility. Vertices are sorted by $w_i$ and communities by $s_\ell$, and for each vertex one computes
$$
x_i=\lceil(1-\xi \phi)w_i\rceil,
$$
where
$$
\phi = 1-\sum_{\ell=1}^k (s_\ell/n)^2.
$$
A vertex $i$ may only be assigned to a community of size at least $x_i+1$. The appendix algorithm samples uniformly at random from all admissible assignments in $O(n+k)$ time [2002.00843].

Inside each community, edge generation has two variants. In the expected-degree Chung–Lu version, for each community $\ell$ one restricts $y$ to $V_\ell$, sets $Y_\ell=\sum_{i\in V_\ell} y_i$, and draws exactly $e_\ell=\lfloor Y_\ell/2 \rceil$ edges by repeatedly selecting endpoints in $V_\ell$ with probabilities proportional to their $y$-weights, rejecting self-loops and duplicate edges. This gives $\mathbb{E}[\deg_{G_\ell}(i)]\approx y_i$ for $i\in V_\ell$ [2002.00843]. In the exact-degree configuration version, one sets internal stub counts $\hat y_i=\lfloor (1-\xi)w_i \rceil$ for $i\in V_\ell$, pairs stubs uniformly at random, and then performs $O(1)$ switchings to remove loops and multiedges; each $G_\ell$ is initially a random multigraph with internal degree sequence $\hat y$ [2002.00843].

The background graph $G_0$ is generated analogously from $z$. In the Chung–Lu formulation, if $Z=\sum_i z_i$, then for vertices in different communities
$$
P_{\mathrm{inter}}(i,j)=\frac{z_i z_j}{Z},
$$
while for vertices in the same community $f(i)$,
$$
P_{\mathrm{intra}}(i,j)=\frac{z_i z_j}{Z}+\frac{y_i y_j}{Y_{f(i)}}.
$$
In the configuration formulation, the residual stub counts are paired globally and conflicts with cluster edges are removed by rejection or simple switchings [2002.00843].

## 4. Mixing parameter and relation to LFR

The parameter $\xi$ governs the strength of the planted partition. At $\xi=0$, the background graph is empty and the graph is a disjoint union of independent cluster graphs. At $\xi=1$, the intra-community component vanishes and the graph is an ordinary random graph—Chung–Lu or configuration model—so the communities have no influence on edge placement [2002.00843]. The original paper emphasizes that $\xi$ interpolates smoothly between these two extremes.

In the core Chung–Lu analysis, the expected fraction of inter-community edges in $G$ is
$$
\xi \mu_0,
$$
where
$$
\mu_0 = 1-\sum_{\ell=1}^k (W_\ell/W)^2, \qquad W_\ell=\sum_{i\in V_\ell} w_i.
$$
To match a user’s LFR-style parameter $\mu$, the paper sets
$$
\xi=\mu/\mu_0.
$$
This is the precise correspondence given in the original ABCD formulation [2002.00843].

A common simplification is to treat $\xi$ as directly analogous to LFR’s mixing parameter. Later expository summaries and extensions sometimes state this relation asymptotically or in expectation, but the original paper also notes an important structural difference: LFR enforces a constant local $\mu_i$ across communities, whereas global ABCD produces a negative correlation $\mu_i \sim 1/s_i$ [2002.00843]. A local-$\xi_i$ variant can recover the LFR-style flat profile if desired [2002.00843]. This distinction matters when interpreting “equal noise” across communities, since ABCD’s global background mechanism is intentionally simpler and more analyzable than LFR’s rewiring-based construction.

## 5. Theoretical properties, modularity, and performance

ABCD preserves degrees by design. In expectation each vertex’s degree is exactly $w_i$, and in the configuration variant it is exactly $w_i$ [2002.00843]. Standard large-deviation bounds for Chung–Lu and random pairing imply concentration, so with high probability $\deg(i)\approx w_i$ [2002.00843]. Under mild sparsity, $\sum_i w_i^2=O(n)$, the expected number of collisions is $O(1)$ per community, and one can condition on simplicity with $o(1)$ change in total variation [2002.00843].

The basic complexity bounds are one of the model’s defining properties. Sampling degrees, community sizes, and assignments is $O(n+k)$; edge generation is $O(\sum_\ell e_\ell + e_0)=O(m)$; overall time is $O(m+n)$ and space is $O(n+m)$; and the construction avoids MCMC or expensive switching as in LFR [2002.00843]. Empirically, the original paper reports that ABCD is $40$–$100\times$ faster than LFR on graphs up to $10$ million nodes [2002.00843].

Follow-up work extended this scalability argument. ABCDe is a multi-threaded Julia implementation that parallelizes the $k$ community jobs and the background job, assigns each task its own seed for reproducibility independent of thread scheduling, and uses compact graph representations with minimal synchronization [2203.14899]. The reported performance is more than ten times faster and better scaling than the parallel implementation of LFR provided in NetworKit, with speedups of $13\times$–$45\times$ over NetworKit-LFR in one-thread comparisons and $20\times$–$50\times$ in multi-threaded comparisons; the implementation summary also reports successful generation up to $n=10^9$ on a $160$ GB machine [2203.14899].

Structurally, ABCD and LFR produce similar graphs when the configuration-based variant is used. Reported metrics include clustering coefficient, global transitivity, eigenvector centrality, and average path-length, all of which match LFR closely in that setting, whereas the Chung–Lu variant underestimates clustering, as expected [2002.00843]. This is an important practical qualification: the model family contains both an exact-degree and an expected-degree realization, and fidelity to LFR-style local structure is strongest for the configuration version.

Theoretical analysis of modularity further clarifies when the planted partition should be recoverable by modularity-based methods. For the planted partition $\mathcal{C}$, the modularity satisfies
$$
Q(\mathcal{C})=(1+o(1))(1-\xi)
$$
with high probability as $n\to\infty$ [2203.01480]. When noise is small, and under the stated assumptions including $\delta\ge 100$ and $\xi<\xi_0(\delta)$ for an explicit $\xi_0>0$, the optimal modularity satisfies
$$
q^*(A)=Q(\mathcal{C})+o(1)=(1-\xi)+o(1),
$$
so the planted communities are essentially modularity-maximizing [2203.01480]. For larger noise there is a threshold above which $q^*(A)$ exceeds $Q(\mathcal{C})$, meaning that a Louvain-style optimum no longer coincides with the planted partition; and when $\delta=1$, the ground truth is never exactly optimal for any $\xi>0$ because degree-1 nodes can detach [2203.01480]. ABCD therefore functions not only as a generator of “easy” instances but also as a controlled source of cases where a standard quality function ceases to favor the ground truth.

A further analytical development is the self-similarity result: the degree distribution of ground-truth communities is asymptotically the same as the degree distribution of the whole graph, appropriately normalized based on community size [2312.00238]. This permits estimation of the number of edges induced by each community and of the self-loops and multi-edges generated during the configuration-model stages, which is relevant because rewiring these collisions is an expensive part of the algorithm and slightly perturbs the underlying uniform simple-graph distribution [2312.00238].

## 6. Extensions, variants, and downstream use

ABCD has served as the basis for a family of benchmark generators that preserve its central ingredients—power-law degrees, power-law community sizes, and a tunable noise parameter—while changing the ambient combinatorial object or the form of ground truth.

**ABCD+o** introduces potential outliers through an additional parameter $s_0<n$, the desired number of outlier nodes [2301.05749]. Community sizes are sampled to sum to $n-s_0$, and eligible outliers are chosen under the feasibility condition
$$
w_i \le L + s_0 - \frac{L s_0}{n} - 1,
$$
where $L = |\{i:z_i\ge 1\}|$; chosen outliers are assigned $y_i=0$ and $z_i=w_i$, so all their edges are placed in the background graph [2301.05749]. The paper identifies high participation coefficient, low ECG coefficient, and small community-association strength as distinguishing properties, and on synthetic experiments with $n=10\,000$ and $s_0=500$, participation coefficient achieves $\mathrm{AUC}>0.98$ for $\xi\le 0.5$ [2301.05749].

**ABCD+$o^2$** extends this line to overlapping communities and outliers simultaneously [2506.05486]. In addition to the core parameters, it introduces an average number of communities per non-outlier $\eta$, a hidden geometric reference dimension $d$, and a target Pearson correlation $\rho$ between node degree and number of communities. Overlaps are created by a geometric construction on points sampled in the unit ball, and for a node in $\eta_v$ communities the internal half-edges are split as equally as possible across those memberships [2506.05486]. The summary states that the geometric construction produces fewer but larger, more realistic overlaps than LFR-style models and can reproduce empirical distributions of communities per node, intersection sizes, and intersection densities more faithfully on DBLP, Amazon co-purchases, and YouTube social groups [2506.05486].

**h-ABCD** is the hypergraph counterpart of ABCD [2210.15009]. It retains power-law distributions for ground-truth community sizes and degrees, introduces a maximum hyperedge size $L$, target fractions $\{q_d\}$ of total volume assigned to hyperedges of size $d$, and homogeneity weights $\{w_{c,d}\}$ controlling how many nodes of a community hyperedge lie in its assigned community [2210.15009]. The model supports “strict,” “majority,” and “linear” homogeneity scenarios and is intended as a synthetic playground for hypergraph community detection. Reported scalability is linear in $n$ and roughly quadratic in $L$, with generation of $n=10^6$ and $L\le 20$ typically under $10$ seconds on a single core [2210.15009].

**mABCD** generalizes ABCD to multilayer networks [2507.10795]. It adds global parameters such as the number of layers $\ell$, an edge-correlation matrix $R$, and the dimension of a latent reference layer, together with per-layer activity fractions $q_i$, Kendall-$\tau$ degree-label correlations $\tau_i$, community-reference correlations $r_i$, degree and community power-law parameters, and noise levels $\xi_i$ [2507.10795]. The generation pipeline comprises six phases: node activity, degree sequences, communities, half-edge splitting, simple-graph rewiring, and edge-correlation enforcement [2507.10795]. The summary reports that, compared to the multilayerGM framework, mABCD is $10$–$300\times$ faster on the same $(n,\ell)$ and can generate multilayer networks on up to about $10^6$ nodes in minutes when the correlation-enforcement phase is omitted [2507.10795].

ABCD also appears as an evaluation substrate for downstream algorithms. A 2026 study on decentralized community detection via nonlinear social learning validates the Score-based Edge Reliability framework on ABCD graphs and reports that, for $\xi\le 0.40$, SER matches Louvain, Leiden, and spectral methods on normalized mutual information, segmentation error, modularity, and conductance, while all methods degrade sharply as $\xi$ approaches the detectability limit near $0.5$ [2606.00268]. This use underscores a broader role of ABCD: it is not only a benchmark for static algorithm comparisons but also a controlled environment for studying detectability, weak ties, frontier nodes, and the interaction between graph generation and inference mechanisms.

Source: https://www.emergentmind.com/topics/artificial-benchmark-for-community-detection-abcd