Papers
Topics
Authors
Recent
Search
2000 character limit reached

Global Neighbor Sampling with Caching

Updated 11 January 2026
  • The paper introduces a global caching mechanism that reuses neighbor samples to accelerate computations in both Monte Carlo PDE solvers and graph neural network training.
  • It employs efficient cache construction and kernel-based reweighting strategies to minimize redundant computations and reduce estimator variance.
  • It demonstrates significant practical improvements, achieving up to 2×–14× speedups while maintaining accuracy in complex simulation and training tasks.

Global neighbor sampling with caching is a family of algorithms designed to accelerate sampling-based computations in large-scale problems, ranging from stochastic PDE solvers to distributed and mixed CPU–GPU training of graph neural networks (GNNs). These approaches use a global cache of samples or node data to reduce redundant computation, minimize data movement, or decrease estimator variance, in contrast to purely local or pointwise methods.

1. Fundamental Concepts and Definitions

Global neighbor sampling with caching operates on the core principle of constructing a reusable global set of samples (or node data) that efficiently supports repeated evaluation or learning queries across a domain or a graph. In the canonical setting of solving Laplace’s equation via stochastic representations on domains ΩRn\Omega \subset \mathbb{R}^n, the method builds a cache CC of spatial “centers” coupled with stored walk data. Each walk samples Brownian motion paths outward from centers, storing both first-exit and boundary-hit points, enabling flexible reuse through kernel-based reweighting to estimate the solution at nearby locations. In large-scale GNN training (e.g., SALIENT++ and GNS), the cache consists of selected high-utility node features, which reside in GPU memory and support repeated, importance-weight-corrected neighbor sampling for minibatch computation (Czekanski et al., 2024, Kaler et al., 2023, Dong et al., 2021).

2. Formal Problem Statement and Theoretical Basis

In the Monte Carlo Laplace setting, the problem is to approximate u:ΩRu:\Omega \to \mathbb{R} solving

Δu(x)=0,xΩ;u(x)=f(x),xΩ\Delta u(x) = 0, \quad x \in \Omega; \quad u(x) = f(x), \quad x \in \partial\Omega

with u(x)=Ex[f(Bτ)]u(x) = \mathbb{E}_x[f(B_{\tau})] where BtB_t is Brownian motion and τ\tau the exit time from Ω\Omega (Theorem 2.1 in (Czekanski et al., 2024)). The global neighbor sampling approach constructs a grid-aligned covering of centers CC and, for each cCc\in C, stores CC0 independent Walk-on-Spheres (WOS) trajectories, noted as CC1, where CC2 is the first-exit from sphere CC3 and CC4 the eventual boundary hit. At query, for any CC5 sufficiently deep in CC6, the estimator is

CC7

with local reweighting CC8, where CC9 is the Poisson kernel on the sphere u:ΩRu:\Omega \to \mathbb{R}0.

In GNN training, the analogous problem is to minimize the data movement and memory footprint in mini-batched, multi-hop neighbor sampling. Vertex-wise inclusion probabilities (VIPs) are computed for each vertex u:ΩRu:\Omega \to \mathbb{R}1 as the probability it appears in a u:ΩRu:\Omega \to \mathbb{R}2-hop sample rooted at a particular partition. The static caching policy selects the highest-VIP nodes for replication on each worker, enabling efficient local and remote sampling (Kaler et al., 2023, Dong et al., 2021).

3. Algorithmic Structure and Pseudocode

Monte Carlo PDE (Laplace) Global Neighbor Sampling

Cache Construction (Offline):

  1. Cover u:ΩRu:\Omega \to \mathbb{R}3 with a u:ΩRu:\Omega \to \mathbb{R}4-spaced grid u:ΩRu:\Omega \to \mathbb{R}5; select u:ΩRu:\Omega \to \mathbb{R}6.
  2. For each u:ΩRu:\Omega \to \mathbb{R}7, run u:ΩRu:\Omega \to \mathbb{R}8 WOS walks to generate and cache u:ΩRu:\Omega \to \mathbb{R}9.

