# From Leiden to Pleasure Island: The Constant Potts Model for Community Detection as a Hedonic Game

Lucas Lopes Felipe, Konstantin Avrachenkov, Daniel Sadoc Menasché

► To cite this version:

Lucas Lopes Felipe, Konstantin Avrachenkov, Daniel Sadoc Menasché. From Leiden to Pleasure Island: The Constant Potts Model for Community Detection as a Hedonic Game. Physica A: Statistical Mechanics and its Applications, 2025, 680, pp.130989. 10.1016/j.physa.2025.130989. hal-05458053

HAL Id: hal-05458053

https://inria.hal.science/hal-05458053v1

Submitted on 14 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# From Leiden to Pleasure Island: The Constant Potts Model for Community Detection as a Hedonic Game

Lucas Lopes Felipeª, Konstantin Avrachenkovᵇ, Daniel Sadoc Menaschéª

ªFederal University of Rio de Janeiro (UFRJ), Rio de Janeiro, Brazil

ᵇNational Institute for Research in Digital Science and Technology (Inria), Sophia Antipolis, France

## Abstract

Community detection is one of the fundamental problems in data science which consists of partitioning nodes into disjoint communities. We present a game-theoretic perspective on the Constant Potts Model (CPM) for partitioning networks into disjoint communities, emphasizing its efficiency, robustness, and accuracy. Efficiency: We reinterpret CPM as a potential hedonic game by decomposing its global Hamiltonian into local utility functions, where the local utility gain of each agent matches the corresponding increase in global utility. Leveraging this equivalence, we prove that local optimization of the CPM objective via better-response dynamics converges in pseudo-polynomial time to an equilibrium partition. Robustness: We introduce and relate two stability criteria: a strict criterion based on a novel notion of robustness, requiring nodes to simultaneously maximize neighbors and minimize non-neighbors within communities, and a relaxed utility function based on a weighted sum of these objectives, controlled by a resolution parameter. Accuracy: In community tracking scenarios, where initial partitions are used to bootstrap the Leiden algorithm with partial ground-truth information, our experiments reveal that robust partitions yield higher accuracy in recovering ground-truth communities.

**Keywords:** Network Partitioning, Community Detection, Constant Potts Model, Leiden Algorithm, Computational Social Choice, Hedonic Games

## 1. Introduction

Clustering is a fundamental unsupervised machine learning technique for grouping similar data points without relying on pre-existing labels. Its utility spans a wide array of applications [1]. However, the power of clustering is matched by its inherent complexity [2]. The notion of “similarity” is often context-dependent, and different algorithms can produce multiple, distinct, yet equally valid groupings.

Community detection extends the clustering paradigm to network data, where the goal is to partition the nodes of a graph into disjoint communities based on their connectivity patterns. This approach is useful for any problem that can be modeled as a graph where the objective is to split nodes into non-overlapping groups. The spectrum of possible partitions is vast, ranging from the *grand coalition*, where all nodes form a single community, to the *singleton partition*, where each vertex constitutes its own community.

To visualize this enormous search space, consider the graph in Figure 1(a) and its corresponding *metagraph* in Figure 1(b). In the metagraph, each metavertex represents a unique partition of the original network, and an edge connects two partitions if one can be reached from the other by a unilateral move wherein a single vertex of the original graph changes its community.<fnref n="1" /> Each such edge represents a decision for that moving vertex, whose choice is governed by a trade-off between two competing objectives:

* Maximize “friends” within the community: choose the community with the highest number of neighbors, i.e., direct edges to the agent.

* Minimize “strangers” within the community: choose the community with the fewest number of nodes to which the agent is not directly connected.

<footnote n="1">¹We consider only sequential, unilateral moves, excluding simultaneous-move scenarios to simplify the model and focus on convergence.</footnote>
<figure><img src="image_2.png" /><figcaption>Figure 1: (a) Illustrative graph and (b) corresponding metagraph of partitions (see Appendix B for details). The metagraph represents each unique partition of the original network as a vertex. For instance, the blue node represents the grand coalition, while the red node represents the singleton partition. Edges connect partitions that are reachable from each other by a single vertex move. **Unidirectional (purple) edges** denote clear preferences consistent with the decision tree in Figure 2. **Bidirectional (red/blue) edges** highlight frustrated choices, where the *Familiarity Index* (Eq. (2)) quantifies the trade-off between gaining friends and avoiding strangers (red path).</figcaption></figure>

These goals align with the widely accepted notion of internal cohesion and external sparsity in community detection. Increasing the number of intra-community edges and decreasing the presence of non-neighbors strengthens the community's internal density.

Figure 2 illustrates a decision tree for a vertex making this comparison. Cases leading to purple boxes indicate a clear preference, translating into a unidirectional edge in the metagraph (Figure 1(b)). Inspired by the concept of “frustration” in the Ising model [3], we describe a choice as “frustrated” when the preferences of an agent for different communities are in conflict. This occurs, for instance, when one candidate community offers more friends while another offers fewer strangers. In such scenarios, a node cannot simultaneously optimize both objectives, and the move represents a **frustrated choice**, depicted by bidirectional edges in the metagraph.

Most community detection algorithms agree on outcomes where a clear preference exists (the purple boxes in Figure 2). They diverge, however, in “frustrated” cases. Some algorithms may prioritize a community with more friends, while others might favor one with fewer strangers. This distinction gives rise to two perspectives on the problem: the *robustness* perspective and the *resolution* perspective.

**Robustness perspective.** It focuses on a metric that quantifies scenarios where a clear preference exists. In this view, a node's stability determines its classification. A node is considered **robust** if its current community is unambiguously preferred over all other communities reachable through a unilateral move. This means its community simultaneously offers at least as many “friends” (neighbors) and no more “strangers” (non-neighbors) compared to any other available option. Conversely, any node that does not meet this strict criterion is considered non-robust, indicating it may have an incentive to move.

A node's classification is therefore based on pairwise comparisons between its current community and every other available option, following the logic depicted in Figure 2. Another way to conceptualize this choice is to imagine
<figure><img src="image_3.png" /><figcaption>Figure 2: Decision tree from a node's perspective when comparing two communities. Purple boxes indicate unambiguous choices, where one partition is clearly preferred over another because the move improves at least one metric (friends/strangers) without worsening the other; The red box with blue border highlights frustrated choices, where a move to a different community involves a trade-off: one option offers more friends but also more strangers, while the other offers the reverse.</figcaption></figure>

that each node holds two ranked lists of communities: one ordered by the number of friends gained and the other by the number of strangers avoided. A node is robust if the top-ranked community is the same on both lists. While this analogy is intuitive, a more rigorous definition is needed to handle potential ties for the top rank.

Formally, for a graph $G = (V, E)$ with $n = |V|$ nodes and $m = |E|$ edges, a community (or coalition) is a set $C$ of nodes, $C \subseteq V$ (see notation in Appendix A, Table A.5). A community detection algorithm partitions the network into subsets $\pi = \{C_1, C_2, \dots, C_K\}$ such that $C_k \cap C_l = \emptyset$, for all $k, l \in \{1, \dots, K\}$ where $k \neq l$, and $\cup_{k=1}^K C_k = V$.

In this work, unless otherwise noted, we work under the following assumption on the number of communities:

**Assumption 1 (Number of Communities).** The number of communities $K$ is fixed and given.

Noting that some communities may be empty, the maximum number of empty communities is $K - 1$. For a given partition $\pi$ of $K$ communities, the **Robustness** of $\pi$ is the fraction of robust nodes:

$$R(G, \pi) = \frac{1}{n} \sum_{i \in V} R(i, \pi) \quad \text{where} \quad R(i, \pi) = \begin{cases} 1 & \text{if } d_i^{\sigma_i} \ge d_i^k \text{ and } \hat{d}_i^{\sigma_i} \le \hat{d}_i^k \forall k. \\ 0 & \text{otherwise} \end{cases} \quad (1)$$

Here, $d_i^k$ and $\hat{d}_i^k$ denote the number of neighbors and non-neighbors of node $i$ in community $C_k$, and $\sigma_i$ is the index of node $i$ in current community.

**Familiarity Index.** We derive a social metric to quantify the possible trade-off when a node $i$ compares community $C_A$ to community $C_B$. The intuition is to measure what proportion of the total change in community composition is attributable to the change in friends.

1. **Friend-Gain:** The net change in friends is $\Delta d = d_i^{C_B} - d_i^{C_A}$;

2. **Total Change:** The total change in perceived community size is the sum of the change in friends and strangers: $\Delta d + \Delta \hat{d}$, where $\Delta \hat{d} = \hat{d}_i^{C_B} - \hat{d}_i^{C_A}$.
The Familiarity Index, $F_i(C_A, C_B)$, is the ratio of the friend-gain to this total change:

$$F_i(C_A, C_B) = \frac{\Delta d}{\Delta d + \Delta \hat{d}} \qquad (2)$$

This index reveals the nature of a node’s decision. Given a node i in $C_A$, we consider two cases:

* If $F_i(C_A, C_B) \ge 1$ or $F_i(C_A, C_B) \le 0$, the choice is clear, corresponding to unidirectional edges in Figure 1(b) and purple boxes in Figure 2.

* If $0 < F_i(C_A, C_B) < 1$, the decision to move to $C_B$ is a frustrated choice: the node must balance an increase in friends ($\Delta d > 0$) with an increase in strangers ($\Delta \hat{d} > 0$), corresponding to bidirectional edges in Figure 1(b), where the Familiarity Index acts as the decision’s splitting point (see red box in Figure 2).

In what follows, we relate the proposed Familiarity Index to the well-known concept of resolution, highlighting its role in addressing the fundamental trade-off between friends and strangers.

**Resolution perspective.** It aims to resolve these trade-offs by combining the two max-min objectives into a single quality function, where a move is beneficial if the quality gain is positive. Following the literature on the Constant Potts Model (CPM) [4], the quality, also referred to in the literature as weight, or value, of a node pair $(i, j)$ is defined by its resolution parameter, $\gamma$, as

$$v_{ij} = (A_{ij} - \gamma) \delta(\sigma_i = \sigma_j), \qquad (3)$$

where $A_{ij}$ is the entry in line i and column j of the adjacency matrix, the Kronecker delta $\delta(\sigma_i = \sigma_j) = 1$ if i and j are assigned to the same community (and 0 otherwise), and $0 \le \gamma \le 1$. To simplify notation, we set $A_{ii} = \gamma$. Then,

$$v_{ij} = \begin{cases} 1 - \gamma, & \text{if } A_{ij} = 1 \text{ and } \sigma_i = \sigma_j \text{ (neighbors or "friends" within community)}, \\ -\gamma, & \text{if } A_{ij} = 0 \text{ and } \sigma_i = \sigma_j \text{ (non-neighbors or "strangers" within community)}, \\ 0, & \text{otherwise.} \end{cases} \qquad (4)$$

When $\gamma = 0$, one ignores non-neighbor penalties, favoring one large “grand coalition.” In contrast, when $\gamma = 1$, non-neighbor penalties dominate, favoring singleton partitions. This way, the resolution parameter controls cluster granularity, e.g., enabling the detection of small communities within large networks.

Robust nodes have no incentive to deviate for any $\gamma \in [0, 1]$. However, for a non-robust node, a move to a different community may represent a frustrated choice. The decision for such a move is governed by comparing the Familiarity Index to $\gamma$, where a move is preferred if:

* $\gamma < F_i$, the node prioritizes the community with *more friends*, following the blue arrows in Figure 1;

* $\gamma > F_i$, the node prioritizes the community with *fewer strangers*, following the red arrows in Figure 1.

The parameter $\gamma$ thus directly controls how to deal with frustrated choices.

The quality (or potential) of a node i in community $C_k$ is the sum of the qualities of the node pairs $v_{ij}$ for all $j \in C_k$, and the quality of a community and of a partition can be similarly defined. The introduction of a consistent quality to each node, such as the one derived from CPM, imposes a clear direction on all possible moves in the metagraph, turning it into a directed acyclic graph (DAG) whose sinks represent local optima on the quality function.

This formulation naturally suggests a simple *better-response dynamic*: starting from an arbitrary partition, an algorithm iteratively allows a self-interested node to make a selfish move to a neighboring partition if doing so improves its individual utility, continuing until a sink in the metagraph is reached where no node has an incentive to move.<fnref n="2" />

Among our contributions, we will show that under the formulation introduced in Sections 2 and 3 the considered better-response dynamic always converges in pseudo-polynomial time to a local optimum that is a candidate solution to the community detection problem.

<footnote n="2">²Cycles of partitions are impossible in the setup considered in this paper, which corresponds to an additive potential game. In such game, each selfish move strictly increases the global potential, making a return to a previous partition logically contradictory, unlike in other social choice models where the Condorcet paradox can occur [5].</footnote>
**Bridging robustness and resolution.** The robustness and resolution perspectives instantiate two ways of handling the max-min nature of the community detection problem:

* A *robustness-centric* approach requires that only a fraction of the nodes satisfy the strict dual criterion (Eq. (1)), leaving other nodes unconstrained;

* A *resolution-centric* approach requires *all* nodes to be at a local optimum for some $\gamma \in [0, 1]$ (Eq. (3)), but relaxes the emphasis on strict max-min satisfaction for each individual node.

In this work, we analytically relate these approaches and address the convergence concerns for the CPM [4], a well-established quality function from statistical physics that serves as the default objective for state-of-the-art optimizers like the Leiden algorithm [6]. We employ a *resolution-centric approach* to find a local optimal partition. To do so, we set the resolution parameter $\gamma$ heuristically to the *edge density of the graph*, following a recommendation from [7]. Once a local optimum partition is identified, we then evaluate its *robustness*. This indicates the fraction of optimal nodes that would remain stable, even if we were to vary the resolution from the value at which the partition was found.

**Contributions.** We summarize the key contributions of this paper as follows:

* **Game-theoretic reinterpretation of CPM.** We reinterpret the CPM as a potential hedonic game, where each vertex is modeled as a self-interested agent maximizing its utility [7–9].<fnref n="3" /> This framing allows the CPM quality function to be viewed as a sum of individual utilities, providing a game-theoretic lens for community detection that computationally scales under distributed computation.

* **Convergence guarantees for better-response dynamics.** We prove that better-response dynamics over the CPM objective (Eq. (8)) converge in pseudo-polynomial time to an equilibrium (Definition 3), where no agent has an incentive to deviate (Theorem 1). The convergence is guaranteed by bounding the quality improvement at each step and leveraging the structure of the CPM Hamiltonian.

* **Theoretical characterization of robustness.** We introduce a robustness measure (Eq. (1)) and establish formal connections between equilibrium partitions and robustness properties. These results (Theorems 4 and 5) link robustness (Eq. (1)) to the resolution parameter $\gamma$.

* **Empirical evaluation of efficiency, robustness, and accuracy.** We conduct numerical experiments on synthetic networks with ground-truth communities to evaluate three fundamental aspects of community detection: *efficiency* (answering “how long does it take, in the worst case, to reach an equilibrium partition?”); *robustness* (evaluating “how resilient is a partition to parameter changes?” using Eq. (1)); and *accuracy* (determining “how close is a partition to the ground truth?” via the *Adjusted Rand index* (ARI) [10]). We analyze these for both the ground truth and partitions found by algorithms such as the Leiden algorithm [6].

**Outline.** The remainder of this paper is organized as follows. Section 2 introduces the CPM and its reinterpretation as a hedonic game, situating our work within the broader literature on coalitional game theory and community detection. Then, Section 3 presents our analytical results, including convergence proofs for better-response dynamics and the theoretical connection between robustness and resolution. Section 4 reports our experimental methodology and results, addressing the efficiency, robustness, and accuracy of detected partitions. Finally, Section 5 concludes with broader implications and directions for future work.

## 2. Background and Literature Review

Complex systems, ranging from biological ecosystems to social and technological networks, are composed of interacting components whose collective behavior often exhibits emergent properties not evident at the individual

<footnote n="3">³The term “hedonic” originates from the Ancient Greek *hēdonikos* (pleasurable) and *hēdonē* (pleasure). In hedonic games, agents greedily maximize satisfaction based on a utility function. The title alludes to both Pinocchio’s Pleasure Island and Leiden, the city where the algorithm was developed [4, 6].</footnote>
level. Understanding how such interactions give rise to functional organization is a central challenge, and network science provides a powerful analytical framework for this purpose [11]. Within this framework, the detection and analysis of community structure plays a pivotal role, as it reveals modular organization, supports efficient information flow, and helps mitigate systemic risks such as cascading failures [1].

