NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Node Representation Learning for Directed Graphs

Megha Khosla, Jurek Leonhardt, Wolfgang Nejdl, Avishek Anand

Abstract

Directed graphs are ubiquitous in real-world applications, yet standard node representation learning methods often fail to capture the inherent asymmetry of directed edges. We introduce NERD (Node Embeddings Respecting Directionality), a framework designed to learn robust representations by maintaining separate embedding spaces for source and target roles. NERD utilizes a novel alternating random walk strategy, inspired by the HITS algorithm, to effectively sample nodes and overcome the "dead end" problem prevalent in directed networks. Our evaluation across five diverse datasets shows that NERD significantly outperforms state-of-the-art baselines in tasks such as link prediction, node classification, and graph reconstruction.

1. Introduction

Graph embedding techniques like DeepWalk and Node2vec have revolutionized network analysis but are primarily optimized for undirected graphs. In directed networks, nodes exhibit asymmetric relationships, often functioning as either "hubs" (curators pointing to others) or "authorities" (entities being pointed to). Existing approaches often suffer from symmetry bias, assuming proximity is reciprocal, or struggle with reachability issues where walks terminate prematurely at nodes with zero out-degree. Furthermore, many methods fail to generalize across different downstream tasks, such as performing well on link prediction but poorly on node classification.

2. Methodology

NERD addresses these limitations by learning two distinct $d$-dimensional vectors for each node: a source embedding ($\Phi_s$) and a target embedding ($\Phi_t$).

2.1 Alternating Random Walks

The core of NERD is the Alternating Random Walk strategy. Unlike standard walks that follow directed edges in a single direction, NERD alternates between following outgoing and incoming edges (e.g., $u \to v \leftarrow w \to x$). This approach is inspired by the SALSA and HITS algorithms. By alternating directions, the walk can "back out" of authority nodes (those with zero out-degree), ensuring they are adequately sampled in their target roles.

The alternating random walk strategy ensures comprehensive sampling of both hub and authority roles by alternating edge directions.

2.2 Role-Specific Embeddings

The model optimizes a Skip-gram objective with negative sampling to maximize the likelihood of nodes co-occurring in these alternating walks within their respective role-specific embedding spaces. This dual-space approach allows NERD to capture complex relationships, such as two hubs being similar because they point to the same authorities, regardless of whether they are directly connected.

NERD maintains separate source and target embedding spaces to explicitly model the asymmetric roles nodes play in directed graphs.

3. Experimental Results

NERD was evaluated on five real-world datasets: Cora, PubMed, Twitter, Epinion, and CoCit.

  • Node Classification: NERD consistently outperformed all baselines, including HOPE and Node2vec, across all datasets.
  • Graph Reconstruction: On the Cora dataset, NERD achieved a 63% improvement in $k=1$ precision compared to the HOPE algorithm.
  • Robustness on Sparse Graphs: On the Twitter follower network, where 99% of nodes have zero out-degree, NERD maintained high accuracy and stability, whereas other walk-based methods like APP struggled significantly.
  • Task Generalization: Unlike specialized methods like HOPE, which may fail on node classification tasks, NERD demonstrates strong performance across all evaluated tasks without requiring task-specific hyperparameter tuning.

4. Conclusion and Future Work

NERD provides a principled approach to learning directed graph embeddings by respecting the dual roles of nodes. By combining alternating random walks with role-specific embedding spaces, it captures the asymmetric topology of directed networks more effectively than previous methods. Future research could explore integrating deep architectures or Graph Neural Networks (GNNs) to further enhance the model's ability to capture non-linear structural features.

Summary updated

BibTeX
@inproceedings{khosla2019node,
  author = {Megha Khosla and Jurek Leonhardt and Wolfgang Nejdl and Avishek Anand},
  title = {{Node Representation Learning for Directed Graphs}},
  booktitle = {ECML/PKDD},
  year = {2019},
  doi = {10.1007/978-3-030-46150-8\_24},
}
Figure