arXiv:2611.04683cs.DCNov 2026

Manuscript Offprint

arXiv:2611.04683

FenixWalk: Adaptive Sampling for Large-Scale Dynamic Graphs on Heterogeneous Architectures

Pinhuan Wang, Jianian Fu, Jie Zhang, Shixuan Sun, Qing Wang, Xiaoliang Wang, Chen Tian, Chengying Huan

Pinhuan Wang*

Nanjing University

Nanjing, China

pinhuan.wang02@gmail.com

Jianian Fu*

Nanjing University

Nanjing, China

f36351010@gmail.com

Qing Wang

Nanjing University

Nanjing, China

wangqing.cs@nju.edu.cn

Xiaoliang Wang

Nanjing University

Nanjing, China

waxili@nju.edu.cn

Jie Zhang

Peking University

Beijing, China

jiez@pku.edu.cn

Shixuan Sun

Shanghai Jiao Tong

University

Shanghai, China

sunshixuan@sjtu.edu.cn

Chen Tian

Nanjing University

Nanjing, China

tianchen@nju.edu.cn

Chengying Huan

Nanjing University

Nanjing, China

huanchengying@nju.edu.cn

Abstract

Random walks are fundamental to graph analytics, yet executing them efficiently on large, evolving graphs remains challenging. Existing approaches must balance sampling efficiency, update overhead, and memory consumption. Sampling structures optimized for throughput often incur substantial memory overhead and costly maintenance, whereas lightweight alternatives can suffer from high sampling latency on high-degree vertices or skewed weight distributions. These challenges become more pronounced on heterogeneous CPU-GPU platforms, where host memory provides capacity but GPU memory limits the amount of graph data that can benefit from parallel acceleration.

We present FenixWalk, a memory-efficient random-walk system that combines unified in-place sampling with selective GPU acceleration for large-scale dynamic graphs. At its core, FenixWalk employs an in-place Fenwick representation that supports both rejection sampling and inverse-transform sampling without duplicating edge-level weight storage. This representation enables expected O(1)O(1) weight lookup for rejection sampling, together with O(log⁡d)O(\log d) prefix sampling and updates. To exploit heterogeneous hardware efficiently, FenixWalk maintains the complete graph and its sampling structures in host memory while selectively placing frequently reused vertex-local samplers on the GPU. By transferring compact walker states instead of repeatedly migrating graph partitions, the system reduces cross-device communication and makes effective use of limited GPU memory. Experiments on large real-world graphs and representative random-walk workloads demonstrate that FenixWalk achieves average speedups ranging from 2.06×2.06\times to 400.57×400.57\times over existing random-walk systems.

1 Introduction

Random walks are a fundamental primitive for graph analytics. They are widely used in graph mining and representation learning [16, 33], web ranking and personalized

search [17, 28], scalable graph neural network training [47], and large-scale recommendation [11, 46]. For example, DeepWalk [33] and node2vec [16] learn node embeddings from random-walk traces, while PageRank and its variants [17, 28] estimate vertex importance from the stationary behavior of random-walk processes. Recent graph-learning and recommendation systems further use random walks as a scaling mechanism, supporting compact minibatch construction and efficient item retrieval over massive graphs [11, 46, 47].

Many of these applications run on graphs that evolve over time. In such graphs, edges are continuously inserted, deleted, or modified, and random walks must be generated on updated snapshots to keep downstream results fresh. For example, Wharf [31] shows that reusing stale personalized PageRank walks after graph updates can, in practice, result in a symmetric mean absolute percentage error exceeding 80%, indicating that results derived from stale walks can differ substantially from those computed on the updated graph.

Keeping random-walk results fresh on dynamic graphs ultimately relies on transition sampling over updated graph snapshots: given a vertex, the system samples the next vertex from its candidate neighbors according to a transition distribution. Even on static graphs, this operation can dominate end-to-end execution time; prior work reports that sampling accounts for up to 96.2% of graph-learning training time [14]. Dynamic graphs further complicate this because every edge insertion or deletion changes the transition distribution of the affected vertices. Therefore, supporting dynamic random walks requires more than updating graph storage: the sampling process must also adapt to updated transition distributions. Maintaining efficient transition sampling under frequent graph updates thus remains a critical algorithmic challenge: the sampler must provide high sampling throughput while keeping update and memory costs under control. Algorithmic Challenge. Existing sampling methods expose a three-way trade-off among sampling performance, update

*Both authors contributed equally to this work.

