Supra-Laplacian Encoding for Transformer on Dynamic Graphs

Authors: yannis  karmim
marc  lafon
raphaël  fournier s'niehotta
nicolas  thome
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-13 17:50:53

Abstract: Fully connected Graph Transformers (GT) have rapidly become prominent in the static graph community as an alternative to Message-Passing models, which suffer from a lack of expressivity, oversquashing, and under-reaching.
However, in a dynamic context, by interconnecting all nodes at multiple snapshots with self-attention,GT loose both structural and temporal information. In this work, we introduce Supra-LAplacian encoding for spatio-temporal TransformErs (SLATE), a new spatio-temporal encoding to leverage the GT architecture while keeping spatio-temporal information.
Specifically, we transform Discrete Time Dynamic Graphs into multi-layer graphs and take advantage of the spectral properties of their associated supra-Laplacian matrix.
Our second contribution explicitly model nodes' pairwise relationships with a cross-attention mechanism, providing an accurate edge representation for dynamic link prediction.
SLATE outperforms numerous state-of-the-art methods based on Message-Passing Graph Neural Networks combined with recurrent models (e.g, LSTM), and Dynamic Graph Transformers,
on~9 datasets. Code is open-source and available at this link https://github.com/ykrmm/SLATE.

Main paper: 
 introduction: 
 Dynamic graphs are crucial for modeling interactions between entities in various fields, from social sciences to computational biology [58, 16, 19, 20] . Link prediction on dynamic graphs is an allimportant task, with diverse applications, such as predicting user actions in recommender systems, forecasting financial transactions, or identifying potential academic collaborations. Dynamic graphs can be modeled as a time series of static graphs captured at regular intervals (Discrete Time Dynamic Graphs, DTDG) [41, 54] .Standard approaches for learning representations on DTDGs combine Message-Passing GNNs (MP-GNNs) with temporal RNN-based models [59, 39, 34] . In static contexts, Graph Transformers (GT) [11, 51, 26] offer a compelling alternative to MP-GNNs that faced several limitations [53, 42] . Indeed, their fully-connected attention mechanism captures long-range dependencies, resolving issues such as oversquashing [1] . GTs directly connect nodes, using the graph structure as a soft bias through positional encoding [37] . Incorporating Laplacian-based encodings in GTs provably enhances their expressiveness compared to MP-GNNs [26, 11] .Figure 1 : SLATE is a fully connected transformer for dynamic link prediction, which innovatively performs a joint spatial and temporal encoding of the dynamic graph. SLATE models a DTDG as a multi-layer graph with temporal dependencies between a node and its past. Building the supra-adjacency matrix of a randomly-generated toy dynamic graph with 3 snapshots (left) and analysing the spectrum of its associated supra-Laplacian (right) provide fundamental spatio-temporal information. The projections on eigenvectors associated with smaller eigenvalues (λ 1 ) capture global graph dynamics: node colors are different for each time step. Larger eigenvalues ( e.g. λ max ), capture more localized spatio-temporal information (see Appendix A.1).Exploiting GTs on dynamic graphs would require a spatio-temporal encoding that effectively retains both structural and temporal information. The recent works that have extended GTs to dynamic graphs capture spatio-temporal dependencies between nodes by using partial attention mechanisms [31, 56, 47, 18] . Moreover, these methods also employ encodings which independently embed the graph structure and the temporal dimension. Given that the expressiveness of GTs depends on an accurate spatio-temporal encoding, designing one that interweaves time and position information could greatly enhance their potential and performance.The vast majority of neural-based methods for dynamic link prediction rely on node representation learning [34, 55, 38, 59, 39] . Recent works enrich node embeddings with pairwise information for a given node-pair using co-occurrence neighbors matching [60, 48] or cross-attention on historical sub-graphs [47] . However these methods neglect the global information of the graph by sampling different spatio-temporal substructures around targeted nodes.Pioneering work in the complex network community has studied temporal graphs with multi-layers models and supra-adjacency matrices [44, 25] . The spectral analysis of such matrices can provide valuable structural and temporal information [8, 36] . However, how to adapt this formalism for learning dynamic graphs with transformer architectures remains a widely open question.In this work, we introduce Supra-LAplacian encoding for spatio-temporal TransformErs (SLATE), a new unified spatio-temporal encoding which allows to fully exploit the potential of the GT architecture for the task of dynamic link prediction. As illustrated on Figure 1 , adapting supra-Laplacian matrices to dynamic graph can provide rich spatio-temporal information for positional encoding. SLATE is based on the following two main contributions:• We bridge the gap between multi-layer networks and Discrete Time Dynamic Graphs (DTDGs) by adapting the spectral properties of supra-Laplacian matrices for transformers on dynamic graphs. By carefully transforming the supra-Laplacian matrices for DTDGs, we derive a connected multi-layer graph that captures various levels of spatio-temporal information. We introduce a fully-connected spatio-temporal transformer that leverages this unified supra-Laplacian encoding.• The proposed transfomer captures dependencies between nodes across multiple time steps, creating dynamic representations.To enhance link prediction, we introduce a lightweight edge representation module using cross-attention only between the temporal representations of node pairs, precisely capturing their evolving interactions. This results in a unique edge embedding, significantly streamlining the prediction process and boosting both efficiency and accuracy.We conduct an extensive experimental validation of our method across 11 real and synthetic discretetime dynamic graph datasets. SLATE outperforms state-of-the-art results by a large margin. We also validate the importance of our supra-Laplacian unified spatio-temporal encoding and the edge module for optimal performances. Finally, SLATE remains efficient since it uses a single-layer transformer, and we show impressive results on larger graph datasets, indicating good scalability, and limited time-memory overhead. 
