Efficient Neural Common Neighbor for Temporal Graph Link Prediction

## Abstract

Abstract Temporal graphs are ubiquitous in real-world scenarios, such as social network, trade and transportation. Predicting dynamic links between nodes in a temporal graph is of vital importance. Traditional methods usually leverage the temporal neighborhood of interaction history to generate node embeddings first and then aggregate the source and target node embeddings to predict the link. However, such methods focus on learning individual node representations, but overlook the pairwise representation learning nature of link prediction and fail to capture the important pairwise features of links such as common neighbors (CN). Motivated by the success of Neural Common Neighbor (NCN) for static graph link prediction, we propose TNCN , a temporal version of NCN for link prediction in temporal graphs. TNCN dynamically updates a temporal neighbor dictionary for each node, and utilizes multi-hop common neighbors between the source and target node to learn a more effective pairwise representation. We validate our model on five large-scale real-world datasets from the Temporal Graph Benchmark (TGB), and find that it achieves new state-of-the-art performance on three of them. Additionally, TNCN demonstrates excellent scalability on large datasets, outperforming popular GNN baselines by up to 6.4 times in speed. Our code is available at https://github.com/GraphPKU/TNCN .

## 1 Introduction

Temporal graphs are increasingly utilized in contemporary real-world applications. Complex systems such as social networks (Yang et al., ; Min et al., ; Nguyen et al., ), trade and transaction networks (Zhang et al., ; Yan et al., ), and recommendation systems (Wu et al., ; Yin et al., ) are prime examples. These systems evolve dynamically over time, exhibiting different characteristics at various temporal moments. Recently, there has been a marked increase in the representation learning tasks on temporal graphs in the graph research community. At the same time, a prominent graph learning tool, Graph Neural Network (GNN) (Scarselli et al., ), has been developed to model node, link, and graph tasks. GNNs generally learn node embeddings by iteratively aggregating embeddings from neighboring nodes. They have demonstrated exceptional performance in graph representation learning, achieving state-of-the-art results across numerous tasks.

There remains a significant gap between static graphs and the increasingly prevalent temporal graphs. Temporal graphs incorporate discrete or continuous timestamps attached to edges, providing a more precise depiction of the graph evolution process. Meanwhile, many methodologies for static graphs are not applicable due to the additional constraints imposed by timestamps on causality. One can only utilize nodes and edges that precede a given time, implicitly resulting in numerous graph instances to analyze. Building on the success of time sequence modeling, Kumar et al. (); Trivedi et al. (); Rossi et al. () propose memory-based temporal graph networks aimed at learning both short- and long-term dependencies. These methods, particularly Temporal Graph Networks (TGN), have achieved notable success in temporal node classification. Additionally, Transformer-based models, such as those proposed by Wang et al. (); Xu et al. (), employ the multi-head attention mechanism to capture both cross and internal relationships within a temporal graph.

Figure: (a) a temporal graph
Refer to caption: x1.png

However, these models may exhibit inherent flaws when addressing link prediction tasks in graphs. Such tasks require the model to predict the existence of a target link given specific prerequisite information. The aforementioned approaches primarily focus on node-wise representation learning, using the node embeddings of source and destination nodes to predict the existence of a target link. While straightforward, this method often fails to precisely capture the relationship between two nodes and other more complex graph structure features. For example, in Figure 1, the node-wise method might struggle to predict whether node $w$ prefers to interact with node $u$ or $v$. Generally speaking, these models are constrained by their focus on node-level representation, limiting their ability to capture broader contexts and higher-order patterns.

Considering these shortcomings, Zhang and Chen () highlight the importance of pair-wise representation and propose labeling trick to mark the source and destination nodes when learning their pair-wise representation by GNN. Labeling trick (Zhang et al., ) is shown to greatly enhance GNN performance on static graph link prediction. Building on this, Wang et al. (); Luo and Li (); Yu et al. () develop models that leverage information from temporal surrounding nodes, successfully extending the pair-wise learning approach to dynamic graphs. They extract features using decreasing-timestamp random walks or joint neighborhood structures to generate multi-level embeddings for the center nodes, facilitating node classification and link prediction with pair-wise representations. However, these graph-based models often incur significant computational and memory costs due to extracting temporal neighborhoods and applying message passing on them for each node/link to predict, hindering their application in real-world, large-scale scenarios.

In general, graph-based representation learning methods can significantly enhance model capabilities, yet their high computational cost limits widespread application. For example, the Temporal Graph Benchmark (TGB) (Huang et al., ) contains many high-quality real-world temporal graphs. However, most graph-based models choose to only evaluate on a subset of small graphs due to their unaffordable cost
of training and evaluation on large-scale datasets. On the contrary, memory-based models (Rossi et al., ) update node representations sequentially following the event stream, thus is significantly faster than graph-based methods yet might lose important graph information. Motivated by these observations, we propose an expressive but efficient model, Temporal Neural Common Neighbor (TNCN), to combine the merits of both. By integrating a memory-based backbone with Neural Common Neighbor (Wang et al., ), TNCN learns expressive pairwise representations while maintaining high efficiency akin to memory-based models. Consequently, TNCN is suitable for large-scale temporal graph link prediction.

We conducted experiments on five large-scale real-world temporal graph datasets from TGB. TNCN achieved new state-of-the-art results on three datasets and overall ranked first compared to 10 competitive baselines, demonstrating its effectiveness. To examine its scalability, we selected datasets with temporal edges ranging from $\mathcal{O}(10^{5})$ to $\mathcal{O}(10^{7})$ and node numbers ranging from thousands to millions. We found that TNCN achieved 1.9x$\sim$4.7x speedup in training and 2.1x$\sim$6.4x speedup in inference compared to graph-based models, while maintaining a similar scale of time consumption as memory-based models.

## 2 Related Work

### 2.1 Memory-based Temporal Graph Representation Learning

Temporal graph learning has garnered significant attention in recent years. A classic approach in this domain involves learning node memory using continuous events with non-decreasing timestamps. Kumar et al. () propose a coupled recurrent neural network model named JODIE that learns the embedding trajectories of users and items. Another contemporary work DyRep (Trivedi et al., ) aims to efficiently produce low-dimensional node embeddings to capture the communication and association in dynamic graphs. Rossi et al. () introduces a memory-based temporal neural network known as TGN, which incorporates a memory module to store temporal node representations updated with messages generated from the given event stream. Apan (Wang et al., ) advances the methodology by integrating asynchronous propagation techniques, markedly increasing the efficiency of handling large-scale graph queries. EDGE (Chen et al., ) emerges as a computational framework focusing on increasing the parallelizability by dividing some intermediate nodes in long streams each into two independent nodes while adding back their dependency by training loss. Chen et al. () extend the update method for the node memory module, introducing an additional hidden state to record previous changes in neighbors. Complementing these efforts, additional contributions such as Edgebank (Poursafaei et al., ) and DistTGL (Zhou et al., ) have been directed towards formalizing and accelerating memory-based temporal graph learning methods.

### 2.2 Graph-based Temporal Graph Representation Learning

