Scalable Message Passing Neural Networks: No Need for Attention in Large Graph Representation Learning

## Abstract

Abstract We propose Scalable Message Passing Neural Networks (SMPNNs) and demonstrate that, by integrating standard convolutional message passing into a Pre-Layer Normalization Transformer-style block instead of attention, we can produce high-performing deep message-passing-based Graph Neural Networks (GNNs). This modification yields results competitive with the state-of-the-art in large graph transductive learning, particularly outperforming the best Graph Transformers in the literature, without requiring the otherwise computationally and memory-expensive attention mechanism. Our architecture not only scales to large graphs but also makes it possible to construct deep message-passing networks, unlike simple GNNs, which have traditionally been constrained to shallow architectures due to oversmoothing. Moreover, we provide a new theoretical analysis of oversmoothing based on universal approximation which we use to motivate SMPNNs. We show that in the context of graph convolutions, residual connections are necessary for maintaining the universal approximation properties of downstream learners and that removing them can lead to a loss of universality.

## 1 Introduction

Traditionally, Graph Neural Networks (GNNs) [] have primarily been applied to model functions over graphs with a relatively modest number of nodes. However, recently there has been a growing interest in exploring the application of GNNs to large-scale graph benchmarks, including datasets with up to a hundred million nodes []. This exploration could potentially lead to better models for industrial applications such as large-scale network analysis in social media, where there are typically millions of users, or in biology, where proteins and other macromolecules are composed of a large number of atoms. This presents a significant challenge in designing GNNs that are scalable while retaining their effectiveness.

To this end, we take inspiration from the literature on Large Language Models (LLMs) and propose a simple modification to how GNN architectures are typically arranged. Our framework, Scalable Message Passing Neural Networks (SMPNNs), enables the construction of deep and scalable architectures that outperform the current state-of-the-art models for large graph benchmarks in transductive classification. More specifically, we find that following the typical construction of the Pre-Layer Normalization (Pre-LN) Transformer formulation [] and replacing attention with standard message-passing convolution is enough to outperform the best Graph Transformers in the literature. Moreover, since our formulation does not necessarily require attention, our architecture scales better than Graph Transformers. Attention can also be easily incorporated into our framework if needed; however, in general, we find that adding attention, at least for large-scale graph transductive learning, only leads to marginal improvements in performance at the cost of being more computationally demanding.

Our empirical observations, which demonstrate that SMPNNs can use many layers unlike traditional GNNs, are supported by recent theoretical studies on oversmoothing and oversharpening in graph convolutions [] and Transformers []. These studies suggest the crucial role of residual connections in mitigating oversmoothing and low-frequency dominance in representations. It is worth noting, however, that the aforementioned works primarily approached this issue from a theoretical standpoint and did not scale to large graph datasets. Expanding upon previous theoretical studies on oversmoothing, we provide a universal approximation perspective. Specifically, we demonstrate that residual connections, such as those found in the Transformer block architecture and other newer blocks utilized in the LLM literature, like the Mamba block [], are essential for preserving the universal approximation properties of downstream classifiers.

Contributions. We propose Scalable Message Passing Neural Networks (SMPNNs), a framework designed to scale traditional message-passing GNNs. Our main contributions are the following:

- (i)
The SMPNN architecture can scale to large graphs thanks to its $\mathcal{O}(E)$ graph convolution computational complexity, outperforming state-of-the-art Graph Transformers for transductive learning without using global attention mechanisms. It also enables deep message-passing GNNs without suffering from oversmoothing, a problem that has traditionally limited these networks to shallow configurations.
- (ii)
We theoretically analyze the advantages of our architecture compared to traditional convolutions over graphs from a universal approximation perspective. Importantly, unlike previous works, we do not rely on the asymptotic convergence of the system to explain its behaviour.
- (iii)
We perform extensive experiments in large-graph transductive learning as well as on smaller datasets and demonstrate that our model consistently outperforms recently proposed Graph Transformers and other traditional scalable architectures. We also conduct ablations and additional experiments to test the importance of the different components of our architecture and support our theoretical claims.

## 2 Background

Graph Representation Learning and Notation. We denote a graph with $\mathcal{G}=(\mathcal{V},\mathcal{E})$, where $\mathcal{V}$ represents a set of nodes (or vertices), and $\mathcal{E}\subseteq(\mathcal{V}\times\mathcal{V})$ is a set of 2-tuples signifying edges (or links) within the graph.
For any pair of nodes $v_{i}$ and $v_{j}$ within $\mathcal{G}$, their connection is encoded as $(v_{i},v_{j})\in\mathcal{E}$ if the edge originates from $v_{i}$ and terminates at $v_{j}$. The (one-hop) neighborhood of node $v_{i}$, constitutes the set of nodes sharing an edge with $v_{i}$, denoted by $\mathcal{N}(v_{i})=\{v_{j}|(v_{i},v_{j})\in\mathcal{E}\}$.
To encode the structural connectivity amongst nodes in a graph of $N=|\mathcal{V}|$ nodes and $E=|\mathcal{E}|$ edges, an adjacency matrix $\mathbf{A}\in\mathbb{R}^{N\times N}$ is employed. This adjacency matrix may adopt a weighted or unweighted representation. In the case of a weighted adjacency matrix, the entries $A_{ij}\in\mathbb{R}$ symbolize the strength of the connection, with $A_{ij}=0$ denoting absence of a connection if $(v_{i},v_{j})\notin\mathcal{E}$.
Conversely, in an unweighted adjacency matrix, $A_{ij}=1$ signifies the presence of an edge, and $A_{ij}=0$ otherwise. The degree matrix $\mathbf{D}\in\mathbb{R}^{N\times N}$ is defined as the matrix where each entry on the diagonal is the row-sum of the adjacency matrix: $D_{ii}=\sum_{j}A_{ij}$. Based on this, we can define the graph Laplacian as $\mathbf{L}=\mathbf{D}-\mathbf{A}$. The normalized graph Laplacian, denoted as $\mathbf{L}_{\text{norm}}=\mathbf{I}-\mathbf{D}^{-\frac{1}{2}}\mathbf{A}\mathbf
{D}^{-\frac{1}{2}}$, is a variation of the graph Laplacian that takes into account the degrees of the nodes. Additionally, within our context, we are interested in graphs with node features. Each node $v_{i}\in\mathcal{V}$ is accompanied by a $D$-dimensional feature vector $\mathbf{x}_{i}\in\mathbb{R}^{1\times D}$.
The feature vectors for all nodes within the graph can be aggregated into a single matrix $\mathbf{X}\in\mathbb{R}^{N\times D}$ by stacking them along the row dimension.

Message Passing Neural Networks (MPNNs) are a class of Graph Neural Networks (GNNs). MPNNs operate by means of message passing, wherein nodes exchange vector-based messages to refine their representations, leveraging the graph connectivity structure as a geometric prior. Following [], a message passing GNN layer $l$ (excluding edge and graph-level features for simplicity) over a graph $\mathcal{G}$ is defined as:

$$ $\mathbf{x}_{i}^{(l+1)}=\phi\biggl{(}\mathbf{x}_{i}^{(l)},\bigoplus_{j\in \mathcal{N}(v_{i})}\psi(\mathbf{x}_{i}^{(l)},\mathbf{x}_{j}^{(l)})\biggr{)},$ (1) $$

where $\psi$ denotes a message passing function, $\bigoplus$ is some permutation-invariant aggregation operator, and $\phi$ is a readout or update function. Both $\psi$ and $\phi$ are learnable and typically implemented as MLPs. It is important to note that the update equation is local, and that at each layer each node only communicates with its one-hop neighborhood given by the adjacency matrix of the graph. More distant nodes are accessed by stacking multiple message-passing layers.

Graph Convolutional Networks (GCNs) implement a special type of message passing of the following form:

$$ $\mathbf{X}^{(l+1)}=\zeta\Big{(}\tilde{\mathbf{A}}\mathbf{X}^{(l)}\mathbf{W}^{( l)}\Big{)},$ (2) $$

where $\zeta$ is a non-linear activation function, $\mathbf{W}^{(l)}$ is a learnable weight matrix, and $\tilde{\mathbf{A}}$ is computed as a function of the degree matrix and the adjacency matrix. The features are aggregated row-wise:

$$ $\Big{(}\tilde{\mathbf{A}}\mathbf{X}^{(l)}\Big{)}_{i}=c_{ii}\mathbf{x}_{i}^{(l) }+\sum_{j\in\mathcal{N}(v_{i})}c_{ij}\mathbf{x}_{j}^{(l)}\,;\,c_{ij}=\frac{1}{ \sqrt{\mathrm{deg}(v_{i})\mathrm{deg}(v_{j})}}.$ (3) $$

Transformers. The Transformer architecture [] is characterized by its all-to-all pairwise communication between nodes via the scaled dot-product attention mechanism. Transformers can be seen as an MPNN on a fully-connected graph [, ], where all nodes are within the one-hop neighborhood of each other in every layer. This avoids issues in capturing long-range dependencies inherent to message passing, since they are all connected. However, Transformers discard the locality inductive bias of the input graph. Given input query, key, and value matrices, $\mathbf{Q}=\mathbf{X}\mathbf{W}_{Q}$, $\mathbf{K}=\mathbf{X}\mathbf{W}_{K}$, $\mathbf{V}=\mathbf{X}\mathbf{W}_{V}\in\mathbb{R}^{N\times D}$ (where for simplicity we assume the feature dimensionality of these matrices is kept the same as the original node features, $\mathbf{X}\in\mathbb{R}^{N\times D}$), the self-attention operation in the encoder blocks computes:

