Elamur Research

Parallelizing Maximal Clique Enumeration on GPUs

Paper · 2022 · Mohammad Almasri; Yen-Hsiang Chang; Izzat El Hajj; Rakesh Nagi; Jinjun Xiong; and Wen-mei Hwu

Summary

Finding every fully connected group in a graph is harder than finding one interesting group. The search must cover all possibilities, avoid reporting the same group repeatedly, and distinguish a complete group from one that could still be enlarged. Mohammad Almasri and colleagues study this exact problem, maximal clique enumeration, and show how to organize it effectively for GPU and parallel computing. Their central contribution is an execution strategy that combines many concurrent searches with careful control of the state each search retains.

A clique is a collection of vertices connected to one another in every possible pair. A maximal clique cannot accept another vertex while preserving that property. “Maximal” does not mean “largest”: a graph may contain maximal cliques of different sizes, and enumeration seeks all of them. The paper uses the Bron–Kerbosch algorithm, which grows candidate cliques through a branching search. Earlier GPU approaches generally processed that search breadth first, exposing many branches simultaneously but accumulating an increasingly large frontier. The authors instead assign separate subtrees to GPU thread blocks. Each block explores its subtree depth first, while its threads cooperate on operations such as intersecting vertex sets and selecting a pivot.

That change alone does not solve the problem. Some subtrees finish quickly while others contain much more work, leaving parts of the GPU idle. The authors therefore introduce a worker list: idle blocks register their availability, and busy blocks transfer branches directly to them. Memory is another obstacle because exact maximality testing requires tracking vertices that were excluded from the current branch. The implementation reduces this cost by separating excluded vertices according to how their membership can change. It also supports partial induced subgraphs, which precompute only part of the local adjacency information and consult the original graph for the rest.

Against the strongest parallel CPU implementation identified by the authors, the single-GPU implementation achieves a geometric-mean speedup of 4.1× on V100 and 4.9× on A100. The corresponding maximum speedups are 10.2× and 16.7×. Experiments also show that the worker list reduces imbalance and helps execution scale across multiple GPUs within one machine. The results support a broader engineering lesson: irregular search benefits from coordinating traversal order, task transfer, and memory representation. They do not establish that every graph workload will obtain the same speedup, and the comparison with an earlier GPU implementation uses different hardware.

Interesting ideas

Schedule available workers before moving large tasks. When a task carries substantial state, placing speculative work into a shared queue can consume memory and create transfers that nobody needs. The worker list reverses this arrangement: idle processors advertise themselves, and busy processors prepare a transfer only when a recipient exists. This is useful beyond clique enumeration whenever search branches, analysis jobs, or document-processing tasks have expensive descriptions.

Exploit monotonicity in temporary state. Some excluded vertices can disappear as a search descends but cannot return until backtracking. The implementation stores these vertices in a shared array with boundaries for different depths, instead of copying the entire set at every depth. The reusable principle is to identify state whose evolution follows a restricted direction. Constraint propagation, recursive filtering, and other backtracking procedures may then need less storage than a literal stack of complete snapshots.

Precompute selectively. An induced subgraph accelerates repeated adjacency operations, but constructing it also takes time and memory. The authors compare a fuller representation with a smaller representation that leaves some lookups to the original graph. This makes preprocessing an explicit tradeoff rather than an automatic good. The same reasoning applies to indexes, caches, materialized views, and compiled intermediate structures whose construction cost must be recovered through later reuse.

Combine coarse independence with fine cooperation. Separate subtrees provide independent tasks for different blocks, while threads inside each block collaborate on the operations within a task. Neither level substitutes for the other. This division is useful when an application has both irregular outer structure and regular inner calculations: distributing whole tasks supplies concurrency, while cooperation within each task accelerates its repeated primitives.

Transfer work only when the transfer can pay. A donor does not hand away every available branch. It checks whether the branch is substantial and whether useful work will remain locally afterward. These conditions prevent task movement from becoming an end in itself. Similar admission rules can help recursive solvers and worker services avoid spending more time packaging, transferring, and reclaiming work than executing it.

Measure explanations alongside elapsed time. The paper examines load distributions, donation counts, execution-time categories, and hardware utilization in addition to overall speed. These observations distinguish an improvement caused by better balance from one caused by cheaper set operations or reduced preprocessing. The approach is valuable in evaluation and benchmarking, where a faster total alone may reveal little about whether an optimization will transfer to another workload.

Use structural properties to choose a representation. The proposed heuristic compares maximum degree with graph degeneracy to decide whether fuller local adjacency storage is worth its cost. This replaces an unconditional implementation choice with a simple rule tied to the resources the alternatives consume. Such rules are useful when a small collection of measurable input properties explains why different algorithms or storage layouts win on different inputs.

Deep dive: Parallelizing Maximal Clique Enumeration on GPUs

How maximal clique enumeration runs on GPUs through depth-first search, dynamic load balancing, and compact storage of search state. · about 37 minutes to read

How Mova uses it

Mova is a transparent language system written in Rust, with explicit rules, graph-based knowledge, and bounded execution interfaces. The connections below concern possible transfers from this paper’s search and systems design. They do not establish that Mova already contains the clique enumerator or has reproduced its performance. Each status mark is a proposal based on documented mechanisms; where the evidence does not establish implementation, that uncertainty remains.

Idea: Register idle workers before transferring expensive tasks. Where: Section III-C, dynamic load balancing. Area: operational scheduling. Mova: частково є (configured workers and persistent execution state in the operational layer). Mova could let available workers advertise capacity before another worker serializes a large analysis packet. The paper’s worker list supplies a concrete scheduling pattern, but its adoption in Mova is unknown. Why Mova: demand-driven transfer could reduce unnecessary copying of source-bound task state.

Idea: Keep queue entries small. Where: Section III-C, comparison between worklists and worker lists. Area: data structures. Mova: частково є (worker protocols and explicit task interfaces). The paper separates a lightweight availability record from the larger state required to execute a branch. Mova could apply that distinction to task directories and retained analysis packets, keeping references in scheduling structures while preserving full evidence elsewhere. Why Mova: small scheduling records could reduce memory pressure without discarding provenance.