Subsequent works have incorporated the temporal neighborhood structure into temporal graph learning. CAWN (Wang et al., ) employs random anonymous walks to model the neighborhood structure. TCL (Wang et al., ) samples a temporal dependency interaction graph that contains a sequence of temporally cascaded chronological interactions. TGAT (Xu et al., ) considers the temporal neighborhood and feeds the features into a temporal graph attention layer utilizing a masked self-attention mechanism. NAT (Luo and Li, ) constructs a multi-hop neighboring node dictionary to extract joint neighborhood features and uses a recurrent neural network (RNN) to recursively update the central node’s embedding. This information is then processed by a neural network-based encoder to predict the target link. DyGFormer (Yu et al., ), instead, leverages one-hop neighbor embeddings and the co-occurrence of neighbors to generate features, which are well-patched and subsequently fed into a Transformer (Vaswani et al., ) decoder to obtain the final prediction.

### 2.3 Link Prediction Methods

Link prediction is a fundamental task in graph analysis, aiming to determine the likelihood of a connection between two nodes. Early investigations posited that nodes with greater similarity tend to be connected, which led to a series of heuristic algorithms such as Common Neighbors, Katz Index, and PageRank (Newman, ; Katz, ; Page et al., ). With the advent of GNNs, numerous methods have attempted to utilize vanilla GNNs for enhancing link prediction, revealing sub-optimal performance due to the inability to capture important pair-wise patterns such as common neighbors (Zhang and Chen, ; Zhang et al., ; Liang et al., ). Subsequent research has focused on infusing various forms of inductive biases to retrieve intricate pair-wise relationships. For instance, SEAL (Zhang and Chen, ), Neo-GNN (Yun et al., ), and NCN (Wang et al., ) have integrated neighbor-overlapping information into their design. BUDDY (Chamberlain et al., ) and NBFNet (Zhu et al., ) have concentrated on extracting higher-order structural information. Additionally, Mao et al. (); Li et al. () have contributed to a more unified framework encompassing different heuristics.

## 3 Preliminaries

###### Definition 3.1 .

(Temporal Graph) Temporal graph can be typically categorized into two kinds, discrete-time (DTDG) and continuous-time (CTDG) dynamic graph. While DTDG can be represented as a special sequence of graph snapshots in the form of $\mathcal{G}=\{(\mathcal{G}_{1},t_{1}),(\mathcal{G}_{2},t_{2}),\cdots,(\mathcal
{G}_{N},t_{N})\}$, it can always be transformed into its corresponding form in CTDG. So here we mainly focus on continuous time temporal graph.
We usually represent a CTDG as a sequence of interaction events: $\mathcal{G}=\{(u_{1},v_{1},t_{1}),(u_{2},v_{2},t_{2}),\cdots,(u_{n},v_{n},t_{n
})\}$, where $u,v$ stand for source and destination nodes and $\{t_{i}\}$ are chronologically non-decreasing.
We use $\mathcal{V}$ to denote the entire node set, and $\mathcal{E}$ the entire edge set. Note that each node or edge can be attributed, that is, there may be node feature $x_{u}$ for $u$ or edge feature $e_{u,v}^{t}$ attached to the event $(u,v,t)$.

###### Definition 3.2 .

(Problem Formulation) Given the events before time $t^{*}$, i.e. $\{(u,v,t)\ |\ \forall\ t<t^{*}\}$, a link prediction task is to predict whether two specified node $u^{*}$ and $v^{*}$ are connected at time $t^{*}$.

###### Definition 3.3 .

(Temporal Neighborhood) Given the center node $u$, the $k$-hop temporal neighbor set $(k\geq 0)$ before time $t$ is defined as $N_{k}^{t}(u)=\{v\ |\ \text{SPD}^{t}(u,v)=k\}$, where $\text{SPD}^{t}(u,v)$ refers to the shortest path distance using edges before time $t$. Then the $k$-hop common neighbors between node $u$ and $v$ are defined as $\text{CN}_{k}^{t}(u,v)=\mathop{\cup}\limits_{2(k-1)<k_{1}+k_{2}\leq 2k,k_{1},k
_{2}\leq k}(N_{k_{1}}^{t}(u)\cap N_{k_{2}}^{t}(v))$, i.e., all nodes on at least one $2k$-distance path between $u,v$.
Note that for $k=0$, we define the 0 0-hop common neighbor of $u$ and $v$ as $\text{CN}_{0}^{t}(u,v)=\{u,v\}$ if there exists at least one edge between $u$ and $v$ before time $t$, and $\emptyset$ otherwise. Finally, the $K$-hop temporal neighborhood is defined as $\mathop{\cup}\limits_{k=0}^{K}N_{k}^{t}(u)$.

###### Definition 3.1 .

###### Definition 3.2 .

###### Definition 3.3 .

## 4 Methodology

In this section, we introduce our Temporal Neural Common Neighbor (TNCN) model. TNCN comprises several key modules: the Memory Module, the Temporal CN Extractor, and the NCN-based Prediction Head. Special attention is given to the Temporal CN Extractor, designed to efficiently extract temporal neighboring structures and obtain multi-hop common neighbor information. The pipeline of TNCN is illustrated in Figure 2.

Figure: Figure 2: Pipeline of TNCN. TNCN operates through a sequential update and prediction framework that processes successive batches of messages. During the update phase, TNCN updates the neighbor dictionary and the node memory representations. In the prediction phase, the model retrieves neighbors to identify common neighbors, thereafter leveraging the representations of the target nodes and their common neighbors for prediction.
Refer to caption: x4.png

### 4.1 Memory Module

The memory module stores node memory representations up to time $t$. When a new event occurs, the memory of the source and destination nodes is updated with the message produced by the event. The computation can generally be represented by the following formulas:

$$ $\displaystyle msg_{src}^{t}(u,v)=\textit{msgfunc}_{src}(e^{t}_{u,v}),$ $\displaystyle msg_{dst}^{t}(u,v)=\textit{msgfunc}_{dst}(e^{t}_{u,v}).$ (1) $\displaystyle mem^{t}_{u}=\textit{upd}_{src}(mem^{t-}_{u},msg_{src}^{t}(u,v)),$ $\displaystyle mem^{t}_{v}=\textit{upd}_{dst}(mem^{t-}_{v},msg_{dst}^{t}(u,v)),$ $$

where $mem^{t-}_{u}$ stands for the embedding of node $u$ before time $t$. Here, msgfunc is a learnable function, such as a linear projection or a simple identity function. Note that for different edge directions, i.e., from source to destination and vice versa, the msgfunc and updfunc can be learned separately. The memory module aids the model in managing both long-term and short-term dependencies, thereby reducing the likelihood of forgetting. During training and inference, node memory evolves dynamically as events occur. Updates to this module reflect the dynamic nature of the temporal graph.

### 4.2 Temporal CN Extractor

Our Temporal CN Extractor can efficiently perform multi-hop common neighbor extraction and aggregate their neural embeddings.

#### Extended Common Neighbor.