$$ $\mathbf{X}^{\prime}=\textrm{softmax}(\mathbf{Q}\mathbf{K}^{T}/\sqrt{D})\mathbf {V}.$ (4) $$

Attention is challenging to scale to large graphs due to its computational complexity of $\mathcal{O}(N^{2})$ in the number of nodes. Large-scale Graph Transformers typically replace this operation with linear attention to avoid GPU memory overflow.

Large Graph Transformers. The emergence of large-scale graph-structured datasets such as social networks has led to increased recent interest in scaling GNNs to very large graphs with up to hundreds of millions of nodes. Large-scale graph learning settings are often transductive learning, where one is given a fixed graph with partially labeled nodes and attempts to infer the properties of the missing nodes. While Graph Transformers currently produce state-of-the-art results, their main challenge is the computational complexity of attention for a large number of nodes, which is equivalent to very long context windows in LLMs. Techniques aiming at solving this problem include architectures such as Nodeformer [], which utilizes a kernelized Gumbel-Softmax operator, Difformer [], which builds on recent advances in graph diffusion, and SGFormer [], which utilizes a single linear “attention” operation without the softmax activation to avoid computational overhead when scaling to graphs with up to a hundred million nodes. Other architectures such as Exphormer [] use sparse attention mechanisms based on expander graphs to aid scaling. Additionally, Exphormer also uses linear global attention with respect to a virtual node in parallel to the expander graph. Some of the aforementioned architectures rely on the GPS Graph Transformer framework [], which combines attention with standard message-passing GNN layers and computes both in parallel in the form of a hybrid architecture. Other scalable architectures that are not based on Transformers, such as SGC [] and SIGN [], have been developed for large-scale graphs, but their performance is generally worse than that of Graph Transformers, as shown in Section 5.

## 3 Scalable Message Passing Neural Networks

### 3.1 Motivation

In the GNN literature, it has been shown that graph convolutions can exhibit asymptotic behaviors other than over-smoothing in the limit of many layers when equipped with residual connections []. This theoretical observation aligns with well-known best practices in the LLM community [, , ], which is highly experienced with both large-scale datasets and models. In this work, we aim to bridge the gap between the GNN and LLM literature and benefit from the cross-pollination of ideas.

Packaging Attention and Message-Passing. Attention has been much emphasized in the literature and, although it is certainly paramount, the importance of the other components around it should not be underestimated. Interestingly, in retrospect, the ubiquitous attention mechanism used in LLMs had already been proposed [] before the Transformer architecture []; however, it was not until it was “packaged” into the Transformer block that we know today, that it really led to the recent breakthroughs in language modeling. The scaled-dot-product attention mechanism (and its variants) in Transformers can be seen as message-passing attentional GNNs over a complete graph [, ]. It is well-known among practitioners in the LLM community that this operation struggles to learn effectively without residual connections. Yet, traditional GNN architectures simply stack message-passing layers one after the other [, , ], which seems to contradict the modus operandi of large-scale model engineering.

The main motivation of our paper is to demonstrate that the standard architectural packaging approaches used in NLP and LLMs are also applicable to GNNs, and that the standard attention mechanism used in Transformers can be substituted with message-passing layers.

### 3.2 Architecture Design and the Scalable Message Passing Block

Drawing from theoretical observations in the GNN literature and best practices in language modeling, we propose the following architecture, which is similar to the Transformer and comprises two parts: initial nodewise message-passing, analogous to tokenwise communication, and a pointwise feedforward layer to transform the feature vector of each node in isolation. Unlike the Transformer, however, our architecture has linear rather than quadratic scaling.

Figure: Figure 1: The Scalable Message Passing Neural Network (SMPNN) architecture. Left: The full model is comprised of $\mathtt{N}$ transformer-style blocks stacked one after the other. The model also uses input and output feedforward layers to project node features to the hidden and output dimensions. Middle: Architecture of a single SMPNN block as described in Section 3.2. Right: Zoom into the GCN block and the Pointwise FeedForward network with SiLU activation functions.
Refer to caption: x1.png

The Transformer Block. The original Transformer architecture has proven surprisingly robust, and the only main modification it has undergone since its inception is the change in the location of the normalization, which is now applied before attention. Indeed, the advantages of applying layer normalization [] before, as in the Pre-LN Transformer, have already been studied both theoretically [] and empirically in the literature [, , ], and we will also follow this in our implementation. Before the Transformer, residual connections were already a common component in most deep architectures for vision and language tasks since being popularized by the ResNet model []. In the LLM literature, even when alternatives to attention have been proposed, such as Mamba [], operations that perform token-wise communication (equivalent to message-passing between nodes) are always accompanied by residual connections, as well as linear projections, normalization, and sometimes gatings.

Message-Passing. We integrate a standard GCN layer into the Pre-LN Transformer style block. In particular, a single block applies the following sequence of transformations to the input matrix of node features $\mathbf{X}^{(l)}\in\mathbb{R}^{N\times D}$, where $N$ is the number of nodes and $D$ is the dimensionality of the feature vectors:

$$ $\mathbf{H}_{1}^{(l)}=\textrm{LayerNorm}(\mathbf{X}^{(l)}).$ (5) $$

Next a GCN layer (plus additional components) is used for nodewise local communication instead of the standard global self-attention:

$$ $\mathbf{H}_{2}^{(l)}=\alpha_{1}^{(l)}\operatorname{SiLU}\big{(}\tilde{\mathbf{ A}}\mathbf{H}_{1}^{(l)}\mathbf{W}_{1}^{(l)}\big{)}+\mathbf{X}^{(l)},$ (6) $$

where $\tilde{\mathbf{A}}$, the degree-normalized adjacency matrix is $\tilde{\mathbf{A}}_{i,j}=1/\sqrt{\operatorname{deg}(v_{i})\operatorname{deg}(v
_{j})}$ if $v_{i}$ and $v_{j}$ are neighbours and 0 0 otherwise. $\mathrm{SiLU}(x)=\frac{x}{1+e^{-x}}$ and it is applied elementwise. We also introduce a scaling factor $\alpha_{1}^{(l)}$ which is initialized at $10^{-6}$ for applying identity-style block initialization []. Importantly, the layer defined in equation 6 contains a residual connection, the importance of which will be theoretically justified in Section 4.

Pointwise-feedforward. The second part of the block is a pointwise transformation of the feature vectors preceded by another learnable normalization:

$$ $\displaystyle\mathbf{H}_{3}^{(l)}$ $\displaystyle=\textrm{LayerNorm}(\mathbf{H}_{2}^{(l)}),$ (7) $\displaystyle\mathbf{X}^{(l+1)}$ $\displaystyle=\mathbf{H}_{4}^{(l)}=\alpha_{2}^{(l)}\operatorname{SiLU}(\mathbf {H}_{3}^{(l)}\mathbf{W}_{2}^{(l)})+\mathbf{H}_{2}^{(l)},$ (8) $$

where similar to before, we introduce the learnable scaling $\alpha_{2}^{(l)}$, also initialized at $10^{-6}$.

Our Scalable Message Passing Neural Network block is thus of the form $\mathbf{X}\mapsto\mathbf{H}_{4}$. In Figure 1, we display the complete SMPNN architecture at different levels of granularity, which consists of stacking multiple instances of the aforementioned block. In Appendix A, we discuss how to augment SMPNNs with attention, although we find that this only leads to minor performance improvements, see Table 2 in Section 5.

### 3.3 Computational Complexity and Comparison with Graph Transformers

In Table 1, we compare the computational complexity of SMPNNs to that of various Graph Transformers in the literature. Our model’s graph convolution layer inherits the computational cost of GCNs, $\mathcal{O}(E)$, assuming a sparse representation of the adjacency matrix []. Graph Transformers such as SGFormer use both graph convolutions and linear attention, resulting in a total cost of $\mathcal{O}(N+E)$ in terms of nodewise communication operations. Note that although we are highlighting the complexity of graph convolution compared to that of linear attention, $\mathcal{O}(N)$, given our architecture also has other components that act pointwise such as linear layers (like all architectures in general) it is more accurate to think of the overall complexity of SMPNNs as being $\mathcal{O}(N+E)$. Unlike other models, we do not apply $\mathcal{O}(N^{3})$ pre-processing steps [, , , , ], which would be prohibitively expensive for the large graph datasets we are targeting. Additionally, our model does not require positional encodings, attention, augmented training loss, or edge embeddings to achieve competitive performance. We would like to highlight that the majority of Graph Transformers in Table 1 have been designed for smaller graphs and have only been demonstrated on datasets with thousands of nodes or fewer due to their quadratic complexity. Our main competitors are therefore NodeFormer [], DIFFormer [], and SGFormer [], which have managed to scale to millions of nodes using less expressive or simplified versions of attention without quadratic complexity.

