TL;DR
Training Graph Transformers on massive graphs usually hits a quadratic memory wall, and existing distributed systems often shatter the graph's natural structure when partitioning it across GPUs. BudgetGT solves this by treating distributed graph training like database query optimization: it dynamically rations a strict per-node "attention budget" between immediate neighbors and random walks, then compiles a hardware-aware execution plan to fit your exact GPU memory limits. The result is full-graph training that runs up to 5.6× faster and scores up to 30.4 percentage points higher in accuracy, using a fraction of the GPU memory.
What Problem Does This Paper Address?
Standard Graph Neural Networks (GNNs) pass messages strictly along immediate edges, making them nearsighted. Graph Transformers fix this by letting every node attend to every other node, capturing long-range dependencies. The catch? All-pairs attention scales quadratically ($O(n^2)$) with node count, vaporizing GPU memory on large graphs.
To scale across multiple GPUs, the previous state-of-the-art system (TorchGT) chops graphs into node sequences and relies on strict connectivity conditions to keep attention sparse. In real-world graphs, this breaks down badly: chopping ogbn-products into 256K-node sequences severs 94.7% of its edges and leaves over 63,000 disconnected fragments. Forced to fall back on expensive dense attention within these broken sequences, training becomes slow, memory-heavy, and blind to critical connections. The authors ask: How can we preserve both local and distant graph structure on massive full graphs without blowing up compute or GPU memory?
Methods
Taking a page out of classical database systems, BudgetGT cleanly separates what to compute (the logical plan) from how to execute it (the physical plan).
- Adaptive Logical Planning (Under an Attention Budget): Instead of attending to everything, each node gets a fixed attention budget of at most $B$ connections, drawn from two pools: 1-hop real neighbors (local structure) and random-walk visits (bounded, multi-hop reachability).
Because the ideal mix of local vs. distant info depends on the dataset and model, a lightweight probe-guided controller adjusts the split $(b_r, b_w)$ online between epochs. Using shared random seeds to cancel out sampling noise, it tests adjacent splits on a validation set and freezes the ratio once gains stabilize—dodging costly hyperparameter sweeps.
- Cost-Based Physical Planning (Under a Memory Budget): Once the edge split freezes, a cost-based planner figures out how to build those edges and run backpropagation without triggering Out-Of-Memory (OOM) crashes. Building random walks on the GPU is fast (<1s) but creates massive temporary workspaces in scarce GPU High Bandwidth Memory (HBM). Building on the CPU spares GPU memory, and can be pipelined to run in the background while the GPU crunches the previous step's math.
The planner profiles a single epoch to model phase-specific memory peaks and CPU–GPU overlap windows, then picks the fastest combination of edge-building location (CPU vs. GPU) and activation checkpointing (trading spare HBM to avoid recomputing layers).
Datasets
The system is evaluated across five standard benchmark graphs spanning citation, co-purchase, and social networks, covering both homophilic (similar nodes connect) and heterophilic regimes:
ogbn-arxiv(169K nodes, 1.1M edges)genius(422K nodes, 985K edges — heterophilic)Amazon(1.57M nodes, 264.3M edges)ogbn-products(2.45M nodes, 61.9M edges)snap-patents(2.92M nodes, 14.0M edges — heterophilic)
(Note: Cora and Amazon-Ratings are also used briefly for initial empirical motivation. No new benchmarks are introduced.)
Key Insights and Ideas
- Attention locality is learned, universal, and graph-specific beyond hop 1: Trained Graph Transformers consistently up-weight 1-hop neighbors, while their appetite for distant nodes varies wildly by dataset and architecture. A static topology rule cannot fit all graphs.
- Equal attention budgets do not mean equal hardware costs: A split of 8 random-walk edges vs. 8 real edges has the exact same nominal budget $B=8$, yet sorting real edges on the CPU can take nearly 8× longer than walking, while deduplicating walks on a dense graph (
Amazon) spikes temporary GPU memory to 12.5 GiB. Logical sparsity must be paired with physical planning. - GNN-style $k$-hop expansion translates poorly to Transformers: Fixed 2-hop and 3-hop neighborhoods consistently underperform BudgetGT's adaptive random-walk scopes while risking exponential memory growth.
Key Results
- Speed & Accuracy vs. SOTA: Across four NVIDIA L40 GPUs, BudgetGT trains 2.2–5.6× faster per epoch than TorchGT. It improves accuracy on four of five datasets, highlighted by a +30.4 percentage point jump on
snap-patents(lifting accuracy from ~31.6% to ~62%) and +10.8 to +16.8 pp gains onogbn-productsandogbn-arxiv. - Memory Efficiency: While TorchGT locks ~20.6 GiB of GPU memory everywhere due to dense fallbacks, BudgetGT scales with the budget—using up to an order of magnitude less GPU memory (1.85–3.95 GiB) on smaller graphs.
- Plug-and-Play Generality: Dropping BudgetGT's budgeted scope into GraphGPS and Exphormer matches or beats native Exphormer accuracy using ~2× less memory, and enables training on
Amazonwhere native implementations crash (OOM). - Negligible Planning Overhead: The online controller finds the optimal or tied-for-best split in nearly all runs while adding a median probing cost of just 1.5% of total training time; physical profiling takes under 0.9%.
Limitations and Future Work
- Global Virtual Nodes Fool Early Probing: On
ogbn-arxiv, Graphormer includes a global "virtual node" that gives every query a graph-wide summary early in training. This masks the probe loss differences between local keys, causing the controller to freeze slightly prematurely (costing ~1.2–1.8 pp). - Multi-GPU Communication Scaling: Under sequence parallelism, adding GPUs cuts per-GPU memory reliably, and speeds up training from 1 to 2 GPUs (~2× speedup). Moving to 4 GPUs, however, introduces heavy all-to-all communication overhead (up to 77% of epoch time on lightweight backbones), making 4 GPUs slightly slower than 2 despite expanding memory capacity.
- Fewer Parameter Updates per Epoch: Because full-graph training updates weights once per epoch (versus ~60 mini-batch updates in TorchGT), massive graphs like
Amazonrequire more epochs (6,000 vs. 2,000) to reach parity. - Future Work: Currently, the random-walk length ($L$) and walk count ($R$) are fixed hyperparameters; the authors plan to adapt the walk configuration dynamically during training.
Summary updated