arXiv:2610.39477cs.LGOct 2026

Manuscript Offprint

arXiv:2610.39477

Topology Survives Shuffling: Robust Long-Context Memory Access Prediction for Graph Analytics

Dongyan Sun, Neelesh Gupta, Rajgopal Kannan, Viktor K. Prasanna

Dongyan Sun ∗^{*}, Neelesh Gupta ∗†^{*}\dagger, Rajgopal Kannan ‡^{\ddagger}, Viktor K. Prasanna

University of Southern California, USA

†^{\dagger}DEVCOM Army Research Office, USA

Email: {dongyans, neeleshg, prasanna}@usc.edu, rajgopal.kannan.civ@army.mil

Abstract—Graph analytics over structured complex networks generates irregular, topology-dependent memory-access streams via indirect traversals, limiting the effectiveness of data prefetching. Accurate prediction enables timely prefetches that hide memory latency. However, existing machine-learning predictors couple short histories with fixed horizons, fitting the training trace's node layout rather than learning transferable graph patterns. We propose LoCoMAP, a long-context representation-learning framework for memory-access prediction with independently controlled observation history and prediction horizon. We evaluate Connected Components (CC), PageRank (PR), and Single-Source Shortest Paths (SSSP) on six synthetic graph families, with Erdős–Rényi (ER) and Grid as random and deterministic controls. We test two interventions: same-family regeneration changes connectivity, while node shuffling disrupts layout but preserves connectivity. Across 18 graph–workload pairs, extending history from 8 to 128 accesses improves F1 by 7.8%, while extending prediction horizon from 8 to 512 improves F1 by 88.3%. For CC, regeneration is less disruptive than shuffling: without retraining, long context retains 95.4% of original F1 and outperforms short context in six families. Under full shuffle, long context improves CC F1 by 33.6% across ER, Barabási–Albert, Copying Model, and Stochastic Block Model (SBM), with a 2.06×2.06\times gain on SBM, but not on Watts–Strogatz or Grid, where near-zero delta mass shifts into heavy tails beyond the predictor's range. Long context outperforms short context on six real-world CC graphs. At full shuffle, long-context PR retains 57.6% of original F1 and averages 11.0% above short context. Both SSSP models retain about 30% of original F1 under full shuffle as distance updates access vertex data in a new order. Within these bounds, long-context predictors are robust across related graphs and layouts without retraining, enabling a generalizable graph prefetcher.

Index Terms—data prefetching, graph analytics, graph topology, memory access prediction, long-context modeling

I. INTRODUCTION

Data prefetching hides memory latency by predicting future memory accesses and fetching data into the cache hierarchy before the processor requests it [1]–[3]. Its effectiveness rests on accurate memory access prediction: correct and timely predictions overlap latency with computation, while incorrect ones waste bandwidth and pollute caches [4]. Rule-based hardware prefetchers exploit simple regularities such as streams and strides but fail when accesses become irregular [5]–[8]. Machine learning (ML) prefetchers instead learn access patterns as sequence models and achieve substantially higher accuracy.

on irregular workloads [9]–[11], yet graph analytics remain among the hardest applications to predict [12], [13].

Graph analytics underpin web search, recommendation systems, and social networks [14], [15], but they execute through indirect memory accesses (e.g., row[col[i]] whose targets depend on previously loaded values [16], [17], producing sparse access streams with poor locality that leave graph processing memory-bound [12], [18], [19]. This irregularity, however, is not arbitrary [20], [21]: real-world networks exhibit well-understood structure, such as power-law degree distributions [22], [23], small-world connectivity [24], and community organization [25], all of which can be reproduced under controlled conditions by synthetic graph models [22], [24], [26]–[28]. A predictor that captures this structure can use topology as an exploitable prior for memory access prediction.

Existing ML predictors do not exploit this prior. State-of-the-art approaches such as TransFetch [11], SHARP [29], and MPGraph [13] apply a single short-context configuration, with fewer than ten accesses of history, uniformly to all graph workloads, implicitly assuming that all predictive signal lies within a short window and that one configuration fits every graph structure. Neither assumption holds: different topologies induce fundamentally different delta distributions and temporal dependencies. Scale-free graphs [22] revisit hubs at long, irregular intervals; community-structured graphs [25], [28] produce clustered access bursts that exceed any short window; small-world graphs [24] interleave local traversal with long-range jumps; and spatial grids [30] are nearly deterministic. A short-context predictor cannot distinguish these regimes and instead memorizes the vertex layout of its training trace.

Hence, we propose LoCoMAP, a long-context memory access prediction framework for graph analytics. LoCoMAP executes Single-Source Shortest Paths, PageRank, and Connected Components from the GAP benchmark suite [19] on six synthetic graph families: Erdős–Rényi graphs and spatial grids as controls at the extremes of pure randomness and perfect regularity, and Barabási–Albert, Copying Model, stochastic block model, and Watts–Strogatz graphs as representatives of the major structural classes of real-world networks. LoCoMAP formulates prediction as a long-context representation learning problem in which the look-back length LL, the look-forward window WW, and the delta range DD are independent parameters, separating how much history a predictor needs from how far its predictions should reach. Because longer

∗^{*}These authors contributed equally.

†^{\dagger}Corresponding author.

© 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

contexts raise inference cost under the strict latency budgets of ML prefetching [10], [31]–[33], we characterize the latency and FLOPs cost of extending context alongside its accuracy gains. Finally, we test whether the learned signal is genuinely topological by evaluating trained predictors under progressively shuffled node orderings, which destroy memory locality while preserving connectivity [34], [35]. We summarize our main contributions as follows:

We propose LoCoMAP, a long-context memory-access prediction framework that maps access histories to multi-hot bitmaps of future address deltas. Independently controlling observation history, prediction horizon, and delta range separates the context used to form the representation from the temporal and spatial scope of its predictions.

  • We construct a topology-controlled evaluation of CC, PR, and SSSP across six synthetic graph families. Erdős–Rényi and Grid provide random and deterministic controls; Barabási–Albert, Copying Model, stochastic block model, and Watts–Strogatz capture hub-dominated growth, link copying, community organization, and small-world connectivity across biological, web, social, and infrastructure networks. Same-family regeneration tests unseen connectivity, while progressive node shuffling tests disrupted layouts. Gnutella peer-to-peer, Skitter Internet, Google web, DBLP collaboration, FlyWire connectome, and roadCA networks extend the CC evaluation to real graphs.

  • We quantify the accuracy–cost tradeoff of long context. At fixed prediction horizon, increasing history from 8 to 128 accesses improves geometric-mean F1 by 7.8% across 18 graph–workload pairs and by up to 36.8%, while requiring 21×21\times the per-inference FLOPs and 6.3×6.3\times the latency. At fixed history, increasing the prediction horizon from 8 to 512 accesses improves geometric-mean F1 by 88.3%.

  • We identify the limits of predictor reuse without retraining. Long-context CC outperforms short-context on all held-out same-family instances and six fully shuffled real graphs, improving mean F1 on the latter by 10.2%. Under full shuffle, it improves geometric-mean F1 by 33.6% on ER, BA, CM, and SBM and reaches 2.06×2.06\times short-context F1 on SBM, but loses its advantage on WS and Grid, where delta mass moves beyond the output range. PR retains a long-context advantage on average, but SSSP does not.

References (57)