The definition of multi-hop common neighbors (CN) is given in Definition 3.3, extending the traditional 1-hop CN (i.e., nodes on 2-paths between $u$ and $v$) to $k$-hop CN (nodes on $2k$-paths between $u$ and $v$). Additionally, we define zero-hop CN to be $u$ and $v$ themselves, i.e., if there is at least one previous event between node $u$ and node $v$, then $u$ and $v$ are considered each other’s 0-hop common neighbors. The 0-hop CN not only records the historical interactions between two nodes, but also reveals the frequency of their interactions.

#### Efficient CN Extractor.

The CN Extractor is a crucial component of the TNCN model, contributing significantly to its high performance. It can efficiently gather pertinent information about a given center node and extract multi-hop common neighbors for a source-destination pair.

For each relevant node $u$, the extractor stores its historical interactions with other nodes as both source and destination. After a batch of events is processed by the model, the storage is updated with the latest interactions. This allows us to maintain a record of all historical interactions up to a certain timestamp, effectively constructing a dynamic lookup dictionary for fast retrieval during subsequent inference. To conserve memory, we can opt to save only the most recent events and relevant nodes.

During the inference stage, TNCN extracts temporal neighborhood information, i.e., historical interactions related to the query node batch. This information is organized as a Sparse Tensor, on which we perform self-multiplication to generate high-order adjacency connectivity. We use sparse tensor operations to obtain multi-hop common neighbors (CNs) and their embeddings, separating CNs from different hops. To extract the 0-hop common neighbors mentioned above in a unified way, we introduce an additional self-loop for each related node. This operation allows us to use the same tensor multiplications to obtain 0-hop CNs.

The utilization of Multi-hop Common Neighbors significantly boosts TNCN’s performance, resulting in higher scores in temporal link prediction tasks. Furthermore, by employing sparse tensors, our model achieves substantial reductions in both storage requirements and computational complexity, thereby decreasing time consumption and enhancing efficiency.

### 4.3 NCN-based Prediction Head

For source and destination nodes, we perform an element-wise product:

$$ $X^{t}_{u,v}=emb_{u}^{t}\otimes emb_{v}^{t}.$ (2) $$

For multi-hop CN nodes, we aggregate their embeddings in each hop with sum pooling:

$$ $NCN_{k}(u,v)=\mathop{\oplus}\limits_{w\in\text{CN}^{t}_{k}(u,v)}emb_{w}^{t}.$ (3) $$

These embeddings are then concatenated as the final pair-wise representation:

$$ $\displaystyle repr(u,v)$ $\displaystyle=[X^{t}_{u,v}\ ||\ (\mathop{||}\limits_{k=0}^{K})NCN_{k}(u,v)].$ (4) $$

In the above, $\otimes$, $\oplus$, and $||$ stand for element-wise product, element-wise summation, and concatenation of vectors, respectively. The pair-wise representation $repr(u,v)$ for nodes $u$ and $v$ is fed to a projection head to output the final link prediction.

## 5 Efficiency and Effectiveness of TNCN

In this section, we explore the two principal benefits of TNCN: efficiency and effectiveness. These advantages are demonstrated through an analysis of two core components within the framework for temporal graph link prediction: graph representation learning and link prediction methods. We categorize graph representation learning modules into two types: memory-based and $k$-hop-subgraph-based, according to the temporal scope of evolved events. Memory-based modules exhibit superior time complexity while maintaining good expressiveness in some situations, striking a balance between efficiency and performance. Furthermore, we highlight the deficiencies of existing link prediction methods on temporal graph learning and introduce the extended common neighbor approach. This method serves as a complementary addition for learning pair-wise representations while eliminating the necessity for message passing on entire graphs. Both our graph representation learning and link prediction techniques are designed with a unified optimization objective: to avoid message passing on entire subgraphs in favor of non-repetitive operations, culminating in a cohesive solution that is both efficient and effective.

### 5.1 Graph Representation Learning

Graph representation learning aims to develop an embedding function, denoted as $Emb$, which learns an embedding for each node encoding its structural and feature information within the graph. Specifically, given a new event represented as $(u,v,t)$, the function $Emb$ leverages prior events to generate meaningful embeddings. Approaches in this domain diverge in their handling of temporal dynamics; some opt to maintain a dynamic embedding for each node that is incrementally updated with each new event, while others choose to recalculate node embeddings by considering the entire historical context of events, thereby providing a more comprehensive reflection of past interactions. We classify these methodologies into two distinct types based on their operational mechanisms.

###### Definition 5.1 .

Memory-based approach. Given a new event $(u,v,t)$, if $Emb$ conforms to the following form, the method is referred to as a memory-based approach.

$$ $\displaystyle Emb(u,t)=f_{\textit{emb}}(Mem(u,t^{\prime})),~{}$ $\displaystyle Mem(u,t)=f_{\textit{mem}}(Mem(u,t^{\prime}),Mem(v,t^{\prime}),e_ {u,v}^{t},t-t^{\prime}),$ (5) $\displaystyle Emb(v,t)=f_{\textit{emb}}(Mem(v,t^{\prime})),~{}$ $\displaystyle Mem(v,t)=f_{\textit{mem}}(Mem(v,t^{\prime}),Mem(u,t^{\prime}),e_ {v,u}^{t},t-t^{\prime}),$ $$

where $f_{\textit{emb}}$ and $f_{\textit{mem}}$ are two learnable functions.

###### Definition 5.2 .

$k$-hop-subgraph-based approach. Given a new event $(u,v,t)$, if $Emb$ conforms to the following form, the method is defined as a subgraph-based approach.

$$ $Emb(u,t)=f_{\textit{emb}}(\mathcal{G}_{u,<t}^{k}),~{}~{}~{}~{}Emb(v,t)=f_{ \textit{emb}}(\mathcal{G}_{v,<t}^{k}),$ (6) $$

where $\mathcal{G}_{u,<t}^{k}$ is a subgraph induced from $\mathcal{G}$ by node $u$’s $k$-hop temporal neighborhood $\mathop{\cup}\limits_{k=0}^{K}N_{k}^{t}(u)$, containing only the edges (events) with time $t^{\prime}<t$, and $f_{\textit{emb}}$ is a learnable function.

###### Definition 5.1 .

###### Definition 5.2 .

#### Effectiveness.

The analysis begins by assessing the effectiveness of the two paradigms. To do so, we first introduce the concept of $k$-hop event (LOV´ASZ et al., ).

###### Definition 5.3 .

($k$-hop event & monotone $k$-hop event)
A $k$-hop event is a sequence of consecutive edges $\{(u_{i},u_{i+1},t_{u_{i},u_{i+1}})\mid i\in\{0,\ldots,k-1\},k\geq 1\}$ connecting the initial node $u_{0}$ to the final node $u_{k}$. For example, $\{(u,x,t^{\prime}),(x,v,t)\}$ is a $2$-hop event. In the case where $k=1$, the $k$-hop event reduces to a single interaction $(u,v,t)$. A monotone $k$-hop event is a $k$-hop event in which the sequence of timestamps $\{t_{u_{i},u_{i+1}}\mid i\in\{0,\ldots,k-1\},k\geq 1\}$ is strictly monotonically increasing.

Then, we analyze the expressiveness of the two approaches in terms of encoding $k$-hop event.

###### Theorem 5.4 .