Query (Online):

  1. For query Δu(x)=0,xΩ;u(x)=f(x),xΩ\Delta u(x) = 0, \quad x \in \Omega; \quad u(x) = f(x), \quad x \in \partial\Omega0, find Δu(x)=0,xΩ;u(x)=f(x),xΩ\Delta u(x) = 0, \quad x \in \Omega; \quad u(x) = f(x), \quad x \in \partial\Omega1 via spatial indexing.
  2. Aggregate cached walk outcomes with Poisson-kernel reweighting to form the estimator Δu(x)=0,xΩ;u(x)=f(x),xΩ\Delta u(x) = 0, \quad x \in \Omega; \quad u(x) = f(x), \quad x \in \partial\Omega2.

Distributed/Mixed CPU–GPU GNN Training

Cache Construction:

  1. Compute per-node sampling probabilities (degree-based or via propagation of initial distribution from training nodes).
  2. Sample a global cache Δu(x)=0,xΩ;u(x)=f(x),xΩ\Delta u(x) = 0, \quad x \in \Omega; \quad u(x) = f(x), \quad x \in \partial\Omega3 of nodes to reside in GPU memory, proportional to their utility.
  3. For each mini-batch, perform in-GPU neighbor sampling, preferring cached nodes and applying importance correction where needed (Dong et al., 2021).

SALIENT++ / VIP-Based Distributed Caching:

  1. Given graph partitions and mini-batch scheme, compute the exact VIPs for each remote vertex.
  2. Statistically rank and cache the highest-VIP candidates up to the allowed replication factor (Δu(x)=0,xΩ;u(x)=f(x),xΩ\Delta u(x) = 0, \quad x \in \Omega; \quad u(x) = f(x), \quad x \in \partial\Omega4).
  3. The cache remains static per epoch (or several epochs). Queries to uncached nodes are rare and handled asynchronously, overlapping communication with computation.

Pseudocode snippets outlining these phases are provided in the original sources (Czekanski et al., 2024, Kaler et al., 2023, Dong et al., 2021).

4. Data Structures, Sampling Strategies, and Complexity

The cache for Laplace’s equation consists of tuples Δu(x)=0,xΩ;u(x)=f(x),xΩ\Delta u(x) = 0, \quad x \in \Omega; \quad u(x) = f(x), \quad x \in \partial\Omega5, indexed spatially (e.g., kd-tree, uniform grid with cell size Δu(x)=0,xΩ;u(x)=f(x),xΩ\Delta u(x) = 0, \quad x \in \Omega; \quad u(x) = f(x), \quad x \in \partial\Omega6), supporting Δu(x)=0,xΩ;u(x)=f(x),xΩ\Delta u(x) = 0, \quad x \in \Omega; \quad u(x) = f(x), \quad x \in \partial\Omega7 neighbor retrieval per query, with Δu(x)=0,xΩ;u(x)=f(x),xΩ\Delta u(x) = 0, \quad x \in \Omega; \quad u(x) = f(x), \quad x \in \partial\Omega8 neighbors within radius Δu(x)=0,xΩ;u(x)=f(x),xΩ\Delta u(x) = 0, \quad x \in \Omega; \quad u(x) = f(x), \quad x \in \partial\Omega9. In GNN methods, the GPU cache includes a dense feature tensor indexed by position, adjacency lists of cached neighbors for each node, and mapping tables for gather/scatter during neighbor aggregation (Dong et al., 2021).

Neighbor selection strategies include:

  • Equal-weight scheme: restricts the neighbor set to guarantee variance bounds (e.g., u(x)=Ex[f(Bτ)]u(x) = \mathbb{E}_x[f(B_{\tau})]0).
  • Inverse-variance weighting: expands the set to all u(x)=Ex[f(Bτ)]u(x) = \mathbb{E}_x[f(B_{\tau})]1 with weights optimizing variance (Czekanski et al., 2024).
  • VIP-based selection (GNN): statically weights and ranks cache candidates by their expected inclusion probability, minimizing communication (Kaler et al., 2023).