Table: Table 1: Comparison of model components used by different Graph Transformers: Positional Encodings (PE), Multihead Attention (MA), Augmented Training Loss (ATL), and Edge Embeddings (EE). We also report whether the model uses All-Pair communication (typically implemented as some variant of attention), the Pre-processing and Training computational complexity, and the largest graph for which the method’s performance has been reported. *Random regular expander graph generation is needed, and graphs that fail to be near-Ramanujan are discarded and regenerated.

## 4 Theoretical Justification

In this section, we theoretically justify our architectural design. First, we review some theoretical findings from the literature that hint at the importance of residual connections to avoid oversmoothing in message-passing convolutions over graphs; moreover, by the results of [] they make the loss landscape of the deep learning model much less jagged. Inspired by these results, we further extend the analysis through the lenses of universal approximation.

### 4.1 Oversmoothing

Oversmoothing is regarded as the tendency of node features to approach the same value after several message-passing transformations. This phenomenon has prompted the adoption of relatively shallow GNNs, as adding many layers has traditionally resulted in node-level features that are too similar to each other and, hence, indistinguishable for downstream learners. This has hindered scalability and led to models with orders of magnitude fewer parameters than, for instance, counterparts in the literature on 2D generative modelling [] and LLMs [], which have already adopted architectures with billions of parameters.

In general, standalone message-passing GNNs tend to behave as low-pass filters and may consequently lead to oversmoothing. However, this does not always need to be the case: graph convolution can also magnify high frequencies if it is augmented with residual connections. Following [], message-passing is characterized as being low- frequency dominant (LFD) or high-frequency dominant (HFD) depending on the asymptotic behavior of the normalized Dirichlet energy of the system as the number of diffusion layers $l\rightarrow\infty$. These lead to oversmoothing and oversharpening, respectively.

###### Definition 4.1 (Graph Dirichlet Energy of a Message Passing System [ 39 ] ) .

We define the Dirichlet Energy as a map $\mathfrak{E}^{Dir}:\mathbb{R}^{N\times D}\rightarrow\mathbb{R}$

$$ $\mathfrak{E}^{Dir}(\mathbf{X})\stackrel{{\scriptstyle\mbox{\tiny def.}}}{{=}} \frac{1}{2}\sum_{i,j\in\mathcal{E}}||(\nabla\mathbf{X})_{ij}||^{2}\,;\,(\nabla \mathbf{X})_{ij}\stackrel{{\scriptstyle\mbox{\tiny def.}}}{{=}}\frac{\mathbf{x }_{j}}{\sqrt{\mathrm{deg}(v_{j})}}-\frac{\mathbf{x}_{i}}{\sqrt{\mathrm{deg}(v_ {i})}},$ (9) $$

where $(\nabla\mathbf{X})_{ij}$ is the edge-wise gradient of the graph node features $\mathbf{X}\in\mathbb{R}^{N\times D}$.

###### Definition 4.2 (Graph Frequency Dominance [ 4 ] ) .

We say a message passing GNN is LFD if its normalized Dirichlet energy $\mathfrak{E}^{Dir}(\mathbf{X}^{(l)})/||\mathbf{X}^{(l)}||^{2}\rightarrow
\lambda_{1}=0$ for $l\rightarrow\infty$ and HFD if $\mathfrak{E}^{Dir}(\mathbf{X}^{(l)})/||\mathbf{X}^{(l)}||^{2}\rightarrow
\lambda_{n}$ for $l\rightarrow\infty$, where $\mathbf{X}^{(l)}$ encapsulates the node level features at a given layer $l$ and $1\leq\lambda_{n}<2$ [] is the largest eigenvalue whose corresponding eigenvector of the normalized graph Laplacian captures fine-grained microscopic behavior of the signal on the graph.

In particular, the above characterization relies on analyzing message-passing from the perspective of gradient flows in the limit of infinitely many layers. Although analyzing the asymptotic behavior of GNNs is interesting from a theoretical perspective, the normalized Dirichlet energy is not directly predictive of model success, since both over-smoothing and over-sharpening will lead to degradation in performance []. We provide an alternative perspective through the lens of universal approximation, which does not rely on asymptotic behavior. Specifically, we demonstrate that the universal approximation property of downstream classifiers is compromised when passing input features through graph convolution layers, but it can be restored with a residual connection.

###### Definition 4.1 (Graph Dirichlet Energy of a Message Passing System [ 39 ] ) .

###### Definition 4.2 (Graph Frequency Dominance [ 4 ] ) .

### 4.2 Universality and Residual Connections

We will use $\mathcal{C}(\mathbb{R}^{N\times D})$ to denote the set of continuous functions from $\mathbb{R}^{N\times D}$ to $\mathbb{R}$, when both are equipped with the (only) norm topologies thereon.
We use $\mathcal{MLP}_{N\times D}$ to denote the set of MLPs from $\mathbb{R}^{N\times D}$ to $\mathbb{R}$ with a $\operatorname{SiLU}$ activation function. We consider a class of models to be expressive if it is a universal approximator, in the local uniform sense of [, , , ], meaning that it can approximately implement any continuous function uniformly on compact sets.

###### Definition 4.3 (Universal Approximator) .

A subset of models $\mathcal{F}\subseteq\mathcal{C}(\mathbb{R}^{N\times D})$ is said to be a universal approximator in $\mathcal{C}(\mathbb{R}^{N\times D})$
if: for each continuous target function $f:\mathbb{R}^{N\times D}\to\mathbb{R}$, each uniform approximation error $\varepsilon>0$ and every non-empty compact set of inputs $K\subset\mathbb{R}^{N\times D}$, there exists some model $\hat{f}\in\mathcal{F}$ such that

$$ $\max_{\mathbf{X}\in K}\,|f(\mathbf{X})-\hat{f}(\mathbf{X})|<\varepsilon.$ (10) $$

We will consider two classes of models, highlighting the key benefits and drawbacks of adding versus omitting residual connections in graph convolution layers (Equation 2). Fix a matrix $\mathbf{W}\in\mathbb{R}^{D\times D}$ and a connected graph $\mathcal{G}$ on $N$ nodes.

No Residual Connection. Consider the class $\mathcal{F}_{\mathcal{G},\mathbf{W}}$ which consists of all maps $\hat{f}:\mathbb{R}^{N\times D}\to\mathbb{R}$

$$ $\hat{f}=\operatorname{MLP}\circ\mathcal{L}_{\mathcal{G},\mathbf{W}}^{ \operatorname{conv}}\,;\,\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{ conv}}(\mathbf{X})\stackrel{{\scriptstyle\mbox{\tiny def.}}}{{=}}\tilde{ \mathbf{A}}\mathbf{X}\mathbf{W},$ (11) $$

where $\operatorname{MLP}\in\mathcal{MLP}_{N\times D}$ and $\tilde{\mathbf{A}}$ is the degree-normalized adjacency matrix. The class $\mathcal{F}_{\mathcal{G},\mathbf{W}}$ is the stylized representation of GCN models without a residual connection.

Residual Connection. We benchmark this class against a simplified version of our SMPNN block. Again, fixing $\mathbf{W}$ and a connected graph $\mathcal{G}$ on $N$ nodes. This class, denoted by $\mathcal{F}^{\operatorname{residual}}_{\mathcal{G},\mathbf{W}}$, consists of maps $\hat{f}:\mathbb{R}^{N\times D}\to\mathbb{R}$ with representation

$$ $\hat{f}=\operatorname{MLP}\circ\mathcal{L}_{\mathcal{G},\mathbf{W}}^{ \operatorname{conv+r}}\,;\,\hfill\mathcal{L}_{\mathcal{G},\mathbf{W}}^{ \operatorname{conv+r}}(\mathbf{X})\stackrel{{\scriptstyle\mbox{\tiny def.}}}{{ =}}\tilde{\mathbf{A}}\mathbf{X}\mathbf{W}+\mathbf{X},$ (12) $$

We emphasize that the MLPs within both sets, $\mathcal{F}_{\mathcal{G},\mathbf{W}}$ and $\mathcal{F}^{\operatorname{residual}}_{\mathcal{G},\mathbf{W}}$, are identical. Hence, there are no inherent advantages or disadvantages between them; the sole discrepancy lies in the presence or absence of a residual connection.
The following set of results provides a counter-example to the universality of $\mathcal{F}_{G,\mathbf{W}}$ when $G$ is a complete graph. We shows that this deficit it not an issue when incorporating a residual connection as $\mathcal{F}_{G,\mathbf{W}}^{\text{residual}}$ is universal.

In general, analyzing the expressive power of GNNs from the perspective of universal approximation can be cumbersome due to the variety of vastly different graphs encountered in practice. However, the importance of accompanying graph convolution with a residual connection can already be observed in the case of a complete graph. Our first main finding is a negative result, showing that the universal approximation property of MLPs is lost when passing input features through a graph convolution layer with no residual connection for any learnable weight matrix $\mathbf{W}$ used in equation 11.

###### Theorem 4.1 (No Universal Approximation via Graph Convolution Alone) .

Let $N,D$ be positive integers with $N\geq 2$. Let $\mathcal{G}$ be a complete graph on $N$ nodes. For any weight matrix $\mathbf{W}\in\mathbb{R}^{D\times D}$,
the class $\mathcal{F}_{\mathcal{G},\mathbf{W}}$ defined in equation 11 is not a universal approximator in $\mathcal{C}(\mathbb{R}^{N\times D})$.