(Ability to encode $k$-hop events). Given a $k$-hop event $\{(u_{i},u_{i+1},t_{u_{i},u_{i+1}})\mid i\in\{0,\ldots,k-1\},k\geq 1\}$, if the node embedding of $u_{0}$ at time $t_{u_{0},u_{1}}$ can be reversely recovered from the encoding $\textit{Enc}(\{(u_{i},u_{i+1},t_{u_{i},u_{i+1}})\mid i\in\{0,\ldots,k-1\},k
\geq 1\})$, then we say the encoding function Enc is capable of encoding the $k$-hop event. The following results outline the encoding capabilities of different learning paradigms:

- •
Memory-based approaches can encode any $k$-hop events with $k=1$.
- •
Memory-based approaches can encode any monotone $k$-hop events with arbitrary $k$.
- •
$k$-hop-subgraph-based approaches can encode any $k^{\prime}$-hop events with $k^{\prime}\leq k$.

From Theorem 5.4, we can conclude that 1) memory-based approaches have superior expressiveness in encoding $k$-hop events compared to 1-hop-subgraph-based approaches, 2) memory-based approaches have superior expressiveness in encoding monotone $k$-hop events than $k^{\prime}$-hop-subgraph-based approaches when $k^{\prime}<k$, and 3) $k$-hop-subgraph-based approaches are not less expressive than memory-based approaches when $k$ is large enough.

While the memory-based approach does not consistently rival the expressiveness of the $k$-hop-subgraph paradigm, it possesses advantages in monotone events and long-history scenarios (where $k$-hop subgraphs would be unaffordable to extract).

###### Definition 5.3 .

###### Theorem 5.4 .

#### Efficiency.

We then turn our attention to the efficiency of the two approaches. A pivotal factor is the frequency with which individual events are incorporated into computations. In memory-based approaches, each event is utilized a single time for learning, immediately following its associated prediction. Conversely, in the $k$-hop-subgraph-based method, an event may be employed multiple times, as it is revisited in different nodes’ temporal neighborhood and repeated been processed within each subgraph’s encoding (such as message passing) process. This discrepancy leads to divergent cumulative frequencies of event utilization throughout the learning process and results in the huge efficiency advantage of memory-based methods. We formalize this observation in the following:

###### Theorem 5.5 .

(Learning method time complexity). Denote the time complexity of a learning method as a function of the total number of events processed during training. For a given graph $\mathcal{G}$ with the number of nodes designated as $|\mathcal{N}|$ and the number of edges as $|\mathcal{E}|$, the following assertions hold:

- •
For memory-based approaches, the time complexity is $\Theta\left(|\mathcal{E}|\right)$.
- •
For $k$-hop-subgraph-based approaches with $k=1$, the lower-bound time complexity is $\Omega\left(\frac{|\mathcal{E}|^{2}}{|\mathcal{N}|}\right)$, and the upper-bound time complexity is $\mathcal{O}\left(\frac{|\mathcal{E}|^{2}}{|\mathcal{N}|}+|\mathcal{E}||
\mathcal{N}|\right)$.
- •
For $k$-hop-subgraph-based approaches with $k=2$, the upper-bound time complexity is $\mathcal{O}\left(\left(\frac{|\mathcal{E}|^{2}}{|\mathcal{N}|}+|\mathcal{E}||
\mathcal{N}|\right)^{\frac{3}{2}}\right)$.

Following Theorem 5.5, it becomes evident that the computational overhead incurred by a memory-based method is significantly lower than that of a $k$-hop-subgraph-based method, particularly as the value of $k$ increases. These results highlight the advantages of memory-based methods in mitigating the computational efficiency challenges associated with large-scale temporal graphs.

###### Theorem 5.5 .

### 5.2 Link Prediction Technique

With the node embeddings obtained from the graph representation learning step, link prediction techniques involve aggregating the node embeddings in some way into link representations for link prediction. Most previous methods simply concatenate the source and destination node embeddings as the link representation $Emb(u,t)\mathop{||}Emb(v,t)$, losing a great amount of pairwise features (as illustrated in Figure 1). In order to use labeling trick, an alternative approach involves extracting a separate subgraph for each link to predict, which leads to good results but also significantly increases the complexity. TNCN, on the contrary, utilizes neural common neighbors as a decoupled and flexible solution. This approach can be seamlessly integrated into existing memory-based methods with minimal computational overhead, while retaining important structural information for link prediction.

#### Effectiveness.

In the following, we first demonstrate the effectiveness of TNCN by showing that it can capture three important pairwise features commonly used as effective link prediction heuristics, namely Common Neighbors (CN), Resource Allocation (RA), and Adamic-Adar (AA) (Newman, ; Adamic and Adar, ; Zhou et al., ), borrowing from NCN (Wang et al., ).

###### Theorem 5.6 .

TNCN is strictly more expressive than CN, RA, and AA.

Essentially, TNCN uses node memory to substitute the constant or degree-based values in the three features, and the memory update scheme is sufficient to learn such values. In comparison, an approach that merely concatenates node-wise representations proves inadequate in capturing these heuristics.

###### Theorem 5.6 .

#### Efficiency.

We then address the efficiency of TNCN. The computation of TNCN can be divided into two primary components: the generation of neighbor nodes’ embeddings and the execution of common neighbor lookups. Concerning the former, the memory-based approach intrinsically tracks all node embeddings, thus obviating the need for re-computation. As for the latter, we implement a fast common neighbor search algorithm by leveraging a sparse matrix structure that supports batch operations. Collectively, these factors contribute to the minimal additional overhead of TNCN compared to memory-based methods.

## 6 Experiments

This section assesses TNCN’s effectiveness and efficiency by answering the following questions:

Q1: What is the performance of TNCN compared with state-of-the-art baselines?
Q2: What is the computational efficiency of TNCN in terms of time consumption?
Q3: Do the extended common neighbors bring benefits to original common neighbors?

### 6.1 Experimental Settings

#### Datasets

We evaluate our model on five large-scale real-world datasets for temporal link prediction from the Temporal Graph Benchmark (Huang et al., ). These datasets span several distinct fields: co-editing network on Wikipedia, Amazon product review network, cryptocurrency transactions, directed reply network of Reddit, and crowdsourced international flight network. They vary in scales and time spans. Additional details about the datasets are provided in Appendix A. We set the evaluation metric as Mean Reciprocal Rank (MRR) consistent with the TGB official leaderboard.

#### Baselines

We systematically evaluate our proposed model against a diverse set of baselines known for their strong capacity to represent temporal graph dynamics. These include: a heuristic algorithm Edgebank (Yu et al., ), memory-based models DyRep (Trivedi et al., ) and TGN (Rossi et al., ) that obviate the need for frequent temporal subgraph sampling, and GraphMixer (Cong et al., ) which primarily employs an MLP-mixer. Additionally, we include various graph-based models such as CAWN (Wang et al., ), NAT (Luo and Li, ), DyGFormer (Yu et al., ), TGAT (Xu et al., ), and TCL (Wang et al., ), which learn from neighborhood structure information. To reconcile the trade-off between model efficacy and computational overhead, we evaluate two TNCN variants: the “TNCN-standard” (TNCN(S)), which incorporates up to 1-hop common neighbor information, and the more complex “TNCN-large” (TNCN(L)), which uses up to 2-hop common neighbors.

