TL;DR
Learning on evolving graphs has long forced a frustrating choice: process every interaction one-by-one for high accuracy at snail speeds, or batch them into periodic snapshots for blazing speed at the cost of terrible predictions. The authors introduce NAGNN, a snapshot-based model that compresses complex local neighborhood histories into tiny, fixed-size statistical summaries and hash buckets. The result is near event-level prediction accuracy while running an order of magnitude faster.
What Problem Does This Paper Address?
Imagine trying to predict who will email whom next in a massive company, or which users will interact on a social network. These are dynamic graphs—networks that change over time.
Historically, researchers have tackled dynamic link prediction in two ways:
- Event-based methods watch the network like a hawk, processing every single edge the exact millisecond it appears. Because they only touch two nodes at a time, they can afford to maintain rich, detailed histories of both nodes' local neighborhoods (joint neighborhood information). They are remarkably accurate, but sequentially processing millions of events creates a massive computational bottleneck.
- Snapshot-based methods take periodic "photographs" of the graph (say, once a day) and process the whole batch at once using fast matrix math. However, maintaining detailed neighborhood memory banks for all nodes simultaneously is computationally impossible. Because snapshot models miss out on this fine-grained neighborhood context, their accuracy plummets.
Can we build a snapshot model that captures rich neighborhood dynamics without blowing up our GPU memory?
Methods
Instead of memorizing every individual neighbor a node has ever interacted with, the Neighbor-Aware Graph Neural Network (NAGNN) treats a node's 1-hop and 2-hop neighbors as a probability distribution of features and compresses it into a fixed-size vector at each snapshot.
It builds on a standard spatial-temporal backbone (stacked Graph Attention Networks fed into a Gated Recurrent Unit, or GRU, to track node states over time) and adds two novel components:
- Temporally-Smoothed Neighborhood Aggregation (Global Context): To summarize the overall shape of a node's neighborhood distribution, NAGNN calculates the first and second statistical moments—specifically, the unnormalized sum of neighbor features and the sum of squared features. Using sums instead of averages intentionally preserves the node's degree (how many neighbors it has). A GRU smooths these statistics across snapshots.
- LSH-Based Neighborhood Reservoir (Fine-Grained Structure): Global sums blur distinct sub-groups together. To keep high-resolution details, NAGNN uses Locality-Sensitive Hashing (SimHash via random projections) to route similar neighbor features into a fixed number of slots (a "reservoir"). Within each slot, features are averaged, updated over time via a dedicated GRU, and finally combined using attention.
For each node, the core embedding, global moment summaries, and fine-grained reservoir summaries are concatenated to predict future links.
Datasets
Following the standardized Unified Temporal Graph (UTG) benchmark framework (which ensures fair conversion and evaluation between snapshot and event paradigms), the authors evaluate NAGNN on six existing dynamic link prediction datasets. Five are discrete-time snapshot graphs (UCI, Enron, Contacts, Social Evo., and MOOC), and one is a continuous-time graph converted for testing (tgbl-wiki). No new datasets are introduced.
Key Insights and Ideas
- Hashing beats random sampling for rare neighbors: The authors mathematically prove that their LSH reservoir preserves the exact empirical mean of a neighborhood while bounding covariance error. Better yet, unlike uniform random sampling—which easily misses rare but highly predictive neighbor types—LSH naturally groups similar items into dedicated buckets, protecting minority structural signals.
- Sum outside, average inside: Ablation studies revealed a neat mathematical symmetry: you must use sum-pooling for global aggregation (to keep node-degree scale intact), and you must use mean-pooling inside the LSH reservoirs (because random projections cause bucket sizes to fluctuate randomly, and summing them injects noisy variance).
- True synergy between global and local: Adding the LSH reservoir alone barely improves over a standard baseline. Adding global statistical moments helps a lot. Putting them together yields a jump larger than either alone—global moments anchor the scale and center of the distribution, allowing the reservoir to focus on fine-grained modes.
Key Results
NAGNN pushes past the existing Pareto frontier of speed versus accuracy:
- Dominating snapshot baselines: NAGNN achieves the highest Mean Reciprocal Rank (MRR) among snapshot models on 4 out of 6 benchmarks. On Enron, it hits 0.315 MRR (jumping past HTGN's 0.263), and on tgbl-wiki, it reaches 0.629 (vs. HTGN's 0.563).
- Rivaling event-based giants at a fraction of the cost: On Enron, NAGNN (0.315) beats top event-based models like NAT (0.276) and GraphMixer (0.296), coming close to DyGFormer (0.331) while running roughly an order of magnitude faster during inference.
- Scalability: On the dense, large-scale MOOC dataset, heavyweight event models like DyGFormer and GraphMixer crash with Out-Of-Memory (OOM) errors, whereas NAGNN runs smoothly and scores 0.179 MRR (surpassing TGN's 0.174).
Limitations and Future Work
NAGNN doesn't win everywhere. On highly predictable, repetitive networks with low "surprise" indices (Contacts and Social Evo.), simpler or specialized snapshot baselines still edge it out. Furthermore, on very dense datasets like UCI and MOOC, a noticeable accuracy gap remains compared to top event-based models (e.g., NAT hits 0.356 on UCI vs. NAGNN's 0.150). When too many interactions get squashed into a single snapshot window, fine-grained causal order is lost. The authors suggest that exploring adaptive temporal granularity—dynamically slicing snapshots finer during busy periods—is the natural next step.
Summary updated