related work: 
 Dynamic Graph Neural Networks on DTDGs. The standard approach to learn on DTDGs [41, 54] involves using two separate spatial and temporal models. The spatial model is responsible for encoding the structure of the current graph snapshot, while the temporal model updates the dynamic either of the graph representations [39, 40, 59, 30, 28] or the graph model parameters [34, 15] . Recently, ROLAND [59] introduced a generic framework to use any static graph model for spatial encoding coupled with a recurrent-based (LSTM [17] , RNN, GRU) or attention-based temporal model. These above methods mainly use a MP-GNN as spatial model [23, 46, 58] . However, MP-GNNs are known to present critical limitations: they struggle to distinguish simple structures like triangles or cycles [33, 4] , and fail to capture long-range dependencies due to oversquashing [1, 42] .To overcome these limitations, some works have adopted a fully-connected GT as spatial model, benefiting from its global attention mechanism [6, 50, 61] . In [39] , the local structure is preserved by computing the attention on direct neighbors. In contrast to these works, SLATE uses a unique spatio-temporal graph transformer model, greatly simplifying the learning process.Graph Transformer. In static contexts, Graph Transformers have been shown to provide a compelling alternative to MP-GNNs [11] . GTs [51, 37, 22, 57] enable direct connections between all nodes, using the graph's structure as a soft inductive bias, thus resolving the oversquashing issue. The expressiveness of GTs heavily depends on positional or structural encoding [11, 32, 12, 3] . In [11] , the authors use the eigenvectors associated with the k-lowest eigenvalues of the Laplacian matrix, which allows GTs to distinguish structures that MP-GNNs are unable to differentiate. Following the success of Laplacian positional encoding on static graphs, SLATE uses the eigenvectors of the supra-Laplacian of a multi-layer graph representation of DTDGs as spatio-temporal encoding.Dynamic Graph Transformers. To avoid separately modelling structural and temporal information as dynamic Graph Neural Networks usually do on DTDGs, recent papers have adopted a unified model based on spatio-temporal attention [31, 18] . This novel approach make those models close to transformer-based methods classically employed to learn on Continuous Time Dynamic Graphs (CTDG) [52, 47, 49] . Among them, some preserve the local structure by computing attention only on direct neighbors [52, 39] , while others sample local spatio-temporal structures around nodes [47, 31, 56, 18] and perform fully-connected attention. However, their spatio-temporal encoding is still built by concatenating a spatial and a temporal encoding that are computed independently. The spatial encoding is either based on a graph-based distance [47, 18] or on a diffusion-based measure [31] . The temporal encoding is usually sinus-based [52, 49, 2] as in the original transformer paper [45] . Another drawback of these methods [31, 47, 18, 49] is that they use only sub-graphs to represent the local structure around a given node. Therefore, their representations of the nodes are computed on different graphs and thus fail to capture global and long-range interactions. Contrary to those approaches, our SLATE model uses the same graph to compute node representations in a fully-connected GT between all nodes within temporal windows. It features a unified spatio-temporal encoding based on the supra-Laplacian matrix.Dynamic Link Prediction methods. For dynamic link prediction, many methods are based only on node representations and use MLPs or cosine similarity to predict the existence of a link [39, 40, 38] . Recent approaches complement node representations by incorporating pairwise information.Techniques like co-occurrence neighbors matching [60, 48] or cross-attention on historical sub-graphs [47] are employed. However, these methods often overlook the global graph structure by focusing on sampled spatio-temporal substructures. For instance, CAW-N [48] uses anonymous random walks around a pair of nodes and matches their neighborhoods, while DyGformer [60] applies transformers to one-hop neighborhoods and calculates co-occurrences. These localized approaches fail to capture the broader graph context. TCL [47] is the closest to SLATE, using cross-attention between spatio-temporal representations of node pairs. TCL samples historical sub-graphs using BFS and employs contrastive learning for node representation. However, it still relies on sub-graph sampling, missing the full extent of the global graph information. In contrast, SLATE leverages the entire graph's spectral properties through the supra-Laplacian, incorporating the global structure directly into the spatio-temporal encoding. This holistic approach allows SLATE to provide a richer understanding of dynamic interactions, leading to superior link prediction performance.Question: Does the paper discuss the limitations of the work performed by the authors? Answer: [Yes] Justification: We discuss the limitations of SLATE in the conclusion section 5, where we list multiple negative points of our work and suggest possible improvements, particularly in terms of better scalability and evaluating SLATE on other graph or node-based tasks. Guidelines:• The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper. • The authors are encouraged to create a separate "Limitations" section in their paper.• The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be. • The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated. • The authors should reflect on the factors that influence the performance of the approach.For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon. • The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size. • If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness. • While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility.In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results. 
the slate method: 
 In this section, we describe our fully-connected dynamic graph transformer model, SLATE, for link prediction. The core idea in section 3.1 is to adapt the supra-Laplacian matrix computations for dynamic graph transformer (DGTs), and to introduce our new spatio-temporal encoding based on its spectral analysis. In section 3.2, we detail our full-attention transformer to capture the spatio-temporal dependencies between nodes at different time steps. Finally, we detail our edge representation module for dynamic link prediction in section 3.3. Figure 2 illustrates the overall SLATE framework. Notations. Let us consider a DTDG G as an undirected graph with a fixed number of N nodes across snapshots, represented by the set of adjacency matrices A = {A 1 , ..., A T }. Its supra-graph, the multi-layer network Ḡ = ( V , Ē), is associated to a supra-adjacency matrix Ā, obtained by stacking A i diagonally (see Eq. ( 7) in Appendix A.1). Then, the supra-Laplacian matrix L is defined asL = I -D-1/2 Ā D-1/2, where I is the identity matrix and D is the degree matrix of Ḡ. Let x u ∈ R F be the feature vector associated with the node u (which remains fixed among all snapshots). Finally, let consider the random variable y ∈ {0, 1} such that y = 1 if nodes u and v are connected and y = 0 otherwise.In this section, we cast Discrete Time Dynamic Graphs (DTDGs) as multi-layer networks, and use the spectral analysis of their supra-graph and generate a powerful spatio-temporal encoding for our fully-connected transformer.DTDG as multi-layer graphs. If a graph is connected, its spectral analysis provides a rich information of the global graph dynamics, as shown in Figure 1 . The main challenge in casting DTDG as multilayer graphs relates to its disconnectivity, which induces as many zero eigenvalues as connected components. DTDG have in practice a high proportion of isolated nodes per snapshot (see Figure 3 in experiments), making the spectral analysis on the raw disconnected graph useless. Indeed, it mainly indicates positions relative to isolated nodes, losing valuable information on global dynamics and local spatio-temporal structures. We experimentally validate that it is mandatory to compute the supra-Laplacian matrix on a connected graph to recover a meaningful spatio-temporal structure.Supra-Laplacian computation. To overcome this issue and make the supra-graph connected, we follow three steps: (1) remove isolated nodes in each adjacency matrix, (2) introduce a virtual node in each snapshot to connect clusters, and (3) add a temporal self-connection between a node and its past if it existed in the previous timestep. We avoid temporal dependencies between virtual nodes to prevent artificial connections. These 3 transformation steps make the resulting supra-graph provably connected. This process is illustrated in Figure 2a , and we give the detailed algorithm in Appendix A.3.Spatio-temporal encoding. With a connected Ḡ, the second smallest eigenvalue λ 1 of the supra-Laplacian L is guaranteed to be non-negative (see proof in Appendix A.3), and its associated Fiedler vector ϕ 1 reveals the dynamics of Ḡ (Figure 1 ). In practice, similar to many static GT models [26, 37, 12] , we retrieve the first k eigenvectors of the spectrum of L, with k being a hyper-parameter. The spectrum can be computed in O(k 2 N ′ ) and have a memory complexity of O(kN ′ ) where N ′ is the size of Ā, and we follow the literature to normalize the eigenvectors and resolve sign ambiguities [26] . The supra-Laplacian spatio-temporal encoding vector of the node u at time t is:EQUATION)where ⊕ denotes the concatenation operator. Lu,t • [ϕ 1 , ϕ 2 , ..., ϕ k ] = [ϕ u,t 1 , ϕ u,t 2 , ..., ϕ u,t k ] contains the projections of the node u at time t in the eigenspace spanned by the k first eigenvectors of L, diag(Λ) contains the eigenvalues of L (which are the same for all nodes) and g θST is a linear layer allowing to finely adapt the supra-graph spectrum features to the underlying link prediction task. Note that because we did not include isolated nodes in the computation of the supra-Laplacian, we replace the eigenvector projections by a null vector 0 k for these nodes. All the steps involved in constructing our spatio-temporal encoding are illustrated in Figure 2b .In this section, we describe the architecture of our fully-connected spatio-temporal transformer, f θ T , to construct node representations that captures long-range dependencies between the nodes at each time step. We illustrate our fully-connected GT in Figure 2c . We employ a single transformer block, such that our architecture remains lightweight. This is in line with recent findings showing that a single encoder layer with multi-head attention is sufficient for high performance, even for dynamic graphs [51] .The input representation of the node u t is the concatenation of the node embeddings (which remains the same for each snapshot) and our supra-Laplacian spatio-temporal encoding:EQUATIONwhere g θE is a linear projection layer and ⊕ denotes the concatenation operator. Then we stack all the representations of each nodes at each time step within a time window of size w to obtain the input sequence, Z ∈ R (N w)×d , of the GT.The fully-connected spatio-temporal transformer, f θ T , then produces a unique representation Z ∈ R (N w)×d for each node at each time-step :EQUATIONSurprisingly, considering all temporal snapshots did not yield better results in our experiments (see Figure 4 in section 4.2).Unlike previous DGT methods that sample substructures around each nodes [31, 56, 47] , SLATE leverages the full structure of the DTDG within the time window. This approach ensures that no nodes are arbitrarily discarded in the representation learning process, as we use the same information source Z for all nodes.In this section, we present our innovative edge representation module Edge. It is designed for efficient dynamic link prediction and leverage the node representations learned by our fully-connected spatiotemporal GT. We illustrated our module in Figure 2d . This module is composed of a cross-attention model, f θXA , that captures pairwise information between the historical representation of two targeted nodes followed by a classifier to determine the presence of a link.For a link prediction at time t+1 on a given node pair (u, v), we aggregate all temporal representations of u and v resulting in two sequences Zu,t = [z u,t-w , . . . , zu,t ] and Zv,t = [z v,t-w , . . . , zv,t ]. We use these multiple embeddings to build a pairwise representation that captures dynamic relationships over time. Then, the cross-attention module f θXA produces a pairwise representation of the sequence E u,v ∈ R w×d :EQUATIONWe obtain the final edge representation e u,v ∈ R d by applying an average time-pooling operator and we compute the probability that the nodes u t+1 and v t+1 are connected with:EQUATIONSLATE differs from methods that enrich node and edge representations with pairwise information by sampling substructures around each node [47, 60, 48, 18] . Instead, we first compute node representations based on the same dynamic graph information contained in Z. Then, we capture fine-grained dynamics specific to each link (u, v) through a cross-attention mechanism.Our training resort to the standard Binary Cross-Entropy loss function. In practice, for a node u, we sample a negative pair v neg and a positive pair v pos :EQUATIONIn this context, θ = {θ XA , θ T , θ ST , θ E } represents all the parameters within the edge representation module θ XA , the fully-connected transformer θ T , the spatio-temporal linear layer θ ST and the node embedding parameters θ E as illustrated in Figure 2 .The theoretical complexity of attention computation is O(N 2 ) per snapshot, scaling to O((N T ) 2 ) when considering all T snapshots. However, as shown in our experiments (Figure 4 ) and consistent with recent works [21] , a large temporal context is often unnecessary. By using a time window w with w ≪ T (similar to other DGT architectures [31, 56] ), we reduce complexity to O((N w) 2 ). For predictions at time t + 1, we focus only on snapshots from G t-w to G t . Ablation studies confirm that smaller time windows deliver excellent results across various real-world datasets. We further leverage FLASH Attention [9] to optimize memory usage and computation. Additionally, we incorporate Performer [5] , which approximates the softmax computation of the attention matrix, reducing the complexity to O(N w). This enables us to scale efficiently to larger graphs, as shown in Table 5 , while maintaining high performance (see Table 15 ) with manageable computational resources. 