### 6.2 Experimental Results

**Table 1: Test Performance of different models under MRR metric. The top three are emphasized by red, blue and black fonts. ‘NA’ denotes scenarios where a specific method was either not applied to the dataset or was unable to complete the validation and testing phases within a reasonable timeframe.**
| Model | Wiki | Review | Coin | Comment | Flight |
| --- | --- | --- | --- | --- | --- |
| TGN | 0.528 | 0.387 | 0.737 | 0.622 | 0.705 |
| DyGformer | 0.798 | 0.224 | 0.752 | 0.670 | NA |
| NAT | 0.749 | 0.341 | NA | NA | NA |
| CAWN | 0.711 | 0.193 | NA | NA | NA |
| Graphmixer | 0.118 | 0.521 | NA | NA | NA |
| TGAT | 0.141 | 0.355 | NA | NA | NA |
| TCL | 0.207 | 0.193 | NA | NA | NA |
| DyRep | 0.050 | 0.220 | 0.452 | 0.289 | 0.556 |
| Edgebank(tw) | 0.571 | 0.025 | 0.580 | 0.149 | 0.387 |
| Edgebank(un) | 0.495 | 0.023 | 0.359 | 0.129 | 0.167 |
| TNCN-standard | 0.720 | 0.298 | 0.739 | 0.692 | 0.803 |
| TNCN-large | 0.717 | 0.317 | 0.764 | 0.662 | NA |

#### Reply to Q1: TNCN possesses remarkable performance.

We conducted comprehensive evaluations of prevailing methods on the TGB. The main results are summarized in Table 1. It is evident from the table that TNCN attains new SOTA performance on three out of five datasets. Additionally, TNCN demonstrates competitive results on the remaining two datasets. TNCN almost consistently surpasses memory-based models such as TGN and DyRep, which can be attributed to its utilization of supplementary structural information. Even in comparison to powerful graph-based models, including NAT and DyGFormer, TNCN still matches or exceeds their performance, underscoring the effectiveness of its integration of node memory and pair-wise features. The only dataset where TNCN exhibits relatively poorer performance is the Review dataset. This can be ascribed to the dataset’s predominant reliance on feature embedding and its high "surprise" metric, wherein prior events have a diminished correlation with subsequent events, potentially reducing the impact of CNs.

#### Reply to Q2: TNCN shows great scalability on large datasets.

Figure: (a) tgbl-wiki (log scale)
Refer to caption: x5.png

To evaluate computational efficiency, we collected the time consumption when applying all baselines to the Wiki and Review datasets, as depicted in Figure 3. Compared with memory-based methods, TNCN exhibits a comparable order of magnitude in terms of time consumption. However, when benchmarked against graph-based models, TNCN demonstrates a substantial acceleration, achieving approximately 1.9 to 4.7 times speedup during the training phase and a 2.1 to 6.4 times increase in inference speed. Notably, the scalability concerns become even more evident as the size of the dataset expands; several graph-based models cannot complete the validation and testing processes within a reasonable time budget. The primary factors contributing to TNCN’s efficiency are the synergistic, time-efficient design of its two core components and the implementation of the Efficient CN Extractor that facilitates batch operations through parallel processing.

#### Reply to Q3: Extended CN brings improvements.

**Table 2: Test performance of TGN and TNCN with different ranges of common neighbors**
| Model | Wiki | Review | Coin | Comment |
| --- | --- | --- | --- | --- |
| TGN | 0.528 | 0.387 | 0.737 | 0.622 |
| TNCN-1-hop-CN | 0.621 | 0.374 | 0.737 | 0.641 |
| TNCN-0$\sim$1-hop-CN | 0.720 | 0.298 | 0.739 | 0.692 |
| TNCN-0$\sim$2-hop-CN | 0.717 | 0.317 | 0.764 | 0.662 |

To elucidate the benefits of extended CN, we conducted an ablation study on the hop range of common neighbors. The results are shown in Table 2. The conventional NCN methodology considers only 1-hop CN. However, this approach may not be universally applicable across all temporal network topologies. For instance, bipartite graphs lack such 1-hop CN in their structure, necessitating the consideration of 2-hop CN. Additionally, memory-based methodologies may omit a notable aspect: they generally find it difficult to quantify the frequency of interactions between a given pair of nodes, which brings the need for 0-hop CN.

To address these limitations, we have expanded the original 1-hop CN to 0$\sim$k-hop CN. Table 2 presents the model’s performance under different hops of CN. The results indicate that TNCN utilizing 0$\sim$1-hop CN markedly surpasses the 1-hop CN on various datasets. This enhancement underscores the significance of the introduced 0-hop CN to our architecture. Nevertheless, the inclusion of 2-hop CN yields mixed results across datasets.

## 7 Conclusion and Limitation

We propose TNCN for temporal graph link prediction, which employs a temporal common neighbor extractor combined with a memory-based node representation learning module. TNCN has achieved new state-of-the-art results on several real-world datasets while maintaining excellent scalability to handle large-scale temporal graphs.

However, based on our observation of TNCN’s performance on the TGBL-Review dataset, there are some limitations in our model. Specifically, datasets with high surprise values, such as the Review dataset, tend to make it more challenging for TNCN to accurately predict the probability of future connections. This indicates that while TNCN performs well overall, it may struggle with datasets that exhibit high variability or unexpected patterns. Further research is needed to address these challenges and improve the model’s robustness in such scenarios.

## Appendix A Datasets

Table 3 shows some detailed datasets statistics of TGB and 4 shows several temporal graph datasets commonly used by previous work. Through the two tables we can observe that TGB official datasets possess temporal graphs with larger scale to 10 million, 10 times surpassing the largest previous datasets such as LastFM, Flight, Contact. With the aim to examine our TNCN model’s efficiency, we choose the increasingly accepted datasets TGB.

**Table 3: TGB Dataset Statistics**
| Dataset | Domain | Nodes | Edges | Steps | Surprise | Edge Properties |
| --- | --- | --- | --- | --- | --- | --- |
| tgbl-wiki | interact | 9,227 | 157,474 | 152,757 | 0.108 | W: $\times$, Di: ✓, A: ✓ |
| tgbl-review | rating | 352,637 | 4,873,540 | 6,865 | 0.987 | W: ✓, Di: ✓, A: $\times$ |
| tgbl-coin | transact | 638,486 | 22,809,486 | 1,295,720 | 0.120 | W: ✓, Di: ✓, A: $\times$ |
| tgbl-comment | social | 994,790 | 44,314,507 | 30,998,030 | 0.823 | W: ✓, Di: ✓, A: ✓ |
| tgbl-flight | traffic | 18143 | 67,169,570 | 1,385 | 0.024 | W: $\times$, Di: ✓, A: ✓ |

