arXiv(opens in a new tab)cs.LGAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.26732

Rethinking Message Passing as Retrieval for Text-Attributed Graph Learning

Jintang Li, Yuhong Chen, Ruofan Wu, Binli Luo, Jiayi Ji, Hui Li, Rongrong Ji

Jintang Li, Yuhong Chen, Ruofan Wu, Binli Luo, Jiayi Ji, Hui Li, and Rongrong Ji

Abstract—Graph neural networks (GNNs) are typically conceptualized as message-passing neural networks, yet it remains unclear why neighborhood aggregation reliably outperforms node-wise multilayer perceptrons (MLPs). Despite its empirical success, this paradigm can be computationally expensive and sensitive to imperfect graph structures. In this work, we present a retrieval-augmented view of GNNs: each layer makes predictions by applying an MLP to a node representation together with a permutation-invariant summary of retrieved graph context. Motivated by this perspective, we propose RTA, a simple MLP-based framework that replaces structural message passing with label-aware retrieval and propagation. We provide theoretical insights that (i) connect retrieval-based aggregation to softmax-attention message passing, and (ii) establish the robustness of retrieved-context supervision to mis-retrieved outliers. Experiments on multiple text-attributed graph benchmarks show that RTA matches or even outperforms strong GNN and graph LLM baselines while improving efficiency and robustness across diverse scenarios.

Index Terms—Graph Neural Networks, Retrieval-Augmented Generation, Message Passing Neural Networks

1 INTRODUCTION

Graph neural networks (GNNs) have attracted substantial attention due to their strong empirical performance on graph-structured data [1]-[4], with applications ranging from social networks [5] and molecular chemistry [6] to recommendation systems [7]. The dominant paradigm behind modern GNNs is message passing [8]: nodes iteratively exchange information along edges and update their representations by aggregating neighbor messages through permutation-invariant operators (e.g., sum or mean). While this mechanism is effective in many settings, it also introduces well-known challenges, including limited scalability, sensitivity to graph structure, degraded performance on heterophilous graphs [9], and representation collapse due to oversmoothing and oversquashing in deep propagation [10]. More fundamentally, although message passing has become the dominant paradigm for GNNs, it remains unclear whether its effectiveness stems from graph-based propagation itself or, more generally, from conditioning node predictions on informative contexts.

In parallel, retrieval-augmented generation (RAG) has emerged as a powerful paradigm in natural language understanding [11]. RAG [12] follows a retrieve-then-reason procedure: given a query, it retrieves a small set of relevant contexts and conditions a parametric model (e.g., an LLM) on the retrieved evidence to produce an output. This mechanism reduces reliance on parametric memory and improves robustness by grounding predictions in external information.

Figure

(a) GNN

(b) RAG

Fig. 1. Technical comparison between GNN and RAG. Both leverage contextual information beyond the raw input.

Despite their different application domains, GNNs and RAG share a common computational pattern: both condition predictions on contextual information beyond the raw input (see Figure 1). In a message-passing layer, the context is defined by the node's neighborhood, whereas in RAG it consists of a set of retrieved documents or passages. However, this shared computational structure has not been explicitly characterized from a unified perspective, leaving unclear how context selection, aggregation, and prediction in message passing relate to retrieval-augmented inference.

In this work, we develop a retrieval-augmented view of a broad family of message-passing GNNs:

A message-passing layer can be interpreted as an MLP operating on a node and a retrieved context set.

Concretely, we show that the message passing step of GNNs can be cast as a retrieval and augmentation module, and that different GNN variants correspond to different choices of retriever (which contexts are selected) and set function (how contexts are aggregated). This perspective clarifies why conditioning on neighbors can generally outperform node-independent models: the model is effectively performing prediction with retrieved evidence, where the evidence is provided by graph-induced or learned retrieval sets.

Building on this connection, we propose RTA (Retrieve-

Jintang Li, Yuhong Chen, Jiayi Ji, Hui Li, Rongrong Ji are with the Key Laboratory of Multimedia Trusted Perception and Efficient Computing, Ministry of Education of China, Xiamen University, Xiamen 361005, China (E-mail: edisonlee@xmu.edu.cn, yuhongchen@stu.xmu.edu.cn, jjyxmu@gmail.com, hui@xmu.edu.cn, rrji@xmu.edu.cn).

  • Ruofan Wu is with the School of Statistics of Fudan University, Shanghai 200433, China (E-mail: wuruofan1989@gmail.com).

  • Binli Luo is with the School of Computer Science and Engineering of Central South University, Changsha 410000, China (E-mail: lblhandsome@gmail.com).

Then-Aggregate), a simple retrieval-augmented framework for text-attributed graph representation learning that avoids explicit multi-hop message passing. Crucially, RTA supports label-aware retrieval, where labeled nodes provide necessary supervision signals that guide both retrieval and aggregation without information leakage. RTA proceeds in three stages: (i) a label-aware contextual encoder produces node embeddings by augmenting each node's text with a small set of structural neighbor texts; (ii) a top-k retriever in the structure and embedding space constructs a retrieval graph that can connect semantically related nodes beyond local edges; and (iii) an MLP-style update aggregates retrieved neighbors to produce task-specific representations. By replacing recursive message passing on the original graph with localized retrieval-driven interactions, RTA achieves better performance while improving scalability and robustness across diverse settings.