Idea: Separate independent tasks from cooperative inner operations. Where: Section III-A, implementation overview. Area: parallel execution. Mova: частково є (shared-document specialist work in world/src/knowledge/retention/mice.rs). Mova already documents specialists operating over shared parsed material. A further proposal is to distinguish independent document or search tasks from parallel operations within each task, with separate budgets and measurements. Why Mova: this could expose useful concurrency without repeatedly preparing the same linguistic structure.

Idea: Prefer bounded depth-first exploration when breadth-first state grows too large. Where: Sections I and III-A. Area: search and memory. Mova: частково є (bounded recursive self-use and explicit execution limits in docs/hybrid-system.md). Mova could compare traversal strategies for combinatorial task families rather than assuming that retaining every frontier is affordable. No corresponding Mova benchmark is established. Why Mova: depth-first exploration may keep temporary search state manageable under a declared memory budget.

Idea: Derive independent tasks from an explicit ownership order. Where: Section II-D, independent first-level subtrees. Area: mathematics and deterministic execution. Mova: частково є (deterministic algorithms and source-bound combinatorial tooling). An ordered rule for which task owns a candidate can remove dependencies while preventing duplicate outputs. Mova could use this principle when enumerating compatible analyses or finite combinations. Why Mova: explicit ownership could make parallel enumeration easier to audit and reproduce.

Idea: Treat deeper initial splitting as a measured tradeoff. Where: Section III-B and Section IV-E. Area: task granularity. Mova: частково є (bounded task decomposition and worker execution). The paper finds that smaller starting tasks can improve balance while increasing repeated preparation. Mova could compare task sizes using both preparation and execution costs, rather than maximizing task count. Why Mova: finer decomposition may otherwise repeat parsing, evidence loading, or graph preparation without improving completion time.

Idea: Distinguish current candidates from excluded alternatives. Where: Section II-B, the roles of R, P, and X. Area: reasoning state. Mova: частково є (typed observations, constraints, and checks in groupants). A combinatorial search can retain both what remains admissible and what has already been considered elsewhere. This would be a search-specific distinction, not a replacement for Mova’s epistemic labels. Why Mova: retaining exclusions could prevent duplicate conclusions and support explicit completeness checks.

Idea: Require a stopping condition that establishes the intended result. Where: Section II-B, maximality testing. Area: evaluation and correctness. Mova: вже є (admitted-result boundaries in docs/hybrid-system.md and artifact gates in tools/enrich/README.md). The paper distinguishes an exhausted candidate set from a proven maximal clique. Mova already distinguishes successful execution from admitted evidence; future search tasks should preserve an equally explicit success predicate. Why Mova: a completed traversal should establish its declared claim rather than merely report that execution stopped.

Idea: Split temporary state according to its update rules. Where: Section III-E, compact excluded-set representation. Area: data and memory. Mova: нове. The specific proposal is to inspect recursive Mova searches for state that only shrinks and separate it from state that can both grow and shrink. An equivalent compact representation is not established by the documented scope. Why Mova: update-aware storage could reduce repeated copies while keeping exact search behavior.

Idea: Use shared arrays with depth boundaries for monotone filtering. Where: Figure 2 and Section III-E. Area: data structures. Mova: нове. A bounded search could retain one partitioned array and record a boundary for each active depth, provided that deeper filtering preserves the ancestor region. This is a proposed implementation technique whose applicability needs checking against each search’s invariants. Why Mova: it could reduce allocation and copying in recursive filtering tasks.

Idea: Make backtracking depend on invariants rather than full restoration. Where: Section III-E, returning to earlier levels. Area: algorithm design. Mova: частково є (explicit invariants in groupants). The paper restores a previous set’s membership through its saved boundary even though internal order has changed. Mova could formally describe when order is irrelevant and membership is preserved. Why Mova: such invariants could justify compact state without hiding assumptions about determinism.

Idea: Compare partial and full precomputation. Where: Section III-D and Section IV-E. Area: data processing. Mova: частково є (compiled knowledge, retained graphs, and indexed corpus evidence). Mova already prepares reusable structures, but the specific comparison would measure which relations deserve materialization and which should remain source lookups. Why Mova: selective preparation could avoid spending memory and construction time on information that a task rarely uses.

Idea: Select storage using structural input properties. Where: Section IV-E, representation heuristic. Area: adaptive algorithms. Mova: частково є (prospective cost prediction in tools/twin and bounded resource estimation). Mova could choose between alternative exact representations using measured graph or task properties. The paper’s threshold belongs to its clique workload and should not be copied as a universal constant. Why Mova: a small, explainable selection rule may adapt execution without an opaque controller.

Idea: Consider local representation choices within one graph. Where: Section IV-E, future optimization. Area: graph storage. Mova: нове. The authors suggest varying storage strategy across subgraphs instead of choosing once for the whole input. Mova could investigate the same possibility for heterogeneous retained graphs, while recognizing that this remains future work in the paper itself. Why Mova: different regions may have different reuse and memory costs.

Idea: Use compact binary sets where the domain is bounded. Where: Sections III-A, III-D, and III-E. Area: exact computation. Mova: частково є (compiled concept identifiers and integer-based rules). A bounded set of candidate identifiers may support compact membership and intersection operations. Existing integer identifiers do not establish that Mova already uses the paper’s binary adjacency representation. Why Mova: exact set operations could become cheaper without changing the meaning of a constraint.

Idea: Limit branch donation to substantial work. Where: Section III-C, donation conditions. Area: operational scheduling. Mova: частково є (explicit task budgets and resource-aware tools). Mova could require an estimated benefit before transferring a recursive subtask. The paper’s candidate-count condition is specific to clique search; an appropriate Mova condition remains unknown. Why Mova: avoiding tiny transfers could keep coordination overhead below useful computation.

Idea: Preserve useful work for the donor. Where: Section III-C, remaining-branch condition. Area: load balancing. Mova: нове. A donor could consider its remaining workload before assigning away a task, rather than immediately becoming another idle worker. A corresponding Mova policy is not established. Why Mova: this could reduce needless exchanges between workers and make progress more stable.

Idea: Separate initial task allocation from late imbalance repair. Where: Section III-C, the execution phases. Area: scheduler architecture. Mova: частково є (configured task queues and bounded execution). The paper uses straightforward allocation while independent tasks remain, then activates branch donation to address the remaining unevenness. Mova could evaluate this separation for long-running batch analyses. Why Mova: a simple common path could handle ordinary work while more expensive coordination addresses the difficult remainder.