**Table 4: Previous Dataset Statistics**
| Datasets | Domains | Nodes | Links | NL Feat | Bipartite | Duration | Unique Steps | Time Granularity |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Wikipedia | Social | 9,227 | 157,474 | – & 172 | $\checkmark$ | 1 month | 152,757 | Unix timestamps |
| Reddit | Social | 10,984 | 672,447 | – & 172 | $\checkmark$ | 1 month | 669,065 | Unix timestamps |
| MOOC | Interaction | 7,144 | 411,749 | – & 4 | $\checkmark$ | 17 months | 345,600 | Unix timestamps |
| LastFM | Interaction | 1,980 | 1,293,103 | – & – | $\checkmark$ | 1 month | 1,283,614 | Unix timestamps |
| Enron | Social | 184 | 125,235 | – & – | $\times$ | 3 years | 22,632 | Unix timestamps |
| UCI | Social | 1,899 | 59,835 | – & – | $\times$ | 196 days | 58,911 | Unix timestamps |
| Flights | Transport | 13,169 | 1,927,145 | – & 1 | $\times$ | 4 months | 122 | days |
| UN Trade | Economics | 255 | 507,497 | – & 1 | $\times$ | 32 years | 32 | years |
| Contact | Proximity | 692 | 2,426,279 | – & 1 | $\times$ | 1 month | 8,064 | 5 minutes |

## Appendix B TNCN Model Configuration

#### Network Choice

In our experiment, the changeable neural networks are chosen as follows:

In Memory Module, we choose $Identity$ as msgfunc and GRU as $upd$. In inference stage we process node memory with Graph Attention Embedding to get the temporal representation. As for Prediction Head, we finally choose $Linear$ as the $repr$ function.

#### Hyper-parameter

Several detailed hyper-parameters for TNCN are shown in table 5, which can help researchers to reproduce the experiment performance as reported in this paper. Additionally, we set $mem_dim$, $emb_dim$, $time_dim$ 100, 100, 100 respectively.

**Table 5: Some Experiment Hyper-parameters**
| Dataset | num_neighbors | num_epoch | patience |
| --- | --- | --- | --- |
| Wiki | 10 | 20 | 5 |
| Review | 10 | 5 | 2 |
| Coin | 10 | 3 | 2 |
| Comment | 10 | 3 | 1 |

## Appendix C Proofs

In this section, we give proofs on theorems 5.4, 5.5 and 5.6.

We commence with a restatement of Theorem 5.4 for clarity:

###### Theorem C.1 .

(Ability of encoding $k$-hop event). Given a $k$-hop event $\{(u_{i},u_{i+1},t_{u_{i},u_{i+1}})\mid i\in\{0,\ldots,k-1\},k\geq 1\}$. If the node embedding of $u_{0}$ at time $t_{u_{0},u_{1}}$, can be formally derived by the encoding function $\textit{Enc}(\{(u_{i},u_{i+1},t_{u_{i},u_{i+1}})\mid i\in\{0,\ldots,k-1\},k
\geq 1\})$, then the learning method is considered capable of encoding the $k$-hop event. The following outline the encoding capabilities of different learning schemes:

- •
Memory-based approach can encode any $k$-hop events with $k=1$.
- •
Memory-based approach can encode any monotone $k$-hop events with arbitrary $k$.
- •
$k$-hop-subgraph-based approach can encode any $k^{\prime}$-hop events with $k^{\prime}\leq k$

###### Proof.

In the following analysis, we establish the encoding efficacy of the memory-based approach. Consider a $k$-hop event with the simplifying assumption that $k=1$, which reduces the event to the tuple ${(u_{0},u_{1},t_{u_{0},u_{1}})}$. By adhering to the predefined schematics of the memory-based methodology, the memory state $Mem(u_{0},t_{u_{0},u_{1}})$ is updated via the function $f_{\textit{mem}}$ such that $Mem(u_{0},t_{u_{0},u_{1}})=f_{\textit{mem}}(Mem(u_{0},t\textquoteright),e^{t_{
u_{0},u_{1}}}_{u_{0},u_{1}},t_{u_{0},u_{1}}-t\textquoteright)$. Let us denote the encoding function as $Enc=f_{\textit{mem}}(Mem(u_{0},t\textquoteright),\ldots)$. It is our intention to demonstrate that this memory-based framework is capable of encoding any $k$-hop event for $k=1$.

We consider the encoding of an arbitrary monotonically increasing $k$-hop temporal event sequence within a memory-based approach. The induction principle is applied to demonstrate the capability of this approach. For the base case, $k=1$, the encoding has been shown to be feasible. Now, assume the proposition holds for a $k\textquoteright$-hop event; that is, any $k\textquoteright$-hop temporal sequence of monotonically increasing events can be encoded using a memory-based approach. This assumption implies that there exists an embedding function such that

$$ $Emb(u_{0},t_{u_{0},u_{1}})=\textit{Enc}({(u_{i},u_{i+1},t_{u_{i},u_{i+1}})\mid i \in{0,\ldots,k\textquoteright-1}}),$ (7) $$

for all event sequences with $k\textquoteright$ hops, where $k\textquoteright\geq 1$.
Given an arbitrary $k\textquoteright+1$-hop event, which can be partitioned into an initial event $(u_{0},u_{1},t_{u_{0},u_{1}})$ and a subsequent $k\textquoteright$-hop sequence. The existence of an encoding function for the $k\textquoteright$-hop sequence assures that