This is contrasted against our positive result, which shows that the universal approximation property of MLPs is preserved when passing input features through graph convolution with a residual connection.

###### Theorem 4.2 (Universal Approximation via Graph Convolution is Possible with Residual Connections) .

Let $N,D$ be positive integers. There exists a weight matrix $\mathbf{W}\in\mathbb{R}^{D\times D}$ such that the class “with skip connection” $\mathcal{F}^{\operatorname{residual}}_{\mathcal{G},\mathbf{W}}$ is a universal approximator in $\mathcal{C}(\mathbb{R}^{N\times D})$.

Interestingly, a more technical version of Theorem 4.2 in the appendix of the paper (Theorem B.6), which shows that the matrix $\mathbf{W}$ allows for universality to be regained through the skip connection is not obscure; rather it can be explicitly constructed by sampling from a random Gaussian matrix. Furthermore such a matrix is nearly always obtained in this manner with probability approaching $100\%$ in high dimensions. All proofs and derivations are provided in Appendix B.

This analysis supports our architectural choices in Section 3.2, which represent an amalgamation of best practices in the LLM literature with the theoretical insights here presented concerning oversmoothing and universality.

###### Definition 4.3 (Universal Approximator) .

###### Theorem 4.1 (No Universal Approximation via Graph Convolution Alone) .

###### Theorem 4.2 (Universal Approximation via Graph Convolution is Possible with Residual Connections) .

## 5 Experimental Validation

We experimentally validate our architecture and compare it to recent state-of-the-art baselines. We follow the evaluation protocol used in NodeFormer [], DIFFormer [], and SGFormer []. Additionally, we perform ablations and further experiments to verify the theoretical analysis presented in Section 4. For details, refer to Appendix C.

Large Scale Graph Datasets (Table 2). We compare the performance of SMPNNs to that of Graph Transformers tailored for large graph transductive learning, as well as other GNN baselines. Note that most Graph Transformer architectures (Table 1) are difficult to scale to these datasets. We observe that SMPNNs consistently outperform SOTA architectures without the need for attention. Augmenting the base SMPNN model with linear attention (Appendix A) leads to improvements in performance of under $1\%$ only, while substantially increasing computational overhead. For instance, in the case of the ogbn-products dataset, using the same hyperparameters, adding linear global attention with a single head increases the total number of model parameters from 834K to 2.4M. The resulting performance gain of only $0.18\%$ requires thus more than twice as many parameters.

Most Graph Transformers in the literature use multiple attention heads (Table 1); we experimented with up to 4 attention heads but found differences in terms of performance not to be statistically significant, which seems to align with the conclusions of []. Furthermore, note that as reported in the OGB benchmark paper [], the Max Strongly Connected Component Ratio (MaxSCC Ratio) for the node-level datasets used in these experiments is 1.00 for all datasets (except for ogbn-products, which is 0.97). This indicates that the entire graph is a single strongly connected component, meaning every node is reachable from every other node. Although this does not guarantee that information bottlenecks will not be present, a high MaxSCC Ratio denotes high inter-connectivity, where information or influence can rapidly spread among a large proportion of the network, which may explain why attention is not that important in such settings. Apart from SMPNN and SMPNN augmented with attention, we also include a Linear Transformer baseline, which corresponds to removing the GCN layer from our architecture and substituting local convolution with global linear attention. This is also clearly worse than SMPNNs, which again verifies that in these datasets, the locality inductive bias is important.

Table: Table 2: Test results (mean ± standard deviation over 5 runs) on large graph datasets. We report ROC-AUC for ogbn-proteins and accuracy for all others, higher is better.

100M Node Graph Dataset and Scalability Experiments (Table 3). We test the scalability of our pipeline on the ogbn-papers-100M dataset. Our main competitors are SIGN [] and SGFormer [], as other Graph Transformers have not been able to scale to this dataset. We outperform SGFormer without requiring attention, again demonstrating the scalability and effectiveness of SMPNNs.

**Table 3: Test results (mean accuracy ± standard deviation) on ogbn-papers-100M dataset.**
| Dataset | ogbn-papers-100M |
| --- | --- |
| Nodes | 111,059,956 |
| Edges | 1,615,685,872 |
| MLP | 47.24 ± 0.31 |
| GCN [] | 63.29 ± 0.19 |
| SGC [] | 63.29 ± 0.19 |
| GCN-NSampler [, ] | 62.04 ± 0.27 |
| GAT-NSampler [, ] | 63.47 ± 0.39 |
| SIGN [] | 65.11 ± 0.14 |
| SGFormer [] | 66.01 ± 0.37 |
| SMPNN | 66.21± 0.10 |

Additional Image, Text, and Spatio-Temporal Benchmarks (Tables 4 and  5). For completeness, we also test our architecture on image and text classification with low label rates, as well as on spatio-temporal dynamics prediction, following []. Our model achieves the best performance in most configurations for the CIFAR, STL, and 20News datasets. Likewise, in Table 5, SMPNNs are also competitive in spatio-temporal prediction. These results demonstrate that our architecture is applicable to a variety of tasks.

Table: Table 4: Test results (mean accuracy ± standard deviation over 5 runs) on Image and Text datasets.

Table: Table 5: Test results (mean MSE ± standard deviation over 5 runs) for spatio-temporal dynamics prediction datasets. Lower is better. w/o g stands for without graph.

Ablation on SMPNN Architecture Components. In Table 6, we conduct an ablation study. First, we ablate the standard SMPNN architecture by removing residual connections after graph convolution layers. In line with the theory presented in Section 4, we observe that this indeed has a significant impact on model performance. Next, we test the effect of fixing the learnable scaling connections ($\alpha_{1}^{(l)}=\alpha_{2}^{(l)}=1,\forall l$) while retaining the residuals. This decreases performance for ogbn-proteins and ogbn-arxiv, whereas it slightly increases performance for pokec and ogbn-products. We decide to keep the scalings since they make the model more expressive in general. Additionally, we test removing the pointwise feedforward transformation, which leads to a slight drop in performance for all datasets and seems particularly relevant for ogbn-proteins. This experiment suggests that the most critical part of the architecture is the message-passing component, as expected. Lastly, for completeness, we also test removing the LayerNorm before the GCN, which generally leads to a drop in performance. However, in the case of ogbn-arxiv, this configuration obtains a test accuracy of $74.46\%$, which outperforms all other models and baselines. In conclusion, there is no free lunch; depending on the dataset, slight modifications may lead to improved performance and, interestingly, have even more of an effect than augmenting SMPNNs with linear attention. Nevertheless, we find that, in general, the standard SMPNN block is robust and leads to SOTA results across several datasets.

Table: Table 6: Results (mean test set accuracy ± standard deviation over 5 runs) for ablation studies on OGBN large graph datasets.

Deep Models are Possible with SMPNNs. It is well known that conventional message-passing GNNs [, , ] are restricted to shallow architectures, since their performance degrades when stacking many layers. Next, we demonstrate that deep models are possible with SMPNNs. In particular, we perform an experiment in which we progressively increase the number of SMPNN layers while keeping all other hyperparameters constant for the ogbn-arxiv and ogbn-proteins datasets, from 2 to 12 layers. Adding up to 6 layers seems to improve performance, and it plateaus thereafter. Additionally, we perform another experiment in which we follow the same procedure but for an SMPNN without residual connections after convolutions. In this case, we observe a clear drop in performance after 4 layers, which aligns with our theoretical understanding from Section 4.

Table: Table 7: Results (mean accuracy ± standard deviation over 5 runs) on deep SMPNN architectures.

Figure: Figure 2: Max GPU consumption versus number of edges in the subgraph for SMPNN with 6 layers.
Refer to caption: x2.png

GPU Memory Scaling. We proceed to examine the model’s scalability utilizing the ogbn-products dataset and randomly sampling a subset of nodes for graph mini-batching (from 10K to 100K), following the analysis in []. In Figure 2, we report the maximum GPU memory usage in GB against the number of edges in the subgraph induced by the sampled nodes. We can see that it asymptotes towards linearity in the number of edges as discussed in Section 3.3. For small subgraphs $N$ dominates the complexity term and results in a steeper slope. Additionally, we compare the computational overhead of different SMPNN configurations to that of SGFormer on a Tesla V100 GPU, see Figure 3. Interestingly, the scaling factors $\alpha$ seem to have a substantial computational impact as the number of nodes increases, which, combined with the ablations in Table 6, suggests it may be better to remove it for very large graphs. Moreover, we find that the GPU consumption of SMPNNs can be substantially reduced when omitting the pointwise feedforward part of the block. This reduces computation cost substantially below that of SGFormer. Hence, one can trade GPU usage for performance: note that as shown in Table 6, SMPNNs without feedforwards still outperform the SGFormer baseline. SGFormer does not use feedforward networks or traditional attention mechanisms. Instead, it employs a simplified linear version of attention and even omits the softmax activation function.

Figure: Figure 3: Max GPU consumption versus the number of nodes in the batch subgraph for different models with 6 layers.
Refer to caption: x3.png

## 6 Conclusion