Idea: Publish task state before signaling readiness. Where: Section III-C, release-acquire synchronization. Area: concurrent correctness. Mova: частково є (explicit worker interfaces and persistent result state). A worker handoff should define when the receiving side may observe a complete packet. The CUDA mechanism itself does not automatically transfer to Mova’s transports. Why Mova: a clear publication boundary could prevent partial state from being mistaken for an executable task.

Idea: Prefer local balancing unless wider coordination proves useful. Where: Section IV-D, private and shared worker-list experiments. Area: distributed execution. Mova: частково є (separate worker interfaces and configured services). The authors find that shared coordination across GPUs costs more than it returns in their setup. Mova could compare local and global scheduling policies rather than assuming broader sharing is better. Why Mova: locality may preserve throughput when task state and communication are expensive.

Idea: Measure load distribution independently of total runtime. Where: Section IV-C and Figure 3. Area: statistics and evaluation. Mova: частково є (worker logs, prospective-versus-measured runs in tools/twin, and resource logging in jobs). Mova could add workload distributions for comparable workers or tasks, with the unit stated explicitly. Why Mova: this would help distinguish uneven assignment from slow primitives or insufficient resources.

Idea: Record transfer counts together with their cost. Where: Table III and Figure 5. Area: diagnostics. Mova: частково є (retained execution results and diagnostic receipts). Donation counts explain where dynamic balancing is active, but they are not themselves a success metric. Mova could pair transfer counts with time and completed work. Why Mova: this could reveal whether coordination is solving imbalance or merely generating activity.

Idea: Break runtime into meaningful operation categories. Where: Section IV-E and Figure 5. Area: performance analysis. Mova: частково є (profiling in tools/enrich and measured execution tools). Mova could separate preparation, graph access, rule execution, synchronization, and result validation where those categories apply. Why Mova: an operation-level account would make optimization decisions more concrete than a single end-to-end duration.

Idea: Keep benchmark accounting aligned across alternatives. Where: Section IV-A, measurement reporting. Area: evaluation design. Mova: вже є (dated measurements, held-out gates, and explicit measurement scope). The paper includes ordering preparation while excluding disk reading, matching its stated comparison boundary. Mova should likewise state which preparation and persistence costs each reported result includes. Why Mova: aligned accounting prevents a faster inner stage from being mistaken for a faster complete workflow.

Idea: Separate hardware effects from algorithmic effects. Where: Section IV-B, comparison with earlier GPU work. Area: evaluation design. Mova: вже є (CPU reference execution and measured GPU approximants in docs/gpu-exec.md). Mova should preserve this distinction when comparing exact algorithms, alternative devices, or approximate paths. Why Mova: a speed claim is more informative when execution hardware and semantic agreement are both visible.

Idea: Test whether an optimization remains necessary after another change. Where: Sections IV-C through IV-E. Area: controlled comparison. Mova: вже є (regression gates, negative controls, and held-out comparisons). The worker list changes the value of deeper initial splitting. Mova could explicitly re-evaluate older heuristics after introducing a new mechanism instead of accumulating every previously useful optimization. Why Mova: removing redundant work may be as valuable as adding another rule.

Idea: Evaluate a selector against the best measured alternative. Where: Table IV and Section IV-E. Area: evaluation and decision rules. Mova: частково є (transparent routing thresholds and measured cost predictions). A proposed execution selector could be compared with the strongest available choice on the same development tasks, while keeping assessment data separate. Why Mova: this would measure the cost of choosing incorrectly rather than merely showing that the chosen procedure runs.

Idea: Preserve exactness while changing execution. Where: Section II-A and Section III-A. Area: mathematics and verification. Mova: вже є (deterministic native inference and explicitly distinguished exact GPU stages). The paper accelerates an exact search without sampling the graph. Mova’s analogous opportunity is to change scheduling or storage while requiring the same admitted outputs. Why Mova: performance work can then be assessed independently of changes in reasoning behavior.

The problem and its context

What enumeration must establish

A graph represents objects as vertices and relationships as edges. The paper considers simple undirected graphs: relationships have no direction, and the graph representation excludes the additional complications that would arise from directed connections. A clique is especially demanding because every member must connect to every other member. Finding such groups can expose strongly connected structure, but the enumeration problem asks for more than an example.

The distinction between maximal and maximum is essential. A maximum clique would concern the greatest clique size. A maximal clique concerns whether a particular clique can be enlarged. A smaller clique can therefore be maximal even when another part of the graph contains a larger one. An enumeration procedure cannot stop after discovering a large result, because that discovery says little about maximal groups elsewhere.

The authors’ illustrative graph contains maximal cliques ABCD and AEF. Several groups contained inside ABCD are complete but do not qualify as maximal. ABC, for instance, can accept D. This example also explains why merely finding complete groups would produce the wrong output: enumeration needs a test that rules out possible extensions.

The paper motivates exact enumeration through applications involving communities, recommendations, graph storage, biological networks, and finance. These are motivations for the computational primitive, rather than application experiments performed by the authors. The evaluated contribution is an implementation of the graph search itself.

Exactness matters because the implementation must find every maximal clique without graph sampling or an approximate substitute. The authors note that approximation can be acceptable in some applications, while arguing that an efficient exact method remains valuable. Their performance claims therefore concern accelerating a fixed combinatorial objective, not trading some answers away to reduce execution time.

Bron–Kerbosch organizes enumeration as backtracking. Starting from a partial clique, it considers vertices that can extend it, follows a branch after adding a vertex, and returns to explore alternatives. A search tree describes these choices: a parent contains a smaller clique, and a child contains that clique plus another vertex.

Naive branching wastes effort because many paths can lead toward the same larger clique. Pivoting reduces this duplication by choosing a vertex whose adjacency information identifies branches that can safely be skipped. The paper describes the original pivoting approach and the later improvement by Tomita and colleagues, which considers pivot candidates from both currently available and previously excluded vertices.

The work of Eppstein and colleagues supplies another foundation. It makes the first layer of search independent, reorders vertices through degeneracy ordering, and restricts adjacency data to an induced subgraph relevant to each subtree. These changes reduce dependencies and constrain the expensive sets that the search repeatedly manipulates.

The present paper combines these algorithmic ideas with GPU execution. Its contribution is not a replacement for Bron–Kerbosch’s logical structure. Instead, it addresses how to execute that structure with enough parallelism, sufficiently balanced work, and an affordable amount of state.

