Abstract
Predicting link formation in dynamic graphs is a critical task for applications ranging from social network analysis to transaction monitoring. Current state-of-the-art methods rely on complex Positional Encodings (PE) and Transformer architectures, which often suffer from high computational costs and limited adaptability to evolving topologies. We present L-STEP (Learnable Spatial-Temporal Positional Encoding), a framework that treats graph structural evolution as a signal to be filtered. By utilizing a Fourier-based learnable encoding and efficient Multi-Layer Perceptrons (MLPs), L-STEP achieves state-of-the-art performance with linear time complexity, offering significant speedups over existing Transformer-based models.
Introduction
In dynamic graphs, capturing the relative positions of nodes as they evolve over time is essential for accurate link prediction. While Positional Encodings (PE) provide these topological cues, existing methods face three primary challenges:
- Rigidity: Fixed mathematical functions (e.g., Laplacian eigenvectors) lack the flexibility to adapt to diverse data distributions.
- Static Focus: Many learnable PEs are computed on individual snapshots, failing to capture the temporal trajectory of node positions.
- Efficiency Bottlenecks: High-performing models typically feed PEs into Transformers, which scale quadratically with the number of nodes or edges, making them impractical for massive real-world datasets.
L-STEP addresses these issues by replacing dense attention mechanisms with a signal-processing approach to positional encoding.
Methods
The L-STEP architecture is divided into two main components: the Learnable Positional Encoding (LPE) module and the Node-Link-Positional Encoder.
Learnable Positional Encoding (LPE) Module
Rather than recomputing spectral properties at every timestamp—a computationally expensive process—L-STEP treats the sequence of historical positional encodings as a time-series signal. It employs a Discrete Fourier Transform (DFT) to map this signal into the frequency domain, applies a learnable complex-valued filter to denoise the trajectory, and uses an Inverse DFT (IDFT) to estimate the node's current position. This approach ensures that the learned positions are mathematically grounded in the graph's topology while remaining computationally efficient.
Node-Link-Positional Encoder
Once the positions are estimated, L-STEP utilizes simple MLPs to aggregate node features, edge features, and the predicted positional data. By avoiding the quadratic complexity of Transformers, L-STEP achieves a total time complexity of $O(n)$, scaling linearly with the number of nodes.
Experimental Evaluation
L-STEP was evaluated against 13 classic datasets (including Wikipedia, Reddit, and Enron) and the large-scale Temporal Graph Benchmark (TGB), specifically tgbl-review (4.8M edges) and tgbl-coin (22.8M edges).
Key Results
L-STEP consistently outperformed or matched state-of-the-art models across diverse metrics. As shown in the performance table below, L-STEP achieved the top average rank across 13 classic datasets in both Average Precision (AP) and ROC-AUC.
Beyond accuracy, the model demonstrated significant efficiency gains. On the UN Trade dataset, L-STEP was 4x to 13x faster than DyGFormer, a leading Transformer-based competitor. On the TGB leaderboard, L-STEP secured 2nd place on tgbl-review and 3rd place on tgbl-coin, proving its scalability to multi-million edge graphs.
Discussion and Insights
- Position as a Signal: Treating a node's movement through "graph space" as a signal allows the model to leverage robust frequency-domain filtering techniques to predict structural changes.
- The Power of MLPs: The results challenge the necessity of Transformers for graph learning. If the positional encodings are sufficiently expressive and learnable, simple MLPs can provide superior performance at a fraction of the computational cost.
- Spectral Preservation: Theoretical analysis confirms that the LPE scheme preserves the spatial-temporal spectral properties of the graph, ensuring the learned representations are topologically meaningful.
Limitations and Future Work
L-STEP's theoretical guarantees assume that graph topology changes relatively slowly. In highly volatile networks where structures change abruptly, Fourier-based estimation may require further refinement. Additionally, while the model is robust, it currently relies on traditional Laplacian PE for initial snapshots; future research could explore "cold-start" scenarios where no initial spectral data is available. Further optimization of the learnable frequency filters could also enhance precision for specific types of temporal noise.
Summary updated