Revisiting Node Affinity Prediction in Temporal Graphs
Mantri, Feldman, Eliasof et al.
Node affinity prediction is a common task that is widely used in temporal graph learning with applications in social and financial networks, recommender systems, and more. Recent works have addressed this task by adapting state-of-the-art dynamic link property prediction models to node affinity prediction. However, simple heuristics, such as Persistent Forecast or Moving Average, outperform these models. In this work, we analyze the challenges in training current Temporal Graph Neural Networks for node affinity prediction and suggest appropriate solutions. Combining the solutions, we develop NAViS - Node Affinity prediction model using Virtual State, by exploiting the equivalence between heuristics and state space models. While promising, training NAViS is non-trivial. Therefore, we further introduce a novel loss function for node affinity prediction. We evaluate NAViS on TGB and show that it outperforms the state-of-the-art, including heuristics. Our source code is available at https://github.com/orfeld415/NAVIS
academic
Revisiting Node Affinity Prediction in Temporal Graphs
Node affinity prediction is an important task in temporal graph learning with widespread applications in social networks, financial networks, and recommendation systems. Although recent research has addressed node affinity prediction by adapting state-of-the-art dynamic link prediction models, simple heuristic methods such as persistent forecasting and moving averages consistently outperform these complex models. This paper analyzes the training challenges faced by current temporal graph neural networks (TGNNs) in node affinity prediction tasks and proposes corresponding solutions. Combining these solutions, the authors develop NAVIS (Node Affinity prediction model using Virtual State), which leverages the equivalence between heuristic methods and state-space models to achieve node affinity prediction.
Node affinity prediction aims to predict the interaction intensity between a given node and all other nodes at a future time point, which differs from traditional link prediction tasks. Link prediction focuses on whether specific edges will appear, while affinity prediction requires complete ranking of all potential neighbors, making the task more challenging yet more aligned with practical application requirements.
Through theoretical analysis, the authors discovered that simple heuristic methods are actually special cases of linear state-space models (SSMs), providing a theoretical foundation for designing more powerful TGNN architectures.
Theoretical Contribution: Proves that simple heuristic methods are special cases of linear SSMs and designs TGNN architectures based on this connection that can generalize heuristic methods
Architectural Innovation: Proposes the NAVIS model, combining virtual global state and linear state-space mechanisms to effectively solve node affinity prediction problems
Loss Function Improvement: Analyzes the limitations of cross-entropy loss in affinity prediction and proposes ranking-based Lambda loss as an alternative
Experimental Validation: Verifies the effectiveness of the method on TGB benchmarks and multiple datasets, consistently outperforming existing methods and heuristic baselines
Theorem 1 (Linear SSMs Generalize Basic Heuristics):
Let H be the set of basic heuristics (PF, SMA, EMA), and Flin-SSM be the set of mappings realizable by linear SSMs. Then:
H⊊Flin-SSM
Theorem 2 (Expressiveness Limitations of RNN/LSTM/GRU):
Standard RNN, LSTM, or GRU units cannot represent the most basic persistent forecasting (PF) heuristic. That is, for all input sequences, there do not exist parameters such that hi=xi.
Problem Analysis:
Theorem 3 (Suboptimality of Cross-Entropy for Ranking):
There exist infinitely many triples (y,s1,s2) where rank(s1)=rank(y) and rank(s2)=rank(y), but ℓCE(s1,y)>ℓCE(s2,y).
Traditional research focuses on structural expressiveness measured by WL tests, while this paper addresses functional expressiveness—the ability to represent specific mathematical operations.
Recent research has found that simple heuristic methods outperform complex TGNNs on multiple benchmarks. This paper is the first to explicitly leverage the formal equivalence between heuristics and SSMs for architecture design.
Existing methods include memory-based (TGN, DyRep) and non-memory-based (DyGFormer, GraphMixer) architectures, but none effectively address the specific requirements of node affinity prediction.
Overall Assessment: This is a high-quality research paper that reveals the inadequacies of existing methods through in-depth theoretical analysis and proposes effective solutions. The NAVIS model is well-designed, experimental results are convincing, and it makes positive contributions to the temporal graph learning field. The paper's primary value lies in providing new theoretical perspectives and a practical methodological framework.