Offline cost for cache construction is u(x)=Ex[f(Bτ)]u(x) = \mathbb{E}_x[f(B_{\tau})]2 (Laplace, with u(x)=Ex[f(Bτ)]u(x) = \mathbb{E}_x[f(B_{\tau})]3 the required boundary tolerance), while online query is u(x)=Ex[f(Bτ)]u(x) = \mathbb{E}_x[f(B_{\tau})]4 per evaluation, yielding end-to-end u(x)=Ex[f(Bτ)]u(x) = \mathbb{E}_x[f(B_{\tau})]5 total cost for u(x)=Ex[f(Bτ)]u(x) = \mathbb{E}_x[f(B_{\tau})]6 queries (Czekanski et al., 2024). For GNNs, cache size is often u(x)=Ex[f(Bτ)]u(x) = \mathbb{E}_x[f(B_{\tau})]7 of u(x)=Ex[f(Bτ)]u(x) = \mathbb{E}_x[f(B_{\tau})]8, and communication reduction is proportional to the cache hit rate (Dong et al., 2021).

5. Variance Reduction and Statistical Guarantees

In the Laplace setting, the variance of the reused-walk estimator via global neighbor sampling is provably reduced: for u(x)=Ex[f(Bτ)]u(x) = \mathbb{E}_x[f(B_{\tau})]9 effective neighbor centers, variance drops by a factor of BtB_t0 compared to pointwise estimation, i.e., BtB_t1 (Theorem 4.3, (Czekanski et al., 2024)), where BtB_t2 bounds the range of BtB_t3. Lemma 4.2 quantifies the variance–neighbor radius tradeoff, while cache covering and neighbor selection determine the effective BtB_t4 for variance stacking.

For GNNs, theoretical analysis yields that as soon as the cache size and fan-out meet BtB_t5 (with notation as in (Dong et al., 2021)), the mean-squared-error of gradients under cached sampling matches the order of that from the full node-wise sampler. Convergence rate of stochastic gradient descent is thus preserved for sufficiently sized cache.

6. Empirical and Practical Assessment

Empirical evaluations demonstrate the variance and error reduction in Laplace-PDE applications: in BtB_t6 domains, equal-weighted or variance-weighted estimators show BtB_t7–BtB_t8 lower BtB_t9 error over original WOS under fixed budget, and error remains stable under growth in evaluation points when reuse is employed (Czekanski et al., 2024).

In large-scale GNN settings, global neighbor sampling with caching yields significant speedups (up to τ\tau0 vs node-wise sampling; τ\tau1 vs layer-based sampling such as LADIES), with negligible or no loss in model accuracy. Cache hit rates above τ\tau2 are typical with τ\tau3 replication fractions, and communication overhead becomes negligible due to pipelined overlap (Kaler et al., 2023, Dong et al., 2021). Table-based results in the primary references summarize epoch times, F1 scores, and the dependency on cache size across several publicly available datasets.

Application Method (Cache) Speedup Accuracy Impact
Laplace equation Global Neighbor (WOS) τ\tau4–τ\tau5 lower error Stable/Less Variance
GNN (Products) GNS, SALIENT++ τ\tau6–τ\tau7 τ\tau8 of baseline F1

7. Trade-offs and Tuning Considerations

Key tuning parameters for successful deployment are cache size (e.g., spatial quantization parameter τ\tau9, or fraction Ω\Omega0 in distributed GNN training) and neighbor selection/radius (e.g., factor Ω\Omega1 or use of the full kernel reweighting). Decreasing Ω\Omega2 increases cache memory and offline cost, but allows more optimal near-boundary queries and higher variance reduction. Expanding the neighbor radius Ω\Omega3 (or weight function) raises the effective number of walks Ω\Omega4 participating in estimation and thus reduces variance, with diminishing returns if variance per walk increases. In distributed GNN contexts, replication fraction directly controls memory–bandwidth trade-off and is typically set to achieve Ω\Omega5 cache hit-rate.

By appropriate parameter selection, global neighbor sampling with caching transforms methods with otherwise superlinear or communication-bound scaling into computationally efficient, linear-in-query (or epoch) algorithms with substantial variance and bandwidth reduction (Czekanski et al., 2024, Kaler et al., 2023, Dong et al., 2021).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Global Neighbor Sampling with Caching.