Why the GPU setting changes the design

Breadth-first traversal is attractive on a GPU because many nodes at the same depth can be processed together. The difficulty is retaining the frontier. As the search expands, the number of active nodes can grow sharply, and each node carries its own state. Parallelism becomes entangled with memory consumption.

The paper contrasts this with earlier work that kept depth-first traversal on the CPU and sent individual operations to the GPU. That arrangement avoids a large GPU frontier but introduces repeated communication and kernel-launch costs. The authors seek a design in which the GPU owns the traversal instead of serving as a repeatedly invoked helper.

Their earlier work on fixed-size clique counting already used block-level depth-first searches. Maximal clique enumeration adds difficulties. Search depth depends on the cliques encountered instead of a requested fixed size, and maximality requires excluded-vertex state. Work can therefore vary much more between subtrees, while each active traversal consumes more memory.

The paper also distinguishes clique enumeration from broader graph-pattern matching and from truss decomposition. General pattern matching has a wider objective and different storage pressures. Trusses relax the clique requirement and use different computational techniques. These neighboring problems provide context, but success on them would not establish success at exact maximal clique enumeration.

The method, step by step

The graph and its working sets

The paper writes the graph as follows:

G = (V, E)

G denotes the graph. V is its vertex set, and E is its edge set. For a vertex v, N(v) denotes the vertices adjacent to v. This neighborhood operation supplies the adjacency information used throughout the search.

Each active search node contains disjoint sets R, P, and X. R is the clique assembled so far. P contains vertices that remain available to extend R in the current branch. X contains vertices that could extend R but have already been considered through other branches.

P and X are therefore related but serve different purposes. Together they describe possible extensions of the current clique, while their separation records which extensions belong to the present branch. Without X, the algorithm could mistake a branch-local dead end for a globally maximal result.

The initial search has an empty R, all vertices in P, and an empty X. As execution proceeds, adding a vertex to R requires removing from P and X every vertex that is not adjacent to the new member. This preserves the condition that every surviving extension connects to the entire current clique.

The overall execution combines these search rules with scheduling and storage choices:

Exact clique search on the GPU

The steps in order.

Exact clique search on the GPUStep 1: Reorder vertices by degeneracy1. Reorder vertices by degeneracyStep 2: Create independent starting subtrees2. Create independent starting subtreesStep 3: Prepare local adjacency information3. Prepare local adjacency informationStep 4: Traverse each subtree depth first4. Traverse each subtree depth firstStep 5: Donate branches to idle blocks5. Donate branches to idle blocksStep 6: Test maximality and count results6. Test maximality and count resultsStep 7: Combine completed GPU results7. Combine completed GPU results

The diagram separates logical work from execution support. Ordering and subtree construction define the initial partition. Depth-first traversal performs the exact search. Donation changes which block executes a branch, while maximality testing determines whether a result qualifies.

Extending a clique without losing the invariant

Suppose the algorithm selects v from P. The recursive child uses:

R′ = R ∪ {v}

R′ is the child’s clique. The union adds v to the parent clique R. Because v came from P, it is adjacent to every vertex already in R.

The child’s remaining candidates are:

P′ = P ∩ N(v)

P′ contains only those parent candidates that are also neighbors of v. The intersection symbol means that a vertex must belong to both sets. This removes vertices that would violate completeness after v joins the clique.

The excluded set is filtered similarly:

X′ = X ∩ N(v)

X′ preserves previously considered extensions only when they also connect to v. These vertices remain relevant to the maximality of R′ even though the current branch must not explore them again.

After returning from the child, the parent removes v from its candidate set:

P = P − {v}

The set difference prevents later siblings from choosing v as an available extension at that level. The parent also records it among the excluded vertices:

X = X ∪ {v}

This update carries the ownership information needed to avoid rediscovering the same maximal clique. The algorithm has finished all descendants associated with choosing v at that position, so later branches must remember that history.

A result is maximal when both extension sets are empty. If P is empty but X still contains vertices, the current clique cannot grow within this branch, yet it can grow in the graph. The branch stops without reporting a maximal clique because the relevant larger result belongs to another branch.

This is a small but consequential distinction. Search termination is an execution event; maximality is a mathematical condition. The algorithm’s state supports both, and its correctness depends on keeping them separate.

Pivoting reduces branches without changing answers

Before branching, the pivoting variant selects a vertex from P together with X. Its branch candidates are restricted to:

P − N(v_pivot)

Here v_pivot is the chosen pivot, and N(v_pivot) is its neighborhood. The expression retains candidates in P that are not neighbors of the pivot.

The reason is structural. A maximal clique that contains the pivot is covered by the pivot’s own branch. A maximal clique that omits the pivot must contain a vertex incompatible with adding it; otherwise the clique could still be enlarged by the pivot and would not be maximal. The retained branches provide the needed coverage.

A good pivot excludes many branches. The usual selection therefore favors a pivot with many neighbors in P. The paper describes the improvement that searches P and X for this choice, rather than restricting the pivot to P alone.

Pivoting itself has a cost. It requires examining candidate pivots and their adjacency to P. Later representation choices alter how expensive that examination is, which becomes important when comparing full and partial induced subgraphs.

Removing dependence between starting subtrees

In the sequential algorithm, siblings share a changing P and X. Before later siblings start, earlier siblings move vertices out of P and into X. That dependency appears to prevent their direct parallel execution.

An explicit vertex order makes the required state computable independently. For a starting vertex vᵢ, the candidate set is:

P = N(vᵢ) ∩ {vᵢ₊₁, vᵢ₊₂, ..., v|V|₋₁}

The index i gives vᵢ’s position in the ordering, and |V| is the number of vertices. This expression retains neighbors appearing after the starting vertex.

The corresponding excluded set is:

X = N(vᵢ) ∩ {v₀, v₁, ..., vᵢ₋₁}

This set retains neighbors appearing earlier. Those earlier vertices represent work owned by preceding starting positions, so the subtree can reproduce the necessary exclusion history without waiting for them to execute.

Each first-level subtree begins with its own starting vertex in R and its independently constructed P and X. Different GPU blocks can then traverse these subtrees concurrently. Their logical independence does not require their workloads to be similar.

Degeneracy ordering makes the candidate side smaller

