# motifpreserving_temporal_network_embedding__0c6de291.pdf Motif-Preserving Temporal Network Embedding Hong Huang1,2,3 , Zixuan Fang1,2,3 , Xiao Wang4 , Youshan Miao5 and Hai Jin1,2,3 1National Engineering Research Center for Big Data Technology and System 2Service Computing Technology and Systems Laboratory 3School of Computer Science and Technology, Huazhong University of Science and Technology, China 4Beijing University of Posts and Telecommunications, China 5Microsoft Research Asia {honghuang, zixuan, hjin}@hust.edu.cn, xiaowang@bupt.edu.cn, yomia@microsoft.com Network embedding, mapping nodes in a network to a low-dimensional space, achieves powerful performance. An increasing number of works focus on static network embedding, however, seldom attention has been paid to temporal network embedding, especially without considering the effect of mesoscopic dynamics when the network evolves. In light of this, we concentrate on a particular motif triad and its temporal dynamics, to study the temporal network embedding. Specifically, we propose MTNE, a novel embedding model for temporal networks. MTNE not only integrates the Hawkes process to stimulate the triad evolution process that preserves motif-aware high-order proximities, but also combines attention mechanism to distinguish the importance of different types of triads better. Experiments on various real-world temporal networks demonstrate that, compared with several state-of-the-art methods, our model achieves the best performance in both static and dynamic tasks, including node classification, link prediction, and link recommendation. 1 Introduction Recently academic and industry have both witnessed rapid development of network embedding, which maps the nodes into a low-dimensional space while preserving certain proximities among nodes, features, or structures. Due to its powerful performance, network representation learning, namely network embedding, has been widely applied to various network-related tasks, such as link prediction, node clustering, and node classification. Inspired by word embedding [Mikolov et al., 2013] in language processing, Deepwalk [Perozzi et al., 2014] is proposed to embed nodes in the networks. Furthermore, LINE [Tang et al., 2015] preserves firstand secondproximities, Gra Rep [Cao et al., 2015] preserves k-order proximities, Node2vec [Grover and Leskovec, 2016] preserves neighborhood proximity, and MNMF [Wang et al., Contact Author Figure 1: A toy example of network evolution 2017] preserves communities. All these methods achieve good performance in various network-related tasks. However, the methods mentioned above are all proposed to deal with static networks, while most networks exhibit complex temporal properties, which means nodes and edges always evolve over the time. For example, in an information diffusion network, information interactions between users shape the typology of temporal network and influence the network evolution. As shown in Figure 1, there are a group of three users in an information diffusion network. At time t1, when B receives A s information, an edge from A to B establishes. An edge forms once there is an action associated with information diffusion happens. If we consider a static network at time t4, we only know that there is a closed triad in which A and B send messages mutually, and C receives from B and A, respectively. However, if we capture its temporal properties, more information will be preserved that B first receives from A, which indicates that A has a higher social power according to the social status theory [Waters, 2015]. Therefore, evolution dynamics and properties need to be well examined and preserved for temporal networks. In literature, there are only a few works focus on temporal network embedding. For instance, HTNE [Zuo et al., 2018] considers the temporal network embedding via neighborhood formation process. M2DNE [Lu et al., 2019] studies microand macro-dynamics by taking edge dynamics and network evolution patterns into account. The former method only considers the influence of one node s neighbor formation sequence on the current neighbor. Nevertheless the establishment of a relationship between two nodes is an interacted process, and the neighbor formation sequence cannot reflect the law of network evolution very well. Besides from edge level, the latter takes the whole network s evolution into account. However, except the consideration of microand macro-dynamics, the influence from a mesoscopic view for temporal networks has been ignored. Meso-dynamics has been widely used in mining complex Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence (IJCAI-20) networks, as well as social networks. It is crucial to understand the network structure and function of social systems [Huang et al., 2018]. Unlike micro-dynamics focusing on node and edge level, meso-dynamics considers the coupling effects of a small group of nodes and edges. Besides, it exhibits group properties with only a few nodes and edges, thus preserving group-aware high-order proximity. Usually, meso-dynamics is in the form of subgraph evolution, where subgraph patterns are also called network motifs. Since network motifs have been well studied, meso-dynamics can make full use of their correlations. In this paper, we propose a novel temporal network embedding method with the consideration of meso-dynamics, named MTNE. In view of meso-dynamics, we focus on the simplest and fundamental motif triad in the networks. Specially, we first incorporate the triad dynamics into the Hawkes process. So that, our model can well capture the effects of past events of users inside a triad. Moreover, we adopt attention mechanism to specify the importance of different types of triads. Note that our method can be easily applied to model other motifs due to the generality of the Hawkes process. We test our model on several real-world datasets. The experimental results show that our proposed MTNE outperforms state-of-the-art baselines in both static and dynamic tasks. The major contributions of our work are as follows: To our knowledge, we are the first to concentrate on temporal network embedding with meso-dynamics that preserves motif-aware high-order proximity. We propose a novel model (MTNE), which leverages Hawkes process to model motif evolution and design an attention mechanism to model the importance of motif structures. Experiment results on five real-world datasets show that our MTNE has better performance than several state-ofthe-art baselines in both static and dynamic tasks. 2 Preliminaries In a temporal network, each edge indicates an event that happens between two nodes at a time point. Formally, given a temporal network G = (V, E, T ), where V and E indicate nodes and edges of the temporal network and T is the set of timestamps. A temporal edge et ij E represents an event that is initiated by node vi together with node vj at time t. Note that since node vi and node vj may arise multiple events at different time t, temporal edge et ij represents distinct events while edge eij is only a static edge between node vi and node vj, and can be either directed or undirected. For example, in one mobile communication network, we can construct a static network based on the relationship among users. On the other hand, we can also build a temporal network to describe the interactions among users. In the temporal network, each temporal edge means a phone call between two users at a certain time. Once user vi calls user vj at time t, then a temporal edge et ij establishes. In this paper, we start with the simplest and fundamental motif triad, and introduce the definition of temporal triad. Definition 1: Temporal Triad. Given three nodes = (vi, vj, vk), if there are at least two temporal edges that involve the three nodes, e.g., et1 ij, et2 jk E then we call a temporal triad. Specially, if there exists at least one temporal edge for any two nodes in a temporal triad, we call a temporal closed triad. If there exist two nodes in a temporal triad without any temporal edges, then we call a temporal open triad. Network evolution is, in some sense, driven by the triadic closure process [Huang et al., 2015]. From a microscopic view, the triadic closure process describes how an open triad forms a closed triad. Given an open triad (vi, vj, vk) at time t1, where vi and vj do not know each other but they have a common friend vk. Now, if vk decides to introduce vi and vj and lets them know each other, there will be a connection between vi and vj and the open triad (vi, vj, vk) will become closed at time t2. Nevertheless, there is a problem that if there are multiple open triads which consist of vi and vj before time t1, we cannot accurately infer from the dataset which open triad determines the connection between vi and vj. We call all these temporal open triads as candidate temporal triads. In this paper, we aim to represent the nodes in the temporal networks incorporating the influence of all candidate temporal triads. We formally define our problem as below. Problem. Motif-Preserving Temporal Network Embedding. Given a temporal network G = (V, E, T ), during network evolution, we generate all candidate temporal triads for every node pair in V. Then, motif-preserving temporal network embedding aims to learn a mapping function f : V 7 Rd, where d is a positive integer indicating the number of embedding dimensions and d |V |. The objective of the function f is to not only preserve the feature of the network structure but also capture the influence of motif-based network evolution. 3 The Proposed Model 3.1 Model Overview In this section, we propose MTNE, a novel model that is capable of learning desirable representations for nodes in temporal networks and simultaneously preserve the characteristics of motifs in the network. As illustrated in Figure 2, node pairs (i, j) and (p, q) belong to different open triads, respectively. Considered their different past temporal information, even if they have the same property, the generated embeddings for them in the new dimension would be different. Our proposed MTNE would capture such precise and diverse structural information triad motif evolution property. Specifically, MTNE leverages Hawkes process to model motif evolution process. Then we can learn it using optimization techniques like stochastic gradient descent (SGD). 3.2 Triad Motif Evolution Modeling As we know, the triad motif evolution process is influenced by the historical triad evolution events. Therefore, the Hawkes process [Hawkes, 1971] can be used to model triad motif evolution. We define the conditional intensity function as λx,y(t) = µx,y + X th