Manuscript Offprint
arXiv:2610.05874Global Communication or Graph-Specific Memory?
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Scalable Graph Transformers are commonly trained and evaluated on static large graphs in a transductive setup. Many scalable Graph Transformer components can be formulated as a constant-size shared memory, similar to virtual nodes, providing compressed information about the whole graph. The counterpart of these models in language models and other domains is justified as the input changes, and this mechanism learns to compress some useful information about the input. In transductive learning on a single fixed graph, however, any shared memory can be seen as a constant at test time. This raises the question of what exactly this shared memory does in this static setup. We give preliminary evidence that optimizing a shared memory directly performs similarly to global communication methods, and so normal local message-passing models can embed similar information in their weights. Thus, these settings may be a poor fit for evaluating global communication in graph neural networks.
1 Introduction
Graph Transformers (GTs) are often motivated by their ability to conduct long-range communication across a large input graph, thereby modeling non-local dependencies which are difficult for more local models to learn [1–6]. In practice, however, these models are commonly evaluated by full-batch transductive node classification on a single graph [7–9]. As these long-range messages will only ever be passed on one graph, it is natural to ask: are they really necessary?
The clearest case is the use of virtual nodes in a Graph Neural Network (GNN) [4, 5, 10], where all nodes are connected to a global fixed-sized shared memory. We can view this as consisting of two mechanisms: all nodes collectively write into a shared memory, constructing some compressed representation of (aspects of) the whole graph; at the next layer, each node reads from this shared memory, learning about the whole input. As we will discuss later, linear and kernelized linear attention models [e.g. 11, 12] variants of efficient Transformers can be mathematically reformulated into an analogous writer/reader setup.
These efficient attention models were originally developed for sequential data trained on many varied inputs, such as processing different textual documents, and thus different information is written and read when the model is applied to different documents; we can think of this as a mapping . In a transductive fixed-graph setting, as typically used for evaluating GTs, there is only one fixed graph input . For a given setting of model parameters , is fixed: the function itself matters only in what single vector it produces. Thus, at inference time, we can think of simply as a parameter of the model. This raises the questions:
• Can an equally useful shared memory be learned directly, e.g. with gradient descent on a learnable matrix?
• Do the performance of these models in this static transductive setup imply anything about their ability to do long-range dependency modeling?
(a) Inductive setting. Writing function is shared, but the input graph varies.

(b) Transductive setting. One graph, one memory shared by training and evaluation.
Figure 1: The role of a shared writer depends on the input domain. (a) In the inductive setting, the writer is trained across multiple graphs and must produce an input-specific memory for each new test graph. (b) In the static transductive setting, training and evaluation use the same graph input ( ). After training, its memory ( ) is fixed and can be recorded and reused at evaluation, while leaving the reader unchanged.
• What are the optimization and inductive bias implications?
• Can other GNNs learn to embed this cached memory into their weights, without an explicit shared memory mechanism?
• Do these shared writers add value when the input graph changes in small ways?
Prior empirical work has suggested that simple GNNs based on local message-passing can outperform GT variants; Luo et al. [13] specifically study this, while the SGFormer results of Liang et al. [14] also often show these models fall behind basic GNNs. Our paper suggests a plausible explanation: the evaluation framework fundamentally cannot tell what role, if any, the writer plays during learning. Our class of shared-memory models does not cover all scalable GTs; for instance, Exphormer [5] is outside of it (as discussed in Appendix C), and indeed it achieves the best results in [14].
This paper is an early investigation toward the previous questions. We do provide some initial experimental and theoretical results in this work, but our focus is on clearly elaborating the potential problem to the community, and encouraging more caution in what static setups are capable of saying about learning long-range dependencies.
Where V is the set of all nodes in the graph. The writer compresses the current graph state; the reader decides how each node uses it.
Kernelized linear attention as implicit shared memory. Kernelized attention implements a write-memory-read pattern without an explicit virtual node [11, 12, 15]. Let , let
be query and key feature maps, and let be the value map. Treating vectors as columns, the layer writes
and node v reads the same pair through its own query:
In implementation, the denominator will be regularized or stabilized away from zero.
Different choices of the feature maps give different linear-attention variants. Taking and to be learned linear maps gives normalized softmax-free dot-product attention. If normalization is omitted, only is required. Positive or random feature maps give other kernelized variants, including linear-time approximations of softmax attention.
The pair is a fixed-sized shared memory . During training, this memory changes as the model parameters and node states change. After the parameters are fixed, each layer produces one fixed memory state on a given layer. For a multilayer model, we can see the combination of memories across all layers as the memory of the model: . If we remove the writing mechanism and make the reader mechanism directly use the stored , it is easy to see that the model would produce identical outputs during inference time.
3 What Constant-size Shared Memory Implies in a Transductive Setting
We denote the complete model input by , where includes the graph and edge information, and includes the node features and any fixed positional or structural encodings. In common full-batch transductive node-classification benchmarks, the model is trained and evaluated using the same graph and features [7–9, 16]. Only a subset of nodes is used during training, while other subsets are used for validation and test inference.
At inference time, we can remove the writing mechanism and make the reader use the stored shared memory c at each layer to obtain exactly the same outputs. We call this exact replay. While the mathematical argument is straightforward, we also test this by explicitly making these replacements across four models: Nodeformer (with fixed RF) [2], Diffeformer-s [3], SGFormer [17], and Polynormer-r [18] across datasets Cora, Amazon-Photo, Pubmed, Actor [9, 19–21], and observe all final logits are equal up to the computational stability threshold, as expected.
Another observation is that fixing after training at each layer also turns the reader at that layer into a shared nodewise function
where a contains the retained local inputs of a node. Keeping this function gives an exact writer-free implementation, with a nodewise reader function at inference time.
Direct learnability of the shared memory. What if we eliminate the writing mechanism and learn directly using optimization algorithms alongside the other learnable parameters? Can we learn a useful shared memory through direct optimization? The number of learnable parameters in each layer according to Equation (1) is , while directly learning would require parameters. In typical networks, (concatenated across the heads) and are the same or at least comparable, so the number of learnable parameters is comparable in the two setups. This raises the question of whether we can learn these parameters directly, while saving the writing computation in

