DTGB: A Comprehensive Benchmark for Dynamic Text-Attributed Graphs

Jiasheng Zhang, Jialin Chen, Menglin Yang, Aosong Feng, Shuang Liang, Jie Shao, Rex Ying

TL;DR

The paper introduces the Dynamic Text-attributed Graph Benchmark (DTGB), the first open-source benchmark specifically designed for graphs that evolve over time and contain rich textual descriptions on both nodes and edges. By providing eight large-scale datasets and four distinct evaluation tasks, DTGB reveals the limitations of current dynamic graph learning algorithms and Large Language Models (LLMs) in capturing the co-evolution of network structure and natural language.

What Problem Does This Paper Address?

Many real-world systems are naturally represented as graphs where both the structure and the associated text attributes change over time. For example, in an e-commerce platform, users and products (nodes) have textual profiles, and their interactions (edges) are accompanied by timestamped text reviews. These are known as Dynamic Text-Attributed Graphs (DyTAGs).

Despite their prevalence, existing research is split into two isolated silos:

  1. Dynamic Graph Learning: Focuses on structural changes over time but discards raw text, relying instead on basic statistical or static numerical features.
  2. Text-Attributed Graph (TAG) Learning: Focuses heavily on rich text processing but treats the underlying graph as static, ignoring temporal dynamics.

This paper bridges the gap by introducing DTGB, allowing researchers to evaluate how well models handle the complex interplay between long-range historical structures and evolving natural language semantics.

Figure 1: Dynamic text-attributed graph and evaluation tasks: a case study with movie reviews. Given a DyTAG with interactions before timestamp T, the tasks are to forecast future interactions in t > T, as well as their detailed interaction types and textual descriptions.

Methods

The authors establish a standardized evaluation protocol consisting of four real-world downstream tasks:

  • Future Link Prediction: Predicting whether an interaction will occur between two nodes at a future timestamp.
  • Destination Node Retrieval: Ranking the most likely target nodes for a given source node based on interaction history.
  • Edge Classification: Predicting the category of a future edge (e.g., a review rating).
  • Textual Relation Generation: Using an LLM to autoregressively generate the actual text description of a future edge based on historical context.

To set a baseline, the authors evaluate 7 popular dynamic graph learning algorithms (including JODIE, DyRep, TGAT, CAWN, TCL, GraphMixer, and DyGFormer). To incorporate text, they initialize node and edge representations using a pre-trained bert-base-uncased model.

For the textual relation generation task, they benchmark 6 powerful LLMs (Mistral 7B, Vicuna 7B/13B, Llama-3 8B, GPT-3.5-turbo, and GPT-4o), applying Parameter-Efficient Fine-Tuning via LoRA (Low-Rank Adaptation) for the open-source models.

Datasets

DTGB introduces eight large-scale datasets spanning four diverse domains:

  • E-mail Network: Enron (emails between employees, categorized by topic).
  • Knowledge Graphs: GDELT and ICEWS1819 (political events and relationships between entities).
  • Multi-round Dialogue: Stack elec and Stack ubuntu (user questions, answers, and comments from Stack Exchange).
  • E-commerce: Googlemap CT, Amazon movies, and Yelp (user-business/product reviews and ratings).

These datasets capture realistic properties such as long-tail edge distributions and varying text lengths across different domains.

Figure 2: Distribution of edge text lengths on the DTGB datasets.

Key Insights and Ideas

  • Text is a Crucial Signal for Cold-Starts: Integrating text attributes consistently improves performance, particularly in the inductive setting (predicting interactions for entirely new nodes). Text provides immediate semantic context where structural history is missing.
  • Memory-Based Models Struggle to Scale: Memory-based architectures like JODIE and DyRep suffer from severe out-of-memory (OOM) issues on larger datasets (like Stack Exchange and Yelp) and can be easily misled if text embeddings are naively integrated into their update mechanisms.
  • Current GNNs Neglect Edge Modeling: Most existing dynamic graph neural networks fail to achieve satisfactory performance in edge classification because their architectures inherently prioritize node features over edge feature evolution.
  • The "Historical Sampling" Challenge: Evaluating destination node retrieval using a candidate pool of recently interacted nodes (historical sampling) is significantly harder for models than using a randomly sampled pool. Current models rely too heavily on temporal co-occurrence and fail to grasp deep semantic relevance.

Key Results

  • Edge Classification: Incorporating BERT-encoded text attributes significantly boosts the F1-score across almost all models and datasets. For instance, on the ICEWS1819 dataset, CAWN's F1-score jumps from 0.2571 (without text) to 0.3156 (with text).
Edge classification performance with and without text attributes
  • Destination Node Retrieval: When switched from random candidate sampling to historical sampling, model performance drops drastically across the board, highlighting a major blind spot in current dynamic graph representations.
Node retrieval performance comparing random vs. historical sampling
  • Textual Relation Generation: Supervised Fine-Tuning (SFT) via LoRA successfully enhances open-source LLMs. For example, Vicuna-7b's BERTscore F1 improved by 3.82 points on the Googlemap CT dataset after SFT, performing comparably to proprietary models like GPT-4o.

Limitations and Future Work

The authors note two primary limitations:

  1. Lack of High-Order Graph Context for LLMs: Due to the strict maximum input length constraints of current LLMs, the prompts for textual relation generation could only include immediate, one-hop historical interactions, ignoring broader graph topology.
  2. Scalability Overhead: Encoding long text sequences dynamically across massive graph structures introduces substantial computational and memory overhead.

Future Directions: The authors suggest designing specialized "temporal graph tokens" that can seamlessly blend structural, temporal, and textual dynamics directly within LLM context windows.

Summary updated

BibTeX
@inproceedings{zhang2024dtgb,
  author = {Jiasheng Zhang and Jialin Chen and Menglin Yang and Aosong Feng and Shuang Liang and Jie Shao and Rex Ying},
  title = {{DTGB: A Comprehensive Benchmark for Dynamic Text-Attributed Graphs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
}
Figure