Models that predict future links in evolving networks look strong when tested against random non-links. They lose up to 20% of their ranking quality once the test instead asks them to reject pairs that interacted in the past but are not interacting now Towards Better Evaluation for Dynamic Link Prediction. The usual explanations are forgetting and memorization. We propose a different one that can be measured directly. A temporal graph network updates each node's state by repeatedly averaging in messages from the nodes it interacts with. Over time, this repeated averaging works like stacking layers, so the nodes a user has recently touched drift toward similar representations. This is over-smoothing, the collapse of node representations toward sameness, but it happens inside a local, time-bounded neighborhood rather than across the whole graph. A model trained against random negatives is never penalized for this, because random negatives are almost always far away.
The proposal has two parts. First, a diagnostic: the effective rank of the representations of a node's recent two-hop neighborhood should predict how well the model ranks hard candidates, and it should do so better than global rank or Dirichlet energy. Second, a training change: draw negatives from that recent neighborhood, maintained cheaply as events stream in, with the neighborhood's size controlled by a candidate budget instead of a fixed hop radius. The claim is specific. These neighborhood negatives should help most on links never seen before, where historical negatives teach nothing, and they should raise local rank. If simply training with historical negatives matches them on novel links, the idea is wrong.
Core Claim
Three bodies of work each hold one piece. Static work shows that negatives drawn from nearby nodes act as a repelling force against collapse. Layer-diverse Negative Sampling for Graph Neural Networks injects shortest-path-selected, determinantal-point-process-diversified non-neighbors into each layer, which keeps GCN accuracy on Amazon Computers at 77.92% (versus 47.21%) and stays stable to 32 layers. CACL shows that different-class nodes within the same community are the hard negatives that prevent homogenization. Both assume a fixed graph, and the first depends on eigendecompositions that are too slow for streams.
Dynamic-graph work shows where current models fail: under historical negatives and on "surprising" never-seen edges Temporal Graph Benchmark for Machine Learning on Temporal Graphs. It treats hard negatives only as an evaluation protocol, not as a training signal.
Measurement work Are we measuring oversmoothing in graph neural networks correctly? shows that effective rank tracks accuracy (average Pearson 0.91) where Dirichlet energy does not. That study covers static graphs only.
We connect these by treating time as the depth axis and the recent temporal neighborhood as the place where collapse happens. The one dynamic model that addresses over-smoothing, Todyformer, does so by changing the architecture: it alternates local message passing with global attention. We instead change only the training negatives and leave the backbone untouched, so the effect can be tested on existing models.
Research Program
The diagnostic. For node $u$ at time $t$, let $H_u(t)$ be the matrix whose rows are the current representations of the nodes within two temporal hops of $u$ during the window $[t-\tau, t]$, and let $p_i$ be its singular values normalized to sum to one. The local effective rank is
$$\mathrm{Erank}_u(t) = \exp\Big(-\sum_i p_i \ln p_i\Big),$$
following the definition in the rank-measurement paper. We will log this quantity during training and at test time for TGN, DyGFormer and NAT. We will then correlate it, per query, with the reciprocal rank the model assigns to the true destination among historical and neighborhood candidates. The comparison measures are global effective rank and Dirichlet energy.
Collapse and forgetting predict different patterns, and the experiment is designed to tell them apart. If collapse is real, local rank should fall as node activity rises, and low local rank should predict errors even when the true edge is a repeat that memory should retain. If forgetting is the real cause, errors should instead track how long ago the pair last interacted, the variable that TAMI targets.
The sampler. Each node keeps a small reservoir of recently co-active second-hop nodes. When an edge $(u,v)$ arrives, a few of $v$'s recent partners are pushed into $u$'s reservoir with reservoir-sampling replacement. The cost is constant per event, in the spirit of the fixed-size caches in NAT.
The window $\tau$ is not fixed. It shrinks or grows so that each node's eligible pool stays near a target size $M$. This addresses the radius problem reported by Structure Aware Negative Sampling in Knowledge Graphs, where a 5-hop neighborhood covers 99% of FB15K-237 and neighborhood sampling becomes uniform. In a growing stream, a fixed radius would drift the same way. A pool size target does not.
Training negatives for each positive event are a mixture of three sources: uniform, historical (past partners of $u$ inactive at $t$), and neighborhood (reservoir members never linked to $u$). The mixing weight is a single hyperparameter.
False negatives. Triadic closure means that some neighborhood negatives later become real links. We will report how often sampled negatives become positives within the next training interval. We will also test a mitigation that down-weights candidates with high common-neighbor counts. That mitigation is cheap and needs no model.
Baselines
Do-nothing reference. Each backbone (TGN, DyGFormer, NAT) is trained with the standard uniform negatives. The proposal must improve on these under historical and inductive evaluation.
Memorization reference. EdgeBank Towards Better Evaluation for Dynamic Link Prediction predicts a link whenever it has been seen before, and it often outranks deep models under historical evaluation. It is the honest bar on repeat-heavy data. On TGB node affinity, a moving average reached NDCG@10 of 0.559 on tgbn-reddit versus TGN's 0.315 TGB. Beating EdgeBank overall is not required. Beating it on high-surprise splits, while closing the gap on repeat splits, is required.
Strongest learned models. - On tgbl-wiki, NAT reports the best MRR of 0.749 TGB. - On tgbl-review, DyGFormer with TAMI is reported as an 87.05% relative gain, but no absolute MRR for it was found on Lacuna. - On tgbl-comment, Todyformer is reported 39% ahead of the next model in MRR, but no absolute value for it was found on Lacuna.
We will rerun these configurations with the official TGB protocol. We will report our reproduced numbers alongside the cited ones and apply our sampler on top of them. Beating the strongest model means an MRR gain on tgbl-wiki above 0.749 in the TGB setting, or a statistically significant gain over reproduced DyGFormer+TAMI on tgbl-review, across five seeds.
Fair-comparison rules. Every variant gets the same number of negatives per positive, the same epochs and the same tuning budget (an equal-size hyperparameter search, including the mixing weight for our method).
Ablations. The main ablation replaces the neighborhood component with historical negatives at matched count. This isolates whether neighborhood structure matters beyond hardness. Two further ablations replace adaptive $\tau$ with a fixed window, and replace the reservoir with a periodically recomputed static 2-hop set. These show whether the streaming maintenance is needed.
Why not just…?
Why not just train with historical negatives, since that is what the evaluation uses? This is the most serious threat. On test edges that repeat past interactions, it may match our method. Historical negatives are past partners of $u$ itself. For an edge $u$ has never formed, they carry no information about which of the many plausible new partners is right. Neighborhood negatives are exactly those plausible new partners. The matched-count ablation, broken down by the TGB surprise split, settles this. If historical-only training equals the mixture on novel edges and inductive negatives, and also restores local rank as much, then the neighborhood mechanism adds nothing, and we will report that as the result.
Why not just use EdgeBank? It cannot score an edge it has never seen, and TGB shows memorization failing on high-surprise data such as tgbl-review, where GraphMixer and TGAT lead. Our target is precisely the novel-edge regime. We report EdgeBank separately on repeat and novel splits so that its strength on repeats is not hidden.
Why not just use an architecture that resists over-smoothing, like Todyformer or high-pass filter channels? Architectural changes such as Complete the Missing Half can keep rank high without making representations discriminative, which the rank paper warns about. Todyformer also adds attention cost over node timelines. We apply our sampler to Todyformer itself. If the gain is zero there while positive on TGN, that suggests the architecture already solves the collapse, a legitimate and informative outcome.
Why not just port the layer-diverse determinantal sampler to snapshots? Its shortest-path and eigendecomposition steps must be redone whenever the graph changes, which forced subsampling even on static graphs. We include a snapshot-recomputed version on the smaller datasets (UCI, Enron, Wikipedia) and report accuracy and wall-clock time. This shows whether the reservoir version loses anything relative to the principled but expensive approach.
Proposed Experiments
Datasets and protocols. We use tgbl-wiki, tgbl-review, tgbl-coin and tgbl-comment under the TGB ranking protocol. We also use Wikipedia, Reddit, UCI and Enron under random, historical and inductive negative evaluation, following Pirovano et al. Metrics are MRR (TGB) and AU-ROC (classic datasets), each broken down into repeat and novel test edges, plus per-query local effective rank, false-negative rate and events processed per second.
First decisive check. Across backbones and datasets, local effective rank must correlate more strongly with per-query hard-candidate accuracy than global rank or Dirichlet energy, after controlling for time since last interaction. If it does not, the collapse explanation fails and the sampler loses its motivation.
Second decisive check. Neighborhood negatives must beat matched-count historical negatives on novel edges and inductive evaluation, and that gain must coincide with a rise in local rank. If the gains appear without any rank change, the method may still be useful, but the over-smoothing account is wrong, and we will say so.
References
- Towards Better Evaluation for Dynamic Link Prediction
- Layer-diverse Negative Sampling for Graph Neural Networks
- CACL: Community-Aware Heterogeneous Graph Contrastive Learning for Social Media Bot Detection
- Temporal Graph Benchmark for Machine Learning on Temporal Graphs
- Are we measuring oversmoothing in graph neural networks correctly?
- Todyformer: Towards Holistic Dynamic Graph Transformers with Structure-Aware Tokenization
- TAMI: Taming Heterogeneity in Temporal Interactions for Temporal Graph Link Prediction
- Neighborhood-aware Scalable Temporal Network Representation Learning
- Structure Aware Negative Sampling in Knowledge Graphs
- Complete the Missing Half: Augmenting Aggregation Filtering with Diversification for Graph Convolutional Networks