experiments: 
 We conduct extensive experiments to validate SLATE for link prediction on discrete dynamic graphs, including state-of-the-art comparisons in section 4.1. In section 4.2, we highlight the benefits of our two main contributions, the importance of connecting our supra-graph, and the ability of SLATE to scale to larger datasets with reasonable time and memory consumption compared to MP-GNNs.Implementation details. We use one transformer Encoder Layer [45] . For larger datasets, we employ Flash Attention [9] for improved time and memory efficiency. Further details regarding model parameters and their selections are provided in Table 8 . We fix the token dimension at d = 128 and the time window at w = 3 for all our experiments. We use an SGD optimizer for all of our experiments. Further details on hyper-parameters search, including the number of eigenvectors for our spatio-temporal encoding, are in Appendix D.Since both the continuous and discrete communities evaluate on similar data, we compare SLATE to state-of-the-art DTDG (Table 1 ) and CTDG (Table 2 ) models. Best results are in bold, second best are underlined. More detailed results and analyses are presented in Appendix E.1.Baselines and evaluation protocol. To compare the benefits of fully connected spatio-temporal attention with a standard approach using transformers, we designed the ROLAND-GT model based on the ROLAND framework [59] . This model follows the stacked-GNN approach [41] , equipped with the encoder f θ T described in section 3 including static Laplacian positional encoding [11] , and a LSTM [17] updating the node embeddings.We adhere to the standardized evaluation protocols for continuous models [60] and discrete models [55] . Our evaluation follows these protocols, including metrics, data splitting, and the datasets provided. Results in Table 1 and Table 2 are from the original papers, except those marked with † . We report the average results and standard deviations from five runs to assess robustness. Additional results, including hard negative sampling evaluation, are in Appendix E.2.Datasets. In Table 6 Appendix C, we provide detailed statistics for the datasets used in our experiments. An in-depth description of the datasets is given in Appendix C. We evaluate on DTDGs datasets provided by [60] and [55] , we add a synthetic dataset SBM based on stochastic block model [29] , to evaluate on denser DTDG. Comparison to discrete models, on DTDG. Table 1 We showcases the performance of SLATE against various discrete models on DTDG datasets, highlighting its superior performance across multiple metrics and datasets. SLATE outperforms all state of the art models on the HepPh, Enron, and Colab datasets, demonstrating superior dynamic link prediction capabilities. Notably, it surpasses HTGN by +2.1 points in AUC on HepPh and +1.1 points in AP on Enron. Moreover, SLATE shows a remarkable improvement of +7.6 points in AUC over EvolveGCN on Colab. It also performs competitively on the AS733 dataset, with scores that are closely second to HTGN, demonstrating its robustness across different types of dynamic graphs. What also emerges and validates our method from this comparison is the average gain of +6.29 points by our fully connected spatio-temporal attention model over the separate spatial attention model and temporal model approach, as used in ROLAND-GT. We also demonstrate significant gains against sparse attention models like DySat, with an increase of +6.45. This study, conducted on the protocol from [55] , emphasizes SLATE capability in handling discrete-time dynamic graph data, offering significant improvements over existing models. Comparison to continuous models, on DTDG. Table 2 In dynamic link prediction, SLATE outperforms models focused on node (TGN, DyRep, TGAT), edge (CAWN), and combined node-pairwise information (DyGFormer,TCL). Notably, it surpasses TCL by over 21 points in average, showcasing the benefits of our temporal cross attention strategies. SLATE's advantage stems from its global attention mechanism, unlike the sparse attention used by TGAT, TGN, and TCL. By employing fully-connected spatio-temporal attention, SLATE directly leverages temporal dimensions through its Edge module. This strategic approach allows SLATE to excel, as demonstrated by its consistent top performance and further evidenced in Appendix with hard negative sampling results (see Table 17 and Table 16 in Appendix E.1). We demonstrate average results that are superior by 13 points compared to the most recent model on DTDG, DyGFormer [60] .Impact of different SLATE component. Critical role of supra-adjacency transformation. Here, we demonstrate the importance of the transformation steps of the supra-adjacency matrix, as detailed in section 3.1, by removing isolated nodes, adding virtual nodes, and incorporating temporal connections (Figure 2 ). Table 4 presents the performance of SLATE with and without transformation (trsf) on four datasets. Without these critical transformations, there is a systematic drop in performance, particularly pronounced in datasets with a high number of isolated nodes, as shown in Figure 3 Impact of the time-window size. We demonstrate in Figure 4 the impact of the time window size on the performance of the SLATE model. A window size of 1 is equivalent to applying a global attention transformer to the latest snapshot before prediction, and an infinite window size is equivalent to considering all the snapshots for global attention. This figure highlights the importance of temporal context for accurate predictions within dynamic graphs. We observe that, in most cases, too much temporal context can introduce noise into the predictions. The USLegis, UNVote and CanParl datasets are political graphs spanning decades (72 years for UNVote), making it unnecessary to look too far back. For all of our main results in Table 2 and Table 1 we fix for simplicity w = 3. However, our ablations have identified w = 4 as an optimal balance, capturing sufficient temporal context without introducing noise into the transformer encoder and ensuring scalability for our model. Therefore, SLATE performances could further be improved by more systematic cross-validation of its hyper-parameters, e.g. w.Model efficiency. The classic attention mechanism, with a complexity of O(N 2 ), can be memoryconsuming when applied across all nodes at different time steps. However, using Flash-Attention [9] and a light transformer architecture with just one encoder layer, we successfully scaled to the Flights dataset, containing 13,000 nodes and a window size of w = 3. By using the Performer encoder [5] , which approximates attention computation with linear complexity, memory usage is reduced to 17GB. Our analysis shows that our model empirically matches the memory consumption of various DTDG architectures while maintaining comparable computation times (Table 5 ). Furthermore, it is not over-parameterized relative to existing methods. We trained on an NVIDIA-Quadro RTX A6000 with 49 GB of total memory.We present qualitative results in Figure 5 comparing the graph and its spectrum before and after applying the proposed transformation in SLATE. The projection is made on the eigenvector associated with the first non-zero eigenvalue. Before transformation, the DTDG contains isolated nodes (7, 23 and 26) and two distinct clusters in the snapshot at t = 3. In this case, the projection is purely spatial, as there are no temporal connections, and some projections also occur on isolated nodes due to the presence of distinct connected components. After the proposed transformation into a connected multi-layer graph, the projection captures richer spatio-temporal properties of the dynamic graph. By connecting the clusters with a virtual node and adding temporal edges, our approach removes the influence of isolated nodes and enables the construction of an informative spatio-temporal encoding that better reflects the dynamic nature of the graph.Figure 5 : Projection of the eigenvector associated with the first non-zero eigenvalue on a toy DTDG before and after transformation. On the left, the DTDG is unprocessed, showing only spatial projections due to the lack of temporal connections. On the right, after applying the SLATE transformation, the graph captures rich spatio-temporal properties, allowing for a more informative spatio-temporal encoding 