The order of vertices affects how many neighbors lie after each starting vertex. An arbitrary order can leave a large P, which increases both the subtree’s possible branching and the cost of repeated set operations.

Degeneracy ordering minimizes the largest number of later neighbors. The paper denotes that bound by d, the graph’s degeneracy. It denotes maximum degree by Δ. In the evaluated real graphs, d can be much smaller than Δ.

After ordering, the candidate-set bound becomes:

|P| = O(d)

|P| is the number of vertices in P. O(d) expresses an asymptotic bound governed by degeneracy rather than maximum degree.

The excluded side does not receive the same improvement:

|X| = O(Δ)

|X| is the size of X, and Δ is maximum degree. Vertices moved earlier by the ordering can accumulate in the excluded side even while the later-neighbor side becomes smaller.

This asymmetry drives much of the paper. Ordering improves the search’s active candidates but leaves potentially large maximality state. A GPU implementation must therefore benefit from small P without assuming that X is also small.

Preparing only relevant adjacency information

A subtree does not need arbitrary edges from the whole graph. Its operations ask about relationships between P and vertices in P together with X. An induced representation can retain that relevant adjacency information and omit unrelated edges.

The full representation has storage governed by:

O(Δ · d)

Δ bounds the potentially large excluded side, and d bounds the candidate side. The multiplication reflects the adjacency information connecting the sides.

Binary encoding makes this local representation useful for repeated set operations. Membership can be represented compactly, and intersections can use bitwise operations. Threads within a block cooperate on these primitives rather than independently performing complete recursive searches.

The partial representation retains adjacency only within the candidate side:

O(d²)

d² reflects storage for relationships among vertices whose count is bounded by d. Edges involving the larger excluded side remain accessible through the original graph.

The smaller representation reduces construction and storage costs, but it makes some later operations more expensive. The original graph uses compressed sparse rows for first-level starting tasks. The second-level alternative also uses coordinate-format storage.

The choice also affects pivoting. With partial induced subgraphs, the implementation considers pivots from P and the excluded vertices originally belonging to the subtree’s candidate side. It does not search the large original-excluded component for pivots, because that component lacks the same cheap encoded adjacency.

This restriction changes the effort spent finding a pivot, rather than changing the objective of exact enumeration. A less favorable pivot may leave more branches, but the underlying search still covers the required results.

Exploring subtrees within GPU blocks

The implementation launches a fixed population of blocks sized to the GPU’s concurrent capacity. Each block obtains an independent subtree and explores it depth first. Threads cooperate on intersections and pivot selection, and the implementation retains subwarp-level work partitioning from the authors’ earlier clique-counting work.

Depth-first traversal avoids keeping an entire breadth-first frontier alive. A block instead retains the state along its current path and the information needed to return to unexplored alternatives.

The complete traversal runs in a single kernel. The graph is transferred to the GPU before execution, and results return afterward. During traversal, the design avoids repeated CPU requests to launch individual search primitives.

The first scheduling phase uses a shared counter. A block atomically reserves a starting subtree, traverses it, and reserves another when finished. This arrangement distributes ordinary independent work with little coordination.

The difficult remainder appears when the supply of untouched starting subtrees runs out. Some blocks may still be traversing large tasks while others have nothing left to reserve. That is where dynamic donation becomes useful.

Why second-level splitting is not enough

The authors also construct independent subtrees from edges rather than individual vertices. For an edge joining vᵢ and vⱼ, the initial clique contains both endpoints.

The candidate set is:

P = N(vᵢ) ∩ N(vⱼ) ∩ {vmax(i,j)+1, ..., v|V|−1}

The neighborhoods ensure adjacency to both endpoints. max(i,j) identifies the later endpoint in the ordering, and the final intersection keeps vertices after it.

The excluded set is:

X = N(vᵢ) ∩ N(vⱼ) ∩ {v₀, ..., vmax(i,j)−1}

This retains common neighbors that appear before the later endpoint. As with first-level splitting, the ordering supplies an independent ownership rule.

Edge-based starting tasks are more numerous and generally smaller. Their local adjacency structures can also be smaller. However, the implementation must construct more such structures, and each preparation is reused across a shorter traversal.

The authors find that this finer starting partition helps balance but does not eliminate the long-tail problem in maximal clique enumeration. The cost-benefit balance differs from their fixed-size clique-counting work, motivating a scheduler that can split work during execution.

The worker list and direct donation

A conventional worklist stores pending tasks. In this application, a task description includes R, P, X, its depth, and access to the appropriate induced subgraph. Storing many such records would consume memory, and creating them speculatively could waste effort.

The worker list stores idle block identifiers instead. When a block runs out of work after the initial task supply is depleted, it enters the list. A block still executing checks for a recipient when it reaches an eligible branch.

If a receiver exists, the donor removes its identifier, initializes that receiver’s task state, and signals it to start. The implementation uses CUDA atomic facilities and release-acquire ordering so that the initialized data becomes visible before the receiver relies on it.

Idle blocks wait on flags with exponential back-off. The queue uses a circular buffer with multiple producers and consumers. Its capacity is manageable because the total population of blocks is fixed.

Donation is conditional. The branch must satisfy:

|P| ≥ 10

|P| is the candidate count at the donated branch’s root. The threshold avoids transferring branches expected to be too small to repay the handoff cost. The authors report that performance is not highly sensitive to this choice.

The donor must also retain unexplored alternatives at the current level and earlier levels. This avoids handing away a branch only to finish immediately and begin seeking work in return. Computation ends when every block has registered as idle and none remains active as a donor.

Compact storage for excluded vertices

A direct representation would retain a potentially large X at every search depth. Because a subtree can reach d levels, this leads to:

O(Δ · d)

Here the expression describes excluded-set storage across a subtree’s levels. It is a different use of the same asymptotic scale encountered for full adjacency storage.

The paper divides X according to origin. X_P contains excluded vertices that belonged to the starting subtree’s original P. These vertices may enter X when a sibling is completed and may disappear after neighborhood intersection.

X_X contains vertices that already belonged to the starting subtree’s original X. Those vertices never become candidates within the subtree. As the search descends, intersections can remove them, but the algorithm cannot add new members to this component.

X_P is small enough to encode and retain separately at each depth. X_X uses one array shared across depths. When descending, the implementation partitions the current active region so that surviving vertices occupy its front portion, then records the boundary for the new level.

