Paper deep dive
Scalable and Adaptive Parallel Training of Graph Transformer on Large Graphs
Jun-Liang Lin, Kamesh Madduri, Mahmut Taylan Kandemir
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 98%
Last extracted: 4/27/2026, 4:35:30 AM
Summary
The paper introduces a distributed training framework for Graph Transformers designed to handle large-scale graphs on multi-GPU systems. It addresses the limitations of single-GPU implementations and existing mini-batch distributed frameworks by focusing on 'graph parallelism' for full-graph training. The framework proposes two main strategies: Graph Parallelism with All-Gather (GP-AG) and Graph Parallelism with All-to-All (GP-A2A). Additionally, it introduces the Automatic Graph Parallelism (AGP) algorithm, which uses an analytical model to automatically select the optimal parallelization strategy based on graph structure and hardware configuration. Experimental results show up to a 6x speedup on 8 GPUs and a 78% reduction in memory consumption compared to state-of-the-art frameworks.
Entities (11)
Relation Signals (6)
Graph Transformer → requires → SpMM
confidence 100% · multiplication with matrix V in Equation 5 can be performed using SpMM
Graph Transformer → requires → SDDMM
confidence 100% · computing the sparse graph attention requires several sparse operations... including SDDMM
GP-AG → uses → All-Gather
confidence 100% · The first strategy, GP-AG (Graph Parallelism with All-Gather), distributes nodes across workers and invokes all-gather operations
GP-A2A → uses → All-to-All
confidence 100% · The second strategy, GP-A2A (Graph Parallelism with All-to-All), also distributes nodes across workers and invokes all-to-all communication
Automatic Graph Parallelism → selects → GP-AG
confidence 90% · automatically applies the optimal parallelization strategy to training of sparse graph transformers
Automatic Graph Parallelism → selects → GP-A2A
confidence 90% · automatically applies the optimal parallelization strategy to training of sparse graph transformers
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Graph foundation models have demonstrated remarkable adaptability across diverse downstream tasks through large-scale pretraining on graphs. However, existing implementations of the backbone model, graph transformers, are typically limited to single-GPU systems, leading to long training times or out-of-memory issues on large graphs. Moreover, parallelizing graph transformer training over the full graph is challenging, as efficiency depends heavily on both the graph structure and system characteristics, such as bandwidth and memory capacity. In this work, we introduce a distributed training framework for graph transformers, which automatically selects and optimizes parallelization strategies based on the graph structure and hardware configuration. With our implementation of distributed sparse operations, we accelerate sparse graph attention by up to 3.8x and reduce memory consumption by 78% compared to state-of-the-art frameworks. On large graph benchmarks, our proposed framework achieves up to 6x speedup with system scaling up to 8 GPUs. These results demonstrate that the proposed framework improves the scalability of graph transformers, bringing them closer to serving as practical graph foundation models.
Tags
Links
- Source: https://arxiv.org/abs/2604.16715v1
- Canonical: https://arxiv.org/abs/2604.16715v1
Trouble viewing inline? Open PDF directly →
Full Text
39,608 characters extracted from source content.
Expand or collapse full text
by Scalable and Adaptive Parallel Training of Graph Transformer on Large Graphs Jun-Liang Lin The Pennsylvania State UniversityUniversity ParkPAUSA jpl6521@psu.edu , Kamesh Madduri The Pennsylvania State UniversityUniversity ParkPAUSA madduri@psu.edu and Mahmut Taylan Kandemir The Pennsylvania State UniversityUniversity ParkPAUSA mtk2@psu.edu (2026) Abstract. Graph foundation models have demonstrated remarkable adaptability across diverse downstream tasks through large-scale pretraining on graphs. However, existing implementations of the backbone model, graph transformers, are typically limited to single-GPU systems, leading to long training times or out-of-memory issues on large graphs. Moreover, parallelizing graph transformer training over the full graph is challenging, as efficiency depends heavily on both the graph structure and system characteristics, such as bandwidth and memory capacity. In this work, we introduce a distributed training framework for graph transformers, which automatically selects and optimizes parallelization strategies based on the graph structure and hardware configuration. With our implementation of distributed sparse operations, we accelerate sparse graph attention by up to 3.8x and reduce memory consumption by 78% compared to state-of-the-art frameworks. On large graph benchmarks, our proposed framework achieves up to 6x speedup with system scaling up to 8 GPUs. These results demonstrate that the proposed framework improves the scalability of graph transformers, bringing them closer to serving as practical graph foundation models. †copyright: acmlicensed†journalyear: 2026†copyright: c†conference: 63rd ACM/IEEE Design Automation Conference; July 26–29, 2026; Long Beach, CA, USA†booktitle: 63rd ACM/IEEE Design Automation Conference (DAC ’26), July 26–29, 2026, Long Beach, CA, USA†doi: 10.1145/3770743.3804417†isbn: 979-8-4007-2254-7/2026/07 1. Introduction With the rapid development of transformer models, research has shown that scaling up both the size of the model and the pretraining data leads to stronger performance (Hoffmann et al., 2022). Larger pretrained models exhibit remarkable adaptability across a wide range of downstream tasks, demonstrating strong transferability and generalization (Achiam et al., 2023; Dubey et al., 2024; Comanici et al., 2025). These pretrained models are commonly referred to as “foundation models” because they serve as a universal base (foundation) on which diverse applications can be built, allowing performance improvements by leveraging the rich knowledge encoded within them. Extending this paradigm to graph-structured data, graph foundation models aim to learn universal representations through large-scale self-supervised pretraining, enabling broad applicability to downstream tasks via finetuning or prompt tuning (Gui et al., 2024; Sun et al., 2022; Liu et al., 2024). Among candidate architectures, “graph transformers” have emerged as a promising backbone due to their ability to capture both structural and semantic patterns in graphs (Dwivedi and Bresson, 2020; Shi et al., 2021; Rampášek et al., 2022; Shirzad et al., 2023; Zhuo et al., 2025). Recent studies have explored their effectiveness in multiple domains and various pretraining strategies have been proposed to further enhance their generalization and transferability (Gui et al., 2024; Zi et al., 2024). Scaling graph transformers to larger graphs is crucial for advancing graph foundation models (Liu et al., 2025). However, recent graph transformer designs mainly target single-GPU training (Dwivedi and Bresson, 2020; Shi et al., 2021; Rampášek et al., 2022; Shirzad et al., 2023), and therefore fail to scale algorithms and models to large graphs. In contrast, modern graph neural network (GNN) training frameworks, such as DistDGL (Zheng et al., 2020) and BGL (Liu et al., 2023), do support distributed multi-GPU training, but they are mostly designed for mini-batch training, where subgraphs are sampled and processed in each iteration. This paradigm is not applicable to general graph transformers, which rely on full-graph information to capture long-range dependencies. Although some distributed training frameworks support full-graph GNN workloads, they are largely optimized for simple GCN models (Wan et al., 2022, 2023; Fu et al., 2025). None of these frameworks support graph transformers, which involve substantially more complex computation and communication patterns. Several recent approaches, such as SGFormer (Wu et al., 2023) and TorchGT (Zhang et al., 2024), attempt to scale graph transformers through graph clustering or partitioning, but they inevitably sacrifice parts of the graph structure, losing the ability to fully exploit global information. In other words, no existing framework provides an efficient solution for distributed graph transformer training with full graphs. These limitations motivate a critical question: How can we enable distributed training of graph transformer models on full graphs while ensuring scalability on multi-GPU systems? Following the transformer design used in large language models (LLMs), general graph transformers incorporate query, key, and value projections along with a self-attention mechanism. However, a key distinction is that instead of computing full attention on all pairs of nodes, graph transformers restrict attention to neighboring nodes, resulting in a sparse attention mask (Dwivedi and Bresson, 2020; Rampášek et al., 2022; Shirzad et al., 2023; Shi et al., 2021). This mask corresponds to the adjacency matrix of the graph and can be represented in sparse formats such as Coordinate (COO) or Compressed Sparse Row (CSR) (Saad, 1990). Consequently, attention computation is performed through a series of sparse operations, including sparse matrix–matrix multiplication (SpMM) and sampled dense–dense matrix multiplication (SDDMM) (Nisa et al., 2018; Rahman et al., 2021). To achieve scalable training of graph transformers, it is crucial to distribute these sparse operations efficiently across multiple devices. Unlike LLMs, where model parameters dominate memory consumption, training graph transformers is often constrained by the size of the graph data itself. As a result, traditional parallelization strategies used in LLM training, such as data parallelism and model parallelism (Narayanan et al., 2021), are not effective for scaling graph transformer training on large graphs. Therefore, we focus on “graph parallelism”, referring to exploiting parallelism based on the graph structure and its features. In this direction, there exist multiple strategies, each with different computation costs, communication overhead, and memory footprints (Bajaj et al., 2024). Determining the optimal strategy is challenging due to the diversity of graph structures and the variability in system configurations. In this paper, we address these challenges by introducing a “distributed training framework” to enable training of the graph transformer on full large graphs. The main contributions of this work are as follows: ∙ We propose two parallelization strategies, Graph Parallelism with All-Gather (GP-AG) and Graph Parallelism with All-to-All (GP-A2A), to enhance training efficiency through the use of sparse operators and reduce memory consumption significantly. ∙ We introduce an algorithm, Automatic Graph Parallelism (AGP), which automatically applies the optimal parallelization strategy to training of sparse graph transformers on large graphs, based on the target graph structure and system configurations. ∙ We present a detailed experimental evaluation of our algorithm. This evaluation demonstrates strong scalability (achieving up to a 6x speedup on 8 GPUs) for full-graph training on large graphs, along with substantial improvements in training efficiency over prior approaches (up to a 3.8x speedup and a 78% reduction in memory usage). 2. Graph Transformers with Sparse Graph Attention 2.1. Definition of Sparse Graph Transformer A typical graph transformer design follows the definition in the early work UniMP (Shi et al., 2021), which can be represented as follows: (1) i′=oi+∑j∈(i)αi,jVj,x _i=W_ox_i+ _j (i) _i,jW_Vx_j, (2) αi,j=softmax((Qi)⊤(Kj)d), _i,j= softmax ( (W_Qx_i) (W_Kx_j) d ), where ix_i and i′x _i are the input and output features of node i, Ws are the weight matrices, and (i)N(i) is the set of neighbors of node i. Note that we can rewrite and extend it into the matrix form. Given a graph G with N nodes and feature dimension d, along with a dense feature matrix X∈ℝN×dX ^N× d and a sparse adjacency matrix A∈0,1N×NA∈\0,1\^N× N, the general form of the “Sparse Graph Attention” (SGA) can be calculated as follows: (3) Q=XWQ,K=XWK,V=XWV,Q=XW_Q,K=XW_K,V=XW_V, (4) Z=(QK⊤)⊙A,U=Softmax(Zd),Z=(QK ) ,U=Softmax( Z d), (5) Y=UV,X’=XWo+Y,Y=UV,X'=XW_o+Y, where WQW_Q, WKW_K, and WVW_V are the weight matrices of size d×d× d, Z and U are sparse matrices, and Y is the summation term in Equation 1. The attention mechanism can also be extended into multi-head attention (MHA), which splits the features into multiple subspaces, computes attention independently in each, and then combines the results to capture diverse relational patterns in parallel. 2.2. Sparse Operations During Forward and Backward Propagation For large graphs, the adjacency matrix A is usually represented in a sparse format such as COO or CSR. Consequently, computing the sparse graph attention requires several sparse operations. Specifically, the computation of (QK⊤)⊙A(QK ) in Equation 4 can be efficiently implemented with SDDMM (Nisa et al., 2018; Rahman et al., 2021). Note that the output of this operation is also a sparse matrix. Thus, multiplication with matrix V in Equation 5 can be performed using SpMM. As a result, the entire forward propagation of SGA involves 1 SDDMM, 1 SpMM, and the 3 dense matrix multiplications (M) in Equation 3. For backward propagation, each SpMM in the forward pass requires one SpMM and one SDDMM in the backward pass, while each SDDMM in the forward pass requires two SpMM operations in the backward pass. Therefore, the backward pass requires a total of three SpMM operations and one SDDMM operation. Figure 1. The two different parallelization strategies for calculating the attention matrix. N denotes the number of nodes, h the number of heads, and d′d the head dimension. 3. Distributed Training of Sparse Graph Transformers In this section, we discuss two parallelization strategies in terms of communication cost and peak memory consumption. The first strategy, GP-AG (Graph Parallelism with All-Gather), distributes nodes across workers and invokes all-gather operations (Chan et al., 2007) during the forward propagation of sparse graph attention. The second strategy, GP-A2A (Graph Parallelism with All-to-All), also distributes nodes across workers but invokes all-to-all communication (Chan et al., 2007) during forward propagation. Figure 1 illustrates the process of collecting matrices Q and K and the corresponding calculation of the attention matrix with these two parallelization strategies. 3.1. GP-AG: Graph Parallelism with All-Gather Consider training graph transformers using p GPUs, where nodes are partitioned across workers. In this setting, the dense matrix multiplications required for the QKV transformations incur no additional communication overhead (Equation 3). When calculating the attention matrix in Equation 4, each device must gather the entire matrix K, causing a data transfer of (N⋅d⋅p−1p)O(N· d· p-1p). For Equation 5, the entire matrix V also needs to be gathered, causing another (N⋅d⋅p−1p)O(N· d· p-1p) data transfer. For clarity, we simplify the term p−1p p-1p in the following discussion. Algorithm 1 outlines the detailed steps of this process. The all-gather communication performed in the forward pass necessitates a matching Reduce-Scatter operation in the backward pass. Overall, GP-AG incurs two all-gather and two reduce-scatter calls for the attention computation, while each worker computes the attention over its assigned subgraph for all attention heads. Input: X, A, WQW_Q, WKW_K, WVW_V Output: Y Q, K, V ← XWQXW_Q, XWKXW_K, XWVXW_V; KallK_all ← all-gather (K); /* [(N/p),h,d’]->[N,h,d’] */ 1 Z ← SDDMM(A, Q, Kall⊤K_all ); 2 U ← softmax(Z/d d); 3 VallV_all ← all-gather (V); Y ← SpMM(U, VallV_all); /* [(N/p),h,d’] */ return Y Algorithm 1 Forward propagation of GP-AG. Input: X, A, WQW_Q, WKW_K, WVW_V Output: Y Q, K, V ← XWQXW_Q, XWKXW_K, XWVXW_V; Q′Q ← all-to-all (Q); /* [(N/p),h,d’]->[N,(h/p),d’] */ 1 K′K ← all-to-all (K); 2 Z′Z ← SDDMM(A, Q′Q , K′⊤K ); 3 U′U ← Softmax(Z′Z /d d); 4 V′V ← all-to-all (V); 5 Y′Y ← SpMM(U′U , V′V ); Y ← all-to-all (Y′Y ); /* [N,(h/p),d’]->[(N/p),h,d’] */ return Y Algorithm 2 Forward propagation of GP-A2A. 3.2. GP-A2A: Graph Parallelism with All-to-All Since the calculations for each attention head are independent, they do not introduce additional communication overhead. With this in mind, we employ an all-to-all strategy to efficiently distribute the computational workload. In the GP-A2A training, each worker computes the Q, K, and V matrices for a subset of nodes. We then use all-to-all communication to exchange data along the split dimension, transforming it from node-based partitioning (dimension N) to head-based partitioning (dimension h). This allows each worker to collect all nodes but only a portion of the features. Attention computation proceeds in parallel across workers, with each worker responsible for different attention heads. Finally, another all-to-all communication is used to revert the partitioning back to dimension N, restoring the initial partitioning scheme. Algorithm 2 outlines the detailed steps of this process. Each all-to-all communication in the forward pass results in a corresponding all-to-all operation in the backward pass. Consequently, GP-A2A incurs a total of eight all-to-all calls for the attention computation, with each worker computing attention over the entire graph but only for a portion of the attention heads. Table 1 provides a summary of the communication costs and memory consumption for the two strategies. 4. Automatic Graph Parallelism for Sparse Graph Transformers In this section, we propose an analytical model to estimate training throughput based on graph properties and system configuration. We then explain how to determine the coefficients in the model and estimate the performance as the system scales. Table 1. Comparison of communication costs and memory consumption for different parallelization strategies per attention block per GPU. AG: All-Gather, RS: Reduce-Scatter, A2A: All-to-All. Comm. Cost Act. Memory Graph storage GP-AG 2 AG + 2 RS 4NdNd 4Nd+Ehp4Nd+ Ehp Np+Ep Np+ Ep GP-A2A 8 A2A 8Ndp Ndp 4Ndp+Ehp 4Ndp+ Ehp N+EN+E Table 2. The properties of the graph datasets and the microbenchmark of compute kernels on an A100 GPU. Dataset Nodes Edges M SpMM SDDMM ogbn-arxiv 169K 1.1M 0.33 ms 0.97 ms 0.45 ms ogbn-proteins 132K 79M 0.27 ms 51.63 ms 25.11 ms ogbn-products 2.4M 123M 4.84 ms 91.43 ms 54.43 ms reddit 233K 114M 0.46 ms 76.55 ms 39.14 ms 4.1. Workload Analysis We begin by examining how the size of the graph impacts the training performance of the graph transformers by profiling the key kernels involved in training. Typically, three types of kernel are utilized. Dense matrix-multiplication (denoted as M) is used to calculate the Q, K, and V matrices, with a problem size of N×d×dN× d× d. On the other hand, SDDMM is used when calculating the attention matrix, with a problem size of N×d×N× d× N. Finally, SpMM is used when multiplying the attention matrix by the V matrix, with a problem size of N×N×dN× N× d. Table 2 presents the graph properties alongside the runtime performance of the SpMM, SDDMM, and M kernels. From these experiments, we derive two key insights: ∙ The execution time of sparse operations is determined mainly by the number of edges, whereas the runtime of dense operations depends on the number of nodes. ∙ Sparse operations, particularly SpMM and SDDMM, dominate the computational workload throughout the training process. Thus, it becomes essential to focus on analyzing and optimizing sparse operations to enhance the efficiency of graph transformer training. 4.2. Theoretical Runtime Analysis To estimate the throughput of graph transformers as the system scales, we begin by modeling the theoretical runtime. In distributed training, the total iteration time can be expressed as follows: (6) titer=tcompute+tcomm.t_iter=t_compute+t_comm. According to our previous analysis, the runtime of the compute kernels in a distributed graph transformer is related to the number of edges, and the runtime of communication kernels is related to the number of nodes. Therefore, we can rewrite the above equation as a function of the number of GPUs p as follows: (7) titer(p)=α(p)⋅E+βc(p)⋅N,t_iter(p)=α(p)· E+ _c(p)· N, where α(⋅)α(·) is the coefficient that approximates the computation time based on the number of edges, and βc(⋅) _c(·) is the coefficient related to the bandwidth and the type of collective operation c, which is highly dependent on the system topology and the underlying implementations. For large graphs or large problem sizes, α(⋅)α(·) can be estimated as: (8) α(sp)≈α(p)s,α(sp)≈ α(p)s, where s is the scaling factor. On the other hand, βc(⋅) _c(·) can be viewed as a property of the system and can be estimated using profiling tools such as NCCL Tests (NVIDIA, 2024). As an example, we profile the all-gather and all-to-all operations on an 8-GPU machine. The total size of the matrix and the corresponding runtime are shown in Figure 2. We observe that these two factors exhibit a clear log–log relationship, indicating that β is determined solely by the type of collective operation and the number of GPUs and is largely independent of the size of the problem. Consequently, we can profile the β values once and reuse them in the subsequent analysis. (a) All-gather (b) All-to-all Figure 2. Time for all-gather and all-to-all collective operations under different message sizes and different number of GPUs using the NCCL Tests on an 8xA100 server. 4.3. Automatic Graph Parallelism (AGP) Input: Graph G with N nodes, number of GPUs available P Output: Graph parallelization strategy c, scaling factor s 1 2B←[]B←[]; measure titer(1)t_iter(1); k←titer(1)Nk← t_iter(1)N; for i←2i← 2 to P do 3 for c∈GP-AG,GP-A2A,…c∈\GP-AG,GP-A2A,...\ do 4 measure b=βc(i)b= _c(i); if i⋅bi−1≤k i· bi-1≤ k then 5 append i⋅bi−1 i· bi-1 to B; 6 7 end if 8 9 end for 10 11 end for 12c,s←argminc,s(B)c,s← *arg\,min_c,s(B); return c,sc,s; Algorithm 3 Automatic Graph Parallelization Algorithm Based on our formulation, we can estimate the speedup as the system scales and, consequently, determine the “best parallelization strategy” given a graph dataset and system configuration. Consider scaling the system from p GPUs to spsp GPUs. Speedup can only be achieved if the following condition is met: (9) titer(sp)≤titer(p).t_iter(sp)≤ t_iter(p). By substitution, we have: (10) α(sp)⋅E+βc(sp)⋅N≤α(p)⋅E+βc(p)⋅N.α(sp)· E+ _c(sp)· N≤α(p)· E+ _c(p)· N. After reorganizing the inequality, we obtain: (11) (βc(sp)−βc(p))⋅N≤(s−1)α(p)s⋅E.( _c(sp)- _c(p))· N≤ (s-1)α(p)s· E. α(p)α(p) can be further simplified as α(1)p α(1)p, where α(1)Eα(1)E is the runtime using one GPU, since no communication is needed: (12) (βc(sp)−βc(p))≤(s−1)α(1)EspN≃(s−1)titer(1)spN.( _c(sp)- _c(p))≤ (s-1)α(1)EspN (s-1)t_iter(1)spN. Since titer(1)t_iter(1) and N are fixed, the above ratio can be considered as a constant: (13) sp(βc(sp)−βc(p))s−1≤titer(1)N=k. sp( _c(sp)- _c(p))s-1≤ t_iter(1)N=k. Therefore, we only need to check if the term on the left side is smaller than the constant k. Furthermore, the term βc(sp)−βc(p) _c(sp)- _c(p) determines the speedup: the smaller the term, the greater the speedup achieved by scaling the system. Additionally, consider the special case where p=1p=1; in this case, the inequality becomes: (14) sβc(s)s−1≤k. s _c(s)s-1≤ k. By comparing this term across different c and s, we can select the optimal graph parallelization strategy. The details are provided in Algorithm 3. Note that our framework is extensible, i.e., one can incorporate additional parallelization strategies as needed. 5. Experimental Evaluation We first evaluate the scalability of our distributed training framework. Then, we examine the effectiveness of the automatic parallelization framework across various datasets and system configurations. Finally, we compare the efficiency and accuracy of our method with TorchGT (Zhang et al., 2024), the state-of-the-art training framework. We do not report end-to-end speedup compared to DistDGL (Zheng et al., 2022) and TorchGT (Zhang et al., 2024) because DistDGL does not support full-graph training, and TorchGT encounters out-of-memory issues without graph reordering and partitioning. To the best of our knowledge, we are the first to support distributed graph transformer training on full graphs. 5.1. Experimental Setup We conducted our experiments on two different servers. One is equipped with 8 A100 SXM4 GPUs, where each pair of GPUs is connected by 12 NVLinks111NVLink is a high-speed, wire-based interconnect technology that enables point-to-point communication between GPUs., delivering up to 600 GB/s of bidirectional P2P bandwidth. The other server is equipped with 8 H100 SXM5 GPUs connected by 18 NVLinks, delivering up to 900 GB/s of bidirectional P2P bandwidth. We implemented our graph parallelization algorithms and distributed graph transformer using PyTorch 2.3.0+cu121 (Paszke et al., 2017) and DGL 2.3.0+cu121 (Wang et al., 2019). For the model design, we set the hidden dimension to 128, following the configuration in (Shirzad et al., 2023), and set the number of attention heads to 8 to avoid additional communication in GP-A2A. All performance results are averaged over 10 runs after a 2-run warm-up. 5.2. Datasets We used three real-world benchmark datasets—ogbn-proteins, ogbn-products, and Reddit (Hu et al., 2020; Hamilton et al., 2017)—to evaluate the scalability and efficiency of sparse graph attention, graph parallelization algorithms, and the automatic optimization framework. We further evaluate the full-graph training accuracy of the graph transformer on two node prediction tasks: ogbn-arxiv and ogbn-products (Hu et al., 2020). The properties of our graphs are summarized in Table 2. 5.3. Performance and Scalability of Automatic Graph Parallelism We first measure the iteration (per-epoch) time speedup with different number of GPUs to evaluate the scalability. Figure 3 presents the speedup numbers when training on the A100 server. It can be seen that our “automated selection” of graph parallelism strategy results in consistent and near-linear scalability, achieving up to 6.1x speedup on proteins, 3.3x on products, and 4.2x on reddit when using 8 GPUs, compared to the single-GPU execution. These results clearly demonstrate that our proposed framework effectively exploits parallelism across diverse graph structures. On the other hand, Figure 4 presents the speedup values when training on the H100 server. One can observe similar trends as shown in the A100 experiments, suggesting that our method works across different systems. In particular, the H100 server achieves 5.7x, 4.8x, and 4.3x speedup on proteins, products, and reddit, respectively, with 8 GPUs, further confirming the robust scalability and system-agnostic performance of our approach. To evaluate the accuracy of the AGP algorithm’s performance estimation, we also collected the estimated and actual iteration times for different scaling factors, datasets, parallelization strategies, and server configurations. As plotted in Figure 5, the estimated and actual times exhibit a strong correlation on both A100 and H100 servers, allowing the algorithm to consistently select the optimal strategy. Overall, one can make two key observations from these experiments: ∙ The best parallelization strategy varies across different graphs, even when using the same system. For example, GP-AG achieves the best throughput with 8 GPUs on the ogbn-proteins dataset, whereas GP-A2A performs better on the ogbn-products dataset. The optimal strategy depends on both the system and the graph properties, making it essential to adaptively select the best approach to achieve optimal training performance. ∙ Given a target graph and a target GPU system, with our automatic graph parallelization algorithm, we can determine the best strategy for distributed training across different parallelization schemes, thus avoiding sub-optimal performance that would occur when relying on a single parallelization strategy. Figure 3. The speedup values when using different number of GPUs on an 8x A100 server across different graphs. Figure 4. The speedup values when using different number of GPUs on an 8x H100 server across different graphs. (a) A100 (b) H100 Figure 5. The relationship between the actual and estimated iteration times under various parallelization strategies and system setups. 5.4. Efficiency of Sparse Graph Attention with Sparse Operations We record the time and memory consumption of sparse graph attention when training Graph Transformer (Dwivedi and Bresson, 2020) on the ogbn-products dataset, following the settings in TorchGT (Zhang et al., 2024). First, we discuss performance under different graph sizes by setting the number of nodes to 64K, 128K, and 512K. As shown in Figure 6(a), our implementation of sparse graph attention is much more efficient than TorchGT, and the larger the graph size, the greater the speedup; in fact, we observe a speedup of 3.8×3.8× when N=512KN=512K. In addition to the execution time, we also evaluated the memory efficiency of our implementation. As shown in Figure 6(b), our implementation consistently consumes less memory across different graph sizes, and we reduce memory consumption by 78%78\% when N=512KN=512K. Second, we discuss performance under different model sizes by setting the hidden dimension to 64, 128, and 256. The results in Figure 7 indicate that our proposed method outperforms TorchGT in both execution time and memory consumption, demonstrating consistent improvements across diverse scenarios. Regarding the performance of the model, we train a 3-layer Graph Transformer model on different datasets using our framework and TorchGT, with the results compared in Figure 8. Our framework achieves model performance similar to that of TorchGT. While the model architectures are identical, TorchGT further applies graph clustering in each epoch to reduce the number of edges and communication between GPUs, which may alter the graph’s semantics. We emphasize that our method is orthogonal to graph clustering and can be integrated with TorchGT for further improvements. Figure 9 shows an example. Following TorchGT’s setup for distributed training with 2 GPUs on the ogbn-products dataset, we observe a significant speedup, up to an 83% reduction in time to reach the same training loss. In summary, previous works implement sparse attention by first scattering the Q and K matrices based on edge indices and then computing the dot product. However, such approaches suffer from low computational and memory efficiency because the scattering process requires substantial data movement. In contrast, our method is more efficient in terms of both execution time and memory usage, making it feasible to handle even larger graphs while providing better throughput and scalability. 5.5. Discussion on Scaling to Larger Systems Although our evaluation is limited to single-node systems with up to 8 GPUs, the underlying design of the parallelization strategies, particularly the separation of sparse computation (edge-dependent) and communication (node-dependent) components, suggests that the proposed approach should extend to larger GPU counts. Both GP-AG and GP-A2A rely on standard collective primitives whose scaling behavior has been well-characterized by prior research, and the AGP model explicitly incorporates communication coefficients (β) that remain valid as the system scales. As a result, the framework is expected to maintain similar efficiency trends on multi-node or higher-GPU configurations, provided that the interconnect bandwidth scales proportionally. (a) Execution time (b) Memory consumption Figure 6. Comparison of sparse graph attention with TorchGT using different numbers of nodes when d=128d=128. (a) Execution time (b) Memory consumption Figure 7. Comparison of sparse graph attention with TorchGT using different hidden dimension when N=256KN=256K. Figure 8. Comparison of accuracy on different node classification dataset. Figure 9. Comparison of loss versus the wall time on ogbn-products dataset. 6. Conclusion Graph transformers emerged as a powerful paradigm for learning on graph-structured data, yet their scalability has been hindered by the computational and memory demands of sparse attention. Motivated by this, in this paper, we addressed the challenges behind “distributed graph transformer training” by developing two parallelization strategies, GP-AG and GP-A2A, and designing the adaptive algorithm AGP to automatically select the best strategy based on the characteristics of the target graph and the target hardware system. Our framework leverages sparse operators, reduces memory consumption, and achieves substantial improvements in training throughput on large graph benchmarks. These results demonstrate that distributed graph transformer training can be made both efficient and practical, advancing their potential as graph foundation models. References J. Achiam, S. Adler, S. Agarwal, L. Ahmad, I. Akkaya, F. L. Aleman, D. Almeida, J. Altenschmidt, S. Altman, S. Anadkat, et al. (2023) Gpt-4 technical report. arXiv preprint arXiv:2303.08774. Cited by: §1. S. Bajaj, H. Son, J. Liu, H. Guan, and M. Serafini (2024) Graph neural network training systems: a performance comparison of full-graph and mini-batch. Proc. VLDB Endow. 18 (4), p. 1196–1209. External Links: ISSN 2150-8097, Link, Document Cited by: §1. E. Chan, M. Heimlich, A. Purkayastha, and R. Van De Geijn (2007) Collective communication: theory, practice, and experience. Concurrency and Computation: Practice and Experience 19 (13), p. 1749–1783. Cited by: §3. G. Comanici, E. Bieber, M. Schaekermann, I. Pasupat, N. Sachdeva, I. Dhillon, M. Blistein, O. Ram, D. Zhang, E. Rosen, et al. (2025) Gemini 2.5: pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities. arXiv preprint arXiv:2507.06261. Cited by: §1. A. Dubey, A. Jauhri, A. Pandey, A. Kadian, A. Al-Dahle, A. Letman, A. Mathur, A. Schelten, A. Yang, A. Fan, et al. (2024) The llama 3 herd of models. arXiv preprint arXiv:2407.21783. Cited by: §1. V. P. Dwivedi and X. Bresson (2020) A generalization of transformer networks to graphs. arXiv preprint arXiv:2012.09699. Cited by: §1, §1, §1, §5.4. Z. Fu, X. Ai, Q. Wang, Y. Zhang, S. Lu, C. Chen, C. Cao, H. Yuan, Z. Wei, Y. Gu, Y. Wen, and G. Yu (2025) NeutronTask: scalable and efficient multi-gpu gnn training with task parallelism. Proc. VLDB Endow. 18 (6), p. 1705–1719. External Links: ISSN 2150-8097, Link, Document Cited by: §1. A. Gui, J. Ye, and H. Xiao (2024) G-adapter: towards structure-aware parameter-efficient transfer learning for graph transformer networks. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 38, p. 12226–12234. Cited by: §1. W. Hamilton, Z. Ying, and J. Leskovec (2017) Inductive representation learning on large graphs. Advances in neural information processing systems 30. Cited by: §5.2. J. Hoffmann, S. Borgeaud, A. Mensch, E. Buchatskaya, T. Cai, E. Rutherford, D. de Las Casas, L. A. Hendricks, J. Welbl, A. Clark, et al. (2022) Training compute-optimal large language models. In Proceedings of the 36th International Conference on Neural Information Processing Systems, p. 30016–30030. Cited by: §1. W. Hu, M. Fey, M. Zitnik, Y. Dong, H. Ren, B. Liu, M. Catasta, and J. Leskovec (2020) Open graph benchmark: datasets for machine learning on graphs. Advances in neural information processing systems 33, p. 22118–22133. Cited by: §5.2. H. Liu, J. Feng, L. Kong, N. Liang, D. Tao, Y. Chen, and M. Zhang (2024) One for all: towards training one graph model for all classification tasks. In The Twelfth International Conference on Learning Representations, External Links: Link Cited by: §1. J. Liu, C. Yang, Z. Lu, J. Chen, Y. Li, M. Zhang, T. Bai, Y. Fang, L. Sun, P. S. Yu, et al. (2025) Graph foundation models: concepts, opportunities and challenges. IEEE Transactions on Pattern Analysis and Machine Intelligence. Cited by: §1. T. Liu, Y. Chen, D. Li, C. Wu, Y. Zhu, J. He, Y. Peng, H. Chen, H. Chen, and C. Guo (2023) BGL: GPU-Efficient GNN training by optimizing graph data I/O and preprocessing. In 20th USENIX Symposium on Networked Systems Design and Implementation (NSDI 23), Boston, MA, p. 103–118. External Links: ISBN 978-1-939133-33-5, Link Cited by: §1. D. Narayanan, M. Shoeybi, J. Casper, P. LeGresley, M. Patwary, V. Korthikanti, D. Vainbrand, P. Kashinkunti, J. Bernauer, B. Catanzaro, et al. (2021) Efficient large-scale language model training on gpu clusters using megatron-lm. In Proceedings of the international conference for high performance computing, networking, storage and analysis, p. 1–15. Cited by: §1. I. Nisa, A. Sukumaran-Rajam, S. E. Kurt, C. Hong, and P. Sadayappan (2018) Sampled dense matrix multiplication for high-performance machine learning. In 2018 IEEE 25th International Conference on High Performance Computing (HiPC), Vol. , p. 32–41. External Links: Document Cited by: §1, §2.2. NVIDIA (2024) NCCL tests. Note: Accessed: 2024-10-10 External Links: Link Cited by: §4.2. A. Paszke, S. Gross, S. Chintala, G. Chanan, E. Yang, Z. DeVito, Z. Lin, A. Desmaison, L. Antiga, and A. Lerer (2017) Automatic differentiation in pytorch. Cited by: §5.1. M. K. Rahman, M. H. Sujon, and A. Azad (2021) Fusedmm: a unified sddmm-spmm kernel for graph embedding and graph neural networks. In 2021 IEEE International Parallel and Distributed Processing Symposium (IPDPS), p. 256–266. Cited by: §1, §2.2. L. Rampášek, M. Galkin, V. P. Dwivedi, A. T. Luu, G. Wolf, and D. Beaini (2022) Recipe for a general, powerful, scalable graph transformer. Advances in Neural Information Processing Systems 35, p. 14501–14515. Cited by: §1, §1, §1. Y. Saad (1990) SPARSKIT: a basic tool kit for sparse matrix computations. Technical report Cited by: §1. Y. Shi, Z. Huang, S. Feng, H. Zhong, W. Wang, and Y. Sun (2021) Masked label prediction: unified message passing model for semi-supervised classification. In Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, p. 1548–1554. Cited by: §1, §1, §1, §2.1. H. Shirzad, A. Velingker, B. Venkatachalam, D. J. Sutherland, and A. K. Sinop (2023) Exphormer: sparse transformers for graphs. In International Conference on Machine Learning, External Links: 2303.06147 Cited by: §1, §1, §1, §5.1. M. Sun, K. Zhou, X. He, Y. Wang, and X. Wang (2022) Gppt: graph pre-training and prompt tuning to generalize graph neural networks. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, p. 1717–1727. Cited by: §1. C. Wan, Y. Li, A. Li, N. S. Kim, and Y. Lin (2022) BNS-GCN: efficient full-graph training of graph convolutional networks with partition-parallelism and random boundary node sampling. Proceedings of Machine Learning and Systems 4, p. 673–693. Cited by: §1. X. Wan, K. Xu, X. Liao, Y. Jin, K. Chen, and X. Jin (2023) Scalable and efficient full-graph gnn training for large graphs. Proceedings of the ACM on Management of Data 1 (2), p. 1–23. Cited by: §1. M. Wang, D. Zheng, Z. Ye, Q. Gan, M. Li, X. Song, J. Zhou, C. Ma, L. Yu, Y. Gai, T. Xiao, T. He, G. Karypis, J. Li, and Z. Zhang (2019) Deep graph library: a graph-centric, highly-performant package for graph neural networks. arXiv preprint arXiv:1909.01315. Cited by: §5.1. Q. Wu, W. Zhao, C. Yang, H. Zhang, F. Nie, H. Jiang, Y. Bian, and J. Yan (2023) Simplifying and empowering transformers for large-graph representations. In Thirty-seventh Conference on Neural Information Processing Systems, External Links: Link Cited by: §1. M. Zhang, J. Sun, Q. Hu, P. Sun, Z. Wang, Y. Wen, and T. Zhang (2024) TorchGT: a holistic system for large-scale graph transformer training. In Proceedings of the International Conference for High Performance Computing, Networking, Storage, and Analysis, SC ’24. External Links: ISBN 9798350352917, Link, Document Cited by: §1, §5.4, §5. D. Zheng, C. Ma, M. Wang, J. Zhou, Q. Su, X. Song, Q. Gan, Z. Zhang, and G. Karypis (2020) DistDGL: distributed graph neural network training for billion-scale graphs. In 2020 IEEE/ACM 10th Workshop on Irregular Applications: Architectures and Algorithms (IA3), p. 36–44. Cited by: §1. D. Zheng, X. Song, C. Yang, D. LaSalle, and G. Karypis (2022) Distributed hybrid cpu and gpu training for graph neural networks on billion-scale heterogeneous graphs. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, KDD ’22, New York, NY, USA, p. 4582–4591. External Links: ISBN 9781450393850, Link, Document Cited by: §5. J. Zhuo, Z. Ma, Y. Lu, Y. Liu, K. Fu, D. Jin, C. Wang, W. Wenning, Z. Wang, X. Cao, and L. Yang (2025) A closer look at graph transformers: cross-aggregation and beyond. Advances in Neural Information Processing Systems (to appear) . Cited by: §1. C. Zi, H. Zhao, X. Sun, Y. Lin, H. Cheng, and J. Li (2024) Prog: a graph prompt learning benchmark. Advances in Neural Information Processing Systems 37, p. 95406–95437. Cited by: §1.