conclusion: 
 We have presented the SLATE method, an innovative spatio-temporal encoding for transformers on dynamic graphs, based on supra-Laplacian analysis. Considering discrete-time dynamic graphs as multi-layer networks, we devise an extremely efficient unified spatio-temporal encoding thanks to the spectral properties of the supra-adjacency matrix. We integrate this encoding into a fully-connected transformer. By modeling pairwise relationships in a new edge representation module, we show how it enhances link prediction on dynamic graphs. SLATE performs better than previous state-of-the-art approaches on various standard benchmark datasets, setting new state-of-the-art results for discrete link prediction.Despite its strong performances, SLATE currently operates in a transductive setting and cannot generalize to unseen nodes. We aim to explore combinations with MP-GNNs to leverage the strengths of local feature aggregation and global contextual information. On the other hand, SLATE scales reasonably well to graphs up to a certain size but, as is often the case with transformers, future work is required to scale to very large graphs.Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?Answer: [Yes]Justification: The code of SLATE is provided at this link: https://github.com/ykrmm/SLATE. Our code is designed to be comprehensible, ensuring that all presented results are reproducible.Guidelines:• The answer NA means that paper does not include experiments requiring code. • Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted. 
acknowledgement: 
 We acknowledge the financial support provided by PEPR Sharp (ANR-23-PEIA-0008, ANR, FRANCE 2030). We would also like to thank the LITIS laboratory in Rouen and especially Leshanshui Yang, who helped us better position our method. We also thank Elias Ramzi for his feedback on the paper and assistance in writing the abstract.A Supra-Laplacian and other positional encodingQuestion: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?Answer: [Yes]Justification: The selection of datasets, their splitting, and descriptions are presented in Appendix C. We use the same evaluation protocols as papers well-recognized by the community [60, 55] . Hyperparameter optimization is detailed in Appendix D, and the optimizer settings are described at the beginning of section 4.Guidelines:• The answer NA means that the paper does not include experiments.• The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them. • The full details can be provided either with the code, in appendix, or as supplemental material. 
experiment statistical significance: 
 Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?Answer: [Yes] Justification: Following the protocols we are based on, all results in the paper, including those from ablation studies, are averaged over 5 runs with the standard deviation reported.Guidelines:• The answer NA means that the paper does not include experiments.• The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper. • The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions). • The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.) • The assumptions made should be given (e.g., Normally distributed errors).• It should be clear whether the error bar is the standard deviation or the standard error of the mean. • It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified. • For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates). • If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text. 
experiments compute resources: 
 Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?Answer: [Yes] Justification: The analysis of the time-memory efficiency of our model is presented in Table 5 , where we also compare it with other state-of-the-art models. We also detailed the number of parameters of SLATE.Guidelines:• The answer NA means that the paper does not include experiments.• The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage. • The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute. • The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper). 
code of ethics: 
 Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines? 
