Transformers from Diffusion: A Unified Framework for Neural Message Passing
Abstract
Learning representations for structured data with certain geometries (e.g., observed or unobserved) is a fundamental challenge, wherein message passing neural networks (MPNNs) have become a de facto class of model solutions. In this paper, inspired by physical systems, we propose an energy-constrained diffusion model, which integrates the inductive bias of diffusion on manifolds with layer-wise constraints of energy minimization. We identify that the diffusion operators have a one-to-one correspondence with the energy functions implicitly descended by the diffusion process, and the finite-difference iteration for solving the energy-constrained diffusion system induces the propagation layers of various types of MPNNs operating on observed or latent structures. This leads to a unified mathematical framework for common neural architectures whose computational flows can be cast as message passing (or its special case), including MLPs, GNNs, and Transformers. Building on these insights, we devise a new class of neural message passing models, dubbed diffusion-inspired Transformers (DIFFormer), whose global attention layers are derived from the principled energy-constrained diffusion framework. Across diverse datasets ranging from real-world networks to images, texts, and physical particles, we demonstrate that the new model achieves promising performance in scenarios where the data structures are observed (as a graph), partially observed, or entirely unobserved.
Benchmark Results
Tested on 2 datasets 9 baseline values reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
Classic
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | GraphSAGE+CNA | 0.9418
±0.0033 | |
| 2 | GCN+CNA | 0.9366
±0.0048 | |
| 3 | TransformerConv | 0.9350
±0.0058 | |
| 21 | GCN | 0.9004 best reported | best at pub: Understanding Heterophily for Graph Neural Networks (ICML 2024) |
| 39 | SAGE | 0.8911
±0.0012 | |
| 44 | GAT | 0.8897
±0.0014 best reported | best at pub: Learned Low Precision Graph Neural Networks (2020) |
| 68 | NodeFormer | 0.8848
±0.0033 best reported | best at pub: Efficient Tuning and Inference for Large Language Models on Textual Graphs (IJCAI 2024) |
| 87 | GRAND | 0.8815 best reported | best at pub: Feature Transportation Improves Graph Neural Networks (AAAI 2023) |
| 189 | DIFFormer-s | 0.8590
±0.0040 | This paper |
| 223 | SGC | 0.8509
±0.0648 best reported | best at pub: LOGIN: A Large Language Model Consulted Graph Neural Network Training Framework (2024) Difference within reported uncertainty; not counted as underperformance. |
| 240 | GRAND-l | 0.8470
±0.0060 best reported | best at pub: GRAND: Graph Neural Diffusion (ICML 2021) Difference within reported uncertainty; not counted as underperformance. |
| 292 | DIFFORMER-a | 0.8410
±0.0060 | This paper |
| 309 | LDS | 0.8390
±0.0060 | This paper |
| 314 | GraphGPS | 0.8387
±0.0096 best reported | |
| 329 | GraphHeat | 0.8370 | This paper |
| 345 | GDC | 0.8360
±0.0020 | This paper |
| 416 | GLCN | 0.8310
±0.0050 | This paper |
| 456 | Graphormer | 0.8262
±0.0012 best reported | best at pub: Language is All a Graph Needs (2023) best today: Toward a Unified Geometry Understanding: Riemannian Diffusion Framework for Graph Generation and Prediction (NeurIPS 2025) |
| 707 | Dense GAT | 0.7850
±0.0250 | This paper |
| 724 | MLP | 0.7768 best reported | best at pub: Understanding Heterophily for Graph Neural Networks (ICML 2024) |
| 789 | GAT-kNN | 0.7380
±0.0170 | This paper |
| 807 | GCN-kNN | 0.7220
±0.0180 | This paper |
| 835 | LP | 0.6820 | This paper |
| 875 | ManiReg | 0.6040
±0.0080 | This paper |
LINKX Benchmarks
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | SAGE | 0.8597
±0.0021 | |
| 2 | Polynormer | 0.8595
±0.0007 | |
| 3 | NID_SAGE | 0.8563
±0.0031 | |
| 23 | GCN | 0.7601
±0.0049 best reported | best at pub: Mixture of Weak & Strong Experts on Graphs (ICLR 2023) |
| 24 | GraphSAGE | 0.7576
±0.0004 | |
| 28 | GAT | 0.7177
±0.0618 best reported | best at pub: Mixture of Weak & Strong Experts on Graphs (ICLR 2023) Difference within reported uncertainty; not counted as underperformance. |
| 29 | SGC | 0.7124
±0.0046 best reported | best at pub: FMP: Toward Fair Graph Message Passing against Topology Bias (2022) |
| 31 | MLP | 0.7048
±0.0077 best reported | best at pub: FMP: Toward Fair Graph Message Passing against Topology Bias (2022) |
| 32 | DIFFormer-s | 0.6924
±0.0076 | This paper |
| 33 | NodeFormer | 0.6832
±0.0045 | This paper |
| 43 | LP | 0.5273 | This paper |
