Dynamic network representation learning method for node attribute preservation
By constructing an inductive graph convolution model containing the LSTM layer and attention layer, performing partial sampling and layer-by-layer aggregation, the accuracy and efficiency problems of dynamic network analysis in the existing methods are solved, more accurate node representation learning is achieved, and the quality of social network analysis is improved.
Patent Information
- Application Number
- CN202510853996.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-24
AI Technical Summary
The existing network representation learning methods are difficult to effectively integrate node attribute information and dynamic topology, resulting in limited accuracy and efficiency in time-informed social network analysis, especially in scenarios where processing nodes frequently join or exit, the calculation complexity and dynamic information are lost.
A convolutional model of induction graph is constructed, and aggregation convolution modules of the LSTM layer, attention layer and fully connected layer are used to obtain the attribute vectors of neighbor nodes through partial sampling, and aggregate layer by layer to generate the embedded vectors of the target nodes, and characterize and learn using the trained model.
It improves the accuracy of social network analysis, can capture node attributes and network structure characteristics more accurately, and improves the effects of node classification, link prediction, community detection and abnormal detection.
Smart Images

Figure CN120354884B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a dynamic network representation learning method for preserving node attributes. Background Art
[0002] With the rapid development of social networks and artificial intelligence (AI) technologies, network representation learning (also known as network embedding) has emerged as a key technology for addressing the challenges of social network analysis. By transforming the graph structure of social networks into a low-dimensional, dense vector representation, this technology not only efficiently stores large amounts of network data but also ensures that node embedding vectors meet the sample independence requirements of machine learning algorithms. Consequently, it has achieved remarkable results in static network analysis tasks such as node classification and link prediction. However, traditional network representation learning methods are mostly designed for static networks, focusing only on the network snapshot structure at a specific moment and ignoring the dynamic evolution of social networks over time. In reality, the dynamic nature of social member interactions causes network structure and node relationships to continuously change. Traditional methods struggle to accurately capture the evolutionary patterns and intrinsic characteristics of networks over time, resulting in information loss limitations in analyzing temporal social networks.
[0003] However, existing methods for learning representations of temporal social networks still suffer from significant drawbacks. For one thing, mainstream frameworks rely on partitioning temporal networks into subgraph snapshots at fixed time intervals. This approach faces the challenge of determining the appropriate time intervals—too small an interval increases the computational burden, while too large an interval loses dynamic information. Furthermore, learning a graph convolutional neural network (GCN) on a series of snapshots leads to high computational complexity and requires nodes to persist across all snapshots, which is inconsistent with real-world scenarios where nodes frequently join and exit networks. Furthermore, inductive learning models designed for static networks, such as GraphSAGE, also have shortcomings in dynamic network applications. Their unordered aggregators fail to capture the temporal order of node interactions, and their unbiased sampling methods fail to leverage historical interaction information to quantify the strength of node relationships, making them inadequate for analyzing the dynamic and temporal characteristics of temporal networks. These issues hinder the effective integration of node attribute information and dynamic topological structure in traditional methods for temporal social networks, limiting the accuracy and efficiency of representation learning and impacting the quality of social network analysis tasks. Summary of the Invention
[0004] Based on this, it is necessary to provide a dynamic network representation learning method for node attribute preservation to address the above technical problems.
[0005] A dynamic network representation learning method for node attribute preservation, the method comprising:
[0006] Obtaining a temporal social network sample; the temporal social network sample includes nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent interactions between users at historical moments, and each row in the attribute matrix represents an attribute vector of a user;
[0007] Construct an inductive graph convolution model; the inductive graph convolution model includes Aggregation convolution modules; each aggregation convolution module includes an LSTM layer, an attention layer, and a fully connected layer;
[0008] Determine the sampling order of neighbor nodes of the target node in the temporal social network sample according to the number of aggregate convolution modules of the inductive graph convolution model, and perform biased sampling layer by layer from the highest sampling order downward according to the order of interaction time between the neighbor nodes and the target node, to obtain a sampling node set and a neighbor sequence queue for each layer; the sampling node set includes the nodes involved in the convolution calculation in the corresponding aggregate convolution module, including the target node and its neighbor nodes of the corresponding order; the neighbor sequence queue includes the neighbor node sampling sequence corresponding to the sampling node of the previous layer;
[0009] pass An aggregation convolution module aggregates the attribute vectors of neighbor nodes of corresponding orders layer by layer according to the sampling node set and neighbor sequence queue of each layer, and uses the node representation vector output by the last aggregation convolution module as the embedding vector of the target node;
[0010] The inductive graph convolution model is trained according to the time-dependent social network sample and a preset loss function to obtain a trained inductive graph convolution model, and the trained inductive graph convolution model is used to perform representation learning to complete the social network analysis task.
[0011] A dynamic network representation learning device for node attribute preservation, comprising:
[0012] A sample acquisition module is configured to acquire a temporal social network sample, wherein the temporal social network sample comprises nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent interactions between users at historical moments, and each row in the attribute matrix represents an attribute vector of a user;
[0013] A model building module is used to build an inductive graph convolution model; the inductive graph convolution model includes Aggregation convolution modules; each aggregation convolution module includes an LSTM layer, an attention layer, and a fully connected layer;
[0014] A biased sampling module is used to determine the sampling order of neighbor nodes of the target node in the time-dependent social network sample according to the number of aggregate convolution modules of the inductive graph convolution model, and perform biased sampling layer by layer from the highest sampling order downward according to the order of interaction time between the neighbor nodes and the target node, to obtain a sampling node set and a neighbor sequence queue for each layer; the sampling node set includes the nodes involved in the convolution calculation in the corresponding aggregate convolution module, including the target node and its neighbor nodes of the corresponding order; the neighbor sequence queue includes the neighbor node sampling sequence corresponding to the sampling node of the previous layer;
[0015] Node embedding module for An aggregation convolution module aggregates the attribute vectors of neighbor nodes of corresponding orders layer by layer according to the sampling node set and neighbor sequence queue of each layer, and uses the node representation vector output by the last aggregation convolution module as the embedding vector of the target node;
[0016] A representation learning module is used to train the inductive graph convolutional model based on the time-dependent social network samples and a preset loss function to obtain a trained inductive graph convolutional model, and use the trained inductive graph convolutional model to perform representation learning to complete the social network analysis task.
[0017] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0018] Obtaining a temporal social network sample; the temporal social network sample includes nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent interactions between users at historical moments, and each row in the attribute matrix represents an attribute vector of a user;
[0019] Construct an inductive graph convolution model; the inductive graph convolution model includes Aggregation convolution modules; each aggregation convolution module includes an LSTM layer, an attention layer, and a fully connected layer;
[0020] Determine the sampling order of neighbor nodes of the target node in the temporal social network sample according to the number of aggregate convolution modules of the inductive graph convolution model, and perform biased sampling layer by layer from the highest sampling order downward according to the order of interaction time between the neighbor nodes and the target node, to obtain a sampling node set and a neighbor sequence queue for each layer; the sampling node set includes the nodes involved in the convolution calculation in the corresponding aggregate convolution module, including the target node and its neighbor nodes of the corresponding order; the neighbor sequence queue includes the neighbor node sampling sequence corresponding to the sampling node of the previous layer;
[0021] pass An aggregation convolution module aggregates the attribute vectors of neighbor nodes of corresponding orders layer by layer according to the sampling node set and neighbor sequence queue of each layer, and uses the node representation vector output by the last aggregation convolution module as the embedding vector of the target node;
[0022] The inductive graph convolution model is trained according to the time-dependent social network sample and a preset loss function to obtain a trained inductive graph convolution model, and the trained inductive graph convolution model is used to perform representation learning to complete the social network analysis task.
[0023] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0024] Obtaining a temporal social network sample; the temporal social network sample includes nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent interactions between users at historical moments, and each row in the attribute matrix represents an attribute vector of a user;
[0025] Construct an inductive graph convolution model; the inductive graph convolution model includes Aggregation convolution modules; each aggregation module includes an LSTM layer, an attention layer, and a fully connected layer;
[0026] Determine the sampling order of neighbor nodes of the target node in the temporal social network sample according to the number of aggregate convolution modules of the inductive graph convolution model, and perform biased sampling layer by layer from the highest sampling order downward according to the order of interaction time between the neighbor nodes and the target node, to obtain a sampling node set and a neighbor sequence queue for each layer; the sampling node set includes the nodes involved in the convolution calculation in the corresponding aggregate convolution module, including the target node and its neighbor nodes of the corresponding order; the neighbor sequence queue includes the neighbor node sampling sequence corresponding to the sampling node of the previous layer;
[0027] pass An aggregation convolution module aggregates the attribute vectors of neighbor nodes of corresponding orders layer by layer according to the sampling node set and neighbor sequence queue of each layer, and uses the node representation vector output by the last aggregation convolution module as the embedding vector of the target node;
[0028] The inductive graph convolution model is trained according to the time-dependent social network sample and a preset loss function to obtain a trained inductive graph convolution model, and the trained inductive graph convolution model is used to perform representation learning to complete the social network analysis task.
[0029] The above-mentioned dynamic network representation learning method for node attribute preservation can fully grasp key information such as nodes (users), edges (interaction relationships), and attribute matrices (user attribute vectors) in the social network by obtaining time-dependent social network samples, providing basic data support for subsequent analysis. It constructs an inductive graph convolution model containing L aggregation convolution modules, determines the sampling order according to the number of aggregation convolution modules in the model, and performs biased sampling to obtain a set of sampling nodes and a neighbor sequence queue. It can accurately define the node range involved in the convolution calculation of each layer, provide an orderly neighbor node sampling sequence, and create conditions for layer-by-layer aggregation of neighbor node attribute vectors. Through L aggregation convolution modules, the neighbor node attribute vectors are aggregated layer by layer, and the final module output vector is used as the target node embedding vector. It can fully integrate multi-order neighbor information and obtain more accurate node representation. The model is trained based on the time-dependent social network samples and the loss function, and the model parameters are optimized so that the model comprehensively considers the dynamic network topology structure and node attribute information, learns more accurate node representation, and thus improves the accuracy of social network analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A flowchart of a dynamic network representation learning method for node attribute preservation in one embodiment;
[0031] Figure 2 Schematic diagram of the IGCN model structure in one embodiment, wherein: Figure 2 (a) is a schematic diagram of the BNS output results when the number of aggregate convolution modules is 2. Figure 2 (b) Schematic diagram of the IGCN model when the number of aggregate convolutional modules is 2;
[0032] Figure 3 Schematic diagram of the framework of the ATNE method in one embodiment;
[0033] Figure 4 A schematic diagram of an example of constructing a neighbor node time series in one embodiment, wherein: Figure 4 (a) is a schematic diagram of the timing network structure. Figure 4 (b) is a schematic diagram of the time series of neighbor nodes;
[0034] Figure 5 LSTM neuron structure diagram in one embodiment;
[0035] Figure 6 A structural block diagram of a dynamic network representation learning device for node attribute storage in one embodiment;
[0036] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0038] In one embodiment, Figure 1 As shown, a dynamic network representation learning method for node attribute preservation is provided, which includes the following steps:
[0039] Step 102: Obtain a time-dependent social network sample.
[0040] A temporal social network sample consists of nodes, edges, and attribute matrices; nodes represent users on the social network, edges represent interactions between users at historical moments, and each row in the attribute matrix represents a user's attribute vector. A temporal social network with node attributes is defined as ,in is a node set, is a set of edges with timestamps. Representation node and nodes In time There has been an interaction. In a temporal social network, there may be multiple edges with different timestamps between two nodes, that is, the temporal social network corresponds to a multigraph. For the network The attribute matrix of the node, where OK For nodes Corresponding attribute vectors. Taking the co-author network as an example, the nodes in the co-author network are authors, and the node labels are determined by the field to which the article belongs. The attribute feature vector is constructed using the bag-of-words model of the article title. The edges in the co-author network represent the co-authorship relationship between authors. The co-authorship relationship corresponds to the publication time of the article. Two authors may collaborate on multiple articles (for example, in different years), so there will be multiple edges with different timestamps.
[0041] Unlike representation learning that only considers network topology, considering node attributes enables deeper exploration of node relationships, providing superior data preprocessing for downstream network analysis tasks. It is assumed that node attributes remain unchanged during the evolution of a time-dependent social network, with only the network topology changing. This assumption aligns with common real-world scenarios. For example, basic attributes such as gender and region of users in friendship networks generally remain unchanged, and the affiliation and research field of authors in co-author networks (DBLP networks) also remain largely unchanged.
[0042] Given a time-dependent social network with node attributes , the method of the present invention is dedicated to learning a mapping function The goal of this mapping function is to make the two vectors in the mapping space and The distance between nodes is stored and similarity in structure and properties.
[0043] Step 104: construct an inductive graph convolutional model.
[0044] Node attributes provide richer semantic information for learning temporal social network representations. The present invention's attributed temporal network embedding method (ATNE) proposes a graph convolutional neural network model that can be applied to temporal networks, integrating node attribute information and temporal network dynamic topology information to learn more accurate network representations. The core of ATNE is to learn node representations by aggregating neighbor node attributes. Temporal social networks record the interaction time between the target node and its neighbor nodes. Generally speaking, the closer the interaction time is to the current time, the greater the influence of the neighbor node of the interaction on the target node. Therefore, ATNE considers the interaction order between the target node and its neighbor nodes, and uses ordered LSTM as a neighbor node attribute information aggregator. ATNE adopts an attention mechanism when aggregating neighbor information. It can discover neighbor nodes that are more important to the target node representation through learning and assign larger weight values to their attributes.
[0045] The inductive graph convolutional model includes Aggregate convolution modules; each aggregate convolution module includes LSTM layer, attention layer and fully connected layer. Figure 2 As shown, a schematic diagram of the IGCN model structure is provided. Figure 2 (b) shows the schematic diagram of the IGCN model when the number of aggregate convolution modules is 2. It can be seen that IGCN consists of multiple Convolutional layers are stacked. Determines how a node aggregates neighbor node attribute information to generate node representation. The layer consists of an LSTM layer, an Attention layer, and a fully connected layer. The LSTM layer is mainly used to extract temporal features of node interactions, the Attention layer is used to mine neighboring nodes with the greatest correlation with the target node for information aggregation, and the fully connected layer is used for nonlinear transformation of attribute information.
[0046] Step 106: Determine the sampling order of neighbor nodes of the target node in the time-dependent social network sample based on the number of aggregated convolution modules of the inductive graph convolution model, and perform biased sampling layer by layer downward from the highest sampling order according to the order of interaction time between the neighbor nodes and the target node to obtain the sampling node set and neighbor sequence queue of each layer.
[0047] The sampling node set includes the nodes involved in the convolution calculation in the corresponding aggregation convolution module, including the target node and its neighbor nodes of the corresponding order; the neighbor sequence queue includes the neighbor node sampling sequence corresponding to the sampling node of the previous layer.
[0048] like Figure 3 The framework diagram of the ATNE method shown in the figure, in which BNS (Biased Neighbor Sampling algorithm) is mainly used to sample the neighbor nodes of the target node and generate a sequence of nodes to be aggregated, while ILR (Inductive Representation Learning) uses the BNS sampling set to train an IGCN model (Inductive Graph Convolution Networks) to learn the target node representation vector. ATNE first aggregates nodes through the first convolutional layer. The neighbor node attributes get the corresponding hidden representation vector , and then input the output of the first layer into the second convolutional layer to obtain the target node The representation vector . Note that the three aggregation functions in the upper layer of the graph share parameters, which is equivalent to the same function. Each aggregation function contains an LSTM layer, an attention layer, and a fully connected nonlinear transformation layer. The input of each layer is an ordered sequence of node attributes, and its order is determined by the order of interaction between the target node and its neighbor nodes. Through two layers of convolution operations, ATNE can aggregate the target node The second-order neighbor node attribute information is used as its representation vector.
[0049] Step 108, pass An aggregation convolution module aggregates the attribute vectors of neighbor nodes of corresponding orders layer by layer according to the sampling node set and neighbor sequence queue of each layer, and uses the node representation vector output by the last aggregation convolution module as the embedding vector of the target node.
[0050] Step 110: train an inductive graph convolutional model based on the time-dependent social network samples and a preset loss function to obtain a trained inductive graph convolutional model, and use the trained inductive graph convolutional model to perform representation learning to complete the social network analysis task.
[0051] Social network analysis tasks can include node classification, link prediction, community detection, influence analysis, and anomaly detection. Using trained inductive graph convolutional models for representation learning can improve the accuracy of various social network analysis tasks. In node classification, it can more accurately capture node attributes and network structural features, improving classification accuracy and reducing misclassifications. In link prediction, the model can use the learned node representations to explore potential connections, improving prediction reliability and assisting in discovering potential future connections within the social network. In community detection, accurate node representations enable more rational segmentation of closely connected communities and clearly visualize the organizational structure of the social network. In influence analysis, it can accurately assess the influence of nodes on information dissemination, providing a powerful basis for marketing strategy formulation and public opinion guidance. In anomaly detection, it can effectively identify nodes with unusual attributes or connection patterns, enhancing the ability to identify fake accounts and malicious behavior, and ensuring the healthy and orderly operation of social networks.
[0052] Taking the node classification task of the co-author network as an example, the neighbor sampling order is determined according to the number of aggregate convolution modules (for example, 3 layers correspond to 3-order neighbors), and sampling is carried out layer by layer starting from the highest order. The nodes are sorted in chronological order of co-authorship, and recent or high-frequency collaborators are given priority to generate node sets and neighbor sequences at each layer. These are processed through multiple aggregate convolution modules (including LSTM, attention, and fully connected layers). The LSTM layer captures the time sequence of neighbor collaboration, the attention layer filters the attribute information of key neighbors, and the fully connected layer fuses the node's own attributes with the neighbor information to generate the final representation vector. The node representation is output based on the trained model, and the classifier (such as Softmax) is used to predict the author's research field. The classification accuracy is improved by combining node attributes (research content), dynamic collaborative relationships, and temporal features.
[0053] In the above-mentioned dynamic network representation learning method for node attribute preservation, by obtaining time-dependent social network samples, it is possible to fully grasp key information such as nodes (users), edges (interaction relationships), and attribute matrices (user attribute vectors) in the social network, providing basic data support for subsequent analysis. An inductive graph convolution model containing L aggregation convolution modules is constructed. The sampling order is determined according to the number of aggregation convolution modules in the model and biased sampling is performed to obtain a set of sampling nodes and a neighbor sequence queue. This can accurately define the node range involved in the convolution calculation of each layer, provide an orderly neighbor node sampling sequence, and create conditions for layer-by-layer aggregation of neighbor node attribute vectors. Neighbor node attribute vectors are aggregated layer by layer through L aggregation convolution modules, and the final module output vector is used as the target node embedding vector. This can fully integrate multi-order neighbor information and obtain more accurate node representations. The model is trained based on time-dependent social network samples and loss function, and the model parameters are optimized so that the model comprehensively considers the dynamic topological structure of the network and node attribute information, learns more accurate node representations, and thereby improves the accuracy of social network analysis.
[0054] In one embodiment, biased sampling is performed layer by layer starting from the highest sampling order according to the order of interaction time between neighbor nodes and target nodes to obtain the sampling node set and neighbor sequence queue of each layer, including: initializing the first layer according to the target node set in the temporal social network sample. The sampling node set of the layer , and according to The sampling node set of the layer Initialize The sampling node set of the layer ; Get the preset number of sampling and sampling node set The neighbor node time series of each sampling node in the process is obtained by sorting the neighbor node time series according to the order of the interaction time between the sampling node and the neighbor node of the sampling node; according to the relationship between the number of nodes in each neighbor node time series and the number of samples, direct sampling or Hawkes point process sampling is selected to obtain the neighbor node sampling sequence of each sampling node; the neighbor node sampling sequence of each sampling node is sequentially added to the first Neighbor sequence queue of a layer ; Neighbor sequence queue For the The aggregation convolution module provides neighbor sampling sequence information; the nodes in the neighbor node sampling sequence of each sampling node are deduplicated, and the deduplicated nodes are merged into the sampling node set. Get the updated sampling node set ;Updated sampling node set For the The first aggregation convolution module provides the node range involved in the convolution calculation; The above cycle is performed from layer 1 to layer 1 until the biased sampling of layer 1 is completed, and the output is The sampling node set and neighbor sequence queue from layer to layer 1.
[0055] In this embodiment, Figure 4 Construct a sample diagram for the neighbor node time series, where Figure 4 (a) is a schematic diagram of the timing network structure. Figure 4 (b) is a schematic diagram of the neighbor node time series. First, define the neighbor node time series: given a target node , its neighbor node time series Different from the set of neighbor nodes defined in a static network , yes The neighbor nodes are The interaction is arranged in chronological order. , and The interaction time is , , and The interaction time is ,and ,but Should be ranked In front of. Note, May contain duplicate nodes.
[0056] The number of samples that ATNE needs to set is ,node Neighbor node time series The length is , BNS to target node The neighbor node sampling sequence of The sampling process of BNS is divided into two cases: 1) 2) In the first case, direct sampling is used, and in the second case, Hawkes point process sampling is used. ATNE achieves node representation learning through multiple convolutional layers. And each superposition of a convolutional layer means that multiple first-order neighbor nodes need to be sampled for information aggregation. Therefore, BNS needs to have multi-layer sampling capabilities. Let For the The set of sampling nodes involved in the calculation of the convolution layer, for The queue composed of the neighbor sampling sequence of the midpoint node and the BNS algorithm implementation that supports batch sampling are as follows:
[0057] The pseudo code of Algorithm 1 Biased Neighbor Node Sampling (BNS) is as follows:
[0058] Input: Temporal Network , number of convolutional layers , sampling length , a small batch of node sets .
[0059] Output: , .
[0060] 1: Set the small batch of nodes to be characterized Assign to : ;
[0061] 2: for { }do
[0062] 3: ;
[0063] 4: for { }do
[0064] 5: if{ }then
[0065] 6: Command ;
[0066] 7: else
[0067] 8: Calculation Each neighbor node The sampling probability of ;
[0068] 9: Sampling probability sampling indivual Nodes in , and with Splicing composition ;
[0069] 10: endif
[0070] 11: Will Add to middle;
[0071] 12: ,in Used to remove Repeated nodes in ;
[0072] 13: endfor
[0073] 14: endfor
[0074] 15: return ,
[0075] In one embodiment, direct sampling or Hawkes point process sampling is selected based on the relationship between the number of nodes in each neighbor node time series and the number of samples, and the neighbor node sampling sequence of each sampling node is obtained. If the number of nodes in the current neighbor node time series is greater than or equal to the number of samples, direct sampling is performed. The direct sampling step includes: selecting the last node in the neighbor node time series. neighbor nodes, and obtain the neighbor node sampling sequence of the current sampling node, where, is the number of samples.
[0076] In this embodiment, when the first case , then the target node The number of interactions with its neighbor nodes is greater than or equal to the number of samples specified by ATNE. This case is the simplest, and we can directly set Because The The sequence of neighbor nodes that have interacted with each other meets the ATNE requirement for aggregating neighbor node attribute information in time sequence. After the sequence nodes as the sampling result, because The nodes that are ranked later in the The closer the interaction is to the current time, the stronger the impact of an interaction on the node relationship strength decreases as the interaction time passes. To ensure the latest node representation, BNS uses the neighboring nodes closest to the current time as the sampling sequence.
[0077] In one embodiment, direct sampling or Hawkes point process sampling is selected based on the relationship between the number of nodes in each neighbor node time series and the number of samples, and the neighbor node sampling sequence of each sampling node is obtained, which includes: if the number of nodes in the current neighbor node time series is less than the number of samples, then Hawkes point process sampling is performed, and the Hawkes point process sampling step includes: obtaining the difference between the number of nodes in the current neighbor node time series and the number of samples ; Calculate the sampling probability of each node in the current neighbor node time series according to the Hawkes point process, and supplement the sampling difference from the neighbor node time series according to the sampling probability nodes and concatenate them with the time series of the current neighbor nodes to obtain the neighbor node sampling sequence of the current sampling node.
[0078] In this embodiment, the point process is generally used for discrete event sequence modeling, which assumes that the time Previous historical events will have an impact on The conditional intensity function is the core of the point process, which describes the influence of an event on the The conditional probability of the occurrence of a moment can be obtained by Under these conditions, an event occurs in a very small time window. The number of occurrences within is defined as:
[0079] ;
[0080] in Indicates that the event The number of times it occurs.
[0081] The conditional intensity function of Hawkes Process (HP) is defined as follows:
[0082] ;
[0083] in is the basic intensity of the event, indicating that The probability of the moment occurring. is a kernel function used to simulate the time-decaying effect of past history on current events. By using an exponential function as the kernel function of the Hawkes process, the conditional intensity function of the Hawkes process indicates that the occurrence of the current event depends not only on the event at the last time step but also on historical events with time-decaying effects.
[0084] when When BNS is based on multivariate Hawkes Process sampling indivual The neighbor nodes of Splicing together .make For nodes The first task of BNS is to determine the set of neighbor nodes The sampling probability of nodes in the Hawkes Process assumes that historical events have a cumulative impact on the occurrence of current events, and the impact of a single historical event decays exponentially over time. This feature is very suitable for modeling node interaction events in social networks. An interaction with its neighboring nodes is regarded as an event, then Can be seen as a node A sequence of historical events. , from the multivariate Hawkes Process, we can know that its conditional intensity function is:
[0085] ;
[0086] in is the current time, For nodes and The time when this interaction occurred. For nodes With node The base strength of an interaction event at the current time, Representing historical events The occurrence of stimulating impact. is a time-decay kernel function.
[0087] In Hawkes Process, base strength Reflects the node and Natural affinity, similar to the literature, BNS adopts node and The characteristic attribute vector 、 The negative Euclidean distance is used as a similarity measure to characterize and The natural affinity of .akin, In addition, BNS uses the exponential decay model as the kernel function. At the current time and The conditional intensity function for the occurrence of interaction events can be rewritten as:
[0088] ;
[0089] Because the conditional probability intensity obtained from the above formula is a negative number, we need to Perform an exponential mapping to make its value positive. Finally, The calculation formula is as follows:
[0090] ;
[0091] get about Conditional intensity function After that, according to Hawkes Process, the node At the current time and The probability of an interaction event occurring is:
[0092] ;
[0093] get All neighbor nodes The sampling probability of After that, BNS only needs to select mid-sampling indivual The neighbor nodes can be.
[0094] In one embodiment, the sampling probability is:
[0095] ;
[0096] in, For nodes At the current time and node The probability of an interaction event occurring, , For nodes The set of neighbor nodes of For nodes At the current time and The conditional intensity function for the interaction event to occur, represent Any neighbor node in .
[0097] In one embodiment, by An aggregation convolution module aggregates the neighbor node attribute vectors of the corresponding order layer by layer according to the sampling node set and neighbor sequence queue of each layer, including: obtaining the neighbor sequence queue and the updated sampling node set ,in, ; in the An aggregation convolution module, which queues neighbor sequences through the LSTM layer The neighbor node sampling sequence of each sampling node in the process is processed to obtain the hidden state sequence of each sampling node. The hidden state sequence of each sampling node is weighted and aggregated through the attention layer to obtain the neighbor representation vector of each sampling node. The neighbor representation vector of each sampling node is combined with the sampling node's own first The layer representation vectors are spliced and the spliced vectors are input into the fully connected layer for nonlinear transformation to obtain the vectors of each sampling node in the first The representation vector of the layer.
[0098] In this embodiment, IGCN generates node representations by aggregating neighbor node attribute information through edges. Specifically, IGCN considers the temporal characteristics of temporal networks when aggregating neighbor node attribute information, aggregates information in an orderly manner, and uses an attention mechanism to learn more important neighbor nodes for information aggregation. Figure 2 The following figure shows an IGCN model structure with two convolutional layers. The following will explain the process of IGCN generating node representations in detail with the example shown in the figure.
[0099] Figure 2(a) is a schematic diagram of the BNS output result when the number of aggregate convolution modules is 2, showing that IGCN generates nodes through two layers of convolution Characterization Of course, IGCN needs to aggregate information based on the BNS sampling results. As can be seen from the figure, the number of BNS sampling layers , the number of sampled neighbor nodes for each node , from which BNS outputs three sampling node sets and two lists of neighbor sampling sequences As can be seen from the figure, The 0th layer representation of each node in is the characteristic attribute vector of the node The first layer of IGCN Used to generate The first layer representation of each node in .by Take the generation of as an example. First, Input to the LSTM layer and get Then Input to the attention layer to get the node Ordered neighbor attribute aggregation representation , and finally and Layer 0 representation After splicing, input to the fully connected layer for a nonlinear transformation The first layer representation vector to .pass After layer, we can get The first layer representation vector of all nodes in .Then The layer is obtained by similar operations midpoint The second layer representation vector As The final representation vector Output. Through the above two layers of convolution, IGCN can aggregate in an orderly manner The second-order neighbor node attribute information.
[0100] Given a set of nodes that need to generate representations , by BNS based on Sampling generates multiple sampling node sets and a list of sampled neighbor sequences ,IGCN batch generation node representation process is shown in Algorithm 2. for List queues , 、 Respectively represent Convolutional layers, attention layers, and LSTM layers.
[0101] The pseudo code of Algorithm 2 batch node representation generation is as follows:
[0102] Input: number of convolutional layers , a small batch of node sets , node features .
[0103] Output: Node representation .
[0104] 1: Assign the node feature attributes to the node's 0th layer representation vector, that is: ;
[0105] 2: for { }do
[0106] 3: for { }do
[0107] 4: Aggregation Node Neighbor attributes: ;
[0108] 5: Will Layer neighbor aggregation information and Layer node properties After splicing, the input is sent to the fully connected layer for nonlinear transformation: ;
[0109] 6: endfor
[0110] 7: endfor
[0111] 8: return The representation vector of the layer is output as the node representation: .
[0112] Long Short-Term Memory (LSTM) is a recurrent neural network with a special structure that can learn long-term dependencies of sequence data and effectively solve the problems of gradient vanishing and gradient exploding during training. IGCN uses LSTM as an aggregator of neighbor node attribute information to learn the temporal characteristics of the interaction between the target node and its neighbor nodes. The convolutional layer contains The forward propagation process. From the structure of IGCN, we can see that Mainly used to aggregate target nodes Layer neighbor node representation vector. Assume that the target node is , its neighbor nodes The representation vector sequence of the layer is In order to simplify the description, the following description of LSTM will omit Subscript used to indicate node number in .
[0113] like Figure 5 The LSTM neuron structure shown in the figure is composed of multiple LSTM neurons stacked together. Compared with traditional RNN, LSTM introduces memory units. It is used to memorize the historical information of the input sequence. In addition, LSTM introduces a gating mechanism to control the information transmission path. Figure 5 As shown, an LSTM neuron contains an input gate A forget gate , an output gate The forget gate Control forgetting the previous step neuron memory unit , input gate Used to control the information that needs to be remembered in the current step input, output gate Used to control the current memory unit The information is passed to the next neuron.
[0114] From this we can see that a single LSTM neuron receives the memory unit of the previous step neuron , the activation state of the neural unit in the previous step and current step information As input, update the memory unit according to the following formula And output the current neural unit activation state :
[0115] ;
[0116] ;
[0117] in represents vector element-wise multiplication, is the candidate state of the current memory unit. Its calculation formula is as follows:
[0118]
[0119] Each gate needs to be updated according to the current step input information. The specific update method is as follows:
[0120]
[0121] The attention mechanism was first applied to the field of machine translation in natural language processing. Its key is to assign different weights to different words in the sequence to learn the representation of the entire sentence. In the process of aggregating neighbor node attribute information, different neighbor node attribute information may have different effects on the target node representation. In order to further explore IGCN introduces an attention mechanism in the convolutional layer to assign different weights to the attributes of different neighbor nodes and learn the representation of the target node. The specific implementation of the attention layer is as follows:
[0122] For the target node Its neighbor nodes Layer representation vector sequence enter After layer, we can get Layer representation vector sequence . First, a perceptron layer is used to calculate Each of The hidden representation vector :
[0123]
[0124] Then a softmax function is used to get the normalized attention weights:
[0125] ;
[0126] in is the sequence context vector, which is randomly initialized and obtained through training.
[0127] Finally, the representation of neighbor nodes is aggregated by weighted summation to generate :
[0128] ;
[0129] Get the target node Aggregation results of neighbor nodes back, The last step that needs to be done on the layer is to combine of Layer representation vector and Neighbor aggregation vector of the layer , and perform nonlinear transformation to obtain Layer characterization results The specific calculation method is as follows:
[0130] .
[0131] In one embodiment, the loss function is:
[0132] ;
[0133] in, For nodes The embedding vector obtained after processing by the inductive graph convolution model, For nodes The loss function value of It is a slave node Starting from, the set of neighbor nodes obtained by random walk of fixed length, Belongs to the set The nodes in It is a slave node of The order neighbor nodes are sampled, Belongs to the set The nodes in represents the activation function, is a node The embedding vector obtained after processing by the inductive graph convolution model, is a node The embedding vector obtained after processing by the inductive graph convolution model, is the transpose operation.
[0134] In this embodiment, after determining the IGCN model, ILR is dedicated to training the IGCN model parameters to generate a time-dependent network representation. ILR can train IGCN in an unsupervised or supervised manner. The specific method used can be determined according to the corresponding downstream task. This paper mainly introduces the more general case, that is, using ILR unsupervised training to generate network representations. It is hoped that similar nodes have similar representation vectors in the embedding space. Therefore, based on the network structure, the above loss function is defined, where The size is equal to By minimizing the above loss function, nodes that are closer in the network will have similar representation vectors, while the representation vectors of nodes that are farther away will be more different.
[0135] Specifically, given a time-dependent network with attributes , training rounds , batch training size , the implementation of the ILR algorithm is shown in Algorithm 3 below:
[0136] Algorithm 3 Inductive representation learning algorithm
[0137] Input: , training rounds , batch training size .
[0138] Output: Network characterization results .
[0139] 1: for { }do
[0140] 2: According to Will The nodes are randomly divided into A collection of which Indicates the A collection;
[0141] 3: for { }do
[0142] 4: Command ;
[0143] 5: for { }do
[0144] 6: According to Sampling and ;
[0145] 7: ;
[0146] 8: endfor
[0147] 9: Using BNS algorithm Biased sampling of internal nodes is performed to obtain and ;
[0148] 10: Generate using Algorithm 2 The representation vectors of all nodes in ;
[0149] 11: Calculate the batch loss function value and update the IGCN model parameters using the batch gradient descent algorithm;
[0150] 12: endfor
[0151] 13: endfor
[0152] 14: Initialization ;
[0153] 15: According to Will The internal nodes are divided into A collection;
[0154] 16: for { }
[0155] 17: Command ;
[0156] 18: Using BNS algorithm Biased sampling of internal nodes is performed to obtain and ;
[0157] 19: Generated using Algorithm 4.2 The representation vectors of all nodes in ;
[0158] 20: Orderly splicing to ;
[0159] 21: endfor
[0160] 22: return time-dependent network representation matrix .
[0161] In a specific embodiment, the performance of various algorithms in node clustering applications is compared through experiments. Node clustering aims to cluster nodes based on node feature distances when node labels are unknown. The clustering results can usually be used as a basis for network community discovery. Similar to the link prediction experiment setup, the network is first characterized by learning in an unsupervised manner to obtain a representation matrix. The node representation vectors are then used as node feature vectors to train a machine learning clustering model, which is then used to cluster nodes. The clustering model used in this set of experiments is the K-means model. The DBLP network and the Reddit network with node labels are used as experimental datasets, with node labels used as baseline class labels. The co-author network (DBLP network) contains 20,992 nodes, 237,720 edges, and four types of node labels. Nodes represent authors, and edges represent a single co-authorship between two authors. Specifically, the network includes articles mined from four different fields between 2010 and 2020: computer vision (CVPR, ICCV), data mining (KDD, ICDM), natural language processing (ACL, EMNLP), and artificial intelligence (AAAI, IJCAI). Node labels represent the author's research area of interest, determined by the primary field of their published articles. Node attribute feature vectors are constructed using a bag-of-words model based on the author's article titles, with a dimension of 2000. The Reddit network is a hyperlink network within the Reddit community. The network consists of 22,858 nodes, 296,058 edges, and three different labels. A node represents a community on Reddit, and an edge represents an interaction between two communities. The node label represents the sentiment classification of the community, specifically positive, negative, and neutral. The node attribute feature vector has a dimension of 300.
[0162] For the DBLP network and Reddit network, the cluster K value of the K-means model is set to 4 and 3 respectively. This group of experiments uses Normalized Mutual Information (MNI) as the evaluation indicator of clustering accuracy. Specifically, the set of true class labels of a given node is and the set of node category labels predicted by the algorithm , NMI is defined as follows:
[0163] ;
[0164] in is a collection The entropy of is a collection and collection Mutual information measure.
[0165] Table 1 Node clustering MNI values of each algorithm in DBLP network and Reddit network
[0166]
[0167] Table 1 shows the performance of each algorithm in node clustering accuracy (MNI) on the Reddit and DBLP networks. In Table 1, the maximum MNI values are highlighted in bold. The comparison algorithms can be divided into two categories: static network representation learning algorithms and dynamic network representation learning algorithms. Static comparison algorithms include the DeepWalk algorithm, which does not consider node attributes, and the GraphSAGE algorithm, which does. Dynamic comparison algorithms include algorithms that do not consider node attributes (E-LSTM-D, CTDNE, and HNIP). The experimental results in Table 1 provide the following conclusions:
[0168] ATNE outperformed the other five compared algorithms in node clustering, further demonstrating its effectiveness. This set of experiments used K-Means as the clusterer, which directly uses the distance between node representation vectors as the clustering basis. ATNE's optimal performance in this set of experiments demonstrates its ability to more effectively embed similar nodes in the network closer together. Similarly, representation learning methods that consider node attributes achieve better clustering accuracy than those that do not. For example, GraphSAGE achieved an NMI of 0.298 on the DBLP network, while DeepWalk achieved an NMI of 0.214. Similarly, ATNE achieved an NMI of 0.409 on the DBLP network, while E-LSTM-D achieved an NMI of 0.311. All algorithms performed better on the DBLP network than on the Reddit network. This is because in this set of experiments, we used node category labels as the clustering basis.
[0169] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0170] In one embodiment, Figure 6 As shown, a dynamic network representation learning device for node attribute preservation is provided, comprising:
[0171] A sample acquisition module 602 is configured to acquire a temporal social network sample. The temporal social network sample includes nodes, edges, and an attribute matrix. Nodes represent users on the social network, edges represent interactions between users at historical moments, and each row in the attribute matrix represents an attribute vector of a user.
[0172] Model building module 604 is used to build an inductive graph convolution model; the inductive graph convolution model includes Aggregate convolution modules; each aggregate convolution module includes an LSTM layer, an attention layer, and a fully connected layer;
[0173] The biased sampling module 606 is configured to determine the sampling order of neighbor nodes of the target node in the time-dependent social network sample based on the number of aggregate convolution modules of the inductive graph convolution model, and perform biased sampling layer by layer starting from the highest sampling order according to the order of interaction time between the neighbor nodes and the target node, to obtain a sampling node set and a neighbor sequence queue for each layer; the sampling node set includes the nodes involved in the convolution calculation in the corresponding aggregate convolution module, including the target node and its neighbor nodes of the corresponding order; the neighbor sequence queue includes the neighbor node sampling sequence corresponding to the sampling node in the previous layer;
[0174] Node embedding module 608, used to An aggregation convolution module aggregates the attribute vectors of neighbor nodes of corresponding orders layer by layer according to the sampling node set and neighbor sequence queue of each layer, and uses the node representation vector output by the last aggregation convolution module as the embedding vector of the target node;
[0175] The representation learning module 610 is used to train the inductive graph convolution model based on the time-dependent social network samples and a preset loss function to obtain a trained inductive graph convolution model, and use the trained inductive graph convolution model to perform representation learning to complete the social network analysis task.
[0176] In one embodiment, it is further used to initialize the first The sampling node set of the layer , and according to The sampling node set of the layer Initialize The sampling node set of the layer ; Get the preset number of sampling and sampling node set The neighbor node time series of each sampling node in the process is obtained by sorting the neighbor node time series according to the order of the interaction time between the sampling node and the neighbor node of the sampling node; according to the relationship between the number of nodes in each neighbor node time series and the number of samples, direct sampling or Hawkes point process sampling is selected to obtain the neighbor node sampling sequence of each sampling node; the neighbor node sampling sequence of each sampling node is sequentially added to the first Neighbor sequence queue of a layer ; Neighbor sequence queue For the The aggregation convolution module provides neighbor sampling sequence information; the nodes in the neighbor node sampling sequence of each sampling node are deduplicated, and the deduplicated nodes are merged into the sampling node set. Get the updated sampling node set ;Updated sampling node set For the The first aggregation convolution module provides the node range involved in the convolution calculation; The above cycle is performed from layer 1 to layer 1 until the biased sampling of layer 1 is completed, and the output is The sampling node set and neighbor sequence queue from layer to layer 1.
[0177] In one embodiment, if the number of nodes in the current neighbor node time series is greater than or equal to the sampling number, direct sampling is performed, and the direct sampling step includes: selecting the last node in the neighbor node time series; neighbor nodes, and obtain the neighbor node sampling sequence of the current sampling node, where, is the number of samples.
[0178] In one embodiment, if the number of nodes in the current neighbor node time series is less than the sampling number, Hawkes point process sampling is performed, and the Hawkes point process sampling step includes: obtaining the difference between the number of nodes in the current neighbor node time series and the sampling number ; Calculate the sampling probability of each node in the current neighbor node time series according to the Hawkes point process, and supplement the sampling difference from the neighbor node time series according to the sampling probability nodes and concatenate them with the time series of the current neighbor nodes to obtain the neighbor node sampling sequence of the current sampling node.
[0179] In one embodiment, the sampling probability is:
[0180] ;
[0181] in, For nodes At the current time and node The probability of an interaction event occurring, , For nodes The set of neighbor nodes of For nodes At the current time and The conditional intensity function for the interaction event to occur, represent Any neighbor node in .
[0182] In one embodiment, it is also used to obtain the neighbor sequence queue and the updated sampling node set ,in, ; in the An aggregation convolution module, which queues neighbor sequences through the LSTM layer The neighbor node sampling sequence of each sampling node in the process is processed to obtain the hidden state sequence of each sampling node. The hidden state sequence of each sampling node is weighted and aggregated through the attention layer to obtain the neighbor representation vector of each sampling node. The neighbor representation vector of each sampling node is combined with the sampling node's own first The layer representation vectors are spliced and the spliced vectors are input into the fully connected layer for nonlinear transformation to obtain the vectors of each sampling node in the first The representation vector of the layer.
[0183] In one embodiment, the loss function is:
[0184] ;
[0185] in, For nodes The embedding vector obtained after processing by the inductive graph convolution model, For nodes The loss function value of It is a slave node Starting from, the set of neighbor nodes obtained by random walk of fixed length, Belongs to the set The nodes in It is a slave node of The order neighbor nodes are sampled, Belongs to the set The nodes in represents the activation function, is a node The embedding vector obtained after processing by the inductive graph convolution model, is a node The embedding vector obtained after processing by the inductive graph convolution model, is the transpose operation.
[0186] Regarding the specific limitations of the dynamic network representation learning device for node attribute preservation, please refer to the limitations of the dynamic network representation learning method for node attribute preservation above, which will not be repeated here. The various modules in the above-mentioned dynamic network representation learning device for node attribute preservation can be implemented in whole or in part through software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0187] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a dynamic network representation learning method for node attribute preservation is implemented. The display screen of the computer device can be a liquid crystal display or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.
[0188] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0189] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.
[0190] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.
[0191] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0192] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0193] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and such modifications and improvements are intended to fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A dynamic network representation learning method for node attribute preservation, characterized in that: The method comprises: Obtaining a temporal social network sample; the temporal social network sample includes nodes, edges, and an attribute matrix; the nodes represent users on the social network, the edges represent interactions between users at historical moments, and each row in the attribute matrix represents an attribute vector of a user; Construct an inductive graph convolution model; the inductive graph convolution model includes Aggregation convolution modules; each aggregation convolution module includes an LSTM layer, an attention layer, and a fully connected layer; Determine the sampling order of neighbor nodes of the target node in the temporal social network sample according to the number of aggregate convolution modules of the inductive graph convolution model, and perform biased sampling layer by layer from the highest sampling order downward according to the order of interaction time between the neighbor nodes and the target node, to obtain a sampling node set and a neighbor sequence queue for each layer; the sampling node set includes the nodes involved in the convolution calculation in the corresponding aggregate convolution module, including the target node and its neighbor nodes of the corresponding order; the neighbor sequence queue includes the neighbor node sampling sequence corresponding to the sampling node of the previous layer; pass An aggregation convolution module aggregates the attribute vectors of neighbor nodes of corresponding orders layer by layer according to the sampling node set and neighbor sequence queue of each layer, and uses the node representation vector output by the last aggregation convolution module as the embedding vector of the target node; The inductive graph convolution model is trained according to the time-dependent social network sample and a preset loss function to obtain a trained inductive graph convolution model, and the trained inductive graph convolution model is used to perform representation learning to complete the social network analysis task.
2. The method according to claim 1, characterized in that The biased sampling is performed layer by layer starting from the highest sampling order according to the order of interaction time between the neighbor nodes and the target node, and the sampling node set and neighbor sequence queue of each layer are obtained, including: Initialize the first The sampling node set of the layer , and according to The sampling node set of the layer Initialize The sampling node set of the layer ; Get the preset number of samples and sampling node set The neighbor node time series of each sampling node in the data set is obtained by sorting the neighbor node time series according to the order of interaction time between the sampling node and the neighbor node of the sampling node; Direct sampling or Hawkes point process sampling is selected based on the relationship between the number of nodes in each neighbor node time series and the number of samples, to obtain a neighbor node sampling sequence for each sampling node; Add the neighbor node sampling sequence of each sampling node to the first Neighbor sequence queue of a layer ; The neighbor sequence queue For the The aggregation convolution module provides neighbor sampling sequence information; Remove duplicate nodes from the neighbor node sampling sequence of each sampling node, and merge the removed duplicate nodes into the sampling node set Get the updated sampling node set ; The updated sampling node set For the Each aggregation convolution module provides the node range involved in the convolution calculation; In the The above cycle is performed from layer 1 to layer 1 until the biased sampling of layer 1 is completed, and the output is The sampling node set and neighbor sequence queue from layer to layer 1.
3. The method according to claim 2, characterized in that Direct sampling or Hawkes point process sampling is selected based on the relationship between the number of nodes in each neighbor node time series and the number of samples, and the neighbor node sampling sequence of each sampling node is obtained, including: If the number of nodes in the current neighbor node time series is greater than or equal to the sampling number, direct sampling is performed, and the direct sampling step includes: Select the last node in the neighbor node time series neighbor nodes, and obtain the neighbor node sampling sequence of the current sampling node, where, is the number of samples.
4. The method according to claim 2, characterized in that Direct sampling or Hawkes point process sampling is selected based on the relationship between the number of nodes in each neighbor node time series and the number of samples, and the neighbor node sampling sequence of each sampling node is obtained, including: If the number of nodes in the current neighbor node time series is less than the sampling number, Hawkes point process sampling is performed, and the steps of Hawkes point process sampling include: Get the difference between the number of nodes in the current neighbor node time series and the number of samples ; Calculate the sampling probability of each node in the current neighbor node time series according to the Hawkes point process, and supplement the sampling difference from the neighbor node time series according to the sampling probability nodes and concatenate them with the time series of the current neighbor nodes to obtain the neighbor node sampling sequence of the current sampling node.
5. The method according to claim 4, characterized in that The sampling probability is: ; in, For nodes At the current time and node The probability of an interaction event occurring, , For nodes The set of neighbor nodes of For nodes At the current time and The conditional intensity function for the interaction event to occur, represent Any neighbor node in .
6. The method according to claim 1, characterized in that pass An aggregation convolution module aggregates the neighbor node attribute vectors of the corresponding order layer by layer according to the sampling node set and neighbor sequence queue of each layer, including: Get neighbor sequence queue and the updated sampling node set ,in, ; In the An aggregation convolution module is used to queue the neighbor sequence through the LSTM layer. The neighbor node sampling sequence of each sampling node in the process is processed to obtain the hidden state sequence of each sampling node. The hidden state sequence of each sampling node is weighted and aggregated through the attention layer to obtain the neighbor representation vector of each sampling node. The neighbor representation vector of each sampling node is combined with the sampling node's own first The layer representation vectors are spliced and the spliced vectors are input into the fully connected layer for nonlinear transformation to obtain the vectors of each sampling node in the first The representation vector of the layer.
7. The method according to claim 1, characterized in that The loss function is: ; in, For nodes The embedding vector obtained after processing by the inductive graph convolution model, For nodes The loss function value of It is a slave node Starting from, the set of neighbor nodes obtained by random walk of fixed length, Belongs to the set The nodes in It is a slave node of The order neighbor nodes are sampled, Belongs to the set The nodes in represents the activation function, is a node The embedding vector obtained after processing by the inductive graph convolution model, is a node The embedding vector obtained after processing by the inductive graph convolution model, is the transpose operation.
Citation Information
Patent Citations
Personalized recommendation method fusing social relation and time semantics
CN118152444A
Methods and systems for temporal graph representation learning based on node-level temporal point processes
US20250061304A1