Our framework, Scalable Message Passing Neural Networks (SMPNNs), overcomes scalability issues in traditional GNNs and is based on best practices found in the LLM literature. In particular, it allows for deep architectures without degradation in performance, which is a common limitation of GNNs. SMPNNs scale efficiently to large graphs, outperforming Graph Transformers without using global attention. The lack of a need for attention can be attributed to the local nature of most large graph transductive learning tasks. Empirical validation across diverse datasets confirms SMPNNs’ competitive performance and supports the theoretical justification of residual connections. This work opens new possibilities for leveraging deep architectures in large-scale graph learning.

## Acknowledgements

HSOB would like to thank Qitian Wu for the early discussions on Graph Transformers.
AK acknowledges financial support from an NSERC Discovery Grant No. RGPIN-2023-04482 and No. DGECR-2023-00230. AK also acknowledges that resources used in preparing this research were provided, in part, by the Province of Ontario, the Government of Canada through CIFAR, and companies sponsoring the Vector Institute.

## Appendix A Augmenting SMPNNs with Attention

SMPNNs, in principle, perform local convolution but can also be enhanced with attention. Here, we discuss the specific attention mechanism implemented in our experiments.

Linear Global Attention. Global attention can be seen as computing message passing over a fully-connected dense graph. In our block, attention is computed with respect to a virtual node, instead of the full $\mathcal{O}(N^{2})$ attention. Linear attention is more suitable for scaling to large graphs. Given the input query, key, and value matrices, $\mathbf{Q}=\mathbf{X}^{(l)}\mathbf{W}_{Q}\in\mathbb{R}^{N\times D}$, $\mathbf{K}=\mathbf{X}^{(l)}\mathbf{W}_{K}\in\mathbb{R}^{N\times D}$, $\mathbf{V}=\mathbf{X}^{(l)}\mathbf{W}_{V}\in\mathbb{R}^{N\times D}$ we apply the following operations. First, we compute a summed query value considering the contribution from all nodes, and normalize both the query and key matrices:

$$ $\mathbf{Q}_{\text{sn}}=\frac{\sum_{i=1}^{N}\mathbf{Q}_{i}}{||\sum_{i=1}^{N} \mathbf{Q}_{i}||_{2}}\in\mathbb{R}^{D},\,\,\mathbf{K}_{n}=\frac{\mathbf{K}}{\| \mathbf{K}\|_{2}}\in\mathbb{R}^{N\times D}.$ (13) $$

Based on these we can compute attention

$$ $\mathbf{A}_{attention}=\text{softmax}(\mathbf{Q}_{\text{sn}}\mathbf{K}_{n}^{T} )\in\mathbb{R}^{1\times N},$ (14) $$

and use it to aggregate the values

$$ $\mathbf{X}^{(l+1)}=\left(\mathbf{A}_{attention}\otimes\mathbf{1}_{N}\right) \mathbf{V}\in\mathbb{R}^{N\times D},$ (15) $$

where $\mathbf{1}_{N}$ is a row vector of ones with dimension $1\times N$ and $\otimes$ is the Kronecker product. The operation $\mathbf{A}_{attention}\otimes\mathbf{1}_{N}$ results in and $N\times N$ matrix, with all rows sharing the same attention coefficients, which is later multiplied by the value matrix $\mathbf{V}$ to obtain the final updated node features $\mathbf{X}^{(l+1)}$. The operations above can be extended to encompass multi-head attention. In such case we would have a total of $H$ attention heads and to compute the final global feature matrix we aggregate the contribution from all heads:

$$ $\mathbf{X}^{(l+1)}=\sum_{h=1}^{H}\left(\mathbf{A}_{attention}^{(h)}\otimes \mathbf{1}_{N}\right)\mathbf{V}^{(h)}\in\mathbb{R}^{N\times D}.\ {-0.1cm}$ (16) $$

Message-Passing with Parallel Attention. To augment SMPNN we use the following procedure:

$$ $\mathbf{H}_{1,local}^{(l)}=\textrm{LayerNorm}(\mathbf{X}^{(l)}).$ (17) $$

$$ $\mathbf{H}_{2,local}^{(l)}=\operatorname{SiLU}\big{(}\tilde{\mathbf{A}}\mathbf {H}_{1,local}^{(l)}\mathbf{W}_{1}^{(l)}\big{)},$ (18) $$

$$ $\mathbf{H}_{1,global}^{(l)}=\textrm{LayerNorm}(\mathbf{X}^{(l)}),$ (19) $$

$$ $\mathbf{H}_{2,global}^{(l)}=\operatorname{LinearGlobalAttention}\big{(}\mathbf {H}_{1,global}^{(l)}\big{)},$ (20) $$

$$ $\mathbf{H}_{2}^{(l)}=\alpha_{1}^{(l)}\left(\mathbf{H}_{2,local}^{(l)}+\mathbf{ H}_{2,global}^{(l)}\right)+\mathbf{X}^{(l)},$ (21) $$

where Layer Norms have different parameters for local and global features. Pointwise-feedforward operations are kept as in the original SMPNN formulation.

The update equations above are reminiscent of hybrid Graph Transformers [, , , ], and we find that they do not provide tangible improvements over standard SMPNNs. Note that we also experimented with other attention mechanisms, which did not help.

## Appendix B Proofs

This appendix contains all the proofs for our theoretical guarantees discussed in Section 4.2.

### B.1 Proofs for Universality

The proofs of both Theorems 4.1 and 4.2 revolve around verifying the conditions (or their failure) stated in [, Theorem 3.4]. This result characterizes situations where a continuous transformation of the inputs to a universal approximator preserves its universal approximation property. Importantly, when the output space is Euclidean (e.g., $\mathbb{R}$ in our case), it is both necessary and sufficient for the transformation applied to the input of the model class to be injective. Consequently, our proofs for both results primarily focus on the injectivity (or lack thereof) of the feature transformations in equation 11 and equation 12, respectively

In what follows, for any activation function $\zeta:\mathbb{R}\to\mathbb{R}$ we use $\mathcal{MLP}_{N\times D}^{\zeta}$ to denote the class of MLPs with activation function $\zeta$, mapping $\mathbb{R}^{N\times D}$ to $\mathbb{R}$. Note that this is mildly more general than the class $\mathcal{MLP}_{N\times D}$ considered in our main text, which used the specification $\zeta=\operatorname{SiLU}$.
We consider the following regularity condition on $\zeta$.

###### Assumption B.1 (Regular Activation) .

The activation function $\zeta:\mathbb{R}\to\mathbb{R}$ is continuous and either:

- (i)
[]: $\zeta$ is non-polynomial,
- (ii)
[]: $\zeta$ is non-affine and there exists some $t\in\mathbb{R}$ at which $\zeta$ is continuously differentiable and $\zeta^{\prime}(t)\neq 0$.

###### Assumption B.1 (Regular Activation) .

#### B.1.1 No universality without the residual connection

We first show that adding a single normalized graph convolution layer preceding an MLP is enough to negate the universal approximation property of the composite model in equation 11.

###### Lemma B.2 (Loss of Injectivity) .

Let $N,D$ be positive integers with $N\geq 2$. Let $\mathcal{G}$ be a complete graph on $N$ nodes, let $\tilde{\mathbf{A}}\stackrel{{\scriptstyle\mbox{\tiny def.}}}{{=}}(I_{i\sim j
\vee i=j}/\sqrt{\operatorname{deg}(v_{i})\operatorname{deg}(v_{j})})_{i,j=1}^{N}$, and let $\mathbf{W}\in\mathbb{R}^{D\times D}$.
Then, the map

$$ $\displaystyle\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv}}: \mathbb{R}^{N\times D}$ $\displaystyle\to\mathbb{R}^{N\times D}$ $\displaystyle\mathbf{X}$ $\displaystyle\mapsto\tilde{\mathbf{A}}\mathbf{X}\mathbf{W}$ $$

is not injective.

###### Proof of Lemma B.2 .

Since $\mathcal{G}$ is complete and $N\geq 1$, then $\tilde{A}_{i,j}=1/N<\infty$ for each $i,j=1,\dots,N$. In particular, all its rows are identical. Therefore, for each $\mathbf{X}\in\mathbb{R}^{N\times D}$ all the rows of the product matrix $\tilde{\mathbf{A}}(\mathbf{X}\mathbf{W})=(\tilde{\mathbf{A}}\mathbf{X}\mathbf{
W})$ are identical too. Hence, $\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv}}$ is not injective.
∎

The following is a more technical version of Theorem 4.1.

###### Lemma B.3 (No Universality without Residual Connection) .

Let $\zeta$ satisfy Assumption B.1.
Let $N,D$ be positive integers with $N\geq 2$. Let $\mathcal{G}$ be a complete graph on $N$ nodes, $\mathbf{W}\in\mathbb{R}^{D\times D}$,
and let $\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv}}$ be as in Lemma B.2.
The class of maps $f:\mathbb{R}^{N\times D}\to\mathbb{R}$ with representation

$$ $f=\operatorname{MLP}\circ\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{ conv}}$ $$

where $\operatorname{MLP}:\mathbb{R}^{N\times D}\to\mathbb{R}$ is an MLP with activation function $\zeta$, is not dense for the topology of uniform convergence on compacts sets in $\mathcal{C}(\mathbb{R}^{N\times D},\mathbb{R})$.

