arXiv:2611.07569cs.LGNov 2026

Manuscript Offprint

arXiv:2611.07569

MambaTG: Candidate-Aware State Space Modeling for Future Link Prediction on Temporal Graphs

Nguyen Hong Quan, Sitao Luan, Yilun Zheng, Lihui Chen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Future link prediction on temporal graphs involves both repeated interactions between previously connected node pairs and first-time interactions between pairs with no prior interaction. While repeated-edge prediction can exploit direct pairwise evidence, unseen-edge prediction must generalize beyond historical recurrence. Existing temporal graph models often exploit signals tied to recurring interactions or historical overlap, which are highly informative for repeated edges but become limited or unavailable for unseen edges, contributing to substantial performance degradation on unseen-edge prediction. Based on this observation, we identify two complementary signals for modeling sequential dynamics beyond historical recurrence: (1) historical-sequence evolution, which captures dependencies among the source node's chronologically ordered interactions, and (2) candidate-history compatibility, which captures how well a candidate fits the source node's evolving history. Based on the decomposition, we propose MambaTG, a candidate-aware Mamba-based framework that jointly models these two signals. Mamba provides a natural mechanism for this design: its selective recurrence captures the evolution of ordered interaction histories, while its input-dependent state transitions allow the history state to adapt to different candidate inputs. Extensive experiments on 13 temporal graph datasets against 13 representative baselines show that MambaTG achieves strong and consistent performance across both repeated and unseen edges while remaining computationally efficient.

1 INTRODUCTION

Temporal graphs represent entities as nodes and their interactions as time-stamped edges (Kazemi et al., 2020). They provide a natural framework for modeling evolving relationships in applications such as social networks (Alvarez-Rodriguez et al., 2021) and recommender systems (Yu et al., 2024). A fundamental task in temporal graph learning is future link prediction, which predicts interactions at a future query time from historical interactions (Divakaran & Mohan, 2020). Future interactions can be divided into two categories, (1) repeated edges, connecting previously interacting node pairs, and (2) unseen edges, connecting pairs with no prior interaction (Yi et al., 2025b). Both arise naturally in real-world systems: users on a social platform may repeatedly interact with existing connections while also forming new connections with previously unrelated users. Despite their coexistence, the two regimes present distinct predictive challenges. Repeated-edge prediction can directly exploit prior pairwise interactions, whereas unseen-edge prediction must infer future relationships from broader patterns in historical behaviors. A practical temporal graph model must therefore capture recurring relationships while also generalizing to new ones without prior pairwise interactions.

However, some existing temporal link prediction methods still rely heavily on signals associated with repeated interactions. The competitiveness of EdgeBank, a non-parametric baseline that predicts links by memorizing previously observed edges, shows that historical recurrence alone can

*Corresponding author. Email address: nguyenho003@e.ntu.edu.sg, sitao.luan@mail.mcgill.ca, yilun001@e.ntu.edu.sg, elhchen@ntu.edu.sg.

Figure

Figure 1: Illustration of two complementary signals for predicting Learner A's next course choice from previously taken courses in Python, Machine Learning, Computer Vision, and Robotics.

provide a remarkably strong signal on conventional benchmarks (Poursafaei et al., 2022). This bias toward recurrence is reflected in representative temporal graph neural network (T-GNN) designs. Recent methods such as DyGFormer(Yu et al., 2023), FreeDyG(Tian et al., 2024), DyG-Mamba(Li et al., 2025), and DyGMamba(Ding et al., 2025) explicitly encode source–destination historical overlap through neighbor co-occurrence or interaction-frequency features. Such signals are highly informative for repeated edges but may be sparse or unavailable for unseen edges, particularly in bipartite graphs. Consistent with this limitation, recent benchmarks report substantially lower performance on unseen edges than on repeated edges (Yi et al., 2025b). These observations suggest that effective future link prediction requires moving beyond recurrence-based evidence and learning historical patterns that can generalize to previously unseen interactions.

This raises a more fundamental question: What predictive information should a temporal graph model learn from historical interactions to generalize beyond direct pairwise recurrence? We argue that the answer lies in two complementary signals: historical-sequence evolution and candidate-history compatibility, as illustrated through Learner A's historical course interactions in Figure 1. (1) Historical-sequence evolution (Figure 1(a)) captures how historical interactions evolve in temporal order. The same interactions can imply different future behavior when ordered differently, as later interactions may reflect intentions developed through earlier ones. Capturing this signal therefore requires modeling dependencies among historical interactions as an ordered sequence, such that later interactions are interpreted in the context of the preceding history. (2) Candidate-history compatibility (Figure 1(b)) captures how well a candidate fits the source node's evolving history. Explicitly modeling this relationship allows predictions to adapt to each candidate. However, many T-GNNs construct source and candidate representations largely independently and combine them only at the prediction stage (Kumar et al., 2019; Cong et al., 2023), limiting direct modeling of the relationship between the candidate and the source history. CRAFT (Yi et al., 2025a) directly matches each candidate against the source node's individual historical interactions, but does not explicitly model dependencies arising from the history's sequential evolution before candidate matching. Overall, the two signals capture distinct but complementary aspects of future interaction prediction: historical-sequence evolution characterizes dependencies within the ordered interaction history, whereas candidate-history compatibility reflects how that evolving history informs the prediction of a candidate interaction.

Jointly modeling these complementary signals poses a non-trivial design challenge: historical-sequence evolution is shared across candidates, whereas candidate-history compatibility is inherently candidate-specific. To address this challenge, we propose MambaTG, an SSM-based framework that uses Mamba (Gu & Dao, 2024) as its sequential encoder. Its Candidate-Aware Mamba Encoder (CAME) first encodes the source's ordered historical interactions into a shared history state and then adapts this state to each candidate through Mamba's input-dependent state transitions. This design evaluates each candidate in the context of the evolved history while avoiding repeated history encoding. In addition, interaction histories may contain predictive patterns at different temporal scales, from slowly evolving preferences to rapid behavioral shifts. When modeled directly, dominant patterns at one scale may obscure weaker but predictive dynamics at another. We therefore introduce Dual-Branch Representation Refinement (DRR) to adaptively refine historical and candidate representations, providing CAME with more informative inputs for sequential encoding.

The main contributions of this work are summarized as follows:

  • A unified view of sequential dynamics. We characterize sequential dynamics for future link prediction through two complementary signals: historical-sequence evolution and

candidate–history compatibility. Through empirical analysis, we show that both signals contribute to strong performance across repeated- and unseen-edge prediction.

  • An efficient candidate-aware Mamba-based framework. We propose MambaTG, which jointly captures these two signals through a Candidate-Aware Mamba Encoder and improves input representations through Dual-Branch Representation Refinement. By reusing the encoded historical state across candidates, MambaTG avoids repeated history encoding and enables efficient candidate evaluation.

  • Extensive empirical validation. We evaluate MambaTG on 13 future link prediction datasets. MambaTG achieves strong performance across repeated- and unseen-edge prediction and attains the best average rank among all baselines. Efficiency and ablation studies further demonstrate its scalability and validate its principal design choices.

References (67)