Retrieval Augmented Generation for Dynamic Graph Modeling

Yuxia Wu, Lizi Liao, Yuan Fang
8/26/2024
cs.LGcs.AI

Official code: YuxiaWu/RAG4DyG (9 stars, last commit 2025-04-29).

Abstract

Modeling dynamic graphs, such as those found in social networks, recommendation systems, and e-commerce platforms, is crucial for capturing evolving relationships and delivering relevant insights over time. Traditional approaches primarily rely on graph neural networks with temporal components or sequence generation models, which often focus narrowly on the historical context of target nodes. This limitation restricts the ability to adapt to new and emerging patterns in dynamic graphs. To address this challenge, we propose a novel framework, Retrieval-Augmented Generation for Dynamic Graph modeling (RAG4DyG), which enhances dynamic graph predictions by incorporating contextually and temporally relevant examples from broader graph structures. Our approach includes a time- and context-aware contrastive learning module to identify high-quality demonstrations and a graph fusion strategy to effectively integrate these examples with historical contexts. The proposed framework is designed to be effective in both transductive and inductive scenarios, ensuring adaptability to previously unseen nodes and evolving graph structures. Extensive experiments across multiple real-world datasets demonstrate the effectiveness of RAG4DyG in improving predictive accuracy and adaptability for dynamic graph modeling. The code and datasets are publicly available at https://github.com/YuxiaWu/RAG4DyG.

View on arXivView PDF

Code Implementations(1)

YuxiaWu/RAG4DyGOfficial100%

[SIGIR 2025] Code and data for "Retrieval Augmented Generation for Dynamic Graph Modeling"

92Shell, PythonApr 25, 20251 years ago

Similar Papers

Cite this paper

@article{wu2024retrieval,
  title  = {Retrieval Augmented Generation for Dynamic Graph Modeling},
  author = {Yuxia Wu and Lizi Liao and Yuan Fang},
  year   = {2024},
  eprint = {2408.14523},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.14523v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.14523.svg)](https://codeofpaper.com/paper/2408.14523)

Discussion