
DynG-DyGFormer
Graphs and geometry127 ops26.6K params
A Transformer for dynamic graphs that patches first-hop histories and counts shared neighbors.
Graphs and geometry · 198 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
About this model's family
DyGFormer is a Transformer-based architecture for dynamic graph learning, where entities are nodes and their timestamped interactions are links. It is conceptually simple and only needs to learn from nodes' historical first-hop interactions, which turns dynamic graph learning into a sequence learning problem. Given an interaction between a source and a destination node, it extracts both nodes' first-hop histories before that timestamp, encodes neighbors, links and time intervals, and feeds the result to a Transformer.
Two ideas distinguish it. The first is a neighbor co-occurrence encoding scheme that explores correlations between the source and destination nodes based on their historical sequences, on the intuition that two nodes with more common historical neighbors are more likely to interact in the future. The second is a patching technique that divides each sequence into multiple patches and feeds them to the Transformer, letting the model benefit effectively and efficiently from longer histories. Each patch groups temporally adjacent interactions with flattened encodings, which preserves local temporal proximities. In experiments the input sequence length is varied from 32 to 4096 while the patch size grows from 1 to 128, keeping computational complexity constant regardless of input length. The encoder stacks pre-norm multi-head self-attention and feed-forward blocks with GELU, and processes the source and destination sequences together so attention can run within and across them.
The paper also introduces DyGLib, a unified library with standard training pipelines, extensible coding interfaces and comprehensive evaluating protocols for continuous-time dynamic graph learning. Across thirteen datasets for dynamic link prediction and dynamic node classification, DyGFormer reaches state-of-the-art performance on most of them. The authors are candid about where it does not: on datasets whose positive and negative links have similar common-neighbor ratios, such as UN Vote, DyGFormer can trail a few baselines.
Key idea. DyGFormer pairs a neighbor co-occurrence encoding that captures source-destination correlations with a patching technique that lets a Transformer exploit long first-hop histories at constant cost, and ships with the DyGLib library for reproducible dynamic graph learning.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{yu2023betterdynamicgraphlearning,
title={Towards Better Dynamic Graph Learning: New Architecture and Unified Library},
author={Le Yu and Leilei Sun and Bowen Du and Weifeng Lv},
year={2023},
eprint={2303.13047},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2303.13047},
}