The foundational work of Girvan and Newman [12] marked a turning point in the algorithmic study of community detection, inspiring a surge of methods that bridge theoretical insights with real-world applications. Despite this progress, community detection remains a computationally challenging problem. Impossibility results in synthetic benchmarks [13–16] have demonstrated inherent limits to accurate recovery, especially in sparse or noisy networks.

To navigate these challenges, diverse algorithmic strategies have been proposed. Some prioritize efficiency and scalability, such as the widely-used Louvain [17] and Leiden [6] algorithms, which optimize modularity-based objectives. Others take a more theoretical stance, employing asymptotic analysis under generative models like the Stochastic Block Model (SBM) [16, 18, 19]. In this context, polynomial-time methods developed by Hajek and colleagues [20, 21] provide valuable insights into the limits of tractability.

In parallel, bioinspired heuristics have emerged as a compelling alternative, offering adaptive and distributed strategies for uncovering community structures [22–24]. Another fruitful direction is the application of maximum likelihood principles [18, 25, 26], which frame community detection as a probabilistic inference problem.

More recently, game-theoretic approaches have gained momentum. In particular, the trade-off between gaining more friends while avoiding strangers, as considered in this work, is reminiscent of strategic decision-making under negative network externalities, e.g., as captured by the Chinese Restaurant Game [27]. Alternatively, hedonic games [7] model community formation as a process driven by individual preferences over groupings, offering a principled lens through which to analyze equilibrium formation, stability, and agent incentives.

To establish the theoretical foundations for our contributions, this section is organized into two conceptual stages. Section 2.1 revisits the development of quality functions for community detection, tracing their origins in statistical physics, from the Ising model [3] to the CPM. The CPM stands out for addressing the resolution-limit problem and enabling locally consistent communities, making it a cornerstone of our approach.

Then, in Section 2.2, we reformulate the CPM objective using the language of Hedonic Game Theory. By decomposing the global Hamiltonian into agent-level utility functions, we demonstrate that CPM-induced community formation constitutes a potential game, in which each agent's local decision aligns with global optimization. This reinterpretation forms the basis of our convergence guarantees, discussed in the next section.

## 2.1. From the Ising Model to the Constant Potts Model

This subsection outlines the evolution of community detection algorithms, starting from the foundational Lenz-Ising model, analogous to two-community detection (Section 2.1.1). We then explore the emergence and limitations of geometric frustration (Section 2.1.2), leading to the introduction of the more generalized Potts model for K communities (Section 2.1.3). We then discuss how Modularity (Section 2.1.4) derives from the Potts model, examine its resolution-limit problem (Section 2.1.5), and finally present the CPM as a resolution-limit-free approach that forms the theoretical basis of our work (Section 2.1.6).

### 2.1.1. The Lenz-Ising Model

The challenge of partitioning networks into meaningful communities has deep roots in statistical physics, with early concepts providing the foundation for many modern algorithms. The Lenz-Ising model, introduced in 1925 by physicists Ernst Ising and Wilhelm Lenz, represents a seminal step in this direction. Originally formulated to explain ferromagnetism, it describes a system of interacting “spins” on a lattice or graph, where each spin (vertex) can assume one of two states (communities), e.g., +1 or -1.

The system's total energy is quantified by the Lenz-Ising Hamiltonian,

$$ \mathcal{H}_{\text{Ising}}(\sigma) = -\sum_{i \neq j} J_{ij} \sigma_i \sigma_j. \qquad (5) $$

Here, $\sigma = (\sigma_1, \dots, \sigma_n)$ represents the partition, where each component $\sigma_i \in \{-1, +1\}$ represents the state of node $i$. $J_{ij}$ represents the interaction strength between nodes $i$ and $j$, with the convention that $J_{ij} = 0$ whenever $i$ and $j$ are not neighbors. The objective in the Ising model is to find a configuration of spins that minimizes the total energy of the
system. This state of lowest energy is known as the “ground state”, and other configurations with higher energy are referred to as “excited states”. In the ferromagnetic case, where $J_{ij} > 0$, the energy is minimized when neighboring spins align (both +1 or both -1). Conversely, in the antiferromagnetic case, where $J_{ij} < 0$, the energy is minimized when neighboring spins are anti-aligned (one +1 and the other -1).

Note that if we compute $\mathcal{H}_{\text{Ising}}$ across all possible partitions represented as nodes in the metagraph (Figure 1), the resulting directed metagraph (which points toward partitions of higher quality) will have the grand coalition as the ground state in the ferromagnetic case, since all edges connect nodes within the same community. In contrast, in the antiferromagnetic case, the singleton partition becomes the ground state, as all edges link nodes from different communities. However, the singleton partition in Figure 1 comprises four communities, one for each node in the original graph, whereas the Ising model only accommodates two spin states. Therefore, in the antiferromagnetic case, frustration inevitably arises.

### 2.1.2. Geometric Frustration in Networks

Frustration arises in the Ising model when the network’s topology prevents all local interaction preferences from being simultaneously satisfied, leading to multiple configurations sharing the same minimum energy. Consider, for instance, an antiferromagnetic Ising model on a triangle. In the triangle, at least one interaction will always be *frustrated* or unsatisfied, regardless of the spin configuration. As another example, a square lattice in an antiferromagnetic setup might avoid frustration by allowing alternating spins. However, adding diagonals to such a square, forming triangles within the structure, can reintroduce frustration.

Note that frustration in the Ising model is topology-dependent and constrained by the binary limitation of $K = 2$ communities. The binary nature of spin states in the Ising model is relaxed through the Potts model, as discussed in the sequel.

### 2.1.3. The Potts Model

The Potts model, proposed by Renfrey Potts in 1951, offers a crucial generalization by allowing each spin to take one of $K$ possible states, where $K$ can be as large as the number of nodes ($n$) in the network. This extension provides a more direct and flexible framework for community detection. Reichardt and Bornholdt [28] formalized a Potts model specifically for this task. They established a set of first principles for a quality function, or Hamiltonian, designed to identify cohesive network communities. This Hamiltonian considers four fundamental types of pairwise relationships:

1. **Rewarding internal links:** Edges connecting nodes within the same community should lower the system's energy.

2. **Penalizing internal non-links:** The absence of an edge between two nodes in the same community should increase the system's energy.

3. **Penalizing external links:** Edges connecting nodes in different communities should increase the system's energy.

4. **Rewarding external non-links:** The absence of an edge between nodes in different communities should lower the system's energy.

This formulation represented a major conceptual advancement by explicitly accounting for both existing connections (links) and missing connections (non-links) within the objective function. Unlike the Ising model, which separates ferromagnetic and antiferromagnetic interactions into distinct regimes, the Potts model unifies them into a single quality function: rewarding link alignment (ferromagnetic) and penalizing non-link alignment (antiferromagnetic), thereby capturing both types of structural information simultaneously.

The simplified version of this model considers symmetric weights for links and non-links (i.e., the reward for an internal link equals the penalty for an external link, and the penalty for an internal non-link equals the reward for an external non-link). This simplification allows the Hamiltonian to be expressed purely in terms of internal interactions (rewarding internal links and penalizing internal non-links), thereby ignoring external relationships and yielding significant computational benefits by focusing the analysis on local structure. The resulting Hamiltonian takes the general form:

$$ \mathcal{H}_{\text{Potts}}(\pi) = - \sum_{i \neq j} (a_{ij}A_{ij} - b_{ij}(1 - A_{ij}))\delta(\sigma_i = \sigma_j) \quad (6) $$
where $A_{ij}$ is the adjacency matrix and the parameters $a_{ij}$ and $b_{ij}$ represent the weights for internal links and non-links, respectively.

### 2.1.4. Modularity

From this simplified Potts framework, numerous community detection methods can be cast as special cases by defining the weights $a_{ij}$ and $b_{ij}$ in different ways. A prominent example is the widely used Modularity metric, introduced by Newman and Girvan in 2004 [29]. Modularity can be derived from the simplified Hamiltonian by setting the weight $a_{ij} = 1 - b_{ij}$ and $b_{ij}$ (the penalty for internal non-links) to a specific null model, $p_{ij} = \frac{d_i d_j}{2m}$, where $d_i$ is the degree of node $i$ and $m$ the total number of edges in the network. Then, replacing the above values into Eq. (6), we obtain:

$$ \mathcal{H}_{\text{Modularity}}(\pi) = -\sum_{i \neq j} \left( A_{ij} - \frac{d_i d_j}{2m} \right) \delta(\sigma_i = \sigma_j). \qquad (7) $$

However, this reliance on a global null model makes Modularity [29] susceptible to a significant drawback: the well-documented resolution limit problem [4].

### 2.1.5. Resolution-limit problem

This problem arises precisely because the null model term in $\mathcal{H}_{\text{Modularity}}$ depends on the degrees of the nodes ($d_i, d_j$) and the total number of edges in the entire graph ($m$), making the optimal partition dependent on the global scale of the network. This leads to inconsistent behavior. For instance, consider a classic example used to illustrate this problem: a “ring of cliques” network (as depicted in Figure 1 of [4]). In such a network, adjacent cliques in the ring are connected by a single link between specific nodes.

Modularity might find it optimal to merge pairs of cliques into single communities. Yet, if one of these merged pairs is extracted and analyzed as a separate subgraph, Modularity would then find it optimal to split them into two distinct communities (one for each clique). This inconsistency arises because the local decision is influenced by the global context.

A method is considered resolution-limit-free if, when analyzing any induced subgraph of the original graph, the partitioning results remain unchanged. Specifically, if $\pi = \{C_1, C_2, \dots, C_K\}$ is an $\mathcal{H}$-optimal partition of a graph $G$, then the objective function $\mathcal{H}$ is called resolution-limit-free if for each subgraph $G'$ induced by $D \subset \pi$, the partition $D$ is also $\mathcal{H}$-optimal. This implies that a resolution-limit-free method will never depend on the size of the network to merge cliques in the ring of cliques network. If such a method merges cliques in a large graph, it must also merge them in any smaller subgraph containing those cliques, due to the resolution-limit-free property.

### 2.1.6. Constant Potts Model

To address the resolution-limit problem, Traag et al. introduced the Constant Potts Model (CPM) [4]. The “constant” in CPM refers to replacing the traditional global, size-dependent null model with a multiplicative resolution term $\gamma$ that remains conditionally constant. Specifically, for unweighted graphs, the parameters $a_{ij}$ and $b_{ij}$ within the Potts Hamiltonian, $\mathcal{H}_{\text{Potts}}$ (Eq. 6, where $a_{ij}$ weighs internal links and $b_{ij}$ weighs internal non-links), simplify to $a_{ij} = 1 - \gamma$ and $b_{ij} = \gamma$. These values directly align with the internal-community pair values $v_{ij}$ defined in Eq. (4), where $v_{ij} = 1 - \gamma$ for connected pairs and $v_{ij} = -\gamma$ for non-connected pairs. The resulting Hamiltonian is:

$$ \mathcal{H}_{\text{CPM}}(\sigma) = -\sum_{i \neq j} ((1 - \gamma)A_{ij} - \gamma(1 - A_{ij}))\delta(\sigma_i = \sigma_j) = -\sum_{i,j} (A_{ij} - \gamma)\delta(\sigma_i = \sigma_j) = -\sum_{i,j} v_{ij}. \qquad (8) $$

This formulation makes CPM a resolution-limit-free method. The decision to merge or split communities depends only on the local density of connections relative to the resolution $\gamma$, ensuring consistent results regardless of the overall network size. A partition identified as a local minimum in a large network will remain a local minimum if analyzed as a subgraph.

Our work directly builds upon the CPM. We do not propose a new model but rather introduce a novel analytical perspective by interpreting CPM through the lens of Hedonic Game Theory [7, 8].

From this perspective, we contend that the term “constant” may not be the most appropriate, as it typically refers to a Potts Model with uniform multiplicative terms. However, the formulation considered here involves two distinct types
<table><caption>Table 1: Ising or Potts Model (Physics), Constant Potts Model (Community Detection), and Hedonic Games (Game Theory)</caption><thead><tr><th>Ising or Potts Model (Physics)</th><th>Community Detection</th><th>Hedonic Game Theory</th></tr></thead><tbody><tr><td>Spins (magnetic particles)</td><td>Nodes in a network</td><td>Players (agents)</td></tr><tr><td>Aligned spins (same state)</td><td>Community (cluster of nodes)</td><td>Coalition (group of agents)</td></tr><tr><td>Local energy</td><td>Tradeoff:<br>internal links vs. internal non-links</td><td>Individual utility,<br>φ<sup>γ</sup><sub>i</sub> = (1 - γ)d<sup>γ</sup><sub>i</sub> - γd<sup>γ</sup><sub>i</sub></td></tr><tr><td>Ground state<br>(no local change reduces energy)</td><td>Locally optimal partition</td><td>Nash Equilibrium<br>(no agent can improve utility by moving)</td></tr><tr><td>Frustration:<br>energy cannot be minimized for all edges</td><td>Conflicting objectives:<br>best community differs by criterion</td><td>Frustration:<br>No coalition satisfies all preferences</td></tr><tr><td>Hamiltonian:<br>global energy decreases with better alignment</td><td>Constant Potts Model:<br>minimizes internal non-links and maximizes links</td><td>Potential Game:<br>global potential increases with utility</td></tr><tr><td>Spin with satisfied interactions:<br>aligned with all neighbors</td><td>Robust node:<br>community is optimal across γ ∈ [0, 1]</td><td>Totally robust agent:<br>best group for all γ</td></tr><tr><td>Spin flips (e.g., Glauber dynamics)</td><td>Node relocation (e.g., Leiden algorithm)</td><td>Best-response dynamics</td></tr><tr><td>Low-energy configuration</td><td>Robust and stable community structure</td><td>Stable partition means strategic equilibrium</td></tr></tbody></table>

of weights: a positive weight (ferromagnetic) and a negative weight (antiferromagnetic). These opposing forces can lead to what is known as *frustration* in the Potts Model, resulting in a *frustrated Potts Model* (see Section 2.1.2). This frustration introduces potential conflicts, which we interpret as a loss of robustness in game-theoretic terminology. We will further explore the connection between *frustration* and *robustness* in Section 3.2.

**Competitive Potts Model.** While retaining the abbreviation CPM, we propose a more fitting name for the model under consideration: the *Competitive Potts Model*. In this reinterpretation, nodes are rational agents that seek to maximize their individual utility by joining or forming communities. Therefore, this framework can either be considered as a *non-cooperative game* that models the emergence of cooperative structures [30], or as a *cooperative game* to account for the fact that the ultimate interest relies on the derived coalitions [7].

**Non-transferable Utility.** Non-cooperative game theory deals with individual players, their available strategies, and their resulting payoffs [30]. Our model aligns with this paradigm: nodes are the players, the chosen community is their strategy, and the local potential $\varphi_i^\gamma$ serves as their individual payoff function. Furthermore, this utility is *non-transferable*, as there is no mechanism for agents to exchange or reallocate their utility gains; each agent's payoff is determined solely by the composition of its chosen coalition. In contrast, cooperative game theory abstracts away from such strategic details to focus on what coalitions can achieve collectively and how the joint benefits should be allocated [7].

**Potential Game.** The approach considered in this paper follows a line of work in the literature that uses non-cooperative games as a foundation for cooperative outcomes [31]. Agents do not make prior binding agreements; they act selfishly, and cooperation (the formation of stable communities) *emerges as a Nash Equilibrium* of the game. Crucially, the local utility gains of individual agents are precisely aligned with the global improvement in a potential function (see Section 2.2.2). This structure defines the system as an *exact potential game*, where self-interested actions converge toward equilibria that are beneficial for the collective.

**Competitive at Coalition and Intranode Levels.** We use the term “competitive” because competition arises at two levels. First, at the coalition level, communities compete for the inclusion of nodes. Second, a conflict emerges at the intra-agent level, accounted for by the factor $A_{ij} - \gamma$, where each agent must balance two competing preferences: maximizing internal links (ferromagnetic cohesion) and minimizing internal non-links (antiferromagnetic exclusivity). This dual nature of emergent cooperation and underlying competition frames CPM not only as a potential game but also as a meaningful abstraction of real-world community dynamics. This new concept allows us to trace a direct theoretical lineage from the Ising model in physics to a modern, game-theoretic interpretation of community detection, a connection further summarized in Table 1.
## 2.2. From the Constant Potts Model to the Competitive Potts Model through Hedonic Games

