Digraphwave: Scalable Extraction of Structural Node Embeddings via Diffusion on Directed Graphs

Ciwan Ceylan, Kambiz Ghoorchian, Danica KragicarXiv 2022 · DOI

Introduction

Digraphwave is a highly scalable algorithm designed to generate structural node embeddings for directed graphs. By simulating heat diffusion and compressing the resulting "reachability" signatures, it captures complex local connectivity patterns—such as identifying hubs, sinks, or bridges—while operating up to 30x faster than previous diffusion-based methods.

The Challenge of Directed Graphs

In graph machine learning, representing nodes as vectors (embeddings) is a fundamental task. While positional embeddings capture proximity, structural embeddings identify nodes with similar local roles, regardless of their distance in the graph.

Existing structural embedding methods often struggle with directed graphs (e.g., social networks or financial transaction webs). Treating these as undirected loses critical information, such as the distinction between a "hub" that broadcasts information and a "sink" that receives it. Furthermore, traditional diffusion-based methods are computationally intensive, often failing to scale to graphs with millions of nodes due to the complexity of calculating matrix exponentials.

The Digraphwave Approach

Digraphwave leverages the intuition of "heat diffusion" to characterize node roles. By placing a unit of heat on a node and observing its spread through directed edges over time, the algorithm generates a unique "signature" of that node's structural environment.

The Digraphwave pipeline: processing input and transposed graphs to generate reachability signatures, which are then compressed into structural embeddings.

Key Technical Innovations

  • Scalable Computation: Instead of exact eigenvalue decompositions, Digraphwave utilizes truncated Taylor series approximations to compute heat distributions. This enables batch processing and GPU acceleration, making it viable for massive datasets.
  • Signature Compression: Raw heat distributions are compressed into fixed-length vectors using the Empirical Characteristic Function (ECF), preserving the essential "shape" of the distribution.
  • Transposition and Aggregation: To distinguish between nodes that primarily receive versus send edges, the algorithm runs on both the original and transposed (reversed) graph. It also incorporates mean embeddings of neighbors to break structural symmetries.
  • Theoretical Grounding: A proven lower bound on heat containment allows for rigorous setting of the "diffusion timescale" hyperparameter based on the desired neighborhood radius.

Experimental Evaluation

The authors evaluated Digraphwave across several benchmarks:

  • Synthetic Benchmarks: On a directed structural identity dataset with 102 distinct roles, Digraphwave achieved perfect (1.0) Macro F1 scores, significantly outperforming baselines like EMBER and ReFeX.
  • Real-World Networks: In network alignment tasks on the Enron Email Network and arXiv Astrophysics collaboration graph, Digraphwave showed a strong advantage, particularly when edge weights were included.
  • Scalability: Timing benchmarks on Barabási-Albert graphs showed Digraphwave is up to 30x faster than the original Graphwave implementation, successfully processing graphs with 1 million nodes where previous methods failed.

Key Insights

  • Directionality as a Feature: The research demonstrates that "undirecting" a graph discards vital structural information. Digraphwave’s ability to track where heat cannot flow is as informative as where it can.
  • The Power of Reversal: Transposition effectively solves the "sink" problem; by reversing edges, a sink becomes a source, revealing its hidden structural context.
  • Practical Scalability: By transitioning from global matrix operations to local, batchable Taylor series expansions, the authors transformed diffusion-based embedding into a practical tool for large-scale applications.

Future Directions

Future work may involve optimizing precision (e.g., switching to single-precision math for an additional 4x speedup) and exploring the differentiability of the algorithm. This could allow Digraphwave to be integrated into end-to-end deep learning pipelines to learn optimal edge weights for specific downstream tasks.

Summary updated

BibTeX
@misc{ceylan2022digraphwave,
  author = {Ciwan Ceylan and Kambiz Ghoorchian and Danica Kragic},
  title = {{Digraphwave: Scalable Extraction of Structural Node Embeddings via Diffusion on Directed Graphs}},
  year = {2022},
  eprint = {2207.10149},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2207.10149},
}
Figure