Genetic Algorithm with a Local Search Strategy for Discovering Communities in Complex Networks

Dayou Liu, Di Jin, Carlos Baquero, Dongxiao He, Bo Yang, Qiangyuan Yu

Abstract

Community detection is a fundamental task in network science, typically framed as a modularity maximization problem. While Genetic Algorithms (GAs) offer a robust framework for exploring the solution space, traditional mutation operators often disrupt high-quality community structures. This paper introduces GALS, a hybrid GA that utilizes a Locus-based Adjacency Representation (LAR) and a surgical local search strategy focused on "marginal genes." By ensuring that mutations only affect community boundaries, GALS achieves state-of-the-art performance in identifying communities across various synthetic and real-world networks.

Introduction

In network science, "communities" are groups of nodes that are more densely connected to each other than to the rest of the network. Identifying these structures is crucial for understanding the functional organization of social, biological, and technological systems. The problem is often formulated as the maximization of modularity ($Q$), a quality metric that compares the density of edges within communities to an expected density in a random null model.

However, maximizing modularity is an NP-hard problem. While Genetic Algorithms (GAs) are effective at searching complex landscapes, they often suffer from "destructive" operators. Standard crossover and mutation can randomly split or merge well-formed communities, hindering convergence. The proposed GALS (Genetic Algorithm with a Local Search strategy) addresses this by introducing a localized, non-destructive mutation mechanism.

Methodology

Locus-based Adjacency Representation (LAR)

GALS employs the Locus-based Adjacency Representation (LAR) to encode network partitions. In this scheme, an individual in the population is represented as a chromosome of length $n$ (the number of nodes). Each gene at position $i$ contains the index of one of node $i$'s neighbors. This representation naturally partitions the network into several connected components, each corresponding to a community.

The Locus-based Adjacency Representation (LAR) genotype for an 11-node network.

Marginal Gene Strategy

A key innovation of GALS is the identification of "marginal genes." In the graph structure formed by the LAR genotype, a marginal node is defined as a node that no other node points to (i.e., it has an in-degree of zero). Mutating a marginal node is "safe" because it only moves that single node between communities without triggering a chain reaction that could merge or split entire clusters.

The decoded graph structure from the LAR genotype, highlighting the resulting community components.

Local Search Mutation (LSMA)

Instead of random mutation, GALS uses a Local Search Mutation Algorithm (LSMA). When a marginal node is selected for mutation, the algorithm evaluates its neighbors and reassigns the node to the community that yields the highest local modularity gain. The authors provide a mathematical proof that improving local modularity in this manner monotonically increases the global modularity $Q$, ensuring that every mutation step is a step toward a better global solution.

Experimental Evaluation

The performance of GALS was evaluated against several state-of-the-art algorithms, including the Fast Unfolding (Louvain) algorithm and other GA-based approaches.

Datasets

  • Synthetic Benchmarks: The Newman benchmark and the LFR benchmark were used to test the algorithm's sensitivity to "mixing" (the ratio of inter-community to intra-community edges).
  • Real-World Networks: Classic datasets such as Zachary’s Karate Club, the Dolphin Social Network, and the American College Football network provided ground-truth comparisons. A large-scale Internet Snapshot (22,963 nodes) was used to test scalability.

Results and Discussion

GALS consistently outperformed competitors in terms of Normalized Mutual Information (NMI), particularly in high-noise scenarios where community boundaries are blurred. On real-world datasets, GALS often identified partitions with higher modularity scores than the documented ground truth, suggesting its efficacy in uncovering latent structures.

The algorithm's time complexity is approximately $O(cn)$, where $c$ is the average community size. This linear scaling with respect to the number of nodes makes it significantly more efficient than traditional GAs, allowing it to handle networks with tens of thousands of nodes.

Conclusion

GALS represents a significant advancement in GA-based community detection. By combining the global search capabilities of GAs with a surgical local search strategy focused on marginal genes, it overcomes the limitations of destructive mutation operators. Future work will explore extending GALS to detect overlapping communities and further optimizing the heuristic search for massive-scale networks.

Summary updated

BibTeX
@article{liu2013genetic,
  author = {Dayou Liu and Di Jin and Carlos Baquero and Dongxiao He and Bo Yang and Qiangyuan Yu},
  title = {{Genetic Algorithm with a Local Search Strategy for Discovering Communities in Complex Networks}},
  journal = {Int. J. Comput. Intell. Syst.},
  year = {2013},
  doi = {10.1080/18756891.2013.773175},
}
Figure