Despite extensive research in both hedonic games and community detection, the connection between community detection algorithms and potential hedonic games remains underexplored. In this work, we relate the CPM objective function [4] with a hedonic potential [7, 8], extending the line of research that interprets network dynamics through the lens of potential games. In particular, generalized ordinal potentials have also been studied in dynamic network settings, such as the buck-passing game [32], where they guarantee the existence of equilibria even under stochastic processes. The local improvement Algorithm 1, which solves a hedonic game when considering CPM as its quality function, shares conceptual foundations with earlier community detection methods that iteratively refine a quality function.

Hedonic games, extensively studied in the literature [8, 9, 33–35], define a setting where each node has a utility for belonging to a given community, known as its hedonic potential, which quantifies its fit within the community. From a computational standpoint, potential hedonic games have utility functions that can be computed in polynomial time [36], relying only on the number of neighbors of a node and the size of each community. From a social network perspective, hedonic games provide a natural model for representing the constraints on forming and maintaining social connections [37].

To determine whether a node has an incentive to deviate from its current community, we employ a multi-scale game-theoretic framework that integrates local (node-level), meso (community-level), and global (partition-level) perspectives. Derived from Eq. (3) to Eq. (8), our potential functions formalize the core objectives of maximizing “friends” and minimizing “strangers” across scales, ranging from individual to societal levels, as further detailed in the sequel.

### 2.2.1. Hedonic Potential

The objective function is used to assign scores to each node, community, and partition, reflecting their structural quality. The objective function is referred to as a *quality function* in community detection, a *potential function* in game theory, and a *Hamiltonian* in physics that measures the total energy of a system to be minimized. In what follows, we demonstrate that optimizing the CPM is equivalent to computing a stable partition of a potential hedonic game with Additively Separable Preferences (ASP) [7]. The node potential $\varphi_i^\gamma$ evaluates the contribution of a single node to a community, the community potential $\phi^\gamma$ aggregates the contributions of all nodes within a community, and the partition potential $\Phi^\gamma$ sums the contributions across all communities in a partition. While they share a common mathematical structure, their distinct scopes reflect the hierarchical nature of community detection, from individual nodes to global network partitions, noting that there is an equivalence between node and partition gains (see Section 2.2.2).

**Node Potential.** The potential of node i with respect to community $C_k$ is the sum of $v_{ij}$ for all $j \in C_k$:

$$ \varphi_i^\gamma(C_k) = \sum_{j \in C_k} v_{ij}. \qquad (9) $$

The above potential can be written in terms of the node degrees as follows,

$$ \varphi_i^\gamma(C_k) = (1 - \gamma)d_i^k - \gamma\hat{d}_i^k \qquad (10) $$

where $d_i^k$ is the degree of node i in community $C_k$ and $\hat{d}_i^k$ is the number of non-neighbors of node i in community $C_k$. As discussed in the introduction, we consider a max-min problem of maximizing the number of neighbors and minimizing non-neighbors within communities. The above expression for the node potential, to be maximized by each node, balances between these two objectives, of maximizing neighbors within community ($d_i^k$) and minimizing non-neighbors within community ($\hat{d}_i^k$), using the resolution parameter $\gamma$ to trade between the two.

Let $n_k$ be the number of nodes in community $C_k$. Recall that $\delta(\sigma_i = k)$ is an indicator function that equals 1 if $\sigma_i = k$, and 0 otherwise. Then,

$$ \hat{d}_i^k = n_k - d_i^k - \delta(\sigma_i = k). \qquad (11) $$

Therefore, replacing (11) into (10) we obtain:

$$ \varphi_i^\gamma(C_k) = d_i^k - \gamma(d_i^k + \hat{d}_i^k) = d_i^k - \gamma(n_k - \delta(\sigma_i = k)). \qquad (12) $$

In what follows, we relate the node potential to the community potential.
**Community Potential.** The potential of community $C_k$ is half the sum of the potential of all nodes $i \in C_k$, given by:

$$ \phi^{\gamma}(C_k) = \frac{1}{2} \sum_{i \in C_k} \varphi_i^{\gamma}(C_k) = \frac{1}{2} \sum_{i \in C_k} \sum_{j \in C_k} v_{ij}. \qquad (13) $$

Let $m_k$ be the number of edges in community $C_k$. Note that

$$ \sum_{i \in S_k} d_i^k = 2m_k. \qquad (14) $$

Then, replacing (14) and (12) into (13) we obtain

$$ \phi^{\gamma}(C_k) = m_k - \gamma \frac{n_k(n_k - 1)}{2} = m_k - \gamma \binom{n_k}{2} = (1 - \gamma)m_k - \gamma \left(\binom{n_k}{2} - m_k\right). \qquad (15) $$

As previously discussed, the above potential is motivated by a max-min problem consisting of maximizing the number of neighbors, $m_k$, and minimizing the number of non-neighbors, $\binom{n_k}{2} - m_k$, within communities. The resolution parameter $\gamma$ balances the two goals.

**Partition Potential.** The potential of partition $\pi$ is given by:

$$ \Phi^{\gamma}(\pi) = \sum_{k=1}^{K} \phi^{\gamma}(C_k) = \sum_{k=1}^{K} \sum_{i \in C_k} \sum_{j \in C_k} v_{ij} = \sum_{k=1}^{K} \sum_{i \in C_k} \sum_{j \in C_k} (A_{ij} - \gamma) \delta(\sigma_i = \sigma_j). \qquad (16) $$

Contrasting the above equation against Eq. (3), we note that the potential of a partition equals the sum of the values of all its node pairs. Then, it follows from Eqs. (15) and (16) that

$$ \Phi^{\gamma}(\pi) = (1 - \gamma) \left( \sum_{k=1}^{K} m_k \right) - \gamma \left( \sum_{k=1}^{K} \binom{n_k}{2} - m_k \right), \qquad (17) $$

where the first term corresponds to the number of neighbors, and the second to the number of non-neighbors within communities.

### 2.2.2. Node Gain Equals Partition Gain

We demonstrate a fundamental property of the considered hedonic game: gains from a single node moving between communities are identical whether measured by the node's potential change ($\Delta\varphi$) or the overall partition's potential change ($\Delta\Phi$). This property ensures that selfish moves align with global improvement.

Consider node $i$ moving from its origin community $\mathcal{B}$ to destination community $\mathcal{A}$. In this section, to simplify terminology we consider two communities, i.e., $\pi = \{\mathcal{A}, \mathcal{B}\}$, noting that our results hold for any $K \ge 1$ as the two communities of interest can be arbitrarily chosen. Let $\pi' = \{\mathcal{A} \cup \{i\}, \mathcal{B} \setminus \{i\}\}$ denote the updated partition after this move.

We denote by $\Delta\varphi_i^{\mathcal{B},\mathcal{A}}$ the node potential gain of $i$ due to its move, and by $\Delta\Phi_i^{\mathcal{B},\mathcal{A}}$ the corresponding partition potential gain,