safeguards: 
 Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)? Answer: [NA] Justification: We don't release new data or harmful generative models. Guidelines:• The answer NA means that the paper poses no such risks.• Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters. • Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images. • We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort. 12. Licenses for existing assets Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected? Answer: [Yes] • We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution. • For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review. 
 
 Appendix: To leverage the benefits of fully-connected spatio-temporal attention across all nodes at multiple timestamps, we encode the spatio-temporal structure by considering a DTDG as a multi-layer graph.For a simple DTDG G = {G 1 , G 2 , G 3 } with a fixed number of nodes, we define the square symmetric supra-adjacency matrix Ā ∈ R N ×N as follows:EQUATIONThen, we can utilize the rich spectral properties associated with its supra-Laplacian L = D -Ā.Several studies have analyzed the spectrum of those multi-layer graphs [8, 10, 36] . Especially, [36] demonstrated that ϕ 1 , the Fiedler vector, associated with the second smallest eigenvalue λ 1 , known as the algebraic connectivity or Fiedler value, highlights structural changes between each layer. For a DTDG, this provides valuable information about the graph's dynamics over time. We verified this property experimentally by generating a DTDG containing 3 snapshots of a random Erdős-Rényi graph [13] with 10 nodes each and connecting them temporally according to Eq. ( 7) (see illustration on Figure 1 ). We then project all nodes of the DTDG onto different vectors associated with eigenvalues λ i , with λ 0 ≤ λ 1 ≤ ... ≤ λ max . We observe that projecting onto ϕ 1 provides dynamic information, while projecting onto ϕ i associated with larger eigenvalues λ i reveals increasingly localized structures. These properties strongly motivate the use of spectral analysis of a multi-layer graph derived from a DTDG to achieve a unified spatio-temporal encoding.A.2 Supra-graph construction Algorithm 1: Computation of supra-laplacian spectrum Input: G, w,k, t + 1 Output: ϕ, Λ adjacencies ← [ ] for i from max(0, t -w) to t doA i ← GetAdjacency(G i ) A i ← RemoveIsolated(A i ) A i ← AddVirtualNode(A i ) adjacencies.Append(A i ) Ā ← BlockDiag(adjacencies)// Eq. (7) Ā ← AddTempConnection( Ā) // Add temporal self-connection only if nodes aren't isolated L = I -D -1/2 ĀD -1/2 ϕ T Λϕ = GetKFirstEigVectors( L, k) // O(k 2 N )In practice, when isolated nodes are removed, we obtain a mask of size N . This mask helps us identify which nodes are isolated at each time step and determines whether their positional encoding will be 0 k or the projection on the basis of the k eigenvectors. The mask also guides us in adding temporal connections between a node and its past, as isolated nodes do not have temporal connections. In summary, the matrix Ā has a different size from N × W because we remove isolated nodes and add virtual nodes. The masks help us map the actual indices in G to the rows in Ā.In Figure 6 , we illustrate the process of transforming a random DTDG into a connected multi-layer network. On the left, we see three independent snapshots, with several isolated nodes (6, 23, and 26) and multiple clusters in the snapshot at t = 3. The proposed transformation in SLATE ensures that the resulting multi-layer graph becomes fully connected by adding temporal connections, removing isolated nodes, and introducing a virtual node to bridge the different clusters within each snapshot. Proof of the positivity of λ 1 when the graph is connected [14] Theorem 1: The second smallest eigenvalue, λ 1 (the Fiedler value), is strictly positive if and only if the graph is connected.Proof 1: Assume that the graph is not connected. This implies that it can be divided into at least two disjoint connected components without any edges connecting them. For such a graph, it is possible to construct a vector whose entries correspond to these connected components such that the product ϕ T i Lϕ i = 0, where ϕ i is an eigenvector. This demonstrates that λ 1 = 0. On the contrary, if λ 1 > 0, the only vector that satisfies ϕ T i Lϕ i = 0 under normal conditions (non-zero ϕ i ) is the constant vector, indicating that the graph cannot be divided without cutting edges, thus it is connected.EQUATIONEQUATIONL t represents the Laplacian matrix of the graph G t . It is obtained by decomposing the graph as the product of eigenvectors ϕ t and eigenvalues Λ t . The Laplacian positional encoding defined in Eq. ( 9) provides a unique positional representation of the node u i,t with respect to the k eigenvectors of G t .A.5 Unparameterized temporal encodingtimePE(t, k) =    sin t 10000 (2k/d time ) if k is even cos t 10000 ((2k+1)/d time )if k is odd (10) In Eq. (10) , t refers to the t-th snapshot of our DTDG G, and k is the dimension in our temporal encoding vector of size d time . This temporal is from [45] . To build the ROLAND-GT separate spatiotemporal encoding we concatene the positional encoding LapPE (Eq. ( 9)) and the time encoding (Eq. ( 10)).We add in our comparison in Figure 7 , the GCN positional encoding against our SLATE Model. This encoding is derived from a 2-layer GCN as designed by Kipf and Welling [23] . This method aggregates the local neighborhood information around a target node with message passing. We use the node embedding as positional encoding to enhance the transformer's awareness of the local structural context. This approach aims to integrate structural insights into the transformer model. It is inspired by the prevalent hybrid architectures combining MP-GNNs and transformers in static Graph Transformers [37] . It reflects an evolving trend in graph neural network research, where the strengths of both MP-GNNs in capturing local graph structures and transformers in modeling complex data dependencies are leveraged to enhance model performance on graph-based tasks. However, in our experiments, we found that SLATE significantly outperformed the GCN-based positional encoding.Discrete Time Dynamic Graphs Link Prediction models We describe the DTDG models from [55] :• GIN and GAT [24] : We use static models [53, 46] to showcase the necessity of dynamic model for efficient learning on dynamic graph. GAT is a sparse attention-based model, and GIN is a MP-GNN model design to have a the maximal expressivity of 1 -W L.• GRUGCN [40] : GRUGCN is one of the first discrete dynamic graph GNN models. They introduced the now standard approach which combines a GNN to process the snapshot, and updating embeddings using a temporal model, in their case a GRU.• EvolveGCN [34] : EvolveGCN is an innovative approach adapting the Graph Convolutional Network (GCN) model for dynamically evolving graphs without relying on node embeddings, effectively capturing the dynamic nature of graph sequences through an RNN to update GCN parameters.• DySat [39] : DySAT use self-attention mechanisms to learn node representations in dynamic graphs. It applies self-attention both structurally and temporally with separate module for time and space, the space module is similar to GAT [46] , and the temporal model is a 1-D transformer.• VGRNN [15] : VGRNN introduce node embedding techniques for dynamic graphs, focusing on variational graph recurrent neural networks to capture temporal dynamics. They employ latent variables for node representation, with SI-VGRNN advancing the model through semi-implicit variational inference for better flexibility. The method is suited for sparse graphs.• HTGN [55] : They introduce a novel approach for embedding temporal networks through a hyperbolic temporal graph network (HTGN), effectively utilizing hyperbolic space to capture complex, evolving relationships and hierarchical structures in temporal networks.• ROLAND [59] : ROLAND is a generic framework for graph representation learning on DTDG. They allow to efficiently implement any static graph models combine with a RNNbased temporal module.We report the description of the CTDG baselines provided in [60] .• JODIE [27] : Tailored for user-item interaction dynamics within bipartite networks, JODIE utilizes dual recurrent neural networks to refresh user and item states, introducing a projection technique to predict future state trajectories.• DyRep [43] : Introduces a recurrent mechanism for real-time node state updates, complemented by a temporal attention module to assimilate evolving structural insights of dynamic graphs effectively.• TGAT [52] : Enhances node representations through the aggregation of temporal-topological neighbor features, leveraging a local self-attention mechanism and time encoding to discern temporal dynamics.• TGN [38] : TGN dynamically updates node memories during interactions using a sophisticated mechanism comprising a message function, aggregator, and updater, thereby crafting temporal node representations through an embedding module.• CAWN [48] : Initiates by extracting causal anonymous walks per node to delve into network dynamics and identity correlations, followed by encoding these walks with recurrent neural networks to synthesize comprehensive node representations.• EdgeBank [35] : Adopts a non-parametric, memory-centric strategy for dynamic link prediction, maintaining a repository of interactions for memory updates and utilizing retentionbased prediction to distinguish between positive and negative links.• TCL [47] : TCL applies contrastive learning to dynamic graph, using a transformer-based architecture to capture temporal and topological information. It introduces a dual-stream encoder for processing temporal neighborhoods and employs attention mechanisms for semantic inter-dependencies, optimizing through mutual information maximization.• DyGFormer [60] : DyGFormer introduces a novel transformer-based architecture for dynamic graph learning, focusing on first-hop interactions to derive node representations. It employs a neighbor co-occurrence encoding scheme to capture node correlations and a patching technique for efficient processing of long temporal sequences. This approach ensures model effectiveness in capturing temporal dependencies and node correlations. • CanParl: Can. Parl. is a network that tracks how Canadian Members of Parliament (MPs) interacted between 2006 and 2019. Each dot represents an MP, and a line connects them if they both said "yes" to a bill. The line's thickness shows how often one MP supported another with "yes" votes in a year.• UsLegis: USLegis is a Senate co-sponsorship network that records how lawmakers in the US Senate interact socially. The strength of each connection indicates how many times two senators have jointly supported a bill during a specific congressional session• Flights: Flights is a dynamic flight network that illustrates the changes in air traffic throughout the COVID-19 pandemic. In this network, airports are represented as nodes, and the actual flights are represented as links. The weight of each link signifies the number of daily flights between two airports.• Trade: UNTrade covers the trade in food and agriculture products between 181 nations over a span of more than 30 years. The weight assigned to each link within this dataset reflects the cumulative sum of normalized import or export values for agricultural goods exchanged between two specific countries.• UNVote: UNVote documents roll-call votes conducted in the United Nations General Assembly. Whenever two nations cast a "yes" vote for an item, the link's weight connecting them is incremented by one.• Contact: Contact dataset provides insights into the evolving physical proximity among approximately 700 university students over the course of a month. Each student is uniquely identified, and links between them indicate their close proximity. The weight assigned to each link reveals the degree of physical proximity between the students • SBM: SBM is a synthetic dynamic datasets generated with Stochastic Block Models methods. It contains 1000 nodes and 50 snapshots. We added this datasets, because unlike most of real world datasets, SBM is not a sparse graph.For the datasets from [60] , we follow the same graph splitting strategy, which means 70% of the snapshots for training, 15% for validation, and 15% for testing. We use the same number of snapshots as in HTGN [55] , the value varies for each dataset (Table 7 ).HepPh AS733 Enron Colab l (number snapshots in test) 6 10 3 3 Table 7 : l represents the number of snapshots in the test dataset. The DTDG is split temporally, following [55] For each of our experiments, we used a fixed embedding size of d = 128, a time window w = 3, and a single layer of transformer Encoder. Additionally, for the calculation of our positional encoding vectors, we consider that the graph is always undirected. In Table 8 , we provide the remaining hyperparameters that we adjusted based on the datasets. We selected these datasets by choosing the hyperparameters that yielded the best validation performance in AP. k is the number of linearly independent eigenvectors we retrieve, it's important to note that d does not increase when dim_pe grow because d ′ = dk. nhead_xa is the number of head inside the Edge Representation module define in section 3.3. nhead_encoder is the number of head inside SLATE section 3, dim_ffn is the dimension of the feed forward networks in SLATE and norm_first is a condition in SLATE to weither or not applying a layer norm before the full attention. We present additional results with Average Precision metrics to evaluate the dynamic link prediction capibility of models. SLATE outperforms all other DTDG models across various datasets, achieving the highest average precision (AP) scores. Specifically, SLATE surpasses the best-performing model, HTGN, with significant improvements: +1.22 on HepPh, +1.09 on Enron, and +3.33 on SBM. This highlights the effectiveness of our approach in dynamic link prediction tasks. We present a extensive set of results for our method in comparison to CTDG models in the task of dynamic link prediction on discrete-time dynamic graphs in Table 17 and Table 16 . Here, we emphasize the effectiveness of our model when employing hard historical negative sampling. Historical negative sampling technique (hist) was introduced in [35] to enhance the evaluation of a model's dynamic capability by selecting negatives that occurred in previous time-steps but are not present at the current time for prediction. Inductive negative sampling evaluating the capability of models to predict new links that never occured before. Our results demonstrate that our model excels at distinguishing hard negative edges compared to other CTDG models, as evidenced by improved performance in both AP and AUC metrics. SLATE also consistently outperforms other models using the indudctive (ind) sampling method across multiple datasets, showcasing its superior capability in capturing dynamic graph interactions. Notably, SLATE achieves significant improvements on datasets such as USLegis and Trade, demonstrating its robustness and effectiveness in dynamic link prediction tasks.Figure 7 provides a comparison between SLATE spatio-temporal encoding and separate spatial and temporal encodings, including the Laplacian [12] (Lap Eq. ( 8)) and GCN (Appendix A.6) encodings.For calculating the spatial encoding, we selected two common strategies; the first involves using, as we do, the first k eigenvectors of the Laplacian [12] , but only for the current snapshot. Empirically, we found that the GCN encoding did not yield satisfying results, in contrast to the hybrid architecture strategies widely used for static Graph Transformers [37] .We show in Table 10 SLATE, with its cross-attention mechanism for edge representation, significantly enhances the predictive accuracy of the SLATE w/o Edge model. show improvement across various datasets, further emphasizing the importance of modeling interactions explicitly, we gain for example +6.4 points on UNVote, +2.6 points on USLegis and +5.8 points on Enron. SLATE's ability to capture intricate dynamics between two nodes across time dimensions results in substantial performance gains, making it a valuable addition to our model architecture.Impact of the time-pooling function. In Table 11 , we present the performance of the time-pooling function used in section 3.3, across the US Legis, UN Vote, and Trade datasets, with the time window set to w = 3. Using k = 3 corresponds to averaging over all snapshots within the window, whereas k = 1 focuses exclusively on the last element of E uv . The results indicate that averaging (mean pooling) consistently outperforms max pooling, irrespective of the k value. For our primary analysis, we therefore adopt k = 3. Detailed analysis of the DTDG-to-multi-layer transformation in SLATE We provide a closer examination of the performance of SLATE under various transformations applied to the DTDG during its conversion into a multi-layer graph. The Table 12 demonstrates the negative effect of retaining isolated nodes, which leads to a significant drop in performance on both the Colab and USLegis datasets. By removing these nodes and focusing on the spectrum associated with the first non-zero eigenvalue, SLATE achieves a substantial performance improvement.The Table 13 highlights the importance of introducing a virtual node (VN) that connects clusters within each snapshot. Without the VN, the model underperforms, as shown in the results for the Enron dataset. This confirms that each transformation step, from removing isolated nodes to adding temporal connections and VNs, plays a critical role in enhancing the quality of the spatio-temporal encoding.AUC : Impact of time window on multiple models The analysis in Table 14 demonstrates that the impact of the time window on model performance is consistent across different types of models, including our transformer-based approach and two MP-GNNs (EGCN and DySAT). Interestingly, we observe that a relatively short time window produces optimal results for all models on the UNVote dataset, which spans 72 snapshots. Specifically, both EGCN and DySAT achieve their highest AUC with W = while SLATE achieves peak performance at W = 2. This indicates that capturing spatio-temporal dynamics does not necessarily require long temporal windows, and in fact, shorter windows can often lead to better performance by focusing on more immediate temporal interactions.Nb param. W = 1 W = 2 W = 3 W = 4 W = 5 W = ∞ EGCN 1.We conduct a fine-grained analysis of the impact of not processing the DTDG correctly. Figure 8 demonstrates that without temporal connections, the result is purely spatial projections with no spatio-temporal information, as the three snapshots remain independent. Figure 9 illustrates the effect of retaining isolated nodes while adding temporal connections. Keeping these nodes leads to multiple disconnected components in the graph, where many projections focus solely on the isolated nodes, neglecting the core structure of the DTDG. This issue is further intensified by the fact that we consider only the k eigenvectors associated with the first non-zero eigenvalue, limiting the ability to capture the full spatio-temporal dynamics. In Table 5 , we demonstrate that Performer [5] significantly reduces memory consumption and speeds up training time per epoch. Moreover, as shown in Table 15 , using Performer an efficient approximation of the attention matrix with linear complexity-does not significantly degrade the results compared to the standard Transformer encoder. Performer is a highly advantageous solution for scaling to larger graphs while maintaining the benefits of dynamic graph transformers. Its linear complexity allows it to handle larger datasets efficiently, without sacrificing performance. Justification: Our paper focuses on a unified spatio-temporal encoding based on the spectrum of the supra-Laplacian, as developed in section 3.1. We also introduce a fully-connected architecture utilizing this spatio-temporal encoding section 3.2 for the task of link prediction section 3.3. Each of these claims is validated in Table 3 , as well as the claim of better SLATE performance against state-of-the-art methods in Tables 1 and 2 .Guidelines:• The answer NA means that the abstract and introduction do not include the claims made in the paper. • The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers. • The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings. • It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.Justification: Our research adheres strictly to the NeurIPS Code of Ethics. Our study does not involve sensitive data or unethical practices, and we have followed all relevant guidelines to ensure ethical compliance throughout our work.Guidelines:• The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.• If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics.• The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction). 10. Broader Impacts Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed? Answer: [NA] Justification: Our model is a discriminative model for link prediction on academic datasets, which do not contain any private or sensitive information. Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. • The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster. • The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology. • If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML). 


