cs.LGNov 6, 2026

RoleWalk: training-free structural embeddings for directed graphs that transfer across graphs

Authors: Maixent Chenebaux

Organizations: Trickstr

Abstract

Structural role embeddings describe a node by its position in a graph - hub, bridge, periphery, member of a dense core - rather than by who its neighbours are. Existing methods either learn coordinates specific to one graph (struc2vec, Role2Vec, RESD) or read scales and normalisations from the whole graph (GraphWave, Digraphwave), so the same neighbourhood can receive different coordinates in two graphs; few read edge directions. We present RoleWalk, a training-free embedding that follows a short lazy random walk from each node and records, at each step, two distributions: that of the transition probabilities, through its characteristic function at a fixed grid of frequencies, and that of the walker's distance to its starting node. On directed graphs, walks that go forward then backward add who shares a node's targets or sources. The embedding depends only on a node's neighbourhood within a fixed radius, so its coordinates mean the same thing in every graph. We show that, without curvature, it is the kernel mean embedding of the walk's footprint, that it separates graphs that the Weisfeiler-Leman test cannot, and that pruning small probabilities comes with a per-node error certificate. Empirically, RoleWalk is competitive with the best role embeddings on five classification benchmarks at a fraction of their cost, has the highest scores on real directed roles in Wikipedia adminship, exceeds the published accuracy of Digraphwave at every noise level of its own Enron network-alignment benchmark, transfers centrality predictors to graphs four times larger better than existing inductive embeddings, hand-made features and a trained GIN, and embeds a million nodes in 20 s to 3 min on one CPU core. The code is open source (BSD license): https://github.com/kerighan/rolewalk

Figures & tables

Appendix figures & tables3 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Sep 8, 2026

Topology-induced Operators Reveal Complementary Graph Representations without Training

Graph representation learning has largely focused on designing increasingly sophisticated models to transform graph topology into vector representations, or embeddings. However, the extent to which embedding quality depends on model learning, rather than on the underlying topological transformations, remains unclear. Here, we show that informative embeddings can be derived without complicated model design and gradient-based training. Propagating random features through implicit hierarchical structures induced by random walks and anonymous walks yields embeddings that capture node proximity and structural role, respectively. These two training-free embeddings preserve complementary aspects of graph organization and perform competitively with classic and recent methods across various node-, edge-, and graph-level tasks. They often require substantially less computation, resulting in a favorable quality-efficiency trade-off. Combining the two types of embeddings further improves inference quality of some tasks compared with using either embedding type alone. Our results suggest that informative graph embeddings can arise from carefully chosen topological transformations before any learning operation is applied.
Feb 26, 2026

An Analysis of Role Semantics in Directed Dynamic Graph Modeling for Edge Classification

Edge classification on directed dynamic graphs is critical for understanding evolving user-item interactions and behavioral patterns in recommender systems and social platforms. Existing dynamic graph architectures typically process these interactions using shared parameters for nodes with semantically distinct roles, including source, destination, query, and neighbor. While abundant supervision in tasks such as link prediction provides sufficient gradient signal for models to implicitly deduce role semantics and overcome this conflation, there are often far fewer labels available for edge classification. We hypothesize that in such regimes, the ability of models to implicitly separate roles is restricted, degrading downstream performance. To empirically investigate this relationship, we introduce an experimental framework for sequence-based models that explicitly disentangles functional roles using targeted embeddings and an asymmetric pretraining objective. By providing architectural priors for these roles, the framework serves as an evaluative vehicle to isolate and measure the resulting performance delta across a range of label budgets. Our empirical evaluation demonstrates that this explicit role disentanglement yields substantial and consistent relative performance gains over baselines. Furthermore, representational analyses reveal that the mechanism by which the framework provides these benefits is a bifurcation of source and destination latent spaces that improves linear separability.
Apr 10, 2026

NOMAD: Generating Embeddings for Massive Distributed Graphs

Successful machine learning on graphs or networks requires embeddings that not only represent nodes and edges as low-dimensional vectors but also preserve the graph structure. Established methods for generating embeddings require flexible exploration of the entire graph through repeated use of random walks that capture graph structure with samples of nodes and edges. These methods create scalability challenges for massive graphs with millions-to-billions of edges because single-node solutions have inadequate memory and processing capabilities. We present NOMAD, a distributed-memory graph embedding framework using the Message Passing Interface (MPI) for distributed graphs. NOMAD implements proximity-based models proposed in the widely popular LINE (Large-scale Information Network Embedding) algorithm. We propose several practical trade-offs to improve the scalability and communication overheads confronted by irregular and distributed graph embedding methods, catering to massive-scale graphs arising in web and science domains. NOMAD demonstrates median speedups of 10/100x on CPU-based NERSC Perlmutter cluster relative to the popular reference implementations of multi-threaded LINE and node2vec, 35-76x over distributed PBG, and competitive embedding quality relative to LINE, node2vec, and GraphVite, while yielding 12-370x end-to-end speedups on real-world graphs.