$$ \Delta\varphi_i^{\mathcal{B},\mathcal{A}} = \varphi_i^{\gamma}(\mathcal{A} \cup \{i\}) - \varphi_i^{\gamma}(\mathcal{B}), \quad \Delta\Phi_i^{\mathcal{B},\mathcal{A}} = \Phi^{\gamma}(\pi') - \Phi^{\gamma}(\pi). \qquad (18) $$

Next, we show that

$$ \Delta\varphi_i^{\mathcal{B},\mathcal{A}} = \Delta\Phi_i^{\mathcal{B},\mathcal{A}}. \qquad (19) $$

Indeed, it follows from Eq. (12) that

$$ \Delta\varphi_i^{\mathcal{B},\mathcal{A}} = \varphi_i^{\gamma}(\mathcal{A} \cup \{i\}) - \varphi_i^{\gamma}(\mathcal{B}) = (d_i^{\mathcal{A}} - \gamma n_{\mathcal{A}}) - (d_i^{\mathcal{B}} - \gamma(n_{\mathcal{B}} - 1)) = (d_i^{\mathcal{A}} - d_i^{\mathcal{B}}) - \gamma(n_{\mathcal{A}} - n_{\mathcal{B}} + 1). \qquad (20) $$
Similarly, it follows from Eq. (16) that

$$ \Delta\Phi_i^{\mathcal{B}\mathcal{A}} = \Phi^\gamma(\pi') - \Phi^\gamma(\pi) = \phi^\gamma(\mathcal{A} \cup \{i\}) + \phi^\gamma(\mathcal{B} \setminus \{i\}) - (\phi^\gamma(\mathcal{A}) + \phi^\gamma(\mathcal{B})). \quad (21) $$

Now, substituting Eq. (15) into Eq. (21),

$$ \Delta\Phi_i^{\mathcal{B}\mathcal{A}} = (m_{\mathcal{A}} + d_i^{\mathcal{A}}) - \gamma \binom{n_{\mathcal{A}} + 1}{2} + (m_{\mathcal{B}} - d_i^{\mathcal{B}}) - \gamma \binom{n_{\mathcal{B}} - 1}{2} - \left(m_{\mathcal{A}} - \gamma \binom{n_{\mathcal{A}}}{2} + m_{\mathcal{B}} - \gamma \binom{n_{\mathcal{B}}}{2}\right) \quad (22) $$

$$ = (d_i^{\mathcal{A}} - d_i^{\mathcal{B}}) - \gamma (n_{\mathcal{A}} - n_{\mathcal{B}} + 1) = \Delta\varphi_i^{\mathcal{B}\mathcal{A}}. \quad (23) $$

The above property plays a key role in establishing the convergence of the considered community detection algorithm (see Theorem 1). Indeed, by deriving a lower bound on $\Delta\varphi_i^{\mathcal{B}\mathcal{A}}$, we show that greedy local moves lead to a stable, locally optimal partition, in pseudo-polynomial time.

### 2.2.3. Hedonic Game Equilibrium

Having established the potential functions that guide individual node decisions, we now define the collective outcome of these choices. The central question is: when does the community formation process reach a stable state? In our hedonic game framework, this state is known as an **equilibrium**, i.e., a partition where no self-interested node has an incentive to move to another community. This section formally defines the concepts of stability and equilibrium, which serve as candidate solutions to the community detection problem.

**Definition 1** (Stability Concepts). A community is:

* **Internally stable** if no node within the community has an incentive to leave it for any other existing community.

* **Externally stable** if no node outside the community has an incentive to join it.

A partition is **stable** if all its communities are both internally and externally stable. Such a stable partition is referred to as an **equilibrium**.

From the definitions above, we formally establish that a hedonic game equilibrium serves as a candidate solution to the community detection problem, as no node has an incentive to change its assigned community.

**Definition 2** (Local Stability [6]). A node i is **locally stable** in partition $\pi$ if its utility in its current community $C_{\sigma_i}$ is greater than or equal to its utility if it deviates to another community:

$$ \varphi_i^\gamma(C_{\sigma_i}) \ge \varphi_i^\gamma(C_k) \quad \forall k \ne \sigma_i. $$

**Definition 3** (Solution [35]). A **solution** to the community detection problem is an **equilibrium partition**, i.e., a partition wherein all nodes are locally stable.

In an equilibrium partition $\pi^\gamma$, for each node i, its assigned community $\sigma_i$ must be in the set of communities that maximize its utility:

$$ \sigma_i \in \arg\max_k \varphi_i^\gamma(C_k). $$

A node only moves if a new community offers strictly higher utility. In the case of ties for the maximum utility, a node has no incentive to move from its current community if it is one of the optimal choices. Note that the definitions of local stability and equilibrium subsume a fixed $\gamma$. In the remainder of this work, we refer to an equilibrium as a $\gamma$-equilibrium whenever we aim to stress the dependence of the equilibrium on $\gamma$. Whenever we aim to stress that the equilibrium holds for a range $[\gamma_0, \gamma_1]$ of values of $\gamma$, we refer to it as a $[\gamma_0, \gamma_1]$-equilibrium.

As a direct consequence of the equivalence between node and partition potential gains (see Section 2.2.2), a solution can also be characterized via the global partition potential [38].

**Proposition 1** (Potential Maximized at Equilibrium [38]). A **solution** to the community detection problem is a partition wherein no node can unilaterally move to another community and increase the global partition potential.
*Proof.* The proof follows directly from the property that $\Delta\varphi_i = \Delta\Phi_i$ (see Eq. (23)). If all nodes are locally stable, no node can unilaterally move to increase its own potential, i.e., we have $\Delta\varphi_i \le 0$ for every unilateral move of any node $i \in V$. Therefore, no unilateral move can increase the partition's potential given by Eq. (16). $\square$

Next, we discuss the role of $\gamma$ in the convergence time towards an equilibrium, which Algorithm 1 provides as a simple better-response dynamics to find.

### 3. Analytical Contributions

In Section 3.1, we demonstrate that if the resolution parameter $\gamma$ is a rational number, an iterative better-response dynamics (e.g., Algorithm 1) is guaranteed to converge in pseudo-polynomial time to an equilibrium partition according to Definition 3. This convergence is ensured because the partition potential, $\Phi$, is bounded within $[-n^2, n^2]$ and strictly increases with each step. Specifically, for a rational $\gamma = b/c$, each beneficial node move increases the potential by at least $1/c$, guaranteeing convergence in $O cn^2$ steps (Theorem 1). Then, in Section 3.2, we shift our focus from convergence guarantees to the structural stability of the resulting equilibria, introducing formal criteria to evaluate the robustness of a partition against variations in the resolution parameter $\gamma$.

#### 3.1. Equilibrium Convergence

Our analysis of equilibrium convergence explores key aspects:

* **Finding an Equilibrium in Pseudo-Polynomial Time:** In Section 3.1.1 we prove that the better-response dynamics described in Algorithm 1 finds an equilibrium partition in $O cn^2$ time. The proof hinges on the fact that the potential gain from any single node move is lower-bounded, ensuring a finite number of steps before reaching a stable state where no node has an incentive to move. In Section 3.1.2 we consider extremal values for $\gamma$ and show that in those cases the algorithm converges in polynomial time.

* **Best- vs. Better-Response Dynamics:** In Section 3.1.3, we show that neither best-response dynamics (always choosing the move with the maximum potential gain) nor better-response dynamics (choosing any move with a positive gain) is universally faster. We provide examples demonstrating the existence of specific sample paths where a better-response dynamics converges to an equilibrium in fewer steps than a globally greedy best-response dynamics.

In Section 3.1.4 we summarize our convergence results, indicating that while pseudo-polynomial convergence is guaranteed, the practical performance depends on design choices such as the resolution parameter $\gamma$, the initial partition, and the node selection strategy.

##### 3.1.1. Finding an Equilibrium Partition

**Response Dynamics: Which Node? Which Community?**. Two key questions arise in the dynamics to find an equilibrium partition: (a) Which node should move next? (b) Given a node, to which community should it move? For (a), the algorithm may use a best-response (select a node that maximizes the gain in potential) or a better-response (allow any node with a strictly positive gain to move). For (b), a node may adopt a local best-response (move to the community with maximum potential, Eq. 10) or a local better-response (move to any community with higher potential than its current one).

**Reference Algorithm.** Algorithm 1 captures a better-response dynamic when determining which node moves next. For a selected node $i$ (line 6), it identifies a set of communities $K^*$ that could improve its potential. This set may be restricted to the communities that maximize its local potential, defining a local best-response (line 8), or it may include any community with higher potential than the current one, corresponding to a local better-response (line 10). A target community $C_k$ is then selected (line 12), and if it yields strictly greater potential (line 13), the node is moved (line 14). The process continues until no node can further improve its potential, reaching the equilibrium of Definition 3.

Our theoretical results apply irrespective of whether nodes adopt best- or better-response strategies (see Section 3.1.3). In simulations (Section 4.3), we implement Algorithm 1 using the local best-response at the node level (line 8). To improve efficiency, our implementation follows the Leiden algorithm [6], which maintains a queue of
<caption>Algorithm 1: Better-Response Dynamics for Finding a Hedonic Game Equilibrium.</caption>

**Input** : $G = (V, E)$; $\gamma$; Initial partition membership $\sigma : V \to \{1, \dots, K\}$.
**Output**: Equilibrium partition $\sigma$.
1 changed $\leftarrow$ true; // Ensures the main loop runs at least once
2 **while** changed do
3 changed $\leftarrow$ false
4 Initialize queue $Q \leftarrow V$
5 **while** $Q$ is not empty do
6 Remove a node $i$ from $Q$; // Select a candidate node to evaluate
7 **if** Node-level best-response then
8 $\mathcal{K}^* \leftarrow \arg\max_{k \in \{1, \dots, K\}} \varphi_i^\gamma(C_k)$; // Best communities for node $i$
9 **else**
10 $\mathcal{K}^* \leftarrow \{k \in \{1, \dots, K\} \text{ such that } \varphi_i^\gamma(C_k) > \varphi_i^\gamma(C_{\sigma_i})\}$; // Better communities for node $i$
11 **end**
12 Let $\kappa$ be an element from $\mathcal{K}^*$; // Select one target community (handling ties)
13 **if** $\varphi_i^\gamma(C_\kappa) > \varphi_i^\gamma(C_{\sigma_i})$ **then**
14 $\sigma_i \leftarrow \kappa$
15 changed $\leftarrow$ true
16 $Q \leftarrow Q \cup \{j \in V \mid A_{ij} = 1 \text{ and } j \notin C_\kappa\}$; // Leiden's local move queue management [6]
17 **end**
18 **end**
19 **end**
20 **return** $\sigma$; // Return partition as solution according to Definition 3

candidate nodes $Q$ (line 4). Whenever a node moves, its neighbors outside the target community are added to the queue (line 16). This prioritizes nodes whose neighborhoods have recently changed, focusing computation on active regions of the network [17].

**Convergence.** Next, we show that the resulting equilibrium partition produced by Algorithm 1 is identified in pseudo-polynomial time using better-response dynamics. To this aim, we assume that $\gamma$ is rational.<fnref n="4" /> i.e., $\gamma = b/c$, where $b, c \in \mathbb{N}$, and $b \le c$. Under this condition, the following theorem applies:

**Theorem 1.** Community detection based on hedonic games finds an equilibrium partition in $O cn^2$ where $\gamma = b/c$, and $b, c \in \mathbb{N}$.

The above theorem establishes an asymptotic upper bound on the convergence time. A natural lower bound is determined by the time required to read the graph: $\Omega(n^2)$ when using an adjacency matrix representation and $\Omega(n+m)$ when using an adjacency list.

Before examining the proof of Theorem 1, we briefly outline the basic insights involved. As pointed out above, the potential $\Phi$ satisfies $-n^2 \le \Phi \le n^2$. Additionally, the potential can be written as:

$$ \Phi = \frac{U}{c} \qquad (24) $$

where $U, c \in \mathbb{N}$. Consider a node $i$ that can gain from moving between communities. The key step in the proof is showing that such a move yields an instantaneous gain lower bound by $1/c$. This lower bound, together with the maximum and minimum values attained by $\Phi$, implies that the algorithm converges in at most $2cn^2$ steps. The worst-case scenario occurs if, at the first iteration of the algorithm, $U = -cn^2$ and at the last iteration, $U = cn^2$.

<footnote n="4">⁴The convergence properties of the dynamics for irrational values of $\gamma$ are not covered by this proof and remain an open question.</footnote>
Note that c is a natural number, that can be encoded with $log c$ bits. As computational complexity measures difficulty with respect to the length of the encoded input, the complexity of the considered algorithm is pseudo-polynomial, as the algorithm takes c steps for an input of length $log c$. Alternatively, if the input is represented in a non standard fashion, e.g., in unary base, the algorithmic complexity would be referred to as polynomial as opposed to pseudo-polynomial.

*Proof.* We consider, without loss of generality, a partition $\pi$ where a tagged node $i$ can gain from moving from community $\mathcal{B}$ to community $\mathcal{A}$. Our goal is to show that the instantaneous gain derived from such a move is at least $1/c$. This result, together with the fact that the potential is lower bounded by $-n^2$ and upper bounded by $n^2$, implies that the algorithm converges in at most $2cn^2$ steps.

Recall that $n_B$ is the number of nodes in the community $\mathcal{B}$ before the move (including $i$), while $n_A$ is the number of nodes in $\mathcal{A}$, also before the move (hence, not including $i$). Also, $d_i^B$ and $d_i^A$ are the degrees of $i$ in $\mathcal{B}$ and $\mathcal{A}$ before and after the move, and $\hat{d}_i^k$ is the number of nodes in community $C_k$ not connected to $i$, with $\hat{d}_i^A = n_A - d_i^A$ and $\hat{d}_i^B = n_B - d_i^B - 1$. Therefore, $n = d_i^A + \hat{d}_i^A + d_i^B + \hat{d}_i^B + 1 = n_A + n_B$.

It follows from (20) that $c\Delta\varphi_i^{BA} \in \mathbb{Z}$,

$$c\Delta\varphi_i^{BA} = c(d_i^A - d_i^B) - b(n_A - n_B + 1). \qquad (25)$$

Then,

$$\Delta\varphi_i^{BA} > 0 \Rightarrow c\Delta\varphi_i^{BA} > 0 \Rightarrow c\Delta\varphi_i^{BA} \ge 1 \Rightarrow \Delta\varphi_i^{BA} \ge \frac{1}{c}, \qquad (26)$$

where the first strict inequality follows from the condition for a move in Algorithm 1 (line 13), which requires a strictly positive gain in potential. The second implication follows from the fact that $c\Delta\varphi_i^{BA} \in \mathbb{Z}$ (see Eq. (25) and recall that we assume that $\gamma$ is rational). As communities $\mathcal{A}$ and $\mathcal{B}$ were chosen arbitrarily, the argument holds for any such pair of communities. Thus, the proof is complete. $\square$

### 3.1.2. Extremal Resolution Parameters

In this subsection we consider extremal values for the resolution parameter, $\gamma = 0$ or $\gamma = 1$. Before doing so, we begin by distinguishing between two cases: one wherein the resolution parameter is fixed a priori, and another where it is variable and given as input to the problem.

**Definition 4** (Fixed vs. Variable Resolution Parameter). We say that the resolution parameter $\gamma$ is:

* Fixed, if its value is externally given and does not form part of the input;

* Variable, if its value is provided as part of the input. In this case, we assume that $\gamma = b/c$, where $b, c \in \mathbb{N}$ and $b \le c$.

**Theorem 2** (Convergence for Extremal Resolution Parameters). Let $\gamma \in \{0, 1\}$ be the resolution parameter used in the hedonic game-based community detection algorithm. Then the algorithm converges to an equilibrium partition in at most $n^2$ steps, where $n$ is the number of nodes in the graph.

*Proof.* Case $\gamma = 0$. In this case, the node potential simplifies to

$$\varphi_i^0(C_k) = d_i^k,$$

which is an integer. Each improving move increases the global potential by at least 1, and since in this case the partition potential is bounded above by $n^2$ and below by 0, convergence occurs in at most $n^2$ steps.

**Case $\gamma = 1$.** The node potential becomes

$$\varphi_i^1(C_k) = -\hat{d}_i^k = d_i^k - (n_k - \delta(\sigma_i = k)),$$

which is also an integer. Again, each improving move strictly increases the global potential by at least 1. In this case, the partition potential is bounded below by $-n^2$ and above by 0, leading to convergence in at most $n^2$ steps. $\square$
More generally, for any fixed rational resolution parameter $\gamma = b/c$ with constant $c$, the algorithm still converges in $O(n^2)$ steps. In contrast, if $\gamma = b/c$ is provided as part of the input (i.e., variable $\gamma$), then $c$ may grow with input size, and convergence time becomes $O cn^2$), which is pseudo-polynomial with respect to $\log c$.

### 3.1.3. Best- vs. Better-Response Dynamics

In this section, we compare best-response and better-response dynamics. Here, a best-response dynamic means always selecting the node that maximizes its potential gain (line 6 of Algorithm 1) and then applying a node-level best response (line 8). At first glance, one might expect this globally greedy strategy to converge the fastest. However, our analysis shows that this is not always the case: there exist instances where the simpler better-response dynamic reaches equilibrium in fewer steps, demonstrating that the best-response approach is not necessarily the most efficient path to convergence.

**Theorem 3 (Comparison of Convergence: Best-Response Dynamics vs. Better-Response Dynamics).** In hedonic games with potential-based dynamics, the convergence time under better-response dynamics may be equal to, shorter than, or longer than the convergence time under best-response dynamics. Specifically:

(i) There exist instances where both better- and best-response dynamics converge in the same number of steps.

(ii) There exist instances where best-response dynamics converge faster than better-response dynamics.

(iii) There exist instances where better-response dynamics converge faster than best-response dynamics.

*Proof.* We demonstrate each case with a concrete example.

(i) **Same number of steps.** Consider a graph with two connected nodes and $\gamma = 0$. Let each node initially belong to its own community. Since the potential is given by the intra-community degree, only one node has an incentive to move, and doing so leads directly to the equilibrium. In this case, both better- and best-response dynamics perform the same single move and converge in one step.

(ii) **Best-response dynamics is faster.** Consider a complete graph on $n$ nodes (a clique), and let $\gamma = 0$. Initially, each node is in a singleton community. Under best-response dynamics, at each step we select a node that maximizes the increase in potential, joining the largest existing coalition. This causes the largest community to grow fastest, yielding convergence in $O(n)$ steps. However, under better-response dynamics, nodes may join suboptimal communities, leading to more fragmented growth and potentially $O(n \log n)$ convergence. This is because in each round, multiple small coalitions compete, and the number of rounds needed to merge them all increases logarithmically.

(iii) **Better-response dynamics is faster.** Figure 3 illustrates an instance where it is possible for better-response dynamics to converge faster than best-response dynamics, highlighting that a greedy approach is not always the most efficient path to equilibrium on a step-by-step basis.<fnref n="5" /> Table 3 presents four instances, each with a different resolution parameter $\gamma$, showing initial configurations where the number of iterations until convergence is strictly smaller under better-response dynamics. This phenomenon arises because best-response dynamics is greedy: it selects the move with the highest immediate utility gain, potentially ignoring promising paths that would require intermediate, less rewarding steps. In contrast, better-response dynamics allow for smaller, yet improving steps that can ultimately lead to faster convergence.

In Cases 1 and 2, corresponding to $\gamma = 0.1$ and $\gamma = 0.25$, both best- and better-response dynamics converge to the same equilibrium: the grand coalition $\{0, 1, 2, 3\}$. When $\gamma = 0.1$, the total utility gain from the initial partition to the grand coalition equals 2.5; when $\gamma = 0.25$, it equals 1.75. Under better-response dynamics, the gains are divided as $0.8 + 1.7$ and $0.5 + 1.25$, respectively. In general, these correspond to $1 - 2\gamma$ and $2(1 - \gamma) - \gamma = 2 - 3\gamma$, respectively. Under best-response dynamics, they are divided as $0.9 + 0.9 + 0.7$ and $0.75 + 0.75 + 0.25$, respectively. In general, these correspond to $1 - \gamma$, $1 - \gamma$ and $1 - 3\gamma$, respectively (see Figure 4). □

<footnote n="5">⁵Our analysis here focuses on demonstrating the existence of specific sample paths where a better-response dynamic converges in fewer steps than a globally greedy best-response one. A formal comparison of the average-case complexity of these dynamics is a non-trivial task that we leave as a subject for future work.</footnote>
<figure><img src="image_4.png" /><figcaption>Figure 3: Graph used in examples showing better-response dynamics may converge faster than best-response dynamics.</figcaption></figure>

<table><caption>Table 2: Equilibrium partitions and corresponding $\gamma$ ranges.</caption><thead><tr><th>Partition</th><th>γ Range</th></tr></thead><tbody><tr><td>{0, 1, 2, 3}</td><td>[0.0, 1/3]</td></tr><tr><td>{0, 1, 2}, {3}</td><td>[1/3, 1.0]</td></tr><tr><td>{0, 3}, {1, 2}</td><td>1.0</td></tr><tr><td>{0, 3}, {1}, {2}</td><td>1.0</td></tr><tr><td>{0, 1}, {2}, {3}</td><td>1.0</td></tr><tr><td>{0, 2}, {1}, {3}</td><td>1.0</td></tr><tr><td>{0}, {1, 2}, {3}</td><td>1.0</td></tr><tr><td>{0}, {1}, {2}, {3}</td><td>1.0</td></tr></tbody></table>

<table><caption>Table 3: Comparison of better- vs best-response dynamics paths for two values of $\gamma$.</caption><thead><tr><th>Case</th><th>γ</th><th>Strategy</th><th>Step</th><th>Move Description</th><th>Gain Details</th></tr></thead><tbody><tr><td rowspan="6">1</td><td rowspan="6">0.1</td><td rowspan="2">Better</td><td>1</td><td>2: {0,3}, {1}, {2} → {0,2,3}, {1}</td><td>Gain: 0.80 Link: 0 → 1 Non-link: 0 → 1</td></tr><tr><td>2</td><td>1: {0,2,3}, {1} → {0,1,2,3}</td><td>Gain: 1.70 Link: 0 → 2 Non-link: 0 → 1</td></tr><tr><td rowspan="3">Best</td><td>1</td><td>2: {0,3}, {1}, {2} → {0,3}, {1,2}</td><td>Gain: 0.90 Link: 0 → 1 Non-link: 0 → 0</td></tr><tr><td>2</td><td>0: {0,3}, {1,2} → {0,1,2}, {3}</td><td>Gain: 0.90 Link: 1 → 2 Non-link: 0 → 0</td></tr><tr><td>3</td><td>3: {0,1,2}, {3} → {0,1,2,3}</td><td>Gain: 0.70 Link: 0 → 1 Non-link: 0 → 2</td></tr><tr><td rowspan="6">2</td><td rowspan="6">0.25</td><td rowspan="2">Better</td><td>1</td><td>2: {0,3}, {1}, {2} → {0,2,3}, {1}</td><td>Gain: 0.50 Link: 0 → 1 Non-link: 0 → 1</td></tr><tr><td>2</td><td>1: {0,2,3}, {1} → {0,1,2,3}</td><td>Gain: 1.25 Link: 0 → 2 Non-link: 0 → 1</td></tr><tr><td rowspan="3">Best</td><td>1</td><td>2: {0,3}, {1}, {2} → {0,3}, {1,2}</td><td>Gain: 0.75 Link: 0 → 1 Non-link: 0 → 0</td></tr><tr><td>2</td><td>0: {0,3}, {1,2} → {0,1,2}, {3}</td><td>Gain: 0.75 Link: 1 → 2 Non-link: 0 → 0</td></tr><tr><td>3</td><td>3: {0,1,2}, {3} → {0,1,2,3}</td><td>Gain: 0.25 Link: 0 → 1 Non-link: 0 → 2</td></tr></tbody></table>

<figure><img src="image_5.png" /><figcaption>Figure 4: Transition graph for $0 < \gamma < 1/3$. Nodes represent partitions, and edges correspond to improving moves labeled with their utility gains. In both paths, the total potential gain is 3 – 5$\gamma$. Under better-response dynamics (solid blue), the algorithm selects a smaller initial gain, followed by a larger subsequent gain, leading to faster convergence. In contrast, best-response dynamics (dashed red) selects the move with the highest immediate gain, but this choice results in smaller subsequent gains and more steps before reaching the grand coalition equilibrium.</figcaption></figure>

These findings reinforce the central message of our theoretical analysis. As shown in Theorem 1, the convergence time of the better-response dynamics depends on the inverse of the resolution parameter's denominator (i.e., $\gamma = b/c \Rightarrow \text{time} \propto c$), which leads to pseudo-polynomial complexity when $\gamma$ is part of the input. In contrast, Theorem 2
shows that for extremal values of $\gamma$ (specifically $\gamma \in \{0, 1\}$), the convergence time is bounded by $O(n^2)$, independent of $\gamma$. It should be noted that a best-response dynamic is a specific instance of a better-response dynamic. Therefore, the worst-case pseudo-polynomial upper bound on convergence time established in Theorem 1 also applies to best-response dynamics. Whether a tighter, more specific upper bound can be proven for the subset of best-response dynamics, which are more restrictive, remains an interesting open problem for future work.

Theorem 3 adds another layer to this picture, by showing that the number of steps to equilibrium also depends on the dynamics chosen (better- vs. best-response dynamics), and that best-response dynamics is not always superior in practice. Furthermore, as shown in [6], better-response dynamics can be crucial for finding certain optimal partitions that are unreachable by strictly greedy best-response dynamics. These results suggest a nuanced view of convergence, where the structure of the graph, the resolution parameter, and the choice of dynamics all play a significant role. A natural direction for future work is to explore whether lookahead strategies or reinforcement learning can help agents select paths that balance short-term and long-term gains more effectively.

### 3.1.4. Summary

Theorem 1 establishes that Algorithm 1 converges to an equilibrium partition in pseudo-polynomial time. This result has both theoretical and practical implications. Theoretically, it guarantees convergence under *rational* resolution parameters, addressing a key concern in game-theoretic community detection. Practically, the algorithm's behavior is influenced by three *design choices*:

i) the selection of the resolution parameter $\gamma$, which governs the granularity of the detected communities;

