Abstract
Networks evolve continuously over time with the addition, deletion, and changing of links and nodes. Such temporal networks (or edge streams) consist of a sequence of timestamped edges and are seemingly ubiquitous. Despite the importance of accurately modeling the temporal information, most embedding methods ignore it entirely or approximate the temporal network using a sequence of static snapshot graphs. In this work, we propose using the notion of temporal walks for learning dynamic embeddings from temporal networks. Temporal walks capture the temporally valid interactions (e.g., flow of information, spread of disease) in the dynamic network in a lossless fashion. Based on the notion of temporal walks, we describe a general class of embeddings called continuous-time dynamic network embeddings (CTDNEs) that completely avoid the issues and problems that arise when approximating the temporal network as a sequence of static snapshot graphs. Unlike previous work, CTDNEs learn dynamic node embeddings directly from the temporal network at the finest temporal granularity and thus use only temporally valid information. As such CTDNEs naturally support online learning of the node embeddings in a streaming real-time fashion. Finally, the experiments demonstrate the effectiveness of this class of embedding methods that leverage temporal walks as it achieves an average gain in AUC of 11.9% across all methods and graphs.
Introduction
Most real-world networks—social media interactions, financial transactions, or email logs—are inherently dynamic. However, traditional node embedding methods like DeepWalk or node2vec typically treat these as static graphs. Even "dynamic" methods often rely on a sequence of discrete snapshots (e.g., one graph per day). This paper introduces CTDNE (Continuous-Time Dynamic Network Embeddings), a framework that learns node representations directly from a stream of timestamped edges. By replacing standard random walks with "temporal walks" that strictly obey the arrow of time, CTDNE achieves significant improvements in link prediction accuracy over methods that ignore temporal order.
The Problem: Temporal Loss in Static and Snapshot Graphs
The authors identify a major flaw in traditional approaches: temporal loss. When edges are aggregated into a static graph or a sequence of snapshots, the precise order of events is lost. This allows for "invalid" random walks—sequences of nodes that could never occur in reality because they move backward in time. For example, if Alice emails Bob at 10:00 AM and Bob emails Charlie at 9:00 AM, a standard algorithm might suggest a path from Alice to Charlie, even though information could not have flowed in that direction.
Choosing the right snapshot window (e.g., an hour vs. a day) is a notorious challenge. CTDNE bypasses this entirely by treating time as continuous, ensuring that the "arrow of time" acts as a powerful regularizer by ignoring noisy, physically impossible connections.
Continuous-Time Dynamic Network Embeddings (CTDNE)
The core innovation of CTDNE is the Temporal Random Walk. Unlike a standard walk, a temporal walk is a sequence of edges where the timestamp of each successive edge must be greater than or equal to the previous one ($t_i \le t_{i+1}$). This ensures that the walks represent valid paths of information flow or interaction.
The CTDNE framework consists of three main stages:
- Initial Edge Selection: Choosing the starting point of the walk. The authors explore Uniform, Linear, and Exponential biases. Biased versions favor starting walks from more recent edges, which are often more predictive of future behavior.
- Temporal Neighbor Selection: Once at a node, the algorithm picks the next hop from neighbors connected by edges occurring after the current time. This can be biased toward "soon-to-follow" interactions to capture bursty activity.
- Learning Embeddings: These time-respecting walks are processed by a Skip-gram model to generate final D-dimensional embeddings.
Crucially, CTDNE supports Online Learning. As new edges arrive in a stream, the model performs fast partial updates by sampling walks that end at the new edge, allowing embeddings to evolve in real-time.
Experimental Evaluation
The authors evaluated CTDNE on eight diverse temporal networks, including communication logs (e.g., Enron emails), social forums, and financial transactions. These datasets range from a few days to several years, with granularity down to seconds.
Key Results
- Link Prediction: CTDNE consistently outperformed static baselines (DeepWalk, node2vec, LINE) across all datasets, with an average gain in AUC (Area Under Curve) of 11.9%.
- Continuous vs. Discrete: Compared against discrete-time dynamic network embeddings (DTDNE), CTDNE showed a mean gain of 7.25%, proving that snapshot approximations lead to significant information loss.
- Efficiency: In streaming settings, updating the model for a new edge took between 2.6 and 8.9 milliseconds on average, making it viable for high-throughput production environments.
Conclusion and Future Work
CTDNE demonstrates that learning directly from continuous-time edge streams is both more accurate and more efficient than snapshot-based methods. By enforcing temporal validity, the model produces cleaner representations that better reflect the underlying dynamics of the network. Future work includes incorporating node attributes (e.g., user profiles) into "attributed temporal walks" and addressing inductive learning for "cold-start" scenarios where entirely new nodes appear in the stream.
Summary updated