Decision: This paper proposes SLATE (Supra-Laplacian encoding for spatio-temporal Transformers) which aims to learn both spatial and temporal information in a dynamic graph with a transformer architecture. SLATE converts Discrete Time Dynamic Graphs into multi-layer networks and extracts the spectral features of their supra-Laplacian matrix to improve upon existing dynamic graph transformer designs. To predict a link between two nodes, the model does cross-attention between their representations within the time window. Experimental results show SLATE performs competitively to both CTDG and DTDG methods on discrete graphs. Reviewers think the proposed approach is novel, the experiments results are extensive and promising, and the presentation is clear. The main concerns include efficiency/scalability of the approach on large graphs even with truncated time window, and that the Improvement over baselines in some settings seem mediocre.

Reviews: review: paper_summary: paper_summary: This work introduces Supra-Laplacian encoding for spatio-temporal Transformers (SLATE) which aims to learn both spatio and temporal information in a dynamic graph with a transformer architecture. The key is to convert Discrete Time Dynamic Graphs into multi-layer networks and then extract the spectral features of their supra-Laplacian matrix to improve upon existing dynamic graph transformer designs. Additionally, SLATE employs a cross-attention mechanism to accurately model nodes' pairwise relationships, improving dynamic link prediction. The proposed SLATE model performs competitively to both CTDG and DTDG methods on discrete graphs.
strength_weakness: strength_weakness: - **scalability**: my main concern is the scalability of the method as the authors also pointed out as a limitation. Even with the time window (which truncates the history of the temporal graph), the $N^2 w^2$ complexity remains very high and only feasible for networks with up to thousands of nodes, In addition, there is a large amount of precomputation needed for the supra-Laplacian and computing its eigenvectors. 