ii) the initial partition of the graph; and

iii) the strategy for determining both the next candidate node to evaluate and the target community to which it may move when more than two communities are considered (lines 6 to 12 of Algorithm 1).

Our work focuses on the first two choices. For (i), Section 3.2 demonstrates that partitions satisfying equilibrium conditions across a wide range of $\gamma$ values exhibit higher correlation with ground truth. For (ii), Section 4.3 demonstrates that when the initial partition retains partial ground-truth information (such as in community tracking, where a once-accurate partition becomes outdated due to network evolution) the hedonic game can effectively use this prior knowledge to recover a partition much closer to the updated ground truth.

Design choice (iii) involves two interrelated aspects: node selection order, and target community determination during node movements. Crucially, our convergence proof remains valid for any node selection order, as the minimum potential gain per move (established in Theorem 1) is the same regardless of the node processing sequence. Regarding community targeting, the conventional greedy approach (always moving nodes to communities offering maximum potential gain) dominates current practice. However, strategic alternatives permitting temporary regressions (negative potential changes) could theoretically enable escape from local optima. This concept is central to metaheuristics like Simulated Annealing that use non-improving moves to escape local optima.

## 3.2. The Robustness of Community Structures

We consider the problem of evaluating an equilibrium by its robustness, which we analyze from two perspectives: the stability of individual nodes and the nature of their potential moves. Section 3.2.1 explores how the resolution parameter, $\gamma$, governs a node's decision-making, particularly for choices that involve a trade-off. In Section 3.2.2, we examine partitions that remain stable across a range of resolution values. Finally, Section 3.2.3 investigates fully-robust partitions, where every node is stable for all possible resolution values [39]. Section 3.2.4 then summarizes these findings to offer a unified perspective on partition stability.

### 3.2.1. The Familiarity Index as a Decision Threshold for Moves

The resolution parameter, $\gamma$, is crucial for resolving the trade-offs inherent in community detection. For a node facing a frustrated choice (a conflict between joining a community with more friends versus one with fewer strangers) $\gamma$ acts as the decisive factor. In this section, we formalize this relationship. We demonstrate that a node's decision to move is determined by comparing $\gamma$ to a critical threshold, which is precisely the **Familiarity Index**, $F_i$, introduced in Eq. (2).
<table><caption>Table 4: Analysis of a potential move from community $\mathcal{B}$ to community $\mathcal{A}$ based on the resolution threshold $\gamma^*$. For a frustrated choice, the move's incentive depends on the comparison between the global parameter $\gamma$ and the local threshold $\gamma^*$ (which is precisely the Familiarity Index).</caption><thead><tr><th>Subcase</th><th>Case 1: Δd + Δd > 0<br>(n<sub>A</sub> > n<sub>B</sub> - 1)</th><th>Case 2: Δd + Δd < 0<br>(n<sub>A</sub> < n<sub>B</sub> - 1)</th><th>Nature of the Choice</th></tr></thead><tbody><tr><td>(a) Δd ≥ 0, Δd ≤ 0</td><td>γ* ≥ 1</td><td>γ* ≤ 0</td><td>The move to <i>A</i> is unambiguously preferred, regardless of γ.</td></tr><tr><td>(b) Δd ≤ 0, Δd ≥ 0</td><td>γ* ≤ 0</td><td>γ* ≥ 1</td><td>The move to <i>A</i> is unambiguously unpreferred, regardless of γ.</td></tr><tr><td>(c) Δd ≥ 0, Δd ≥ 0</td><td>0 < γ* < 1</td><td>N/A</td><td>This is a frustrated choice. The move yields gain if γ < γ*.</td></tr><tr><td>(d) Δd ≤ 0, Δd ≤ 0</td><td>N/A</td><td>0 < γ* < 1</td><td>This is a frustrated choice. The move yields gain if γ > γ*.</td></tr></tbody></table>

For a node $i$ currently in community $\mathcal{B}$, a move to a different community $\mathcal{A}$ is beneficial only if it increases its potential. The node is therefore stable if, for all alternative communities $\mathcal{A} \neq \mathcal{B}$, the following condition holds:

$$ \varphi_i^{\gamma}(\mathcal{B}) \geq \varphi_i^{\gamma}(\mathcal{A} \cup \{i\}), \quad \forall \mathcal{A} \neq \mathcal{B}. \qquad (27) $$

By substituting the definition of node potential from Eq. (12) and rearranging the terms, we can express the stability condition as:

$$ (1 - \gamma)d_i^{\mathcal{B}} - \gamma(n_{\mathcal{B}} - d_i^{\mathcal{B}} - 1) \geq (1 - \gamma)d_i^{\mathcal{A}} - \gamma(n_{\mathcal{A}} - d_i^{\mathcal{A}}) \Rightarrow d_i^{\mathcal{A}} - d_i^{\mathcal{B}} \leq \gamma(n_{\mathcal{A}} - n_{\mathcal{B}} + 1). \qquad (28) $$

Let the difference in neighbors, non-neighbors, and number of nodes in the communities be given by

$$ \Delta d = d_i^{\mathcal{A}} - d_i^{\mathcal{B}}, \quad \Delta \hat{d} = n_{\mathcal{A}} - d_i^{\mathcal{A}} - (n_{\mathcal{B}} - d_i^{\mathcal{B}} - 1), \quad \Delta n = n_{\mathcal{A}} - n_{\mathcal{B}} + 1. \qquad (29) $$

As shown in the introduction, this total change in community composition can be decomposed into the change in friends and the change in strangers, $\Delta n = \Delta d + \Delta \hat{d}$. The stability condition thus becomes:

$$ \Delta d \leq \gamma(\Delta d + \Delta \hat{d}) \Rightarrow \frac{\Delta d}{\Delta \hat{d} + \Delta d} \leq \gamma. \qquad (30) $$

Let $\gamma^*$ be the critical resolution value for which the potential gain corresponding to a move of node $i$ from $\mathcal{B}$ to $\mathcal{A}$ is zero. This threshold is given by:

$$ \gamma^* = \frac{d_i^{\mathcal{A}} - d_i^{\mathcal{B}}}{n_{\mathcal{A}} - n_{\mathcal{B}} + 1} = \frac{d_i^{\mathcal{A}} - d_i^{\mathcal{B}}}{d_i^{\mathcal{A}} - d_i^{\mathcal{B}} + n_{\mathcal{A}} - d_i^{\mathcal{A}} - (n_{\mathcal{B}} - d_i^{\mathcal{B}} - 1)} = \frac{\Delta d}{\Delta d + \Delta \hat{d}} = \frac{\Delta d}{\Delta n}. \qquad (31) $$

Comparing this result with Eq. (2), we see that this critical threshold is identical to the Familiarity Index for the potential move: $\gamma^* = F_i(\mathcal{B}, \mathcal{A})$. To simplify presentation, we assume that $\Delta \hat{d} + \Delta d \neq 0$, and that either $\Delta \hat{d} \neq 0$ or $\Delta d \neq 0$. In addition, we assume $\gamma \neq \gamma^*$.

Consequently, the stability of a node hinges on a direct comparison between the global resolution parameter $\gamma$ and the locally computed Familiarity Index $\gamma^*$. The outcome depends on the nature of the move, specifically whether the destination community is larger or smaller in size ($\Delta n > 0$ or $\Delta n < 0$):

* **Case 1: Moving to a larger effective community ($\Delta n > 0$).** A move is beneficial if $\gamma < \gamma^*$. Here, a low $\gamma$ prioritizes friend-maximization. The node remains stable if $\gamma \geq \gamma^*$, where the penalty for gaining strangers outweighs the benefit of new friends.

* **Case 2: Moving to a smaller effective community ($\Delta n < 0$).** The inequality flips, and a move becomes beneficial if $\gamma > \gamma^*$. Here, a high $\gamma$ rewards the reduction in strangers, making the move attractive. The node remains stable if $\gamma \leq \gamma^*$.

Table 4 provides a comprehensive summary of these conditions. The non-frustrated subcases (a) and (b) correspond to unambiguous choices where the outcome is independent of $\gamma \in [0, 1]$, as the Familiarity Index $\gamma^*$ falls outside the (0, 1) range. The frustrated subcases (c) and (d) are where $\gamma^* \in (0, 1)$, and the node's stability becomes critically dependent on the choice of $\gamma$. This analysis provides a clear bridge between the micro-level incentives of individual nodes and the macro-level behavior of the CPM, grounding it in the interpretable trade-off captured by the Familiarity Index.
<figure><img src="image_6.png" /><figcaption>Figure 5: Robustness of hedonic equilibria.</figcaption></figure>

### 3.2.2. [$\gamma_0, \gamma_1$]-Robust Equilibrium

What is the impact of $\gamma$ on an equilibrium? There are partitions that correspond to an equilibrium for a given value of $\gamma$ and that remain an equilibrium after $\gamma$ varies within a range of values. We refer to an equilibrium as [$\gamma_0, \gamma_1$]-robust if it remains an equilibrium $\forall \gamma \in [\gamma_0, \gamma_1]$. We denote by $\pi^{[\gamma_0, \gamma_1]}$ a partition that is an equilibrium for $\gamma \in [\gamma_0, \gamma_1]$. We hypothesize that if an equilibrium is robust over a broader range, it is more likely to accurately capture the ground truth.

Next, we illustrate through two examples the intuitive idea that if an equilibrium is robust over a broader range of values, it is more likely to accurately capture the ground truth. Figure 5(a) shows a 6-node network comprising two cliques of 3 nodes connected through a single edge. Communities $\mathcal{A}$ and $\mathcal{B}$ correspond to nodes {1, 2, 3} and {4, 5, 6}, respectively. If $\gamma = 0$, the hedonic value of each node equals 2, which is the number of neighbors of each node in its community. If one of the nodes 1, 3, 4 or 6 deviates to the other community, its hedonic value decreases to 0. If nodes 2 or 5 deviate, their hedonic value decreases to 1. For $\gamma = 0$, the configuration wherein all nodes are in the same community (grand coalition) is also an equilibrium (Fig. 5(b)). However, the latter equilibrium is less robust than the former, as the grand coalition holds as an equilibrium for $\gamma \in [0, 0.4]$ whereas the two-community symmetric equilibrium holds for $\gamma \in [0, 1]$. It is important to note that these partitions are *equilibria*, i.e., no single node has an incentive to unilaterally move, but are not necessarily the global optima of the partition potential function for the entire range of $\gamma$.

In another example (Figures 5(c)-(e)), the equilibrium that minimizes the number of edges across communities, different from the grand coalition, is the most robust (Fig. 5(c)). It holds for $\gamma \in [0, 1]$, whereas the other equilibria hold for a strict subset of values of $\gamma$, as indicated in Figure 5. In particular, the grand coalition holds for $\gamma \in [0, 1/7]$ (Fig. 5(d)).

The following theorem indicates that to show a given equilibrium holds for a range of values of $\gamma$, it suffices to consider the two extremes of the range.

**Theorem 4.** Given a $\gamma$-equilibrium partition $\pi^\gamma$ that holds as equilibrium for $\gamma = \gamma_0$ and for $\gamma = \gamma_1$, with $\gamma_1 > \gamma_0$, then $\pi^\gamma$ is an [$\gamma_0, \gamma_1$]-robust equilibrium, denoted as $\pi^{[\gamma_0, \gamma_1]}$.

*Proof.* We consider a given node $i$ of interest, part of community $\mathcal{B}$. Then, we consider a tagged community $\mathcal{A}$, with $\mathcal{A} \neq \mathcal{B}$. We show that node $i$ has no incentive to change from $\mathcal{B}$ to $\mathcal{A}$, for any $\gamma \in [\gamma_0, \gamma_1]$, as long as it has no incentive to change for $\gamma = \gamma_0$ and $\gamma = \gamma_1$. Using the same terminology as in Theorem 1 and leveraging (20), $\Delta\varphi_i^{\mathcal{B},\mathcal{A}}(\gamma)$ is a linear function of $\gamma$, so $\Delta\varphi_i^{\mathcal{B},\mathcal{A}}(\gamma_0) \le 0$ and $\Delta\varphi_i^{\mathcal{B},\mathcal{A}}(\gamma_1) \le 0$ imply $\Delta\varphi_i^{\mathcal{B},\mathcal{A}}(\gamma^*) \le 0$ for $\gamma^* \in [\gamma_0, \gamma_1]$. This holds for any node in community $\mathcal{B}$. By symmetry, the same arguments apply for nodes in community $\mathcal{A}$. As communities $\mathcal{A}$ and $\mathcal{B}$ were chosen arbitrarily, the argument holds for any such pair of communities. Thus, the proof is complete. $\square$

### 3.2.3. Fully-Robust Partitions

Recall that a partition $\pi^{[0,1]}$ is a partition that holds as an equilibrium for all $\gamma$, where $\gamma \in [0, 1]$. We denote such partition as a fully-robust partition. Next, we further discuss the characterization of fully-robust partitions, and provide a simple criterion to find balanced fully-robust partitions.
<figure><img src="image_7.png" /><figcaption>Figure 6: From a macro view of two large coalitions to a more granular micro-level segmentation, each figure shows a fully-robust partition according to Definition 5: (a) original (unlabeled) network; (b) two-communities; (c) third communities emerges; (d) micro-level communities. Note that these partitions are considered fully-robust only under the constraint that nodes cannot unilaterally isolate themselves. If a node could form a new community, it would prefer to become a singleton to eliminate all “strangers,” which is the optimal state when the resolution $\gamma = 1$. This restriction on isolation is what allows non-clique-based communities to be stable across all $\gamma \in [0, 1]$ (see Assumption 1).</figcaption></figure>

**Characterization.** Recall from Eq. (1) that a node $i$ is robust if its current community, $\sigma_i$, is the optimal choice compared to all other communities, meaning it simultaneously maximizes the number of neighbors ($d_i^{\sigma_i}$) and minimizes the number of non-neighbors ($\hat{d}_i^{\sigma_i}$). The indicator function $R(i, \pi)$ captures this condition, evaluating to 1 if the node is robust and 0 otherwise.

**Definition 5 (Fully-robust partition).** A partition is fully-robust if $R(i, \pi) = 1$ for every node $i$.

The equivalence between this definition and [0, 1]-robustness follows directly from Theorem 4 and the linearity of potential functions. Indeed, if a partition is robust for $\gamma = 0$, it means that $d_i^{\sigma_i} \ge d_i^{C_k}$ for all $k$, for all nodes. Similarly, if a partition is robust for $\gamma = 1$, it means that $\hat{d}_i^{\sigma_i} \le \hat{d}_i^{C_k}$, for all $k$, for all nodes. Therefore, a partition is [0, 1]-robust if and only if it is fully-robust according to the above definition.

**Relation to Frustrated Potts Model.** The frustrated Potts model encompasses a value function given by Eq. (3). Frustration refers to the competition between ferromagnetic ($A_{ij} = 1$, and $1 - \gamma > 0$) and antiferromagnetic ($A_{ij} = 0$, and $-\gamma < 0$) interactions in a heterogeneous system. In statistical physics, some systems with competing interactions cannot achieve a configuration that satisfies all local constraints simultaneously. Similarly, in the model considered in this work, a node faces a frustrated choice if a potential move requires trading off the number of neighbors against the number of non-neighbors. A non-robust node might face either frustrated or unambiguous choices when considering a move. If all available moves that offer any improvement are frustrated, the node must make a trade-off. Table 4 summarizes, in subcases (c) and (d), the conditions corresponding to frustrated choices. A non-robust node can exist in an equilibrium if all its potential (frustrated) moves are disincentivized by the current value of $\gamma$.

**Illustrative Examples.** Figure 5 illustrates two examples of fully-robust partitions that better capture communities than alternative equilibria. The concept of a fully robust partition is flexible, as its stability is determined by the set of available communities a node can move to. Figure 6 illustrates this by showing multiple partitions that can be considered fully robust, depending on the constraints imposed on community formation. The most critical constraint is whether a node is permitted to isolate itself into a new, singleton community, irrespective of the current partition state.