###### Proof.

By [, Theorem 3.1] and [, Theorem 3.2] the class $\mathcal{MLP}_{N\times D}^{\zeta}$
is dense in $\mathcal{C}(\mathbb{R}^{N\times D},\mathbb{R})$ for the topology of uniform convergence on compacts sets since $\zeta$ was assumed to be nonpolynomial(^1^11Note that this can be relaxed further since we are using deep, and not shallow, MLPs by [, Theorem 3.2]. However, this is not the main point of our analysis.).
Since $\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv}}$ is continuous then [, Proposition 3.7] implies that the class

$$ $\mathcal{MLP}_{N\times D}^{\zeta}\circ\mathcal{L}_{\mathcal{G},\mathbf{W}}^{ \operatorname{conv}}\stackrel{{\scriptstyle\mbox{\tiny def.}}}{{=}}\big{\{} \operatorname{MLP}\circ\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{ conv}}:\,\operatorname{MLP}\in\mathcal{MLP}_{N\times D}^{\zeta}\big{\}},$ $$

is dense in $\mathcal{C}(\mathbb{R}^{N\times D},\mathbb{R})$ for the topology of uniform convergence on compacts sets if and only if $\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv}}$ is injective. By Lemma equation B.2, this map is never injective whenever $N>1$.
Thus, $\mathcal{MLP}_{N\times D}^{\zeta}\circ\mathcal{L}_{\mathcal{G},\mathbf{W}}^{
\operatorname{conv}}$ is not dense in $\mathcal{C}(\mathbb{R}^{N\times D},\mathbb{R})$ for the topology of uniform convergence on compacts sets; i.e. $\mathcal{MLP}_{N\times D}^{\zeta}\circ\mathcal{L}_{\mathcal{G},\mathbf{W}}^{
\operatorname{conv}}$ is not a universal approximator in the sense of Definition 4.3.
∎

Next, we show that adding the residual connection recovers the universal approximation property.

###### Lemma B.2 (Loss of Injectivity) .

###### Proof of Lemma B.2 .

###### Lemma B.3 (No Universality without Residual Connection) .

###### Proof.

#### B.1.2 Universality with the residual connection

We will consider the case reflective of the networks at initialization, where the graph convolution layer with residual connection is initialized randomly. We consider weights with i.i.d. random Gaussian initializations with appropriately scaled variance.

###### Lemma B.4 (Injectivity Regained) .

Let $N,D$ be positive integers. Fix a hyperparameter $\varsigma>0$.
Let $\mathcal{G}$ be a complete graph on $N$ nodes, let $\tilde{\mathbf{A}}\stackrel{{\scriptstyle\mbox{\tiny def.}}}{{=}}(I_{i\sim j
\vee i=j}/\sqrt{\operatorname{deg}(v_{i})\operatorname{deg}(v_{j})})_{i,j=1}^{N}$, and let $\mathbf{W}$ be a $D\times D$ random matrix with i.i.d. entries $W_{i,j}\sim N(0,\varsigma^{2})$.
If $\varsigma<1/(9D^{3/2})$ then

$$ $\displaystyle\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv+r}}: \mathbb{R}^{N\times D}$ $\displaystyle\to\mathbb{R}^{N\times D}$ $\displaystyle\mathbf{X}$ $\displaystyle\mapsto\tilde{\mathbf{A}}\mathbf{X}\mathbf{W}+\mathbf{X}$ $$

is injective with probability at-least $1-e^{-D/2}$.

Our proof of the positive counterpart to Lemma B.3, namely Lemma B.4, will rely on the following result from random matrix theory.

###### Lemma B.5 (Concentration Version of Gordon’s Theorem: Corollary 5.35 in [ 50 ] ) .

Let $\mathbf{A}$ be an $N\times n$ matrix whose entries are independent standard normal random variables.
For every $t\geq 0$, the following holds

$$ $\sqrt{N}-\sqrt{n}-t\leq s_{\min}(\mathbf{A})\leq s_{\max}(\mathbf{A})\leq\sqrt {N}+\sqrt{n}+t$ (22) $$

with probability at least $1-e^{-t^{2}/2}$; where $s_{\min}(\mathbf{A})$ and $s_{\max}(\mathbf{A})$ are respectively the smallest and largest singular values of the matrix $\mathbf{A}$.

###### Proof.

Step 1 - Reduction of injectivity problem to eigenvalue computation
Since $\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv+r}}$ is a linear map then the dimension theorem/rank-nullity theorem/splitting lemma implies that is injective if and only if its kernel only contains the zero vector; i.e.

$$ $\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv+r}}(\mathbf{X})=0 \Leftrightarrow\mathbf{X}=0.$ (23) $$

Using the Kronecker product $\otimes$, see [, Section 4.2], and the “flattenning” vectorization map $\operatorname{vec}:\mathbb{R}^{N\times D}\mapsto\mathbb{R}^{ND}$ which sends any $N\times D$ matrix to the vector obtained from ordering its entries in lexicographic order (according to their indices), see [, Definition 4.2.9], we may rewrite

$$ $(I_{ND}+{\tilde{\mathbf{A}}}\otimes\mathbf{W})\,\operatorname{vec}(\mathbf{X}) =\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv+r}}(\mathbf{X})=0 \Leftrightarrow\mathbf{X}=0,$ (24) $$

where $I_{ND}$ is the $ND\times ND$-dimensional identity matrix.
A necessary condition in equation 24 is that $I_{ND}+{\tilde{\mathbf{A}}}\otimes\mathbf{W}$ has to be invertible.
Let $T\stackrel{{\scriptstyle\mbox{\tiny def.}}}{{=}}-{\tilde{\mathbf{A}}}\otimes
\mathbf{W}$; then, $I_{ND}+{\tilde{\mathbf{A}}}\otimes\mathbf{W}=I_{ND}-T$.
The linear operator $I_{ND}-T$ is invertible (^2^22See [, Theorem 1] for a complete characterization of the convergence of Neumann series, even in the infinite dimensional setting.) if $\|T\|_{2}<1$. Since $T=-{\tilde{\mathbf{A}}}\otimes\mathbf{W}$, $\|-T\|_{2}=\|T\|_{2}$ then $(I_{ND}+{\tilde{\mathbf{A}}}\otimes\mathbf{W})$ is injective if

$$ $\|{\tilde{\mathbf{A}}}\otimes\mathbf{W}\|_{2}<1.$ (25) $$

Recall that, $\|\cdot\|_{2}$ is the square-root of the sum of the squared eigenvalues of the matrix ${\tilde{\mathbf{A}}}\otimes\mathbf{W}$. By [, Theorem 4.2.12], the eigenvalues of ${\tilde{\mathbf{A}}}\otimes\mathbf{W}$ are $\{\lambda_{i}({\tilde{\mathbf{A}}})\,\lambda_{j}(\mathbf{W})\}_{i=1,\dots,N,\,
j=1,\dots,D}$ where $\lambda_{i}({\tilde{\mathbf{A}}})$ (resp. $\lambda_{j}(\mathbf{W})$) is the $i^{th}$ (resp. $j^{th}$) eigenvalue of ${\tilde{\mathbf{A}}}$ (resp. $\mathbf{W}$). As usual, we order its eigenvalues order in a non-increasing manner(^3^33Note that the order is not necessarily strictly increasing as eigenvalues may have non-trivial multiplicities.). The Cauchy-Schwarz inequality and the definition of the norm $\|\cdot\|_{2}$ imply that

$$ $\|{\tilde{\mathbf{A}}}\otimes\mathbf{W}\|_{2}\leq\|{\tilde{\mathbf{A}}}\|_{2} \|\mathbf{W}\|_{2}=\Big{(}\sum_{i=1}^{N}\,\lambda_{i}({\tilde{\mathbf{A}}})^{2 }\Big{)}^{1/2}\,\Big{(}\sum_{j=1}^{D}\,\lambda_{j}(\mathbf{W})^{2}\Big{)}^{1/2}.$ (26) $$

Together, equation 25 and equation 26 provide the following sufficient condition for invertibility of the $I_{ND}+{\tilde{\mathbf{A}}}\otimes\mathbf{W}$; and thus for the injectivity of $\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv+r}}$

$$ $\Big{(}\sum_{i=1}^{N}\,\lambda_{i}({\tilde{\mathbf{A}}})^{2}\Big{)}^{1/2}\, \Big{(}\sum_{j=1}^{D}\,\lambda_{j}(\mathbf{W})^{2}\Big{)}^{1/2}<1.$ (27) $$

Step 2 - Computing the eigenvalues of $\tilde{\mathbf{A}}$
Since we have assumed that $\mathcal{G}$ is a complete graph on $N$ nodes then $\tilde{\mathbf{A}}_{i,j}=1/N$ for each $i,j=1,\dots,N$. In particular, $\mathcal{G}$ has $N$ identical rows. Thus, 0 0 is an eigenvalue of $\mathcal{G}$ with multiplicity at-least $N-1$.
Additionally, one easily verifies that $\mathbf{1}_{N}\stackrel{{\scriptstyle\mbox{\tiny def.}}}{{=}}(1,\dots,1)\in
\mathbb{R}^{N}$ (the vector with all components equal to $1$) is an eigenvector of $\tilde{\mathbf{A}}$.
It corresponds to the eigenvalue $\lambda_{1}(\tilde{\mathbf{A}})=1$ since

