Graph Propagation Transformer for Graph Representation Learning

Zhe Chen, Hao Tan, Tao Wang, Tianrun Shen, Tong Lu, Qiuying Peng, Cheng Cheng, Yue Qi

Abstract

This paper presents a novel transformer architecture for graph representation learning. The core insight of our method is to fully consider the information propagation among nodes and edges in a graph when building the attention module in the transformer blocks. Specifically, we propose a new attention mechanism called Graph Propagation Attention (GPA). It explicitly passes the information among nodes and edges in three ways, i.e. node-to-node, node-to-edge, and edge-to-node, which is essential for learning graph-structured data. On this basis, we design an effective transformer architecture named Graph Propagation Transformer (GPTrans) to further help learn graph data. We verify the performance of GPTrans in a wide range of graph learning experiments on several benchmark datasets. These results show that our method outperforms many state-of-the-art transformer-based graph models with better performance.

Introduction

While Transformers have revolutionized Natural Language Processing and Computer Vision, adapting them to graph-structured data remains a significant challenge. Graphs consist of nodes (entities) and edges (relationships), both of which often carry vital information, such as atom types and bond types in a molecule.

Existing Graph Transformers typically suffer from two main limitations. First, many models under-utilize edge features, treating them merely as static "biases" to nudge the attention mechanism without updating their representations as the model goes deeper. Second, models that do update edge features often employ a "dual-path" structure with separate Feed-Forward Networks (FFNs) for nodes and edges. This approach is computationally expensive and often fails to fully fuse the relationship between the two components. The Graph Propagation Transformer (GPTrans) addresses these issues by introducing a unified architecture where nodes and edges communicate dynamically.

The GPTrans Architecture

The GPTrans architecture is designed to be streamlined and efficient. Unlike previous "dual-path" models, GPTrans handles edge updates within the attention module itself, eliminating the need for a dedicated edge FFN. This design choice allows the model to achieve higher inference throughput while maintaining complex interactions between graph components.

The overall architecture of GPTrans, featuring graph embedding, stacked transformer blocks with Graph Propagation Attention (GPA), and a prediction head.

The model begins by generating initial graph embeddings for nodes ($x_{node}$) and edges ($x_{edge}$). These are then passed through $L$ successive Transformer Blocks. Each block consists of a Graph Propagation Attention (GPA) module followed by a standard Feed-Forward Network for node features. Residual connections are maintained for both node and edge streams to ensure stable gradient flow during training.

Graph Propagation Attention (GPA)

The centerpiece of the GPTrans model is the GPA module, which replaces standard self-attention to facilitate three distinct types of information flow:

  1. Node-to-Node (N2N): This is a structure-aware global self-attention. Edge embeddings are projected into layer-specific attention biases, allowing the model to learn flexible attention patterns tailored to the structural depth of the network.
  2. Node-to-Edge (N2E): The model repurposes the attention map—which naturally captures node-pair relationships—to update edge embeddings. This allows edge representations to evolve based on the similarity and context of the nodes they connect.
  3. Edge-to-Node (E2N): Updated edge information is aggregated and fused back into the node embeddings, ensuring that the context of relationships directly informs the representation of the entities.
The three information propagation paths in GPA: (a) Node-to-Node, (b) Node-to-Edge, and (c) Edge-to-Node.

By using the attention matrix as a bridge for Node-to-Edge propagation, GPTrans creates a natural space for edges to evolve alongside nodes without redundant computational overhead.

Experimental Results

GPTrans was evaluated across a diverse battery of benchmarks, including graph-level tasks (PCQM4Mv2, MolHIV), regression (ZINC), and node-level classification (CLUSTER).

  • PCQM4Mv2: GPTrans-L achieved a Mean Absolute Error (MAE) of 0.0809 on the validation set, outperforming established models like Graphormer and EGT.
  • ZINC: The model reached an MAE of 0.077, representing a 36.9% relative improvement over the Graphormer-Slim baseline.
  • Node Classification: On the CLUSTER dataset, GPTrans outperformed Graphormer by 3.4% in accuracy, highlighting the critical role of explicit edge-to-node propagation for localizing node features.
  • Efficiency: In head-to-head testing on an A100 GPU, GPTrans-S demonstrated approximately 10% higher inference throughput than EGT-Small while maintaining superior accuracy.

Conclusion

The Graph Propagation Transformer introduces an elegant and efficient way to model the bidirectional flow of information in graphs. By integrating node and edge updates within a single attention mechanism, GPTrans achieves state-of-the-art results across molecular and synthetic benchmarks. Future work may explore the scalability of this $O(N^2)$ architecture to massive social networks and its application to inductive link prediction in dynamic real-world environments.

Summary updated

BibTeX
@inproceedings{chen2023graph,
  author = {Zhe Chen and Hao Tan and Tao Wang and Tianrun Shen and Tong Lu and Qiuying Peng and Cheng Cheng and Yue Qi},
  title = {{Graph Propagation Transformer for Graph Representation Learning}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2023},
  url = {https://openreview.net/forum?id=V1RL64KfCa},
}
Figure