Directly optimized memory
PubMed
Figure 2: Original models versus learned shared memories. Bars show mean test accuracy over five matched seeds. Whiskers show marginal 95% Student-t confidence intervals. The learned-memory model has a higher mean in eleven of sixteen comparisons. Fourteen of the sixteen paired 95% intervals for the memory-minus-original difference contain zero. The two exceptions have opposite signs: DIFFformer-s on Cora favors the original model by 2.0 points, while NodeFormer on PubMed favors learned memory by 2.4 points.
each forward pass. We test this experimentally across several architectures and datasets. The results provided in Figure 2 show that directly learning this shared memory is feasible, and gives comparable results to the original model. Experimental details are in Appendix D.2.
Hypothesis class of local GNNs and Kernelized Linear Graph Transformers. In Equation (3), we saw that the read operation can be viewed as a nodewise operation after learning . More particularly, Equation (2) is a combination of and a linear map of S, normalized by a dot product. Thus, from the perspective of representational strength, a sufficiently expressive nodewise operation at the end of each local message-passing layer can reproduce exactly the same output. This means that there exists a class of local GNNs whose hypothesis class contains that of these Graph Transformers. We formalize this mathematically in Appendix B.1. A sufficiently wide graph-specific Multi-Layer Perceptron (MLP), such as variants used in Graph Isomorphism Networks (GIN), can also interpolate this function at the finitely many node contexts encountered in each layer and reproduce the same predictions [22].
This result provides one possible explanation for the strong classical GNN results reported in earlier work. Luo et al. [13] show that carefully tuned GCN, GAT, and GraphSAGE models-with enough capacity-match or outperform recent Graph Transformer results on most of the node-classification datasets they study. Liang et al. [14] also report classical GNN baselines that are close to or above SGFormer on their newly introduced long-range benchmarks. These comparisons do not show that the models learn the same function or use the same mechanism. Our result only shows why such predictive parity is possible on a fixed graph in a transductive setup. Whether gradient descent can reliably find the corresponding local GNN remains an open question.
Optimization perspective. The previous observations concern the representational capacity of the models; learnability is less clear. Can typical gradient-based optimization algorithms learn a useful graph-specific memory directly? Can a local message-passing GNN encode the same useful global information in its shared weights? The global writer may still affect optimization, regularization, and generalization even when its final memory can be replayed exactly. In Figure 2, directly learned memories are often competitive with the original models. This shows that direct optimization can work in practice, but does not establish a general equivalence. Our initial theory in Appendix B.2 explains why no unconditional equivalence is possible. It also gives exact recovery conditions for affine readers and shows that an affine writer acts as a preconditioner for learning the state. More general learnability guarantees for nonlinear multilayer models and ordinary GNN training remain open.
How generalizable is the writer against changes in the input? While the transductive setup commonly used in this area does not include changes to the input I between training, validation,

Figure 3: Response to feature and topology changes. Solid lines recompute the current writer state. Dashed lines reuse the clean recorder state. Orange curves use one clean training input, purple curves use one checkpoint trained on 16 nearby inputs, and the blue and green curves show the aligned writer-only control. Shaded regions show variation across three optimization seeds. The dotted line marks the largest marginal perturbation used during multi-input training.
and test phases, one can view this as a simplification of real-world tasks. In settings such as social networks, for example, the graph may change over time, while we still expect the trained model to work under small changes to the input. In this case, we have an input graph observed during training, but during the test phase, small changes may occur either in the graph structure G or in the node features X. The writer has been trained on only one instance, but it may still generalize to sufficiently close variants. While this is possible, it is not clear if the model will learn a generalizable memory there from a single graph. We did a preliminary experiment described in Appendix D.3. Across Cora and Actor, recomputing the writer gives little consistent advantage over replay under feature replacement or edge rewiring. Training on perturbed inputs helps some configurations. Future work should explore when the writer mechanism can generalize, and when it does not.
Figure 3 shows these results; the full protocol is given in Appendix D.3.
Experiments on fixed long-range tasks. Figure 4 compares the original models, directly optimized memory, and a two-hop GNN on a fixed target with known long-range dependence; details are given in Appendix D.4. Figure 5 extends the original-versus-memory comparison to the Paris, Shanghai, and Los Angeles City-Networks datasets [14]; details are given in Appendix D.5.
4 Conclusion & Future Work
Many variants of efficient Graph Transformers, similar to virtual nodes, can be seen as a shared memory mechanism. While developed in settings where the shared memory learns a mechanism to extract useful information for the task from each different input, its role in the standard transductive setup, with one fixed graph as the input, is less clear.
Original model Directly optimized memory Two-hop GNN
Train mean Nearest training node
Cora
Actor
94.5% median target mass beyond 2 hops

97.9% median target mass beyond 2 hops
Amazon-Photo
77.6% median target mass beyond 2 hops

PubMed
99.8% median target mass beyond 2 hops
Figure 4: Learning one fixed long-range target. Lower normalized test RMSE is better. Bars compare the original model, directly optimized shared memory, and a two-hop GNN. The same GNN result is repeated within each model group. Horizontal lines show the train mean and nearest-training-node baselines. Whiskers are 95% confidence intervals over five optimization seeds.
Original model Directly optimized memory
Paris
Shanghai
Los Angeles

