An iterative spectral algorithm for digraph clustering

James Martin, Tim Rogers, Luca Zanetti

Abstract

Clustering in directed graphs (digraphs) presents unique challenges as edge direction often carries more information than edge density. We introduce an iterative spectral algorithm that dynamically updates a complex-valued Hermitian matrix to uncover the underlying "meta-graph" of a network. By optimizing for flow imbalance rather than simple connectivity, our method achieves significant performance gains in ecological, biological, and competitive datasets.

Introduction

In network science, clustering typically identifies groups of nodes with high internal density. While effective for undirected social networks, this approach overlooks the fundamental nature of digraphs, such as food webs or competitive rankings, where the direction of interaction (e.g., predator-prey or winner-loser) is paramount. Traditional spectral clustering struggles with the asymmetric adjacency matrices of digraphs. Furthermore, existing methods are often biased toward specific structures like cycles, failing to capture more complex hierarchical or path-like relationships.

Methodology

The proposed iterative spectral algorithm moves beyond traditional "one-shot" clustering techniques.

Dynamic Representation and Iteration

The core of the algorithm is the construction of a Hermitian matrix ($H_S$) that evolves based on the current clustering state. By utilizing complex numbers—specifically roots of unity—the matrix encodes the expected direction of edges between clusters. The process follows an iterative loop:

  1. Initialize with a random clustering.
  2. Construct the $H_S$ matrix.
  3. Perform spectral embedding and k-means to generate a refined clustering.
  4. Repeat for $T$ iterations.

Meta-Graph Discovery

A central innovation is the "meta-graph," a reduced $k$-vertex representation where each vertex represents a cluster. The algorithm identifies the meta-graph that best minimizes a cost function ($\delta$), which penalizes edges that oppose the predicted flow.

A directed graph clustered into groups based on edge flow.

Results

The algorithm was evaluated against the previous state-of-the-art (CLSZ) across several domains:

  • Synthetic Benchmarks: Using the Directed Stochastic Block Model (DSBM), the algorithm recovered ground truth with zero error in sparse meta-graph scenarios where previous methods failed.
  • Competitive Gaming: In a dataset of nearly 300,000 Hearthstone matches, the algorithm reduced clustering costs by up to 14.6%, identifying a clear hierarchy among deck types.
  • Ecological Networks: In the Florida Bay Food Web, the method achieved a 53.5% cost reduction, accurately separating trophic levels from primary producers to apex predators.
  • Biological Systems: The algorithm uncovered distinct block structures in the C. elegans neural network that were previously obscured.

Discussion and Conclusion

By treating direction as a primary feature rather than a secondary attribute, this iterative approach provides a more nuanced understanding of digraph structures. While the iterative nature increases computational overhead proportional to the number of iterations ($T$), the gains in accuracy and the ability to discover structure-agnostic patterns (hierarchies, cycles, and paths) represent a significant advancement in network analysis. Future work will focus on optimizing the search space to scale the algorithm for massive web-scale graphs.

Summary updated

BibTeX
@article{martin2024iterative,
  author = {James Martin and Tim Rogers and Luca Zanetti},
  title = {{An iterative spectral algorithm for digraph clustering}},
  journal = {J. Complex Networks},
  year = {2024},
}
Figure