- **window size**: one of the core hyperparameter of SLATE is the choice of window size, as the study in Figure 4 shows that there are some common optimal window size for the CanParl Colab and USLegis datasets. These datasets mostly contains a small number of snapshots thus might be why 4 is a good choice. In practice though, it might be difficult to tell which window size is optimal without extensive experiments to select it. It would also be interesting to see if the length of the window is related to other factors in the architecture, size of the multi-layer network, transformer dimension etc.
questions: questions: - In the ROLAND paper, which is a close competitor to this work, the MRR metrics is used for evaluation, why is the AUROC adapted in this work instead as it has been shown to be very limited and biased towards the 1 negative sample that is compared against each positive test edge. 

- there are types in the paper for example "loose" on line 5 should be "lose"

- how are the CTDG methods applied on the discrete datasets, some performance looks low.
limitations: limitations: The limitations are discussed sufficiently in the paper. More discussion on negative societal impact might be included such as downstream applications of anomaly detection or recommendation systems for temporal graph learning methods,
paper_summary: paper_summary: This paper proposes a spatial-temporal encoding for transformers on dynamic graphs. Specifically, graphs at each time step are treated as a single multilayer graph and packed into a larger adjacency matrix, with temporal self-connections between each node and its past. Eigenvectors of the constructed Laplacian are used as positional encoding and concatenated with node features. A standard transformer encoder layer then generates all representations for each node at each time step within a selected time window. To predict a link between two nodes, the model does cross-attention between their representations within the time window. Experimental results show that the proposed model performs better than existing methods.
strength_weakness: strength_weakness: * Scalability/efficiency may still be a concern on large graphs, though the paper shows good engineering (e.g., Flash-Attention) can help
* Some finer-grained ablation studies are missing. For example:
    * Instead of removing isolated nodes in preprocessing, can we keep the disconnected graph and just use eigenvectors corresponding to non-zero eigenvalues?
    * The transformer itself can already get global information and I see no strong reason to use virtual nodes additionally. How would the model behave without virtual nodes? How would "virtual nodes + GNN" behave?
questions: questions: Please see my 2nd point in Weaknesses
limitations: limitations: N/A
paper_summary: paper_summary: This paper proposes SLATE, a novel method for link prediction in dynamic graphs. SLATE transforms dynamic graphs into multi-layer networks and generates a unified spatio-temporal encoding by leveraging the spectral properties of the supra-Laplacian matrix. It uses a fully connected transformer architecture to capture long-range dependencies between nodes across multiple time steps. The authors introduce a cross-attention-based edge representation module for dynamic link prediction. They claim that SLATE significantly outperforms existing state-of-the-art methods on several benchmark datasets
strength_weakness: strength_weakness: W1. The explanation for adding temporal connections in the supra-Laplacian construction stage seems insufficient.

