Introduction
In network science, identifying "structural similarity"—where nodes perform similar roles regardless of their proximity—is a fundamental challenge. While well-understood in homogeneous graphs, real-world data is often heterogeneous, comprising multiple node and edge types (e.g., users, questions, and answers). Existing methods for heterogeneous networks primarily focus on proximity-based embeddings, failing to capture "heterostructures": complex patterns where local topology and node types are inextricably linked. This paper introduces a framework to learn these structural roles by extending anonymous walks to the heterogeneous domain.
Methodology: Heterogeneous Anonymous Walks
The core innovation is the Heterogeneous Anonymous Walk (HAW). Unlike standard anonymous walks that only record the order of node appearances (e.g., 0-1-2-0) to capture shape without identity, HAWs incorporate node labels (e.g., (0, User)-(1, Question)-(2, Answer)-(0, User)). This allows the model to distinguish between topologically identical but semantically different neighborhoods.
To generate embeddings (HAWE), the authors treat a node's neighborhood as a "paragraph" and sampled HAWs as "words," training a model to predict walk occurrences. For scalability, a "Coarse" variant (CHAW) is introduced, which aggregates node type counts within walks to mitigate the exponential growth of the walk vocabulary. Crucially, the authors provide a theoretical proof (Theorem 3) showing that the distribution of HAWs is sufficient to reconstruct the local heterogeneous neighborhood of a node.
Experimental Evaluation
The framework was evaluated on synthetic "Pinwheel" networks, an Air-traffic network, and 11 Stack Exchange (SE) datasets. The SE datasets (e.g., SE-Anime, SE-Beer, SE-Chem) provide a rigorous benchmark for classifying users and answers based on their structural roles within diverse communities.
Key Results
- Superior Role Discovery: Qualitative analysis via 2D visualizations shows that HAWE and CHAWE effectively cluster nodes by structural role. In contrast, popular baselines like DeepWalk or Heterogeneous Graph Transformers (HGT) often group nodes by proximity or fail to find clear clusters.
- Classification Accuracy: On Stack Exchange benchmarks, HAWE/CHAWE consistently outperformed state-of-the-art baselines in node classification tasks, often by margins of 2–5%.
- Scalability: The approach maintains linear time complexity relative to the number of edges, proving effective on networks exceeding 100,000 nodes.
Discussion and Future Work
The "heterostructure" concept emphasizes that topology and node types are inseparable in multi-typed graphs. A significant finding was that the coarse variant (CHAWE) often outperformed the full version, likely because the coarse count acts as a form of regularization, grouping similar heterostructures together rather than getting lost in the noise of hyper-specific sequences.
Current limitations include data sparsity for very long walks and the "synonym" problem, where different HAWs represent isomorphic subgraphs. Future research will focus on optimizing sampling strategies and addressing graph isomorphism to further refine these structural representations.
Summary updated