**Node Isolation.** If node isolation is allowed, any node in a community with at least one non-neighbor (a “stranger”) will prefer to form its own community when the resolution parameter $\gamma = 1$, since an isolated node has zero strangers. In such an unconstrained scenario, only partitions where every community is a clique could be fully robust. However, by limiting the available choices, for example, by setting a maximum number of communities, $K$, the notion of full robustness becomes more applicable (see Assumption 1). This constraint is what allows non-trivial partitions, like the macro-level divisions in Figure 6(b), to be stable. A node in this partition is fully robust because, given the fixed set of communities, it has no better option. Even the grand coalition (Figure 6(a)) can be trivially considered fully robust if $K = 1$, as no alternative communities exist. Therefore, full robustness is not an absolute property but rather a state of equilibrium relative to a defined set of possible partitions.
**Criterion to Find Fully-Robust Partitions.** Next, we provide a simple criterion to find fully-robust partitions.

**Theorem 5.** An equilibrium partition $\pi^\gamma$, which 1) holds for $\gamma = 0$, and 2) such that all communities have the same number of nodes, is an equilibrium for any $\gamma \in [0, 1]$.

The imbalance of a partition is the difference between the sizes of its largest and smallest communities. In a balanced partition, communities have the same size. The proof of the above theorem involves showing that balanced equilibria for $\gamma = 0$, e.g., Figs. 5(a) and 5(c), are also equilibria for $\gamma = 1$. Then, the result follows from Theorem 4.

*Proof.* We consider a given tagged node $i$, part of community $\mathcal{B}$ in the equilibrium partition $\pi^\gamma$, for $\gamma = 0$. Using the same terminology as in Theorem 4 and leveraging Eq. (20), the proof proceeds as follows.

We consider a tagged community $\mathcal{A}$, with $\mathcal{A} \neq \mathcal{B}$. We show that node $i$ has no incentive to change from $\mathcal{B}$ to $\mathcal{A}$, for $\gamma = 1$. Let $\varphi_i^\gamma$ and $\tilde{\varphi}_i^\gamma$ be the hedonic potential value of the tagged node before and after a simulated change from community $\mathcal{B}$ to $\mathcal{A}$. It follows from Eqs. (10) and (20) that

* for $\gamma = 0$, $\pi^\gamma$ is an equilibrium if and only if $\varphi_i^0 \ge \tilde{\varphi}_i^0$, i.e., $d_i^\mathcal{B} \ge d_i^\mathcal{A}$

* for $\gamma = 1$, $\pi^\gamma$ is an equilibrium if and only if $\varphi_i^1 \ge \tilde{\varphi}_i^1$, i.e., $\hat{d}_i^\mathcal{B} \le \hat{d}_i^\mathcal{A}$

When assuming communities of the same size, $n_{\mathcal{A}} = n_{\mathcal{B}} = n/K$, if the first condition $d_i^\mathcal{B} \ge d_i^\mathcal{A}$ for $\gamma = 0$ holds true, then the second condition $\hat{d}_i^\mathcal{B} \le \hat{d}_i^\mathcal{A}$ for $\gamma = 1$ will also hold because $\hat{d}_i^\mathcal{B} = n_{\mathcal{B}} - (d_i^\mathcal{B} + 1)$ and $\hat{d}_i^\mathcal{A} = n_{\mathcal{A}} - d_i^\mathcal{A}$. Therefore, if two communities have the same number of nodes and are part of an equilibrium for $\gamma = 0$, they are also part of an equilibrium for $\gamma = 1$.

As communities $\mathcal{A}$ and $\mathcal{B}$ were chosen arbitrarily, the argument holds for any such pair of communities. Thus, the proof is complete. □

**Theorem 5** highlights an asymmetry in the impact of the resolution parameter: equilibrium conditions for $\gamma = 0$ can imply robustness across the entire parameter range, whereas analyzing the robustness of a partition known to be an equilibrium for $\gamma = 1$ appears more intricate. As illustrated in Figure 5(e), the analysis of $\gamma = 1$ must account for singleton communities and dangling nodes—such as node 7 in Figure 5(e)—which, despite being connected in the original graph, have a degree of zero within their assigned communities. A deeper investigation into this matter is left for future work.

### 3.2.4. Summary

In this section, we have analyzed the robustness of community structures by examining their stability across different values of the resolution parameter, $\gamma$. Our analysis bridges the gap between the micro-level incentives of individual nodes and the macro-level stability of the entire partition.

First, we formalized the decision-making process for individual nodes. In Section 3.2.1, we demonstrated that for any potential move, there exists a critical resolution threshold, $\gamma^*$, which is equivalent to the *Familiarity Index* (Eq. (2)). A node is robust if its preference for its current community is unambiguous and optimal, meaning it is stable for any value of $\gamma$. If a non-robust node can only improve its utility by making a trade-off, that potential move is a frustrated choice, and the decision hinges on whether the global $\gamma$ is above or below the local threshold $\gamma^*$.

Next, we extended this concept from individual nodes to entire partitions. In Section 3.2.2, we introduced the idea of a $[\gamma_0, \gamma_1]$-robust equilibrium—a partition that remains stable for all $\gamma$ within a given interval. Theorem 4 provides a powerful simplification, proving that to verify robustness across an interval, one only needs to check for stability at its endpoints, $\gamma_0$ and $\gamma_1$. This result stems from the linear relationship between a node's potential gain and the resolution parameter.

Finally, in Section 3.2.3, we examined the strongest form of stability: fully-robust partitions, which are equilibria for all $\gamma \in [0, 1]$. We established that such partitions are precisely those in which every node is robust in the strictest sense—simultaneously maximizing its internal neighbors and minimizing its internal non-neighbors. This condition connects our game-theoretic framework to the physical concept of an unfrustrated system. To aid in the identification of these highly stable structures, Theorem 5 offers a practical criterion: any balanced partition (i.e., one with equal-sized communities) that is an equilibrium for $\gamma = 0$ is guaranteed to be fully-robust.
# 4. Empirical Analysis

This section presents our empirical analysis. In Section 4.1, we describe the experimental setup, including the synthetic networks, evaluation metrics, and community detection methods used. In Section 4.2, we analyze the inherent robustness of ground-truth partitions. Finally, in Section 4.3, we evaluate the performance of different algorithms in a community tracking scenario.

## 4.1. Experimental Setup

Our experimental design is detailed in this section. Section 4.1.1 explains how we generate synthetic networks with known ground truth. Section 4.1.2 defines the metrics used for evaluation and Section 4.1.3 outlines the community detection algorithms considered in our community tracking experiment.

### 4.1.1. Setup

**Probabilistic model.** We consider a special instance of the Stochastic Block Model (SBM) [40], namely the Planted Partition Model (PPM) [18], where nodes within the same community connect with probability *p* and those in different communities with probability *q* (with *p* > *q* in the assortative case). Motivated by Theorem 5, we further focus on equal-sized communities, which correspond to the Symmetric Assortative PPM (SAPPPM). SAPPPM produces graphs with *K* equal-size communities of *N* nodes each, leaving us with four parameters, (*K*, *N*, *p*, *q*).

**Difficulty parameter.** To quantify the challenge of community detection, we define the difficulty parameter $\lambda$ as $\lambda = q/p$. This parameter captures the relative strength of inter-community connections: higher values of $\lambda$ indicate greater difficulty in distinguishing communities. In the extreme case where $p = q$, community structure becomes indistinguishable, making detection impossible [18].

**Parameters.** Except otherwise noted, we let *p* vary from 0.01 to 0.10 in increments of 0.01, and let $\lambda \in \{0.1, 0.2, 0.3, 0.4, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75\}$. In addition, we account for two up to six communities, $2 \le K \le 6$. We empirically observed that those values are adequate to highlight our key insights.

**Samples for confidence intervals.** We generated multiple network samples for each parameter set to ensure statistical significance.<fnref n="6" /> In particular, for each pair of parameters (*p*, $\lambda$) we generated 100 network samples. This sufficed for the purpose of producing 95% confidence intervals of length less than 0.01.

### 4.1.2. Evaluation Metrics

We assess performance across three dimensions: (i) **Efficiency**: Measured as execution time in seconds. (ii) **Robustness**: Defined per Eq. (1) as the fraction of robust nodes. As discussed in Section 3.2, robustness can be equivalently interpreted as the fraction of nodes that satisfy strict max-min criteria or as the fraction of nodes that are stable across all $\gamma \in [0, 1]$. (iii) **Accuracy**: Characterizes the agreement between the partitions produced by the different algorithms and the ground truth. Given a partition $\pi$, we compare it against the ground-truth partition $\pi^*$ using the Adjusted Rand Index (ARI) [10]. The ARI measures the similarity between two partitions, correcting for the agreement that would be expected by chance. It ranges from 1 to -1. A score of 1 indicates perfect agreement, while a score near 0 suggests that the similarity is no better than random. Negative scores indicate less agreement than expected by chance.<fnref n="7" />

Let $n_k$ be the number of nodes in community $C_k$ under partition $\pi$ and let $n_l^*$ be the number of nodes in community $C_l^*$ under the reference partition $\pi^*$. Let $K$ and $K^*$ be the number of communities in $\pi$ and $\pi^*$, respectively.

<footnote n="6">⁶Synthetic networks were generated using the Stochastic Block Model (SBM) function from the NetworkX library, chosen specifically for its *seed* parameter which guarantees the reproducibility of our experiments. All generated graphs were immediately converted to igraph objects for analysis, maintaining consistency with the rest of our methodology. https://networkx.org/documentation/stable/reference/genera-ted/networkx.generators.community.stochastic_block_model.</footnote>

<footnote n="7">⁷We calculated the Adjusted Rand Index using the igraph compare_communities function setting the parameter method='adjustedRand'. https://python.igraph.org/en/stable/api/index.html#compare_communities.</footnote>
The expected number of node pairs that would be placed in the same community in both partitions $\pi$ and $\pi^*$ if the assignments were random, but preserving the number and sizes of communities in each partition, is given by:

$$ \mathbb{E}(G, \pi, \pi^*) = \left( \sum_{k=1}^{K} \binom{n_k}{2} \sum_{\ell=1}^{K^*} \binom{n_{\ell}^*}{2} \right) / \binom{n}{2} $$

The above quantity serves as a baseline for chance agreement. The ARI metric is given by:

$$ \mathbb{A}(G, \pi, \pi^*) = \left( \sum_{k=1}^{K} \sum_{\ell=1}^{K^*} \binom{n_{kl}}{2} - \mathbb{E}(G, \pi, \pi^*) \right) / \left( \frac{1}{2} \left( \sum_{k=1}^{K} \binom{n_k}{2} + \sum_{\ell=1}^{K^*} \binom{n_{\ell}^*}{2} \right) - \mathbb{E}(G, \pi, \pi^*) \right) \quad (32) $$

where $n_{kl} = |C_k \cap C_{\ell}^*|$. This metric compares the number of node pairs co-clustered in both partitions against the number expected by random chance.

For each of the above three metrics, we report an average over multiple runs per $(p, \lambda)$ pair.

### 4.1.3. Community Detection Methods

We compare five community detection methods (for details see Appendix C):

* **Leiden (Full-Fledged):** the standard Leiden algorithm [6] (see Appendix C.3) optimizing CPM [4].<fnref n="8" /> We disable isolated singletons so that we never exceed K communities (see Assumption 1). The resolution parameter $\gamma$ is set to the edge density [7].

* **Leiden (Phase 1):** we apply only the local-move phase of Leiden, indicating that it suffices for community tracking, specially for small values of $\eta$. As shown in Section 3.1.1, such method finds a hedonic equilibrium in pseudo-polynomial time.<fnref n="9" />

* **Spectral Clustering:** a classic eigenvector-based approach (see Appendix C.1). It does not accept any initial partition, so its outcome is invariant to $\eta$.

* **One Pass:** a simple baseline. Each node that can move to a community with strictly more neighbors does so in a single iteration. Implemented in Python, it can still exploit a priori information about an initial partition, though it does not refine beyond one pass.

* **Mirror:** also referred to as zero-order hold (ZOH) in the realm of signal processing and control theory, this approach returns the input partition unchanged (see Appendix C.4). If $\eta$ is small, “doing nothing” can outperform more complex moves. If $\eta$ is large, Mirror yields a poor partition.

## 4.2. Reverse Engineering the Robustness of Ground Truth Partitions

Our goal in this section is to determine whether the robustness of a partition correlates with its similarity to a ground truth reference partition. To this aim, we employ a reverse-engineering approach: we begin with known ground-truth partitions and calculate their robustness using the methodology in Section 4.1. The robustness of the ground truth is visualized using a heatmap (Figure 7), with $p$ and $\lambda$ as its two dimensions. Each cell pair $(p, \lambda)$ represents networks generated with SAPPM using these parameters. The darkness of a cell is proportional to its robustness, as given by Eq. (1). This analysis reveals several key insights, which are discussed in the sequel.

<footnote n="8">⁸From an implementation standpoint, this involved a minor bug fix to the reference implementation of the Leiden algorithm. https://github.com/igraph/igraph/pull/2799.</footnote>

<footnote n="9">⁹The C implementation of our extension and its corresponding Python interface can be found at https://github.com/lucaslopes/igraph/tree/physica-a and https://github.com/lucaslopes/python-igraph/tree/physica-a.</footnote>
<figure><img src="image_8.png" /><figcaption>Figure 7: The top row displays histograms illustrating the distribution of the fraction of robust nodes across various parameter settings. The bottom row presents heatmaps, with each cell showing the average fraction of robust nodes for a given connection probability ($p$) and difficulty factor ($\lambda$). This figure demonstrates how the robustness (defined in Eq. (1)) of the ground-truth partition changes with the difficulty factor. Each heatmap corresponds to a different number of communities ($K \in \{2, 3, 4, 5, 6\}$), keeping $n = 1020$ fixed and $N = 1020/K$. Darker colors indicate a higher fraction of fully-robust nodes.</figcaption></figure>

### 4.2.1. Robustness Decreases as $K$ Grows

As the number of communities ($K$) increases, the robustness of the ground truth partition tends to decrease. This is expected since the chance that the community of a given node is the community where this node has the highest number of neighbors and fewest non-neighbors diminishes as $K$ increases. To illustrate that point, consider two extreme cases. When $K = 1$ we have one single feasible solution to the problem, the grand coalition, which in this case is always fully robust, as nodes have no alternative communities to transition to. When $K = n$, we have multiple feasible solutions, including a set of singletons. The latter, however, is never fully robust for connected graphs, as under the criterion of maximizing neighbors, nodes can benefit by transitioning to a community with additional nodes.

### 4.2.2. Effect of Parameters $p$ and $\lambda$

The robustness is higher for lower values of $\lambda$ and higher values of $p$. Indeed, we observe a gradual decline of robustness as $\lambda$ grows. For $K = 2$, the robustness remains high for a large range of $p$ and $\lambda$. As $K$ increases, the robustness heatmap starts to show a gradual decline where higher values of $\lambda$ and lower values of $p$ result in lower robustness. This occurs because lower intra-community connection probabilities ($p$) and higher inter-community connection probabilities ($q = p\lambda$) make communities less distinct and harder to detect.

### 4.2.3. Robust Partitions and Ground Truth

Although not all the ground truth partitions correspond to an equilibrium (see Definition 3), we observe that a significant fraction of those partitions does correspond to fully robust equilibria. These are the cells marked with dark blue in Figure 7, with robustness equal one. In those cases, nodes have no incentive to transition across communities for any value of $\gamma$ (case 1(b) in Table 4). For the cases where a fraction of nodes has incentive to deviate, such incentive holds for any $\gamma$ (case 1(a) in Table 4, noting that $\gamma^* = \Delta d \ge 1$ as the denominator in Eq. (31) is one when $n_A = n_B$).

### 4.2.4. Summary

In this section we evaluated the robustness of ground-truth partitions. Our results provide evidence that the ground truth partition in synthetic networks generated by SAPPM tends to be highly robust, motivating further studies on the use of the proposed robustness criterion for partition selection purposes. In the following section, we further compare the considered hedonic game approach against state-of-the-art methods.

## 4.3. Performance Evaluation in a Community Tracking Scenario

Having analyzed the inherent robustness of ideal, ground-truth partitions in Section 4.2, we now shift our focus to evaluating the performance of the partitions produced by practical algorithms. To do this, we use a community
<figure><img src="image_9.png" /><figcaption>Figure 8: **Effect of noise on efficiency, robustness, and accuracy.** Each barplot shows results for five noise levels (x-axis) and five methods (color-coded). *Left:* Efficiency (runtime in seconds; lower is better). *Center:* Robustness (fraction of nodes satisfying strict max-min criteria). *Right:* Accuracy (Adjusted Rand index [10] comparing final partition to the ground truth). The Mirror and *One Pass* methods degrade significantly at higher noise, while both Leiden variants remain robust and accurate. Spectral clustering is insensitive to noise but achieves lower robustness.</figcaption></figure>