Returning to an ancestor does not require recovering the previous internal order. The ancestor’s membership remains inside its saved region. Only the arrangement within that region changed during deeper filtering.

The resulting storage bound is:

O(Δ + d²)

Δ accounts for the shared large component. d² accounts for the smaller component retained across depths. The saving follows from the update rules, rather than from accepting an approximate set.

The implementation uses an out-of-place partition with threads moving values after updating bin counters atomically. The authors also tested an in-place partition from CUB, but it did not improve performance. All evaluated implementations use the compact excluded-set representation.

Experiments and results

Platforms and comparison boundaries

The evaluation uses a V100 platform and an A100 platform. Four NVIDIA V100 devices, each with 32GB, are connected to an Intel Xeon Gold 6230 CPU in the former. It supports both the single-GPU comparison and the multi-GPU experiments. Used for single-GPU measurements, the latter has a 40GB NVIDIA A100 connected to an AMD EPYC 7702 CPU.

For V100, the software setup uses CUDA 10.2 and GCC 8.3.1. For A100, it uses CUDA 11.4 and GCC 9.4.0. The implementation assigns 128 threads to each block, producing 1,280 blocks on V100 and 1,728 on A100.

The principal CPU comparison is with Blanuša and colleagues’ implementation, which the authors identify as the strongest published parallel CPU baseline. Its reported results are obtained on a dual-socket Skylake system equipped with 360 GB of main memory, 96 threads, and 48 cores. The authors additionally run the available CPU code on their Cascade Lake machine with 40 cores, 80 threads, and 512GB.

Timing excludes reading graph files from disk. It includes the degeneracy-ordering preprocessing and the maximal-clique counting work. This boundary matters because the method deliberately spends preparation time to reduce later search costs.

Unless stated otherwise, headline GPU results enable the worker list and use the best measured combination of starting depth and induced-subgraph representation. The separately evaluated heuristic is therefore not identical to the best-choice reporting procedure.

Graphs and the scale of enumeration

The datasets match those used by the CPU baseline. They include wiki-talk, as-skitter, soc-pokec, and wiki-topcats from SNAP. Other evaluated graphs come from the Network Repository.

The input sizes and result counts differ substantially. Wiki-talk contains 2,394,385 vertices and 4,659,565 edges, with 86,333,306 maximal cliques. Soc-friendster contains 65,608,367 vertices and 1,806,067,135 edges, with 3,364,773,700 maximal cliques.

The search difficulty is not determined by vertex count alone. Soc-livejournal has maximum clique size 214, while its average maximal clique size is 29.97. Wiki-link has maximum clique size 428 and an average of 4.51. These graph properties help explain why search depth, the cost of exclusions, and branch imbalance can behave differently across datasets.

Maximum degree and degeneracy also expose the representation challenge. Wiki-link has maximum degree 4,271,341 and degeneracy 1,120. Soc-livejournal has maximum degree 2,651 and degeneracy 213. A storage layout governed by maximum degree can therefore face very different pressure from one governed by degeneracy.

These are workload descriptions rather than predictive laws. The experiments measure which implementations perform well; they do not establish that any single graph statistic fully determines runtime.

Single-GPU performance against the CPU baseline

The V100 implementation achieves a geometric-mean speedup of 4.1× over the reported Skylake CPU results, with a maximum of 10.2×. A100 achieves a geometric mean of 4.9× and a maximum of 16.7×.

The largest reported A100 speedup occurs on aff-orkut. Its Skylake baseline time is 147 seconds, compared with 8.82 seconds on A100. On wiki-topcats, the corresponding times are 2 seconds and 0.87 seconds. The method improves all evaluated graphs against that baseline, but the scale of improvement varies.

Soc-friendster illustrates the comparison on a large input:

Soc-friendster maximal-clique execution time

Both GPU implementations finish sooner than the CPU baselines.

Soc-friendster maximal-clique execution timeSkylake CPU, 96 threads: 380Skylake CPU, 96 threads380Cascade Lake CPU, 80 threads: 406.33Cascade Lake CPU, 80 threads406.33Paper V100 implementation (this paper): 64.50Paper V100 implementation (this paper)64.50Paper A100 implementation: 39.59Paper A100 implementation39.59
The numbers
System or settingseconds
Skylake CPU, 96 threads380
Cascade Lake CPU, 80 threads406.33
Paper V100 implementation (this paper)64.50
Paper A100 implementation39.59

The CPU rerun provides additional context rather than replacing the published baseline. On soc-friendster, Cascade Lake is slower than the reported Skylake result. Other differences also appear across graphs. The paper consequently presents both sets of CPU times while using the published Skylake results for its main speedup comparison.

The measurements support the claim that this GPU design handles exact enumeration effectively on the tested graph collection. They do not isolate a pure hardware advantage, because the implementations also differ in scheduling, storage, and low-level operations.

Comparison with previous GPU work

The earlier GPU baseline is Wei and colleagues’ implementation on Titan X. Its code was unavailable to the authors, so they compare published timings on common graphs rather than executing both implementations on one device.

As-skitter execution time across different GPU platforms

The paper reports a much shorter runtime, although the devices differ.

As-skitter execution time across different GPU platformsWei implementation, Titan X: 40.87Wei implementation, Titan X40.87Paper implementation, V100 (this paper): 0.81Paper implementation, V100 (this paper)0.81
The numbers
System or settingseconds
Wei implementation, Titan X40.87
Paper implementation, V100 (this paper)0.81

Across the shared graphs, the paper reports a geometric-mean speedup of 35.65×, with a maximum of 50.46×. The authors explicitly state that the hardware mismatch makes this an unfair direct comparison.

They nevertheless argue that hardware differences alone are insufficient to explain the observed gap. Their comparison notes 1.43x as many cores and 1.88x the memory bandwidth for V100 relative to Titan X. These hardware characteristics provide context, but they are not a controlled normalization of execution time.

The strongest supported reading is that the new implementation substantially improves on the previously reported GPU timings under its own evaluated platform. The experiment cannot assign an exact share of that improvement to the algorithm independently of hardware.

Utilization and multiple GPUs

Hardware counters indicate that different graphs stress different resources. When local adjacency information fits in L1 cache, repeated intersections can make computation the dominant constraint. Larger local structures increase accesses to global memory and shift execution towards bandwidth pressure.