cost, and memory overhead. Alias-based systems [38, 45] provide O(1)O(1) sampling after preprocessing, but they store auxiliary alias and probability entries and may require rebuilding vertex-local tables after edge or weight updates, incurring substantial update overhead. Rejection- and reservoir-based systems avoid auxiliary sampling structures and are therefore easy to update [21, 27, 32], but their per-sample cost can be high: rejection sampling may require many trials under skewed weights, while reservoir sampling scans the adjacency list and is inefficient for high-degree vertices. Inverse-transform sampling (ITS) supports O(log⁡do)O(\log d_o) sampling through binary search over a maintained prefix-sum array [30], but the array incurs additional memory overhead and can be expensive to maintain under updates. Bingo [37] improves sampling and update performance for dynamic graphs, but its radix-based decomposition introduces substantial memory overhead. Consequently, existing designs still face a tension among efficient sampling, inexpensive updates, and low memory overhead.

This trade-off motivates a closer look at rejection sampling and ITS. Rejection sampling is attractive for dynamic graphs because each proposal only requires the weight of a uniformly sampled edge position, but its efficiency degrades as the acceptance probability decreases. ITS, in contrast, is robust to weight skew, but its conventional prefix-sum array is costly to maintain under updates. A Fenwick tree provides a natural alternative, supporting both ITS sampling and weight updates in O(log⁡d)O(\log d) time. Our key observation is that the Fenwick representation can also provide efficient point-weight lookup for rejection sampling. Although recovering an arbitrary edge weight from a Fenwick tree can take O(log⁡d)O(\log d) time in the worst case, the cost depends on the number of trailing zero bits of the queried index. Since rejection sampling proposes edge positions uniformly, this lookup requires fewer than two Fenwick-entry accesses on average. Thus, a single Fenwick representation can support both sampling strategies without retaining a separate weight array.

Based on this observation, our core idea is to directly encode each vertex's edge weights in an in-place Fenwick representation. For a vertex of degree dd, FenixWalk transforms the original dd weight-sized slots into a Fenwick tree of the same length. The representation supports O(log⁡d)O(\log d) prefix sampling and updates for ITS, while providing expected O(1)O(1) weight lookup for rejection sampling. FenixWalk can therefore choose between rejection sampling and ITS at runtime according to the degree and weight distribution of each vertex, without changing or duplicating the underlying sampling state. This in-place representation combines the robustness of ITS with the expected efficiency of rejection sampling while using only the original edge-level weight storage.

System Challenge. The proposed in-place sampler alone addresses the algorithmic challenge, but deploying it at large scale introduces a system challenge. Modern graphs can contain billions of edges, and a random-walk engine must store

the graph topology, edge weights, sampling state, and active walker state. Host DRAM can hold such graphs, but CPU-only execution provides limited throughput for the massive number of independent walk steps. GPUs offer high bandwidth and parallelism, but device memory is much smaller than host memory. Even with a compact sampler, the entire dynamic graph may not fit on the GPU. A natural response is hybrid CPU-GPU execution, but existing designs are not well matched to random walks. Systems that repeatedly transfer graph partitions across the CPU-GPU boundary can move far more data than each walk step actually consumes [43]. A random-walk step touches only the current vertex's local distribution, and the next vertex is known only after sampling. The system challenge is therefore to exploit GPU parallelism while treating GPU memory as a limited execution resource.

To address above challenges, we present FenixWalk, a hybrid CPU-GPU random-walk engine for large dynamic graphs. FenixWalk combines the in-place dynamic sampler with selective GPU residency. It keeps the complete dynamic graph and all samplers in CPU memory while placing only high-reuse vertex-local samplers on the GPU. Walkers located at GPU-resident vertices perform transition sampling on the GPU; walkers at nonresident vertices are processed by CPU worker threads. During normal execution, FenixWalk transfers active walker states rather than repeatedly moving adjacency lists or sampling structures. The resident set is refreshed at epoch granularity using visit-frequency estimates and memory cost, so GPU memory is spent on vertices whose expected reuse justifies their device footprint.

The in-place sampler and the hybrid CPU-GPU engine reinforce each other. Because each sampler uses only the original weight slots, more useful vertices can remain resident under the same GPU memory budget. This combination lets FenixWalk support dynamic graphs while using CPU memory for capacity and the GPU for high-reuse sampling.

This paper makes the following contributions:

  • We propose a dynamic transition-sampling method that unifies rejection sampling and inverse-transform sampling in a single sampler and selects the more efficient strategy for each vertex at runtime (Section 3).

  • We show that a Fenwick representation can serve both sampling strategies. It supports O(log⁡d)O(\log d) prefix sampling and updates for ITS, while providing expected O(1)O(1) point-weight lookup for rejection sampling, using only the original dd weight-sized slots (Section 3).

  • We build a hybrid CPU-GPU random-walk engine that keeps the dynamic graph in host DRAM and places only high-reuse vertex-local samplers on the GPU, avoiding repeated migration of large adjacency lists or sampling structures (Section 4).

  • We evaluate FenixWalk on large real-world graphs and representative random-walk workloads under dynamic updates. By combining compact in-place samplers with selective GPU residency, FenixWalk achieves 2.06x to 400.57x average walk-execution speedups over existing random-walk systems (Section 6).

References (13)