tracking scenario, a common task in the analysis of dynamic networks [41, 42]. In this setup, an existing, once-accurate partition has become outdated due to network evolution. The goal is to efficiently refine this “stale” partition to match the network’s current state. By systematically introducing noise into a known ground-truth partition, we can simulate this staleness and create a controlled benchmark to assess how different algorithms perform in terms of efficiency, the robustness of the partitions they find, and their accuracy in recovering the true community structure.<fnref n="10" />

We use the network generator from Section 4.1.1 to create synthetic networks with known ground-truth partitions. To simulate outdated information, we perturb the ground-truth partition, $\pi^*$, by applying a noise parameter $\eta \in \{0.1, 0.25, 0.5, 0.75, 1.0\}$. This process randomly permutes a fraction $\eta$ of nodes across communities while keeping community sizes the same. When $\eta = 0$, the initial partition is identical to the ground truth. When $\eta = 1$, the partition is completely shuffled, meaning only the number of communities, *K*, is retained as prior information.

We analyze the impact of noise (Section 4.3.1) and the number of communities (Section 4.3.2) on these three metrics. We then examine the interplay between these dimensions (Section 4.3.3) and conclude with a summary of our findings (Section 4.3.4).

### 4.3.1. *Impact of Noise on Efficiency, Robustness, and Accuracy*

Figure 8 shows how each method behaves as a function of the noise, $\eta$.

**Efficiency.** The *Mirror* baseline is trivially fastest, performing no updates. Next is *Leiden (Phase 1)*, which converges in negligible time even as $\eta$ grows, in agreement with pseudo-polynomial convergence (Theorem 1). In contrast, *Leiden (Full-Fledged)* runs longer, especially for larger $\eta$, because its refinement and aggregation phases must correct more errors. Additionally, *Leiden (Phase 1)* is inherently distributed, making it well-suited for implementation in decentralized systems, whereas Phases 2 and 3 of *Leiden (Full-Fledged)* may pose challenges for distributed implementation. *Spectral Clustering* is the slowest overall, as it ignores the initial partition and computes a leading eigenvector with $O(n^3)$ complexity.

As the name suggests, the *One Pass* method processes each of the *n* nodes once. For this reason, its running time corresponds to the first *n* iterations of Leiden (Phase 1). Clearly, *One Pass* is asymptotically faster than Leiden (Phase 1), and its slow convergence speed in Figure 8 serves to appreciate how the optimized implementation of Leiden (in C) outperforms the non-optimized implementation of *One Pass* (in Python).

**Robustness.** As $\eta$ grows, the *Mirror* and *One Pass* partitions become less robust: a random or partially incorrect initial partition has many nodes that could improve by switching communities. *Spectral Clustering* yields consistently low robustness because it does not incorporate prior knowledge and does not account for a robustness-related objective function. By contrast, *Leiden (Phase 1)* and *Leiden (Full-Fledged)* maintain robustness above 0.6 even at $\eta = 1$, as the CPM objective function intrinsically captures the goal of maximizing a robustness-related metric.

<footnote n="10">¹⁰All experiments were conducted on an Intel® Xeon® E5-2670 processor. Code and implementation details at https://github.com/lucaslopes/hedonic-game.</footnote>
<figure><img src="image_10.png" /><figcaption>Figure 9: **Effect of the number of communities.** Top row: average results over all noise levels. Bottom row: results restricted to η = 1. Left column: Efficiency. Center: Robustness. Right: Accuracy. Methods exploiting the initial partition (Leiden, One Pass, Mirror) benefit when η < 1; under fully scrambled conditions (η = 1), methods that can systematically reassign nodes (Leiden, Spectral) prevail for higher K.</figcaption></figure>

**Accuracy.** When η < 0.5, *Mirror* and *One Pass* often outperform more complex methods, simply by leaving a nearly correct partition intact or making a single pass of improvements. However, for η ≥ 0.5 these naive methods degrade rapidly, being outperformed by *Leiden (Phase 1)* and *Leiden (Full-Fledged)*. *Spectral* also becomes more competitive at higher noise, but it lags behind *Leiden* in overall accuracy, indicating that leveraging partial ground-truth information is advantageous.

4.3.2. *Impact of the Number of Communities*

Figure 9 examines how performance scales with the number of communities *K*. The top row shows averages over all η, while the bottom row reports results for η = 1.

**Efficiency.** The convergence time of *Spectral Clustering* and *Leiden (Full-Fledged)* both grow roughly linearly as *K* increases, reflecting the more complex search space. By contrast, *Leiden (Phase 1)* remains almost flat in runtime, converging quickly regardless of *K*. The *One Pass* approach shows a slight decrease in runtime with larger *K*, presumably because it moves fewer nodes in a single iteration.

**Robustness.** All methods lose some robustness as *K* grows, since finer partitions can create more potential gains from rearranging nodes. *Leiden (Phase 1)* retains the highest robustness, slightly above *Leiden (Full-Fledged)*, whereas *Spectral* and *One Pass* degrade steeply. Notably, *Mirror* shows intermediate robustness, representing the shuffled input. When *η* = 1, *One Pass* and *Mirror* can reach near-zero robustness at *K* = 6.

**Accuracy.** *Spectral* is most accurate at *K* = 2 (often exceeding 0.6 for the ARI accuracy) but it accuracy drops for *K* > 2. It is known that the accuracy of *Spectral Clustering* decreases as the number of clusters increases [43]. The accuracy of *Leiden (Phase 1)* and *Leiden (Full-Fledged)* also drops as *K* grows, but such drop is more significant for higher values of *K*. In particular, *Leiden (Phase 1)* and *Leiden (Full-Fledged)* outperform *Spectral* for *K* ≥ 3 when leveraging information about the initial partition. They also outperform *Spectral* for *K* ≥ 5 when *η* = 1. The accuracy of *Mirror* remains roughly stable with respect to *K* when the noise is moderate or low (impacting the results reported in the top row of Figure 9). Under fully scrambled conditions (*η* = 1), *Mirror* and *One Pass* end up with similarly poor accuracy.

4.3.3. *Accuracy Versus Efficiency and Robustness*

To visualize the *joint* interplay between metrics, Figures 10 and 11 show 2D contour plots. The top row in each figure aggregates all noise levels, and the bottom row focuses on η = 1. Each column corresponds to a specific method.
<figure><img src="image_11.png" /><figcaption>Figure 10: **Accuracy vs. efficiency.** Each panel is a density contour for one method, with the top row averaging all $\eta$ and the bottom row restricted to $\eta = 1$. The x-axis is runtime in seconds, and the y-axis is the Adjusted Rand index (ARI) [10]. A method is ideal if it is both highly accurate (top) and efficient (left).</figcaption></figure>

**Leiden (Phase 1) vs. Leiden (Full-Fledged).** Both present a “two-cluster” pattern in the accuracy-efficiency space (Figure 10): one cluster has high accuracy and low convergence time, and the other correspond to less accurate solutions and higher convergence times. Leiden (Phase 1) is notably more concentrated at low runtimes, reflecting its single-phase nature. In the accuracy-robustness space (Figure 11), they both form “double humps” with high densities at robust, accurate partitions, plus some spread at moderate accuracy.

**Spectral Clustering.** Because it ignores initial conditions, its performance does not shift with $\eta$ (identical results in top and bottom rows in Figures 10 and 11). We see a band of points around low accuracy and widely varying runtimes (depending on $K$). In the accuracy-robustness view, *Spectral* yields a cluster of points with low robustness and accuracy ($\text{ARI} \le 0.2$) and another cluster where both robustness and accuracy are higher ($\text{ARI} \ge 0.6$). The latter accounts, for instance, to scenarios where $K = 2$, as indicated in Figure 9.

**One Pass.** The *One Pass* approach tends to produce partitions of middling accuracy (ARI $\approx$ 0). Under $\eta = 1$, it can be slower if the network is difficult to partition (e.g., large $K$ with weak community structure). In the accuracy-robustness space, *One Pass* can form small “peaks” of higher accuracy and robustness when $\eta < 0.5$. Otherwise, ARI is roughly zero.

**Mirror.** Its runtime is effectively zero, so Figure 10 shows vertical stripes when the runtime is close to zero. Accuracy then depends solely on $\eta$. In Figure 11, *Mirror* yields a broad distribution in the robustness-accuracy space: if the input partition is close to ground truth, we see top-right peaks; if heavily shuffled (bottom row), accuracy is near zero and robustness varies between 0.1 and 0.6.

### 4.3.4. Summary of Numerical Findings

The reported experiments illustrate the practical benefits of hedonic-game-based methods for *community tracking*, where an outdated but partially correct partition is available. While simpler baselines, such as *Mirror* and *OnePass*, can suffice for low noise, they produce partitions with low accuracy at higher noise. *Spectral* is a good candidate for $K = 2$ but is not competitive for the task of community tracking otherwise, as it ignores valuable prior information. By contrast, *Leiden (Phase 1)* and *Leiden (Full-Fledged)* consistently yield robust and accurate solutions in short runtime, confirming the theoretical insights of Section 3. In dynamic or real-world settings, starting from an imperfect partition and running a fast local improvement can be highly effective, especially if noise is moderate so that prior knowledge about the partition is only partially outdated.
<figure><img src="image_12.png" /><figcaption>Figure 11: **Accuracy vs. robustness.** Each panel is a density contour for one method, with the top row averaging all $\eta$ and the bottom row restricted to $\eta = 1$. The x-axis is the fraction of robust nodes (Eq. (1)), and the y-axis is the Adjusted Rand index (ARI) [10]. A method is ideal if it is both highly robust (right) and accurate (top).</figcaption></figure>

**5. Conclusion**

Community detection is a fundamental component in modern data science. In this work, we contributed to the community detection literature by establishing that the Constant Potts Model (CPM) aligns with a hedonic potential function in coalitional games. Using the Leiden algorithm, we identified CPM local maximizers that correspond to equilibria of the hedonic game. Additionally, we provided theoretical conditions under which the Leiden algorithm converges in pseudo-polynomial time.

We analyzed two stability criteria: one enforcing strict maximization of neighbors and minimization of non-neighbors within communities, and another applying a relaxed utility function based on a weighted sum of the number of neighbors and non-neighbors, with the resolution parameter $\gamma$ acting as the weight. We introduced the concept of robust nodes, i.e., nodes that have no incentive to switch communities for any value of the resolution parameter.

Our experiments demonstrated that the fraction of robust nodes in an equilibrium can serve as an indicator for extracting high-quality solutions from the output of the Leiden algorithm, which maximizes the relaxed $\gamma$-weighted utility function. This insight enables a principled selection among multiple equilibria, improving the overall accuracy of community detection.

Looking ahead, our research opens multiple directions for further exploration. While the algorithms studied in this work primarily identify non-overlapping communities, extending them to detect overlapping communities remains an important avenue for future research [44]. This could be achieved by leveraging multiple initializations of the hedonic game. Additionally, we plan to explore how different strategies for scheduling node movements between communities impact final results, particularly considering the effects of non-greedy transitions on detection quality.

Furthermore, we anticipate leveraging tools from evolutionary game theory to enhance solution quality [45–47]. Strengthening the connection between community detection and game-theoretic approaches presents a promising path for refining equilibrium selection and improving the robustness of community structures in dynamic environments.

**Appendix A. Table of Notation**

Table A.5 provides a comprehensive list of the symbols and terms used throughout this work, along with their definitions.
<table><caption>Table A.5: Table of Notation</caption><thead><tr><th>Symbol</th><th>Definition</th></tr></thead><tbody><tr><td>G = (V, E)</td><td>Network (graph) with n = |V| vertices and m = |E| edges.</td></tr><tr><td>π</td><td>Partition of a network into disjoint communities.</td></tr><tr><td>K</td><td>Number of communities.</td></tr><tr><td>C<sub>k</sub></td><td>The k-th community of a partition.</td></tr><tr><td>A</td><td>An arbitrary community to where the node considers moving to.</td></tr><tr><td>B</td><td>An arbitrary community from where the node considers leaving from.</td></tr><tr><td>n<sub>k</sub></td><td>Number of nodes within community C<sub>k</sub>.</td></tr><tr><td>m<sub>k</sub></td><td>Number of edges within community C<sub>k</sub>.</td></tr><tr><td>σ<sub>i</sub></td><td>Index of the community assigned to node i.</td></tr><tr><td>d<sup>k</sup><sub>i</sub></td><td>Number of neighbors of node i in community k.</td></tr><tr><td>d&#770;<sup>k</sup><sub>i</sub></td><td>Number of non-neighbors of node i in community k.</td></tr><tr><td>v<sub>ij</sub></td><td>The hedonic value for a pair of nodes i and j.</td></tr><tr><td>R(i, π)</td><td>Robustness of node i for a giving partition π.</td></tr><tr><td>γ</td><td>Resolution parameter that controls communities granularity.</td></tr><tr><td>η</td><td>Noise parameter simulating outdated ground-truth knowledge in community tracking tasks.</td></tr><tr><td>δ(c)</td><td>Indicator function, returning 1 if the condition c holds, and 0 otherwise.</td></tr><tr><td>φ<sup>γ</sup><sub>i</sub>(C<sub>k</sub>)</td><td>Node potential: contribution of node i to its community (superscript dropped when clear from context).</td></tr><tr><td>φ<sup>γ</sup>(C<sub>k</sub>)</td><td>Community potential: sum of the contributions of all nodes in a community.</td></tr><tr><td>Φ<sup>γ</sup>(π)</td><td>Partition potential: sum of the community potentials across the entire partition.</td></tr></tbody></table>

## Appendix B. The Metagraph of Partitions

To visualize the entire decision landscape available to agents, we construct a *metagraph* that maps the universe of possible network partitions into a comprehensive graph structure (Figure 1). In this metagraph, each vertex represents a unique partition of the underlying network *G*, and edges represent rational, single-node transitions between them. The construction follows a systematic, three-step process: generating the metanodes, identifying the edges, and typing the edges based on agent incentives.

### Appendix B.1. Metanodes: The Universe of Partitions and Layout

The metanodes of the metagraph represent all possible unique partitions of the *n* nodes in the original graph *G*. The metanodes of the metagraph represent all *B*<sub>*n*</sub> possible unique partitions of the *n* nodes in the original graph, where *B*<sub>*n*</sub> is the corresponding Bell number. We generate this complete set by systematically enumerating every possible grouping of the nodes.

For analytical clarity and structured visualization, two specific partitions are designated as anchors for the layout algorithm:

* **The Grand Coalition:** The partition consisting of a single community that includes all *n* nodes. This is represented by the blue node in Figure 1.

* **The Singleton Partition:** The partition where each of the *n* nodes forms its own individual community. This corresponds to the red node in the figure.

The positions of all other partitions (intermediate vertices) are determined by a custom layout algorithm that organizes them into layers based on their **move distance** from these two anchors. The move distance between two partitions is the minimum number of single-node moves required to transform one into the other. This organizes the metagraph logically, often revealing an evolutionary path from full integration (the grand coalition) to complete fragmentation (the singletons).
## Appendix B.2. Edges: Single-Node Transitions

An edge exists between two metanodes in the metagraph (representing partitions $\pi_1$ and $\pi_2$) if and only if one can be transformed into the other by moving a single node from one community to another. This defines a neighborhood relationship on the space of partitions. These connections are identified by systematically comparing all pairs of partitions and creating an edge if they differ by the relocation of exactly one node.

## Appendix B.3. Edge Types: Non-Frustrated vs. Frustrated Choices

The character of each edge in the metagraph is determined by the nature of the choice available to the moving node. A move is evaluated based on the trade-off between gaining intra-community neighbors (“friends”) and avoiding intra-community non-neighbors (“strangers”). This trade-off is precisely quantified by the Familiarity Index, which serves as a decision threshold:

$$ \gamma^* = \frac{\Delta d}{\Delta d + \Delta \hat{d}} \qquad (B.1) $$

where $\Delta d$ represents the change in the number of friends and $\Delta \hat{d}$ is the change in the number of strangers for the moving node. The nature of the choice is defined as follows:

* **Unidirectional Edge (Non-Frustrated Choice):** A directed edge is drawn if the choice is unambiguous, which occurs when $\gamma^* \notin (0, 1)$. This corresponds to a clear-cut move where a node can improve one metric (e.g., gain friends) without worsening the other (e.g., by not gaining any strangers). With no conflict, the preference is clear, resulting in a single-colored (purple) directed edge.