Theoretically, we establish two results that characterize retrieval-based message passing and directly align with our method design. First, we show that top-k retrieval followed by aggregation provides a sparse approximation of softmax-attention message passing, where the approximation error is controlled by the retrieval margin and the score distribution within the retrieved context set. Second, we prove that label-aware retrieved-context supervision reduces the gradient influence of mis-retrieved outliers, providing a theoretical explanation for the robustness of retrieval-based aggregation under noisy contexts. Overall, both results justify retrieval as a principled mechanism for constructing task-relevant context sets and provide theoretical support for label-guided retrieval and aggregation.

The main contributions of our work are as follows:

• Formulation. We reveal an intrinsic duality between message-passing aggregation and retrieval-augmented MLPs, offering a unified view of GNN layers as prediction over retrieved contexts.

  • Framework. Leveraging this connection, we propose RTA, a scalable retrieval-centric alternative to message passing that integrates label-aware contextual encoding, embedding and structural space retrieval, and label-enhanced aggregation.

  • Theoretical results. We establish theoretical connections between retrieval-based aggregation and message passing, and prove optimization robustness under retrieved-set supervision. We present theoretical guarantees for (i) the equivalence of retrieval-based message passing and (ii) optimization robustness under retrieved-set supervision.

• Empirical results. We conduct extensive experiments on multiple text-attributed graph benchmarks, showing that RTA matches or outperforms strong GNN baselines with improved efficiency and robustness.

Overall, our work takes a step toward demystifying message passing by recasting it as retrieval over contextual evidence, and it suggests a practical design space in which graph representation learning can be carried out by retrieval-defined computation graphs rather than fixed-edge diffusion.

References (62)

  • Semi-supervised classification with graph convolutional networks
  • Graph attention networks
  • Inductive representation learning on large graphs
  • What's behind the mask: Understanding masked graph modeling for graph autoencoders
  • Graph neural networks for social recommendation
  • Does GNN pretraining help molecular representation?
  • Lightgcn: Simplifying and powering graph convolution network for recommendation
  • Neural message passing for quantum chemistry
  • Heterophily-aware representation learning on heterogeneous graphs
  • On the bottleneck of graph neural networks and its practical implications
  • A survey on RAG meeting llms: Towards retrieval-augmented large language models
  • Retrieval-augmented generation for knowledge-intensive NLP tasks
  • Nodeformer: A scalable graph structure learning transformer for node classification
  • Deformable graph transformer
  • Graphsaint: Graph sampling based inductive learning method
  • Understanding structural vulnerability in graph convolutional networks
  • How powerful are graph neural networks?
  • Harnessing explanations: Llm-to-lm interpreter for enhanced text-attributed graph representation learning
  • Graphgpt: Graph instruction tuning for large language models
  • Exploring the potential of large language models (llms) in learning on graphs
  • Dynamic bundling with large language models for zero-shot inference on text-attributed graphs
  • Relm: Leveraging language models for enhanced chemical reaction prediction
  • Learning on large-scale text-attributed graphs via variational inference
  • Generalization principles for inference over text-attributed graphs with large language models
  • Node feature extraction by self-supervised multiscale neighborhood prediction
  • One for all: Towards training one graph model for all classification tasks
  • Speculative RAG: enhancing retrieval augmented generation through drafting
  • Atlas: Few-shot learning with retrieval augmented language models
  • Corrective retrieval augmented generation
  • Llatrieval: Llm-verified retrieval for verifiable generation
  • Self-rag: Learning to retrieve, generate, and critique through self-reflection
  • From local to global: A graph RAG approach to query-focused summarization
  • G-retriever: Retrieval-augmented generation for textual graph understanding and question answering
  • Hipporag: Neurobiologically inspired long-term memory for large language models
  • From RAG to memory: Non-parametric continual learning for large language models
  • Training graph neural networks with 1000 layers
  • Dense passage retrieval for open-domain question answering
  • Flashrag: A modular toolkit for efficient retrieval-augmented generation research
  • Learning with local and global consistency
  • BERT: pre-training of deep bidirectional transformers for language understanding
  • Deberta: decoding-enhanced bert with disentangled attention
  • Billion-scale similarity search with GPUs
  • Scaling personalized web search
  • A comprehensive study on text-attributed graphs: Benchmarking and rethinking
  • Learning to extract symbolic knowledge from the world wide web
  • Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • Deep graph infomax
  • Bootstrapped representation learning on graphs
  • Graphmae: Self-supervised masked graph autoencoders
  • Llama: Large language and graph assistant
  • GOFA: A generative one-for-all model for joint graph language modeling
  • How to make lms strong node classifiers?
  • Robust graph convolutional networks against adversarial attacks
  • Node similarity preserving graph convolutional networks
  • Graph structure learning for robust graph neural networks
  • Adam: A method for stochastic optimization
  • Making text embedders few-shot learners (opens arXiv in a new tab)
  • Pytorch: An imperative style, high-performance deep learning library
  • Fast graph representation learning with PyTorch Geometric
  • Huggingface's transformers: State-of-the-art natural language processing
  • Adversarial attack on large scale graph
  • Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks