Abstract
We propose DyGFormer, a new Transformer-based architecture for dynamic graphlearning. DyGFormer is conceptually simple and only needs to learn from nodes'historical first-hop interactions by: (1) a neighbor co-occurrence encodingscheme that explores the correlations of the source node and destination nodebased on their historical sequences; (2) a patching technique that divides eachsequence into multiple patches and feeds them to Transformer, allowing themodel to effectively and efficiently benefit from longer histories. We alsointroduce DyGLib, a unified library with standard training pipelines,extensible coding interfaces, and comprehensive evaluating protocols to promotereproducible, scalable, and credible dynamic graph learning research. Byperforming exhaustive experiments on thirteen datasets for dynamic linkprediction and dynamic node classification tasks, we find that DyGFormerachieves state-of-the-art performance on most of the datasets, demonstratingits effectiveness in capturing nodes' correlations and long-term temporaldependencies. Moreover, some results of baselines are inconsistent withprevious reports, which may be caused by their diverse but less rigorousimplementations, showing the importance of DyGLib. All the used resources arepublicly available at https://github.com/yule-BUAA/DyGLib.