* **Bidirectional Edge (Frustrated Choice):** A bidirectional edge is drawn if the choice is *frustrated*, which occurs when $\gamma^* \in (0, 1)$. This signifies a direct trade-off: the node must choose between a community with more friends but also more strangers, or one with fewer of both. This conflict is visualized with a two-colored edge, where the blue path points toward the partition offering more friends and the red path points toward the one offering fewer strangers. The value of $\gamma^*$ represents the critical value of the resolution parameter $\gamma$ at which an agent is indifferent.

By constructing the metagraph in this manner, we create a complete map of the local decision landscape. It visualizes every possible single-step move, clearly distinguishing between straightforward improvements (non-frustrated choices) and the complex, trade-off-dependent decisions (frustrated choices) that are central to the community detection problem.

# Appendix C. Community Detection Algorithms

For the sake of completeness, in this appendix we report various community detection algorithms. Some of the algorithms, such as Spectral Clustering and the Louvain Method, do not accept an initial partitioning as an argument. In contrast, other methods, including the Leiden Algorithm, can leverage an initial configuration for community detection. Regarding practical implementation aspects, the Spectral, Louvain, and Leiden algorithms have highly optimized implementations in C, with the Python igraph interface serving as a wrapper.

One of the key parameters considered in our work is the resolution parameter $\gamma$. [4, 6, 7, 35] highlight that several community detection algorithms optimize an objective function with a resolution parameter. Louvain and Leiden are two examples of such algorithms, as further detailed in the sequel.

## Appendix C.1. Spectral Clustering

Spectral clustering methods are known to be asymptotically optimal for a broad class of networks [18, 48, 49], and the origins of spectral clustering are well-documented in the literature [50–52]. The technique gained widespread recognition in the machine learning community through the works of Shi and Malik [51] and Ng, Jordan, and Weiss [52].

While spectral methods produce high-quality communities, their applicability to large-scale problems is limited by their computational complexity of $O(n^3)$. These methods allow for a predefined number of clusters but lack the
flexibility to incorporate an arbitrary initial partition. Furthermore, spectral clustering does not include a resolution parameter, which limits its adaptability to different levels of granularity.<fnref n="11" />

## Appendix C.2. Louvain Algorithm

The Louvain algorithm belongs to the class of algorithms that maximize a modularity function. The seminal innovation of the Louvain method [17], named after the university where it was developed, lies in its *aggregation phase*, which compresses the network by merging each detected community into a single supernode. In this phase, the edge weight between any two supernodes is recalculated as the sum of the weights of all edges connecting the corresponding communities in the original graph. This multilevel framework enhances scalability by iteratively reducing the graph's complexity while also revealing hierarchical community structures at different scales. However, this approach may sometimes obscure internal connectivity flaws by merging nodes into communities that are not entirely cohesive.

The Louvain method extracts non-overlapping communities from large networks and operates in two main phases: (1) moving nodes between communities to optimize modularity and (2) aggregating the graph by merging detected communities into single nodes. After each iteration, the newly formed communities become nodes, and the process repeats until convergence. Due to this layered approach, the method is also referred to as a multi-level method.

The time complexity of the Louvain algorithm is an open subject. While it is cited as “essentially linear in the number of links of the graph” [53], to the best of our knowledge this complexity was empirically observed rather than theoretically proven.

As a modularity-based approach, the Louvain method is widely used in practice due to its efficiency and empirical performance. Similar to the Spectral method, the Louvain method does not accept an initial partition as an input parameter. However, unlike Spectral clustering, the Louvain method includes a resolution parameter, allowing control over the granularity of the detected communities.

## Appendix C.3. Leiden Algorithm

The Leiden algorithm [6], named after its originating university, improves upon the Louvain algorithm [17] by addressing its most significant shortcoming: the tendency to produce arbitrarily badly connected and even disconnected communities (see Section 2.1.5). By introducing a sophisticated refinement phase, Leiden not only guarantees that all communities are well-connected but also identifies higher-quality partitions more efficiently.

The full algorithm iterates through a three-phase process: (1) local moving of nodes, (2) refinement of the partition, and (3) aggregation of the network. This structure allows Leiden to explore the solution space more effectively while providing explicit guarantees about the quality of the resulting communities.

**Phase 1: Local Moving of Nodes.** This phase is conceptually similar to Louvain's local optimization but employs a more efficient "fast local move" procedure. Instead of repeatedly iterating over all nodes, the Leiden algorithm maintains a queue of nodes to visit. Initially, all nodes are placed in the queue in a random order. When a node is moved to a new community, only its neighbors (who are not in the node's new community) are added to the queue if they are not already present. This targeted approach avoids redundant checks on nodes whose neighborhoods have not changed, making the local moving phase significantly faster than Louvain.

**Phase 2: Refinement of the Partition.** This is the central innovation of the Leiden algorithm, designed to ensure that communities are internally well-connected. After the local moving phase yields a partition $\pi$, the refinement phase aims to find a refined partition, $\pi_{refined}$, where communities in $\pi$ may be split into multiple, more cohesive subcommunities. The refinement operates on each community from $\pi$ individually, merging nodes locally only within that community's boundaries. To better explore the partition space, the algorithm does not necessarily make the greediest move; instead, it may randomly select any merge that results in a non-negative quality improvement.

**Phase 3: Aggregation of the Network.** In the final phase, the network is aggregated for the next level of optimization. Leiden uses the *refined partition* $\pi_{refined}$ to construct the nodes of the new aggregate network. However, the initial community assignments for this new network are based on the original, *non-refined partition* $\pi$. This design allows the algorithm to break apart poorly formed communities while preserving the larger-scale structure for the next iteration.

<footnote n="11">¹¹In this work, we use the `community_leading_eigenvector()` method from the `igraph` library to perform spectral clustering: https://python.igraph.org/en/0.10.8/api/igraph.graph.html#community_leading_eigenvector.</footnote>
**Implementation and Scope in This Work.** In our experiments, we use the community_leiden() method from the igraph library, optimizing the Constant Potts Model (CPM) quality function. We found that setting the resolution parameter $\gamma$ to the graph's edge density provided accurate results.

While the full Leiden algorithm includes all three phases, in this work, we focus specifically on the local-move dynamics of Phase 1 to analyze its convergence properties as a hedonic game. We therefore treat Phases 2 and 3 as components of the complete algorithm but omit them from our direct analysis.

## Appendix C.4. One-Pass Improvement

The one-pass improvement strategy is a simple yet highly efficient approach that serves as a baseline for comparison. The algorithm functions as follows: given an initial partition, it identifies all nodes that would increase their number of neighbors within a community by moving to the community where they have the highest number of such neighbors. Once the nodes to be relocated and their target communities are determined, the algorithm moves all marked nodes in a single step. This method, referred to as one-pass improvement [18], has a time complexity of $O(n)$. Like state-of-the-art methods such as Leiden and hedonic games, it accepts an initial partition, making it suitable for community tracking. However, similar to the classical spectral method, it lacks a resolution parameter, limiting its flexibility in tuning community granularity.

**Supplementary material.** The source code to reproduce the results presented in this work is available at https://github.com/lucaslopes/hedonic-game. A preliminary version of this work was presented as an extended abstract [39].

**Acknowledgments.** This work was partially supported by CNPq, CAPES and FAPERJ through grants JCNE E-26/201376/2021 and CNE E-26/204.268/2024.

## References

[1] H.-W. Shen, Community structure: An introduction, in: Community Structure of Complex Networks, Springer, 2013, pp. 1–17.

[2] S. Boccaletti, V. Latora, Y. Moreno, M. Chavez, D.-U. Hwang, Complex networks: Structure and dynamics, Physics reports 424 (4-5) (2006) 175–308.

[3] S. G. Brush, History of the lenz-ising model, Reviews of modern physics 39 (4) (1967) 883.

[4] V. A. Traag, P. Van Dooren, Y. Nesterov, Narrow scope for resolution-limit-free community detection, Physical Review E 84 (1) (2011) 016114.

[5] W. V. Gehrlein, Condorcet's paradox, Springer, 2006. doi:10.1007/3-540-33799-7.

[6] V. A. Traag, L. Waltman, N. J. van Eck, From Louvain to Leiden: guaranteeing well-connected communities, Scientific reports 9 (1) (2019) 1–12.

[7] K. Avrachenkov, A. Kondratev, V. Mazalov, D. Rubanov, Network partitioning algorithms as cooperative games, Comp. Social Networks 5 (2018). doi:10.1186/s40649-018-0059-5.

[8] H. Aziz, R. Savani, Hedonic games, in: Handbook of Computational Social Choice, Cambridge University Press, Cambridge, 2016, pp. 356–376.

[9] J. H. Dreze, J. Greenberg, Hedonic coalitions: Optimality and stability, Econometrica: Journal of the Econometric Society (1980) 987–1003.

[10] L. Hubert, P. Arabie, Comparing partitions, Journal of classification 2 (1) (1985) 193–218.

[11] S. N. Dorogovtsev, J. F. Mendes, Evolution of networks: From biological nets to the Internet and WWW, Oxford university press, 2003.

[12] M. Girvan, M. E. Newman, Community structure in social and biological networks, Proceedings of the national academy of sciences 99 (12) (2002) 7821–7826.

[13] C. H. Papadimitriou, The complexity of finding Nash equilibria, Algorithmic game theory 2 (2007) 30.

[14] L. Massoulié, Community detection thresholds and the weak Ramanujan property, in: ACM Symposium on Theory of Computing (STOC), 2014, pp. 694–703.

[15] J.-G. Young, G. St-Onge, P. Desrosiers, L. J. Dubé, Universality of the stochastic block model, Physical Review E 98 (09 2018).

[16] M. Xu, V. Jog, P.-L. Loh, et al., Optimal rates for community estimation in the weighted stochastic block model, The Annals of Statistics 48 (1) (2020) 183–204.

[17] V. Blondel, J.-L. Guillaume, R. Lambiotte, Fast unfolding of communities in large networks: 15 years later, Journal of Statistical Mechanics: Theory and Experiment 2024 (10) (2024) 10R001. doi:10.1088/1742-5468/ad6139. URL https://dx.doi.org/10.1088/1742-5468/ad6139

[18] E. Abbe, A. S. Bandeira, G. Hall, Exact recovery in the stochastic block model, IEEE Transactions on Information Theory 62 (1) (2015) 471–487.

[19] A. Lancichinetti, S. Fortunato, Consensus clustering in complex networks, Scientific reports 2 (2012) 336.

[20] B. Hajek, S. Sankagiri, Community recovery in a preferential attachment graph, IEEE Transactions on Information Theory 65 (11) (2019) 6853–6874.

[21] B. Hajek, et al., Recovering a hidden community beyond the Kesten–Stigum threshold in $O(|E| \log |V|)$ time, Journal of Applied Probability 55 (2) (2018) 325–352.

[22] B. Saoud, Networks clustering with bee colony, Artificial Intelligence Review 52 (2) (2019) 1297–1309.
[23] B. Saoud, A nature-inspired algorithm to find community structure in complex networks, Journal of applied research and technology 21 (3) (2023) 376-383.

[24] B. Saoud, Community structure detection in networks based on tabu search, Journal of Control and Decision 11 (2) (2024) 222-232.

[25] V. V. Mazalov, Comparing game-theoretic and maximum likelihood approaches for network partitioning, in: Trans. Comp. Intelligence, Springer, 2018, pp. 37-46.

[26] L. Prokhorenkova, A. Tikhonov, Community detection through likelihood optimization: In search of a sound model, in: The World Wide Web Conference, WWW '19, Association for Computing Machinery, New York, NY, USA, 2019, p. 1498-1508. doi:10.1145/3308558.3313429
URL https://doi.org/10.1145/3308558.3313429

[27] C.-Y. Wang, Y. Chen, K. R. Liu, Chinese restaurant game, IEEE Signal Processing Letters 19 (12) (2012) 898-901.

[28] J. Reichardt, S. Bornholdt, Statistical mechanics of community detection, Phys. Rev. E 74 (2006) 016110. doi:10.1103/PhysRevE.74.016110
URL https://link.aps.org/doi/10.1103/PhysRevE.74.016110

[29] M. E. Newman, M. Girvan, Finding and evaluating community structure in networks, Physical review E 69 (2) (2004) 026113.

[30] J. González-Díaz, I. García-Jurado, M. G. Fiestras-Janeiro, An introductory course on mathematical game theory, Graduate studies in mathematics 115 (2010).

[31] J. D. Pérez-Castrillo, Cooperative outcomes through noncooperative games, Games and Economic Behavior 7 (3) (1994) 428-440.

[32] R. Cominetti, M. Quattropani, M. Scarsini, The buck-passing game, Mathematics of Operations Research 47 (3) (2022) 1731-1756.

[33] S. Banerjee, H. Konishi, T. Sönmez, Core in a simple coalition formation game, Social Choice and Welfare 18 (1) (2001) 135-153.

[34] K. Cechlárová, A. Romero-Medina, et al., Stability in coalition formation games, International Journal of Game Theory 29 (4) (2001) 487-494.

[35] A. Bogomolnaia, M. O. Jackson, The stability of hedonic coalition structures, Games and Economic Behavior 38 (2) (2002) 201-230.

[36] M. Gairing, R. Savani, Computing stable outcomes in hedonic games, in: Int. Symposium on Algorithmic Game Theory, Springer, 2010, pp. 174-185.

[37] F. Sheikholeslami, et al., Egonet tensor decomposition for community identification, in: GlobalSIP, IEEE, 2016, pp. 341-345.

[38] D. Monderer, L. S. Shapley, Potential games, Games and economic behavior 14 (1) (1996) 124-143.

[39] L. L. Felipe, K. Avrachenkov, D. S. Menasche, Robustness against frustration in community detection, ACM SIGMETRICS Performance Evaluation Review 53 (2) (2025) 128-130.

[40] P. W. Holland, K. B. Laskey, S. Leinhardt, Stochastic blockmodels: First steps, Social Networks 5 (2) (1983) 109-137. doi:https://doi.org/10.1016/0378-8733(83)90021-7
URL https://www.sciencedirect.com/science/article/pii/0378873383900217

[41] D. Greene, D. Doyle, P. Cunningham, Tracking the evolution of communities in dynamic social networks, in: 2010 International Conference on Advances in Social Networks Analysis and Mining, 2010, pp. 176-183. doi:10.1109/ASONAM.2010.17.

[42] K. Avrachenkov, M. Dreveton, L. Leskelä, Recovering static and time-varying communities using persistent edges, IEEE Transactions on Network Science and Engineering 11 (2) (2023) 2087-2099.

[43] J. Lei, A. Rinaldo, Consistency of spectral clustering in stochastic block models, The Annals of Statistics (2015) 215-237.

[44] W. Chen, Z. Liu, X. Sun, Y. Wang, A game-theoretic framework to identify overlapping communities in social networks, Data Mining and Knowledge Discovery 21 (2) (2010) 224-240.

[45] S. Durand, F. Garin, B. Gaujal, Distributed best response algorithms for potential games, in: 2018 European Control Conference (ECC), IEEE, 2018, pp. 2170-2175.

[46] P. Kleer, G. Schäfer, Topological price of anarchy bounds for clustering games on networks, in: International Conference on Web and Internet Economics, Springer, 2019, pp. 241-255.

[47] B. Amiet, A. Collevecchio, M. Scarsini, Z. Zhong, Pure nash equilibria and best-response dynamics in random games, Mathematics of Operations Research 46 (4) (2021) 1552-1572.

[48] U. Von Luxburg, A tutorial on spectral clustering, Statistics and computing 17 (4) (2007) 395-416.

[49] T. F. Chan, P. Ciarlet Jr, W. Szeto, On the optimality of the median cut spectral bisection graph partitioning method, SIAM Journal on Scientific Computing 18 (3) (1997) 943-948.

[50] J. Cheeger, A lower bound for the smallest eigenvalue of the Laplacian, Problems in analysis 625 (195-199) (1970) 110.

[51] J. Shi, J. Malik, Normalized cuts and image segmentation, IEEE Transactions on pattern analysis and machine intelligence 22 (8) (2000) 888-905.

[52] A. Ng, M. Jordan, Y. Weiss, On spectral clustering: Analysis and an algorithm, Advances in neural information processing systems 14 (2001).

[53] A. Lancichinetti, S. Fortunato, Community detection algorithms: a comparative analysis, Physical Review E—Statistical, Nonlinear, and Soft Matter Physics 80 (5) (2009) 056117.