Abstract
The dominant graph neural networks (GNNs) over-rely on graph links, leading to performance issues such as suspended animation and over-smoothing. Furthermore, the interconnected nature of graphs hinders parallelization, especially for large-scale data. We introduce GRAPH-BERT (Graph based BERT), a novel GNN architecture based solely on the attention mechanism, bypassing traditional graph convolution and aggregation operators. By training on sampled linkless subgraphs within local contexts, GRAPH-BERT enables effective standalone learning and transferability to downstream tasks. Experimental results on benchmark datasets demonstrate that GRAPH-BERT outperforms existing GNNs in both effectiveness and efficiency, particularly in deep configurations.
Introduction
Traditional Graph Neural Networks (GNNs), such as Graph Convolutional Networks (GCN) and Graph Attention Networks (GAT), rely heavily on "message passing"—the aggregation of information from a node's neighbors via explicit links. While successful, this paradigm faces three critical challenges:
- Suspended Animation: Deep GNNs often fail to learn as they stop responding to training data.
- Over-smoothing: Increasing depth causes node representations to converge, losing local discriminative features.
- Parallelization Bottlenecks: The rigid dependency on graph structure limits batching and scalability for massive graphs.
GRAPH-BERT addresses these by decoupling the learning process from the fixed graph structure, utilizing a pure attention mechanism.
Methods
The core of GRAPH-BERT is the Linkless Subgraph Batching strategy. Instead of processing the entire graph, the model samples a local "context" for each node based on intimacy (e.g., via PageRank). During the forward pass, the actual links are ignored, allowing the Transformer to learn dependencies purely through attention.
To preserve structural information without explicit edges, GRAPH-BERT utilizes four distinct node embeddings:
- Raw Feature Embedding: Initial node attributes.
- Weisfeiler-Lehman (WL) Absolute Role Embedding: Captures global structural roles.
- Intimacy-based Relative Positional Embedding: Encodes proximity to the target node.
- Hop-based Relative Distance Embedding: Captures shortest path distances.
These embeddings are integrated into a Graph-Transformer architecture. A Graph Residual term is also introduced, re-injecting raw features into every layer to mitigate information loss in deep models.
Experimental Setup
The effectiveness of GRAPH-BERT was evaluated on three standard citation network benchmarks:
- Cora: 2,708 publications.
- Citeseer: 3,327 publications.
- Pubmed: 19,717 publications.
These datasets were used to assess performance in node classification and graph clustering tasks.
Results and Discussion
Performance and Convergence
GRAPH-BERT achieved state-of-the-art accuracy, outperforming GCN and GAT. For instance, it reached 84.3% accuracy on Cora, surpassing GAT's 83.0%. Notably, the model exhibits rapid convergence, often reaching peak performance within 10 epochs.
Robustness to Depth
A significant advantage of GRAPH-BERT is its stability at extreme depths. While traditional GCNs typically degrade after 2–3 layers, GRAPH-BERT maintains high performance even with 50 layers.
Efficiency and Scaling
By operating on fixed-size subgraphs, training costs remain independent of total graph size. This makes GRAPH-BERT highly suitable for industrial-scale graphs where memory constraints usually prohibit full-graph processing.
Conclusion
GRAPH-BERT demonstrates that explicit graph links are not strictly necessary for learning high-quality representations if structural information is properly encoded. By leveraging the Transformer architecture, it overcomes the fundamental limitations of message-passing GNNs. Future work will focus on optimizing parallel implementations and exploring more efficient context sampling methods for gargantuan graphs.
Summary updated