$$ $\displaystyle Emb(u_{0},t_{u_{0},u_{1}})$ $\displaystyle=f_{\textit{emb}}(Mem(u_{0},t_{u_{1},u_{2}}))$ (8) $\displaystyle=f_{\textit{emb}}(f_{\textit{mem}}(Mem(u_{0},t_{u_{1},u_{2}}),Mem (u_{1},t_{u_{1},u_{2}}),e_{u_{0},u_{1}}^{t_{u_{0},u_{1}}},t_{u_{0},u_{1}}-t_{u _{1},u_{2}}),$ $\displaystyle Mem(u_{1},t_{u_{1},u_{2}})$ $\displaystyle=f_{\textit{emb}}^{-1}(Emb(u_{1},t_{u_{1},u_{2}}))$ $\displaystyle=f_{\textit{emb}}^{-1}(\textit{Enc}(\{(u_{i},u_{i+1},t_{u_{i},u_{ i+1}})\mid i\in\{1,\ldots,k^{\prime}\},k^{\prime}\geq 1\})$ $$

Subsequently, it is demonstrated that $Emb(u_{0},t_{u_{0},u_{1}})$ provides an encoding for both the initial event and the $k\textquoteright$-hop sequence, thereby affirming its efficacy in encoding the entire $k\textquoteright+1$-hop event. This concludes the inductive step and substantiates the inductive argument.

We consider a $k$-hop-subgraph-based approach for our analysis. It is evident that a $k$-hop subgraph encompasses any $k\textquoteright$-hop events, where $k\textquoteright\leq k$. Furthermore, the aggregation methodology assimilates all nodes contained within the subgraph. Collectively, these observations substantiate the theorem in question.

∎

We commence with a restatement of Theorem 5.5 for clarity:

###### Theorem C.2 .

(Learning method time complexity). Denote the time complexity of a learning method as a function of the total number of events processed during training. For a given graph ${\mathcal{G}}$ with the number of nodes designated as $|{\mathcal{N}}|$ and the number of edges as $|{\mathcal{E}}|$, the following assertions hold:

- •
For the memory-based approach, the time complexity is $\Theta\left(|{\mathcal{E}}|\right)$.
- •
For $k$-hop-subgraph-based with $k=1$, the lower-bound time complexity is $\Omega\left(\frac{|{\mathcal{E}}|^{2}}{|{\mathcal{N}}|}\right)$, and the upper-bound time complexity is ${\mathcal{O}}\left(\frac{|{\mathcal{E}}|^{2}}{|{\mathcal{N}}|}+|{\mathcal{E}}|
|{\mathcal{N}}|\right)$
- •
For $k$-hop-subgraph-based with $k=2$, the upper-bound time complexity is ${\mathcal{O}}\left((\frac{|{\mathcal{E}}|^{2}}{|{\mathcal{N}}|}+|{\mathcal{E}}
||{\mathcal{N}}|)^{\frac{3}{2}}\right)$

###### Proof.

In the proposed theorem, the time complexity is denoted as the aggregate quantity of events processed throughout the training phase. The objective herein is to ascertain the precise count of such utilized events.

In the context of the memory-based methodology, it is evident that each event is utilized a singular time. Consequently, the cumulative number of events is expressed as $|\mathcal{E}|$, which infers that the time complexity adheres to the order of $\Theta\left(|\mathcal{E}|\right)$.

In the context of $k$-hop-subgraph-based algorithms wherein $k=1$, an event $(u,v,t)$ is exploited once for every incident event within the neighborhood of vertices $u$ or $v$. Without loss of generality, we focus on all events within the $1$-hop-subgraph of vertex $u$. The aggregate count of events processed is given by $\sum_{i=1}^{d(u)}i=\Theta\left(d(u)^{2}\right)$, where $d(u)$ denotes the degree of vertex $u$. Consequently, the computational complexity is fundamentally proportional to $\sum_{u\in{\mathcal{N}}}d(u)^{2}$. Drawing on the results of de Caen [], the lower bound on the time complexity is established as $\Omega\left(\frac{|{\mathcal{E}}|^{2}}{|{\mathcal{N}}|}\right)$, whereas the upper bound is determined as ${\mathcal{O}}\left(\frac{|{\mathcal{E}}|^{2}}{|{\mathcal{N}}|}+|{\mathcal{E}}|
|{\mathcal{N}}|\right)$

In the context of $k$-hop-subgraph-based algorithms wherein $k=2$,, we adopt similar strategy where each event$(u,v,t)$ will only be utilized once another event within the subgraph of $u$ or $v$ is firstly considered. The total number of events can be formulated as $\sum_{u\in{\mathcal{N}}}d(u)\sum_{v\in{\mathcal{N}}_{u}}\sum_{w\in{\mathcal{N}
}_{v}}d(w)$. Replacing $d(u)$ as $X_{i}$, $\sum_{v\in{\mathcal{N}}_{u}}\sum_{w\in{\mathcal{N}}_{v}}$ as $Y_{i}$, we reformulated is as $\sum_{i\in|{\mathcal{N}}|}X_{i}Y_{i}$, satisfying $\sum_{i\in|{\mathcal{N}}|}X_{i}^{2}=\sum_{u\in{\mathcal{N}}}d(u)^{2}$ and $\sum_{i\in|{\mathcal{N}}|}Y_{i}^{2}=\sum_{u\in{\mathcal{N}}}d(u)^{4}$. Following Cauchy inequality and conclusions of $\sum_{u\in{\mathcal{N}}}d(u)^{2}$, we got the the upper-bound time complexity is ${\mathcal{O}}\left((\frac{|{\mathcal{E}}|^{2}}{|{\mathcal{N}}|}+|{\mathcal{E}}
||{\mathcal{N}}|)^{\frac{3}{2}}\right)$
∎

We commence with a restatement of Theorem 5.6 for clarity:

###### Theorem C.3 .

TNCN is strictly more expressive than CN, RA, and AA.

We first give definitions of these structural features under temporal settings. Given two nodes $u$ and $v$, the structural features before time $t$ are defined as follows:

$$ $\displaystyle CN(u,v,t)$ $\displaystyle=\sum_{w\in N_{1}^{t}(u)\cap N_{1}^{t}(v)}1,$ (9) $\displaystyle RA(u,v,t)$ $\displaystyle=\sum_{w\in N_{1}^{t}(u)\cap N_{1}^{t}(v)}\frac{1}{d(w)},$ $\displaystyle AA(u,v,t)$ $\displaystyle=\sum_{w\in N_{1}^{t}(u)\cap N_{1}^{t}(v)}\frac{1}{\log d(w)}$ $$

Given a node $u$, the degree of node $u$ is the number of events $e$ with an endpoint at node $u$. Without loss of generality (WLOG), we consider node $u$ as the source node, and the events are $\{(u,v_{i},t_{i})\mid i\in\{0,\ldots,k-1\},k\geq 1\}$. Each time a new event is given, the embedding of node $u$ is updated by

$$ $mem_{u}^{t_{i}}=\textit{upd}_{src}(mem_{u}^{t_{i-1}},\textit{msgfunc}_{src}(e_ {u,v_{i}}^{t_{i}})).$ (10) $$

With the MPNN universal approximation theorem, msgfunc can be a constant function, and $\textit{upd}_{src}$ can be an addition function. Thus,

$$ $mem_{u}^{t_{k-1}}=d(u).$ (11) $$

Then the embedding can learn arbitrary functions of node degrees, i.e.,

$$ $emb_{u}^{t}=f(d(u)).$ (12) $$

Thus, the neural common neighbor $TNCN_{1}(u,v)=\mathop{\oplus}_{w\in N_{1}^{t}(u)\cap N_{1}^{t}(v)}emb_{w}^{t}$ can express Equation 9.

Extending to situations where the common neighbor node has some features we want to learn, the traditional CN, RA, and AA cannot accommodate this. However, our TNCN can express these features, demonstrating that TNCN is strictly more expressive than CN, RA, and AA.

###### Theorem C.1 .

###### Proof.

###### Theorem C.2 .

###### Proof.

###### Theorem C.3 .

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 6
presentation: 3
questions: 1. High surprings values will degrade TNCN's performance. So will the model performance decrease monotonically as the surprise value increases? In other words, will TNCN have the best performance when the surprise value is the lowest?
2. Why is the result of TNCN-0∼2-hop-CN lower than TNCN-0∼1-hop-CN on the commen dataset in Table 2, which is different from the other three datasets?
soundness: 3
strengths: 1. The experiments is substantial and the result is good.  Comparing with 9 baseline models, TNCN performs best on three of the five selected datasets, which emphasizes its effectiveness.
2. The method section is clearly described using formulas. With clear definition and detailed formulas, the method is well-presented.
3. There are proofs on the theorems in appendix, which improves the professionalism of the paper.
summary: This work proposes TNCN, which is  a temporal version of NCN based on a memory-based backbone. Comprosing with three key parts: the memory module,the temporal CN extractor,,and the NCN-based prediction head, TNCN improves the performance in terms of efficiency and effectiveness. Comparing with a diverse set of baseline models, the experiments on five datasets demonstrate its outstanding performance.
weaknesses: 1. Since the process is relatively complicated, it is recommended to provide a pseudo code to make it easier for readers to understand.
2. I suggest that the experimental part be supplemented with an analysis of the hyperparameters, which can make the values of the hyperparameters more reasonable.

---

confidence: 4
contribution: 1
initial_rating: 3
presentation: 1
questions: 1. Could you clarify the main novelty of your memory-based module and its differentiation from TGN?
2. What is the specific metric used in Table 5? Understanding whether it's AUC or AP is essential for interpreting the results.
soundness: 2
strengths: - **Evaluation**: The proposed model is evaluated on established benchmarks, enhancing the reliability of the results.

- **Engineering**: The paper introduces an engineering approach to combine common neighbor (CN) techniques with memory-based methods, integrating these two modeling approaches.
summary: This paper proposes a method for link prediction on continuous-time dynamic graphs (CTDGs), aiming to unify two prominent model families: memory-based models and neighbor-based models. The authors introduce TNCN, demonstrating experimentally that it performs better in certain configurations and is more efficient than existing models in the literature.
weaknesses: **Presentation**: The abstract implies that common neighbor methods are primarily used in static graphs, overlooking their established role in dynamic graph modeling. Additionally, the motivation for combining memory-based and neighbor-based techniques is presented only briefly at the end of the introduction.

**Limited Novelty**: The proposed model's core components primarily consist of established techniques. For instance, the memory-based module closely resembles TGN, lacking additional innovations or a clear positioning relative to other memory-based approaches. Similarly, while TNCN incorporates common neighbor (CN) techniques with optimized computation, it employs multi-hop methods similar to those in models like CAWN, further limiting its novelty. 

**Theoretical Claims**: The paper presents familiar results as novel contributions, such as the $O(∣E∣)$ memory complexity for event aggregation, along with upper and lower bounds that are established in prior work (e.g., Caen, 1998). Presenting these as new theoretical results may be misleading.

The paper exhibits strong engineering but lacks clear new contributions. Theoretical results on memory complexity and specific experimental results are weak, with minimal performance gains in dynamic link prediction tasks. Given the limitations in presentation, contribution, and experimental validation, I recommend rejection.

**Experimental results**: While combining memory and neighbor-based methods is interesting, the observed performance gains are minimal, with certain results (e.g., in Table 5) showing limited improvement using unclear metrics (possibly AUC or AP).

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: Q1: In what ways does your approach build upon or differ from existing methods that also extract common neighbors in temporal graphs?

Q2: Can you clarify the importance of including static baselines in your experiments, and how their absence affects the interpretation of your results?

Q3: What specific case studies can you provide to illustrate the practical application and effectiveness of your proposed method?

Q4: Can you provide a detailed explanation of the notation used in your equations, particularly regarding $emb$ in Equation 2, and how this impacts the overall methodology?

Q5: How do you plan to conduct a thorough parameter analysis for the multi-hop common neighbors, and what insights do you anticipate this will provide regarding your model's robustness?
soundness: 3
strengths: This paper has several strengths worth noting:

* **Interesting Motivation.** The motivation for extracting common neighbor features is compelling.
* **Extensive Experiments.** The author has designed a variety of experiments to demonstrate the effectiveness and efficiency of their methods.
* **Well-Organized Representation.** The paper is well-structured, and the theoretical analysis provides strong support for the proposed methods.
summary: The author focuses on link prediction tasks in temporal graphs, which have ubiquitous applications in real-world systems. Instead of implicitly encoding common neighbor features from the historical neighborhood of the target node, the author proposes the Temporal Common Neighbor Extractor to explicitly integrate these features into the process of temporal graph representation learning, achieving both effectiveness and efficiency compared to existing methods on the TGB benchmark. Additionally, the author provides theoretical analysis based on their proposed method, offering a more thorough illustration of the model.
weaknesses: However, the paper also has some weaknesses, outlined as follows:

* **Lack of Novelty.** Firstly, the idea of extracting common neighbors in temporal graphs has certainly been explored before. It seems that the design of your key component, the "CN Extractor," closely resembles existing work in KDD2024 [1]. Moreover, your CN extracting component does not appear to include any specific improvements for temporal graphs. Simply extracting "monotone k-hop events" does not substantiate this claim.
* **Lack of Important Baselines.** Since you "extend Neural Common Neighbor for static prediction methods," these static methods should also be included in your comparisons.
* **Lack of Case Study.** Providing specific case studies could enhance the understanding of your method.
* **Ambiguous Expression.** What does $emb$ mean in Equation 2? It seems you haven't explained it anywhere—does it refer to memory? Your method encodes the common neighbor neighborhood composed of source-destination node pairs; might this lead to a loss of other information (e.g., nodes that are not common)?
* **Parameter Analysis.** Given that your method is based on multi-hop common neighbors, analyzing parameters across different multi-hop settings could better validate the robustness of your model.

[1] Co-Neighbor Encoding Schema: A Light-cost Structure Encoding Method for Dynamic Link Prediction, KDD 2024.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: As above.
soundness: 3
strengths: 1 Cutting-edge research directions.

2 Clear writing logic.

3 Sufficient experimental results.
summary: The paper is about temporal link prediction, which is an interesting topic. The authors propose a temporal version of NCN for link prediction in temporal graphs, which dynamically updates a temporal neighbor dictionary for each node and utilizes multi-hop common neighbors between the source and target node to learn a more effective pairwise representation. The paper is well written and well organized. However, there are several concerns in the current version of the paper that addressing them will increase the quality of this paper.
weaknesses: 1 The authors should have a special discussion on whether the biggest difference between TNCN and NCN is the core contribution of this paper. If so, this should be highlighted. If not, more introduction is needed on the importance of the new scenario.

2 Since the strategy proposed in the paper is built around the batch processing mode of sequential graph learning, whether the batch size will have a different impact on the strategy is something that needs to be considered and discussed.

3 The motivation and contribution of the paper are worthy of recognition, but in the main text, the authors can consider putting more emphasis on the contribution description and logical arrangement. At present, it seems that the proof takes up a certain amount of space, making the method and experiment part seem less substantial, and the information that can be expressed is not clear and comprehensive enough.

4 The authors could consider discussing the computational complexity, especially comparing it to similar methods (including static graphs and temporal graphs).

Meta-review: The paper proposes TNCN, a temporal version of Neural Common Neighbor (NCN) for link prediction in temporal graphs. The paper demonstrates significant improvements in performance and efficiency, with TNCN outperforming popular GNN baselines and showing excellent scalability on large datasets.  However, some reviewers found the presentation misleading regarding the novelty of the method, and the core components of TNCN were seen as incremental rather than groundbreaking. Additionally, the performance gains were minimal on certain datasets, and there were concerns about presenting well-known results as novel contributions.

Despite these efforts, the concerns raised by some reviewer, particularly regarding the limited novelty and the misleading presentation, remain valid. Therefore, I recommend a reject for this paper.

Decision: Reject