Figure 5: Directly optimizing shared memory on City-Networks. Bars show mean test accuracy for the original model and its directly optimized shared-memory counterpart. Whiskers are marginal 95% Student-t confidence intervals.
Across several models and datasets, directly optimizing the shared memory performs similarly to the original writer. We also show that, on one fixed input, the covered compact-memory models have no larger prediction set than sufficiently wide graph-specific local GNNs. This does not mean that the full model families are equivalent or that the writer is unimportant during training. In our perturbation experiments, however, recomputing the memory gives no consistent advantage over replay. These results suggest that static transductive accuracy alone cannot establish that input-conditioned global communication was necessary.
References
[1] Vijay Prakash Dwivedi, Ladislav Rampášek, Mikhail Galkin, Ali Parviz, Guy Wolf, Anh Tuan Luu, and Dominique Beaini. Long range graph benchmark. In Advances in Neural Information Processing Systems Datasets and Benchmarks Track, 2022. 1, 11
[2] Qitian Wu, Wentao Zhao, Zenan Li, David Wipf, and Junchi Yan. Nodeformer: A scalable graph structure learning transformer for node classification. In Advances in Neural Information Processing Systems, 2022. 3, 11, 17
[3] Qitian Wu, Chenxiao Yang, Wentao Zhao, Yixuan He, David Wipf, and Junchi Yan. DIFFformer: Scalable (graph) transformers induced by energy constrained diffusion. In International Conference on Learning Representations, 2023. 3, 17
[4] Ladislav Rampášek, Mikhail Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu, Guy Wolf, and Dominique Beaini. Recipe for a general, powerful, scalable graph transformer. In Advances in Neural Information Processing Systems, 2022. 1, 17
[5] Hamed Shirzad, Ameya Velingker, Balaji Venkatachalam, Danica J. Sutherland, and Ali Kemal Sinop. Exphormer: Sparse transformers for graphs. In International Conference on Machine Learning, 2023. 1, 2, 17
[6] Hamed Shirzad, Honghao Lin, Balaji Venkatachalam, Ameya Velingker, David P. Woodruff, and Danica J. Sutherland. Even sparser graph transformers. In Advances in Neural Information Processing Systems, volume 37, pages 71277–71305, 2024. doi: 10.52202/079017-2277. 1, 11, 17
[7] Zhilin Yang, William W. Cohen, and Ruslan Salakhutdinov. Revisiting semi-supervised learning with graph embeddings. In International Conference on Machine Learning, 2016. 1, 3, 22
[8] Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. In Advances in Neural Information Processing Systems, 2020.
[9] Oleg Platonov, Denis Kuznedelev, Michael Diskin, Artem Babenko, and Liudmila Prokhorenkova. A critical look at the evaluation of GNNs under heterophily: Are we really making progress? In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=tJbbQfw-5wv. 1, 3, 18, 22
[10] Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. arXiv preprint arXiv:1704.01212, 2017. 1, 2, 17
[11] Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are RNNs: Fast autoregressive transformers with linear attention. In International Conference on Machine Learning, 2020. 1, 2, 11, 17
[12] Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamás Sarlós, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, David Belanger, Lucy Colwell, and Adrian Weller. Rethinking attention with performers. In International Conference on Learning Representations, 2021. 1, 2, 11, 17
[13] Yuankai Luo, Lei Shi, and Xiao-Ming Wu. Classic GNNs are strong baselines: Reassessing GNNs for node classification. In Advances in Neural Information Processing Systems, Datasets and Benchmarks Track, volume 37, pages 97650–97669. Curran Associates, Inc., 2024. doi:10.52202/079017-3098. 2, 4, 11
[14] Huidong Liang, Haitz Sáez de Ocáriz Borde, Baskaran Sripathmanathan, Michael Bronstein, and Xiaowen Dong. Towards quantifying long-range interactions in graph machine learning: A large graph dataset and a measurement. In International Conference on Learning Representations, 2026. 2, 4, 5, 11, 22
[15] Imanol Schlag, Kazuki Irie, and Jürgen Schmidhuber. Linear transformers are secretly fast weight programmers. In International Conference on Machine Learning, volume 139, pages 9355–9366. PMLR, 2021. 2, 11, 17
[16] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2017. 3
[17] Qitian Wu, Wentao Zhao, Chenxiao Yang, Hengrui Zhang, Fan Nie, Haitian Jiang, Yatao Bian, and Junchi Yan. SGFormer: Simplifying and empowering transformers for large-graph representations. In Advances in Neural Information Processing Systems, 2023. 3, 11, 17
[18] Chenhui Deng, Zichao Yue, and Zhiru Zhang. Polynormer: Polynomial-expressive graph transformer in linear time. In International Conference on Learning Representations, 2024. 3, 11, 17
[19] Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Gallagher, and Tina Eliassi-Rad. Collective classification in network data. AI magazine, 29(3):93–106, 2008. 3, 18
[20] Derek Lim, Felix Hohne, Xiuyu Li, Sijia Linda Huang, Vaishnavi Gupta, Omkar Bhalerao, and Ser Nam Lim. Large scale learning on non-homophilous graphs: New benchmarks and strong simple methods. Advances in neural information processing systems, 34:20887–20902, 2021. 18, 23
[21] Oleksandr Shchur, Maximilian Mumme, Aleksandar Bojchevski, and Stephan Günnemann. Pitfalls of graph neural network evaluation. arXiv preprint arXiv:1811.05868, 2018. 3
[22] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? arXiv preprint arXiv:1810.00826, 2018. 4
[23] Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, and Tie-Yan Liu. Do transformers really perform bad for graph representation? In Advances in Neural Information Processing Systems, 2021. 11
[24] Devin Kreuzer, Dominique Beaini, William L. Hamilton, Vincent Létourneau, and Prudencio Tossou. Rethinking graph transformers with spectral attention. In Advances in Neural Information Processing Systems, 2021.
[25] Luis Müller, Mikhail Galkin, Christopher Morris, and Ladislav Rampášek. Attending to graph transformers. Transactions on Machine Learning Research, 2024. ISSN 2835-8856. URL https://openreview.net/forum?id=HhbqHBBrfZ. 11
[26] Michael Hassid, Hao Peng, Daniel Rotem, Jungo Kasai, Ivan Montero, Noah A. Smith, and Roy Schwartz. How much does attention actually attend? Questioning the importance of attention in pretrained transformers. In Findings of the Association for Computational Linguistics: EMNLP, 2022. 11
[27] Jiajun Zhou, Xuanze Chen, Chenxuan Xie, Shanqing Yu, Qi Xuan, and Xiaoniu Yang. Rethinking graph transformer architecture design for node classification. arXiv preprint arXiv:2410.11189, 2024. 11
[28] Jan Tönshoff, Martin Ritzert, Eran Rosenbluth, and Martin Grohe. Where did the gap go? reassessing the long-range graph benchmark. Transactions on Machine Learning Research, 2024. 11
[29] Jacob Bamberger, Benjamin Gutteridge, Scott Le Roux, Michael M. Bronstein, and Xiaowen Dong. On measuring long-range interactions in graph neural networks. In International Conference on Machine Learning, pages 2770–2789, 2025. 11
[30] Joël Mathys, Henrik Christiansen, Federico Errica, Takashi Maruyama, and Francesco Alesiani. LRIM: A physics-based benchmark for provably evaluating long-range capabilities in graph learning. In International Conference on Learning Representations, 2026. 11
[31] Louis Van Langendonck, Guillermo Bernárdez, Nina Miolane, and Pere Barlet-Ros. GraphUniverse: Synthetic graph generation for evaluating inductive generalization. In International Conference on Learning Representations, 2026. URL https://openreview.net/forum?id=jRWxvQnqUt. 11
[32] Chen Cai, Truong Son Hy, Rose Yu, and Yusu Wang. On the connection between MPNN and graph transformer. In International Conference on Machine Learning, 2023. 11
[33] Andreas Loukas. What graph neural networks cannot learn: Depth vs width. In International Conference on Learning Representations, 2020. 11
[34] Hamed Shirzad, Honghao Lin, Ameya Velingker, Balaji Venkatachalam, David P. Woodruff, and Danica J. Sutherland. A theory for compressibility of graph transformers for transductive learning. In Machine Learning and Compression Workshop at NeurIPS 2024, 2024. URL https://openreview.net/forum?id=EVg54ky3ZH. 11
[35] Chulhee Yun, Suvrit Sra, and Ali Jadbabaie. Small ReLU networks are powerful memorizers: A tight analysis of memorization capacity. In Advances in Neural Information Processing Systems, volume 32, 2019. 12
[36] Suriya Gunasekar, Blake Woodworth, Srinadh Bhojanapalli, Behnam Neyshabur, and Nathan Srebro. Implicit regularization in matrix factorization. In Advances in Neural Information Processing Systems, 2017. 12
[37] Suriya Gunasekar, Jason Lee, Daniel Soudry, and Nathan Srebro. Characterizing implicit bias in terms of optimization geometry. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 1832–1841. PMLR, 2018. URL https://proceedings.mlr.press/v80/gunasekar18a.html. 12, 13
[38] Eitan Levin, Joe Kileel, and Nicolas Boumal. The effect of smooth parametrizations on nonconvex optimization landscapes. Mathematical Programming, 209(1):63–111, 2025. 14
[39] Hamed Karimi, Julie Nutini, and Mark Schmidt. Linear convergence of gradient and proximal-gradient methods under the polyak–lojasiewicz condition. In Machine Learning and Knowledge Discovery in Databases, volume 9851 of Lecture Notes in Computer Science, pages 795–811. Springer, 2016. doi: 10.1007/978-3-319-46128-1_50. 15
[40] Arthur Jacot, Franck Gabriel, and Clément Hongler. Neural tangent kernel: Convergence and generalization in neural networks. In Advances in Neural Information Processing Systems, 2018. 15
[41] Simon S. Du, Kangcheng Hou, Barnabás Póczos, Ruslan Salakhutdinov, Ruosong Wang, and Keyulu Xu. Graph neural tangent kernel: Fusing graph neural networks with graph kernels. In Advances in Neural Information Processing Systems, volume 32, 2019. 15
[42] Luís Carvalho, João L. Costa, José Mourão, and Gonçalo Oliveira. The positivity of the neural tangent kernel. SIAM Journal on Mathematics of Data Science, 7, 2025. 16
[43] Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontañón, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, and Amr Ahmed. Big bird: Transformers for longer sequences. In Advances in Neural Information Processing Systems, 2020. 17
[44] Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. In First Conference on Language Modeling, 2024. URL https://openreview.net/forum?id=tEYskwlVY2.17
[45] Ali Behrouz and Farnoosh Hashemi. Graph mamba: Towards learning on graphs with state space models. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 119–130. ACM, 2024. doi: 10.1145/3637528.3672044. 17
[46] Chloe Wang, Oleksii Tsepa, Jun Ma, and Bo Wang. Graph-mamba: Towards long-range graph sequence modeling with selective state spaces. arXiv preprint arXiv:2402.00789, 2024. 17
A Related Work
Shared memory and scalable global communication. Linear attention is commonly written as recurrent or fast-weight memory: keys and values update shared moments that later queries read [11, 12, 15]. This algebraic interpretation is established; our contribution is to ask what it lets one identify when evaluation contains only one fixed graph input. Graph Transformers use global or structurally biased attention, often alongside local message passing, and scalable designs use kernelized attention, diffusion, polynomial aggregation, sparse routing, or bounded auxiliary tokens [2–6, 17, 18, 23–25].
Attention and baseline reassessments. Prior work has replaced input-dependent attention by averages or simpler propagation modules [26, 27]. Carefully tuned GNN baselines match or exceed recent Graph Transformer results on many transductive node-classification datasets [13]; separately, tuning and evaluation corrections substantially reduce the reported GNN-GraphGPS gap on the Long-Range Graph Benchmark [28]. Such outcome-level parity motivates the mechanism question, but does not establish functional, optimization, or hypothesis-class equivalence.
Tests of long-range dependence. The Long-Range Graph Benchmark introduced tasks intended to expose the use of distant information [1]. Later work measures interaction range through graph distance and model influence [29], combines a long-range transductive task with Jacobian-based influence measurements [14], constructs targets with provable long-range dependence [30], or tests inductive generalization across generated graph families and controlled shifts [31]. These studies ask whether distant information matters, whether a model responds to it, or whether behavior generalizes across inputs. Our work talks about a specific transductive setup and whether the shared memory captures long-range dependencies and whether it is necessary or advantageous over local message-passing models in this particular setup.
Expressivity and compressibility. Expressivity results compare architectural classes [32, 33]; we instead ask what fixed-input evaluation identifies about one trained computation. Shirzad et al. [34] derive conditions for reducing a Graph Transformer's hidden width while approximately preserving its outputs, with corresponding attention-score guarantees under their assumptions.
B Theoretical Support
Exact replay shows that the writer is unnecessary after training on one fixed input. We next ask two harder questions. Can the effect of the shared memory be absorbed into an ordinary GNN? Can gradient descent learn such a fixed state directly? We give an exact answer to the first question and initial results for the second.
B.1 Hypothesis Class
Compiling the memory into local weights. Consider a layer of the form
where contains the node state and all retained local messages. The state is shared by every node. We assume that every nonlocal pathway covered by the claim passes through .
On a fixed input , the writer produces one fixed state . The layer therefore becomes the nodewise function
Proposition 1 (Fixed-input compilation). For any trained compact-memory model on , there exists a sufficiently wide writer-free message-passing GNN that uses the same local edges and produces exactly the same predictions on .
Proof sketch. At each layer, the fixed graph produces finitely many local contexts . For each context, the required output is . Equal contexts have equal required outputs because the reader and shared state are the same.
A sufficiently wide ReLU MLP can interpolate these finitely many input-output pairs exactly [35]. We replace the memory-conditioned reader by this shared MLP. Repeating this construction layer by layer preserves every node state and final prediction.
Let denote the predictions attainable by compact-memory models on . Let denote those attainable by sufficiently wide local GNNs. Then
If the compact-memory family contains the corresponding local GNN when its writer is disabled, the two prediction sets are equal.
This equality holds only on . It does not imply that the two families represent the same functions over changing graphs or features. The compiled GNN can also require graph-specific weights and large width. This is therefore a representational result, not a learnability or efficiency result.
B.2 Optimization Perspective
Why general optimization equivalence is impossible. Exact replay does not imply that removing the writer preserves training. Consider a state . A labeled node reads , while a held-out node reads . Both desired outputs are 1.
Suppose the writer enforces
Training on the labeled node moves toward 1. Both entries then approach 1, so the held-out prediction is also correct.
Now optimize and independently from zero. The labeled loss updates , but gives no gradient to . Training approaches . It fits the labeled node but fails on the held-out node.
The writer can therefore couple state directions that would otherwise be learned independently. Its parameterization can change which solution is reached, as is common in underdetermined models [36, 37]. No general theorem can claim that a writer and a free state always learn the same model.
Learning an affine shared state. Suppose predictions are affine in the state:
where L and U are the labeled and held-out nodes. Let
and let be a replay state that minimizes this loss.
Proposition 2 (Gradient descent on a fixed state). Optimize c by gradient descent on . If
the iterates converge to a global minimizer. Their limit is
where projects onto the state directions that the labeled nodes cannot observe.
The replay state is recovered from every initialization when has full column rank. More generally, its held-out predictions are recovered from every initialization exactly when
Proof. Because minimizes the labeled loss, it satisfies the normal equation
One gradient step therefore gives
Under the stated step size, every component in range( ) converges to zero, while every component in remains unchanged. This proves Equation (8). The state is recovered for every initialization exactly when . Held-out predictions are recovered for every initialization exactly when for every , which is Equation (9).
Condition (9) has a simple meaning. Any state direction invisible to the labeled nodes must also be irrelevant to the held-out nodes. The labels do not need to identify the whole state. They only need to identify the parts used at evaluation.
Equation (8) also shows the role of initialization. Gradient descent selects the labeled-loss minimizer closest to . In particular, zero initialization selects the minimum-norm minimizer. This is a simple form of implicit bias [37].
A similar choice can be made explicitly. Consider
This objective has a unique minimizer. As approaches zero, it selects the labeled-loss minimizer closest to . Initialization and regularization therefore control state directions that the labels do not determine. They cannot guarantee correct held-out behavior when Equation (9) fails.
For one-layer unnormalized linear attention with fixed queries,
the shared memory S is a shared linear weight matrix. Proposition 2 applies directly when S is optimized with squared loss. For normalized kernel attention, it also applies to S when the normalization state is fixed. Jointly learning all states in a nonlinear multilayer model remains outside this result.
When writer training equals direct-state training. Suppose the writer is affine in its parameters:
where B and d are fixed. One gradient step on gives
Thus writer training is exactly preconditioned gradient descent on the shared state. If , ordinary direct-state training follows the same trajectory after multiplying its learning rate by . This requires matching initialization and no writer-specific regularization.
If B is not full row rank, the writer restricts which state directions can be reached. If B is full row rank, it can still change the speed and geometry of optimization. An affine writer is therefore a parameterization and preconditioner for learning the fixed state.
An exact extension to nonlinear multilayer models. The same parameterization view extends to nonlinear networks of arbitrary depth. The readers and local layers can also be trained jointly. We use a smooth-parameterization argument [38].
Fix the complete input and consider a deterministic model with layers. Write its parameters as , where contains all retained parameters and contains the removed writer-only parameters. Let
stack the memories produced by the complete original forward pass. Thus C includes all dependencies through earlier layers and through .
Let be the prediction loss of the writer-free model, with all layer memories supplied as independent variables. Let be the original model's prediction loss. Both use the same loss, without additional writer-specific penalties. Define
Here, denotes the Jacobian of .
Proposition 3 (Nonlinear multilayer writers as parameterizations). Assume that and are continuously differentiable on open neighborhoods of the points considered. Then
Along any gradient-flow trajectory that stays in these neighborhoods, satisfies
At any where has full row rank, with ,
Under the same rank condition, is a local minimum of if and only if is a local minimum of .
Proof. For each parameter setting , supplying to the writer-free model reproduces the original computation. This follows by induction over layers. At each layer, the preceding node states, retained parameters, and supplied memory agree. The outputs therefore agree as well. Hence .
The chain rule gives
Along gradient flow,
which proves Equation (14).
If has full row rank, its transpose has zero kernel. The gradient identity therefore proves Equation (15).
If is a local minimum of , continuity of makes a local minimum of . Conversely, full row rank and the inverse function theorem give a continuous local map satisfying
This map can be obtained by fixing the parameter coordinates outside an invertible square minor of . If is a local minimum, then for every sufficiently nearby ,
Thus is a local minimum of L.
The rank condition has a direct interpretation. Since
it has full row rank exactly when has full row rank. The writer parameters must therefore locally control every memory direction while the retained parameters are held fixed. We have not established this condition for the experimental architectures.
Equation (14) holds without the rank condition and does not linearize the network. The writer induces a positive-semidefinite preconditioner on the retained parameters and all layer memories. This preconditioner depends on and need not be determined by alone. The result does not imply identical finite-step gradient-descent updates or convergence to the same solution from independent initializations.
A local extension beyond affine readers. For a nonlinear reader, its behavior near a state is described by its Jacobian. In a small neighborhood, and in Proposition 2 can be replaced by the labeled and held-out Jacobians. The condition
then gives a local observability test. Every locally invisible direction for the labeled nodes must also be locally irrelevant to the held-out nodes.
If the complete state objective is smooth and satisfies a Polyak–Lojasiewicz condition, gradient descent converges globally at a linear rate [39]. This condition can hold without convexity. However, it has not been established for the nonlinear Graph Transformers considered here. It is a possible route for future analysis, not a claim about their current training dynamics.
B.3 Global Coupling Through Shared GNN Weights
A local GNN has another graph-wide channel during training. Let be a scalar prediction at node . After one gradient step on the labeled nodes,
The inner product measures how an update caused by labeled node u changes node v. It can be nonzero even when the nodes are outside each other's forward receptive fields because they use the same parameters. This is the finite-width, first-order tangent-kernel view of neural-network training [40]; related graph neural tangent kernels have been studied for GNNs [41].
The first-order expression becomes exact for the linearized model
whose Jacobian J and kernel are fixed. The same dynamics describe the corresponding infinite-width limit when its neural tangent kernel remains constant. The next result characterizes what is learned in this regime.
Proposition 4 (Learning across nodes with a fixed tangent kernel). Let contain one prediction per node of a linearized GNN on a fixed graph. Let be its fixed Jacobian and . Train on labeled nodes with the squared loss
Assume that is positive definite [see conditions in 42]. Under gradient flow,
and
Consequently,
The same limit is reached by gradient descent on the linearized model when
For a desired held-out target , exact recovery occurs if and only if
Proof. With a constant tangent kernel, gradient flow on the labeled squared loss satisfies
The first linear differential equation gives Equation (17). Substituting this solution into the second equation and integrating gives Equation (18). Positive definiteness of makes the exponential term vanish as t approaches infinity, which proves Equation (19).
For gradient descent, the labeled residual obeys
The stated step size makes every eigenvalue of have magnitude less than one. Summing the corresponding geometric series in the held-out updates gives the same limit. Finally, comparing that limit with proves Equation (20).
This proposition gives an exact class of graph-wide signals that a local GNN can learn through shared weights. If the complete target satisfies
for some vector , then and Equation (19) gives . The distance between a labeled node and a held-out node does not appear in this condition. The signal can therefore vary across the whole graph even when each forward pass is local.
For the present paper, y may be the predictions produced by a fixed compact memory or the target of a static transductive task. Proposition 4 shows that a local GNN learns this graph-wide signal exactly when its residual lies in the kernel interpolation space determined by the labeled nodes. It does not claim that every compact-memory target satisfies this condition.
Equation (16) alone only shows that distant nodes can be coupled. Proposition 4 goes further: in the fixed-kernel regime, it gives the complete training trajectory, the held-out limit, and an exact recovery condition. For ordinary finite-width nonlinear training, the kernel changes and this proposition need not apply.
Overall, compact-memory effects can be represented exactly by a sufficiently expressive local GNN on one fixed input. Direct optimization recovers them in the affine case when labeled nodes observe every evaluation-relevant direction. In a fixed-kernel regime, shared GNN weights recover exactly the graph-wide signals in the corresponding labeled-node kernel interpolation space. Outside these regimes, writers can change optimization, coupling, and implicit bias, so training equivalence is not guaranteed.
C Architectural Scope
Our claim concerns components, not complete architectures. A nonlocal component is covered when all graph-wide information passes through a bounded state shared by every node. The size of this state must not grow with the number of nodes or edges. Preprocessing, model parameters, and evaluation-time randomness must also be fixed. On one fixed input, the resulting state can then be recorded and replayed exactly.
Directly covered models. Kernelized and linear attention provide the clearest examples. Their global computation factors through a fixed number of key-value moments and normalization terms [11, 12, 15]. This includes the relevant components of SGFormer, the deterministic kernel path of NodeFormer, DIFFformer-s, Polynormer-r, and GraphGPS with Performer attention [2–4, 17, 18]. Replay must store every input-dependent moment and normalizer used by the reader.
Explicit shared tokens. A fixed number of virtual or global nodes also forms a bounded shared memory. Nodes write to these tokens and later read from them. The virtual-node component of an architecture is therefore covered when the number and width of the tokens do not grow with the graph [4, 5, 10]. If the model also has local, sparse, or pairwise routes, those routes remain unchanged. The claim applies only to the shared-token component.
Models covered under conditions. Random-feature models are covered only after their evaluation-time randomness is fixed. For NodeFormer, our audit therefore concerns its deterministic kernel path, not every stochastic or relational component. Anchor, codebook, cluster, and latent-token methods fit the same formulation only when the complete shared bank has graph-independent size. If the number of stored items grows with the graph, replay is no longer a compact shared state. A low-rank score matrix alone is also insufficient. The implemented computation must actually factor through a bounded write-read state.
Models outside the direct claim. Full attention and graph-scaling sparse attention use node-pair or edge-indexed routes. These routes are not summarized by one bounded state. This includes the sparse edge pathways of Exphormer and Spexphormer, GraphGPS with BigBird attention, and the non-factorized DIFFformer-a variant [3–6, 43]. Replaying them would generally require information whose size grows with the graph. Efficiency by itself does not imply compact shared memory.
Mamba and graph state-space models. Mamba maintains a bounded recurrent state and therefore belongs to the broader write-state-read view [44]. However, the state changes along the scan. Different positions can read different states, so replaying the full sequence may require a graph-sized state trajectory. Graph Mamba models also differ in how they tokenize, order, and scan graph nodes [45, 46]. A variant is directly covered only if its graph-wide pathway ends in a bounded state shared by all relevant node readers. Variants that retain a different scan state for each node are not directly covered. A model-by-model analysis is therefore needed.
Interpretation. For hybrid models, replay removes only the covered writer. Every other pathway stays active. Exact replay also does not say that a factorized model is equivalent to the dense attention rule it approximates. This scope concerns what a fixed-input score can identify about a mechanism. It does not judge the predictive quality, expressivity, or scalability of the cited models.
D Experiments
We use the following experiments to separate different questions. Exact replay checks that the implementations have the shared-memory form described in Section 2. The static experiments ask whether the shared memory can instead be learned as graph-specific parameters. The perturbation experiment asks whether a writer trained on fixed inputs responds usefully when the input changes.
D.1 Exact Replay
We first audit four models, Nodeformer, Difformer-s, SGFormer, and Polynormer-r, on Cora, Amazon-Photo, PubMed, and Actor datasets [9, 19, 20]. We train each model on each of the datasets once. We then run its validation-selected checkpoint twice on the same input. The first run records the graph-wide state at every layer. The second run removes the corresponding writes and uses the stored shared memory with the learned read mechanism. All other parameters remain unchanged.
We construct the recorded state directly from each model’s equations:
• Polynormer-r. Each global layer records the key-value moment and the key sum . Polynomial gates, nodewise queries, local layers, and the readout remain active.
• SGFormer. The source implementation globally normalizes its queries and keys. We therefore record the query norm, the normalized key-value moment, and the normalized key sum. The GCN branch, current nodewise queries and values, and the self term in the SGFormer reader remain active.
• NodeFormer. For each layer and head, we record
The random-feature bases are fixed for the run and remain part of the reader. Gumbel sampling, relational bias, and the edge loss are disabled in this audit so that the tested path is deterministic.
• DIFFformer-s. For the simple-kernel variant, we record the query norm, normalized key-value moment, value sum, and key sum. The local graph branch, residual paths, and nodewise query computation remain active. This intervention does not apply to the non-factorized DIFFformer-a attention.
This gives independently trained model-graph combinations. For every pair, the maximum absolute difference between the original and replayed logits was zero up to numerical stability threshold, confirming what mathematics shows from the formulation.
D.2 Learning the Shared Memory Directly
Exact replay is a post-training equality. It does not show that the same state can be learned directly. We test this by comparing two configurations on Cora, Amazon-Photo, PubMed, and Actor:
-
the original model, the original model as implemented in the code base provided by the authors;
-
a learned-memory model, which replaces the writer by independently initialized trainable states of the same reader-compatible shapes.
We use SGFormer, NodeFormer, DIFFformer-s, and Polynormer-r. The learned-memory model retains every node-side reader and every local, residual, or sparse graph path. Only the key-side writer map is removed from optimization. Its output is replaced by one trainable state per layer. These states are initialized from an independent random distribution.
The original and learned-memory models use identical initial values for every common tensor and identical random-number-generator states. The learned states use zero weight decay and a separately selected learning rate. For SGFormer and DIFFformer-s, the active parameter counts differ by at most 0.4%. For NodeFormer, the number of trainable values in the learned memory depends on the random-feature dimension m, while the removed key projection depends on the per-head width . We set , making the replacement memory and the removed key projection exactly equal in parameter count. We also ran the source setting and obtained the same qualitative result. The parameter-matched setting is shown in Figure 2.
We hyperparameter-tune to choose state learning rates and state initialization scales using the validation set and on a separate set of random seeds, then evaluate the finalized hyperparameter models on the original five random seeds.
The learned-memory model is within one percentage point of the original model in fourteen of sixteen comparisons. Its mean is higher in eleven comparisons and lower in five. The only two differences larger than one point favor opposite configurations. There is therefore no consistent accuracy advantage from recomputing the shared memory in these runs.
These results do not prove that the training procedures or hypothesis classes are equivalent. They show that directly learned graph-specific states can be competitive across several standard transductive settings.
D.3 Response to Input Perturbations
The previous experiment keeps the input fixed. We next construct a task in which the correct shared memory changes in a known way. We use the largest connected components of Cora and Actor. Let denote the node signals. Each row is an eight-dimensional Gaussian vector assigned to node . These are the values that the model must aggregate.
We also select 64 fixed nodes as landmarks and construct . The row describes the position of node relative to the landmarks. Before normalization, its entries are
where is the graph distance from node to landmark . We normalize each landmark column and apply one common scale. The model receives the concatenated node input .
The two matrices therefore have different roles. X contains the node information to be averaged, while determines which nodes should receive larger weights. In particular, the target for node i is
Nodes with similar landmark-distance representations receive larger weights. In matrix form,
This target has the exact compact shared state
Using its own structural representation, node i reads
The output is an eight-dimensional vector and generally differs across nodes. The median target-kernel mass beyond two hops is 94.5% on Cora and 97.9% on Actor.
Under feature perturbations, X changes while G and remain fixed. Under graph perturbations, the landmark nodes remain fixed, but the graph distances and are recomputed.
We train Polynormer-r, SGFormer, a deterministic fixed-random-feature NodeFormer, and DIFFormers. We compare two executions of the same checkpoint. The current writer recomputes its state from the perturbed input. The recorder state reuses the state recorded on the clean input. Both executions receive the current node features, current graph, current queries, and current local paths. They differ only in the compact writer state.
We also include an aligned writer-only control. Its queries and keys are fixed to , and it learns only an value map and an output bias. This control checks that the task and optimizer can expose a useful response to input changes.
Feature perturbations use
where E is an independent standard Gaussian matrix. Thus every marginal remains standard Gaussian, and replaces all features. Topology perturbations use connected degree-preserving double-edge swaps. We recompute both and the target after each change. The horizontal axis reports the realized fraction of changed edges.
We study two training regimes. The first trains one model on one clean graph and feature matrix. The second trains one shared checkpoint on 16 inputs: eight Cora inputs and eight Actor inputs. Each graph uses
where r is the requested rewiring severity. Training and evaluation perturbations use disjoint random seeds.
Each result uses three optimization seeds and three perturbation draws per nonzero shift. We average perturbation draws within each optimization seed and report test-normalized RMSE.
Results are shown in Figure 3.
All four source-model configurations fit the clean static task better than a train-mean predictor. Under feature replacement, however, their current-writer and recorder-state curves nearly overlap. Their response slopes are close to zero. The models learned useful predictors for the clean input, but did not learn the intended feature-to-memory rule.
Topology changes give mixed results. Recomputing is nearly neutral for SGFormer and Polynormer-r. The recorder state is better for NodeFormer. DIFFormer-s benefits from recomputation on Cora but becomes unstable under strong Actor rewiring. The aligned control gives the expected opposite result: recomputation remains nearly exact, while its recorder state fails as the input moves away from the clean graph.
Training on 16 inputs does not produce a general improvement. SGFormer improves consistently across both perturbation types and both graphs, but its current-writer and recorder-state curves still overlap closely. The improvement therefore comes from the complete model and cannot be attributed to the covered writer alone. The other architectures do not improve consistently. These results show that fitting one static input does not identify whether a useful input-conditioned writer has been learned.
D.4 A Static Target With Known Long-Range Dependence
We reuse the task from Appendix D.3, but keep one input fixed throughout training and evaluation. We use the largest connected components of Cora, Actor, Amazon-Photo, and PubMed. Each node receives an eight-dimensional Gaussian signal, . We choose 64 fixed landmarks and construct from graph distance. Before column normalization,
The model input is . The target is
It has the exact compact state
Node reads . The output is node-specific, while most target mass lies outside a two-hop neighborhood on three of the four graphs.
Table 1: Graph structures used by the static long-range task. Diameter is the exact unweighted diameter of the largest connected component. The last column is the median target-kernel mass outside two hops.
| Graph | Nodes | Diameter | Mass beyond two hops |
|---|---|---|---|
| Cora | 2,485 | 19 | 94.5% |
| Actor | 7,600 | 12 | 97.9% |
| Amazon-Photo | 7,487 | 11 | 77.6% |
| PubMed | 19,717 | 18 | 99.8% |
We compare the original SGFormer, DIFFformer-s, NodeFormer, and Polynormer-r with two counterparts. The first removes the global writer and optimizes one reader-compatible shared state at each layer. It retains all readers, local paths, and residual paths. The second is a GNN with exactly two message-passing layers (GCN) and a nodewise MLP head.
We also report two simple baselines. The train-mean baseline predicts the mean training target at every node. The nearest-training-node baseline copies the target of the closest training node in graph distance. It uses no validation or test targets. We use a deterministic 60/20/20 split stratified by each node's nearest landmark. We normalize targets using training-node statistics. Figure 4 reports normalized test RMSE and confidence intervals over five disjoint final seeds.
Directly optimized memory is in the same range as the original writer and has lower mean RMSE in eight of the sixteen model-graph comparisons. There is no consistent advantage for either parameterization. The two-hop GNN obtains values of .911, .873, .512, and .934 on Cora, Actor, Amazon-Photo, and PubMed. It improves on nearest-training-node prediction on three graphs, but not on Amazon-Photo. Thus a local GNN can learn a strong graph-specific predictor even when most target dependence lies beyond its forward receptive field. This does not show that it learns the dynamic global rule. It only concerns one fixed input.
A local model can learn the fixed global information. This task gives a simple example in which a local model can directly optimize the required global information. When the input changes, the correct memory must be recomputed. On one fixed input, however, the same matrix can be learned as ordinary shared weights.
Set . The target can then be written as , where . Consider the zero-hop local model . Here, is a shared nodewise weight matrix.
Proposition 5 (Learning the fixed landmark memory). Let denote the training nodes. Optimize using . If has full column rank and , gradient descent converges from every initialization to . It therefore recovers the target on every node.
Proof. Since , the gradient-descent error satisfies
Full column rank makes positive definite. Under the stated step size, all error components converge to zero.
This result uses the precomputed structural map . It proves that the fixed memory effect is directly learnable, but it does not claim that the two-hop GNN follows the same optimization path.
The numerical rank of is 64 on all four graphs. Its condition numbers are 3.40, 9.41, 22.79, and 3.28 on Cora, Actor, Amazon-Photo, and PubMed. Thus the proposition applies to every input used in this experiment.
Target standardization does not change the result. Since , a standardized target can be written as , where and are the training-target mean and scale. If is rank deficient, Proposition 2 gives the more general condition . Every memory direction used by held-out nodes must also be visible to the training nodes.
D.5 City-Networks Benchmarks
City-Networks provides a long-range node-classification task on large road graphs [14]. The ten classes are obtained from weighted node eccentricity within 16 hops. We use the provided features, labels, and fixed 10/10/80 train, validation, and test split. We report results on Paris, Shanghai, and Los Angeles.
We compare each original model with a directly optimized shared-memory counterpart. The counterpart removes the global writer and replaces its output at each layer with a same-shaped trainable state. The state is initialized independently and is not initialized from replay. The original readers and all local, relational, and residual paths remain unchanged. Matched seeds preserve the initialization of every retained parameter.
For SGFormer, we use the architecture and main numerical settings released with City-Networks. NodeFormer uses the same depth, width, dropout, and training budget as a controlled adaptation. It is not a published City-specific configuration. Both models use our common training and evaluation loop.
Across the six comparisons in Figure 5, the difference in mean accuracy ranges from to percentage points. All displayed marginal confidence intervals overlap. These preliminary results show that the shared memories can be optimized to similar accuracy on these fixed graphs.
D.6 Hyperparameters and Reproducibility
All experiments use full-batch training. Graphs are made undirected. Cora and PubMed use the PyG public Planetoid split [7], Amazon-Photo uses the stored Polynormer split [9], and Actor uses public
Table 2: Exact replay configurations. Depth lists local and global layers when both are present. RF is the number of NodeFormer random features.
| Model | Hidden width | Depth | Heads | RF | Additional setting |
|---|---|---|---|---|---|
| Polynormer-r | 64 | 1 local + 1 global | 1 | - | Layer normalization |
| SGFormer | 64 | 4 GCN + 1 global | 1 | - | Graph weight 0.8 |
| NodeFormer | 32 | 2 kernel layers | 4 | 30 | Fixed RF basis, no Gumbel or edge loss |
| DIFFformer-s | 64 | 2 simple-kernel layers | 1 | - | Local graph branch retained |
Table 3: Original and learned-memory hyperparameters. gives the maximum number of epochs and early-stopping patience. For Polynormer-r, layers give local + global layers, dropout gives input/local/global dropout, and gives local-stage epochs + global-stage maximum/patience. Its is the width per head. The final column gives the learned-state learning rate and initialization scale.
| Model | Graph | Layers | Dropout | LR | Weight decay | State LR/init. | |||
|---|---|---|---|---|---|---|---|---|---|
| SGFormer | Cora | 64 | .5/.2 | 1000/200 | .01/.10 | ||||
| SGFormer | Amazon-Photo | 64 | .5/.3 | 1000/120 | .01/.10 | ||||
| SGFormer | PubMed | 64 | .5/.3 | 1000/200 | .10/.10 | ||||
| SGFormer | Actor | 64 | .2/.2 | 1000/200 | .01/.10 | ||||
| NodeFormer | Cora | 64 | 2 | .5 | 1000/200 | .001/.01 | |||
| NodeFormer | Amazon-Photo | 64 | 2 | .3 | 1000/120 | .001/.01 | |||
| NodeFormer | PubMed | 32 | 2 | .3 | 1000/200 | .001/.01 | |||
| NodeFormer | Actor | 32 | 2 | 0 | 1000/200 | .001/.01 | |||
| DIFFformer-s | Cora | 64 | 8 | .2 | 500/100 | 1.0/.01 | |||
| DIFFformer-s | Amazon-Photo | 64 | 4 | .2 | 1000/120 | .01/.01 | |||
| DIFFformer-s | PubMed | 64 | 4 | .2 | 500/100 | .01/.01 | |||
| DIFFformer-s | Actor | 64 | 2 | .5 | 300/80 | .10/.01 | |||
| Polynormer-r | Cora | 64 | .15/.5/.5 | 100 + 500/60 | .01/.02 | ||||
| Polynormer-r | Amazon-Photo | 64 | .2/.7/.5 | 200 + 1000/120 | .01/.02 | ||||
| Polynormer-r | PubMed | 64 | .15/.5/.5 | 100 + 500/60 | .05/.02 | ||||
| Polynormer-r | Actor | 64 | .15/.5/.5 | 0 | 100 + 500/60 | .05/.05 |
split 0 [20]. Unless stated otherwise, optimization uses Adam, cross-entropy for node classification, and gradient clipping at 5.
The exact replay uses 100 training epochs, learning rate , weight decay , and early stopping after ten validation checks. Dropout is disabled because replay is tested under deterministic evaluation.
Table 3 gives the configurations used in the static learned-memory comparison. For SGFormer, depth, dropout, and weight decay are written as local/global, GCN/Transformer, and base/writer values. For NodeFormer, the column gives heads, random features, and relational-bias order. The NodeFormer rows show the exact-count geometry used in Figure 2. Learned states always use zero weight decay.
SGFormer uses graph weight 0.8. Amazon-Photo enables batch normalization, residuals, and the hidden activation; the other SGFormer configurations disable them. NodeFormer uses , batch normalization, and residual connections. Gumbel sampling and edge loss are disabled in both paired configurations. DIFFformer-s uses , batch normalization, residual connections, and no learned layer weighting. Its graph branch is active except on Actor.
The perturbation-task settings are listed in Table 4. The graph, landmark set, clean signal, split, and perturbation draws are cached and shared across model configurations.
Table 4: Perturbation-task hyperparameters.
| Parameter | Value |
|---|---|
| Graphs | Largest connected components of Cora and Actor, with 2485 and 7600 nodes |
| Split | Nearest-landmark-stratified 60/20/20; train/validation/test counts are 1467/480/538 and 4530/1526/1544 |
| Structural map | 64 farthest-point landmarks, exponential scale |
| Node signal | Eight-dimensional standard Gaussian |
| Feature shifts | in Equation (22) |
| Topology shifts | Connected degree-preserving swaps with requested severities \{0,.01,.02,.05,.1,.2,.4,.8,1\}; results use the realized changed-edge fraction |
| Perturbation draws | Three per nonzero shift, averaged within each training run |
| Multi-input training | Eight inputs per graph, 16 in total |
| Evaluation metric | Test RMSE after normalizing each target dimension using training-node statistics |
Table 5: Perturbation-model hyperparameters. One-input budget gives maximum epochs and patience in validation checks. Multi-input models use 1600 steps, validation every 80 steps, and patience 10 checks. All source-model rows use dropout 0.
| Model | Width | Depth | Heads/RF | LR/weight decay | One-input budget |
|---|---|---|---|---|---|
| Polynormer-r | 64 | 1 local + 1 global | 1/—— | 1500/50 | |
| SGFormer | 64 | 4 GCN + 1 global | 1/—— | 300/30 | |
| NodeFormer | 32 | 2 kernel layers | 4/30 | 1000/50 | |
| DIFFformer-s | 64 | 2 simple-kernel layers | 1/—— | 1000/30 | |
| Writer-only control | 8 | 8×8 value map + bias | - | .05/0 | 3000/50 |
Table 6: Hyperparameters for the City-Networks experiment. State learning rates are listed as Paris/Shanghai/Los Angeles.
| Setting | SGFormer | NodeFormer |
|---|---|---|
| Hidden width | 64 | 64 |
| Layers | 16 local + 16 global | 16 |
| Attention heads | 1 | 1 |
| Dropout | 0.2 | 0.2 |
| Normalization / residual | on / on | on / on |
| Graph weight | 0.8 | - |
| Random features | - | 64 |
| Relational-bias order | - | 2 |
| Temperature | - | 0.25 |
| Gumbel sampling / edge loss | - | off / off |
| Optimizer | Adam | Adam |
| Loss | Cross-entropy | Cross-entropy |
| Retained-parameter learning rate | ||
| Weight decay, retained / state | ||
| State learning-rate grid | ||
| Selected state learning rate | .01/.10/.01 | .001/.001/.001 |
| State initialization scale | 0.01 | 0.01 |
| Maximum epochs | 20,000 | 20,000 |
| Evaluation interval / patience | 100/3,000 | 100/3,000 |
| Gradient-norm clipping | 5 | 5 |
| Active values, original / state | 205,130/205,146 | 271,530/271,530 |