Large Language Models are Good Relational Learners
Fang Wu, Vijay Prakash Dwivedi, Jure Leskovec
Abstract
Large language models (LLMs) have demonstrated remarkable capabilities across various domains, yet their application to relational deep learning (RDL) remains underexplored. Existing approaches adapt LLMs by traversing relational links between entities in a database and converting the structured data into flat text documents. Still, this text-based serialization disregards critical relational structures, introduces redundancy, and often exceeds standard LLM context lengths. We introduce Rel-LLM, a novel architecture that utilizes a graph neural network (GNN)-based encoder to generate structured relational prompts for LLMs within a retrieval-augmented generation (RAG) framework. Unlike traditional text-based serialization approaches, our method preserves the inherent relational structure of databases while enabling LLMs to effectively process and reason over complex entity relationships. Specifically, the GNN encoder extracts a local subgraph around an entity to build feature representations that contain relevant entity relationships and temporal dependencies. These representations are transformed into structured prompts using a denormalization process, effectively allowing the LLM to reason over relational structures. Through extensive experiments, we demonstrate that Rel-LLM outperforms existing methods on key RDL tasks, offering a scalable and efficient approach to integrating LLMs with structured data sources. Code is available at https://github.com/ smiles724/Rel-LLM .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 59435b30-3d89-4d69-bef8-6f40d49b8288Cited by top-tier papers6
- Relational Transformer: Toward Zero-Shot Foundation Models for Relational DataRishabh Ranjan, Valter Hudovernik, Mark Znidar, Charilaos I. Kanatsoulis et al.ICLR 2026 · 35 citations
- No Need to Train Your RDB Foundation ModelLinjie Xu, Yanlin Zhang, Quan Gan, Minjie Wang et al.ICML 2026 · 6 citations
- DeepSearch: Overcome the Bottleneck of Reinforcement Learning with Verifiable Rewards via Tree-based SearchFang Wu, Weihao Xuan, Heli Qi, Aaron Tu et al.ICLR 2026 · 6 citations
- Relatron: Automating Relational Machine Learning over Relational DatabasesZhikai Chen, Han Xie, Jian Zhang, Jiliang Tang et al.ICLR 2026 · 2 citations
- Relational Structural Causal ModelsAdiba Ejaz, Elias BareinboimICML 2026
Builds on16
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Visual Instruction TuningHaotian Liu, Chunyuan Li, Qingyang Wu, Yong Jae LeeNeurIPS 2023 · 11,349 citations
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel et al.ACL 2022 · 1,494 citations
- What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 citations
- G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question AnsweringXiaoxin He, Yijun Tian, Yifei Sun, Nitesh V. Chawla et al.NeurIPS 2024 · 384 citations
Related papers
- PathRAG: Pruning Graph-based Retrieval Augmented Generation with Relational PathsBoyu Chen, Zirui Guo, Zidan Yang, Yuluo Chen et al.AAAI 2026 · 45 citations
- ZeroRel: Relational Reasoning via Graph-guided Large Language ModelsYujie Tian, Kun Zhang, Qiuyu Li, Le Wu et al.KDD 2026
- HyperG: Hypergraph-Enhanced LLMs for Structured KnowledgeSirui Huang, Hanqian Li, Yanggan Gu, Xuming Hu et al.SIGIR 2025 · 4 citations
- Graph Neural Prompting with Large Language ModelsYijun Tian, Huan Song, Zichen Wang, Haozhu Wang et al.AAAI 2024 · 90 citations
- You Don't Need Pre-Built Graphs for RAG: Retrieval Augmented Generation with Adaptive Reasoning StructuresShengyuan Chen, Chuang Zhou, Zheng Yuan, Qinggang Zhang et al.AAAI 2026 · 14 citations
