LLM as Graph Kernel: Rethinking Message Passing on Text-Rich Graphs
Organizations: Ant Group · ShanghaiTech University
Abstract
Text-rich graphs, which integrate complex structural dependencies with abundant textual information, are ubiquitous yet remain challenging for existing learning paradigms. Conventional methods and even LLM-hybrids compress rich text into static embeddings or summaries before structural reasoning, creating an information bottleneck and detaching updates from the raw content. We argue that in text-rich graphs, the text is not merely a node attribute but the primary medium through which structural relationships are manifested. We introduce RAMP, a Raw-text Anchored Message Passing approach that moves beyond using LLMs as mere feature extractors and instead recasts the LLM itself as a graph-native aggregation operator. RAMP exploits the text-rich nature of the graph via a novel dual-representation scheme: it anchors inference on each node's raw text during each iteration while propagating dynamically optimized messages from neighbors. It further handles both discriminative and generative tasks under a single unified generative formulation. Extensive experiments show that RAMP effectively bridges the gap between graph propagation and deep text reasoning, achieving competitive performance and offering new insights into the role of LLMs as graph kernels for general-purpose graph learning.
Figures & tables
| GNN operation | RAMP counterpart |
| Node representation | Summary token sequence |
| Neighbor message | Concatenation of neighbor tokens for |
| Aggregation function | LLM reasons over |
| Layer-wise propagation | Passing semantic messages via summary tokens |
| Perplexity | Perplexity | |
| Qwen-2.5-7B-Instruct | 21.72* | - |
| RAMP mp=1,ρ=0.05 | 11.36 | 20.68 |
| RAMP mp=1,ρ=0.1 | 9.17 | 20.87 |
| RAMP mp=2,ρ=0.1 | 8.93 | 22.97 |
| RAMP mp=2,compact | 25.57 | 25.61 |
| Method | Cora | Citeseer | PubMed | History | Photo | Arxiv |
| MLP | 69.00 | 59.35 | 75.55 | 77.71 | 47.56 | 57.23 |
| GCN ( Zhang et al., 2019 ) | 82.29 | 70.16 | 81.92 | 80.55 | 70.14 | 66.52 |
| GAT ( Veličković et al., 2017 ) | 83.03 | 71.29 | 80.78 | 78.93 | 66.18 | 67.76 |
| GraphSAGE ( Hamilton et al., 2017 ) | 83.21 | 70.81 | 82.94 | 80.72 | 73.82 | 67.97 |
| BERT ( Devlin et al., 2019 ) | 80.99 | 71.93 | 91.75 | 80.94 | 58.34 | 65.64 |
| RoBERTa ( Liu et al., 2019 ) | 76.93 | 70.48 | 91.37 | 79.42 | 57.27 | 66.72 |
| Method | ExplaGraphs |
| Qwen-2.5-7B-Instruct | 93.50 |
| GNP ( Tian et al., 2024 ) | 87.04 |
| G-Retriever ( He et al., 2024 ) | 87.05 |
| GRAG ( Hu et al., 2024 ) | 88.05 |
| Align-GRAG Xu et al. (2025) | 89.92 |
| RAMP-7B | 93.86 |
| Setting | Cora | Citeseer |
| RAMP (No Shuffle) | 84.87 | 74.83 |
| Neighbor-Order Shuffle | 84.81 0.08 | 74.73 0.01 |
| Cross-Node Shuffle | 84.32 0.14 | 74.41 0.01 |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | #Nodes | #Edges | #Classes | Avg. D | Domain | Node Text |
| Cora | 2,708 | 10,858 | 7 | 4.01 | Computer Science | Paper titles and abstracts |
| Citeseer | 3,327 | 9,464 | 6 | 2.84 | Computer Science | Paper titles and abstracts |
| PubMed | 19,717 | 88,648 | 3 | 4.49 | Biomedical | Paper titles and abstracts |
| History | 41,551 | 503,180 | 12 | 12.11 | E-commerce | Item titles and descriptions |
| Photo | 48,362 | 873,782 | 12 | 18.07 | E-commerce | Item titles and reviews |
| Arxiv | 169,343 | 1,166,243 | 40 | 6.89 | Computer Science | Paper titles and abstracts |
| Perplexity | Perplexity | |
| 0.01 | 16.39 | 21.19 |
| 0.02 | 13.66 | 21.14 |
| 0.05 | 11.36 | 20.68 |
| 0.10 | 9.18 | 20.88 |
| Method | Cora | PubMed |
| Qwen-2.5-7B-Instruct | 82.65 | 90.79 |
| RAMP mp=1,ρ=0.1 | 83.21 | 92.11 |
| RAMP mp=2,ρ=0.1 | 84.87 | 93.68 |
| Method | Cora | Citeseer | PubMed |
| RAMP mp=2,compact | 55.71 | 68.22 | 93.43 |
| RAMP mp=2,ρ=0.1 | 84.87 | 74.83 | 93.68 |
| Setting | Citeseer Acc. |
| RAMP (Correct Topology) | 74.83 |
| RAMP (Within-Subgraph Shuffle) | 74.41 0.01 |
| Fine-tuned Backbone (No Topology) | 74.35 |
| RAMP (Cross-Subgraph Shuffle) | 73.11 0.06 |
| Paper Title | Intermediate Output (penultimate round KV) | Final Output (last round KV) | Ground Truth |
| Unsupervised Learning Using MML | This paper should be classified into: Theory methods | This paper should be classified into: Probabilistic_Methods | This paper should be classified into: Probabilistic_Methods |
| First Order Regression | This paper should be classified into: Theory | This paper should be classified into: Rule_Learning | This paper should be classified into: Rule_Learning |
| First Order Regression: Applications in Real-World Domains | This paper should be in the rule-based category as it deals with rule based machine learning | This paper should be classified into: Rule_Learning | This paper should be classified into: Rule_Learning |
| Probably Approximately Optimal Derivation Strategies | This paper should be classified into: Theorys category: theory abstract: an paper describes a pao algorithm that first uses mu set of training examples to approximate these probability values and then uses these estimates to produce mu “probably approximately optimal” strategy that is given any *; ffi > 0, pao produces mu strategy whose cost is within * of mu cost of mu optimal strategy with probability greater … | This paper should be classified into: Theory | This paper should be classified into: Theory |
| A Decision Tree System for Finding Genes in DNA | This paper should be in theory category, it describes a decision tree system for finding genes in vertebrate dna sequences, and uses new methods for identifying start codons, donor sites, and acceptor sites, and brings them together in a frame sensitive dynamic programming algorithm that findss the minimum segmentation of a dna sequence into coding and … | This paper should be classified into: Neural_Networks | This paper should be classified into: Neural_Networks |
| Space-Frequency Localized Basis Function Networks for Nonlinear System Estimation and Control | This paper should be classified into: Neural This paper deals with the on-line generation of nonparametric models for nonlinear systems using tools from multiresolution analysis and wavelet theory. It extendss earlier results on adaptive control and identification of nonparametric systems using wavelet basis functions to on-line generation of nonparametric models for nonparametric systems with wavelet basis functions … | This paper should be classified into: Neural_Networks | This paper should be classified into: Neural_Networks |