SM utilization ranges from 25.26% to 70.71%, with a mean of 57.76%. Memory-bandwidth utilization ranges from 19.63% to 59.50%, with a mean of 51.47%. SIMD utilization ranges from 66.4% to 91.8%, with a mean of 74.5%.

These measurements caution against describing the entire implementation as uniformly compute-bound or memory-bound. The same search code encounters different effective bottlenecks depending on the graph and its local representations.

For multi-GPU execution, starting subtrees are distributed round robin, and each device has a private worker list. The strong-scaling experiments show that worker-list variants generally retain better scaling than variants without donation. More hardware otherwise amplifies the consequences of a few unusually large subtrees.

The authors also test a shared worker list across GPUs. Its coordination overhead outweighs its benefit in their experiments, so the evaluated design keeps balancing local to each device. The supported deployment remains multiple GPUs within one node.

Reproducibility support

The artifact includes source code, a compiled executable, dependency preparation, dataset acquisition scripts, and experiment-generation support. It covers timings, donation counts, load-balance plots, scaling plots, and operation breakdowns.

Substantial resources are specified for the reproduction environment: RAM totaling 128 GB, disk capacity of 256 GB, and four GPUs providing 32 GB apiece. These requirements describe reproducing the complete experimental workflow, including multi-GPU evaluation, rather than a minimum requirement for every possible input.

The authors expect small timing differences across compatible platforms, particularly when comparing representation choices. That expectation is consistent with the method’s tradeoffs: construction cost, memory bandwidth, and compute throughput can change which exact configuration is fastest.

What the ablations show

Finer starting tasks help, but do not finish the balancing job

The paper compares first-level and second-level starting subtrees, with and without a worker list. These controlled settings reveal that initial partitioning and dynamic balancing address related but different sources of unevenness.

Without the worker list, second-level tasks reduce imbalance. The reported average of maximum block load relative to average load is 2.28× for first-level tasks and 1.63× for second-level tasks. Smaller initial units make it less likely that an entire GPU region remains tied to a disproportionately large starting subtree.

However, the remaining imbalance is still substantial for some graphs. Maximal clique enumeration can create uneven descendants even after an apparently fine initial split. The search’s internal structure matters beyond the size of its starting task pool.

With donation enabled, the corresponding ratios become 1.17× and 1.11×. The advantage of beginning at the deeper level is then much smaller:

Average maximum-to-average block load across benchmarks

Dynamic donation reduces the imbalance left by either starting depth.

Average maximum-to-average block load across benchmarksFirst-level tasks, no worker list: 2.28First-level tasks, no worker list2.28Second-level tasks, no worker list: 1.63Second-level tasks, no worker list1.63First-level tasks with worker list (this paper): 1.17First-level tasks with worker list (thispaper)1.17Second-level tasks with worker list: 1.11Second-level tasks with worker list1.11
The numbers
System or settingmaximum-to-average load ratio
First-level tasks, no worker list2.28
Second-level tasks, no worker list1.63
First-level tasks with worker list (this paper)1.17
Second-level tasks with worker list1.11

The load analysis uses visited search-tree nodes, and its SM-level visualization takes the maximum block count within an SM. It is therefore a structural workload measure rather than a direct substitute for elapsed time. Different nodes can still have different operation costs.

The result nonetheless supports the scheduling explanation: donation reduces the concentration of remaining search work. It also shows why an optimization useful in fixed-size clique counting need not remain essential in maximal clique enumeration.

Donation counts explain where balancing is active

The number of branch transfers varies widely. With first-level tasks, soc-sinaweibo records 11,119,926 donations and soc-orkut records 9,728,983. Soc-pokec and aff-orkut record 0.

These counts do not imply that more donations are always better. They indicate how much the scheduler intervenes on a workload. A graph whose initial tasks are already well balanced may need little or no donation.

Second-level splitting reduces the transfer count in many cases. For wiki-talk, first-level tasks produce 1,436,113 donations, while second-level tasks produce 74,268. Some of the balancing work has already been accomplished by the finer initial partition.

The operation breakdown shows that worker-list management occupies a small fraction of execution. This supports the claim that the scheduler’s benefits are not erased by queue access costs. The fraction grows on graphs with more transfers, which is the expected relationship between scheduling activity and overhead.

The paper does not provide an exhaustive numerical sensitivity study for every donation condition. Its evidence is strongest for the combined worker-list design and the tested settings.

Preparation cost changes the preferred starting depth

Second-level tasks have smaller local subgraphs and cheaper set operations. If intersection speed alone determined runtime, they would be an attractive choice.

Their disadvantage is repeated preparation. More starting tasks require more induced subgraphs, and each constructed structure serves a shorter traversal. The operation breakdown shows that construction takes a larger share of time for second-level tasks in most cases.

With dynamic balancing already available, the extra initial splitting often fails to recover its preparation cost. First-level tasks are faster in most cases, and the paper reports a geometric-mean advantage of 1.2×.

This comparison demonstrates an interaction between optimizations. Dynamic donation does not merely add another speed improvement to a fixed design. It changes whether deeper initial decomposition is worth doing at all.

Full and partial induced subgraphs win for different reasons

Full induced subgraphs make excluded-set operations cheaper by encoding the relevant adjacency in advance. Their larger construction cost can be recovered when enough subsequent operations use that information.

Partial induced subgraphs cost less to construct and store. They also spend less time evaluating pivots because the large original-excluded component is omitted from pivot selection. However, the cheaper pivot search may miss a stronger pivot, leaving more work later.

The breakdown therefore contains competing effects. Full representations increase preparation and pivoting effort while reducing some set-operation costs. Partial representations move in the opposite direction.

Neither representation wins universally. The paper reports six cases favoring partial storage and six favoring full storage. This is evidence for input-dependent selection rather than for treating one representation as an inferior approximation.

The search objective remains exact in both cases. The alternatives change available acceleration structures and pivot selection effort, not which maximal cliques count as correct results.

The heuristic is close to the best tested configuration

The proposed selection rule always starts from first-level tasks. It chooses partial induced subgraphs when the following condition holds:

Δ/d > 200

Δ is maximum degree, and d is degeneracy. The ratio indicates how much larger the excluded-side adjacency representation may be relative to candidate-only storage.

Otherwise, the rule selects full induced subgraphs. The rationale follows the storage bounds: when the large side dwarfs the small side, materializing its adjacency becomes less attractive.

Against the best tested combination for each graph, the heuristic has a geometric-mean slowdown of 1.02× and a maximum slowdown of 1.10×. These values measure selection quality on the evaluated collection.

This is a practical result, but it does not establish a universal threshold. The rule is empirical, and the artifact discussion acknowledges that representation performance can change with GPU characteristics.

Some design choices are not independently ablated

The compact excluded-set representation is used throughout the evaluated implementations. The paper explains its memory advantage through the state-update rules, but does not present a parallel headline comparison against a naive full copy at every depth.

Similarly, binary encoding, subwarp partitioning, and block-level depth-first traversal form part of the retained execution foundation. The main controlled comparisons concentrate on starting depth, worker-list use, and partial versus full induced storage.

The in-place partition experiment provides a narrower negative result: replacing the chosen partitioning approach with the tested CUB alternative did not improve performance. It supports that implementation choice under the tested setup without establishing that every in-place strategy would be worse.

Limitations

Limits the authors explicitly identify

The authors state that the previous-GPU comparison is not a fair same-hardware experiment. They cannot run their implementation on Titan X, and they cannot run the earlier code on their own platform. The large reported speedup is consequently informative but confounded.

Multi-GPU execution is confined to a single node. Distributed GPU execution is future work. The successful private-worker-list design therefore should not be read as evidence that the same balancing mechanism will scale unchanged across machines.

The authors also leave local representation selection for future investigation. Their implemented heuristic chooses a strategy for the graph using global properties. Selecting differently for individual subgraphs might improve adaptation, but the paper does not report that extension.

Hardware sensitivity remains relevant. The artifact discussion anticipates variation in timings and configuration rankings across devices with different compute and bandwidth characteristics. The reported heuristic quality belongs to the evaluated setting.

The authors further note that some proposed techniques could be applied to CPU implementations. Their explanation is that the GPU setting makes imbalance and memory limits particularly pressing. The experiments do not exhaustively test how much a redesigned CPU baseline could gain from the same ideas.

Limits visible in the experimental setup

The graph collection is substantial, but it is still a particular collection chosen to match the CPU baseline. The experiments do not establish performance across every possible graph structure or every combination of density, degeneracy, and clique distribution.

The headline GPU comparison uses the best measured representation and starting-depth combination for each input. That is useful for assessing the implementation’s attainable performance, but it differs from a user selecting a configuration without advance timings. The heuristic experiment addresses this distinction separately.

Disk input is excluded from timing. The reported results therefore characterize preprocessing and clique computation after graph loading, rather than complete elapsed time from a stored input file to a finished application result. This is an explicit accounting boundary instead of an error, but it matters for short-running workloads.

The tables report the counting work associated with exact enumeration. They do not establish the cost of writing every clique’s complete vertex list to persistent storage or handing a very large result collection to a downstream application. Such output handling can be a separate concern.

No detailed timing uncertainty analysis is presented alongside the main results. The paper supplies execution times, speedups, load measurements, and operation breakdowns, but the main tables do not describe confidence intervals or repeated-run variability. Small configuration differences should therefore be interpreted with more restraint than the larger performance gaps.

The worker-list design relies on a fixed resident population of GPU blocks and explicit synchronization. Its success does not automatically establish that any general-purpose task queue will behave similarly. The lightweight availability entries, direct handoff, and donation conditions are part of the mechanism.

Limits of transferring the ideas

The memory reduction for X_X depends on monotonic removal within a subtree. It cannot be applied unchanged to state that may gain arbitrary new members at deeper levels. A different search needs its own proof that saved boundaries preserve the information required for backtracking.

Likewise, candidate-only induced storage works because clique search has specific adjacency needs. The paper itself observes that more general pattern matching can face larger induced-structure requirements. A useful specialization should not be mistaken for a universally cheap graph representation.

Exactness also has a defined scope. The implementation preserves exact maximal-clique search on the input graph. It does not establish that the graph’s edges accurately represent the real-world relationships motivating an application, or that every enumerated clique has a meaningful domain interpretation.

For Mova, the transfers remain hypotheses about scheduling, representation, and verification. Faster exact graph search would not on its own establish better language understanding, more reliable source interpretation, or improved assessment performance. Those outcomes require their own tasks and measurements.

What came after

The available later-work record does not establish a particular subsequent study that builds on this implementation. It would therefore be unsupported to attribute later algorithms, replications, or adoption claims to named successors.

The paper itself identifies clear directions for continuation. Distributed execution would extend the scope beyond a single multi-GPU node, but would introduce coordination and transfer questions not resolved by the private per-device worker lists. The unsuccessful shared-list experiment within the evaluated system is a reason to measure that coordination carefully, rather than assume that wider sharing will help.

Another proposed extension is local selection between full and partial induced subgraphs. Rather than using a graph-wide degree-to-degeneracy ratio, an implementation could examine each subtree’s own structure. The paper suggests this possibility but supplies no result for it.

The released artifact provides a basis for such follow-up work. Its source, dependency setup, graph acquisition support, and measurement scripts make the design available for further examination. Availability enables replication and extension; it does not itself demonstrate that either has occurred.

The contribution that remains established is the paper’s combination of exact depth-first search, demand-driven branch donation, and storage derived from state invariants. Its experiments show why these choices work together: balancing reduces the need for aggressive initial splitting, compact exclusions make many concurrent searches feasible, and selective precomputation lets the implementation adapt to graphs with very different structural costs.

Cite

Cite as Mohammad Almasri; Yen-Hsiang Chang; Izzat El Hajj; Rakesh Nagi; Jinjun Xiong; and Wen-mei Hwu. 2022. Parallelizing Maximal Clique Enumeration on GPUs. arXiv:2212.01473 · PACT '23: Proceedings of the 32nd International Conference on Parallel Architectures and Compilation Techniques (2023) 162-175.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1109/pact58117.2023.00022 · arXiv 2212.01473

@misc{xiong2022parallelizing,
  title = {{Parallelizing Maximal Clique Enumeration on GPUs}},
  author = {Mohammad Almasri; Yen-Hsiang Chang; Izzat {El Hajj; Rakesh Nagi; Jinjun Xiong;} and Wen-mei Hwu},
  year = {2022},
  doi = {10.1109/pact58117.2023.00022},
  eprint = {2212.01473},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/pact58117.2023.00022}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/almasri-2022-parallelizing-maximal-clique-enumeration-gpus/