W2. The description of how to construct the supra-Laplacian is not comprehensive enough.

W3. The characteristics of the SLATE model are not clearly defined. For example, the necessity of each step (a)-(d) in Figure 2 lacks convincing arguments.

W4. This paper discloses all data and code upon acceptance, which limits the ability to verify the reproducibility of this paper.
questions: questions: Q1. The depiction of adding temporal connections in Figure 2 is difficult to understand. The explanation for adding temporal connections seems inadequate, especially the description of AddTempConnection in Algorithm 1.

Q2. When adding virtual nodes, are multiple virtual nodes created? The explanation regarding virtual nodes appears to be insufficient.

Q3. What are the theoretical advantages of Supra-Laplacian encoding compared to existing graph positional encoding methods?

Q4. What would be the impact of using sparse attention mechanisms instead of fully connected transformers?
limitations: limitations: This paper discloses all data and code upon acceptance, which limits the ability to verify the reproducibility of this paper.
paper_summary: paper_summary: This paper introduces a new method called Supra-Laplacian Encoding for spatio-temporal Transformers(SLATE) to deal with dynamic graph challenges. Its core approach is to enhance the graph transformer(GT) architecture by integrating spatio-temporal information more efficiently. It deploys a new technology to convert discrete-time dynamic graphs into multiplayer graphs and exploit the spectral properties of their associated super-laplacian matrices. SLATE also implements a cross-attention mechanism to explicitly model pairwise relationships between nodes. SLATE can capture the dynamic nature of graphs more accurately with this implementation. SLATE provides a powerful tool for applications ranging from social network analysis to understanding complex biological networks.
strength_weakness: strength_weakness: 1. The experimental results of CanParl in Table 2 is not very good.
2.The permutation setting of SLATE may limit its ability to generalise to unseen nodes and large-scale graph data.
questions: questions: How does the model perform as the size of the graph increases?
limitations: limitations: Yes

Comments: title: Response to Author Rebuttal
comment: We would like to thank you for your reply and for the positive response to our work. We are delighted that the additional experiments and the rebuttal were able to provide you with answers. We'll be adding the scalability experiments as well as the detailed preprocessing experiments for the supra-adjacency matrix.
I thank the authors for their response and additional experimental results. I think they are good additions to the paper and I suggest they are included in the updated version. I'm willing to increase my rating to 6
Thank you for engaging in the discussion and raising your score. We'll be updating the final paper to make the explanations of the various steps as clear as possible. We'll also include the rebuttal visualizations and an additional visualization of the virtual nodes in the supplementary.
Thanks for answering my follow-up question. The additional explanation helped me understand your virtual nodes. I think it would be good if you could revise the paper to make this part a little more clear. I raise my score to 4.
Thank you for your reply to our rebuttal and we hope we've been able to clarify as many of your questions as possible.

**About the figures :**

Due to space constraints (1 page) and for better clarity in the figures, we did not include virtual nodes in the visualizations. A virtual node is connected to all other nodes in the snapshot, which can overcrowd the figures and make them visually complex. 
It is important to note that the purpose of the visualization is to highlight the importance of having a connected graph. Figure 2 demonstrates the significance of removing isolated nodes (*RemoveIsolatedNodes*), and Figure 3 shows the impact of adding temporal connections (*AddTemporalConnections*). Due to space limitations, we were unable to include a fourth figure illustrating the benefit of a virtual node in a snapshot with multiple connected components. However, we plan to add these visualizations using the toy dataset in the appendix of the final paper if it is accepted.

**Clarification on virtual nodes:**

*where to add these nodes?*: We add one virtual node per snapshot (l-152). 

*How many are typically added?* : If we have $W$ snapshots, we’ll add $W$ virtual nodes. 

Explanation of the *AddVirtualNode()* function using an example: 
Assume a dynamic graph $\mathcal{G} = [G_1,G_2]$ containing two snapshots. Where $G_1 = (V_1,E_1)$ and $G_2 = (V_2,E_2)$. Let $V_1 = (v_1,v_2,v_3,v_4)$ and $E_1 = ((v_1,v_2),(v_3,v_4))$. Now let’s add a virtual node $v_{n_1}$ to the graph $G_1$. We have $ V_1^{'} = V_1 \cup (v_{n_1}) $. 

A virtual node is a node connected to all the other nodes in $G_1$, so we add the following edges to $G_1$: $E_1^{'} = ( E \cup (v_{n_1},v_1),(v_{n_1},v_2),(v_{n_1},v_3),(v_{n_1},v_4))$.  We apply the same procedure to the next snapshot (i.e. $G_2$). We add a second virtual node $v_{n_2}$ and connect it to the nodes of $G_2$. In the end, we'll have added $v_{n_1}$ to the graph $G_1$ and $v_{n_2}$ to the graph $G_2$. In an adjacency matrix, as shown in Figure 2a.), this adds a new row and column, with 1's in each position corresponding to connections with all other nodes, indicating that it is connected to all existing nodes.
We hope this example helps to clarify your understanding on virtual nodes.

We hope that we have addressed all your concerns, and that you’ll be able to increase your rating. We remain at your disposal.
Thank you for your response to our rebuttal and for the positive opinion of our work. We are delighted to have been able to clarify certain concerns about our method.
We prioritized the experiments on scaling, temporal windows, and preprocessing, as these were requested by multiple reviewers. We are pleased that these additional experiments have addressed your questions. The experiments for the ranking task are currently underway, and we plan to include them in the final paper.
I thank the authors for their detailed rebuttal. Here are comments from my end:

- W1: scalability. I agree that using transformers with linear complexity can address the scalability challenge to a certain extent. Some larger datasets with million of nodes such as those seen in OGB[1] and TGB[2] might still prove to be a problem. Nonetheless, my concern here is mostly addressed. 

- W2: addressed. 

- Q1: I understand the limitation on time and proper evaluation of ranking links require significant computational time. Despite many prior work treating temporal link prediction as binary classification due to low computational cost for this evaluation, it is not a realistic measure for practical applications. In any recommendation systems, there is no guarantee of having half positive links and half negative links (as assumed in binary classification), I hope the authors can include ranking results in future versions of the paper. 

Overall, I decide to retain my current score. 

[1] Hu W, Fey M, Zitnik M, Dong Y, Ren H, Liu B, Catasta M, Leskovec J. Open graph benchmark: Datasets for machine learning on graphs. Advances in neural information processing systems. 2020;33:22118-33.

[2] Huang S, Poursafaei F, Danovitch J, Fey M, Hu W, Rossi E, Leskovec J, Bronstein M, Rabusseau G, Rabbany R. Temporal graph benchmark for machine learning on temporal graphs. Advances in Neural Information Processing Systems. 2024 Feb 13;36.
Thank you for your detailed response. 
However, I still have questions regarding Q2:

In the figures provided, it's not clear which nodes are virtual nodes. Could you please identify specifically which node numbers in the visualizations represent virtual nodes? Additionally, while Algorithm 1 in Appendix mentions `AddVirtualNode()`, it doesn't provide details on how this is done. Could you explain the specific algorithm or rules for adding virtual nodes? For instance, how do you determine where to add these nodes, and how many are typically added?