$$ $\tilde{\mathbf{A}}\,\mathbf{1}_{N}=\lambda_{1}(\tilde{\mathbf{A}})\mathbf{1}_{ N}=N\,\lambda_{1}(\tilde{\mathbf{A}})=N\frac{1}{N}=1.$ $$

Therefore,

$$ $\|\tilde{\mathbf{A}}\|_{2}=\Big{(}\lambda_{i}({\tilde{\mathbf{A}}})^{2}\Big{)} ^{1/2}=\big{(}1^{2}+(N-1)\,0^{2}\big{)}^{1/2}=1.$ (28) $$

Thus, the condition in equation 27 reduces further to

$$ $\Big{(}\sum_{j=1}^{D}\,\lambda_{j}(\mathbf{W})^{2}\Big{)}^{1/2}<1.$ (29) $$

It only remains to understand the “typical” eigenvalues of $\mathbf{W}$ (i.e. for most realization of the random matrix $\mathbf{W}$).

Step 3 - Computing the eigenvalues of $\mathbf{W}$
First, observe that

$$ $\displaystyle\Big{(}\sum_{j=1}^{D}\,\lambda_{j}(\mathbf{W})^{2}\Big{)}^{1/2}$ $\displaystyle\leq\Big{(}\sum_{j=1}^{D}\,\lambda_{1}(\mathbf{W})^{2}\Big{)}^{1/2}$ (30) $\displaystyle=$ $\displaystyle\sqrt{D}|\lambda_{1}(\mathbf{W})|$ (31) $\displaystyle=$ $\displaystyle\sqrt{D}\,s_{\operatorname{max}}(\mathbf{W})^{2}.$ (32) $$

Note that $W_{i,j}=\varsigma\tilde{W}_{i,j}$ where $\{\tilde{W}_{i,j}\}_{i,j=1}^{D}$ are i.i.d. standard normal random variables; meaning that the eigenvalues of $\mathbf{W}$ are exactly equal to $\varsigma$ times those of $\tilde{\mathbf{W}}$.
By Gordon’s Theorem, with $N=n=D$ and $t=\sqrt{D}$, the following holds with at-least $1-e^{-D/2}$ probability:

$$ $\operatorname{s}_{\operatorname{max}}(\tilde{\mathbf{W}})\leq 2\sqrt{D}+\sqrt{ D}=3\sqrt{D}.$ (33) $$

Upon combining the inequalities in equation 32 and in equation 33 we deduce that: with at-least $1-e^{-D/2}$ probability the following holds

$$ $\displaystyle\Big{(}\sum_{j=1}^{D}\,\lambda_{j}(\mathbf{W})^{2}\Big{)}^{1/2}=$ $\displaystyle\Big{(}\sum_{j=1}^{D}\,\varsigma^{2}\lambda_{j}(\tilde{\mathbf{W} })^{2}\Big{)}^{1/2}$ (34) $\displaystyle\leq\varsigma\,\sqrt{D}\ 9D=\varsigma\,9\,D^{3/2}.$ $$

Note that equation 34 holds since the eigenvalues of $\mathbf{W}$ are equal to $\varsigma$ times the eigenvalues of $\tilde{\mathbf{W}}$ given that $\mathbf{W}=\varsigma\tilde{\mathbf{W}}$.

In particular, if $0<\varsigma<1/(9D^{3/2})$ then, with probability at-least $1-e^{-D/2}$ we have that

$$ $\displaystyle\Big{(}\sum_{j=1}^{D}\,\lambda_{j}(\mathbf{W})^{2}\Big{)}^{1/2} \leq\varsigma\,9\,D^{3/2}<1.$ (35) $$

Step 4 - Conclusion
Consequentially, equation 35 implies that equation 29 is satisfied with probability at-least $1-e^{-D/2}$; meaning that, the map $\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv+r}}(\mathbf{X})$ is injective with probability at-least $1-e^{-D/2}$ too.
∎

The following is a more technical version of Theorem 4.2; which shows that the result can be made to hold explicitly with high probability when appropriately sampling a weight matrix.

###### Theorem B.6 (Universality Regained) .

Suppose that $\zeta$ satisfies Assumption B.1.
Let $N,D$ be positive integers and fix a hyperparameter $0<\varsigma<1/(9D^{3/2})$.
Let $\mathcal{G}$ be a complete graph on $N$ nodes, let $\tilde{\mathbf{A}}\stackrel{{\scriptstyle\mbox{\tiny def.}}}{{=}}(I_{i\sim j
\vee i=j}/\sqrt{\operatorname{deg}(v_{i})\operatorname{deg}(v_{j})})_{i,j=1}^{N}$, let $\mathbf{W}$ be a $D\times D$ random matrix with i.i.d. entries $W_{i,j}\sim N(0,\varsigma^{2})$, and define $\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv+r}}$ as in Lemma B.4.
Then, with probability at-least $1-e^{-D/2}$, the class of maps $\hat{f}:\mathbb{R}^{N\times D}\to\mathbb{R}$ with representation

$$ $\hat{f}=\operatorname{MLP}\circ\mathcal{L}_{\mathcal{G},\mathbf{W}}^{ \operatorname{conv+r}}$ $$

is dense in $\mathcal{C}(\mathbb{R}^{N\times D},\mathbb{R})$ for the topology of uniform convergence on compacts sets, where $\operatorname{MLP}:\mathbb{R}^{N\times D}\to\mathbb{R}$ is an MLP with activation function $\zeta$.

###### Proof of Theorem B.6 (and thus of Theorem 4.2 ).

By [, Theorem 3.1] and [, Theorem 3.2] the class $\mathcal{MLP}_{N\times D}^{\zeta}$
is dense in $\mathcal{C}(\mathbb{R}^{N\times D},\mathbb{R})$ for the topology of uniform convergence on compacts sets since $\zeta$ satisfies Assumption B.1.

By construction, the map $\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{conv+r}}$ is continuous. By Lemma B.4 the map is injective with probability at-least $1-e^{-D/2}$.
Therefore, [, Theorem 3.4] implies that the class

$$ $\mathcal{MLP}_{N\times D}^{\zeta}\circ\mathcal{L}_{\mathcal{G},\mathbf{W}}^{ \operatorname{conv+r}}\stackrel{{\scriptstyle\mbox{\tiny def.}}}{{=}}\big{\{} \operatorname{MLP}\circ\mathcal{L}_{\mathcal{G},\mathbf{W}}^{\operatorname{ conv+r}}:\,\operatorname{MLP}\in\mathcal{MLP}_{N\times D}^{\zeta}\big{\}}$ $$

is dense in $\mathcal{C}(\mathbb{R}^{N\times D},\mathbb{R})$ for the topology of uniform convergence on compact sets.
∎

The probability appearing in Theorem 4.2 implies that, at initialization, there is a high probability ($1-e^{-D/2}$) that the class $\mathcal{F}_{\mathcal{G},\mathbf{W}}^{\operatorname{residual}}$ is expressive enough to learn any continuous function on $\mathcal{C}(\mathbb{R}^{N\times D})$ within large domains. Note that $D$ is the hidden dimension, which tends to be high; thus, Theorem 4.2 holds with probability $\approx 1$.

###### Lemma B.4 (Injectivity Regained) .

###### Lemma B.5 (Concentration Version of Gordon’s Theorem: Corollary 5.35 in [ 50 ] ) .

###### Proof.

###### Theorem B.6 (Universality Regained) .

###### Proof of Theorem B.6 (and thus of Theorem 4.2 ).

## Appendix C Training Details

Dataset information. All datasets used in this work are publicly available. For OGB datasets, see []; for Pokec, see []; and for the spatio-temporal datasets, see PyTorch Geometric Temporal []. Following DIFFormer [], we perform experiments on both image and text datasets to test the applicability of SMPNNs to a variety of tasks. The procedure described next is exactly the same as in []. We use STL(-10) and CIFAR(-10) as our image datasets. For the first, we use all 13,000 images, each classified into one of 10 categories. In the case of the latter, CIFAR, the dataset was originally pre-processed in previous work using 1,500 images from each of the 10 categories, resulting in a total of 15,000 images. For both datasets, 10, 50, or 100 instances per class were randomly selected for the training set (we use the same random splits as in the baselines for reproducibility and to obtain a fair comparison), 1,000 instances for validation, and the remaining instances for testing.

Train, validation, and test splits. We use all public data splits when available, such as in the case of the OGB benchmarks []. Otherwise we follow the data split in the literature [, , ] for a consistent comparison. Note that the code for these baselines is available online, including torch seeds for datasets with random splits. We use the exact same seeds (123 in most cases).

Graph Sampling and Batching for Training and Inference. For ogbn-arxiv, CIFAR, STL, 20News, Chickenpox, Covid, and Wikipath, we employ full-graph training. Specifically, we input the entire graph into the model and simultaneously predict all node labels for the loss computation using a single GPU. During inference, we also use the entire graph as input and calculate the evaluation metric based on the predictions for the validation and test set nodes. For the rest of the datasets (except ogbn-papers-100M discussed later), due to their large sizes, we adopt the mini-batch training approach of [, , ]. More concretely, the subsampling procedure of the Graph Transformer baselines uses the following approach for training: a batch of nodes from the large graph dataset is selected at random, and based on this, the induced subgraph is sampled by extracting the edges connecting the selected nodes from the full graph adjacency matrix (the induced subgraph is obtained using subgraph from torch geometric utils). For inference, the entire graph is fed into the model on CPU. For the exceptionally large ogbn-papers100M graph, which cannot fit into CPU memory, we apply the same mini-batch partition strategy used during training for inference using a neighbor sampler with 3-hops and 15, 10, and 5 neighbors per hop using the standard NeighborLoader from torch geometric, in line with [].

GPU Memory Scaling Experiments. In these experiments, we use a single Tesla V100 GPU. We use the same training configuration for all networks: node batch sizes of 10K, 20K, 40K, 60K, 80K, and 100K (using subgraph), no weight decay, Adam optimizer with a learning rate of $10^{-3}$, and dropout of $0.1$. We set all model configurations to have 256 hidden channels and 6 layers, modifying only the parts of the configuration discussed in the main text. For SGFormer, we increase the number of GNN layers to 6 and fix the linear attention layer to 1, as in the original paper [].

Model Configurations. For most of the large-scale graph experiments (unless otherwise stated), we use SMPNNs with 6 layers. Note that we test other configurations; for instance, in Table 7. For the image, text, and spatio-temporal datasets, we use 2 layers to avoid overfitting. The exact command configurations can be found in the supplementary material.

## Peer Reviews

confidence: 3
contribution: 1
initial_rating: 3
presentation: 2
questions: Please refer to weaknesses.
soundness: 2
strengths: - The proposed method is simple.

- The paper focuses on over-smoothing, an important problem in graph learning.

- The paper provides both empirical and theoretical analyses.
summary: This paper proposes to substitute the multi-head attention in graph transformers with pure message passing. The authors provide theoretical analysis to prove that combined with residual connection, graph transformers with pure message passing can achieve universal approximation and alleviate over-smoothing.
weaknesses: - The contribution of this paper is weak. The main focus is replacing the attention module in the transformer with a message-passing module and using the residual connections to alleviate the over-smoothing problem. However, the use of residual connections to address over-smoothing has already been explored in DeepGCN[1], which this paper does not mention or compare. Additionally, the implementation of deep GNNs has been studied in several other works[1]-[4].

- The paper contains a substantial amount of repetitive descriptions of existing work, such as message-passing neural networks and GCN (Eq. 2/3 vs. Eq. 6). Additionally, the theorem introduced in Section 4.1 is neither utilized later in the paper nor a contribution of this work.

- The contributions of the paper also involve repetitive work, such as a) using residual connections to mitigate over-smoothing; b) based on reference [5], Theorem 4.4 is evidently valid.

- Empirical analysis lacks heterophilic benchmarks to validate the effectiveness of SMPNN on over-smoothing.

- In tab. 7, SMPNN achieves the best performance on ogbn-proteins with 12 layers. Does SMPNN require significantly more computational resources and parameters to achieve comparable or better performance to baseline models?



[1] DeepGCNs: Can GCNs Go as Deep as CNNs? ICCV'19

[2] Graph Convolutional Networks via Initial residual and Identity Mapping, ICML'20

[3] Training Graph Neural Networks with 1000 Layers, ICML'21

[4] Revisiting Heterophily For Graph Neural Networks, NeurIPS'22

[5] How Powerful are Graph Neural Networks? ICLR'19

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: - See weaknesses.
- If SMPNN w/o FeedForward uses significantly less GPU memory and performs better in accuracy than SGFormer, why is it not considered the main variant?  
- The difference between Figure 2 and Figure 3 is unclear.  
- For the SMPNN variant with attention (detailed in the Appendix), how does it differ from GAT (Veličković et al., 2017)?
- A real-time per-epoch runtime analysis should be included alongside the big-O analysis in the paper.
- Could you clarify why SMPNN, which uses message passing, primarily compares against an attention-based baseline?
soundness: 2
strengths: The paper is well-written with a clear motivation. The methodology is easy to follow, and the experiment section is well-structured.The paper is well-written with a clear motivation. The methodology is easy to follow, and the experiment section is well-structured.
summary: The paper proposes Scalable Message Passing Neural Networks (SMPNNs), a framework designed to scale traditional message-passing GNNs. By incorporating residual connections, it avoids the issue of oversmoothing. The method claims to work without the need for computationally and memory-intensive attention mechanisms.
weaknesses: The experiments are not strong enough. For instance, all SMPNN variants should be included consistently across tables and figures in the section. The same applies to baselines, unless there are reasonable explanations for exclusions. Additionally, the distinctions among SMPNN variants and the strengths of SMPNN are not clear. For example, SMPNN uses significantly more GPU memory than SGFormer, yet the paper still claims that it does not use more memory than the baselines. Some presentation needs to modified, for example: FF notation needs to be written consistently with the rest of the paper.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: same to weakness
soundness: 2
strengths: 1. The paper provides solid theoretical support, particularly on residual connections and universal approximation, which strengthens the SMPNN design and its claims.

2. By replacing attention with scalable message-passing, SMPNN achieves efficient performance and good experiment results on large graphs, offering a notable advancement for scalable GNN applications.
summary: This paper proposes Scalable Message Passing Neural Networks (SMPNNs), a deep, scalable GNN framework that omits attention in favor of local message-passing, achieving efficient performance on large graphs. It claims to outperform transformer-based models while avoiding issues like over-smoothing.
weaknesses: 1. In Section 3.2, the authors label their proposed block as a "transformer block." However, the SMPNN framework lacks any attention mechanism, which is a core component of transformers. Consequently, SMPNN functions more like a deep GCN with residual connections rather than a genuine transformer model. This categorization is misleading, as attention mechanisms fundamentally distinguish transformers by enhancing scalability and representation capacity in large graph models. Existing models such as GCNII [1], EGNN [2], and DeeperGCN [3] have already explored architectures with enhanced depth. Although these models improve scalability, they are still linear and inherently limited compared to transformers.

2. Table 1 mentions that the SMPNN has training time complexities comparable to other transformer-like models, such as GraphGPS and Exphormer. However, the experiments do not include comparisons with these transformer-based models, especially models with higher computational complexity, like Graphormer, that might showcase different trade-offs in performance versus scalability. While SMPNN is intended to scale to larger graphs, demonstrating performance across various data scales, especially small to medium datasets, would test its broader applicability.

3. SMPNN relies on local message-passing operations without incorporating global attention mechanisms, which may limit its ability to capture long-range dependencies effectively. For tasks where global context is essential, SMPNN's performance could be suboptimal compared to transformer-based models that use global attention mechanisms. A discussion on this limitation and potential strategies would strengthen the paper.

[1] Chen, Ming, et al. "Simple and deep graph convolutional networks." International conference on machine learning. PMLR, 2020.
[2] Zhou, Kaixiong, et al. "Dirichlet energy constrained learning for deep graph neural networks." Advances in Neural Information Processing Systems 34 (2021): 21834-21846.
[3] Li, Guohao, et al. "Deepergcn: All you need to train deeper gcns." arXiv preprint arXiv:2006.07739 (2020).

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: Please see weakness
soundness: 3
strengths: Pros: 

1: The motivation of this paper is clear. The author adapts the transformer architecture to address the scalability issue in Graph Neural Networks. 

2: The author presents both theoretical analysis and experimental results for their methods, offering a comprehensive approach. 

3: The authors provide extensive experiments on different dataset and relevant ablation study to prove the effectiveness of their method.
summary: In this paper, the authors propose a new Scalable Graph Convolution Network. The author develops a scalable message passing block which involves a residual connection that connects two parts. The first part is a GCN block, and the second part is a point-wise feed forward layer as in transformer. This architecture retains computation efficiency. Meanwhile, the author illustrates how their method solves the over smoothing problem. The original graph convolution is not a universal approximator. However, with a residual connection, the graph convolution can turn to a universal approximator. And the authors provide extensive experiment results to prove the efficiency of their method.
weaknesses: Cons: 

1: The SMPNN can maintain its performance but does not gain any advantages from a deeper network. What causes this? 

2: For larger graph datasets, the improvement from SMPNN is less pronounced. For example, on the ogbn-papers-100M dataset, the improvement is only 0.2%. Could this suggest that the model size is still inadequate? If we use a larger network for both SMPNN and Graph Transformer, SMPNN should experience less oversmoothing and demonstrate a more significant accuracy improvement.

Meta-review: This paper proposes a simple yet effective architecture of message-passing-based Graph Neural Network which replaces the attention layers in Transformers into standard convolutional message passing. The performance matches the versions which use attentions. While the method is simple and effective, the method itself lacks novelty. For example, as reviewer Hv1b has raised, the use of residual connections to address over-smoothing has already been explored in DeepGCN, which this paper does not mention or compare. The experiments also need some enhancements, e.g., all SMPNN variants should be included consistently across tables and figures in the section. Unfortunately no rebuttal was given to address these reviewer concerns and therefore I recommend rejection.

Decision: Reject